1 dnl $OpenLDAP: pkg/ldap/contrib/ldapc++/configure.in,v 1.8.2.7 2008/07/09 21:59:44 quanah Exp $
3 dnl Copyright 2000-2008, 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 AC_COPYRIGHT([[Copyright 2000-2008 The OpenLDAP Foundation. All rights reserved.
9 Restrictions apply, see COPYRIGHT and LICENSE files.]])
10 AC_REVISION([$OpenLDAP: pkg/ldap/contrib/ldapc++/configure.in,v 1.8.2.7 2008/07/09 21:59:44 quanah Exp $])
11 AC_INIT(ldapcpplib, [] , [http://www.openldap.org/its/] )
12 AC_CONFIG_SRCDIR(src/LDAPConnection.h)
13 AM_INIT_AUTOMAKE(foreign)
14 AM_CONFIG_HEADER(src/config.h)
16 eval `$ac_aux_dir/version.sh`
17 if test -z "$OL_CPP_API_RELEASE"; then
18 AC_MSG_ERROR([could not determine version])
21 VERSION=$OL_CPP_API_RELEASE
22 OPENLDAP_CPP_API_VERSION=$OL_CPP_API_VERSION
24 AC_SUBST(OPENLDAP_CPP_API_VERSION)
25 dnl Checks for programs.
33 AC_ARG_ENABLE(debug,[ --enable-debug],[
34 CXXFLAGS="-g -O0 -Wall"
35 AC_DEFINE(WITH_DEBUG,[],[Define to 1 ot enable debug logging])
39 AC_ARG_WITH(libldap,[ --with-libldap=DIR Path to the libldap library [/usr/local/lib]],[
40 LIBS="-L$with_libldap $LIBS "
42 LIBS="-L/usr/local/lib $LIBS "
46 AC_ARG_WITH(ldap-includes,[ --with-ldap-includes=DIR Path to the libldap include files [/usr/local/include]],[
47 CPPFLAGS="-I$with_ldap_includes $CPPFLAGS "
49 CPPFLAGS="-I/usr/local/include $CPPFLAGS "
52 dnl Checks for libraries.
53 AC_CHECK_LIB(resolv,main)
54 AC_CHECK_LIB(lber,ber_strdup,[
58 echo " didn't find ber_strdup in liblber !";
59 echo " Check for the right version (>= 2.0) of the OpenLDAP libraries";
60 echo " or try the --with-libldap option.";
63 AC_CHECK_LIB(ldap,ldap_add_ext,[
67 echo " didn't find ldap_add_ext in libldap !";
68 echo " Check for the right version (>= 2.0) of the OpenLDAP libraries";
69 echo " or try the --with-libldap option.";
74 dnl Checks for header files.
76 AC_CHECK_HEADERS(termios.h ldap.h)
77 AC_EGREP_HEADER(ldap_add_ext,ldap.h,[
81 echo " didn't find ldap_add_ext in ldap.h!";
82 echo " Check for the right version (>= 2.0) of the OpenLDAP includes";
83 echo " or try --with-ldap-includes option.";
86 AC_CHECK_HEADER(lber.h)
87 AC_EGREP_HEADER(ber_strdup,lber.h,[
91 echo " didn't find ber_strdup in lber.h!";
92 echo " Check for the right version (>= 2.0) of the OpenLDAP includes";
93 echo " or try --with-ldap-includes option.";
97 dnl Checks for typedefs, structures, and compiler characteristics.
99 dnl Checks for library functions.
101 AC_OUTPUT(Makefile src/Makefile examples/Makefile)