[Fedora-directory-commits] setuputil/m4 mozldap.m4,1.2,1.3

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Thu May 17 15:33:12 UTC 2007


Author: rmeggins

Update of /cvs/dirsec/setuputil/m4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2644/m4

Modified Files:
	mozldap.m4 
Log Message:
m4/mozldap.m4 did not correctly find either mozldap or mozldap6
The wrappers were being written to srcdir instead of the build directory



Index: mozldap.m4
===================================================================
RCS file: /cvs/dirsec/setuputil/m4/mozldap.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mozldap.m4	9 Apr 2007 22:13:37 -0000	1.2
+++ mozldap.m4	17 May 2007 15:33:09 -0000	1.3
@@ -76,13 +76,18 @@
   AC_MSG_CHECKING(for mozldap with pkg-config)
   AC_PATH_PROG(PKG_CONFIG, pkg-config)
   if test -n "$PKG_CONFIG"; then
-    if $PKG_CONFIG --exists mozldap6; then
-      ldapsdk_inc=`$PKG_CONFIG --cflags-only-I mozldap6`
-      ldapsdk_lib=`$PKG_CONFIG --libs-only-L mozldap6`
-      ldapsdk_libdir=`$PKG_CONFIG --libs-only-L mozldap6 | sed -e "s/-L//g" | sed -e "s/\ *$//" | sed -e "s/\ /:/g"`
-      AC_MSG_RESULT([using system mozldap6])
+    mozldap_pkg=mozldap6
+    if ! $PKG_CONFIG --exists $mozldap_pkg; then
+      mozldap_pkg=mozldap
+    fi
+    if $PKG_CONFIG --exists $mozldap_pkg; then
+      ldapsdk_inc=`$PKG_CONFIG --cflags-only-I $mozldap_pkg`
+      ldapsdk_lib=`$PKG_CONFIG --libs-only-L $mozldap_pkg`
+      ldapsdk_libdir=`$PKG_CONFIG --variable=libdir $mozldap_pkg`
+      ldapsdk_bindir=`$PKG_CONFIG --variable=bindir $mozldap_pkg`
+      AC_MSG_RESULT([using system $mozldap_pkg])
     else
-      AC_MSG_ERROR([LDAPSDK not found, specify with --with-ldapsdk[-inc|-lib].])
+      AC_MSG_ERROR([LDAPSDK package $mozldap_pkg not found, specify with --with-ldapsdk[-inc|-lib].])
     fi
   fi
 fi
@@ -90,7 +95,13 @@
   AC_MSG_ERROR([LDAPSDK not found, specify with --with-ldapsdk[-inc|-lib].])
 fi
 dnl default path for the ldap c sdk tools (see [210947] for more details)
-ldapsdk_bindir=/usr/lib/mozldap6
+if test -z "$ldapsdk_bindir" ; then
+  if [ -d $libdir/mozldap6 ] ; then
+    ldapsdk_bindir=$libdir/mozldap6
+  else
+    ldapsdk_bindir=$libdir/mozldap
+  fi
+fi
 
 dnl make sure the ldap sdk version is 6 or greater - we do not support
 dnl the old 5.x or prior versions - the ldap server code expects the new




More information about the Fedora-directory-commits mailing list