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