From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Fri, 14 Jan 2022 23:35:57 +0330 Subject: [PATCH] Tweak configure and configure.ac As usual, make the `configure` script recognize Serenity. Also set `MACHDEP` (which is used for `sys.platform`) to a version-less `serenityos`, even when not cross-compiling. --- configure | 9 ++++++++- configure.ac | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 19f1bd5..340e76e 100755 --- a/configure +++ b/configure @@ -3335,6 +3335,9 @@ then # a lot of different things including 'define_xopen_source' # in the case statement below. case "$host" in + *-*-serenity*) + ac_sys_system=SerenityOS + ;; *-*-linux-android*) ac_sys_system=Linux-android ;; @@ -3373,6 +3376,7 @@ then linux*) MACHDEP="linux";; cygwin*) MACHDEP="cygwin";; darwin*) MACHDEP="darwin";; + serenityos*) MACHDEP="serenityos";; '') MACHDEP="unknown";; esac fi @@ -3382,6 +3386,9 @@ $as_echo "\"$MACHDEP\"" >&6; } if test "$cross_compiling" = yes; then case "$host" in + *-*-serenity*) + _host_cpu=$host_cpu + ;; *-*-linux*) case "$host_cpu" in arm*) @@ -9886,7 +9893,7 @@ then LINKFORSHARED="-Wl,-E -Wl,+s";; # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; - Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; + Linux*|GNU*|SerenityOS*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys Darwin/*) LINKFORSHARED="$extra_undefs -framework CoreFoundation" diff --git a/configure.ac b/configure.ac index 763fc69..8d4c0af 100644 --- a/configure.ac +++ b/configure.ac @@ -391,6 +391,9 @@ then # a lot of different things including 'define_xopen_source' # in the case statement below. case "$host" in + *-*-serenity*) + ac_sys_system=SerenityOS + ;; *-*-linux-android*) ac_sys_system=Linux-android ;; @@ -429,6 +432,7 @@ then linux*) MACHDEP="linux";; cygwin*) MACHDEP="cygwin";; darwin*) MACHDEP="darwin";; + serenityos*) MACHDEP="serenityos";; '') MACHDEP="unknown";; esac fi @@ -437,6 +441,9 @@ AC_MSG_RESULT("$MACHDEP") AC_SUBST(_PYTHON_HOST_PLATFORM) if test "$cross_compiling" = yes; then case "$host" in + *-*-serenity*) + _host_cpu=$host_cpu + ;; *-*-linux*) case "$host_cpu" in arm*) @@ -2807,7 +2814,7 @@ then LINKFORSHARED="-Wl,-E -Wl,+s";; # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; - Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; + Linux*|GNU*|SerenityOS*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys Darwin/*) LINKFORSHARED="$extra_undefs -framework CoreFoundation"