summaryrefslogtreecommitdiffstats
path: root/contrib/ldapc++/configure.in
blob: bc1947f1aa2775bcbfd66d4946ffe0b67e2e8136 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
dnl $OpenLDAP$

dnl Copyright 2000-2021 The OpenLDAP Foundation. All Rights Reserved.
dnl COPYING RESTRICTIONS APPLY, see COPYRIGHT file

dnl Process this file with autoconf to produce a configure script.

AC_COPYRIGHT([[Copyright 2000-2021 The OpenLDAP Foundation. All rights reserved.
Restrictions apply, see COPYRIGHT and LICENSE files.]])
AC_REVISION([$Id: 9e53b7243116521c824456d5fb2d4d3c358c0d76 $])
AC_INIT(ldapcpplib, [] , [http://www.openldap.org/its/] )
AC_CONFIG_SRCDIR(src/LDAPConnection.h)
AM_INIT_AUTOMAKE(foreign)
AM_CONFIG_HEADER(src/config.h)

eval `$ac_aux_dir/version.sh`
if test -z "$OL_CPP_API_RELEASE"; then
        AC_MSG_ERROR([could not determine version])
fi

VERSION=$OL_CPP_API_RELEASE
OPENLDAP_CPP_API_VERSION=$OL_CPP_API_VERSION
AC_SUBST(VERSION)
AC_SUBST(OPENLDAP_CPP_API_VERSION)
dnl Checks for programs.
AC_PROG_INSTALL
dnl AC_PROG_CC
AC_PROG_CXX
dnl AC_PROG_RANLIB
dnl AM_DISABLE_SHARED
AC_PROG_LIBTOOL
dnl AC_PROG_MAKE_SET
AC_ARG_ENABLE(debug,[  --enable-debug],[
	CXXFLAGS="-g -O0 -Wall"
    AC_DEFINE(WITH_DEBUG,[],[Define to 1 ot enable debug logging])
	],
)

AC_ARG_WITH(libldap,[  --with-libldap=DIR          Path to the libldap library [/usr/local/lib]],[
	LIBS="-L$with_libldap $LIBS "	
	],[
	LIBS="-L/usr/local/lib $LIBS "	
	]
)

AC_ARG_WITH(ldap-includes,[  --with-ldap-includes=DIR    Path to the libldap include files [/usr/local/include]],[
	CPPFLAGS="-I$with_ldap_includes $CPPFLAGS "	
	],[
	CPPFLAGS="-I/usr/local/include $CPPFLAGS "
	]
)
dnl Checks for libraries.
AC_CHECK_LIB(resolv,main)
AC_CHECK_LIB(lber,ber_strdup,[
dnl NOOP
        :
    ],[
        echo "        didn't find ber_strdup in liblber !";
        echo "        Check for the right version (>= 2.0) of the OpenLDAP libraries";
        echo "        or try the --with-libldap option.";
        exit
    ])
AC_CHECK_LIB(ldap,ldap_add_ext,[
dnl NOOP
        :
    ],[
        echo "        didn't find ldap_add_ext in libldap !";
        echo "        Check for the right version (>= 2.0) of the OpenLDAP libraries";
        echo "        or try the --with-libldap option.";
        exit
    ],[
    -llber
    ])
dnl Checks for header files.
AC_HEADER_TIME
AC_CHECK_HEADERS(termios.h ldap.h)
AC_EGREP_HEADER(ldap_add_ext,ldap.h,[
dnl NOOP
        :
    ],[
        echo "        didn't find ldap_add_ext in ldap.h!";
        echo "        Check for the right version (>= 2.0) of the OpenLDAP includes";
        echo "        or try --with-ldap-includes option.";
        exit
    ])
AC_CHECK_HEADER(lber.h)
AC_EGREP_HEADER(ber_strdup,lber.h,[
dnl NOOP
        :
    ],[
        echo "        didn't find ber_strdup in lber.h!";
        echo "        Check for the right version (>= 2.0) of the OpenLDAP includes";
        echo "        or try --with-ldap-includes option.";
        exit
    ])

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.

AC_OUTPUT(Makefile src/Makefile examples/Makefile)