Author: rmeggins
Update of /cvs/dirsec/ldapserver/m4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv752/m4
Modified Files:
nspr.m4 nss.m4 mozldap.m4 db.m4
Log Message:
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
Index: nspr.m4
===================================================================
RCS file: /cvs/dirsec/ldapserver/m4/nspr.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- nspr.m4 2 Feb 2007 20:27:30 -0000 1.4
+++ nspr.m4 6 Feb 2007 15:51:22 -0000 1.5
@@ -79,12 +79,12 @@
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.])
Index: nss.m4
===================================================================
RCS file: /cvs/dirsec/ldapserver/m4/nss.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- nss.m4 2 Feb 2007 20:27:30 -0000 1.4
+++ nss.m4 6 Feb 2007 15:51:22 -0000 1.5
@@ -79,12 +79,12 @@
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.])
Index: mozldap.m4
===================================================================
RCS file: /cvs/dirsec/ldapserver/m4/mozldap.m4,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- mozldap.m4 2 Feb 2007 20:27:30 -0000 1.7
+++ mozldap.m4 6 Feb 2007 15:51:22 -0000 1.8
@@ -86,7 +86,7 @@
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
Index: db.m4
===================================================================
RCS file: /cvs/dirsec/ldapserver/m4/db.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- db.m4 12 Jan 2007 16:18:15 -0000 1.4
+++ db.m4 6 Feb 2007 15:51:22 -0000 1.5
@@ -72,6 +72,8 @@
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])
Show replies by date