1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(src/bfbt/bfbtester.c)
3AC_CANONICAL_SYSTEM
4
5PACKAGE="BFBTester"
6VERSION=`cat VERSION`
7AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
8
9AM_CONFIG_HEADER(src/config.h)
10
11dnl Checks for programs.
12AC_PROG_CC
13AC_PROG_INSTALL
14
15dnl Checks for libraries.
16AC_CHECK_LIB(c_r, pthread_create, [LIBS="$LIBS -pthread"])
17AC_CHECK_LIB(pthread, pthread_create)
18
19dnl Checks for header files.
20AC_HEADER_DIRENT
21AC_HEADER_STDC
22AC_HEADER_SYS_WAIT
23AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h pthread.h)
24
25dnl Checks for typedefs, structures, and compiler characteristics.
26AC_C_INLINE
27AC_TYPE_PID_T
28AC_TYPE_SIZE_T
29AC_STRUCT_TM
30
31dnl Checks for library functions.
32AC_FUNC_VPRINTF
33AC_CHECK_FUNCS(gettimeofday strsignal strcspn strdup strerror strstr readdir_r, ,
34				AC_MSG_ERROR(Can't find needed function: $ac_func))
35
36case $build_os in
37	solaris*)
38		AC_DEFINE(SOLARIS)
39		CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
40	;;
41	linux*)
42		AC_DEFINE(LINUX)
43	;;
44esac
45
46AC_OUTPUT([
47Makefile
48src/Makefile
49src/bfbt/Makefile
50])
51