This is the same as gconf-2.20.1-automagic-ldap.patch but with configure patched too to avoid eautoreconf caused gtk-doc and intltoolize mess Index: configure.in =================================================================== --- configure.in (révision 2495) +++ configure.in (copie de travail) @@ -177,36 +182,55 @@ AC_CHECK_FUNCS(getuid sigaction fsync fchmod fdwalk) +dnl ************************************************** +dnl LDAP support. +dnl ************************************************** LDAP_LIBS= -AC_CHECK_HEADER(ldap.h, [ - AC_CHECK_LIB(ldap, ldap_init, AC_CHECK_LIB(lber, ber_free, [LDAP_LIBS="-lldap -llber"])) + +AC_ARG_WITH(openldap, + AC_HELP_STRING([--with-openldap], + [Enable LDAP backend @<:@default=auto@:>@]), + ,with_openldap=auto) + +if test x"$with_openldap" != xno; then + AC_CHECK_HEADER(ldap.h, [ + AC_CHECK_LIB(ldap, ldap_init, AC_CHECK_LIB(lber, ber_free, [LDAP_LIBS="-lldap -llber"])) ]) -AC_SUBST(LDAP_LIBS) -AM_CONDITIONAL(LDAP_SUPPORT, test -n "$LDAP_LIBS") + AC_SUBST(LDAP_LIBS) -dnl ************************************************** -dnl LDAP support. -dnl ************************************************** -if test "$os_win32" != yes; then + if test "$os_win32" != yes; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LIBS="$LIBS" + LDAP_CFLAGS="-DLDAP_DEPRECATED" + CFLAGS="$CFLAGS $LDAP_CFLAGS" + LIBS="$LIBS $LDAP_LIBS" + AC_CHECK_FUNCS(ldap_ntlm_bind) + CFLAGS="$SAVE_CFLAGS" + LIBS="$SAVE_LIBS" + + else # Win32 + LDAP_CFLAGS="-DLDAP_DEPRECATED" + LDAP_LIBS="-lwldap32" + AC_SUBST(LDAP_CFLAGS) + AC_SUBST(LDAP_LIBS) + AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support]) + msg_ldap="yes" + fi # Win32 + + if test -z "$LDAP_LIBS"; then + if test x"$with_openldap" = xyes; then + AC_MSG_ERROR([*** LDAP support explicitely requested but not found ***]) + else + AC_MSG_WARN([*** LDAP support not found ***]) + fi + fi + +else + AC_DEFINE(HAVE_LDAP,0,[Define if you have LDAP support]) +fi -SAVE_CFLAGS="$CFLAGS" -SAVE_LIBS="$LIBS" -LDAP_CFLAGS="-DLDAP_DEPRECATED" -CFLAGS="$CFLAGS $LDAP_CFLAGS" -LIBS="$LIBS $LDAP_LIBS" -AC_CHECK_FUNCS(ldap_ntlm_bind) -CFLAGS="$SAVE_CFLAGS" -LIBS="$SAVE_LIBS" - -else # Win32 -LDAP_CFLAGS="-DLDAP_DEPRECATED" -LDAP_LIBS="-lwldap32" -AC_SUBST(LDAP_CFLAGS) -AC_SUBST(LDAP_LIBS) -AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support]) -msg_ldap="yes" -fi # Win32 +AM_CONDITIONAL(LDAP_SUPPORT, test -n "$LDAP_LIBS") IT_PROG_INTLTOOL([0.35.0]) --- configure.orig 2008-03-22 17:37:56.000000000 +0200 +++ configure 2008-03-22 17:40:01.000000000 +0200 @@ -1584,6 +1584,7 @@ --with-tags[=TAGS] include additional configurations [automatic] --with-sysconfsubdir directory name used under sysconfdir, default=gconf --with-html-dir=PATH path to installed docs + --with-openldap Enable LDAP backend [default=auto] Some influential environment variables: CC C compiler command @@ -6241,7 +6242,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6244 "configure"' > conftest.$ac_ext + echo '#line 6245 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8397,11 +8398,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8400: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8401: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8404: \$? = $ac_status" >&5 + echo "$as_me:8405: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8687,11 +8688,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8690: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8691: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8694: \$? = $ac_status" >&5 + echo "$as_me:8695: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8791,11 +8792,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8794: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8795: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8798: \$? = $ac_status" >&5 + echo "$as_me:8799: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11142,7 +11143,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13666: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13669: \$? = $ac_status" >&5 + echo "$as_me:13670: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13766,11 +13767,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13769: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13770: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13773: \$? = $ac_status" >&5 + echo "$as_me:13774: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15330,11 +15331,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15333: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15334: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15337: \$? = $ac_status" >&5 + echo "$as_me:15338: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15434,11 +15435,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15437: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15438: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15441: \$? = $ac_status" >&5 + echo "$as_me:15442: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17623,11 +17624,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17626: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17627: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17630: \$? = $ac_status" >&5 + echo "$as_me:17631: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17913,11 +17914,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17916: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17917: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17920: \$? = $ac_status" >&5 + echo "$as_me:17921: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -18017,11 +18018,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18020: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18021: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:18024: \$? = $ac_status" >&5 + echo "$as_me:18025: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -21816,7 +21817,18 @@ LDAP_LIBS= -if test "${ac_cv_header_ldap_h+set}" = set; then + + +# Check whether --with-openldap was given. +if test "${with_openldap+set}" = set; then + withval=$with_openldap; +else + with_openldap=auto +fi + + +if test x"$with_openldap" != xno; then + if test "${ac_cv_header_ldap_h+set}" = set; then { echo "$as_me:$LINENO: checking for ldap.h" >&5 echo $ECHO_N "checking for ldap.h... $ECHO_C" >&6; } if test "${ac_cv_header_ldap_h+set}" = set; then @@ -21948,7 +21960,7 @@ fi if test $ac_cv_header_ldap_h = yes; then - { echo "$as_me:$LINENO: checking for ldap_init in -lldap" >&5 + { echo "$as_me:$LINENO: checking for ldap_init in -lldap" >&5 echo $ECHO_N "checking for ldap_init in -lldap... $ECHO_C" >&6; } if test "${ac_cv_lib_ldap_ldap_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -22082,22 +22094,13 @@ - if test -n "$LDAP_LIBS"; then - LDAP_SUPPORT_TRUE= - LDAP_SUPPORT_FALSE='#' -else - LDAP_SUPPORT_TRUE='#' - LDAP_SUPPORT_FALSE= -fi - -if test "$os_win32" != yes; then - -SAVE_CFLAGS="$CFLAGS" -SAVE_LIBS="$LIBS" -LDAP_CFLAGS="-DLDAP_DEPRECATED" -CFLAGS="$CFLAGS $LDAP_CFLAGS" -LIBS="$LIBS $LDAP_LIBS" + if test "$os_win32" != yes; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LIBS="$LIBS" + LDAP_CFLAGS="-DLDAP_DEPRECATED" + CFLAGS="$CFLAGS $LDAP_CFLAGS" + LIBS="$LIBS $LDAP_LIBS" for ac_func in ldap_ntlm_bind do @@ -22192,12 +22195,12 @@ fi done -CFLAGS="$SAVE_CFLAGS" -LIBS="$SAVE_LIBS" + CFLAGS="$SAVE_CFLAGS" + LIBS="$SAVE_LIBS" -else # Win32 -LDAP_CFLAGS="-DLDAP_DEPRECATED" -LDAP_LIBS="-lwldap32" + else # Win32 + LDAP_CFLAGS="-DLDAP_DEPRECATED" + LDAP_LIBS="-lwldap32" @@ -22205,8 +22208,36 @@ #define HAVE_LDAP 1 _ACEOF -msg_ldap="yes" -fi # Win32 + msg_ldap="yes" + fi # Win32 + + if test -z "$LDAP_LIBS"; then + if test x"$with_openldap" = xyes; then + { { echo "$as_me:$LINENO: error: *** LDAP support explicitely requested but not found ***" >&5 +echo "$as_me: error: *** LDAP support explicitely requested but not found ***" >&2;} + { (exit 1); exit 1; }; } + else + { echo "$as_me:$LINENO: WARNING: *** LDAP support not found ***" >&5 +echo "$as_me: WARNING: *** LDAP support not found ***" >&2;} + fi + fi + +else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LDAP 0 +_ACEOF + +fi + + if test -n "$LDAP_LIBS"; then + LDAP_SUPPORT_TRUE= + LDAP_SUPPORT_FALSE='#' +else + LDAP_SUPPORT_TRUE='#' + LDAP_SUPPORT_FALSE= +fi + case "$am__api_version" in