summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2007-01-12 16:18:15 +0000
committerRich Megginson <rmeggins@redhat.com>2007-01-12 16:18:15 +0000
commitfd287c66734fc7add132e4685fd0250ce2605eb0 (patch)
treeac13e7ef739cebe725b1b2d341136587cd72e503 /m4
parent38c192bb2279e1a099b1ec1b6e8eeea24b3fca58 (diff)
downloadds-fd287c66734fc7add132e4685fd0250ce2605eb0.tar.gz
ds-fd287c66734fc7add132e4685fd0250ce2605eb0.tar.xz
ds-fd287c66734fc7add132e4685fd0250ce2605eb0.zip
Resolves: bug 222398
Bug Description: Allow building on Fedora Reviewed by: nhosoi (Thanks!) Fix Description: There are a few issues with building on Fedora (5 or later): 1) Need to be able to build with db4.2, db4.3, db4.4, etc. This version auto-detects the db version from the db.h file it finds. In order to use a different db version, just use configure --with-db=path or --with-db-inc=path that points to a different db.h 2) mozldap and svrcore are now part of Fedora, so we need to look for those components. Look for mozldap6 first to allow building on RHEL-4 as well. mozldap now includes libldif, so add that to the link line. svrcore-devel is now just svrcore - a svrcore runtime package and a svrcore-devel build time package. 3) FHS means FHS - /etc, /var/, prefix=/usr and exec_prefix=/usr. It doesn't make any sense to talk about FHS under a prefix. This means the default build will do /opt/fedora-ds/etc, var, lib, bin, share, and so on instead of /opt/fedora-ds/usr/etc. --with-fhs resets prefix=/usr and exec_prefix=/usr, and overrides the default settings for sysconfdir and localstatedir So, different build types: FHS - use configure --with-fhs - uses /etc, /var, /usr/lib, /usr/share, etc. Nothing - configure - uses /opt/fedora-ds/etc/, var/, bin/, lib/, etc. GNU style - configure --prefix=/usr/local - /usr/local/etc, /usr/local/bin, /usr/local/var, and so on Developers can use configure --prefix=/home/user/fds && make && make install to install local versions Platforms tested: FC-6 Flag Day: no Doc impact: no
Diffstat (limited to 'm4')
-rw-r--r--m4/db.m410
-rw-r--r--m4/mozldap.m419
-rw-r--r--m4/svrcore.m46
3 files changed, 26 insertions, 9 deletions
diff --git a/m4/db.m4 b/m4/db.m4
index e463ed7f..680f57e1 100644
--- a/m4/db.m4
+++ b/m4/db.m4
@@ -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