diff options
author | Rich Megginson <rmeggins@redhat.com> | 2007-02-06 15:51:22 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2007-02-06 15:51:22 +0000 |
commit | 27a8e752935491cb6c259f7bb15efb23d592ff8b (patch) | |
tree | abb00d1cc95ec735431d53e5a18e858b9e371322 /m4 | |
parent | 12dd2b111c0188fd1e2aebb5fbca11ba11ab76ef (diff) | |
download | ds-27a8e752935491cb6c259f7bb15efb23d592ff8b.tar.gz ds-27a8e752935491cb6c259f7bb15efb23d592ff8b.tar.xz ds-27a8e752935491cb6c259f7bb15efb23d592ff8b.zip |
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
Diffstat (limited to 'm4')
-rw-r--r-- | m4/db.m4 | 6 | ||||
-rw-r--r-- | m4/mozldap.m4 | 2 | ||||
-rw-r--r-- | m4/nspr.m4 | 4 | ||||
-rw-r--r-- | m4/nss.m4 | 4 |
4 files changed, 9 insertions, 7 deletions
@@ -72,6 +72,8 @@ db_ver_pat=`grep DB_VERSION_PATCH $db_incdir/db.h | awk '{print $3}'` dnl libname is libdb-maj.min e.g. libdb-4.2 db_libver=${db_ver_maj}.${db_ver_min} dnl make sure the lib is available -AC_CHECK_LIB([db-$db_libver], [db_create], [], - [AC_MSG_ERROR([$db_incdir/db.h is version $db_libver but libdb-$db_libver not found])]) +dnl use true so libdb won't be added to LIBS +AC_CHECK_LIB([db-$db_libver], [db_create], [true], + [AC_MSG_ERROR([$db_incdir/db.h is version $db_libver but libdb-$db_libver not found])], + [$LIBNSL]) diff --git a/m4/mozldap.m4 b/m4/mozldap.m4 index 6a65b176..7249c9ea 100644 --- a/m4/mozldap.m4 +++ b/m4/mozldap.m4 @@ -86,7 +86,7 @@ if test -z "$ldapsdk_inc" -o -z "$ldapsdk_lib" -o -z "$ldapsdk_libdir" -o -z "$l fi ldapsdk_inc=`$PKG_CONFIG --cflags-only-I $mozldappkg` ldapsdk_lib=`$PKG_CONFIG --libs-only-L $mozldappkg` - ldapsdk_libdir=`$PKG_CONFIG --libs-only-L $mozldappkg | sed -e s/-L// | sed -e s/\ *$//` + ldapsdk_libdir=`$PKG_CONFIG --libs-only-L $mozldappkg | sed -e s/-L// | sed -e s/\ .*$//` ldapsdk_bindir=`$PKG_CONFIG --variable=bindir $mozldappkg` AC_MSG_RESULT([using system $mozldappkg]) fi @@ -79,12 +79,12 @@ if test -z "$nspr_inc" -o -z "$nspr_lib" -o -z "$nspr_libdir"; then if $PKG_CONFIG --exists nspr; then nspr_inc=`$PKG_CONFIG --cflags-only-I nspr` nspr_lib=`$PKG_CONFIG --libs-only-L nspr` - nspr_libdir=`$PKG_CONFIG --libs-only-L nspr | sed -e s/-L// | sed -e s/\ *$//` + nspr_libdir=`$PKG_CONFIG --libs-only-L nspr | sed -e s/-L// | sed -e s/\ .*$//` AC_MSG_RESULT([using system NSPR]) elif $PKG_CONFIG --exists dirsec-nspr; then nspr_inc=`$PKG_CONFIG --cflags-only-I dirsec-nspr` nspr_lib=`$PKG_CONFIG --libs-only-L dirsec-nspr` - nspr_libdir=`$PKG_CONFIG --libs-only-L dirsec-nspr | sed -e s/-L// | sed -e s/\ *$//` + nspr_libdir=`$PKG_CONFIG --libs-only-L dirsec-nspr | sed -e s/-L// | sed -e s/\ .*$//` AC_MSG_RESULT([using system dirsec NSPR]) else AC_MSG_ERROR([NSPR not found, specify with --with-nspr.]) @@ -79,12 +79,12 @@ if test -z "$nss_inc" -o -z "$nss_lib" -o -z "$nss_libdir"; then if $PKG_CONFIG --exists nss; then nss_inc=`$PKG_CONFIG --cflags-only-I nss` nss_lib=`$PKG_CONFIG --libs-only-L nss` - nss_libdir=`$PKG_CONFIG --libs-only-L nss | sed -e s/-L// | sed -e s/\ *$//` + nss_libdir=`$PKG_CONFIG --libs-only-L nss | sed -e s/-L// | sed -e s/\ .*$//` AC_MSG_RESULT([using system NSS]) elif $PKG_CONFIG --exists dirsec-nss; then nss_inc=`$PKG_CONFIG --cflags-only-I dirsec-nss` nss_lib=`$PKG_CONFIG --libs-only-L dirsec-nss` - nss_libdir=`$PKG_CONFIG --libs-only-L dirsec-nss | sed -e s/-L// | sed -e s/\ *$//` + nss_libdir=`$PKG_CONFIG --libs-only-L dirsec-nss | sed -e s/-L// | sed -e s/\ .*$//` AC_MSG_RESULT([using system dirsec NSS]) else AC_MSG_ERROR([NSS not found, specify with --with-nss.]) |