samba-3.5.8 for ARM
[tomato.git] / release / src-rt-6.x.4708 / router / samba-3.5.8 / source4 / lib / ldb / configure.ac
bloba0fab6d786159a58f048c768aa1098f3b5ade42e
1 AC_PREREQ(2.50)
2 AC_DEFUN([AC_CHECK_LIB_EXT], [
3         AC_CHECK_LIB([$1],[$3],[$4],[$5],[$7])
4         ac_cv_lib_ext_$1_$3=$ac_cv_lib_$1_$3
5 ])
6 AC_DEFUN([AC_CHECK_FUNC_EXT], [
7         AC_CHECK_FUNC([$1],[$3],[$4])
8         ac_cv_func_ext_$1=$ac_cv_func_$1
9 ])
10 AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""])
11 AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""])
12 AC_DEFUN([SMB_EXT_LIB], [echo -n ""])
13 AC_DEFUN([SMB_ENABLE], [echo -n ""])
14 AC_INIT(ldb, 0.9.7)
15 AC_CONFIG_SRCDIR([common/ldb.c])
17 AC_LIBREPLACE_ALL_CHECKS
19 if test "$ac_cv_prog_gcc" = yes; then
20    CFLAGS="$CFLAGS -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings"
23 WITH_GCOV=0
24 AC_ARG_ENABLE(gcov,
25         AS_HELP_STRING([--enable-gcov],[enable GCOV code coverage tests]),
26         [ WITH_GCOV=1])
27 AC_SUBST(WITH_GCOV)
28 if test x"$with_gcov_support" = x"yes"; then
29    CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs"
30    LIBS="$LIBS -lgcov"
33 AC_PATH_PROG(XSLTPROC,xsltproc)
34 AC_PATH_PROG(DOXYGEN,doxygen)
35 AC_PATH_PROG(GCOV,gcov)
36 AC_PATH_PROG(SLAPD,slapd)
37 AC_CHECK_HEADERS(stdint.h dlfcn.h)
38 AC_CONFIG_HEADER(include/config.h)
40 LDB_MODULESDIR="${libdir}/ldb"
41 AC_SUBST(LDB_MODULESDIR)
43 TESTS=""
44 EXTRA_OBJ=""
46 m4_include(build_macros.m4)
47 BUILD_WITH_SHARED_BUILD_DIR
49 m4_include(pkg.m4)
50 m4_include(libpopt.m4)
51 m4_include(libtalloc.m4)
52 m4_include(libtdb.m4)
53 m4_include(libevents.m4)
55 m4_include(ldap.m4)
56 if test x"$with_ldap_support" = x"yes"; then
57    CFLAGS="$CFLAGS -DHAVE_LDB_LDAP=1"
58    EXTRA_OBJ="$EXTRA_OBJ ldb_ldap/ldb_ldap.o"
59    LDAP_LIBS="-llber -lldap"
60    AC_SUBST(LDAP_LIBS)
61    TESTS="$TESTS test-ldap.sh"
64 m4_include(sqlite3.m4)
65 if test x"$with_sqlite3_support" = x"yes"; then
66    LIBS="$LIBS -lsqlite3"
67    CFLAGS="$CFLAGS -DHAVE_LDB_SQLITE3=1"
68    EXTRA_OBJ="$EXTRA_OBJ ldb_sqlite3/ldb_sqlite3.o"
69    TESTS="$TESTS test-sqlite3.sh"
72 AC_SUBST(TESTS)
73 AC_SUBST(EXTRA_OBJ)
75 AC_LD_EXPORT_DYNAMIC
76 AC_LD_PICFLAG
77 AC_LD_SHLIBEXT
78 AC_LD_SONAMEFLAG
79 AC_LIBREPLACE_SHLD
80 AC_LIBREPLACE_SHLD_FLAGS
81 AC_LIBREPLACE_MDLD
82 AC_LIBREPLACE_MDLD_FLAGS
83 AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR
85 AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config])
86 AC_PATH_PROGS([PYTHON], [python2.6 python2.5 python2.4 python])
88 PYTHON_BUILD_TARGET="build-python"
89 PYTHON_INSTALL_TARGET="install-python"
90 PYTHON_CHECK_TARGET="check-python"
91 AC_SUBST(PYTHON_BUILD_TARGET)
92 AC_SUBST(PYTHON_INSTALL_TARGET)
93 AC_SUBST(PYTHON_CHECK_TARGET)
95 if test -z "$PYTHON_CONFIG"; then
96         PYTHON_BUILD_TARGET=""  
97         PYTHON_CHECK_TARGET=""
98         PYTHON_INSTALL_TARGET=""        
101 m4_include(libldb.m4)
102 AC_OUTPUT(Makefile ldb.pc)