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