1 dnl Process this file with autoconf to produce a configure script. 2 AC_INIT([ffsb], [6.0-RC2]) 3 AC_CONFIG_SRCDIR([main.c]) 4 AM_INIT_AUTOMAKE([foreign]) 5 6 AM_CONFIG_HEADER(config.h) 7 AC_CANONICAL_HOST 8 9 dnl need to define _ALL_SOURCE and _THREAD_SAFE on AIX 10 AC_AIX 11 12 case "${host}" in 13 *aix*) 14 CFLAGS="${CFLAGS} -D_THREAD_SAFE" 15 ;; 16 *linux*) 17 CFLAGS="${CFLAGS} -D_REENTRANT" 18 ;; 19 *) 20 echo "detected unknown platform : ${host} : compiles may fail" 21 CFLAGS="${CFLAGS} -D_REENTRANT" 22 ;; 23 esac 24 25 dnl Checks for programs. 26 AC_PROG_CC 27 28 dnl Checks for libraries. 29 dnl Replace `main' with a function in -lm: 30 AC_CHECK_LIB(m, main) 31 dnl Replace `main' with a function in -lpthread: 32 AC_CHECK_LIB(pthread, main) 33 34 35 dnl Checks for header files. 36 AC_HEADER_STDC 37 AC_HEADER_SYS_WAIT 38 AC_CHECK_HEADERS(pthread.h fcntl.h limits.h stdint.h sys/time.h unistd.h sys/vfs.h sys/limits.h) 39 40 dnl Checks for typedefs, structures, and compiler characteristics. 41 AC_C_CONST 42 AC_HEADER_TIME 43 44 dnl Checks for library functions. 45 AC_FUNC_SETVBUF_REVERSED 46 AC_CHECK_FUNCS(system gettimeofday mkdir strerror open64 stat64 fseeko64 lrand48_r srand48_r) 47 48 AC_SUBST(CFLAGS) 49 AC_SUBST(CC) 50 AC_OUTPUT(Makefile, echo timestamp > stamp-h) 51