3 dnl Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved.
4 dnl COPYING RESTRICTIONS APPLY, see COPYRIGHT file
6 dnl Process this file with autoconf to produce a configure script.
8 dnl disable config.cache
9 dnl define([AC_CACHE_LOAD], )
10 dnl define([AC_CACHE_SAVE], )
12 AC_INIT(ldapcpplib, 0.0.5)
13 AC_CONFIG_SRCDIR(src/LDAPConnection.h)
14 AM_INIT_AUTOMAKE(foreign)
15 AM_CONFIG_HEADER(src/config.h)
18 dnl Checks for programs.
26 AC_ARG_ENABLE(debug,[ --enable-debug],[
27 CXXFLAGS="-g -O0 -Wall"
28 AC_DEFINE(WITH_DEBUG,[],[Define to 1 ot enable debug logging])
34 AC_ARG_WITH(libldap,[ --with-libldap=DIR Path to the libldap library [/usr/local/lib]],[
35 LIBS="-L$with_libldap $LIBS "
37 LIBS="-L/usr/local/lib $LIBS "
41 AC_ARG_WITH(ldap-includes,[ --with-ldap-includes=DIR Path to the libldap include files [/usr/local/include]],[
42 CPPFLAGS="-I$with_ldap_includes $CPPFLAGS "
44 CPPFLAGS="-I/usr/local/include $CPPFLAGS "
47 dnl Checks for libraries.
48 AC_CHECK_LIB(resolv,main)
49 AC_CHECK_LIB(lber,ber_strdup,[
53 echo " didn't find ber_strdup in liblber !";
54 echo " Check for the right version (>= 2.0) of the OpenLDAP libraries";
55 echo " or try the --with-libldap option.";
58 AC_CHECK_LIB(ldap,ldap_add_ext,[
62 echo " didn't find ldap_add_ext in libldap !";
63 echo " Check for the right version (>= 2.0) of the OpenLDAP libraries";
64 echo " or try the --with-libldap option.";
69 dnl Checks for header files.
71 AC_CHECK_HEADERS(termios.h ldap.h)
72 AC_EGREP_HEADER(ldap_add_ext,ldap.h,[
76 echo " didn't find ldap_add_ext in ldap.h!";
77 echo " Check for the right version (>= 2.0) of the OpenLDAP includes";
78 echo " or try --with-ldap-includes option.";
81 AC_CHECK_HEADER(lber.h)
82 AC_EGREP_HEADER(ber_strdup,lber.h,[
86 echo " didn't find ber_strdup in lber.h!";
87 echo " Check for the right version (>= 2.0) of the OpenLDAP includes";
88 echo " or try --with-ldap-includes option.";
92 dnl Checks for typedefs, structures, and compiler characteristics.
94 dnl Checks for library functions.
96 AC_OUTPUT(Makefile src/Makefile examples/Makefile)