1 dnl autoconf; autoheader; automake
3 dnl Process this file with autoconf to produce a configure script.
7 AM_INIT_AUTOMAKE(cacao, 0.40)
8 AM_CONFIG_HEADER(config.h)
10 AC_PREFIX_DEFAULT(/usr/local/cacao)
17 CFLAGS="-ieee -O2 -g3" ;;
21 CFLAGS="-g -DMAP_ANONYMOUS=0 -woff 1048,1110,1164,1515"
24 sparc* | powerpc* | ppc* | * )
25 AC_MSG_ERROR($host-cpu systems are not supported at this time) ;;
29 AC_DEFINE_UNQUOTED(SYSDEP_DIR, "$SYSDEP_DIR")
32 dnl Checks for programs.
36 dnl Checks for libraries.
39 dnl Checks for header files.
42 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
44 dnl Checks for typedefs, structures, and compiler characteristics.
52 dnl Checks for library functions.
53 AC_PROG_GCC_TRADITIONAL
57 AC_CHECK_FUNCS(getcwd gettimeofday mkdir mktime select socket)
59 dnl Check for mmap header anomalies (missing MAP_FAILED, etc.)
60 if test $ac_cv_func_mmap_fixed_mapped = yes; then
61 AC_CACHE_CHECK(whether MAP_FAILED is defined,
64 [#include <sys/mman.h>
71 AC_CACHE_CHECK(whether MAP_ANONYMOUS is defined,
74 [#include <sys/mman.h>
78 ac_cv_map_anonymous=yes,
79 ac_cv_map_anonymous=no))
81 if test $ac_cv_map_failed = yes; then
82 AC_DEFINE(HAVE_MAP_FAILED)
85 if test $ac_cv_map_failed = yes; then
86 AC_DEFINE(HAVE_MAP_ANONYMOUS)
94 AC_ARG_ENABLE(threads, [ --enable-threads enable threads support])
95 AC_ARG_ENABLE(gc2, [ --enable-gc2 enable new garbage collector])
98 AC_MSG_CHECKING(whether to include threads support)
99 if test x"$enable_threads" = "xno"; then
104 AC_DEFINE(USE_THREADS)
105 AC_DEFINE(EXTERNAL_OVERFLOW)
106 AC_DEFINE(DONT_FREE_FIRST)
108 LIBTHREAD="libthreads.a"
109 THREAD_OBJ="threads/libthreads.a"
114 dnl garbage collector version
115 AC_MSG_CHECKING(which garbage collector to use)
116 if test x"$enable_gc2" = "xno"; then
117 AC_MSG_RESULT(old garbage collector)
118 GC_OBJ="mm/libmm_old.a"
120 AC_MSG_RESULT(new garbage collector)
121 GC_OBJ="mm/libmm_new.a"