mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-23 09:26:27 -06:00
Fix code that customizes parameters for specific gcc versions
to agree with the comments.
This commit is contained in:
parent
fb8018b374
commit
4ec1f6b724
16
configure.ac
16
configure.ac
@ -1305,18 +1305,18 @@ then
|
||||
# -Wdeclaration-after-statement in order to preserve source code
|
||||
# compatibility to gcc 2.95 and other compilers.
|
||||
GCC_VERSION=`${CC} -dumpversion`
|
||||
if test "`echo ${GCC_VERSION} | cut -d. -f1`" -ge 3; then
|
||||
# This is gcc >= 3.x.x
|
||||
if test "`echo ${GCC_VERSION} | cut -d. -f1`" -eq 3; then
|
||||
# This is gcc 3.x.x
|
||||
if test "`echo ${GCC_VERSION} | cut -d. -f2`" -ge 4; then
|
||||
# This is gcc >= 3.4.x
|
||||
warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement"
|
||||
else if test "`echo ${GCC_VERSION} | cut -d. -f1`" -ge 4; then
|
||||
# This is gcc == 4.x.x
|
||||
warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement -Wno-pointer-sign"
|
||||
# rpmbuild on FC4 forces this flag. Can't hurt to always compile with it.
|
||||
warnFLAGS="${warnFLAGS} -D_FORTIFY_SOURCE=2"
|
||||
fi
|
||||
fi
|
||||
else if test "`echo ${GCC_VERSION} | cut -d. -f1`" -ge 4; then
|
||||
# This is gcc >= 4.x.x
|
||||
warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement -Wno-pointer-sign"
|
||||
# rpmbuild on FC4 forces this flag. Can't hurt to always compile with it.
|
||||
warnFLAGS="${warnFLAGS} -D_FORTIFY_SOURCE=2"
|
||||
fi
|
||||
fi
|
||||
CFLAGS="${warnFLAGS} ${CFLAGS}"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user