From 01084b30598106b0c7aa133624d6365364a25b37 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Mar 02 2005 01:21:23 +0000 Subject: - search for __res_query in libresolv before checking libbind --- diff --git a/openldap-2.2.23-resolv.patch b/openldap-2.2.23-resolv.patch new file mode 100644 index 0000000..5da5c35 --- /dev/null +++ b/openldap-2.2.23-resolv.patch @@ -0,0 +1,37 @@ +Check for __res_query in libresolv before we check for it in libbind. +--- openldap-2.2.23/configure.in 2005-03-01 19:57:10.053436724 -0500 ++++ openldap-2.2.23/configure.in 2005-03-01 19:57:27.663137034 -0500 +@@ -873,16 +873,6 @@ + fi + + if test $ac_cv_func_res_query = no ; then +- AC_CHECK_LIB(bind, res_query) +- ac_cv_func_res_query=$ac_cv_lib_bind_res_query +-fi +- +-if test $ac_cv_func_res_query = no ; then +- AC_CHECK_LIB(bind, __res_query) +- ac_cv_func_res_query=$ac_cv_lib_bind___res_query +-fi +- +-if test $ac_cv_func_res_query = no ; then + AC_CHECK_LIB(resolv, res_query) + ac_cv_func_res_query=$ac_cv_lib_resolv_res_query + fi +@@ -897,6 +887,16 @@ + ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query + fi + ++if test $ac_cv_func_res_query = no ; then ++ AC_CHECK_LIB(bind, res_query) ++ ac_cv_func_res_query=$ac_cv_lib_bind_res_query ++fi ++ ++if test $ac_cv_func_res_query = no ; then ++ AC_CHECK_LIB(bind, __res_query) ++ ac_cv_func_res_query=$ac_cv_lib_bind___res_query ++fi ++ + if test "$ac_cv_func_res_query" = yes ; then + AC_DEFINE(HAVE_RES_QUERY,1, + [define if you have res_query()]) diff --git a/openldap.spec b/openldap.spec index 63b7d11..51644ce 100644 --- a/openldap.spec +++ b/openldap.spec @@ -55,6 +55,9 @@ Patch25: MigrationTools-44-schema.patch Patch26: MigrationTools-45-noaliases.patch Patch40: openldap-ntlm.diff Patch41: openldap-2.2.23-start_tls-async.patch +Patch50: openldap-2.0.27-resolv.patch +Patch51: openldap-2.1.30-resolv.patch +Patch52: openldap-2.2.23-resolv.patch URL: http://www.openldap.org/ BuildRoot: %{_tmppath}/%{name}-%{version_22}-root BuildPreReq: cyrus-sasl-devel >= 2.1, gdbm-devel, libtool >= 1.5.6-2, krb5-devel @@ -156,6 +159,7 @@ pushd openldap-%{version_22} %patch6 -p1 -b .pie %patch7 -p1 -b .toollinks %patch8 -p1 -b .nosql +%patch52 -p1 -b .resolv cp %{_datadir}/libtool/config.{sub,guess} build/ popd @@ -192,21 +196,35 @@ pushd MigrationTools-%{migtools_version} %patch26 -p1 -b .noaliases popd +autodir=`pwd`/auto-instroot +pushd autoconf-2.13.1 +./configure --prefix=$autodir +make all install +popd +pushd automake-1.4a +./configure --prefix=$autodir +make all install +popd + pushd openldap-%{version_20} %patch9 -p1 -b .ldapi +%patch50 -p1 -b .resolv for subdir in build-gdbm build-db build-clients build-compat ; do mkdir $subdir ln -s ../configure $subdir done +$autodir/bin/autoconf popd pushd openldap-%{version_21} %patch9 -p1 -b .ldapi %patch10 -p1 -b .libdir +%patch51 -p1 -b .resolv for subdir in build-servers build-compat ; do mkdir $subdir ln -s ../configure $subdir done +$autodir/bin/autoconf popd pushd openldap-%{version_22} @@ -214,16 +232,7 @@ pushd openldap-%{version_22} mkdir $subdir ln -s ../configure $subdir done -popd - -autodir=`pwd`/auto-instroot -pushd autoconf-2.13.1 -./configure --prefix=$autodir -make all install -popd -pushd automake-1.4a -./configure --prefix=$autodir -make all install +$autodir/bin/autoconf popd %build @@ -308,6 +317,7 @@ fi CPPFLAGS="-I${dbdir}/include $OPENSSL_CPPFLAGS" ; export CPPFLAGS CFLAGS="$CPPFLAGS $RPM_OPT_FLAGS -D_REENTRANT -fPIC"; export CFLAGS LDFLAGS="-L${dbdir}/%{_lib} $OPENSSL_LDFLAGS" ; export LDFLAGS +LD_LIBRARY_PATH=${dbdir}/%{_lib}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}; export LD_LIBRARY_PATH # Build the client libraries for the compat package. pushd openldap-%{compat_version}/build-compat