2008-03-28 19:27:24 +08:00
|
|
|
dnl $OpenLDAP$
|
|
|
|
|
2008-06-23 19:08:36 +08:00
|
|
|
dnl Copyright 2000-2008, OpenLDAP Foundation, All Rights Reserved.
|
2000-09-02 02:46:32 +08:00
|
|
|
dnl COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
2008-03-28 19:27:24 +08:00
|
|
|
|
2000-09-02 02:46:32 +08:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
2008-06-23 19:08:36 +08:00
|
|
|
AC_COPYRIGHT([[Copyright 2000-2008 The OpenLDAP Foundation. All rights reserved.
|
|
|
|
Restrictions apply, see COPYRIGHT and LICENSE files.]])
|
|
|
|
AC_REVISION([$OpenLDAP$])
|
|
|
|
AC_INIT(ldapcpplib, [] , [http://www.openldap.org/its/] )
|
2007-09-21 19:03:14 +08:00
|
|
|
AC_CONFIG_SRCDIR(src/LDAPConnection.h)
|
|
|
|
AM_INIT_AUTOMAKE(foreign)
|
2000-09-02 02:46:32 +08:00
|
|
|
AM_CONFIG_HEADER(src/config.h)
|
|
|
|
|
2008-06-23 22:09:38 +08:00
|
|
|
eval `$ac_aux_dir/version.sh`
|
|
|
|
if test -z "$OL_CPP_API_RELEASE"; then
|
|
|
|
AC_MSG_ERROR([could not determine version])
|
|
|
|
fi
|
|
|
|
|
|
|
|
VERSION=$OL_CPP_API_RELEASE
|
|
|
|
OPENLDAP_CPP_API_VERSION=$OL_CPP_API_VERSION
|
|
|
|
AC_SUBST(VERSION)
|
|
|
|
AC_SUBST(OPENLDAP_CPP_API_VERSION)
|
2000-09-02 02:46:32 +08:00
|
|
|
dnl Checks for programs.
|
2000-10-04 02:25:34 +08:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
dnl AC_PROG_CC
|
2000-09-02 02:46:32 +08:00
|
|
|
AC_PROG_CXX
|
2001-09-29 00:39:58 +08:00
|
|
|
dnl AC_PROG_RANLIB
|
2000-10-04 02:25:34 +08:00
|
|
|
dnl AM_DISABLE_SHARED
|
2002-03-07 06:54:02 +08:00
|
|
|
AC_PROG_LIBTOOL
|
2000-09-02 02:46:32 +08:00
|
|
|
dnl AC_PROG_MAKE_SET
|
2005-10-06 01:30:04 +08:00
|
|
|
AC_ARG_ENABLE(debug,[ --enable-debug],[
|
2000-09-02 02:46:32 +08:00
|
|
|
CXXFLAGS="-g -O0 -Wall"
|
2006-06-02 00:19:44 +08:00
|
|
|
AC_DEFINE(WITH_DEBUG,[],[Define to 1 ot enable debug logging])
|
2008-06-23 22:09:38 +08:00
|
|
|
],
|
2000-09-02 02:46:32 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
AC_ARG_WITH(libldap,[ --with-libldap=DIR Path to the libldap library [/usr/local/lib]],[
|
2000-10-04 02:25:34 +08:00
|
|
|
LIBS="-L$with_libldap $LIBS "
|
2000-09-02 02:46:32 +08:00
|
|
|
],[
|
2000-10-04 02:25:34 +08:00
|
|
|
LIBS="-L/usr/local/lib $LIBS "
|
2000-09-02 02:46:32 +08:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_ARG_WITH(ldap-includes,[ --with-ldap-includes=DIR Path to the libldap include files [/usr/local/include]],[
|
2000-10-04 02:25:34 +08:00
|
|
|
CPPFLAGS="-I$with_ldap_includes $CPPFLAGS "
|
2000-09-02 02:46:32 +08:00
|
|
|
],[
|
2000-10-04 02:25:34 +08:00
|
|
|
CPPFLAGS="-I/usr/local/include $CPPFLAGS "
|
2000-09-02 02:46:32 +08:00
|
|
|
]
|
|
|
|
)
|
|
|
|
dnl Checks for libraries.
|
|
|
|
AC_CHECK_LIB(resolv,main)
|
2000-10-04 02:25:34 +08:00
|
|
|
AC_CHECK_LIB(lber,ber_strdup,[
|
2001-09-29 00:39:58 +08:00
|
|
|
dnl NOOP
|
|
|
|
:
|
2000-10-04 02:25:34 +08:00
|
|
|
],[
|
|
|
|
echo " didn't find ber_strdup in liblber !";
|
|
|
|
echo " Check for the right version (>= 2.0) of the OpenLDAP libraries";
|
|
|
|
echo " or try the --with-libldap option.";
|
|
|
|
exit
|
|
|
|
])
|
|
|
|
AC_CHECK_LIB(ldap,ldap_add_ext,[
|
2001-09-29 00:39:58 +08:00
|
|
|
dnl NOOP
|
|
|
|
:
|
2000-10-04 02:25:34 +08:00
|
|
|
],[
|
|
|
|
echo " didn't find ldap_add_ext in libldap !";
|
|
|
|
echo " Check for the right version (>= 2.0) of the OpenLDAP libraries";
|
|
|
|
echo " or try the --with-libldap option.";
|
|
|
|
exit
|
|
|
|
],[
|
|
|
|
-llber
|
|
|
|
])
|
2000-09-02 02:46:32 +08:00
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_TIME
|
2007-12-20 20:35:30 +08:00
|
|
|
AC_CHECK_HEADERS(termios.h ldap.h)
|
2000-10-04 02:25:34 +08:00
|
|
|
AC_EGREP_HEADER(ldap_add_ext,ldap.h,[
|
2001-09-29 00:39:58 +08:00
|
|
|
dnl NOOP
|
|
|
|
:
|
2000-10-04 02:25:34 +08:00
|
|
|
],[
|
|
|
|
echo " didn't find ldap_add_ext in ldap.h!";
|
|
|
|
echo " Check for the right version (>= 2.0) of the OpenLDAP includes";
|
|
|
|
echo " or try --with-ldap-includes option.";
|
|
|
|
exit
|
|
|
|
])
|
2000-09-02 02:46:32 +08:00
|
|
|
AC_CHECK_HEADER(lber.h)
|
2000-10-04 02:25:34 +08:00
|
|
|
AC_EGREP_HEADER(ber_strdup,lber.h,[
|
2001-09-29 00:39:58 +08:00
|
|
|
dnl NOOP
|
|
|
|
:
|
2000-10-04 02:25:34 +08:00
|
|
|
],[
|
|
|
|
echo " didn't find ber_strdup in lber.h!";
|
|
|
|
echo " Check for the right version (>= 2.0) of the OpenLDAP includes";
|
|
|
|
echo " or try --with-ldap-includes option.";
|
|
|
|
exit
|
|
|
|
])
|
2000-09-02 02:46:32 +08:00
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
|
2003-06-06 02:10:44 +08:00
|
|
|
AC_OUTPUT(Makefile src/Makefile examples/Makefile)
|