From: Chris Hanson <org/chris-hanson/cph>
Date: Tue, 16 Feb 2010 05:16:33 +0000 (-0800)
Subject: Eliminate --enable-static-libs flag.
X-Git-Tag: 20100708-Gtk~126^2~18
X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=430f55ab276b1470a6ef5f542d5bde2812c24a5f;p=mit-scheme.git

Eliminate --enable-static-libs flag.
---

diff --git a/dist/make-dist-files b/dist/make-dist-files
index 2b4a4a524..99cfb7801 100755
--- a/dist/make-dist-files
+++ b/dist/make-dist-files
@@ -1,6 +1,9 @@
 #!/bin/bash
-
-# Copyright 2000,2001,2002,2003,2005 Massachusetts Institute of Technology
+#
+# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+#     1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+#     2005, 2006, 2007, 2008, 2009, 2010 Massachusetts Institute of
+#     Technology
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -158,7 +161,6 @@ for ARCH in i386 x86-64; do
 		set -e
 		cd "${SRC_DIR}"
 		./configure --enable-native-code="${ARCH}" \
-		    --enable-static-libs=yes --enable-dynamic-modules=no \
 		    --with-mcrypt=no --with-libpq=no --with-db-4=no
 		make
 	    )
diff --git a/src/microcode/configure.ac b/src/microcode/configure.ac
index bd9e67d0b..934644920 100644
--- a/src/microcode/configure.ac
+++ b/src/microcode/configure.ac
@@ -113,11 +113,6 @@ AH_BOTTOM(
 #endif /* SCM_CONFIG_H */])
 
 dnl Feature options
-AC_ARG_ENABLE([static-libs],
-    AS_HELP_STRING([--enable-static-libs],
-	[Link some libraries statically [[no]]]))
-: ${enable_static_libs='no'}
-
 AC_ARG_ENABLE([valgrind-mode],
     AS_HELP_STRING([--enable-valgrind-mode],
 	[Support running under valgrind [[no]]]))
@@ -169,11 +164,6 @@ AC_ARG_WITH([macosx-version],
     AS_HELP_STRING([--with-macosx-version],
 	[MacOSX version to compile for @<:@host's version@:>@]))
 
-if test ${enable_static_libs} != no && test ${enable_native_code} = c; then
-    AC_MSG_ERROR(
-	[--enable-native-code=c incompatible with --enable-static-libs])
-fi
-
 dnl Substitution variables to be filled in below.
 AS_FLAGS=
 GC_HEAD_FILES="gccode.h cmpgc.h cmpintmd-config.h cmpintmd.h"
@@ -181,9 +171,6 @@ M4_FLAGS=
 OPTIONAL_BASES=
 OPTIONAL_SOURCES=
 OPTIONAL_OBJECTS=
-STATIC_LIBS=
-STATIC_PREFIX=
-STATIC_SUFFIX=
 PRBFISH_LIBS=
 PRMD5_LIBS=
 SCHEME_DEFS=-DMIT_SCHEME
@@ -364,10 +351,6 @@ solaris*)
 esac
 
 if test "${DO_GCC_TESTS}" = yes; then
-    if test "x${STATIC_LIBS}" != x; then
-	STATIC_PREFIX="-Xlinker -Bstatic"
-	STATIC_SUFFIX="-Xlinker -Bdynamic"
-    fi
     if test "${GNU_LD}" = yes; then
 	SCHEME_LDFLAGS="${SCHEME_LDFLAGS} -export-dynamic"
     fi
@@ -701,7 +684,7 @@ AC_CHECK_LIB([ncurses], [tparm],
     [
     AC_DEFINE([HAVE_LIBNCURSES], [1],
 	[Define to 1 if you have the `ncurses' library (-lncurses).])
-    STATIC_LIBS="-lncurses ${STATIC_LIBS}"
+    LIBS="-lncurses ${LIBS}"
     AC_CHECK_HEADER([curses.h],
 	[
 	AC_DEFINE([HAVE_CURSES_H], [1],
@@ -725,7 +708,7 @@ AC_CHECK_LIB([ncurses], [tparm],
 	[
 	AC_DEFINE([HAVE_LIBCURSES], [1],
 	    [Define to 1 if you have the `curses' library (-lcurses).])
-	STATIC_LIBS="-lcurses ${STATIC_LIBS}"
+	LIBS="-lcurses ${LIBS}"
 	OPTIONAL_BASES="${OPTIONAL_BASES} terminfo"
 	],
 	[
@@ -733,7 +716,7 @@ AC_CHECK_LIB([ncurses], [tparm],
 	    [
 	    AC_DEFINE([HAVE_LIBTERMCAP], [1],
 		[Define to 1 if you have the `termcap' library (-ltermcap).])
-	    STATIC_LIBS="-ltermcap ${STATIC_LIBS}"
+	    LIBS="-ltermcap ${LIBS}"
 	    ],
 	    [
 	    OPTIONAL_BASES="${OPTIONAL_BASES} termcap tparam"
@@ -914,36 +897,26 @@ if test "${with_libpq}" != no; then
 	])
 fi
 
-dnl Decide whether we're using static or dynamic libraries.
-if test "${enable_static_libs}" = no; then
-    AC_CHECK_FUNC([dlopen],
+dnl Check for dynamic loader support.
+AC_CHECK_FUNC([dlopen],
+    [],
+    [
+    AC_CHECK_LIB([dl], [dlopen],
 	[
-	LIBS="${STATIC_LIBS} ${LIBS}"
+	AC_DEFINE([HAVE_LIBDL], [1],
+	    [Define to 1 if you have the `dl' library (-ldl).])
+	LIBS="-ldl ${LIBS}"
 	],
 	[
-	AC_CHECK_LIB([dl], [dlopen],
-	    [
-	    AC_DEFINE([HAVE_LIBDL], [1],
-		[Define to 1 if you have the `dl' library (-ldl).])
-	    LIBS="${STATIC_LIBS} -ldl ${LIBS}"
-	    ],
-	    [
-	    if test ${mit_scheme_native_code} = c; then
-		AC_MSG_ERROR(
-		    [--enable-native-code=c requires dynamic loader support])
-	    fi
-	    enable_static_libs=yes
-	    ])
+	if test ${mit_scheme_native_code} = c; then
+	    AC_MSG_ERROR(
+		[--enable-native-code=c requires dynamic loader support])
+	fi
 	])
-fi
-if test ${enable_static_libs} != no; then
-    STATIC_LIBS=${MODULE_LIBS}${STATIC_LIBS}
-else
-    STATIC_LIBS=
-    OPTIONAL_BASES="${OPTIONAL_BASES} pruxdld"
-    AC_DEFINE([UX_DLD_ENABLED], [1],
-	[Define to 1 if unix dynamic loading support is enabled.])
-fi
+    ])
+OPTIONAL_BASES="${OPTIONAL_BASES} pruxdld"
+AC_DEFINE([UX_DLD_ENABLED], [1],
+    [Define to 1 if unix dynamic loading support is enabled.])
 
 if test ${enable_valgrind_mode} != no; then
     SCHEME_DEFS="${SCHEME_DEFS} -DVALGRIND_MODE"
@@ -1016,9 +989,6 @@ AC_SUBST([GC_HEAD_FILES])
 AC_SUBST([M4_FLAGS])
 AC_SUBST([OPTIONAL_SOURCES])
 AC_SUBST([OPTIONAL_OBJECTS])
-AC_SUBST([STATIC_LIBS])
-AC_SUBST([STATIC_PREFIX])
-AC_SUBST([STATIC_SUFFIX])
 AC_SUBST([PRBFISH_LIBS])
 AC_SUBST([PRMD5_LIBS])
 AC_SUBST([SCHEME_DEFS])
diff --git a/src/microcode/makegen/Makefile.in.in b/src/microcode/makegen/Makefile.in.in
index a5153b9f4..9e89e5224 100644
--- a/src/microcode/makegen/Makefile.in.in
+++ b/src/microcode/makegen/Makefile.in.in
@@ -101,7 +101,6 @@ STD_OBJECTS = @(write-objects "files-core")@ \
 GC_HEAD_FILES = @GC_HEAD_FILES@
 OPTIONAL_SOURCES = @OPTIONAL_SOURCES@
 OPTIONAL_OBJECTS = @OPTIONAL_OBJECTS@
-STATIC_LIBS = @STATIC_PREFIX@ @STATIC_LIBS@ @STATIC_SUFFIX@
 PRBFISH_LIBS = @PRBFISH_LIBS@
 PRMD5_LIBS = @PRMD5_LIBS@
 
@@ -127,7 +126,7 @@ scheme_SOURCES = $(STD_SOURCES) usrdef.c $(LIARC_SOURCES)
 scheme_OBJECTS = $(STD_OBJECTS) usrdef.o $(LIARC_OBJECTS)
 scheme_DEPENDENCIES = 
 scheme_LDFLAGS = @SCHEME_LDFLAGS@
-scheme_LIBS = $(STATIC_LIBS) $(LIBS)
+scheme_LIBS = $(LIBS)
 SCHEME_EXE = scheme
 
 findprim_SOURCES = findprim.c