jgabaut/helapordo

[BUG] The configure.ac file fails guessing OS when on darwin

Closed this issue · 0 comments

ATM, the configure.ac file fails capturing the guessed OS given by config.guess.

This is because config.guess responds with darwinX.Y.Z, but the checks in configure.ac are only looking for darwin specifically.

A quick patch would look like this:

diff --git a/configure.ac b/configure.ac
index 175d3c9..4fc2348 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ AM_INIT_AUTOMAKE([foreign -Wall])
 
 # Detect the host system and set PACK_PREFIX accordingly
 AC_CANONICAL_HOST
-AM_CONDITIONAL([OS_DARWIN], [test "$host_os" = "darwin"])
+AM_CONDITIONAL([OS_DARWIN], [test "$host_os" = "darwin22.6.0"])
 
 # Check for the --enable-debug option
 AC_ARG_ENABLE([debug],
@@ -27,7 +27,7 @@ if test "$host_os" = "mingw32"; then
   AC_SUBST([OS], ["w64-mingw32"])
   AC_SUBST([TARGET], ["helapordo.exe"])
 fi
-if test "$host_os" = "darwin"; then
+if test "$host_os" = "darwin22.6.0"; then
   echo "Building for macos: [$host_cpu-$host_vendor-$host_os]"
   # macOS specific flags
   AC_SUBST([HELAPORDO_CFLAGS], ["-I/opt/homebrew/opt/ncurses/include -DKOLISEO_HAS_CURSES"])

But a better fix would not peg the version number, thus refactoring the checks to expect darwin* for a macOS build.

  • OS: macOS
  • Version >=1.0.0