-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfigure.ac
134 lines (115 loc) · 3.94 KB
/
configure.ac
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
124
125
126
127
128
129
130
131
132
133
134
# configure.in: Autoconfigure input file for mailfilter
#
# Copyright (c) 2000 - 2022 Andreas Bauer <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a configuration
# script generated by Autoconf, you may include it under the same
# distribution terms that you use for the rest of that program.
#
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.71])
AC_INIT([mailfilter],[0.8.9],[[email protected]])
AC_REVISION($Revision: 1.1.2.4.2.12 $)
AC_SUBST(PACKAGE_COPYRIGHT)
AC_DEFINE(PACKAGE_COPYRIGHT,
"Copyright (c) 2000 - 2022 Andreas Bauer <[email protected]>",
[Copyright information.])
AC_COPYRIGHT(Copyright (c) 2000 - 2022 Andreas Bauer <[email protected]>)
AC_CONFIG_SRCDIR([src/mailfilter.cc])
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
# Checks for programs.
AC_PROG_AWK
AC_PROG_CXX
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_YACC
AS_IF([test x"$YACC" == x"yacc"], [AC_MSG_ERROR([Please install bison or byacc before configuring.])])
AC_PROG_LEX(noyywrap)
AS_IF([test x"$LEX" == x":"], [AC_MSG_ERROR([Please install flex before configuring.])])
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h \
wordexp.h \
fcntl.h \
inttypes.h \
libintl.h \
locale.h \
netdb.h \
netinet/in.h \
stdlib.h \
string.h \
sys/socket.h \
sys/time.h \
unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_CHECK_FUNC(getopt_long,
[AC_DEFINE(HAVE_GETOPT_H,1,
[Define this if there is a system getopt.h header])
AM_CONDITIONAL([GETOPT], true)],
[AC_MSG_RESULT(Using included getopt header)
AM_CONDITIONAL([GETOPT], false)])
# Checks for library (functions).
AC_CHECK_LIB(socket,connect)
AC_CHECK_LIB(nsl,gethostbyname)
AC_CHECK_LIB(regex,regcomp)
AC_ARG_WITH(openssl, [ --with-openssl use OpenSSL (default="yes")])
if test "$with_openssl" != "no" ; then
AC_CHECK_LIB(crypto,BIO_new)
AC_CHECK_LIB(ssl,SSL_new)
AC_DEFINE([USE_SSL],[1],
[Is set if SSL encryption via OpenSSL is desired.])
fi
AC_CHECK_FUNCS([alarm \
gethostbyname \
gettimeofday \
memset \
regcomp \
select \
setlocale \
socket \
strcasecmp \
strdup \
snprintf \
strerror])
# Usually this should not be changed.
AC_DEFINE(PREVIEW_COMMAND, "TOP %d 0\r\n",
[Define different only if you really know what you're doing!])
# File names for mailfilter's preferences
AC_DEFINE(RC_FILE_NAME, "/.mailfilterrc",
[.mailfilterrc is for Unix users.])
AC_DEFINE(RC_FILE_NAME_WIN, "/_mailfilterrc",
[_mailfilterrc is for Windows users.])
AC_DEFINE(HOME_ENV, "HOME",
[Most likely your home directory is stored in $HOME.])
AC_CONFIG_FILES([Makefile \
mailfilter.spec \
src/Makefile \
man/Makefile \
doc/Makefile \
contrib/Makefile \
doc/Doxyfile])
AC_OUTPUT
cat <<EOF
$PACKAGE_NAME $PACKAGE_VERSION configured.
You can now type \`gmake' to compile $PACKAGE_NAME.
If \`gmake' is not available on your system, try \`make' instead.
EOF