[ Patch #101730 ] Add initial static support for Darwin/MacOSX.
By D.K. Wolfe.
diff --git a/configure.in b/configure.in
index b7352da..e2adc75 100644
--- a/configure.in
+++ b/configure.in
@@ -8,7 +8,7 @@
AC_SUBST(VERSION)
VERSION=2.0
-# NEXTSTEP stuff
+# NEXTSTEP|MacOSX|Darwin stuff
if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
AC_MSG_CHECKING(for --with-next-archs)
@@ -24,18 +24,23 @@
if test -z "$MACHDEP"
then
+ ac_sys_system=`uname -s`
+ if test "$ac_sys_system" = "Darwin" ; then
+ ac_sys_release=`uname -r`
+ else
set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
- sed -e 's/://' -e 's/\./_/'` && \
- ac_sys_system=next && ac_sys_release=$4
+ sed -e 's/://' -e 's/\./_/'` && \
+ ac_sys_system=next && ac_sys_release=$4
+ fi
- MACHDEP="$ac_sys_system$ac_sys_release"
+ MACHDEP="$ac_sys_system$ac_sys_release"
fi
fi
AC_ARG_WITH(next-framework,
-[ --with-next-framework Build (OpenStep|Rhapsody|MacOSX) framework],,)
+[ --with-next-framework Build (OpenStep|Rhapsody|MacOSX|Darwin) framework],,)
AC_ARG_WITH(dyld,
-[ --with-dyld Use (OpenStep|Rhapsody|MacOSX) dynamic linker],,)
+[ --with-dyld Use (OpenStep|Rhapsody|MacOSX|Darwin) dynamic linker],,)
# Set name for machine-dependent library files
AC_SUBST(MACHDEP)
@@ -574,12 +579,12 @@
hp*|HP*) LDSHARED="ld -b";;
OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
DYNIX/ptx*) LDSHARED="ld -G";;
- next/*)
+ Darwin/*|next/*)
if test "$ns_dyld"
then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
fi
- if test "$with_next_framework" ; then
+ if test "$with_next_framework" ; then
LDSHARED="$LDSHARED \$(LDLIBRARY)"
fi ;;
Linux*) LDSHARED="gcc -shared";;
@@ -1150,6 +1155,7 @@
# check for --with-libm=...
AC_SUBST(LIBM)
case $ac_sys_system in
+Darwin) ;;
next) ;;
BeOS) ;;
*) LIBM=-lm