[asterisk-commits] branch group/res_config_ldap r26913 - in /team/group/res_config_ldap: ./ buil...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu May 11 07:10:54 MST 2006


Author: russell
Date: Thu May 11 09:10:53 2006
New Revision: 26913

URL: http://svn.digium.com/view/asterisk?rev=26913&view=rev
Log:
conigurify the build of res_config_ldap

Modified:
    team/group/res_config_ldap/build_tools/menuselect-deps.in
    team/group/res_config_ldap/configure
    team/group/res_config_ldap/configure.ac
    team/group/res_config_ldap/include/autoconfig.h.in
    team/group/res_config_ldap/makeopts.in
    team/group/res_config_ldap/res/Makefile
    team/group/res_config_ldap/res/res_config_ldap.c

Modified: team/group/res_config_ldap/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/build_tools/menuselect-deps.in?rev=26913&r1=26912&r2=26913&view=diff
==============================================================================
--- team/group/res_config_ldap/build_tools/menuselect-deps.in (original)
+++ team/group/res_config_ldap/build_tools/menuselect-deps.in Thu May 11 09:10:53 2006
@@ -4,6 +4,7 @@
 GTK=@PBX_GTK@
 H323=@PBX_H323@
 KDE=@PBX_KDE@
+LDAP=@PBX_LIBldap@
 LIBNEWT=@PBX_LIBnewt@
 LIBOSPTK=@PBX_LIBosptk@
 LIBPOPT=@PBX_LIBpopt@

Modified: team/group/res_config_ldap/configure
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/configure?rev=26913&r1=26912&r2=26913&view=diff
==============================================================================
--- team/group/res_config_ldap/configure (original)
+++ team/group/res_config_ldap/configure Thu May 11 09:10:53 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 26020 .
+# From configure.ac Revision: 26828 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59.
 #
