| 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 | AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip]) |
| 8 | AC_CONFIG_SRCDIR([urcu.h]) |
| 9 | AC_CONFIG_HEADERS([config.h]) |
| 10 | |
| 11 | # Checks for programs. |
| 12 | AC_PROG_CC |
| 13 | AC_PROG_MAKE_SET |
| 14 | AC_PROG_LIBTOOL |
| 15 | |
| 16 | # Checks for typedefs, structures, and compiler characteristics. |
| 17 | AC_C_INLINE |
| 18 | AC_TYPE_PID_T |
| 19 | AC_TYPE_SIZE_T |
| 20 | |
| 21 | # Checks for library functions. |
| 22 | AC_FUNC_MALLOC |
| 23 | AC_FUNC_MMAP |
| 24 | AC_CHECK_FUNCS([bzero gettimeofday munmap strtoul]) |
| 25 | |
| 26 | # Find arch type |
| 27 | case $host_cpu in |
| 28 | x86_64) ARCHTYPE="x86";; |
| 29 | i586) ARCHTYPE="x86" ;; |
| 30 | i686) ARCHTYPE="x86" ;; |
| 31 | powerpc) ARCHTYPE="ppc" ;; |
| 32 | ppc64) ARCHTYPE="ppc" ;; |
| 33 | ppc) ARCHTYPE="ppc" ;; |
| 34 | s390) ARCHTYPE="s390" ;; |
| 35 | s390x) ARCHTYPE="s390" ;; |
| 36 | *) ARCHTYPE="unknown";; |
| 37 | esac |
| 38 | |
| 39 | if test "$ARCHTYPE" = "unknown"; then |
| 40 | AC_MSG_ERROR([Unable to detect the architecture.]) |
| 41 | fi |
| 42 | AC_SUBST(ARCHTYPE) |
| 43 | |
| 44 | AM_CONDITIONAL([GCC_API], [test "x$ARCHTYPE" != xx86 -a "x$ARCHTYPE" != xppc]) |
| 45 | |
| 46 | |
| 47 | AC_CONFIG_FILES([ |
| 48 | Makefile |
| 49 | tests/Makefile |
| 50 | ]) |
| 51 | AC_OUTPUT |