summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2007-02-06 15:51:22 +0000
committerRich Megginson <rmeggins@redhat.com>2007-02-06 15:51:22 +0000
commit27a8e752935491cb6c259f7bb15efb23d592ff8b (patch)
treeabb00d1cc95ec735431d53e5a18e858b9e371322 /m4
parent12dd2b111c0188fd1e2aebb5fbca11ba11ab76ef (diff)
downloadds-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.m46
-rw-r--r--m4/mozldap.m42
-rw-r--r--m4/nspr.m44
-rw-r--r--m4/nss.m44
4 files changed, 9 insertions, 7 deletions
diff --git a/m4/db.m4 b/m4/db.m4
index 680f57e1..2e43b144 100644
--- a/m4/db.m4
+++ b/m4/db.m4
@@ -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
diff --git a/m4/nspr.m4 b/m4/nspr.m4
index 50da5ba7..e89b9a89 100644
--- a/m4/nspr.m4
+++ b/m4/nspr.m4
@@ -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.])
diff --git a/m4/nss.m4 b/m4/nss.m4
index 1f11957a..9d892254 100644
--- a/m4/nss.m4
+++ b/m4/nss.m4
@@ -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.])