Upgrade Boehm GC to 7.2alpha4.
[cacao.git] / src / mm / boehm-gc / libatomic_ops / configure.ac
1 # Process this file with autoconf to produce a configure script.
2 AC_INIT([libatomic_ops],[1.3alpha1])
3 AC_CANONICAL_TARGET([])
4 AC_CONFIG_SRCDIR(src/atomic_ops.c)
5 AM_INIT_AUTOMAKE
6 AC_PROG_RANLIB
7
8 AM_CONFIG_HEADER(src/config.h)
9
10 # Checks for programs.
11 AM_PROG_CC_C_O
12 AM_PROG_AS
13
14 # Checks for functions.
15 AC_FUNC_MMAP
16
17 # Checks for header files.
18 AC_HEADER_STDC
19 # AC_CHECK_HEADERS([ ])
20
21 # Determine PIC flag, adjust default CFLAGS
22 need_asm=false
23 PICFLAG=
24 AC_MSG_CHECKING(Determining PIC compiler flag)
25 if test "$GCC" = yes; then
26   AC_MSG_RESULT(-fPIC)
27   PICFLAG=-fPIC
28 else
29   case "$host" in
30     *-*-hpux*)
31       AC_MSG_RESULT("+Z")
32       PICFLAG="+Z"
33       if test "$GCC" != yes; then
34         CFLAGS="$CFLAGS +O2 -mt"
35       fi
36       ;;
37     *-*-solaris*)
38       AC_MSG_RESULT(-Kpic)
39       PICFLAG=-Kpic
40       if test "$GCC" != yes; then
41         CFLAGS="$CFLAGS -O"
42         need_asm=true
43       fi
44       ;;
45     *-*-linux*)
46       AC_MSG_RESULT(-fPIC)
47       PICFLAG=-fPIC
48       # Any Linux compiler had better be gcc compatible.
49       ;;
50     *)
51       AC_MSG_RESULT("<none>")
52       ;;
53   esac
54 fi
55 CFLAGS="$CFLAGS -DNDEBUG"
56
57 AC_SUBST(PICFLAG)
58 AC_SUBST(DEFS)
59
60 AM_CONDITIONAL(NEED_ASM, test x$need_asm = xtrue)
61
62 AC_CONFIG_FILES([Makefile src/Makefile src/atomic_ops/Makefile src/atomic_ops/sysdeps/Makefile doc/Makefile tests/Makefile])
63 AC_CONFIG_COMMANDS([default],[[]],[[
64 PICFLAG="${PICFLAG}"
65 CC="${CC}"
66 DEFS="${DEFS}"
67 ]])
68 AC_OUTPUT