annotate configure.ac @ 203:45acc5727493

removed --with-glib-static configure option linking glib statically is interesting if no other program uses it on today's systems glib is widely used if one cares on linking statically, he can link everything statically the special case for glib will not get special care anymore
author meillo@marmaro.de
date Fri, 16 Jul 2010 14:48:17 +0200
parents bd9704417d49
children 5745edd5b769
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
1 dnl Process this file with autoconf to produce a configure script.
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
2
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
3 AC_PREREQ(2.59)
159
27363b36a28c next version will be 0.3.0
meillo@marmaro.de
parents: 151
diff changeset
4 AC_INIT(masqmail, 0.3.0, meillo@marmaro.de)
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
5 AC_CONFIG_SRCDIR([src/masqmail.c])
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
6 AM_CONFIG_HEADER(config.h)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
7 AM_INIT_AUTOMAKE()
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
8
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
9 dnl Checks for programs.
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
10
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
11 dnl Checks for libraries.
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
12
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
13 AC_PROG_CC
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
14 AC_ISC_POSIX
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
15 AC_STDC_HEADERS
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
16 dnl AC_ARG_PROGRAM
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
17 AC_PROG_RANLIB
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
18
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
19 PKG_CHECK_MODULES(GLIB, glib-2.0)
181
8b17ea9fd17b added comments on how to compile with glib-1.2
meillo@marmaro.de
parents: 175
diff changeset
20 dnl # use the next line to use glib-1.2
8b17ea9fd17b added comments on how to compile with glib-1.2
meillo@marmaro.de
parents: 175
diff changeset
21 dnl PKG_CHECK_MODULES(GLIB, glib)
8b17ea9fd17b added comments on how to compile with glib-1.2
meillo@marmaro.de
parents: 175
diff changeset
22
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
23 AC_SUBST(GLIB_LIBS)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
24 AC_SUBST(GLIB_CFLAGS)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
25
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
26 dnl resolver support (default is use it)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
27 AC_ARG_ENABLE(resolver,
193
bd9704417d49 typographic fix: alignments in configure -h
meillo@marmaro.de
parents: 192
diff changeset
28 [ --disable-resolver disable resolver support],
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
29 if test "$enable_resolver" != 'no'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
30 resolver_enabled='yes'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
31 fi,
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
32 resolver_enabled='yes'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
33 )
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
34
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
35 if test "$resolver_enabled" = yes; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
36 AC_DEFINE(ENABLE_RESOLVER, 1, [If the resolver is to be used])
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
37 dnl checks necessary for libc5:
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
38 dnl if there is res_search in libc, it is probably libc5
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
39 dnl if not, it is probably libc6 and we need libresolv
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
40 AC_CHECK_LIB(c, res_search, need_resolv=no, need_resolv=yes)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
41 if test "$need_resolv" = yes; then
1
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
42 AC_CHECK_LIB(resolv, res_search,
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
43 has_resolv=yes; RESOLV_LIBS="-lresolv",
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
44 has_resolv=no)
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
45 if test "$has_resolv" = no; then
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
46 saved_LIBS="$LIBS"
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
47 LIBS="$LIBS -lresolv"
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
48 AC_MSG_CHECKING(for res_search in -lresolv)
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
49 AC_TRY_LINK([#include <resolv.h>],
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
50 [res_search (0, 0, 0, 0, 0);],
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
51 RESOLV_LIBS="-lresolv"; has_resolv=yes; AC_MSG_RESULT(yes),
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
52 AC_MSG_RESULT(no));
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
53 LIBS="$saved_LIBS"
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
54 fi
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
55 if test "$has_resolv" = no; then
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
56 AC_MSG_ERROR("no libresolv")
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
57 RESOLV_LIBS=''
af25f5c39d90 added diff from debian (masqmail-0.2.21-4)
meillo@marmaro.de
parents: 0
diff changeset
58 fi
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
59 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
60 else
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
61 RESOLV_LIBS=''
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
62 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
63 AC_SUBST(RESOLV_LIBS)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
64
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
65 dnl if there is no getline, we define it using getdelim in src/masqmail.h
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
66 AC_CHECK_FUNCS(getline)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
67
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
68 dnl if there is no fdatasync, we define it to fsync in src/masqmail.h
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
69 AC_CHECK_FUNCS(fdatasync)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
70
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
71 dnl Checks for header files.
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
72 AC_HEADER_STDC
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
73 AC_CHECK_HEADERS(fcntl.h sys/time.h syslog.h unistd.h)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
74
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
75 dnl Checks for typedefs, structures, and compiler characteristics.
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
76 AC_C_CONST
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
77 AC_TYPE_PID_T
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
78 AC_TYPE_SIZE_T
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
79 AC_HEADER_TIME
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
80 AC_STRUCT_TM
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
81
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
82 dnl Checks for library functions.
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
83 AC_FUNC_FNMATCH
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
84 AC_TYPE_SIGNAL
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
85 AC_FUNC_STRFTIME
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
86 AC_FUNC_VPRINTF
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
87 AC_CHECK_FUNCS(select socket strerror strstr)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
88
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
89 dnl user and group configuration
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
90 AC_ARG_WITH(user,
193
bd9704417d49 typographic fix: alignments in configure -h
meillo@marmaro.de
parents: 192
diff changeset
91 [ --with-user=USER set user [mail]],
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
92 )
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
93 if test "x$with_user" = 'x'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
94 with_user='mail'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
95 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
96
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
97 AC_ARG_WITH(group,
193
bd9704417d49 typographic fix: alignments in configure -h
meillo@marmaro.de
parents: 192
diff changeset
98 [ --with-group=GROUP set group [trusted]],
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
99 )
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
100 if test "x$with_group" = 'x'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
101 with_group='trusted'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
102 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
103
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
104 dnl debugging support (default is use it)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
105 AC_ARG_ENABLE(debug,
193
bd9704417d49 typographic fix: alignments in configure -h
meillo@marmaro.de
parents: 192
diff changeset
106 [ --disable-debug disable debugging],
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
107 if test "x$enable_debug" != 'xno'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
108 debug_enabled='yes'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
109 fi,
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
110 debug_enabled='yes'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
111 )
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
112 if test "x$debug_enabled" = xyes; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
113 AC_DEFINE(ENABLE_DEBUG, 1, [If debugging is enabled])
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
114 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
115
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
116 AC_DEFINE_UNQUOTED(DEF_MAIL_USER, "${with_user}", [The mail user])
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
117 AC_SUBST(with_user)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
118 AC_DEFINE_UNQUOTED(DEF_MAIL_GROUP, "${with_group}", [The mail group])
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
119 AC_SUBST(with_group)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
120
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
121 dnl optional features
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
122 MD5_LIBS=''
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
123 BASE64_LIBS=''
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
124
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
125 dnl smtp server support (default is use it)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
126 AC_ARG_ENABLE(smtp_server,
193
bd9704417d49 typographic fix: alignments in configure -h
meillo@marmaro.de
parents: 192
diff changeset
127 [ --disable-smtp-server disable smtp server support],
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
128 if test "x$enable_smtp_server" != 'xno'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
129 smtp_server_enabled='yes'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
130 fi,
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
131 smtp_server_enabled='yes'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
132 )
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
133 if test "x$smtp_server_enabled" = xyes; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
134 AC_DEFINE(ENABLE_SMTP_SERVER, 1, [If the SMTP server is enabled])
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
135 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
136
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
137 dnl auth support (default is to not use it)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
138 AC_ARG_ENABLE(auth,
193
bd9704417d49 typographic fix: alignments in configure -h
meillo@marmaro.de
parents: 192
diff changeset
139 [ --enable-auth enable AUTH (RFC 2554) client support],
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
140 if test "x$enable_auth" != 'xno'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
141 auth_enabled='yes'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
142 fi,
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
143 )
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
144 if test "x$auth_enabled" = xyes; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
145 AC_DEFINE(ENABLE_AUTH, 1, [If AUTH is enabled])
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
146 BASE64_LIBS='base64/libbase64.a'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
147 # MD5_LIBS='md5/libmd5c.a'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
148 need_md5='yes'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
149 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
150 AC_SUBST(BASE64_LIBS)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
151
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
152 dnl maildir support (default is to not use it)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
153 AC_ARG_ENABLE(maildir,
193
bd9704417d49 typographic fix: alignments in configure -h
meillo@marmaro.de
parents: 192
diff changeset
154 [ --enable-maildir enable qmail style maildir support],
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
155 if test "x$enable_maildir" != 'xno'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
156 maildir_enabled='yes'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
157 fi,
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
158 )
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
159 if test "x$maildir_enabled" = xyes; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
160 AC_DEFINE(ENABLE_MAILDIR, 1, [If Maildirs are enabled])
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
161 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
162
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
163 dnl libcrypto
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
164 AC_ARG_WITH(libcrypto,
193
bd9704417d49 typographic fix: alignments in configure -h
meillo@marmaro.de
parents: 192
diff changeset
165 [ --with-libcrypto use libcrypto],
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
166 )
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
167 if test "x$with_libcrypto" != 'xyes'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
168 with_libcrypto='no'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
169 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
170
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
171 if test "x$need_md5" = 'xyes'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
172 dnl check whether we have md5 in libcrypto if md5 needed and we shall link with libcrypto
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
173 if test "x$with_libcrypto" = "xyes"; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
174 AC_CHECK_LIB(crypto, MD5, has_crypto='yes', AC_MSG_ERROR('no libcrypto'))
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
175 if test "x$has_crypto" = 'xyes'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
176 AC_DEFINE(USE_LIB_CRYPTO, 1, [If libcrypto is available])
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
177 MD5_LIBS='-lcrypto'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
178 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
179 else
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
180 MD5_LIBS='md5/libmd5c.a'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
181 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
182 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
183 AC_SUBST(MD5_LIBS)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
184
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
185 dnl ident support (default is to not use it)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
186 IDENT_LIBS=''
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
187 AC_ARG_ENABLE(ident,
193
bd9704417d49 typographic fix: alignments in configure -h
meillo@marmaro.de
parents: 192
diff changeset
188 [ --enable-ident enable ident (RFC 1413) support],
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
189 if test "x$enable_ident" != 'xno'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
190 ident_enabled='yes'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
191 fi,
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
192 )
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
193 AC_SUBST(has_ident)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
194 if test "x$ident_enabled" = xyes; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
195 AC_DEFINE(ENABLE_IDENT, 1, [If ident is enabled])
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
196 AC_CHECK_LIB(ident, ident_id, IDENT_LIBS='-lident', IDENT_LIBS='libident/libident.a')
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
197 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
198 AC_SUBST(IDENT_LIBS)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
199
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
200 dnl liblockfile
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
201 AC_ARG_WITH(liblockfile,
193
bd9704417d49 typographic fix: alignments in configure -h
meillo@marmaro.de
parents: 192
diff changeset
202 [ --with-liblockfile use liblock (for Debian)],
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
203 )
173
4917e764f108 Fix handling of --with-liblockfile=no or --without-liblockfile
meillo@marmaro.de
parents: 123
diff changeset
204 if test "x$with_liblockfile" = 'xno'; then
4917e764f108 Fix handling of --with-liblockfile=no or --without-liblockfile
meillo@marmaro.de
parents: 123
diff changeset
205 with_liblockfile=''
4917e764f108 Fix handling of --with-liblockfile=no or --without-liblockfile
meillo@marmaro.de
parents: 123
diff changeset
206 fi
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
207 if test "x$with_liblockfile" != 'x'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
208 with_liblockfile='yes'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
209 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
210 if test "x$with_liblockfile" = xyes; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
211 AC_CHECK_LIB(lockfile, maillock, has_lockfile=yes, AC_MSG_ERROR("no liblockfile"))
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
212 LOCKFILE_LIBS='-llockfile'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
213 AC_DEFINE(USE_LIBLOCKFILE, 1, [If liblockfile is to be used])
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
214 else
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
215 LOCKFILE_LIBS=''
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
216 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
217 AC_SUBST(LOCKFILE_LIBS)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
218 AC_SUBST(USE_LIBLOCKFILE)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
219
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
220 dnl log and spool directories
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
221 AC_ARG_WITH(logdir,
193
bd9704417d49 typographic fix: alignments in configure -h
meillo@marmaro.de
parents: 192
diff changeset
222 [ --with-logdir=DIR set log directory [/var/log/masqmail]],
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
223 ,
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
224 with_logdir='/var/log/masqmail/'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
225 )
151
e20fe8c9936a default values for logdir and spooldir
meillo@marmaro.de
parents: 123
diff changeset
226 AC_DEFINE_UNQUOTED(LOG_DIR, "${with_logdir}", [The log directory])
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
227 AC_SUBST(with_logdir)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
228
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
229 AC_ARG_WITH(spooldir,
193
bd9704417d49 typographic fix: alignments in configure -h
meillo@marmaro.de
parents: 192
diff changeset
230 [ --with-spooldir=DIR set spool directory [/var/spool/masqmail]],
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
231 ,
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
232 with_spooldir='/var/spool/masqmail/'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
233 )
151
e20fe8c9936a default values for logdir and spooldir
meillo@marmaro.de
parents: 123
diff changeset
234 AC_DEFINE_UNQUOTED(SPOOL_DIR, "${with_spooldir}", [The spool directory])
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
235 AC_SUBST(with_spooldir)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
236
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
237 dnl configuration file
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
238 AC_ARG_WITH(confdir,
193
bd9704417d49 typographic fix: alignments in configure -h
meillo@marmaro.de
parents: 192
diff changeset
239 [ --with-confdir directory for configuration [/etc/masqmail]],
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
240 ,
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
241 with_confdir='/etc/masqmail'
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
242 )
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
243 AC_DEFINE_UNQUOTED(CONF_DIR, "${with_confdir}", [The configuration file location])
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
244 AC_SUBST(with_confdir)
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
245
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
246 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
35
9bf8b9f0f09d fixed unexpanded $prefix in template paths
meillo@marmaro.de
parents: 4
diff changeset
247
9bf8b9f0f09d fixed unexpanded $prefix in template paths
meillo@marmaro.de
parents: 4
diff changeset
248 dnl well, /me/ thought that autoconf should make things _easy_ ... -- oku
9bf8b9f0f09d fixed unexpanded $prefix in template paths
meillo@marmaro.de
parents: 4
diff changeset
249 dnl I needed the two `eval's to get the variable expanded in all cases -- meillo
9bf8b9f0f09d fixed unexpanded $prefix in template paths
meillo@marmaro.de
parents: 4
diff changeset
250 dnl this is just horrible! -- meillo
9bf8b9f0f09d fixed unexpanded $prefix in template paths
meillo@marmaro.de
parents: 4
diff changeset
251 AC_DEFINE_UNQUOTED(DATA_DIR, "`eval eval echo $datadir`/masqmail", [The data directory])
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
252
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
253 dnl gymnastics to get the correct path where masqmail should be installed
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
254 dnl we need this to call ourselves in failmsg.c
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
255 if test "x${exec_prefix}" != 'xNONE'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
256 AC_DEFINE_UNQUOTED(SBINDIR, "${exec_prefix}/sbin", [The sbin directory])
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
257 else
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
258 if test "x${prefix}" != 'xNONE'; then
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
259 AC_DEFINE_UNQUOTED(SBINDIR, "${prefix}/sbin")
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
260 else
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
261 AC_DEFINE_UNQUOTED(SBINDIR, "/usr/sbin")
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
262 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
263 fi
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
264
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
265 AC_OUTPUT(Makefile \
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
266 src/Makefile \
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
267 src/base64/Makefile \
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
268 src/md5/Makefile \
55
185ba6c0e6f0 install man pages again, patch by Juergen Daubert
meillo@marmaro.de
parents: 52
diff changeset
269 src/libident/Makefile \
57
ed34413652fc moved man pages from docs/ to man/
meillo@marmaro.de
parents: 55
diff changeset
270 man/Makefile
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
271 )