aboutsummaryrefslogtreecommitdiff
path: root/libgm2/configure
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2022-12-17 14:48:03 +0000
committerIain Sandoe <iain@sandoe.co.uk>2022-12-31 16:16:30 +0000
commit2d8c2fdc299034c85a0abfd7da31168d02a41d32 (patch)
tree2044edcc4744af3966ce5125fd17169b1e24677a /libgm2/configure
parentebc41f9a817dbae01c7450cd33c1968318ce8df0 (diff)
downloadgcc-2d8c2fdc299034c85a0abfd7da31168d02a41d32.zip
gcc-2d8c2fdc299034c85a0abfd7da31168d02a41d32.tar.gz
gcc-2d8c2fdc299034c85a0abfd7da31168d02a41d32.tar.bz2
modula-2,libgm2: Add undefined, dynamic_lookup to m2 libs links.
The libm2 libraries are cross-linked, which means that we need to allow symbols to be undefined at link time and then to be found at runtime. This is implemented on Darwin by adding -undefined, dynamic_lookup to the link command. NOTE: It would probably be a better solution to rework the libraries either to combine those that have inter-dependencies, or to reorder the layering so the there is a fixed dependency tree. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libgm2/ChangeLog: * configure: Regenerate. * configure.ac: Make a conditional for configurations targeting Darwin. * libm2cor/Makefile.am: Use -undefined,dynamic_lookup on Darwin. * libm2iso/Makefile.am: Likewise. * libm2log/Makefile.am: Likewise. * libm2pim/Makefile.am: Likewise * libm2min/Makefile.am: Likewise * libm2cor/Makefile.in: Regenerate. * libm2iso/Makefile.in: Regenerate. * libm2log/Makefile.in: Regenerate. * libm2min/Makefile.in: Regenerate. * libm2pim/Makefile.in: Regenerate.
Diffstat (limited to 'libgm2/configure')
-rwxr-xr-xlibgm2/configure33
1 files changed, 30 insertions, 3 deletions
diff --git a/libgm2/configure b/libgm2/configure
index 889c092..8404b0e 100755
--- a/libgm2/configure
+++ b/libgm2/configure
@@ -634,6 +634,8 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+TARGET_DARWIN_FALSE
+TARGET_DARWIN_TRUE
BUILD_LOGLIB_FALSE
BUILD_LOGLIB_TRUE
BUILD_CORLIB_FALSE
@@ -12698,7 +12700,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12701 "configure"
+#line 12703 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12804,7 +12806,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12807 "configure"
+#line 12809 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -19508,7 +19510,7 @@ $as_echo "$as_me: libgm2 has finished checking target libc and libm contents." >
# All known M2_HOST_OS values. This is the union of all host operating systems
# supported by gm2.
-M2_SUPPORTED_HOST_OS="aix freebsd hurd linux netbsd openbsd solaris windows"
+M2_SUPPORTED_HOST_OS="aix freebsd hurd linux netbsd openbsd solaris windows darwin"
M2_HOST_OS=unknown
@@ -19523,6 +19525,19 @@ case ${host} in
*-*-gnu*) M2_HOST_OS=hurd ;;
esac
+M2_TARGET_OS=unknown
+
+case ${target} in
+ *-*-darwin*) M2_TARGET_OS=darwin ;;
+ *-*-freebsd*) M2_TARGET_OS=freebsd ;;
+ *-*-linux*) M2_TARGET_OS=linux ;;
+ *-*-netbsd*) M2_TARGET_OS=netbsd ;;
+ *-*-openbsd*) M2_TARGET_OS=openbsd ;;
+ *-*-solaris2*) M2_TARGET_OS=solaris ;;
+ *-*-aix*) M2_TARGET_OS=aix ;;
+ *-*-gnu*) M2_TARGET_OS=hurd ;;
+esac
+
# M2_HOST_OS=unknown
if test x${M2_HOST_OS} = xunknown; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: unsupported host, will build a minimal m2 library" >&5
@@ -19672,6 +19687,14 @@ else
BUILD_LOGLIB_FALSE=
fi
+ if test x$M2_TARGET_OS = xdarwin; then
+ TARGET_DARWIN_TRUE=
+ TARGET_DARWIN_FALSE='#'
+else
+ TARGET_DARWIN_TRUE='#'
+ TARGET_DARWIN_FALSE=
+fi
+
ac_config_files="$ac_config_files Makefile libm2min/Makefile libm2pim/Makefile libm2iso/Makefile libm2cor/Makefile libm2log/Makefile"
@@ -19841,6 +19864,10 @@ if test -z "${BUILD_LOGLIB_TRUE}" && test -z "${BUILD_LOGLIB_FALSE}"; then
as_fn_error $? "conditional \"BUILD_LOGLIB\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${TARGET_DARWIN_TRUE}" && test -z "${TARGET_DARWIN_FALSE}"; then
+ as_fn_error $? "conditional \"TARGET_DARWIN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0