1 dnl Copyright 2000, 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 define([AC_CACHE_LOAD], )
9 define([AC_CACHE_SAVE], )
12 AM_INIT_AUTOMAKE(main, 0.0.1)
13 AM_CONFIG_HEADER(src/config.h)
16 dnl Checks for programs.
24 AC_ARG_ENABLE(debug,--enable-debug,[
25 CXXFLAGS="-g -O0 -Wall"
32 AC_ARG_WITH(libldap,[ --with-libldap=DIR Path to the libldap library [/usr/local/lib]],[
33 LIBS="-L$with_libldap $LIBS "
35 LIBS="-L/usr/local/lib $LIBS "
39 AC_ARG_WITH(ldap-includes,[ --with-ldap-includes=DIR Path to the libldap include files [/usr/local/include]],[
40 CPPFLAGS="-I$with_ldap_includes $CPPFLAGS "
42 CPPFLAGS="-I/usr/local/include $CPPFLAGS "
45 dnl Checks for libraries.
46 AC_CHECK_LIB(resolv,main)
47 AC_CHECK_LIB(lber,ber_strdup,[
49 echo " didn't find ber_strdup in liblber !";
50 echo " Check for the right version (>= 2.0) of the OpenLDAP libraries";
51 echo " or try the --with-libldap option.";
54 AC_CHECK_LIB(ldap,ldap_add_ext,[
56 echo " didn't find ldap_add_ext in libldap !";
57 echo " Check for the right version (>= 2.0) of the OpenLDAP libraries";
58 echo " or try the --with-libldap option.";
63 dnl Checks for header files.
65 AC_CHECK_HEADER(ldap.h)
66 AC_EGREP_HEADER(ldap_add_ext,ldap.h,[
68 echo " didn't find ldap_add_ext in ldap.h!";
69 echo " Check for the right version (>= 2.0) of the OpenLDAP includes";
70 echo " or try --with-ldap-includes option.";
73 AC_CHECK_HEADER(lber.h)
74 AC_EGREP_HEADER(ber_strdup,lber.h,[
76 echo " didn't find ber_strdup in lber.h!";
77 echo " Check for the right version (>= 2.0) of the OpenLDAP includes";
78 echo " or try --with-ldap-includes option.";
82 dnl Checks for typedefs, structures, and compiler characteristics.
84 dnl Checks for library functions.
86 AC_OUTPUT(Makefile src/Makefile)