File: configure.in

package info (click to toggle)
goo 0.155-14
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 14,900 kB
  • ctags: 21,551
  • sloc: ansic: 253,539; lisp: 2,452; makefile: 266; sh: 211
file content (57 lines) | stat: -rw-r--r-- 1,533 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Process this file with autoconf to produce a configure script.
AC_INIT([src/goo], [.3])
AC_CONFIG_HEADER([c/config.h])

# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
GOO_CHECK_EXE_SUFFIX

# Checks for libraries.
GOO_CHECK_GC_LIB

AC_SEARCH_LIBS(log, m, , AC_MSG_ERROR([Unable to find math library]))
AC_SEARCH_LIBS(dlopen, dl, AC_DEFINE(HAVE_DLOPEN, 1), AC_DEFINE(HAVE_DLOPEN, 0))

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([errno.h fcntl.h memory.h stdlib.h string.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME

# Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_MMAP
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([ftruncate memset mkdir munmap pow putenv select setenv sqrt strerror])


THREADKIND=no
AC_MSG_CHECKING(for --with-threads)
AC_ARG_WITH(threads, [--with-threads[=DIRECTORY] Compile GOO to support threads], [
AC_MSG_RESULT($withval)
if test -d "$withval"
then LDFLAGS="$LDFLAGS -L$withval"
fi
AC_DEFINE(_REENTRANT)
AC_MSG_CHECKING([whether the compiler supports thread-local variables])
AC_TRY_COMPILE([__thread int testvar;],
[], [
AC_DEFINE(HAVE_THREAD_LOCAL_VARIABLE)
AC_MSG_RESULT([yes])], AC_MSG_RESULT([no]))
AC_CHECK_LIB(pthread, pthread_create, [
AC_DEFINE(WITH_THREADS)
AC_DEFINE(HAVE_POSIX_THREAD)
LIBS="-lpthread $LIBS"
THREADKIND=posix
], [
AC_MSG_ERROR([Unable to find thread library])
])
], AC_MSG_RESULT([no]))
AC_SUBST(THREADKIND)

AC_OUTPUT(Makefile c/Makefile src/Makefile doc/Makefile emacs/Makefile)