# $Id: configure.ac 26 2005-08-20 22:49:49Z greg $ # # Process this file with autoconf to produce a configure script. # AC_INIT([dits],[2.2],[dits@codeconcepts.com]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_SRCDIR([src/dits.h]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE(dits, 2.2) AC_SYS_LARGEFILE # Checks for programs. AC_PROG_CC AC_CANONICAL_HOST # Checks for libraries. # Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([errno.h fcntl.h stdlib.h string.h strings.h sys/file.h sys/param.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_CHECK_TYPE(int64_t) # Checks for library functions. AC_FUNC_FORK #AC_FUNC_MALLOC AC_FUNC_MMAP AC_TYPE_SIGNAL AC_CHECK_FUNCS([alarm bzero ftruncate memset strerror strrchr strtoul]) # Check for some target-specific stuff # # mmap on aix works for me although it doesn't pass the # configure test. # case "$host" in *-*-aix4*) CFLAGS="$CFLAGS -DAIX4 -DHAVE_MMAP" ;; *-*-aix5*) CFLAGS="$CFLAGS -DAIX5 -DHAVE_AIO -DHAVE_MMAP" ;; *-*-freebsd5*) CFLAGS="$CFLAGS -DFREEBSD5 -DHAVE_AIO" ;; *-*-freebsd4*) CFLAGS="$CFLAGS -DFREEBSD4" ;; *-*-solaris2.8*) CFLAGS="$CFLAGS -DSUN58 -DHAVE_AIO" LIBS="$LIBS -lrt" ;; *-*-solaris2.9*) CFLAGS="$CFLAGS -DSUN59 -DHAVE_AIO" LIBS="$LIBS -lrt" ;; *) echo "phooey.. host=" $host ;; esac AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT