dnl Process this file with autoconf to produce a configure script. AC_INIT AC_PREREQ(2.52) AC_CONFIG_SRCDIR([Sked.h]) AC_CONFIG_AUX_DIR(config) AC_CANONICAL_TARGET([]) dnl ------------------------------------------------------------------- dnl Automake support dnl To use automake to build Makefile.in from Makefile.am, run dnl 'aclocal; autoconf; automake; ./configure' AM_INIT_AUTOMAKE(dkftpbench, 0.45) AC_PROG_RANLIB MYCFLAGS="-Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings" AC_ARG_ENABLE(dprint, [--enable-dprint turns on debug logging], MYCFLAGS="$MYCFLAGS -DUSE_DPRINT") AC_ARG_ENABLE(debug, [--enable-debug turns -g on and -O2 off], MYCFLAGS="$MYCFLAGS -g", MYCFLAGS="$MYCFLAGS -O2") AC_ARG_ENABLE(profile, [--enable-profile turns on -pg], MYCFLAGS="$MYCFLAGS -pg") AC_ARG_ENABLE(ndebug, [--enable-ndebug turns on -DNDEBUG], MYCFLAGS="$MYCFLAGS -DNDEBUG") AC_ARG_ENABLE(urgent, [--enable-urgent turns on -DPoller_URGENT], MYCFLAGS="$MYCFLAGS -DPoller_URGENT") AC_ARG_ENABLE(asm, [--enable-asm turns on -S], MYCFLAGS="$MYCFLAGS -S") CFLAGS="$CFLAGS $MYCFLAGS" CXXFLAGS="$CXXFLAGS $MYCFLAGS" dnl ------------------------------------------------------------------- dnl Checks for programs. AC_PROG_CC AC_PROG_CXX dnl checks for libraries dnl note: buggy. Says you need -lnsl even if you don't sometimes. AC_CHECK_LIB(nsl, gethostbyname) AC_CHECK_LIB(socket, connect) dnl If sys/socket.h doesn't give you socklen_t, assume it's an int. AC_EGREP_HEADER(socklen_t, sys/socket.h,, AC_DEFINE(socklen_t,int)) dnl If netinet/in.h doesn't give you in_addr_t, assume it's an int. AC_EGREP_HEADER(in_addr_t, netinet/in.h,, AC_DEFINE(in_addr_t,int)) dnl If you can't just use inet_aton, plug in our source file for it. AC_TRY_LINK_FUNC(inet_aton,AC_DEFINE(HAVE_INET_ATON), LIBS="$LIBS inet_aton.c") dnl check for kqueue under FreeBSD 4.1 - note that if you have a stock dnl kernel you need to apply the fbsd-41-kqueue.diff to your kernel for dnl the the Poller_test program to work. AC_CHECK_FUNCS(kqueue) dnl check for getifaddrs. This library call was introduced by bsdi, dnl and will be part of Linux's ipv6 support. If not present in the dnl OS, we emulate it. AC_CHECK_FUNCS(getifaddrs) dnl check for /dev/poll device under Linux or Solaris if test -c /dev/poll; then AC_DEFINE(HAVE_DEVPOLL, 1) else AC_DEFINE(HAVE_DEVPOLL, 0) fi dnl check for /dev/epoll device under Linux if test -c /dev/epoll; then AC_DEFINE(HAVE_DEVEPOLL, 1) else AC_DEFINE(HAVE_DEVEPOLL, 0) fi dnl Must turn on _GNU_SOURCE to enable F_SETSIG AC_DEFINE(_GNU_SOURCE) dnl check for rtsig readiness notification under Linux dnl (but don't use it unless kernel 2.4 or higher) AC_EGREP_CPP(YUP_HAVE_F_SETSIG, [#define _GNU_SOURCE #include #ifdef F_SETSIG YUP_HAVE_F_SETSIG #endif ],AC_DEFINE(HAVE_F_SETSIG)) dnl check for Vitaly Luban's signal-per-fd hack AC_EGREP_CPP(YUP_HAVE_F_SETAUXFL, [#define _GNU_SOURCE #include #ifdef F_SETAUXFL YUP_HAVE_F_SETAUXFL #endif ],AC_DEFINE(HAVE_F_SETAUXFL)) dnl Check for Corba RSSH_CHECK_ORB AC_CONFIG_FILES([Makefile]) AC_OUTPUT