Merge branch 'mdw/rsvr'
[catacomb] / configure.ac
index af08371..042c7c3 100644 (file)
@@ -78,9 +78,8 @@ AC_DEFUN([catacomb_CPU_FAMILIES],
    $1([i[[3-6]]86,*], [x86], [sysv])
    $1([x86_64,cygwin], [amd64], [win])
    $1([x86_64,*], [amd64], [sysv])
-   $1([arm,*-gnueabi | arm,*-gnueabihf | dnl
-       armv*,*-gnueabi | armv*,*-gnueabihf | dnl
-       arm,*-androideabi], [armel], [gnueabi])])
+   $1([arm,* | armv*,*], [armel], [std])
+   $1([aarch64,*], [arm64], [std])])
 
 dnl A utility to clear the `seen' flags, used so as to process each CPU or
 dnl ABI once.
@@ -159,6 +158,17 @@ catacomb_DEFINE_CPU_OR_ABI([CPUFAM], [2], [cpu],
 catacomb_DEFINE_CPU_OR_ABI([ABI], [3], [abi],
   [ABI_], [Define if target ABI is \`$][3\'.])
 
+AC_ARG_ENABLE([asm-debug],
+  AS_HELP_STRING([--enable-asm-debug],
+    [enable assembler debugging features]),
+  [mdw_asm_debug=$enableval], [mdw_asm_debug=no])
+case $CPUFAM in nil) mdw_asm_debug=no ;; esac
+case mdw_asm_debug in
+  no) ;;
+  *) AC_DEFINE([ENABLE_ASM_DEBUG], [1],
+       [Define to enable assembler-level debugging.]) ;;
+esac
+
 dnl Establish Automake conditions for things.
 catacomb_CPU_FAMILIES([catacomb_CLEAR_FLAGS])
 m4_define([catacomb_COND_CPU],
@@ -173,6 +183,7 @@ m4_ifdef([catacomb_seen_abi/$3], [],
 m4_define([catacomb_seen_abi/$3], [t])])])
 catacomb_CPU_FAMILIES([catacomb_COND_CPU])
 AM_CONDITIONAL([KNOWN_CPUFAM], [test x$CPUFAM != xnil])
+AM_CONDITIONAL([ASM_DEBUG], [test x$mdw_asm_debug != xno])
 
 dnl Report on what we found.
 case $CPUFAM in
@@ -279,6 +290,9 @@ AC_CHECK_HEADERS([sys/auxv.h])
 AC_CHECK_HEADERS([linux/auxvec.h])
 AC_CHECK_FUNCS([getauxval])
 
+dnl Some equipment for measuring CPU performance.
+AC_CHECK_HEADERS([linux/perf_event.h])
+
 dnl Find the bit lengths of the obvious integer types.  This will be useful
 dnl when deciding on a representation for multiprecision integers.
 type_bits="" type_bits_sep=""
@@ -401,7 +415,7 @@ dnl Set the master libraries we need.
 AC_SUBST([CATACOMB_LIBS])
 
 dnl Necessary support libraries.
-PKG_CHECK_MODULES([mLib], [mLib >= 2.2.2.1])
+PKG_CHECK_MODULES([mLib], [mLib >= 2.3.0])
 AM_CFLAGS="$AM_CFLAGS $mLib_CFLAGS"
 
 dnl--------------------------------------------------------------------------