diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-05-01 14:15:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-05-01 14:15:35 (GMT) |
commit | 80de8bccb966432f2402562a97fec9be3aea9443 (patch) | |
tree | 26785be0aadb7d8160a3d26a7ed295ab423a4127 /config | |
parent | 2491fa05d4b8da306c3c6720d89630d42e75912c (diff) | |
download | hdf5-80de8bccb966432f2402562a97fec9be3aea9443.zip hdf5-80de8bccb966432f2402562a97fec9be3aea9443.tar.gz hdf5-80de8bccb966432f2402562a97fec9be3aea9443.tar.bz2 |
[svn-r5304] Purpose:
Configure cleanup
Description:
Fine-tune the gcc version checks a bit more...
Platforms tested:
FreeBSD 4.5 (sleipnir) with gcc 2.95.3 and gcc 3.1 (prerelease) and
Solaris 2.6 (baldric) with gcc 2.8.1
Diffstat (limited to 'config')
-rw-r--r-- | config/gnu-flags | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/config/gnu-flags b/config/gnu-flags index e24e1db..228ae1b 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -123,7 +123,7 @@ esac case "$cc_vendor-$cc_version" in gcc*|egcs*|pgcc*) # General - CFLAGS="$CFLAGS $ARCH -ansi -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wno-long-long" + CFLAGS="$CFLAGS $ARCH -ansi -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline" # Production PROD_CFLAGS="-O2 $NOFP -finline-functions" @@ -149,7 +149,7 @@ case "$cc_vendor-$cc_version" in cc_flags_set=yes ;; - gcc-2.8.*) + gcc-2.8*) # General CFLAGS="$CFLAGS $ARCH -Wsign-compare" @@ -160,17 +160,21 @@ case "$cc_vendor-$cc_version" in cc_flags_set=yes ;; - gcc-2.95.*) - # No changes from default GCC flags... + gcc-2.95*) + # Append some extra warning flags that only gcc3+ know about + CFLAGS="$CFLAGS -Wno-long-long" # Flags are set cc_flags_set=yes ;; - gcc-3.*) + gcc-3.0*) # Replace -ansi flag with -std=c99 flag CFLAGS="`echo $CFLAGS | sed -e 's/-ansi/-std=c99/g'`" + # Append warning flags from gcc-2.95.* case + CFLAGS="$CFLAGS -Wno-long-long" + # Append some extra warning flags that only gcc3+ know about CFLAGS="$CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" @@ -178,6 +182,23 @@ case "$cc_vendor-$cc_version" in cc_flags_set=yes ;; + gcc-3.1*) + # Replace -ansi flag with -std=c99 flag + CFLAGS="`echo $CFLAGS | sed -e 's/-ansi/-std=c99/g'`" + + # Append warning flags from gcc-2.95* case + CFLAGS="$CFLAGS -Wno-long-long" + + # Append warning flags from gcc-3.0* case + CFLAGS="$CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" + + # Append some extra warning flags that only gcc3.1+ know about + # None currently... + + # Flags are set + cc_flags_set=yes + ;; + egcs-2.*|pgcc-2.*) # General CFLAGS="$CFLAGS $ARCH -Wsign-compare" |