From 27a8e752935491cb6c259f7bb15efb23d592ff8b Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Tue, 6 Feb 2007 15:51:22 +0000 Subject: Resolves: bug 227452 Bug Description: Solaris build: Need to add other libs for autotool build Reviewed by: nhosoi (Thanks!) Fix Description: The AC_CHECK_LIB test for db_create needs -lnsl because libdb links with it on Solaris. Other executables require -lnsl, -lsocket, and -ldl. The strategy is to put these in the platform specific section in configure.ac so they can be exported to the Makefile. Then we can just use the macros directly in Makefile. On platforms where these are not required, they will evaluate to empty. There was a bug in the regexp that derived the libdir from pkg-config in several m4 files. We needed to use .* instead of just *. pkg-config --libs-only-L returns multiple paths on Solaris but not on linux. Platforms tested: Solaris 9 Flag Day: no Doc impact: no --- configure.ac | 88 ++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 47 insertions(+), 41 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 6922f5a7..729620d4 100644 --- a/configure.ac +++ b/configure.ac @@ -61,47 +61,6 @@ AC_SUBST([debug_defs]) AC_PREFIX_DEFAULT([/opt/fedora-ds]) -# Check for library dependencies -m4_include(m4/nspr.m4) -m4_include(m4/nss.m4) -m4_include(m4/mozldap.m4) -m4_include(m4/db.m4) -m4_include(m4/sasl.m4) -m4_include(m4/svrcore.m4) -m4_include(m4/icu.m4) -m4_include(m4/netsnmp.m4) -m4_include(m4/fhs.m4) - -# write out paths for binary components -AC_SUBST(nspr_inc) -AC_SUBST(nspr_lib) -AC_SUBST(nspr_libdir) -AC_SUBST(nss_inc) -AC_SUBST(nss_lib) -AC_SUBST(nss_libdir) -AC_SUBST(ldapsdk_inc) -AC_SUBST(ldapsdk_lib) -AC_SUBST(ldapsdk_libdir) -AC_SUBST(ldapsdk_bindir) -AC_SUBST(db_inc) -AC_SUBST(db_incdir) -AC_SUBST(db_lib) -AC_SUBST(db_libdir) -AC_SUBST(db_bindir) -AC_SUBST(db_libver) -AC_SUBST(sasl_inc) -AC_SUBST(sasl_lib) -AC_SUBST(sasl_libdir) -AC_SUBST(svrcore_inc) -AC_SUBST(svrcore_lib) -AC_SUBST(icu_lib) -AC_SUBST(icu_inc) -AC_SUBST(icu_bin) -AC_SUBST(netsnmp_inc) -AC_SUBST(netsnmp_lib) -AC_SUBST(netsnmp_libdir) -AC_SUBST(netsnmp_link) - # installation paths - by default, configure will just # use /usr as the prefix for everything, which means # /usr/etc and /usr/var. FHS sez to use /etc and /var. @@ -184,6 +143,12 @@ case $host in AC_DEFINE([sunos5], [1], [SunOS5]) AC_DEFINE([OSVERSION], [509], [OS version]) AC_DEFINE([_REENTRANT], [1], [_REENTRANT]) + LIBSOCKET=-lsocket + AC_SUBST([LIBSOCKET], [$LIBSOCKET]) + LIBNSL=-lnsl + AC_SUBST([LIBNSL], [$LIBNSL]) + LIBDL=-ldl + AC_SUBST([LIBDL], [$LIBDL]) platform="solaris" ;; *) @@ -193,6 +158,47 @@ esac AM_CONDITIONAL(SOLARIS,test "$platform" = "solaris") +# Check for library dependencies +m4_include(m4/nspr.m4) +m4_include(m4/nss.m4) +m4_include(m4/mozldap.m4) +m4_include(m4/db.m4) +m4_include(m4/sasl.m4) +m4_include(m4/svrcore.m4) +m4_include(m4/icu.m4) +m4_include(m4/netsnmp.m4) +m4_include(m4/fhs.m4) + +# write out paths for binary components +AC_SUBST(nspr_inc) +AC_SUBST(nspr_lib) +AC_SUBST(nspr_libdir) +AC_SUBST(nss_inc) +AC_SUBST(nss_lib) +AC_SUBST(nss_libdir) +AC_SUBST(ldapsdk_inc) +AC_SUBST(ldapsdk_lib) +AC_SUBST(ldapsdk_libdir) +AC_SUBST(ldapsdk_bindir) +AC_SUBST(db_inc) +AC_SUBST(db_incdir) +AC_SUBST(db_lib) +AC_SUBST(db_libdir) +AC_SUBST(db_bindir) +AC_SUBST(db_libver) +AC_SUBST(sasl_inc) +AC_SUBST(sasl_lib) +AC_SUBST(sasl_libdir) +AC_SUBST(svrcore_inc) +AC_SUBST(svrcore_lib) +AC_SUBST(icu_lib) +AC_SUBST(icu_inc) +AC_SUBST(icu_bin) +AC_SUBST(netsnmp_inc) +AC_SUBST(netsnmp_lib) +AC_SUBST(netsnmp_libdir) +AC_SUBST(netsnmp_link) + AC_DEFINE([LDAP_DEBUG], [1], [LDAP debug flag]) AC_DEFINE([LDAP_DONT_USE_SMARTHEAP], [1], [Don't use smartheap]) -- cgit