@@ -314,7 +314,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os PBX_PLATFORM PBX_CPU PBX_VENDOR PBX_OS UNAME ac_pt_UNAME PBX_OSREV OSISWIN32 PBX_OSTYPE CC ac_ct_CC CXX ac_ct_CXX RANLIB ac_ct_RANLIB AR ac_ct_AR NM ac_ct_NM WINDRES ac_ct_WINDRES DLLWRAP ac_ct_DLLWRAP CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT CXXFLAGS CPP CXXCPP AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S GNU_MAKE GREP FIND COMPRESS BASENAME DIRNAME LN DOT AST_DEVMODE EGREP asound_LIB asound_INCLUDE PBX_LIBasound curses_LIB curses_INCLUDE PBX_LIBcurses nbs_LIB nbs_INCLUDE PBX_LIBnbs ncurses_LIB ncurses_INCLUDE PBX_LIBncurses newt_LIB newt_INCLUDE PBX_LIBnewt odbc_LIB odbc_INCLUDE PBX_LIBodbc ogg_LIB ogg_INCLUDE PBX_LIBogg osptk_LIB osptk_INCLUDE PBX_LIBosptk popt_LIB popt_INCLUDE PBX_LIBpopt pri_LIB pri_INCLUDE PBX_LIBpri speex_LIB speex_INCLUDE PBX_LIBspeex sqlite_LIB sqlite_INCLUDE PBX_LIBsqlite ssl_LIB ssl_INCLUDE PBX_LIBssl tds_LIB tds_INCLUDE PBX_LIBtds termcap_LIB termcap_INCLUDE PBX_LIBtermcap tinfo_LIB tinfo_INCLUDE PBX_LIBtinfo vorbis_LIB vorbis_INCLUDE PBX_LIBvorbis z_LIB z_INCLUDE PBX_LIBz EDITLINE_LIBS ossaudio_LIB ossaudio_INCLUDE PBX_LIBossaudio tonezone_LIB tonezone_INCLUDE PBX_LIBtonezone gsm_LIB gsm_INCLUDE PBX_LIBgsm PG_CONFIG ac_pt_PG_CONFIG pq_INCLUDE pq_LIB PBX_LIBpq PBX_H323 PBX_IXJUSER VPB_INCLUDE VPB_LIB PBX_LIBvpb QT_INCLUDE QT_LIB QTMOC ac_pt_QTMOC PBX_QT KDE_INCLUDE KDE_LIBS PBX_KDE KDEINIT ac_pt_KDEINIT KDEDIR GTKCONFIG ac_ct_GTKCONFIG PBX_GTK GTK_INCLUDE GTK_LIBS PWLIB_INCLUDE PWLIB_LIB PBX_LIBPWLIB CURL ac_pt_CURL PBX_CURL CURLLIBS ALLOCA LIBOBJS POW_LIB LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os PBX_PLATFORM PBX_CPU PBX_VENDOR PBX_OS UNAME ac_pt_UNAME PBX_OSREV OSISWIN32 PBX_OSTYPE CC ac_ct_CC CXX ac_ct_CXX RANLIB ac_ct_RANLIB AR ac_ct_AR NM ac_ct_NM WINDRES ac_ct_WINDRES DLLWRAP ac_ct_DLLWRAP CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT CXXFLAGS CPP CXXCPP AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S GNU_MAKE GREP FIND COMPRESS BASENAME DIRNAME LN DOT AST_DEVMODE EGREP asound_LIB asound_INCLUDE PBX_LIBasound curses_LIB curses_INCLUDE PBX_LIBcurses nbs_LIB nbs_INCLUDE PBX_LIBnbs ncurses_LIB ncurses_INCLUDE PBX_LIBncurses newt_LIB newt_INCLUDE PBX_LIBnewt odbc_LIB odbc_INCLUDE PBX_LIBodbc ogg_LIB ogg_INCLUDE PBX_LIBogg osptk_LIB osptk_INCLUDE PBX_LIBosptk ldap_LIB ldap_INCLUDE PBX_LIBldap popt_LIB popt_INCLUDE PBX_LIBpopt pri_LIB pri_INCLUDE PBX_LIBpri speex_LIB speex_INCLUDE PBX_LIBspeex sqlite_LIB sqlite_INCLUDE PBX_LIBsqlite ssl_LIB ssl_INCLUDE PBX_LIBssl tds_LIB tds_INCLUDE PBX_LIBtds termcap_LIB termcap_INCLUDE PBX_LIBtermcap tinfo_LIB tinfo_INCLUDE PBX_LIBtinfo vorbis_LIB vorbis_INCLUDE PBX_LIBvorbis z_LIB z_INCLUDE PBX_LIBz EDITLINE_LIBS ossaudio_LIB ossaudio_INCLUDE PBX_LIBossaudio tonezone_LIB tonezone_INCLUDE PBX_LIBtonezone gsm_LIB gsm_INCLUDE PBX_LIBgsm PG_CONFIG ac_pt_PG_CONFIG pq_INCLUDE pq_LIB PBX_LIBpq PBX_H323 PBX_IXJUSER VPB_INCLUDE VPB_LIB PBX_LIBvpb QT_INCLUDE QT_LIB QTMOC ac_pt_QTMOC PBX_QT KDE_INCLUDE KDE_LIBS PBX_KDE KDEINIT ac_pt_KDEINIT KDEDIR GTKCONFIG ac_ct_GTKCONFIG PBX_GTK GTK_INCLUDE GTK_LIBS PWLIB_INCLUDE PWLIB_LIB PBX_LIBPWLIB CURL ac_pt_CURL PBX_CURL CURLLIBS ALLOCA LIBOBJS POW_LIB LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -876,6 +876,7 @@
   --with-odbc=PATH        use unixODBC files in PATH
   --with-ogg=PATH         use OGG files in PATH
   --with-osptk=PATH       use OSP Toolkit files in PATH
+  --with-ldap=PATH        use OpenLDAP files in PATH
   --with-popt=PATH        use popt files in PATH
   --with-pri=PATH         use ISDN PRI files in PATH
   --with-speex=PATH       use Speex files in PATH
@@ -8281,6 +8282,434 @@
       echo "*** The OSP Toolkit installation on this system appears to be broken."
       echo "*** Either correct the installation, or run configure"
       echo "*** without explicity specifying --with-osptk"
