1 dnl Process this file with autoconf to produce a configure script.
7 dnl Set some system-specific variables which are OK to set before compiler
9 PTHREAD_DEFS=-D_REENTRANT
11 dnl Tru64 Unix requires we use -pthread instead of linking the threads
12 dnl libraries directly, and we can't build threaded programs with gcc
13 dnl due to header file problems.
15 test -z "$CC" && CC=cc
18 dnl FreeBSD is similar:
21 PTHREAD_DEFS=-D_THREAD_SAFE
24 PTHREAD_DEFS=-D_REENTRANT -D_PTHREADS
27 AC_SUBST(PTHREAD_DEFS)
29 dnl Checks for programs.
32 dnl Configure compiler flags for GCC
33 if test "$GCC" = yes; then
36 CFLAGS="$CFLAGS -Wall -Wno-char-subscripts"
39 CFLAGS="$CFLAGS -Wall"
44 missing_dir=`cd $ac_aux_dir && pwd`
45 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
47 dnl Checks for libraries.
48 if test "$LIBS" != -pthread; then
49 AC_CHECK_LIB(pthread, pthread_create)
50 AC_CHECK_LIB(pthreads, pthread_create)
52 AC_SEARCH_LIBS(gethostbyname, nsl)
53 AC_SEARCH_LIBS(connect, socket)
55 dnl Checks for header files.
57 dnl AC_HEADER_SYS_WAIT
58 AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h)
60 dnl Checks for typedefs, structures, and compiler characteristics.
66 dnl Checks for library functions.
69 dnl AC_CHECK_FUNCS(strerror)
70 AC_REPLACE_FUNCS(snprintf)