1 dnl Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved.
2 dnl COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5 dnl Process this file with autoconf to produce a configure script.
7 dnl disable config.cache
8 dnl define([AC_CACHE_LOAD], )
9 dnl define([AC_CACHE_SAVE], )
11 AC_INIT(ldapcpplib, 0.0.5)
12 AC_CONFIG_SRCDIR(src/LDAPConnection.h)
13 AM_INIT_AUTOMAKE(foreign)
14 AM_CONFIG_HEADER(src/config.h)
17 dnl Checks for programs.
25 AC_ARG_ENABLE(debug,[ --enable-debug],[
26 CXXFLAGS="-g -O0 -Wall"
27 AC_DEFINE(WITH_DEBUG,[],[Define to 1 ot enable debug logging])
33 AC_ARG_WITH(libldap,[ --with-libldap=DIR Path to the libldap library [/usr/local/lib]],[
34 LIBS="-L$with_libldap $LIBS "
36 LIBS="-L/usr/local/lib $LIBS "
40 AC_ARG_WITH(ldap-includes,[ --with-ldap-includes=DIR Path to the libldap include files [/usr/local/include]],[
41 CPPFLAGS="-I$with_ldap_includes $CPPFLAGS "
43 CPPFLAGS="-I/usr/local/include $CPPFLAGS "
46 dnl Checks for libraries.
47 AC_CHECK_LIB(resolv,main)
48 AC_CHECK_LIB(lber,ber_strdup,[
52 echo " didn't find ber_strdup in liblber !";
53 echo " Check for the right version (>= 2.0) of the OpenLDAP libraries";
54 echo " or try the --with-libldap option.";
57 AC_CHECK_LIB(ldap,ldap_add_ext,[
61 echo " didn't find ldap_add_ext in libldap !";
62 echo " Check for the right version (>= 2.0) of the OpenLDAP libraries";
63 echo " or try the --with-libldap option.";
68 dnl Checks for header files.
70 AC_CHECK_HEADERS(termios.h ldap.h)
71 AC_EGREP_HEADER(ldap_add_ext,ldap.h,[
75 echo " didn't find ldap_add_ext in ldap.h!";
76 echo " Check for the right version (>= 2.0) of the OpenLDAP includes";
77 echo " or try --with-ldap-includes option.";
80 AC_CHECK_HEADER(lber.h)
81 AC_EGREP_HEADER(ber_strdup,lber.h,[
85 echo " didn't find ber_strdup in lber.h!";
86 echo " Check for the right version (>= 2.0) of the OpenLDAP includes";
87 echo " or try --with-ldap-includes option.";
91 dnl Checks for typedefs, structures, and compiler characteristics.
93 dnl Checks for library functions.
95 AC_OUTPUT(Makefile src/Makefile examples/Makefile)