+      exit 1
+   fi
+fi
+
+
+
+
+
+
+# Check whether --with-ldap or --without-ldap was given.
+if test "${with_ldap+set}" = set; then
+  withval="$with_ldap"
+
+case ${withval} in
+     n|no)
+     USE_ldap=no
+     ;;
+     y|ye|yes)
+     ldap_MANDATORY="yes"
+     ;;
+     *)
+     ldap_DIR="${withval}"
+     ldap_MANDATORY="yes"
+     ;;
+esac
+
+fi;
+
+PBX_LIBldap=0
+
+if test "${USE_ldap}" != "no"; then
+   libdir=""
+   if test "x${ldap_DIR}" != "x"; then
+      libdir="-L${ldap_DIR}/lib"
+   fi
+   echo "$as_me:$LINENO: checking for ldap_first_attribute in -lldap" >&5
+echo $ECHO_N "checking for ldap_first_attribute in -lldap... $ECHO_C" >&6
+if test "${ac_cv_lib_ldap_ldap_first_attribute+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lldap ${libdir}  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char ldap_first_attribute ();
+int
+main ()
+{
+ldap_first_attribute ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_ldap_ldap_first_attribute=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ldap_ldap_first_attribute=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_first_attribute" >&5
+echo "${ECHO_T}$ac_cv_lib_ldap_ldap_first_attribute" >&6
+if test $ac_cv_lib_ldap_ldap_first_attribute = yes; then
+  :
+fi
+
+
+   if test "${ac_cv_lib_ldap_ldap_first_attribute}" = "yes"; then
+      ldap_LIB="-lldap "
+      LDAP_HEADER_FOUND="1"
+      if test "x${ldap_DIR}" != "x"; then
+         ldap_LIB="${libdir} ${ldap_LIB}"
+	 ldap_INCLUDE="-I${ldap_DIR}/include"
+	 if test "xldap.h" != "x" ; then
+	    as_ac_Header=`echo "ac_cv_header_${ldap_DIR}/include/ldap.h" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for ${ldap_DIR}/include/ldap.h" >&5
+echo $ECHO_N "checking for ${ldap_DIR}/include/ldap.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking ${ldap_DIR}/include/ldap.h usability" >&5
+echo $ECHO_N "checking ${ldap_DIR}/include/ldap.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <${ldap_DIR}/include/ldap.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking ${ldap_DIR}/include/ldap.h presence" >&5
+echo $ECHO_N "checking ${ldap_DIR}/include/ldap.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <${ldap_DIR}/include/ldap.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: ${ldap_DIR}/include/ldap.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ${ldap_DIR}/include/ldap.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${ldap_DIR}/include/ldap.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ${ldap_DIR}/include/ldap.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: ${ldap_DIR}/include/ldap.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ${ldap_DIR}/include/ldap.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${ldap_DIR}/include/ldap.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ${ldap_DIR}/include/ldap.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${ldap_DIR}/include/ldap.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ${ldap_DIR}/include/ldap.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${ldap_DIR}/include/ldap.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ${ldap_DIR}/include/ldap.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${ldap_DIR}/include/ldap.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ${ldap_DIR}/include/ldap.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${ldap_DIR}/include/ldap.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ${ldap_DIR}/include/ldap.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for ${ldap_DIR}/include/ldap.h" >&5
+echo $ECHO_N "checking for ${ldap_DIR}/include/ldap.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  LDAP_HEADER_FOUND=1
+else
+  LDAP_HEADER_FOUND=0
+fi
+
+
+	 fi
+      else
+	 if test "xldap.h" != "x" ; 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
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_ldap_h" >&5
+echo "${ECHO_T}$ac_cv_header_ldap_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking ldap.h usability" >&5
+echo $ECHO_N "checking ldap.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <ldap.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking ldap.h presence" >&5
+echo $ECHO_N "checking ldap.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ldap.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: ldap.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ldap.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ldap.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ldap.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: ldap.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ldap.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ldap.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ldap.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ldap.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ldap.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ldap.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ldap.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ldap.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ldap.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ldap.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ldap.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+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
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_ldap_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_ldap_h" >&5
+echo "${ECHO_T}$ac_cv_header_ldap_h" >&6
+
+fi
+if test $ac_cv_header_ldap_h = yes; then
+  LDAP_HEADER_FOUND=1
+else
+  LDAP_HEADER_FOUND=0
+fi
+
+
+	 fi
+      fi
+      if test "x${LDAP_HEADER_FOUND}" = "x0" ; then
+         if test ! -z "${ldap_MANDATORY}" ;
+         then
+            echo " ***"
+            echo " *** It appears that you do not have the ldap development package installed."
+            echo " *** Please install it to include OpenLDAP support, or re-run configure"
+            echo " *** without explicitly specifying --with-ldap"
+            exit 1
+         fi
+         ldap_LIB=""
+         ldap_INCLUDE=""
+         PBX_LIBldap=0
+      else
+         PBX_LIBldap=1
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LDAP 1
+_ACEOF
+
+      fi
+   elif test ! -z "${ldap_MANDATORY}";
+   then
+      echo "***"
+      echo "*** The OpenLDAP installation on this system appears to be broken."
+      echo "*** Either correct the installation, or run configure"
+      echo "*** without explicity specifying --with-ldap"
       exit 1
    fi
 fi
@@ -22926,6 +23355,9 @@
 s, at osptk_LIB@,$osptk_LIB,;t t
 s, at osptk_INCLUDE@,$osptk_INCLUDE,;t t
 s, at PBX_LIBosptk@,$PBX_LIBosptk,;t t
+s, at ldap_LIB@,$ldap_LIB,;t t
+s, at ldap_INCLUDE@,$ldap_INCLUDE,;t t
+s, at PBX_LIBldap@,$PBX_LIBldap,;t t
 s, at popt_LIB@,$popt_LIB,;t t
 s, at popt_INCLUDE@,$popt_INCLUDE,;t t
 s, at PBX_LIBpopt@,$PBX_LIBpopt,;t t

Modified: team/group/res_config_ldap/configure.ac
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/configure.ac?rev=26913&r1=26912&r2=26913&view=diff
==============================================================================
--- team/group/res_config_ldap/configure.ac (original)
+++ team/group/res_config_ldap/configure.ac Thu May 11 09:10:53 2006
@@ -177,6 +177,7 @@
 AST_EXT_LIB([odbc], [SQLConnect], [sql.h], [UNIXODBC], [unixODBC])
 AST_EXT_LIB([ogg], [ogg_sync_init], [], [OGG], [OGG])
 AST_EXT_LIB([osptk], [OSPPCryptoDecrypt], [osp/osp.h], [OSPTK], [OSP Toolkit], [-lcrypto -lssl])
+AST_EXT_LIB([ldap], [ldap_first_attribute], [ldap.h], [LDAP], [OpenLDAP])
 AST_EXT_LIB([popt], [poptStrerror], [popt.h], [POPT], [popt])
 AST_EXT_LIB([pri], [pri_call], [libpri.h], [LIBPRI], [ISDN PRI])
 AST_EXT_LIB([speex], [speex_encode], [speex/speex.h], [SPEEX], [Speex], [-lm])

Modified: team/group/res_config_ldap/include/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/include/autoconfig.h.in?rev=26913&r1=26912&r2=26913&view=diff
==============================================================================
--- team/group/res_config_ldap/include/autoconfig.h.in (original)
+++ team/group/res_config_ldap/include/autoconfig.h.in Thu May 11 09:10:53 2006
@@ -120,6 +120,9 @@
 
 /* Define to 1 if you have the `isascii' function. */
 #undef HAVE_ISASCII
+
+/* Define to indicate the OpenLDAP library */
+#undef HAVE_LDAP
 
 /* Define to 1 if you have the <libintl.h> header file. */
 #undef HAVE_LIBINTL_H

Modified: team/group/res_config_ldap/makeopts.in
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/makeopts.in?rev=26913&r1=26912&r2=26913&view=diff
==============================================================================
--- team/group/res_config_ldap/makeopts.in (original)
+++ team/group/res_config_ldap/makeopts.in Thu May 11 09:10:53 2006
@@ -104,3 +104,6 @@
 
 EDITLINE_LIBS=@EDITLINE_LIBS@
 
+LDAP_LIB=@ldap_LIB@
+LDAP_INCLUDE=@ldap_INCLUDE@
+

Modified: team/group/res_config_ldap/res/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/res/Makefile?rev=26913&r1=26912&r2=26913&view=diff
==============================================================================
--- team/group/res_config_ldap/res/Makefile (original)
+++ team/group/res_config_ldap/res/Makefile Thu May 11 09:10:53 2006
@@ -26,10 +26,6 @@
   ifeq ($(findstring BSD,$(OSARCH)),BSD)
     MODS:=$(filter-out res_snmp.so,$(MODS))
   endif
-endif
-
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/ldap.h $(CROSS_COMPILE_TARGET)/usr/local/include/ldap.h),)
-  MODS:=$(filter-out res_config_ldap.so,$(MODS))
 endif
 
 ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/net-snmp/net-snmp-config.h),)
