Commit | Line | Data |
---|---|---|
48d848c7 PMF |
1 | # -*- Autoconf -*- |
2 | # Process this file with autoconf to produce a configure script. | |
3 | ||
4 | ||
7eaaf6cb | 5 | AC_INIT([userspace-rcu], [0.2.3-alpha], [mathieu dot desnoyers at polymtl dot ca]) |
48d848c7 | 6 | AC_CONFIG_AUX_DIR([config]) |
7d413817 MD |
7 | AC_CANONICAL_TARGET |
8 | AC_CANONICAL_HOST | |
48d848c7 PMF |
9 | AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip]) |
10 | AC_CONFIG_SRCDIR([urcu.h]) | |
7d413817 MD |
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.]) | |
48d848c7 PMF |
13 | AC_CONFIG_HEADERS([config.h]) |
14 | ||
15 | # Checks for programs. | |
16 | AC_PROG_CC | |
17 | AC_PROG_MAKE_SET | |
18 | AC_PROG_LIBTOOL | |
19 | ||
20 | # Checks for typedefs, structures, and compiler characteristics. | |
21 | AC_C_INLINE | |
22 | AC_TYPE_PID_T | |
23 | AC_TYPE_SIZE_T | |
24 | ||
25 | # Checks for library functions. | |
26 | AC_FUNC_MALLOC | |
27 | AC_FUNC_MMAP | |
28 | AC_CHECK_FUNCS([bzero gettimeofday munmap strtoul]) | |
29 | ||
30 | # Find arch type | |
7d413817 MD |
31 | case $target_cpu in |
32 | i386) ARCHTYPE="x86"; SUBARCHTYPE="x86compat" ;; | |
33 | i486) ARCHTYPE="x86"; SUBARCHTYPE="x86compat" ;; | |
34 | i586) ARCHTYPE="x86"; SUBARCHTYPE="x86compat" ;; | |
35 | i686) ARCHTYPE="x86"; SUBARCHTYPE="x86compat" ;; | |
48d848c7 | 36 | x86_64) ARCHTYPE="x86";; |
48d848c7 PMF |
37 | powerpc) ARCHTYPE="ppc" ;; |
38 | ppc64) ARCHTYPE="ppc" ;; | |
7d413817 | 39 | powerpc64) ARCHTYPE="ppc" ;; |
48d848c7 PMF |
40 | ppc) ARCHTYPE="ppc" ;; |
41 | s390) ARCHTYPE="s390" ;; | |
42 | s390x) ARCHTYPE="s390" ;; | |
43 | *) ARCHTYPE="unknown";; | |
44 | esac | |
45 | ||
46 | if test "$ARCHTYPE" = "unknown"; then | |
47 | AC_MSG_ERROR([Unable to detect the architecture.]) | |
48 | fi | |
49 | AC_SUBST(ARCHTYPE) | |
7d413817 | 50 | AC_SUBST(SUBARCHTYPE) |
48d848c7 | 51 | |
40646e1e | 52 | AM_CONDITIONAL([GCC_API], [test "x$ARCHTYPE" != xx86 -a "x$ARCHTYPE" != xppc]) |
48d848c7 | 53 | |
7d413817 MD |
54 | AM_CONDITIONAL([COMPAT_ARCH], [test "x$SUBARCHTYPE" == xx86compat ]) |
55 | ||
56 | AC_ARG_ENABLE([smp-support], [ --disable-smp-support Disable SMP support. Warning: only use this | |
57 | on uniprocessor systems. [[default=enabled]]], [def_smp_support=$enableval], [def_smp_support="yes"]) | |
58 | ||
59 | [ | |
60 | if test "$def_smp_support" = "no"; then | |
61 | echo "SMP support disabled." | |
62 | else | |
63 | ] | |
64 | AC_DEFINE([CONFIG_SMP], [1]) | |
65 | [ | |
66 | echo "SMP support enabled." | |
67 | fi | |
68 | ] | |
48d848c7 PMF |
69 | |
70 | AC_CONFIG_FILES([ | |
71 | Makefile | |
72 | tests/Makefile | |
73 | ]) | |
74 | AC_OUTPUT |