]> git.sur5r.net Git - openldap/blob - contrib/ldapc++/configure.in
1f2e51b591b6b2d039af31bfddf0c75ad7f54a57
[openldap] / contrib / ldapc++ / configure.in
1 dnl $OpenLDAP$
2
3 dnl Copyright 2000-2017 The 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 AC_COPYRIGHT([[Copyright 2000-2017 The OpenLDAP Foundation. All rights reserved.
9 Restrictions apply, see COPYRIGHT and LICENSE files.]])
10 AC_REVISION([$Id$])
11 AC_INIT(ldapcpplib, [] , [http://www.openldap.org/its/] )
12 AC_CONFIG_SRCDIR(src/LDAPConnection.h)
13 AM_INIT_AUTOMAKE(foreign)
14 AM_CONFIG_HEADER(src/config.h)
15
16 eval `$ac_aux_dir/version.sh`
17 if test -z "$OL_CPP_API_RELEASE"; then
18         AC_MSG_ERROR([could not determine version])
19 fi
20
21 VERSION=$OL_CPP_API_RELEASE
22 OPENLDAP_CPP_API_VERSION=$OL_CPP_API_VERSION
23 AC_SUBST(VERSION)
24 AC_SUBST(OPENLDAP_CPP_API_VERSION)
25 dnl Checks for programs.
26 AC_PROG_INSTALL
27 dnl AC_PROG_CC
28 AC_PROG_CXX
29 dnl AC_PROG_RANLIB
30 dnl AM_DISABLE_SHARED
31 AC_PROG_LIBTOOL
32 dnl AC_PROG_MAKE_SET
33 AC_ARG_ENABLE(debug,[  --enable-debug],[
34         CXXFLAGS="-g -O0 -Wall"
35     AC_DEFINE(WITH_DEBUG,[],[Define to 1 ot enable debug logging])
36         ],
37 )
38
39 AC_ARG_WITH(libldap,[  --with-libldap=DIR          Path to the libldap library [/usr/local/lib]],[
40         LIBS="-L$with_libldap $LIBS "   
41         ],[
42         LIBS="-L/usr/local/lib $LIBS "  
43         ]
44 )
45
46 AC_ARG_WITH(ldap-includes,[  --with-ldap-includes=DIR    Path to the libldap include files [/usr/local/include]],[
47         CPPFLAGS="-I$with_ldap_includes $CPPFLAGS "     
48         ],[
49         CPPFLAGS="-I/usr/local/include $CPPFLAGS "
50         ]
51 )
52 dnl Checks for libraries.
53 AC_CHECK_LIB(resolv,main)
54 AC_CHECK_LIB(lber,ber_strdup,[
55 dnl NOOP
56         :
57     ],[
58         echo "        didn't find ber_strdup in liblber !";
59         echo "        Check for the right version (>= 2.0) of the OpenLDAP libraries";
60         echo "        or try the --with-libldap option.";
61         exit
62     ])
63 AC_CHECK_LIB(ldap,ldap_add_ext,[
64 dnl NOOP
65         :
66     ],[
67         echo "        didn't find ldap_add_ext in libldap !";
68         echo "        Check for the right version (>= 2.0) of the OpenLDAP libraries";
69         echo "        or try the --with-libldap option.";
70         exit
71     ],[
72     -llber
73     ])
74 dnl Checks for header files.
75 AC_HEADER_TIME
76 AC_CHECK_HEADERS(termios.h ldap.h)
77 AC_EGREP_HEADER(ldap_add_ext,ldap.h,[
78 dnl NOOP
79         :
80     ],[
81         echo "        didn't find ldap_add_ext in ldap.h!";
82         echo "        Check for the right version (>= 2.0) of the OpenLDAP includes";
83         echo "        or try --with-ldap-includes option.";
84         exit
85     ])
86 AC_CHECK_HEADER(lber.h)
87 AC_EGREP_HEADER(ber_strdup,lber.h,[
88 dnl NOOP
89         :
90     ],[
91         echo "        didn't find ber_strdup in lber.h!";
92         echo "        Check for the right version (>= 2.0) of the OpenLDAP includes";
93         echo "        or try --with-ldap-includes option.";
94         exit
95     ])
96
97 dnl Checks for typedefs, structures, and compiler characteristics.
98
99 dnl Checks for library functions.
100
101 AC_OUTPUT(Makefile src/Makefile examples/Makefile)