]> git.sur5r.net Git - openldap/blob - contrib/ldapc++/configure.in
modules README, minus usn since that isn't in 2.4.
[openldap] / contrib / ldapc++ / configure.in
1 dnl $OpenLDAP$
2
3 dnl Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved.
4 dnl COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5
6 dnl Process this file with autoconf to produce a configure script.
7
8 dnl disable config.cache
9 dnl define([AC_CACHE_LOAD], )
10 dnl define([AC_CACHE_SAVE], )
11
12 AC_INIT(ldapcpplib, 0.0.5)
13 AC_CONFIG_SRCDIR(src/LDAPConnection.h)
14 AM_INIT_AUTOMAKE(foreign)
15 AM_CONFIG_HEADER(src/config.h)
16
17
18 dnl Checks for programs.
19 AC_PROG_INSTALL
20 dnl AC_PROG_CC
21 AC_PROG_CXX
22 dnl AC_PROG_RANLIB
23 dnl AM_DISABLE_SHARED
24 AC_PROG_LIBTOOL
25 dnl AC_PROG_MAKE_SET
26 AC_ARG_ENABLE(debug,[  --enable-debug],[
27         CXXFLAGS="-g -O0 -Wall"
28     AC_DEFINE(WITH_DEBUG,[],[Define to 1 ot enable debug logging])
29         ],[
30         CXXFLAGS="-O0"
31     ]
32 )
33
34 AC_ARG_WITH(libldap,[  --with-libldap=DIR          Path to the libldap library [/usr/local/lib]],[
35         LIBS="-L$with_libldap $LIBS "   
36         ],[
37         LIBS="-L/usr/local/lib $LIBS "  
38         ]
39 )
40
41 AC_ARG_WITH(ldap-includes,[  --with-ldap-includes=DIR    Path to the libldap include files [/usr/local/include]],[
42         CPPFLAGS="-I$with_ldap_includes $CPPFLAGS "     
43         ],[
44         CPPFLAGS="-I/usr/local/include $CPPFLAGS "
45         ]
46 )
47 dnl Checks for libraries.
48 AC_CHECK_LIB(resolv,main)
49 AC_CHECK_LIB(lber,ber_strdup,[
50 dnl NOOP
51         :
52     ],[
53         echo "        didn't find ber_strdup in liblber !";
54         echo "        Check for the right version (>= 2.0) of the OpenLDAP libraries";
55         echo "        or try the --with-libldap option.";
56         exit
57     ])
58 AC_CHECK_LIB(ldap,ldap_add_ext,[
59 dnl NOOP
60         :
61     ],[
62         echo "        didn't find ldap_add_ext in libldap !";
63         echo "        Check for the right version (>= 2.0) of the OpenLDAP libraries";
64         echo "        or try the --with-libldap option.";
65         exit
66     ],[
67     -llber
68     ])
69 dnl Checks for header files.
70 AC_HEADER_TIME
71 AC_CHECK_HEADERS(termios.h ldap.h)
72 AC_EGREP_HEADER(ldap_add_ext,ldap.h,[
73 dnl NOOP
74         :
75     ],[
76         echo "        didn't find ldap_add_ext in ldap.h!";
77         echo "        Check for the right version (>= 2.0) of the OpenLDAP includes";
78         echo "        or try --with-ldap-includes option.";
79         exit
80     ])
81 AC_CHECK_HEADER(lber.h)
82 AC_EGREP_HEADER(ber_strdup,lber.h,[
83 dnl NOOP
84         :
85     ],[
86         echo "        didn't find ber_strdup in lber.h!";
87         echo "        Check for the right version (>= 2.0) of the OpenLDAP includes";
88         echo "        or try --with-ldap-includes option.";
89         exit
90     ])
91
92 dnl Checks for typedefs, structures, and compiler characteristics.
93
94 dnl Checks for library functions.
95
96 AC_OUTPUT(Makefile src/Makefile examples/Makefile)