]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Fix getopt(3) detection
authorKurt Zeilenga <kurt@openldap.org>
Fri, 20 Sep 2002 19:07:59 +0000 (19:07 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 20 Sep 2002 19:07:59 +0000 (19:07 +0000)
CHANGES
build/version
configure
configure.in
include/portable.h.in
tests/progs/Makefile.in

diff --git a/CHANGES b/CHANGES
index 7733dd938f1b167b3f93acd26559aa5461635a07..3c608091a0f9adba414b40461cc1da9ad3c4b947 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 OpenLDAP 2.0 Change Log
 
+OpenLDAP 2.0.27 Engineering
+       Build environment
+               Fix getopt(3) detection
+
 OpenLDAP 2.0.26 Release
        Fixed slapd ACL buffer size bug (ITS#1963)
        Fixed slapd ACL filters w/substrings bug (ITS#2023, ITS#2027)
index cbe0fb88722e345b095317edca592fdd547a9ca9..a93b8c4783bc8eb025db848c1742746508982a8b 100644 (file)
@@ -1 +1 @@
-2.0.26-Release
+2.0.27-Engineering
index 8e65afdbe39193225e18d98db273f6513e3f70f5..9fa22ec1ca993fe27def97e840b82c8c06ad9997 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # $OpenLDAP$
-# from OpenLDAP: pkg/ldap/configure.in,v 1.223.2.40 2002/08/28 05:51:41 hyc Exp  
+# from OpenLDAP: pkg/ldap/configure.in,v 1.223.2.41 2002/09/12 19:40:49 kurt Exp  
 
 # Copyright 1998-2002 The OpenLDAP Foundation.  All Rights Reserved.
 # 
 done
 
 
+for ac_func in getopt
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:16971: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 16976 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+char (*f)();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:17000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
+fi
+done
+
+
+
 if test "$ac_cv_func_getopt" != yes; then
     LIBSRCS="$LIBSRCS getopt.c"
 fi
 
 # Check Configuration
 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
-echo "configure:16974: checking declaration of sys_errlist" >&5
+echo "configure:17033: checking declaration of sys_errlist" >&5
 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
        cat > conftest.$ac_ext <<EOF
-#line 16980 "configure"
+#line 17039 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -16989,7 +17048,7 @@ int main() {
 char *c = (char *) *sys_errlist
 ; return 0; }
 EOF
-if { (eval echo configure:16993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:17052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ol_cv_dcl_sys_errlist=yes
        ol_cv_have_sys_errlist=yes
@@ -17012,20 +17071,20 @@ EOF
 
 
        echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
-echo "configure:17016: checking existence of sys_errlist" >&5
+echo "configure:17075: checking existence of sys_errlist" >&5
 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
                cat > conftest.$ac_ext <<EOF
-#line 17022 "configure"
+#line 17081 "configure"
 #include "confdefs.h"
 #include <errno.h>
 int main() {
 char *c = (char *) *sys_errlist
 ; return 0; }
 EOF
-if { (eval echo configure:17029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:17088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ol_cv_have_sys_errlist=yes
 else
index 261554c763b0907011418f2f8e82e5bc97cfcbe2..423459ba204c749ed0cb4b44ff965fc2b4ef21a5 100644 (file)
@@ -2108,6 +2108,9 @@ AC_CHECK_FUNCS(           \
        sendto                  \
 )
 
+dnl We actually may need to replace more than this.
+AC_REPLACE_FUNCS(getopt)
+
 if test "$ac_cv_func_getopt" != yes; then
     LIBSRCS="$LIBSRCS getopt.c"
 fi
index 868fdc879f730a27d32e23b5f33a27789e89069d..47fadaac33247daaa00c2b5c75ea5e5bfe67371f 100644 (file)
 /* Define if you have the gethostname function.  */
 #undef HAVE_GETHOSTNAME
 
+/* Define if you have the getopt function.  */
+#undef HAVE_GETOPT
+
 /* Define if you have the getpass function.  */
 #undef HAVE_GETPASS
 
index 97cdcb64b8c25ea1dfa8f26c7fdd6824e3fb0f4d..ad4219d78a97fffac2706b67cda0b2168bf13d2d 100644 (file)
@@ -12,7 +12,7 @@ SRCS     = slapd-tester.c slapd-search.c slapd-read.c slapd-addel.c
 LDAP_INCDIR= ../../include
 LDAP_LIBDIR= ../../libraries
 
-XLIBS    = -lldap -llber
+XLIBS    = -lldap -llber -llutil
 XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
 
 # build-tools: FORCE