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