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