diff options
author | root <root@buildsamba01.idm.lab.bos.redhat.com> | 2010-03-19 19:25:48 -0500 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2010-03-23 10:19:32 -0600 |
commit | 682529e7f8391744615b40a14852efd317936109 (patch) | |
tree | 906ac28baf86f97655acf29d988101b56c15758b /m4/openldap.m4 | |
parent | 04a0bd9ada0b3dd8efae67b63421dfa31e15b051 (diff) | |
download | ds-682529e7f8391744615b40a14852efd317936109.tar.gz ds-682529e7f8391744615b40a14852efd317936109.tar.xz ds-682529e7f8391744615b40a14852efd317936109.zip |
Bug 480787 - Autoconf parameter --with and --without
https://bugzilla.redhat.com/show_bug.cgi?id=480787
Resolves: bug 480787
Bug Description: Autoconf parameter --with and --without
Fix Description: The configure script has been modified
such that the --with-XXX and --without-XXX switches will
work as --with-XXX=yes and --with-XXX=no, respectively.
If the package is required and none of the switches are
specified, it will default to "yes".
The code that detects LDAPSDK and OpenLDAP conflicts has
been updated. The help messages have been cleaned up.
Reviewed by: rmeggins (and pushed by)
Diffstat (limited to 'm4/openldap.m4')
-rw-r--r-- | m4/openldap.m4 | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/m4/openldap.m4 b/m4/openldap.m4 index 29dc1158..cf91a89e 100644 --- a/m4/openldap.m4 +++ b/m4/openldap.m4 @@ -22,11 +22,14 @@ AC_CHECKING(for OpenLDAP) # check for --with-openldap AC_MSG_CHECKING(for --with-openldap) -AC_ARG_WITH(openldap, AS_HELP_STRING([--with-openldap[=PATH]],[Use OpenLDAP - optional PATH is path to OpenLDAP SDK]), +AC_ARG_WITH(openldap, AS_HELP_STRING([--with-openldap@<:@=PATH@:>@],[Use OpenLDAP - optional PATH is path to OpenLDAP SDK]), [ if test "$withval" = yes then AC_MSG_RESULT([using system OpenLDAP]) + elif test "$withval" = no + then + AC_MSG_RESULT(no) elif test -e "$withval"/include/ldap.h -a -d "$withval"/lib then AC_MSG_RESULT([using $withval]) @@ -46,7 +49,7 @@ AC_MSG_RESULT(no)) # check for --with-openldap-inc AC_MSG_CHECKING(for --with-openldap-inc) -AC_ARG_WITH(openldap-inc, [ --with-openldap-inc=PATH OpenLDAP SDK include directory], +AC_ARG_WITH(openldap-inc, AS_HELP_STRING([--with-openldap-inc=PATH],[OpenLDAP SDK include directory]), [ if test -e "$withval"/ldap.h then @@ -63,7 +66,7 @@ AC_MSG_RESULT(no)) # check for --with-openldap-lib AC_MSG_CHECKING(for --with-openldap-lib) -AC_ARG_WITH(openldap-lib, [ --with-openldap-lib=PATH OpenLDAP SDK library directory], +AC_ARG_WITH(openldap-lib, AS_HELP_STRING([--with-openldap-lib=PATH],[OpenLDAP SDK library directory]), [ if test -d "$withval" then @@ -80,7 +83,7 @@ AC_MSG_RESULT(no)) # check for --with-openldap-bin AC_MSG_CHECKING(for --with-openldap-bin) -AC_ARG_WITH(openldap-bin, [ --with-openldap-bin=PATH OpenLDAP SDK binary directory], +AC_ARG_WITH(openldap-bin, AS_HELP_STRING([--with-openldap-bin=PATH],[OpenLDAP SDK binary directory]), [ if test -d "$withval" then @@ -96,8 +99,8 @@ AC_MSG_RESULT(no)) # if OPENLDAP is not found yet, try pkg-config -if test -z "$openldap_inc" -o -z "$openldap_lib" -o -z "$openldap_libdir" -o -z "$openldap_bindir"; then - if test "$with_openldap" = yes ; then # user wants to use openldap, but didn't specify paths +if test "$with_openldap" = yes ; then # user wants to use openldap, but didn't specify paths + if test -z "$openldap_inc" -o -z "$openldap_lib" -o -z "$openldap_libdir" -o -z "$openldap_bindir"; then AC_PATH_PROG(PKG_CONFIG, pkg-config) AC_MSG_CHECKING(for OpenLDAP with pkg-config) if test -n "$PKG_CONFIG" && $PKG_CONFIG --exists openldap; then @@ -143,5 +146,4 @@ if test "$with_openldap" = yes ; then CPPFLAGS="$save_cppflags" AC_DEFINE([USE_OPENLDAP], [1], [If defined, using OpenLDAP for LDAP SDK]) - with_ldapsdk=no # using openldap not mozldap fi |