@@ -93,7 +89,10 @@
 	$(CC) $(SOLINK) $(SNMP_LDFLAGS) -o $@ $< snmp/agent.o $(SNMP_LDLIBS)
 
 res_config_ldap.so: res_config_ldap.o
-	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lldap
+	$(CC) $(SOLINK) -o $@ $< $(LDAP_LIB)
+
+res_config_ldap.o: res_config_ldap.c
+	$(CC) -c -o $@ $(CFLAGS) $(LDAP_INCLUDE) $<
 
 res_config_pgsql.so: res_config_pgsql.o
 	$(CC) $(SOLINK) -o $@ $< $(PGSQL_LIB)

Modified: team/group/res_config_ldap/res/res_config_ldap.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/res/res_config_ldap.c?rev=26913&r1=26912&r2=26913&view=diff
==============================================================================
--- team/group/res_config_ldap/res/res_config_ldap.c (original)
+++ team/group/res_config_ldap/res/res_config_ldap.c Thu May 11 09:10:53 2006
@@ -31,6 +31,10 @@
  * - v0.5   - (11-16-2005) - Initial version based
  * - v0.7   - (03-08-2006) - Fixes, confg file changes
  */
+
+/*** MODULEINFO
+	<depend>ldap</depend>
+ ***/
 
 #include <stdlib.h>
 #include <string.h>



More information about the asterisk-commits mailing list