1dnl Process this file with autoconf to produce a configure script. 2AC_INIT 3AC_PREREQ(2.52) 4AC_CONFIG_SRCDIR([Sked.h]) 5AC_CONFIG_AUX_DIR(config) 6AC_CANONICAL_TARGET([]) 7 8dnl ------------------------------------------------------------------- 9dnl Automake support 10dnl To use automake to build Makefile.in from Makefile.am, run 11dnl 'aclocal; autoconf; automake; ./configure' 12 13AM_INIT_AUTOMAKE(dkftpbench, 0.45) 14AC_PROG_RANLIB 15MYCFLAGS="-Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings" 16AC_ARG_ENABLE(dprint, [--enable-dprint turns on debug logging], MYCFLAGS="$MYCFLAGS -DUSE_DPRINT") 17AC_ARG_ENABLE(debug, [--enable-debug turns -g on and -O2 off], MYCFLAGS="$MYCFLAGS -g", MYCFLAGS="$MYCFLAGS -O2") 18AC_ARG_ENABLE(profile, [--enable-profile turns on -pg], MYCFLAGS="$MYCFLAGS -pg") 19AC_ARG_ENABLE(ndebug, [--enable-ndebug turns on -DNDEBUG], MYCFLAGS="$MYCFLAGS -DNDEBUG") 20AC_ARG_ENABLE(urgent, [--enable-urgent turns on -DPoller_URGENT], MYCFLAGS="$MYCFLAGS -DPoller_URGENT") 21AC_ARG_ENABLE(asm, [--enable-asm turns on -S], MYCFLAGS="$MYCFLAGS -S") 22CFLAGS="$CFLAGS $MYCFLAGS" 23CXXFLAGS="$CXXFLAGS $MYCFLAGS" 24 25dnl ------------------------------------------------------------------- 26 27dnl Checks for programs. 28AC_PROG_CC 29AC_PROG_CXX 30 31dnl checks for libraries 32dnl note: buggy. Says you need -lnsl even if you don't sometimes. 33AC_CHECK_LIB(nsl, gethostbyname) 34AC_CHECK_LIB(socket, connect) 35 36dnl If sys/socket.h doesn't give you socklen_t, assume it's an int. 37AC_EGREP_HEADER(socklen_t, sys/socket.h,, AC_DEFINE(socklen_t,int)) 38 39dnl If netinet/in.h doesn't give you in_addr_t, assume it's an int. 40AC_EGREP_HEADER(in_addr_t, netinet/in.h,, AC_DEFINE(in_addr_t,int)) 41 42dnl If you can't just use inet_aton, plug in our source file for it. 43AC_TRY_LINK_FUNC(inet_aton,AC_DEFINE(HAVE_INET_ATON), LIBS="$LIBS inet_aton.c") 44 45dnl check for kqueue under FreeBSD 4.1 - note that if you have a stock 46dnl kernel you need to apply the fbsd-41-kqueue.diff to your kernel for 47dnl the the Poller_test program to work. 48AC_CHECK_FUNCS(kqueue) 49 50dnl check for getifaddrs. This library call was introduced by bsdi, 51dnl and will be part of Linux's ipv6 support. If not present in the 52dnl OS, we emulate it. 53AC_CHECK_FUNCS(getifaddrs) 54 55dnl check for /dev/poll device under Linux or Solaris 56if test -c /dev/poll; then 57 AC_DEFINE(HAVE_DEVPOLL, 1) 58else 59 AC_DEFINE(HAVE_DEVPOLL, 0) 60fi 61 62dnl check for /dev/epoll device under Linux 63if test -c /dev/epoll; then 64 AC_DEFINE(HAVE_DEVEPOLL, 1) 65else 66 AC_DEFINE(HAVE_DEVEPOLL, 0) 67fi 68 69dnl Must turn on _GNU_SOURCE to enable F_SETSIG 70AC_DEFINE(_GNU_SOURCE) 71 72dnl check for rtsig readiness notification under Linux 73dnl (but don't use it unless kernel 2.4 or higher) 74AC_EGREP_CPP(YUP_HAVE_F_SETSIG, 75[#define _GNU_SOURCE 76#include <fcntl.h> 77#ifdef F_SETSIG 78 YUP_HAVE_F_SETSIG 79#endif 80],AC_DEFINE(HAVE_F_SETSIG)) 81 82dnl check for Vitaly Luban's signal-per-fd hack 83AC_EGREP_CPP(YUP_HAVE_F_SETAUXFL, 84[#define _GNU_SOURCE 85#include <fcntl.h> 86#ifdef F_SETAUXFL 87 YUP_HAVE_F_SETAUXFL 88#endif 89],AC_DEFINE(HAVE_F_SETAUXFL)) 90 91dnl Check for Corba 92RSSH_CHECK_ORB 93 94AC_CONFIG_FILES([Makefile]) 95AC_OUTPUT 96