base/dispatch.c: Indent some preprocessor definitions properly.
[catacomb] / configure.ac
index 2b77ab4..516e3a0 100644 (file)
@@ -32,6 +32,7 @@ AC_INIT([catacomb], AUTO_VERSION, [mdw@distorted.org.uk])
 AC_CONFIG_SRCDIR([catacomb.pc.in])
 AC_CONFIG_AUX_DIR([config])
 AM_INIT_AUTOMAKE([foreign parallel-tests])
+AC_CANONICAL_HOST
 mdw_SILENT_RULES
 
 AC_PROG_CC
@@ -39,11 +40,33 @@ AX_CFLAGS_WARN_ALL
 AM_PROG_LIBTOOL
 mdw_LIBTOOL_VERSION_INFO
 
+AM_PROG_AS
+
 AC_PROG_YACC
 
 AC_SUBST(AM_CFLAGS)
 
 dnl--------------------------------------------------------------------------
+dnl Host-specific configuration.
+
+AC_DEFUN([catacomb_CPU_FAMILIES],
+  [$1([i[[3-6]]86], [X86])])
+
+case $host_cpu in
+  m4_define([catacomb_CPU_CASE],
+    [$1)
+      AC_DEFINE([CPUFAM_$2], [1], [Define if host CPU family is $2.])
+      cpufam=$2
+      ;;
+])
+  catacomb_CPU_FAMILIES([catacomb_CPU_CASE])
+  *) cpufam=nil ;;
+esac
+m4_define([catacomb_CPU_DEFS],
+  [AM_CONDITIONAL([CPUFAM_$2], [test x$cpufam = x$2])])
+catacomb_CPU_FAMILIES([catacomb_CPU_DEFS])
+
+dnl--------------------------------------------------------------------------
 dnl C programming environment.
 
 dnl Find out if we're cross-compiling.
@@ -136,7 +159,7 @@ AC_CACHE_CHECK([whether the freewheel noise generator will work],
 [struct itimerval itv = { { 0, 0 }, { 0, 5000 } };
 jmp_buf j;
 setitimer(ITIMER_REAL, &itv, 0);
-sigsetjump(j, 1);],
+sigsetjmp(j, 1);],
 [catacomb_cv_freewheel=yes],
 [catacomb_cv_freewheel=no])])
 case $catacomb_cv_freewheel in