aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-03-16 16:03:20 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-03-16 16:33:10 +0300
commit74e912cd79d83f8470137a8b288488749c0a79bc (patch)
treec2076982c76c1f5f5d51d0cdd26e6c8d4ed5199f
parent327d749ce03d25897447ec36ed4c46c0da4a72cb (diff)
downloadsciteco-74e912cd79d83f8470137a8b288488749c0a79bc.tar.gz
prefer native C/C++ compilers
* The Autoconf defaults are actually biased in favor of GCC, so on systems with GCC and Clang, Autoconf would pick GCC. * Instead we now always default to `cc` and `c++`, i.e. the system's default compiler. * This means, we will compile with Clang by default on FreeBSD.
-rw-r--r--configure.ac13
1 files changed, 7 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 69e98e8..4c6a5f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,16 +48,17 @@ canonicalize() {
# Checks for programs.
#
+# FIXME: Check for -std=gnu11?
+AC_PROG_CC([cc gcc clang])
+AC_PROG_SED
+AC_PROG_GREP
+AC_PROG_INSTALL
+
# Disable shared libraries by default (--disable-shared).
# We don't install any library, so this __should__ not matter.
# In reality Libtool builds unnecessary wrapper binaries on win32 (MinGW) without this.
# These wrapper binaries do not handle UTF-8 properly and break the test suite.
LT_INIT([disable-shared])
-# FIXME: Check for -std=gnu11?
-AC_PROG_CC
-AC_PROG_SED
-AC_PROG_GREP
-AC_PROG_INSTALL
# Mainly because of Scintilla, which depends on
# GNU Make.
@@ -72,7 +73,7 @@ if [[ x$ax_cv_gnu_make_command = x ]]; then
fi
# Additionally required by the Scintilla build process:
-AC_PROG_CXX
+AC_PROG_CXX([c++ g++ clang++])
AX_CXX_COMPILE_STDCXX(17, noext, mandatory)
AC_CHECK_TOOL(AR, ar)