|
1 AC_INIT(lib/mergelib.sh) |
|
2 AM_INIT_AUTOMAKE(vmailmgr, 0.96.9) |
|
3 AM_CONFIG_HEADER(config.h) |
|
4 AC_PROG_MAKE_SET |
|
5 |
|
6 USE_CRYPT=no |
|
7 AC_ARG_ENABLE(crypt, |
|
8 [ --enable-crypt Use only crypt(3) for authentication instead |
|
9 of the built-in MD5 password hashing.], |
|
10 USE_CRYPT=$enableval) |
|
11 test "$USE_CRYPT" != no && AC_DEFINE(USE_CRYPT) |
|
12 |
|
13 AC_ARG_WITH(krb5, |
|
14 [ --with-krb5 Use Kerberos5 for authentication.], |
|
15 [test x$withval = xyes && withval=/usr/krb5 |
|
16 LIBS="$LIBS -L$withval/lib -lkrb5 -lcom_err -lcrypto" |
|
17 CFLAGS="$CFLAGS -I${withval}/include" |
|
18 CXXFLAGS="$CXXFLAGS -I${withval}/include" |
|
19 AC_DEFINE(USE_KRB5)]) |
|
20 AM_CONDITIONAL(KRB5, test x$with_krb5 != x -a x$with_krb5 != xno) |
|
21 |
|
22 AC_ARG_WITH(vpwtable, |
|
23 [ --with-vpwtable=type Use "type" database for storage of virtual |
|
24 password tables. Defaults to "cdb".], |
|
25 [case "${withval}" in |
|
26 gdbm) AC_DEFINE(VPWTABLE_GDBM) |
|
27 dbtype=gdbm |
|
28 LIBS="$LIBS -lgdbm";; |
|
29 *) AC_MSG_ERROR(bad value ${withval} for --with-vpwtable);; |
|
30 esac],[AC_DEFINE(VPWTABLE_CDB) |
|
31 CDBPROGS="vpasswd2cdb vrehash" |
|
32 CDBSCRIPTS="allvpasswd2cdb" |
|
33 dbtype=cdb]) |
|
34 |
|
35 AC_SUBST(CDBPROGS) |
|
36 AC_SUBST(CDBSCRIPTS) |
|
37 AM_CONDITIONAL(VPWTABLE_CDB, test $dbtype = cdb) |
|
38 AM_CONDITIONAL(VPWTABLE_GDBM, test $dbtype = gdbm) |
|
39 |
|
40 AM_CONDITIONAL(FDBUF_NO_MYSTRING, false) |
|
41 |
|
42 dnl Checks for programs. |
|
43 AC_PROG_CC |
|
44 AC_PROG_CXX |
|
45 CXX_NO_RTTI |
|
46 CXX_NO_EXCEPTIONS |
|
47 |
|
48 CFLAGS="$CFLAGS -Wall -W" |
|
49 CXXFLAGS="$CXXFLAGS -Wall -W" |
|
50 |
|
51 AC_PROG_INSTALL |
|
52 AC_PROG_RANLIB |
|
53 AC_PATH_PROG(STRIP, strip) |
|
54 AC_PATH_PROG(RM, rm) |
|
55 AC_PATH_PROG(MKDIR, mkdir) |
|
56 AC_PATH_PROG(LN, ln) |
|
57 |
|
58 AC_PATH_PROG(PYTHON, python) |
|
59 AC_CACHE_CHECK(Python library path, local_cv_python_lib_dir, |
|
60 [[if test -x "$PYTHON"; then |
|
61 local_cv_python_lib_dir=`$PYTHON -c "import sys;print sys.path[1]"` |
|
62 else |
|
63 local_cv_python_lib_dir=NONE |
|
64 fi]]) |
|
65 pythonlibdir="$local_cv_python_lib_dir/vmailmgr" |
|
66 AC_SUBST(pythonlibdir) |
|
67 AM_CONDITIONAL(WANTPYTHON, test x$local_cv_python_lib_dir != xNONE) |
|
68 |
|
69 phpdir="/home/httpd/php" |
|
70 AC_SUBST(phpdir) |
|
71 |
|
72 AC_PATH_PROG(W3M, w3m) |
|
73 AC_PATH_PROG(LYNX, lynx) |
|
74 if test "x$W3M" != x; then |
|
75 echo Using w3m to format html pages. |
|
76 HTML2TXT="w3m -dump" |
|
77 elif test "x$LYNX" != x; then |
|
78 echo Using lynx to format html pages. |
|
79 HTML2TXT="lynx -dump -nolist" |
|
80 else |
|
81 echo "Can't find either w3m or lynx, building the plain text" |
|
82 echo "documentation files will fail." |
|
83 HTML2TXT="false" |
|
84 fi |
|
85 AC_SUBST(HTML2TXT) |
|
86 |
|
87 TODAY=`date +%Y-%m-%d` |
|
88 POD2MAN="pod2man --release='vmailmgr ${VERSION}' --center='VMailMgr Tools Documentation' --date='${TODAY}'" |
|
89 POD2HTML="pod2html --noindex" |
|
90 SUFFIXES="$SUFFIXES .1 .5 .7 .8 .pod .html .texi .txt .ps .fig .sgml .py .pyc .pyo" |
|
91 AC_SUBST(POD2MAN) |
|
92 AC_SUBST(POD2HTML) |
|
93 AC_SUBST(SUFFIXES) |
|
94 |
|
95 dnl Checks for libraries. |
|
96 AC_CHECK_LIB(crypt, crypt) |
|
97 AC_CHECK_LIB(inet, socket) |
|
98 AC_CHECK_LIB(socket, socket) |
|
99 AC_CHECK_LIB(xnet, socket) |
|
100 |
|
101 dnl Checks for header files. |
|
102 AC_HEADER_DIRENT |
|
103 AC_HEADER_STDC |
|
104 AC_HEADER_SYS_WAIT |
|
105 AC_HEADER_TIME |
|
106 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h shadow.h crypt.h) |
|
107 |
|
108 dnl Checks for typedefs, structures, and compiler characteristics. |
|
109 AC_C_CONST |
|
110 AC_TYPE_UID_T |
|
111 AC_TYPE_SIGNAL |
|
112 AC_C_INLINE |
|
113 AC_TYPE_PID_T |
|
114 AC_TYPE_SIZE_T |
|
115 |
|
116 dnl Checks for library functions. |
|
117 AC_CHECK_FUNCS(gethostname gettimeofday mkdir putenv rmdir socket) |
|
118 AC_CHECK_FUNCS(srandom random crypt) |
|
119 |
|
120 cgidir='${prefix}/cgi-bin' |
|
121 AC_SUBST(cgidir) |
|
122 |
|
123 AC_OUTPUT(Makefile |
|
124 cgi/Makefile |
|
125 authenticate/Makefile |
|
126 commands/Makefile |
|
127 daemon/Makefile |
|
128 doc/Makefile |
|
129 lib/Makefile |
|
130 lib/cdb++/Makefile |
|
131 lib/cgi/Makefile |
|
132 lib/cli/Makefile |
|
133 lib/config/Makefile |
|
134 lib/courier-authlib/Makefile |
|
135 lib/fdbuf/Makefile |
|
136 lib/misc/Makefile |
|
137 lib/mystring/Makefile |
|
138 lib/vdomain/Makefile |
|
139 lib/vpwentry/Makefile |
|
140 lib/vpwtable/Makefile |
|
141 scripts/Makefile |
|
142 php/Makefile |
|
143 python/Makefile) |