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