Source: milter-greylist Version: 4.6.4-4 Tags: patch upstream User: debian-cr...@lists.debian.org Usertags: ftcbfs
milter-greylist fails to cross build from source, because it uses AC_RUN_IFELSE in multiple occasions. In this bug report, I'm considering only the first two of them. There, we want to check whether linking -lcurl requires -lcrypto. In this case, running the program does not yield any added value. We are using no symbols from either library and if running fails, linking should fail already. Thus, I am proposing to change AC_RUN_IFELSE to AC_LINK_IFELSE here. I'm attaching a patch for your convenience. Note that this patch does not make milter-greylist cross buildable. That's ok. Please close this bug anyway when doing something about the -lcurl test. Helmut
--- milter-greylist-4.6.4.orig/configure.ac +++ milter-greylist-4.6.4/configure.ac @@ -514,16 +514,16 @@ fi # Do we need -lcrypto with -lcurl? -if test $use_libcurl = yes ; then - AC_MSG_CHECKING([if -lcurl needs -lcrypto to link and run]) +AS_IF([test $use_libcurl = yes],[ + AC_MSG_CHECKING([if -lcurl needs -lcrypto to link]) lcurl_needs_lcrypto=no SAVEDLIBS=$LIBS SAVEDLDFLAGS=$LDFLAGS - AC_RUN_IFELSE([AC_LANG_PROGRAM([],[])], + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [], [LDFLAGS="$LDFLAGS $LDFLAGS_openssl" LIBS="$LIBS_openssl_crypto $LIBS" - AC_RUN_IFELSE([AC_LANG_PROGRAM([],[])], + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lcurl_needs_lcrypto=yes SAVEDLIBS=$LIBS], [echo "Required libcrypto not found for libcurl."; @@ -537,7 +537,7 @@ AC_MSG_RESULT($lcurl_needs_lcrypto) LIBS=$SAVEDLIBS LDFLAGS=$SAVEDLDFLAGS -fi +]) # Checks for library functions. AC_FUNC_FORK