configure: regroup os and arch specific defaults
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 22 Mar 2021 17:17:32 +0000 (13:17 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 23 Mar 2021 15:15:54 +0000 (11:15 -0400)
This is part of an effort to standardise our autotools setup across
project to simplify maintenance.

Change-Id: Ib0f3319133ed7dfab8ee844f6bcf99dd9606d344
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
configure.ac

index 54c8779116108aac0448e218c456cf079d5b0c51..6becf39f2314ac55c78957772c8cc26b80c45382 100644 (file)
@@ -58,6 +58,38 @@ AM_MAINTAINER_MODE([enable])
 AM_SILENT_RULES([yes])
 
 
+##                               ##
+## OS and Arch specific defaults ##
+##                               ##
+
+# Set os specific options
+AS_CASE([$host_os],
+  [freebsd*], [NO_NUMA=1]
+)
+
+# Set architecture specific options
+AS_CASE([$host_cpu],
+  [i[[3456]]86], [],
+  [x86_64], [],
+  [amd64], [],
+  [powerpc], [],
+  [ppc64], [],
+  [ppc64le], [],
+  [powerpc64], [],
+  [powerpc64le], [],
+  [s390], [],
+  [s390x], [],
+  [arm*], [
+    NO_NUMA=1
+    ],
+  [aarch64*], [],
+  [mips*], [],
+  [tile*], [],
+  [
+    unsupported_arch="yes"
+  ])
+
+
 ##                   ##
 ## C compiler checks ##
 ##                   ##
@@ -240,33 +272,6 @@ AS_IF([test "x$enable_shared" = "xyes"], [
        AC_MSG_ERROR([LTTng-UST requires shared libraries to be enabled])
 ])
 
-# Set architecture specific options
-AS_CASE([$host_cpu],
-       [i[[3456]]86], [],
-       [x86_64], [],
-       [amd64], [],
-       [powerpc], [],
-       [ppc64], [],
-       [ppc64le], [],
-       [powerpc64], [],
-       [powerpc64le], [],
-       [s390], [],
-       [s390x], [],
-       [arm*], [
-               NO_NUMA=1
-               ],
-       [aarch64*], [],
-       [mips*], [],
-       [tile*], [],
-       [
-               UNSUPPORTED_ARCH=1
-       ])
-
-# Set os specific options
-AS_CASE([$host_os],
-       [freebsd*], [NO_NUMA=1]
-)
-
 # Configuration options, which will be installed in the config.h
 AH_TEMPLATE([LTTNG_UST_HAVE_SDT_INTEGRATION], [SystemTap integration via sdt.h])
 
@@ -582,7 +587,7 @@ PPRINT_SUBTITLE([System])
 
 PPRINT_PROP_STRING([Target architecture], $host_cpu)
 
-AS_IF([test "x$UNSUPPORTED_ARCH" = "x1"],[
+AS_IF([test "x$unsupported_arch" = "xyes"],[
        PPRINT_WARN([Your architecture ($host_cpu) is unsupported, using safe default of no unaligned access.])
 ])
 
This page took 0.026129 seconds and 4 git commands to generate.