dnl Process this file with autoconf to produce a configure script. AC_INIT(shout.c) AM_INIT_AUTOMAKE(libshout,1.0.7) AC_PROG_CC AM_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) AM_CONFIG_HEADER(config.h) dnl Set some options based on environment if test -z "$GCC"; then case $host in *-*-irix*) DEBUG="-g" OPT="-O2 -w" PROFILE="-p -g3 -O2" ;; sparc-sun-solaris*) DEBUG="-v -g" OPT="-xO4 -fast -w -fsingle -fsimple -native -xcg92" PROFILE="-v -xpg -g -xO4 -fast -fsingle -native -fsimple -xcg92" ;; *) DEBUG="-g" OPT="-O" PROFILE="-g -p" ;; esac else case $host in i?86-*-linux*) DEBUG="-g -Wall -ansi -pedantic -Wno-long-long" OPT="-O20 -ffast-math" PROFILE="-pg -g -O20" ;; sparc-sun-*) DEBUG="-g -Wall -mv8" OPT="-O20 -ffast-math -mv8" PROFILE="-pg -g -O20 -mv8" ;; *) DEBUG="-g -Wall" OPT="-O20" PROFILE="-O20 -g -pg" ;; esac fi AC_SUBST(DEBUG) AC_SUBST(OPT) AC_SUBST(PROFILE) dnl Checks for programs. dnl Checks for libraries. dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME dnl Check for socklen_t AC_MSG_CHECKING([for unix98 socklen_t]) AC_TRY_COMPILE([#include #include ], [typedef socklen_t int; int test() { return 1; }], AC_MSG_RESULT(yes) HAVE_SOCKLEN_T=yes, AC_MSG_RESULT(no) HAVE_SOCKLEN_T=no) if test "x$HAVE_SOCKLEN_T" = "xyes"; then AC_DEFINE(HAVE_SOCKLEN_T) fi dnl Check for 64bit long long AC_CHECK_SIZEOF(long long) if test "$ac_cv_sizeof_long_long" -lt "8"; then AC_MSG_ERROR("long long is not 64 bits!!") fi dnl Checks for library functions. AC_FUNC_VPRINTF AC_CHECK_FUNCS(gettimeofday select socket strdup nanosleep) AC_OUTPUT(Makefile doc/Makefile)