diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/db.m4 | 10 | ||||
-rw-r--r-- | m4/mozldap.m4 | 19 | ||||
-rw-r--r-- | m4/svrcore.m4 | 6 |
3 files changed, 26 insertions, 9 deletions
@@ -65,3 +65,13 @@ if test -z "$db_inc"; then AC_MSG_ERROR([db not found, specify with --with-db.]) fi fi +dnl figure out which version of db we're using from the header file +db_ver_maj=`grep DB_VERSION_MAJOR $db_incdir/db.h | awk '{print $3}'` +db_ver_min=`grep DB_VERSION_MINOR $db_incdir/db.h | awk '{print $3}'` +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])]) + diff --git a/m4/mozldap.m4 b/m4/mozldap.m4 index 1ac9d91b..fcd8b241 100644 --- a/m4/mozldap.m4 +++ b/m4/mozldap.m4 @@ -77,14 +77,17 @@ if test -z "$ldapsdk_inc" -o -z "$ldapsdk_lib" -o -z "$ldapsdk_libdir" -o -z "$l 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// | sed -e s/\ *$//` - ldapsdk_bindir=`$PKG_CONFIG --variable=bindir mozldap6` - AC_MSG_RESULT([using system mozldap6]) + mozldappkg=mozldap6 + elif $PKG_CONFIG --exists mozldap; then + mozldappkg=mozldap else AC_MSG_ERROR([LDAPSDK not found, specify with --with-ldapsdk[-inc|-lib].]) 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_bindir=`$PKG_CONFIG --variable=bindir $mozldappkg` + AC_MSG_RESULT([using system $mozldappkg]) fi fi if test -z "$ldapsdk_inc" -o -z "$ldapsdk_lib"; then @@ -92,7 +95,11 @@ if test -z "$ldapsdk_inc" -o -z "$ldapsdk_lib"; then fi dnl default path for the ldap c sdk tools (see [210947] for more details) if test -z "$ldapsdk_bindir" ; then - ldapsdk_bindir=$libdir/mozldap6 + 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 diff --git a/m4/svrcore.m4 b/m4/svrcore.m4 index 3ae9662b..a2853734 100644 --- a/m4/svrcore.m4 +++ b/m4/svrcore.m4 @@ -68,9 +68,9 @@ if test -z "$svrcore_inc" -o -z "$svrcore_lib"; then AC_MSG_CHECKING(for svrcore with pkg-config) AC_PATH_PROG(PKG_CONFIG, pkg-config) if test -n "$PKG_CONFIG"; then - if $PKG_CONFIG --exists svrcore-devel; then - svrcore_inc=`$PKG_CONFIG --cflags-only-I svrcore-devel` - svrcore_lib=`$PKG_CONFIG --libs-only-L svrcore-devel` + if $PKG_CONFIG --exists svrcore; then + svrcore_inc=`$PKG_CONFIG --cflags-only-I svrcore` + svrcore_lib=`$PKG_CONFIG --libs-only-L svrcore` AC_MSG_RESULT([using system svrcore]) fi fi |