diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 11e59c3..2ada65d 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,11 @@ AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/syrep/]) # If using GCC specifiy some additional parameters if test "x$GCC" = "xyes" ; then - CFLAGS="$CFLAGS -pipe -Wall -W -Wno-unused-parameter" + CFLAGS="$CFLAGS -pipe -W -Wall -pedantic" + + AC_LANG_CONFTEST([int main() {}]) + $CC -c conftest.c -std=c99 -Wno-unused-parameter $CFLAGS > /dev/null 2> /dev/null && CFLAGS="$CFLAGS -std=c99 -Wno-unused-parameter" + rm -f conftest.o fi if type -p stow > /dev/null && test -d /usr/local/stow ; then @@ -46,21 +50,21 @@ AC_CHECK_LIB([z], [inflate],, [AC_MSG_ERROR([*** Sorry, you have to install zlib AC_CHECK_HEADER([zlib.h],, [AC_MSG_ERROR([*** Sorry, you have to install the zlib headers ***])]) # Check for Berkeley DB (needs to be improved) -AC_CHECK_HEADER([db.h],, [AC_MSG_ERROR([*** Sorry, you have to install the Berkeley Database Library (libdb) 4.2 or newer ***])]) -AC_CHECK_LIB([db], [db_create_4002],, [AC_MSG_ERROR([*** Sorry, you have to install the Berkeley Database Library (libdb) 4.2 or newer ***])]) +AC_CHECK_HEADER([db.h],, [AC_MSG_ERROR([*** Sorry, you have to install the Berkeley Database Library (libdb) 4.3 or newer ***])]) +AC_CHECK_LIB([db], [__db_db_create_4003],, [AC_MSG_ERROR([*** Sorry, you have to install the Berkeley Database Library (libdb) 4.3 or newer ***])]) LIBS="$LIBS -ldb" # Checking libdb version number -AC_MSG_CHECKING([for Berkeley libdb 4.2]) +AC_MSG_CHECKING([for Berkeley libdb 4.3]) AC_LANG_PUSH(C) AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ #include <db.h> -#if (DB_VERSION_MAJOR != 4) || (DB_VERSION_MINOR != 2) +#if (DB_VERSION_MAJOR != 4) || (DB_VERSION_MINOR != 3) #error "foo" #endif ]])], [AC_MSG_RESULT([yes])], -[AC_MSG_FAILURE([Berkeley libdb 4.2 required])]) +[AC_MSG_FAILURE([Berkeley libdb 4.3 required])]) AC_LANG_POP(C) # Check for Linux sendfile() |