Update configure.ac
[urcu.git] / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4
5 AC_INIT([userspace-rcu], [0.2.3-alpha], [mathieu dot desnoyers at polymtl dot ca])
6 AC_CONFIG_AUX_DIR([config])
7 AC_CANONICAL_TARGET
8 AC_CANONICAL_HOST
9 AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
10 AC_CONFIG_SRCDIR([urcu.h])
11
12 AH_TEMPLATE([CONFIG_SMP], [Enable SMP support. With SMP support enabled, uniprocessors are also supported. With SMP support disabled, UP systems work fine, but the behavior of SMP systems is undefined.])
13 AH_TEMPLATE([CONFIG_HAVE_FENCE], [Defined when on a system that has memory fence
14 instructions.])
15 AC_CONFIG_HEADERS([config.h])
16
17 # Checks for programs.
18 AC_PROG_CC
19 AC_PROG_MAKE_SET
20 AC_PROG_LIBTOOL
21
22 # Checks for typedefs, structures, and compiler characteristics.
23 AC_C_INLINE
24 AC_TYPE_PID_T
25 AC_TYPE_SIZE_T
26
27 # Checks for library functions.
28 AC_FUNC_MALLOC
29 AC_FUNC_MMAP
30 AC_CHECK_FUNCS([bzero gettimeofday munmap strtoul])
31
32 # Find arch type
33 case $target_cpu in
34 i386) ARCHTYPE="x86"; SUBARCHTYPE="x86compat" ;;
35 i486) ARCHTYPE="x86"; SUBARCHTYPE="x86compat" ;;
36 i586) ARCHTYPE="x86"; SUBARCHTYPE="x86compat" ;;
37 i686) ARCHTYPE="x86"; SUBARCHTYPE="x86compat" ;;
38 x86_64) ARCHTYPE="x86";;
39 powerpc) ARCHTYPE="ppc" ;;
40 ppc64) ARCHTYPE="ppc" ;;
41 powerpc64) ARCHTYPE="ppc" ;;
42 ppc) ARCHTYPE="ppc" ;;
43 s390) ARCHTYPE="s390" ;;
44 s390x) ARCHTYPE="s390" ;;
45 *) ARCHTYPE="unknown";;
46 esac
47
48 if test "$ARCHTYPE" = "unknown"; then
49 AC_MSG_ERROR([Unable to detect the architecture.])
50 fi
51 AC_SUBST(ARCHTYPE)
52 AC_SUBST(SUBARCHTYPE)
53
54 [
55 if test "x$ARCHTYPE" = "xx86" -a "x$target_cpu" != "xi386" -a "x$target_cpu" != "xi486" -a "x$target_cpu" != "xi586"; then
56 ]
57 AC_DEFINE([CONFIG_HAVE_FENCE], [1])
58 [
59 fi
60 ]
61
62 AM_CONDITIONAL([GCC_API], [test "x$ARCHTYPE" != xx86 -a "x$ARCHTYPE" != xppc])
63
64 AM_CONDITIONAL([COMPAT_ARCH], [test "x$SUBARCHTYPE" == xx86compat ])
65
66 AC_ARG_ENABLE([smp-support], [ --disable-smp-support Disable SMP support. Warning: only use this
67 on uniprocessor systems. [[default=enabled]]], [def_smp_support=$enableval], [def_smp_support="yes"])
68
69 [
70 if test "$def_smp_support" = "no"; then
71 echo "SMP support disabled."
72 else
73 ]
74 AC_DEFINE([CONFIG_SMP], [1])
75 [
76 echo "SMP support enabled."
77 fi
78 ]
79
80 AC_CONFIG_FILES([
81 Makefile
82 tests/Makefile
83 ])
84 AC_OUTPUT
This page took 0.031907 seconds and 5 git commands to generate.