2003-06-06 02:10:44 +08:00
|
|
|
dnl Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved.
|
2000-09-02 02:46:32 +08:00
|
|
|
dnl COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
|
|
|
|
|
|
|
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
2000-10-04 02:25:34 +08:00
|
|
|
dnl disable config.cache
|
2001-09-29 00:39:58 +08:00
|
|
|
dnl define([AC_CACHE_LOAD], )
|
|
|
|
dnl define([AC_CACHE_SAVE], )
|
2000-09-02 02:46:32 +08:00
|
|
|
|
2007-11-07 19:02:26 +08:00
|
|
|
AC_INIT(ldapcpplib, 0.0.5)
|
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)
|
|
|
|
|
|
|
|
|
|
|
|
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])
|
2000-10-12 01:18:27 +08:00
|
|
|
],[
|
|
|
|
CXXFLAGS="-O0"
|
|
|
|
]
|
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)
|