1st chunk fixes bootstrap 2nd fixes db-4.8 support 3nd fixes respecting user LDFLAGS http://bugs.gentoo.org/286620 http://bugs.gentoo.org/310167 --- libetpan-0.57/configure.ac +++ libetpan-0.57/configure.ac @@ -104,8 +104,9 @@ fi AM_CONDITIONAL(HAVE_MINGW32_SYSTEM, test "$have_w32_system" = yes) -# Check the C compiler. +# Check the C and CXX compiler. AC_PROG_CC +AC_PROG_CXX # Compiler flags. AC_ARG_ENABLE(debug, [ --enable-debug setup flags (gcc) for debugging (default=no)], @@ -382,7 +383,7 @@ case "$DBVERS" in 3) AC_MSG_RESULT([version 3.x or above]) - for lib in db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db-3.2 db-3 db3 db; do + for lib in db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db-3.2 db-3 db3 db; do if test "x$DBLINKED" = "x0"; then dnl AC_CHECK_LIB($lib, db_create, [DBLIB="-l$lib"; DBLINKED=1], []) dnl installations of libdb4 function names are defined in db.h @@ -452,11 +453,11 @@ for flag in "pthreads" "pthread"; do if test "x$checkpthread" = "xyes"; then AC_MSG_CHECKING([for pthread_create with -$flag]) - OLDFLAGS="$LDFLAGS" - LDFLAGS="-$flag $LDFLAGS" + OLDLIBS="$LIBS" + LIBS="$LIBS -l$flag" AC_TRY_LINK([], [pthread_create();], [pthflag=yes; checkpthread=no], - [pthflag=no; LDFLAGS="$OLDCFLAGS"]) + [pthflag=no; LIBS="$OLDLIBS"]) AC_MSG_RESULT($pthflag) fi done