Fixing as-needed issues http://bugs.gentoo.org/313165 --- configure.ac +++ configure.ac @@ -39,8 +39,8 @@ AC_PROG_MAKE_SET LT_CONFIG_LTDL_DIR([libltdl]) LT_INIT([disable-static dlopen win32-dll]) -AM_PATH_LIBLTDL([lt_dlopenext lt_dlsym], ,AC_MSG_ERROR([GNUnet needs libltdl])) LT_LIB_DLLOAD +AM_PATH_LIBLTDL([lt_dlopenext lt_dlsym], ,AC_MSG_ERROR([GNUnet needs libltdl])) AC_SUBST(MKDIR_P) # large file support --- m4/libltdl-external.m4 +++ m4/libltdl-external.m4 @@ -19,15 +19,17 @@ libltdl_prefix="$withval", libltdl_prefix="") ltdl_save_CPPFLAGS="$CPPFLAGS" ltdl_save_LDFLAGS="$LDFLAGS" + ltdl_save_LIBS="$LIBS" if test x$libltdl_prefix != x ; then - CPPFLAGS="-I$libltdl_prefix/include $CPPFLAGS" - LDFLAGS="-L$libltdl_prefix/lib -lltdl $LDFLAGS" + CPPFLAGS="$CPPFLAGS -I$libltdl_prefix/include" + LDFLAGS="$LDFLAGS -L$libltdl_prefix/lib" + LIBS="-lltdl $LIBS" else if test x"$LIBLTDL" = x ; then LIBLTDL="-lltdl" fi CPPFLAGS="$LTDLINCL $CPPFLAGS" - LDFLAGS="$LIBLTDL $LDFLAGS" + LIBS="$LIBLTDL $LIBS" fi symbols_to_check=ifelse([$1], ,"ltdl_dlopen","$1") @@ -59,6 +61,7 @@ fi CPPFLAGS="$ltdl_save_CPPFLAGS" LDFLAGS="$ltdl_save_LDFLAGS" + LIBS="$ltdl_save_LIBS" AC_MSG_CHECKING(for libltdl with symbols $symbols_to_check) if test $ltdl_found = yes; then