dnl Process this file with autoconf to produce a configure script. AC_INIT(timer.h) AC_CONFIG_HEADER(config.h) AC_ARG_ENABLE(debug, [ --enable-debug enable debug support]) if test "$enable_debug" = yes; then CPPFLAGS="${CPPFLAGS} -DDEBUG" else CPPFLAGS="${CPPFLAGS} -DNDEBUG" fi CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE -D_XOPEN_SOURCE" LDFLAGS="${LDFLAGS}" dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_RANLIB AC_PROG_GCC_TRADITIONAL AC_CANONICAL_SYSTEM if test "$GCC" = "yes"; then CFLAGS="${CFLAGS} -Wall" else # ugly, there's gotta be a better way to do this... case "${build_os}" in hpux*) CPPFLAGS="${CPPFLAGS} -Ae" CFLAGS="${CFLAGS} +ESlit" if test "$enable_debug" != yes; then CFLAGS="${CFLAGS} +O2" fi ;; esac fi dnl Checks for libraries. dnl Replace `main' with a function in -lm: AC_CHECK_LIB(m, main) AC_CHECK_LIB(crypto, main) AC_CHECK_LIB(ssl, SSL_version) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h openssl/ssl.h) if test "$ac_cv_header_openssl_ssl_h" = "yes" \ -a "$ac_cv_lib_ssl_SSL_version" = "yes" \ -a "$ac_cv_lib_crypto_main" = "yes"; then AC_DEFINE(HAVE_SSL) fi dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_TYPE_LONG_LONG AC_HEADER_TIME AC_CHECK_SIZEOF(long) AC_CHECK_TYPE(u_char, unsigned char) AC_CHECK_TYPE(u_short, unsigned short) AC_CHECK_TYPE(u_int, unsigned int) AC_CHECK_TYPE(u_long, unsigned long) dnl Checks for library functions. AC_FUNC_ALLOCA AC_FUNC_MMAP AC_TYPE_SIGNAL AC_FUNC_VPRINTF AC_CHECK_FUNCS(gettimeofday select socket strdup strerror strtod strtol \ strtoul getopt_long) AC_OUTPUT(stat/Makefile lib/Makefile Makefile gen/Makefile)