r6790: Use config.h file for ldb and add test for stdint.h
authorJelmer Vernooij <jelmer@samba.org>
Sat, 14 May 2005 22:16:02 +0000 (22:16 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:16:43 +0000 (13:16 -0500)
(This used to be commit c1f1b5a9455c827f7baf382d919ab8a0eab49bb3)

source4/lib/ldb/Makefile.in
source4/lib/ldb/autogen.sh
source4/lib/ldb/configure.in
source4/lib/ldb/include/includes.h

index eedab96ef2d604777055572d409d92d4644ba4e0..e7bde046582146362b3802baf5e38bedac22cc8c 100644 (file)
@@ -7,8 +7,9 @@ includedir = @includedir@
 libdir = @libdir@
 bindir = @bindir@
 WITH_GCOV = @WITH_GCOV@
+WITH_LDAP = @WITH_LDAP@
 
-ifeq ($(WITH_LDAP),1)
+ifeq ($(WITH_LDAP),yes)
 OPENLDAP_PREFIX=/usr
 LDAP_LIBS=-L$(OPENLDAP_PREFIX)/lib -llber -lldap
 LDAP_FLAGS=-DHAVE_LDAP=1
index 94148edf698e8ef1e60f4a689ba8d5367d504d00..e118019a397242927cb7eba502e217adf62684d9 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 autoconf || exit 1
+autoheader || exit 1
 
 echo "Now run ./configure and then make."
 exit 0
index 26b39e684ac4132c3925e5633c3486d85e501b7d..ed61344317191ed51fd9e93362f00a2cf713fcfa 100644 (file)
@@ -20,6 +20,10 @@ AC_PROG_CC
 AC_FUNC_MMAP
 AC_PATH_PROG(YODL2MAN,yodl2man)
 AC_PATH_PROG(GCOV,gcov)
+AC_CHECK_HEADERS(stdint.h)
+AC_CONFIG_HEADER(include/config.h)
 sinclude(ldap.m4)
+WITH_LDAP=$with_ldap_support
+AC_SUBST(WITH_LDAP)
 sinclude(config.m4)
 AC_OUTPUT(Makefile ldb.pc)
index 66b984a87d1008486f4bda1acc568b2bd8cdecee..8b513e20c74763a5ace8bc6866af01a81aadca64 100644 (file)
@@ -5,8 +5,8 @@
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
+#include "config.h"
 #include <stdio.h>
-#include <stdint.h>
 #include <string.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -18,7 +18,9 @@
 #include <fnmatch.h>
 #include <sys/time.h>
 #include <time.h>
+#ifdef HAVE_STDINT_H
 #include <stdint.h>
+#endif
 
 #include "ldb.h"
 #include "ldb_private.h"