diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index bc2ab41..7c5849a 100644 --- a/configure.ac +++ b/configure.ac @@ -160,6 +160,8 @@ AM_JNIFLAGS="${AM_JNIFLAGS}" AM_JAVACFLAGS="${AM_JAVACFLAGS}" AM_JAVAFLAGS="${AM_JAVAFLAGS}" AM_LDFLAGS="${AM_LDFLAGS}" + +## Flags passed in by the user CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" FCFLAGS="${FCFLAGS}" @@ -181,6 +183,14 @@ saved_user_JAVAFLAGS="$JAVAFLAGS" saved_user_LDFLAGS="$LDFLAGS" saved_user_CPPFLAGS="$CPPFLAGS" +## Strip out -Werror from CFLAGS since that can cause checks to fail when +## compiling the test program fails due to warnings +CFLAGS="`echo $CFLAGS | sed -e 's/-Werror//g'`" +CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Werror//g'`" +FCFLAGS="`echo $FCFLAGS | sed -e 's/-Werror//g'`" +JAVACFLAGS="`echo $JAVACFLAGS | sed -e 's/-Werror//g'`" +CPPFLAGS="`echo $CPPFLAGS | sed -e 's/-Werror//g'`" + ## Support F9X variable to define Fortran compiler if FC variable is ## not used. This should be deprecated in the future. if test "x" = "x$FC"; then @@ -782,7 +792,7 @@ HDF_CXX=no ## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will ## miss even if c++ is not enabled. AC_PROG_CXX -AC_PROG_CXXCPP ## this is checked for when AC_HEADER_STDC is done +AC_PROG_CXXCPP AC_MSG_CHECKING([if c++ interface enabled]) @@ -907,7 +917,7 @@ esac ## ---------------------------------------------------------------------- ## Check which archiving tool to use. This needs to be done before -## the AM_PROG_LIBTOOL macro. +## the LT_INIT macro. ## if test -z "$AR"; then AC_CHECK_PROGS([AR], [ar xar], [:], [$PATH]) @@ -1326,7 +1336,8 @@ esac ## Windows case "`uname`" in MINGW*) - AC_HAVE_LIBRARY([ws2_32]) + # The Winsock library + AC_CHECK_LIB([ws2_32], [GetUserName]) ;; esac @@ -2100,21 +2111,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[int __attribute__((unused)) x]])], AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) -AC_MSG_CHECKING([for C99 designated initialization support]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ - typedef struct { - int x; - union { - int i; - double d; - } u; - } di_struct_t; - di_struct_t x = {0, { .d = 0.0}}; ]])], - [AC_DEFINE([HAVE_C99_DESIGNATED_INITIALIZER], [1], - [Define if the compiler understands C99 designated initialization of structs and unions]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) - ## ---------------------------------------------------------------------- ## Remove old ways of determining debug/production build. ## These were used in 1.8.x and earlier. We should probably keep these checks |