diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2003-01-23 19:19:02 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2003-01-23 19:19:02 (GMT) |
commit | 355c902a73e7bc50f7a44b5b8064dc7ec0d191b0 (patch) | |
tree | 4926e50db2cb8144e244d644cebc61ca0b39a697 /configure.in | |
parent | daa26b6c11a7741302593d7b5931ad6eb873571c (diff) | |
download | hdf5-355c902a73e7bc50f7a44b5b8064dc7ec0d191b0.zip hdf5-355c902a73e7bc50f7a44b5b8064dc7ec0d191b0.tar.gz hdf5-355c902a73e7bc50f7a44b5b8064dc7ec0d191b0.tar.bz2 |
[svn-r6317] Purpose:
Bug Fix
Description:
Some compilers were having problems if we included the -I/usr/include
and -L/usr/lib flags which are completely redundant. This could occur
if the user configured with something like:
./configure --with-zlib=/usr/include,/usr/lib
Solution:
Check if the --with-* command is specified with /usr/include and
/usr/lib. If so, then don't place them in the compile macros.
Platforms tested:
Linux, Modi4
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 62 |
1 files changed, 59 insertions, 3 deletions
diff --git a/configure.in b/configure.in index 7b29de6..69b2cd6 100644 --- a/configure.in +++ b/configure.in @@ -160,7 +160,7 @@ for f in $host_cpu-$host_vendor-$host_os \ fi AC_MSG_RESULT([no]) done -if test $host_config != "none"; then +if test "X$host_config" != "Xnone"; then CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" . $host_config fi @@ -285,7 +285,7 @@ case $host_os in if $CC -v 2>&1 | grep '^gcc' > /dev/null ; then : using gcc else - echo 'fix $wl in' $ofile + echo 'fixing $wl in' $ofile ed - $ofile <<EOF 2> /dev/null /^wl=""/s//wl="-Wl,"/ w @@ -710,6 +710,15 @@ case $withval in ;; esac + dnl Trying to include -I/usr/include and -L/usr/lib is redundant and + dnl can mess some compilers up. + if test "X$dmalloc_inc" = "X/usr/include"; then + dmalloc_inc="" + fi + if test "X$dmalloc_lib" = "X/usr/lib"; then + dmalloc_lib="" + fi + saved_CPPFLAGS="$CPPFLAGS" saved_LDFLAGS="$LDFLAGS" @@ -773,6 +782,15 @@ case $withval in ;; esac + dnl Trying to include -I/usr/include and -L/usr/lib is redundant and + dnl can mess some compilers up. + if test "X$zlib_inc" = "X/usr/include"; then + zlib_inc="" + fi + if test "X$zlib_lib" = "X/usr/lib"; then + zlib_lib="" + fi + saved_CPPFLAGS="$CPPFLAGS" saved_LDFLAGS="$LDFLAGS" @@ -838,6 +856,15 @@ case "$withval" in ;; esac + dnl Trying to include -I/usr/include and -L/usr/lib is redundant and + dnl can mess some compilers up. + if test "X$pablo_inc" = "X/usr/include"; then + pablo_inc="" + fi + if test "X$pablo_lib" = "X/usr/lib"; then + pablo_lib="" + fi + saved_CPPFLAGS="$CPPFLAGS" saved_LDFLAGS="$LDFLAGS" if test -n "$pablo_inc"; then @@ -898,7 +925,9 @@ case "$withval" in ;; *) saved_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -L$with_ssl" + if test "X$with_ssl" != "X/usr/lib"; then + LDFLAGS="$LDFLAGS -L$with_ssl" + fi AC_CHECK_LIB(crypto,main,, LDFLAGS="$saved_LDFLAGS"; unset SSL) AC_CHECK_LIB(ssl,SSL_get_version,, LDFLAGS="$saved_LDFLAGS"; unset SSL) ;; @@ -949,6 +978,15 @@ case "$withval" in ;; esac + dnl Trying to include -I/usr/include and -L/usr/lib is redundant and + dnl can mess some compilers up. + if test "X$gass_inc" = "X/usr/include"; then + gass_inc="" + fi + if test "X$gass_lib" = "X/usr/lib"; then + gass_lib="" + fi + if test -n "$gass_inc"; then saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$gass_inc" @@ -1026,6 +1064,15 @@ case "$withval" in ;; esac + dnl Trying to include -I/usr/include and -L/usr/lib is redundant and + dnl can mess some compilers up. + if test "X$srb_inc" = "X/usr/include"; then + srb_inc="" + fi + if test "X$srb_lib" = "X/usr/lib"; then + srb_lib="" + fi + if test -n "$srb_inc"; then saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$srb_inc" @@ -1105,6 +1152,15 @@ case "$withval" in ;; esac + dnl Trying to include -I/usr/include and -L/usr/lib is redundant and + dnl can mess some compilers up. + if test "X$pthread_inc" = "X/usr/include"; then + pthread_inc="" + fi + if test "X$pthread_lib" = "X/usr/lib"; then + pthread_lib="" + fi + if test -n "$pthread_inc"; then saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$pthread_inc" |