-
Notifications
You must be signed in to change notification settings - Fork 5
/
configure.in
62 lines (46 loc) · 1.81 KB
/
configure.in
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
m4_define([openvpnldapauth_version_major],[0])
m4_define([openvpnldapauth_version_minor],[0])
m4_define([openvpnldapauth_version_micro],[6])
m4_define([openvpnldapauth_version_extra],[])
m4_define([openvpnldapauth_version],[openvpnldapauth_version_major().openvpnldapauth_version_minor().openvpnldapauth_version_micro()openvpnldapauth_version_extra()])
AC_INIT([OpenVPN LDAP Auth],[openvpnldapauth_version()],[[email protected]],[openvpn-ldap-auth])
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])
AC_CONFIG_SRCDIR([Makefile.am])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([$PACKAGE], [$VERSION])
AC_PROG_LIBTOOL
dnl AC_PROG_RANLIB
dnl LT_INIT
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
CFLAGS="${CFLAGS} -g -Wall -Werror"
AC_SUBST(CFLAGS)
AC_ARG_ENABLE(ldapuserconfig,
[ --disable-ldapuserconfig, Disable user ldap settings],
[LDAP_USER_CONF="$enableval"],
[LDAP_USER_CONF="yes"]
)
dnl enable ldapuserconfig
if test "$LDAP_USER_CONF" = "yes"; then
AC_DEFINE(ENABLE_LDAPUSERCONF, 1, [Enable user ldap settings])
fi
AC_CHECK_HEADER([ldap.h],
[AC_CHECK_LIB(ldap, [ldap_initialize])],
[AC_MSG_ERROR("ldap headers not found")])
AC_CHECK_HEADER([lber.h],
[AC_CHECK_LIB(lber, [ber_free])],
[AC_MSG_ERROR("lber headers not found")])
AC_CHECK_HEADER([pthread.h],
[AC_CHECK_LIB(pthread, [pthread_create])],
[AC_MSG_ERROR("pthread headers not found")])
AC_CHECK_HEADERS([syslog.h sys/resource.h ])
AC_CHECK_FUNCS([getrlimit])
AC_PROG_INSTALL
AC_OUTPUT( Makefile src/Makefile tests/Makefile )
echo "
Configuration:
Source code location: ${srcdir}
Lib install dir: ${prefix}/lib
Compiler: ${CXX}
LDAP user conf: ${LDAP_USER_CONF}
"