]> git.sur5r.net Git - openldap/blob - contrib/ldapc++/configure.in
return to releng
[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(examples/main.cpp)
12 AM_INIT_AUTOMAKE(main, 0.0.1)
13 AM_CONFIG_HEADER(src/config.h)
14
15
16 dnl Checks for programs.
17 AC_PROG_INSTALL
18 dnl AC_PROG_CC
19 AC_PROG_CXX
20 dnl AC_PROG_RANLIB
21 dnl AM_DISABLE_SHARED
22 AC_PROG_LIBTOOL
23 dnl AC_PROG_MAKE_SET
24 AC_ARG_ENABLE(debug,--enable-debug,[
25         CXXFLAGS="-g -O0 -Wall"
26     AC_DEFINE(WITH_DEBUG)
27         ],[
28         CXXFLAGS="-O0"
29     ]
30 )
31
32 AC_ARG_WITH(libldap,[  --with-libldap=DIR          Path to the libldap library [/usr/local/lib]],[
33         LIBS="-L$with_libldap $LIBS "   
34         ],[
35         LIBS="-L/usr/local/lib $LIBS "  
36         ]
37 )
38
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 "     
41         ],[
42         CPPFLAGS="-I/usr/local/include $CPPFLAGS "
43         ]
44 )
45 dnl Checks for libraries.
46 AC_CHECK_LIB(resolv,main)
47 AC_CHECK_LIB(lber,ber_strdup,[
48 dnl NOOP
49         :
50     ],[
51         echo "        didn't find ber_strdup in liblber !";
52         echo "        Check for the right version (>= 2.0) of the OpenLDAP libraries";
53         echo "        or try the --with-libldap option.";
54         exit
55     ])
56 AC_CHECK_LIB(ldap,ldap_add_ext,[
57 dnl NOOP
58         :
59     ],[
60         echo "        didn't find ldap_add_ext in libldap !";
61         echo "        Check for the right version (>= 2.0) of the OpenLDAP libraries";
62         echo "        or try the --with-libldap option.";
63         exit
64     ],[
65     -llber
66     ])
67 dnl Checks for header files.
68 AC_HEADER_TIME
69 AC_CHECK_HEADER(ldap.h)
70 AC_EGREP_HEADER(ldap_add_ext,ldap.h,[
71 dnl NOOP
72         :
73     ],[
74         echo "        didn't find ldap_add_ext in ldap.h!";
75         echo "        Check for the right version (>= 2.0) of the OpenLDAP includes";
76         echo "        or try --with-ldap-includes option.";
77         exit
78     ])
79 AC_CHECK_HEADER(lber.h)
80 AC_EGREP_HEADER(ber_strdup,lber.h,[
81 dnl NOOP
82         :
83     ],[
84         echo "        didn't find ber_strdup in lber.h!";
85         echo "        Check for the right version (>= 2.0) of the OpenLDAP includes";
86         echo "        or try --with-ldap-includes option.";
87         exit
88     ])
89
90 dnl Checks for typedefs, structures, and compiler characteristics.
91
92 dnl Checks for library functions.
93
94 AC_OUTPUT(Makefile src/Makefile examples/Makefile)