#!/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
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
)
#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]]]))
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"
OPTIONAL_BASES=
OPTIONAL_SOURCES=
OPTIONAL_OBJECTS=
-STATIC_LIBS=
-STATIC_PREFIX=
-STATIC_SUFFIX=
PRBFISH_LIBS=
PRMD5_LIBS=
SCHEME_DEFS=-DMIT_SCHEME
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
[
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],
[
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"
],
[
[
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"
])
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"
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])