2002-04-30 22:22:54 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
AC_INIT(main.C)
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
|
|
|
|
AC_EGREP_CPP(yes,
|
|
|
|
[#ifdef _AIX
|
|
|
|
yes
|
|
|
|
#endif
|
|
|
|
], AC_DEFINE(unix))
|
|
|
|
|
2002-05-25 15:03:53 +00:00
|
|
|
case "$target" in
|
2002-05-30 08:33:30 +00:00
|
|
|
*-linux-*)
|
|
|
|
AC_DEFINE(GETSOCKOPT_SOCKLEN_T)
|
|
|
|
;;
|
2002-05-25 15:03:53 +00:00
|
|
|
*sysv5OpenUNIX8*)
|
|
|
|
AC_DEFINE(GETSOCKOPT_SIZE_T)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
dnl Checks for libraries.
|
|
|
|
dnl Replace `main' with a function in -lm:
|
|
|
|
AC_CHECK_LIB(m, sin)
|
|
|
|
dnl Replace `main' with a function in -lnsl:
|
|
|
|
AC_CHECK_LIB(nsl, gethostbyaddr)
|
|
|
|
dnl Replace `main' with a function in -lsocket:
|
|
|
|
AC_CHECK_LIB(socket, setservent)
|
|
|
|
dnl Replace `main' with a function in -lgen:
|
|
|
|
AC_CHECK_LIB(gen, strfind)
|
|
|
|
AC_CHECK_LIB(gen, strfind, [ AC_DEFINE(HAVE_STRFIND) ] )
|
|
|
|
AC_CHECK_LIB(stdc++, cerr)
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_DIRENT
|
|
|
|
AC_HEADER_STDC
|
2002-07-15 23:21:20 +00:00
|
|
|
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/select.h sys/statvfs.h sys/swap.h sys/systeminfo.h sys/socket.h sys/types.h dirent.h sys/utsname.h netdb.h netinet/in.h netinet/tcp.h arpa/inet.h sys/resource.h signal.h sys/wait.h)
|
2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
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_CHECK_FUNCS(select socket strstr lockf flock strftime)
|
|
|
|
|
|
|
|
AC_PATH_PROG(HAVE_SBIN_SENDMAIL, sendmail, 0, /usr/sbin)
|
|
|
|
AC_PATH_PROG(HAVE_LIB_SENDMAIL, sendmail, 0, /usr/lib)
|
|
|
|
if test "$ac_cv_path_HAVE_SBIN_SENDMAIL" = /usr/sbin/sendmail; then
|
|
|
|
AC_DEFINE(HAVE_SBIN_SENDMAIL)
|
|
|
|
fi
|
|
|
|
if test "$ac_cv_path_HAVE_LIB_SENDMAIL" = /usr/lib/sendmail; then
|
|
|
|
AC_DEFINE(HAVE_LIB_SENDMAIL)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_EGREP_CPP(yes,
|
|
|
|
[#ifdef __APPLE__
|
|
|
|
yes
|
|
|
|
#endif
|
|
|
|
], AC_DEFINE(unix))
|
|
|
|
|
|
|
|
AC_OUTPUT(Makefile)
|