s3/s4 build: Fix execinfo and sasl build error when the libs/headers are in non-stand...
authorTim Prouty <tprouty@samba.org>
Wed, 19 Nov 2008 00:52:58 +0000 (16:52 -0800)
committerTim Prouty <tprouty@samba.org>
Wed, 19 Nov 2008 01:43:51 +0000 (17:43 -0800)
These configure checks have the correct flags at configure time, so
let's pass them through so they are used at compile time.

lib/util/fault.m4
source4/auth/config.m4

index b24e63641cd19cc3662d328fc0371e454b84e8c2..da077af31da91dd9c156cf14c8b2e076fab7e8ef 100644 (file)
@@ -1,5 +1,15 @@
 AC_CHECK_HEADERS(execinfo.h)
 AC_SEARCH_LIBS_EXT(backtrace, [execinfo], EXECINFO_LIBS)
 AC_CHECK_FUNC_EXT(backtrace, $EXECINFO_LIBS)
-SMB_EXT_LIB(EXECINFO,[${EXECINFO_LIBS}])
-SMB_ENABLE(EXECINFO)
+
+
+if test x"$ac_cv_header_execinfo_h" = x"yes" -a x"$ac_cv_func_ext_backtrace" = x"yes";then
+       SMB_ENABLE(EXECINFO, YES)
+       EXECINFO_CFLAGS="$CFLAGS"
+       EXECINFO_CPPFLAGS="$CPPFLAGS"
+       EXECINFO_LDFLAGS="$LDFLAGS"
+else
+       SMB_ENABLE(EXECINFO,NO)
+fi
+
+SMB_EXT_LIB(EXECINFO, [${EXECINFO_LIBS}], [${EXECINFO_CFLAGS}], [${EXECINFO_CPPFLAGS}], [${EXECINFO_LDFLAGS}])
index 1338b775ec859c6692eda9845971cea5e301202c..a271a9f6fe4c8eca6e4e6486689bac29a1d0ac55 100644 (file)
@@ -20,11 +20,15 @@ AC_CHECK_FUNCS(crypt16 getauthuid getpwanam)
 
 AC_CHECK_HEADERS(sasl/sasl.h)
 AC_CHECK_LIB_EXT(sasl2, SASL_LIBS, sasl_client_init)
-SMB_EXT_LIB(SASL, $SASL_LIBS)
 
 if test x"$ac_cv_header_sasl_sasl_h" = x"yes" -a x"$ac_cv_lib_ext_sasl2_sasl_client_init" = x"yes";then
        SMB_ENABLE(SASL,YES)
        SMB_ENABLE(cyrus_sasl,YES)
+       SASL_CFLAGS="$CFLAGS"
+       SASL_CPPFLAGS="$CPPFLAGS"
+       SASL_LDFLAGS="$LDFLAGS"
 else
        SMB_ENABLE(cyrus_sasl,NO)
 fi
+
+SMB_EXT_LIB(SASL, $SASL_LIBS, [${SASL_CFLAGS}], [${SASL_CPPFLAGS}], [${SASL_LDFLAGS}])