]>
Commit | Line | Data |
---|---|---|
d5b3339f | 1 | dnl Process this file with autoconf to produce a configure script. |
96f78544 | 2 | AC_INIT(bopm, [3.0]) |
2c75ac1f | 3 | AC_CONFIG_SRCDIR(src/opercmd.h) |
2c75ac1f | 4 | AM_CONFIG_HEADER(src/setup.h) |
273c4d04 | 5 | AM_INIT_AUTOMAKE() |
2c75ac1f | 6 | AC_PREFIX_DEFAULT([\${HOME}/bopm]) |
f2f317e5 | 7 | AM_MAINTAINER_MODE |
d5b3339f | 8 | |
2c75ac1f | 9 | AC_ARG_WITH(select, |
273c4d04 | 10 | AC_HELP_STRING([--with-select], [use select() instead of poll()]), |
11 | [with_select="yes"], [with_select="no"]) | |
2c75ac1f | 12 | AC_ARG_WITH(unreal, |
273c4d04 | 13 | AC_HELP_STRING([--with-unreal], |
14 | [you need this if you are using Unreal ircd (any version)]), | |
15 | [with_unreal="yes"], [with_unreal="no"]) | |
59950ee6 | 16 | AC_ARG_WITH(extra-fascism, |
17 | AC_HELP_STRING([--with-extra-fascism], | |
18 | [Add extra gcc3-specific warning flags]), | |
19 | [CFLAGS="$CFLAGS -g -ggdb -O0 -W -Wfloat-equal -Wbad-function-cast -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs"]) | |
20 | ||
5bd052df | 21 | |
c185a5dd | 22 | dnl ipv6? |
23 | AC_ARG_ENABLE(ipv6, | |
273c4d04 | 24 | AC_HELP_STRING([--enable-ipv6], [Enable IPV6 support]), |
25 | [ac_cv_ipv6=$enableval], [ac_cv_ipv6="no"]) | |
26 | ||
27 | AC_MSG_CHECKING([whether to enable IPv6 features]) | |
c185a5dd | 28 | |
29 | if test "$ac_cv_ipv6" = "yes" ; then | |
273c4d04 | 30 | AC_DEFINE(IPV6, 1, [Use Ipv6 Support]) |
31 | AC_MSG_RESULT([yes]) | |
32 | else | |
33 | AC_MSG_RESULT([no]) | |
c185a5dd | 34 | fi |
35 | ||
d5b3339f | 36 | dnl Checks for programs. |
37 | AC_PROG_CC | |
38 | ||
39 | dnl Checks for libraries. | |
40 | ||
41 | dnl Checks for header files. | |
42 | AC_HEADER_STDC | |
5bd052df | 43 | |
44 | if test "$with_select" = "yes"; then | |
45 | echo "use of select() forced, skipping poll() checks..." | |
10891472 | 46 | AC_DEFINE(WITH_SELECT, 1, [Define if you wish to force use of select() even when poll() may be present]) |
5bd052df | 47 | else |
c99ff383 | 48 | AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no) |
5bd052df | 49 | fi |
50 | ||
eedb8c58 | 51 | if test "$with_unreal" = "yes"; then |
52 | echo "configuring for Unreal ircd" | |
10891472 | 53 | AC_DEFINE(WITH_UNREAL, 1, [Define if you are using Unreal ircd (any version)]) |
eedb8c58 | 54 | fi |
55 | ||
cc2baf42 | 56 | AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h) |
d5b3339f | 57 | |
58 | dnl Checks for typedefs, structures, and compiler characteristics. | |
59 | AC_C_CONST | |
60 | AC_TYPE_SIZE_T | |
61 | AC_HEADER_TIME | |
62 | AC_STRUCT_TM | |
63 | ||
64 | dnl Checks for library functions. | |
65 | AC_TYPE_SIGNAL | |
66 | AC_FUNC_STRFTIME | |
5bd052df | 67 | |
d104a616 | 68 | dnl check for yacc |
69 | AC_PROG_INSTALL | |
70 | AC_PROG_YACC | |
71 | ||
72 | dnl check for lexx | |
73 | AM_PROG_LEX | |
74 | ||
75 | ||
76 | ||
5bd052df | 77 | dnl if they want select() or they don't have poll() then we need to check |
78 | dnl that we actually have select() | |
79 | if test "$with_select" = "yes" || test "$have_sys_poll_h" = "no"; then | |
80 | AC_CHECK_FUNCS(select, have_select=yes, have_select=no) | |
81 | if test "$have_select" = "no"; then | |
82 | AC_MSG_ERROR([No select() implementation found]) | |
83 | fi | |
84 | fi | |
85 | ||
e646634b | 86 | AC_CHECK_FUNCS(inet_aton inet_pton socket strdup strstr) |
d5b3339f | 87 | |
c185a5dd | 88 | dnl Check if we can use gethostbyname2 for ipv6 |
89 | AC_CHECK_FUNCS(gethostbyname gethostbyname2) | |
90 | ||
1122cc60 | 91 | dnl AIX fun |
92 | AC_C_BIGENDIAN | |
93 | ||
cc2baf42 | 94 | dnl Solaris has to be weird doesn't it... |
95 | AC_CHECK_LIB(socket, socket, AC_SUBST(LSOCKET, [-lsocket])) | |
96 | AC_CHECK_LIB(nsl, gethostbyname, AC_SUBST(LNSL, [-lnsl])) | |
97 | ||
580e6f7d | 98 | dnl teehee - taken from MRTG / Tobias Oetiker |
c8b56db0 | 99 | echo $ECHO_N "checking for POSIX-compliant goat $ECHO_C" |
580e6f7d | 100 | for bleh in 1 2 3; do |
13579374 | 101 | echo $ECHO_N ".\a" |
580e6f7d | 102 | sleep 1 |
103 | done | |
104 | AC_MSG_RESULT([ http://www.blitzed.org/goat_winter_2001.phtml]) | |
5bd052df | 105 | |
205810b2 | 106 | AC_CONFIG_SUBDIRS(src/libopm) |
2c75ac1f | 107 | AC_OUTPUT(Makefile src/Makefile) |
580e6f7d | 108 | |
99f4c865 | 109 | echo "##############################################################################" |
2c75ac1f | 110 | echo "Everything is now configured, but you can find some more (infrequently" |
111 | echo "changed) options in options.h. To compile BOPM now, just type make. It" | |
112 | echo "requires GNU Make, which may be installed as gmake on your system." | |
113 | echo | |
114 | echo "bopm will be installed in ${prefix}. To change this, run:" | |
115 | echo " ./configure --prefix=DIRECTORY" | |
116 | echo | |
117 | echo "If possible, PLEASE CONTRIBUTE TO OUR DNSBL BY REPORTING YOUR PROXIES!!" | |
118 | echo | |
119 | echo "o What is DNSBL?" | |
120 | echo " It's the database of open proxies we provide and your BOPM checks" | |
121 | echo " against BEFORE bothering to scan the client, therefore killing KNOWN" | |
122 | echo " proxies faster and more efficiently." | |
123 | echo | |
124 | echo "o Why should my network contribute?" | |
125 | echo " Because the more that do, the more proxies we know about and the" | |
126 | echo " better the service becomes for all BOPM users including YOU! People" | |
127 | echo " are also using our DNSBL to block spam (spammers use open proxies" | |
128 | echo " too!) so you'd be helping the whole Internet." | |
129 | echo | |
130 | echo "o Sounds complicated, what do you need?" | |
131 | echo " BOPM is already designed to report the proxies you find, but it is" | |
132 | echo " turned off by default. To enable it all you have to do is:" | |
133 | echo " - Set DNSBL_FROM to a unique email address that we can contact you" | |
134 | echo " at if there is ever any problem with your reports." | |
135 | echo " - Email us now at opm@lists.blitzed.org to tell us what you have" | |
136 | echo " set your DNSBL_FROM to." | |
137 | echo " - Set DNSBL_TO to proxy-report@blitzed.org." | |
138 | echo " - Set SENDMAIL to contain the path to your sendmail binary (even" | |
139 | echo " if you don't use sendmail you will have a binary named sendmail in" | |
140 | echo " /usr/sbin or /usr/lib." | |
141 | echo | |
142 | echo "For more info about the people who already report their proxies, please" | |
143 | echo "see http://www.blitzed.org/bopm/ - Thank you!" | |
99f4c865 | 144 | echo "##############################################################################" |
2c75ac1f | 145 | echo |