]> git.sur5r.net Git - openldap/blob - contrib/ldapc++/configure.in
1ab6afc4ac71653a572e48fc00a2858fde18bd9a
[openldap] / contrib / ldapc++ / configure.in
1 dnl Copyright 2000, 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 define([AC_CACHE_LOAD], )
9 define([AC_CACHE_SAVE], )
10
11 AC_INIT(src/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 AC_PROG_RANLIB
21 dnl AM_DISABLE_SHARED
22 AM_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     ],[
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.";
52         exit
53     ])
54 AC_CHECK_LIB(ldap,ldap_add_ext,[
55     ],[
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.";
59         exit
60     ],[
61     -llber
62     ])
63 dnl Checks for header files.
64 AC_HEADER_TIME
65 AC_CHECK_HEADER(ldap.h)
66 AC_EGREP_HEADER(ldap_add_ext,ldap.h,[
67     ],[
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.";
71         exit
72     ])
73 AC_CHECK_HEADER(lber.h)
74 AC_EGREP_HEADER(ber_strdup,lber.h,[
75     ],[
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.";
79         exit
80     ])
81
82 dnl Checks for typedefs, structures, and compiler characteristics.
83
84 dnl Checks for library functions.
85
86 AC_OUTPUT(Makefile src/Makefile)