From 41a7946bf9e207b63ac3a49eba42fe7e573ee917 Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Jun 09 2020 08:28:25 +0000 Subject: configure: Fix detection of supported NSS db type For now configure always reports about the lack of support for any NSS db: checking if NSS supports "sql:" databases... no checking if NSS supports "dbm:" databases... no Actually, there is the linking issue, but AC_TRY_RUN is not designed to detect this. The recipe is the obeying the proper linking order: $CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS Fixes: https://pagure.io/certmonger/issue/153 Signed-off-by: Stanislav Levin --- diff --git a/configure.ac b/configure.ac index 7b05517..c9e9ff0 100644 --- a/configure.ac +++ b/configure.ac @@ -412,9 +412,11 @@ if ! ${configure_dist_target_only:-false} ; then savedCFLAGS="$CFLAGS" savedCPPFLAGS="$CPPFLAGS" savedLDFLAGS="$LDFLAGS" + savedLIBS="$LIBS" CFLAGS="$CFLAGS $NSS_CFLAGS" CPPFLAGS="$CPPFLAGS $NSS_CFLAGS" - LDFLAGS="$LDFLAGS $NSS_LIBS" + LDFLAGS="$LDFLAGS" + LIBS="$NSS_LIBS" AC_MSG_CHECKING([if NSS supports "sql:" databases]) mkdir _nss_db_testdir || : AC_TRY_RUN([ @@ -478,6 +480,7 @@ if ! ${configure_dist_target_only:-false} ; then CFLAGS="$savedCFLAGS" CPPFLAGS="$savedCPPFLAGS" LDFLAGS="$savedLDFLAGS" + LIBS="$savedLIBS" fi AC_ARG_WITH(gmp,