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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
--- configure.in.orig Thu Jul 20 21:35:01 2000
+++ configure.in Sat Sep 16 13:58:02 2000
@@ -66,8 +66,9 @@
dnl check for -R, etc. switch
CMU_GUESS_RUNPATH_SWITCH
dnl let's just link against local. otherwise we never find anything useful.
-CPPFLAGS="-I/usr/local/include ${CPPFLAGS}"
-CMU_ADD_LIBPATH("/usr/local/lib")
+CPPFLAGS="-I${OPENSSLINC} -I${OPENSSLINC}/openssl ${CPPFLAGS}"
+CMU_ADD_LIBPATH("${LOCALBASE}/lib")
+CMU_ADD_LIBPATH("${OPENSSLLIB}")
AM_DISABLE_STATIC
@@ -310,6 +311,88 @@
fi
AM_CONDITIONAL(PWCHECK, test "$with_pwcheck" != no)
+dnl MySQL
+AC_ARG_WITH(mysql, [ --with-mysql=PATH enable authentication from MySQL database [no] ],
+ with_mysql=$withval,
+ with_mysql=no)
+
+if test -z "$with_mysql"; then
+ for mysqlloc in lib/mysql lib
+ do
+ if test -f ${prefix}/${mysqlloc}/libmysqlclient.a; then
+ with_mysql="${prefix}"
+ break
+ elif test -f /usr/local/${mysqlloc}/libmysqlclient.a; then
+ with_mysql="/usr/local"
+ break
+ elif test -f /usr/${mysqlloc}/libmysqlclient.a; then
+ with_mysql="/usr"
+ break
+ fi
+ done
+fi
+
+LIB_MYSQL=""
+case "$with_mysql" in
+ no) true;;
+ ""|yes) AC_CHECK_LIB(mysqlclient, mysql_select_db,
+ AC_DEFINE(HAVE_MYSQL)
+ LIB_MYSQL="-lmysqlclient",
+ with_mysql=no);;
+ *) if test -d ${with_mysql}/include/mysql; then
+ CPPFLAGS="$CPPFLAGS -I${with_mysql}/include/mysql"
+ else
+ CPPFLAGS="$CPPFLAGS -I${with_mysql}/include"
+ fi
+ if test -d ${with_mysql}/lib/mysql; then
+ LDFLAGS="$LDFLAGS -L${with_mysql}/lib/mysql"
+ fi
+ AC_DEFINE(HAVE_MYSQL)
+ LIB_MYSQL="-lmysqlclient";;
+esac
+AC_SUBST(LIB_MYSQL)
+
+dnl LDAP
+AC_ARG_WITH(ldap, [ --with-ldap=PATH enable authentication from LDAP [no] ],
+ with_ldap=$withval,
+ with_ldap=no)
+
+if test -z "$with_ldap"; then
+ for ldaploc in lib/ldap lib
+ do
+ if test -f ${prefix}/${ldaploc}/libldap.a; then
+ with_ldap="${prefix}"
+ break
+ elif test -f /usr/local/${ldaploc}/libldap.a; then
+ with_ldap="/usr/local"
+ break
+ elif test -f /usr/${ldaploc}/libldap.a; then
+ with_ldap="/usr"
+ break
+ fi
+ done
+fi
+
+LIB_LDAP=""
+case "$with_ldap" in
+ no) true;;
+ ""|yes) AC_CHECK_LIB(ldap, ldap_open,
+ AC_DEFINE(HAVE_LDAP)
+ LIB_LDAP="-lldap -llber",
+ with_ldap=no);;
+ *) if test -d ${with_ldap}/include/ldap; then
+ CPPFLAGS="${CPPFLAGS} -I${with_ldap}/include/ldap"
+ else
+ CPPFLAGS="${CPPFLAGS} -I${with_ldap}/include"
+ fi
+ if test -d ${with_ldap}/lib/ldap; then
+ LDFLAGS="$LDFLAGS -L${with_ldap}/lib/ldap"
+ fi
+ AC_DEFINE(HAVE_LDAP)
+ LIB_LDAP="-lldap -llber";;
+esac
+AC_SUBST(LIB_LDAP)
+
dnl CRAM-MD5
AC_ARG_ENABLE(cram, [ --enable-cram enable CRAM-MD5 authentication [yes] ],
cram=$enableval,
@@ -434,11 +517,15 @@
fi
if test "$with_des" != no; then
+ case "$host_os" in
+ freebsd*)
+ COM_ERR="-lcom_err"
+ ;;
+ esac
AC_CHECK_HEADER(krb.h,
- AC_CHECK_LIB(krb, krb_mk_priv, COM_ERR="",
- AC_CHECK_LIB(krb, krb_mk_priv, COM_ERR="-lcom_err",
- AC_WARN(No Kerberos V4 found); krb4=no, -ldes -lcom_err),
- -ldes),
+ AC_CHECK_LIB(krb, krb_mk_priv,:,
+ AC_WARN(No Kerberos V4 found); krb4=no,
+ -ldes $COM_ERR),
AC_WARN(No Kerberos V4 found); krb4=no)
else
AC_WARN(No DES library found for Kerberos V4 support)
|