Ilya and Volker -
OK. I'm going to ask the two of you to resolve this. Ilya, can you
please describe exactly how the 21.4.17 configure.in fails for you and
on what platforms? Volker, please describe why the 21.4.18 version
doesn't work for you. Maybe in this way, we can get a version that
works for both of you for 21.4.19. Please follow up ASAP so we can
try out potential solutions.
Thank you,
Vin Shelton
---------- Forwarded message ----------
From: Dr. Volker Zell <Dr.Volker.Zell(a)oracle.com>
Date: Dec 10, 2005 12:53 PM
Subject: Re: Updated:
xemacs-21.4.18-1/xemacs-tags-21.4.18-1/xemacs-emacs-common-21.4.18-1
To: Vin Shelton <acs(a)xemacs.org>
>>>> Vin Shelton writes:
On 12/9/05, Dr. Volker Zell <Dr.Volker.Zell(a)oracle.com> wrote:
> Actually there is a cygwin specific patch, the one in configure.in.
> Because when you configure with ldap support, -llber doesn't get included
> during linking. This was the case in the previous version. Only recently
> someone changed the configure stuff for openldap again :-(
I thought this patch:
-- Fix: configure works again when -ldap is specified and -lber
is required.
was supposed to fix that problem. Please send me whatever patch is
required and I'll get the patch into 21.4.19.
Actually the configure magic to detect openldap in 21.4.17 was perfect
for cygwin. I don't know why it got changed on 21.4.18.
For reference here the relevant parts from configure.in in both
versions:
--------------------------------- This is the GOOD one from 21.4.17
-----------------------
dnl Autodetect LDAP
AC_CHECKING(for LDAP)
test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) }
test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) }
if test "$with_ldap" != "no"; then
AC_CHECK_LIB(ldap, ldap_search, with_ldap=yes)
dnl Check for other libraries we need to link with to get the main routines.
test "$with_ldap" != "yes" && { AC_CHECK_LIB(ldap,
ldap_open,
[with_ldap=yes with_ldap_lber=yes], , -llber) }
test "$with_ldap" != "yes" && { AC_CHECK_LIB(ldap,
ldap_open,
[with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes], , -llber -lkrb)
}
test "$with_ldap" != "yes" && { AC_CHECK_LIB(ldap,
ldap_open,
[with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes
with_ldap_des=yes], , -llber -lkrb -ldes) }
dnl Recently, we need -lber even though the main routines are elsewhere,
dnl because otherwise be get link errors w.r.t. ber_pvt_opt_on. So just
dnl check for that (it's a variable not a fun but that doesn't seem to
dnl matter in these checks) and stick in -lber if so. Can't hurt (even to
dnl stick it in always shouldn't hurt, I don't think) ... #### Someone who
dnl #### understands LDAP needs to fix this properly.
test "$with_ldap_lber" != "yes" && { AC_CHECK_LIB(lber,
ber_pvt_opt_on, with_ldap_lber=yes) }
fi
if test "$with_ldap" = "yes"; then
AC_DEFINE(HAVE_LDAP)
XE_ADD_OBJS(eldap.o)
if test "$with_ldap_des" = "yes" ; then
XE_PREPEND(-ldes, LIBS)
fi
if test "$with_ldap_krb" = "yes" ; then
XE_PREPEND(-lkrb, LIBS)
fi
if test "$with_ldap_lber" = "yes" ; then
XE_PREPEND(-llber, LIBS)
fi
XE_PREPEND(-lldap, LIBS)
AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error
ldap_parse_result)
fi
--------------------------------
and now the new one which breaks under cygwin:
--------------------------------- This is the one from 21.4.18
-----------------------
dnl Autodetect LDAP
AC_CHECKING(for LDAP)
test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) }
test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) }
if test no != "$with_ldap";then
if test . != "${ldap_libs+.}";then
ldap_libs=
AC_CHECK_FUNC(ldap_open,dnl Allow it to be in generic "$LIBS"
[with_ldap=yes
test yes = "$extra_verbose" &&
echo "Setting ldap_libs to $ldap_libs"],dnl
[AC_CHECK_LIB(ldap, ldap_open,dnl
[with_ldap=yes],dnl
[ldap_needs_lber=yes ldap_other_libs=-llber
dnl This requires `AC_CACHE_VAL' (which is called by `AC_CHECK_LIB')
dnl to be redefined to ignore cached (shell variable) value, as it is
dnl done above, because the same variable is used in all
dnl `AC_CHECK_LIB' expansions in macro invocation below. Worse, if it
dnl is not done, there is no portable way to compensate for this
dnl locally since `unset' command is not supported by all shells. The
dnl other solution would be changing `AC_CHECK_LIB' so that cache
dnl variable name depends on the macro OTHER-LIBRARIES argument.
AC_CHECK_LIB(ldap, ldap_open,dnl
[with_ldap=yes],dnl
[ldap_needs_krb=yes ldap_other_libs="$ldap_other_libs -lkrb"
AC_CHECK_LIB(ldap, ldap_open,dnl
[with_ldap=yes],dnl
[ldap_needs_des=yes ldap_other_libs="$ldap_other_libs -ldes"
AC_CHECK_LIB(ldap, ldap_open,dnl
[with_ldap=yes],dnl
[with_ldap=no],dnl
$ldap_other_libs)],dnl
$ldap_other_libs)],dnl
$ldap_other_libs)])
if test yes = "$with_ldap";then
if test yes = "$ldap_needs_des";then
XE_PREPEND(-ldes, ldap_libs)
fi
if test yes = "$ldap_needs_krb";then
XE_PREPEND(-lkrb, ldap_libs)
fi
if test yes = "$ldap_needs_lber";then
XE_PREPEND(-llber, ldap_libs)
fi
XE_PREPEND(-lldap, ldap_libs)
fi])
else
dnl Allow builder to override "$ldap_libs".
save_LIBS="$LIBS" LIBS="$ldap_libs $LIBS"
AC_CHECK_FUNC(ldap_open,dnl
[with_ldap=yes
test yes = "$extra_verbose" &&
echo "Setting ldap_libs to $ldap_libs"],dnl
[with_ldap=no])
LIBS="$save_LIBS"
fi
fi
if test "$with_ldap" = "yes"; then
AC_DEFINE(HAVE_LDAP)
XE_ADD_OBJS(eldap.o)
LIBS="$ldap_libs $LIBS"
AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error
ldap_parse_result)
fi
---------------------------------
21.5.23 seems to have the same magic as 21.4.17 so I don't see the point
of the change in 21.4.18
For the cygwin version I just reverted to the 21.4.17 stuff.
Regards,
Vin
Ciao
Volker
--
Whoever you are, no matter how lonely,
the world offers itself to your imagination,
calls to you like the wild geese, harsh and exciting--
over and over announcing your place
in the family of things. Mary Oliver