dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-AC_REVISION([$Id: configure.in,v 11.8 2001/03/08 06:27:58 cph Exp $])
+AC_REVISION([$Id: configure.in,v 11.9 2001/03/09 15:49:03 cph Exp $])
AC_INIT(boot.c)
AC_CONFIG_HEADER(config.h)
QUASI_STATIC_LIBS=
STATIC_PREFIX=
STATIC_SUFFIX=
-CRYPTO_TARGETS=
PRBFISH_LIBS=
PRMD5_LIBS=
SCHEME_DEFS=
DLD_LDFLAGS=
+MODULE_BASES=
+MODULE_CFLAGS=
+MODULE_LDFLAGS=
dnl Checks for programs.
AC_PROG_CC
if test "${scheme_cv_lib_crypto}" = "yes"; then
AC_DEFINE(HAVE_LIBCRYPTO)
if test "${enable_dynamic_crypto}" = "yes"; then
- CRYPTO_TARGETS="${CRYPTO_TARGETS} prbfish.so prmd5.so"
+ MODULE_BASES="${MODULE_BASES} prbfish prmd5"
PRBFISH_LIBS="-lcrypto"
PRMD5_LIBS="-lcrypto"
else
if test "${scheme_cv_lib_mhash}" = "yes"; then
AC_DEFINE(HAVE_LIBMHASH)
if test "${enable_dynamic_crypto}" = "yes"; then
- CRYPTO_TARGETS="${CRYPTO_TARGETS} prmhash.so"
+ MODULE_BASES="${MODULE_BASES} prmhash"
else
QUASI_STATIC_LIBS="${QUASI_STATIC_LIBS} -lmhash"
OPTIONAL_BASES="${OPTIONAL_BASES} prmhash"
if test "${scheme_cv_lib_mcrypt}" = "yes"; then
AC_DEFINE(HAVE_LIBMCRYPT)
if test "${enable_dynamic_crypto}" = "yes"; then
- CRYPTO_TARGETS="${CRYPTO_TARGETS} prmcrypt.so"
+ MODULE_BASES="${MODULE_BASES} prmcrypt"
else
QUASI_STATIC_LIBS="${QUASI_STATIC_LIBS} -lmcrypt -lltdl"
OPTIONAL_BASES="${OPTIONAL_BASES} prmcrypt"
if test "${scheme_cv_lib_blowfish}" = "yes"; then
AC_DEFINE(HAVE_LIBBLOWFISH)
if test "${enable_dynamic_crypto}" = "yes"; then
- CRYPTO_TARGETS="${CRYPTO_TARGETS} prbfish.so"
+ MODULE_BASES="${MODULE_BASES} prbfish"
PRBFISH_LIBS="-lblowfish"
else
STATIC_LIBS="${STATIC_LIBS} -lblowfish"
if test "${scheme_cv_lib_md5}" = "yes"; then
AC_DEFINE(HAVE_LIBMD5)
if test "${enable_dynamic_crypto}" = "yes"; then
- CRYPTO_TARGETS="${CRYPTO_TARGETS} prmd5.so"
+ MODULE_BASES="${MODULE_BASES} prmd5"
PRMD5_LIBS="-lmd5"
else
STATIC_LIBS="${STATIC_LIBS} -lmd5"
STATIC_PREFIX="-Xlinker -Bstatic"
STATIC_SUFFIX="-Xlinker -Bdynamic"
fi
- DLD_LDFLAGS="-export-dynamic"
+ DLD_LDFLAGS="${DLD_LDFLAGS} -export-dynamic"
+ MODULE_CFLAGS="${MODULE_CFLAGS} -fPIC"
+ MODULE_LDFLAGS="${MODULE_LDFLAGS} -shared"
AC_MSG_CHECKING([for ELF binaries])
AC_TRY_RUN(
[int
OPTIONAL_OBJECTS="${OPTIONAL_OBJECTS} ${base}.o"
done
+
+MODULE_TARGETS=
+if test "${MODULE_BASES}" = ""; then
+ MODULE_RULES="/dev/null"
+else
+ MODULE_RULES="config.modrules"
+ rm -f "${MODULE_RULES}"
+ for BASE in ${MODULE_BASES}; do
+ MODULE_TARGETS="${MODULE_TARGETS} ${BASE}.so"
+ echo "" >> "${MODULE_RULES}"
+ echo "${BASE}.o: ${BASE}.c" >> "${MODULE_RULES}"
+ echo " \$(COMPILE_MODULE) -c \$*.c" >> "${MODULE_RULES}"
+ done
+fi
+
AC_SUBST(AS_FLAGS)
AC_SUBST(GC_HEAD_FILES)
AC_SUBST(LIB_X11)
AC_SUBST(STATIC_LIBS)
AC_SUBST(STATIC_PREFIX)
AC_SUBST(STATIC_SUFFIX)
-AC_SUBST(CRYPTO_TARGETS)
AC_SUBST(PRBFISH_LIBS)
AC_SUBST(PRMD5_LIBS)
AC_SUBST(SCHEME_DEFS)
AC_SUBST(DLD_LDFLAGS)
+AC_SUBST(MODULE_TARGETS)
+AC_SUBST_FILE(MODULE_RULES)
+AC_SUBST(MODULE_CFLAGS)
+AC_SUBST(MODULE_LDFLAGS)
AC_OUTPUT(Makefile)
+
+if test "${MODULE_RULES}" != "/dev/null"; then
+ rm -f "${MODULE_RULES}"
+fi
-# $Id: Makefile.in.in,v 1.15 2001/03/08 18:05:12 cph Exp $
+# $Id: Makefile.in.in,v 1.16 2001/03/09 15:49:20 cph Exp $
#
# Copyright (c) 2000-2001 Massachusetts Institute of Technology
#
OPTIONAL_OBJECTS = @OPTIONAL_OBJECTS@
STATIC_LIBS = @STATIC_PREFIX@ @STATIC_LIBS@ @STATIC_SUFFIX@
X_LIBS = @X_PRE_LIBS@ @LIB_X11@ @X_EXTRA_LIBS@
-CRYPTO_TARGETS = @CRYPTO_TARGETS@
PRBFISH_LIBS = @PRBFISH_LIBS@
PRMD5_LIBS = @PRMD5_LIBS@
+MODULE_TARGETS = @MODULE_TARGETS@
+MODULE_CFLAGS = @MODULE_CFLAGS@
+MODULE_LDFLAGS = @MODULE_LDFLAGS@
+COMPILE_MODULE = $(COMPILE) $(MODULE_CFLAGS)
+LINK_MODULE = $(LINK) $(MODULE_LDFLAGS)
+MODULE_LIBS = -lc
+
# **** Non-configured files ****
CORE_SOURCES = @(write-sources "files-core")@
bin_PROGRAMS = scheme bchscheme
aux_PROGRAMS = gcdrone
-aux_LIBS = $(CRYPTO_TARGETS)
+aux_LIBS = $(MODULE_TARGETS)
aux_DATA = utabmd.bin
EXTRA_PROGRAMS = findprim bintopsb psbtobin
scheme -compiler -eval '(sf "utabmd")' < /dev/null
prbfish.so: prbfish.o
- ld -shared -o $@ $^ $(PRBFISH_LIBS)
+ $(LINK_MODULE) $^ $(PRBFISH_LIBS) $(MODULE_LIBS)
prmd5.so: prmd5.o
- ld -shared -o $@ $^ $(PRMD5_LIBS)
+ $(LINK_MODULE) $^ $(PRMD5_LIBS) $(MODULE_LIBS)
prmhash.so: prmhash.o
- ld -shared -o $@ $^ -lmhash
+ $(LINK_MODULE) $^ -lmhash $(MODULE_LIBS)
prmcrypt.so: prmcrypt.o
- ld -shared -o $@ $^ -lmcrypt -lltdl
+ $(LINK_MODULE) $^ -lmcrypt -lltdl $(MODULE_LIBS)
+
+@MODULE_RULES@
tags: TAGS
TAGS: