diff options
author | Rich Megginson <rmeggins@redhat.com> | 2007-01-12 16:18:15 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2007-01-12 16:18:15 +0000 |
commit | fd287c66734fc7add132e4685fd0250ce2605eb0 (patch) | |
tree | ac13e7ef739cebe725b1b2d341136587cd72e503 /m4/mozldap.m4 | |
parent | 38c192bb2279e1a099b1ec1b6e8eeea24b3fca58 (diff) | |
download | ds-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/mozldap.m4')
-rw-r--r-- | m4/mozldap.m4 | 19 |
1 files changed, 13 insertions, 6 deletions
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 |