summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-05-14 22:16:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:16:43 -0500
commite5a3ec0e5b9bc7d85d3c64f0ce9628f788065d84 (patch)
treef7b4d47e7dd174ab00181e3b3e66329ba446be82
parent770b47415d717871eecab4d9a91cc1945609c587 (diff)
downloadsamba-e5a3ec0e5b9bc7d85d3c64f0ce9628f788065d84.tar.gz
samba-e5a3ec0e5b9bc7d85d3c64f0ce9628f788065d84.tar.bz2
samba-e5a3ec0e5b9bc7d85d3c64f0ce9628f788065d84.zip
r6790: Use config.h file for ldb and add test for stdint.h
(This used to be commit c1f1b5a9455c827f7baf382d919ab8a0eab49bb3)
-rw-r--r--source4/lib/ldb/Makefile.in3
-rwxr-xr-xsource4/lib/ldb/autogen.sh1
-rw-r--r--source4/lib/ldb/configure.in4
-rw-r--r--source4/lib/ldb/include/includes.h4
4 files changed, 10 insertions, 2 deletions
diff --git a/source4/lib/ldb/Makefile.in b/source4/lib/ldb/Makefile.in
index eedab96ef2..e7bde04658 100644
--- a/source4/lib/ldb/Makefile.in
+++ b/source4/lib/ldb/Makefile.in
@@ -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
diff --git a/source4/lib/ldb/autogen.sh b/source4/lib/ldb/autogen.sh
index 94148edf69..e118019a39 100755
--- a/source4/lib/ldb/autogen.sh
+++ b/source4/lib/ldb/autogen.sh
@@ -1,6 +1,7 @@
#!/bin/sh
autoconf || exit 1
+autoheader || exit 1
echo "Now run ./configure and then make."
exit 0
diff --git a/source4/lib/ldb/configure.in b/source4/lib/ldb/configure.in
index 26b39e684a..ed61344317 100644
--- a/source4/lib/ldb/configure.in
+++ b/source4/lib/ldb/configure.in
@@ -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)
diff --git a/source4/lib/ldb/include/includes.h b/source4/lib/ldb/include/includes.h
index 66b984a87d..8b513e20c7 100644
--- a/source4/lib/ldb/include/includes.h
+++ b/source4/lib/ldb/include/includes.h
@@ -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"