dnl Process this file with autoconf to produce a configure script. AC_INIT(bopm, [3.0]) AC_CONFIG_SRCDIR(src/opercmd.h) AM_CONFIG_HEADER(src/setup.h) AM_INIT_AUTOMAKE() AC_PREFIX_DEFAULT([\${HOME}/bopm]) AM_MAINTAINER_MODE AC_ARG_WITH(select, AC_HELP_STRING([--with-select], [use select() instead of poll()]), [with_select="yes"], [with_select="no"]) AC_ARG_WITH(unreal, AC_HELP_STRING([--with-unreal], [you need this if you are using Unreal ircd (any version)]), [with_unreal="yes"], [with_unreal="no"]) AC_ARG_WITH(extra-fascism, AC_HELP_STRING([--with-extra-fascism], [Add extra gcc3-specific warning flags]), [CFLAGS="$CFLAGS -g -ggdb -O0 -W -Wfloat-equal -Wbad-function-cast -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs"]) dnl ipv6? AC_ARG_ENABLE(ipv6, AC_HELP_STRING([--enable-ipv6], [Enable IPV6 support]), [ac_cv_ipv6=$enableval], [ac_cv_ipv6="no"]) AC_MSG_CHECKING([whether to enable IPv6 features]) if test "$ac_cv_ipv6" = "yes" ; then AC_DEFINE(IPV6, 1, [Use Ipv6 Support]) AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi dnl Checks for programs. AC_PROG_CC dnl Checks for libraries. dnl Checks for header files. AC_HEADER_STDC if test "$with_select" = "yes"; then echo "use of select() forced, skipping poll() checks..." AC_DEFINE(WITH_SELECT, 1, [Define if you wish to force use of select() even when poll() may be present]) else AC_CHECK_HEADERS(sys/poll.h, have_poll_sys_h=yes, have_sys_poll_h=no) fi if test "$with_unreal" = "yes"; then echo "configuring for Unreal ircd" AC_DEFINE(WITH_UNREAL, 1, [Define if you are using Unreal ircd (any version)]) fi AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM dnl Checks for library functions. AC_TYPE_SIGNAL AC_FUNC_STRFTIME dnl check for yacc AC_PROG_INSTALL AC_PROG_YACC dnl check for lexx AM_PROG_LEX dnl if they want select() or they don't have poll() then we need to check dnl that we actually have select() if test "$with_select" = "yes" || test "$have_sys_poll_h" = "no"; then AC_CHECK_FUNCS(select, have_select=yes, have_select=no) if test "$have_select" = "no"; then AC_MSG_ERROR([No select() implementation found]) fi fi AC_CHECK_FUNCS(inet_aton inet_pton socket strdup strstr) dnl Check if we can use gethostbyname2 for ipv6 AC_CHECK_FUNCS(gethostbyname gethostbyname2) dnl AIX fun AC_C_BIGENDIAN dnl Solaris has to be weird doesn't it... AC_CHECK_LIB(socket, socket, AC_SUBST(LSOCKET, [-lsocket])) AC_CHECK_LIB(nsl, gethostbyname, AC_SUBST(LNSL, [-lnsl])) dnl teehee - taken from MRTG / Tobias Oetiker echo $ECHO_N "checking for POSIX-compliant goat $ECHO_C" for bleh in 1 2 3; do echo $ECHO_N "." sleep 1 done AC_MSG_RESULT([ http://www.blitzed.org/goat_winter_2001.phtml]) AC_CONFIG_SUBDIRS(src/libopm) AC_OUTPUT(Makefile src/Makefile) echo "##############################################################################" echo "Everything is now configured, but you can find some more (infrequently" echo "changed) options in options.h. To compile BOPM now, just type make. It" echo "requires GNU Make, which may be installed as gmake on your system." echo echo "bopm will be installed in ${prefix}. To change this, run:" echo " ./configure --prefix=DIRECTORY" echo echo "If possible, PLEASE CONTRIBUTE TO OUR DNSBL BY REPORTING YOUR PROXIES!!" echo echo "o What is DNSBL?" echo " It's the database of open proxies we provide and your BOPM checks" echo " against BEFORE bothering to scan the client, therefore killing KNOWN" echo " proxies faster and more efficiently." echo echo "o Why should my network contribute?" echo " Because the more that do, the more proxies we know about and the" echo " better the service becomes for all BOPM users including YOU! People" echo " are also using our DNSBL to block spam (spammers use open proxies" echo " too!) so you'd be helping the whole Internet." echo echo "o Sounds complicated, what do you need?" echo " BOPM is already designed to report the proxies you find, but it is" echo " turned off by default. To enable it all you have to do is:" echo " - Set DNSBL_FROM to a unique email address that we can contact you" echo " at if there is ever any problem with your reports." echo " - Email us now at opm@lists.blitzed.org to tell us what you have" echo " set your DNSBL_FROM to." echo " - Set DNSBL_TO to proxy-report@blitzed.org." echo " - Set SENDMAIL to contain the path to your sendmail binary (even" echo " if you don't use sendmail you will have a binary named sendmail in" echo " /usr/sbin or /usr/lib." echo echo "For more info about the people who already report their proxies, please" echo "see http://www.blitzed.org/bopm/ - Thank you!" echo "##############################################################################" echo