Substitute cflags/libs per-library
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 14 Jun 2011 16:40:07 +0000 (17:40 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 29 Jul 2011 10:06:50 +0000 (11:06 +0100)
This means each module can link whatever it needs to, localizing the
knowledge of which module needs which libraries into its own
Makefile.am.

configure.ac

index 3dc4f40..0b45e37 100644 (file)
@@ -890,6 +890,8 @@ if $dbus_use_libxml; then
    XML_LIBS=$LIBXML_LIBS
    XML_CFLAGS=$LIBXML_CFLAGS
 fi
+AC_SUBST([XML_CFLAGS])
+AC_SUBST([XML_LIBS])
 
 # Thread lib detection
 AC_CHECK_FUNC(pthread_cond_timedwait,[AC_CHECK_LIB(pthread,pthread_cond_timedwait,
@@ -920,6 +922,8 @@ fi
 fi
 LIBS="$save_libs"
 
+AC_SUBST([THREAD_LIBS])
+
 # SELinux detection
 if test x$enable_selinux = xno ; then
     have_selinux=no;
@@ -1087,7 +1091,9 @@ if test x$have_libaudit = xyes ; then
     AC_DEFINE(HAVE_LIBAUDIT,1,[audit daemon SELinux support])
 fi
 
-# Check for ADT API
+AC_SUBST([SELINUX_LIBS])
+
+# Check for ADT API (Solaris Basic Security Mode auditing)
 AC_MSG_CHECKING(for ADT API)
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <bsm/adt.h>
@@ -1103,6 +1109,7 @@ then
 else
    AC_MSG_RESULT(no)
 fi
+AC_SUBST([ADT_LIBS])
 
 # Check for SCM_RIGHTS
 AC_MSG_CHECKING([for SCM_RIGHTS])
@@ -1124,6 +1131,8 @@ if test x$dbus_win = xyes ; then
   fi
 fi
 
+AC_SUBST([NETWORK_libs])
+
 #### Set up final flags
 DBUS_CLIENT_LIBS="$THREAD_LIBS $NETWORK_libs"
 AC_SUBST(DBUS_CLIENT_LIBS)