* Makefile.am (BUILT_SOURCES): Added cpp_err_symbols.c,

cpp_sig_symbols.c, libpath.h and versiondat.h to BUILT_SOURCES
(libpath.h, versiondat.h): Replaced dependency on Makefile with
dependencies on $(srcdir)/Makefile.in
$(top_builddir)/config.status in order to avoid circularity.

* configure.in (GUILE_LIBS): New variable.  Contains libraries
which libguile needs to be linked with.  Substituted into
libpath.h.

* threads.m4 (threads_package): Don't add $LDFLAGS and $LIBS to
$cy_cv_threads_libs.
This commit is contained in:
Mikael Djurfeldt 1998-04-18 21:57:32 +00:00
commit daa4f38c59
11 changed files with 38 additions and 128 deletions

View file

@ -62,6 +62,7 @@ host_triplet = @host@
AWK = @AWK@
CC = @CC@
CPP = @CPP@
GUILE_LIBS = @GUILE_LIBS@
GUILE_MAJOR_VERSION = @GUILE_MAJOR_VERSION@
GUILE_MINOR_VERSION = @GUILE_MINOR_VERSION@
GUILE_STAMP = @GUILE_STAMP@

1
aclocal.m4 vendored
View file

@ -622,7 +622,6 @@ dnl
dnl Set the appropriate flags!
dnl
cy_cv_threads_cflags="$CPPFLAGS $cy_cv_threads_cflags"
cy_cv_threads_libs="$LDFLAGS $LIBS $cy_cv_threads_libs"
cy_cv_threads_package=$threads_package
CPPFLAGS="$saved_CPP"
LDFLAGS="$saved_LD"

View file

@ -65,6 +65,7 @@ host_triplet = @host@
AWK = @AWK@
CC = @CC@
CPP = @CPP@
GUILE_LIBS = @GUILE_LIBS@
GUILE_MAJOR_VERSION = @GUILE_MAJOR_VERSION@
GUILE_MINOR_VERSION = @GUILE_MINOR_VERSION@
GUILE_STAMP = @GUILE_STAMP@

8
configure vendored
View file

@ -4169,7 +4169,6 @@ fi
rm -f conftest*
fi
cy_cv_threads_cflags="$CPPFLAGS $cy_cv_threads_cflags"
cy_cv_threads_libs="$LDFLAGS $LIBS $cy_cv_threads_libs"
cy_cv_threads_package=$threads_package
CPPFLAGS="$saved_CPP"
LDFLAGS="$saved_LD"
@ -4255,7 +4254,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4259: checking for $ac_word" >&5
echo "configure:4258: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4292,6 +4291,8 @@ LIBLOBJS="`echo ${LIBOBJS} | sed 's/\.o/.lo/g'`"
GUILE_LIBS="$LDFLAGS $THREAD_LIBS $LIBS"
GUILE_STAMP="`date`"
@ -4314,7 +4315,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:4318: checking host system type" >&5
echo "configure:4319: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@ -4566,6 +4567,7 @@ s%@AWK@%$AWK%g
s%@GUILE_MAJOR_VERSION@%$GUILE_MAJOR_VERSION%g
s%@GUILE_MINOR_VERSION@%$GUILE_MINOR_VERSION%g
s%@GUILE_VERSION@%$GUILE_VERSION%g
s%@GUILE_LIBS@%$GUILE_LIBS%g
s%@GUILE_STAMP@%$GUILE_STAMP%g
s%@LIBLOBJS@%$LIBLOBJS%g
s%@target_libs@%$target_libs%g

View file

@ -348,6 +348,8 @@ LIBLOBJS="`echo ${LIBOBJS} | sed 's/\.o/.lo/g'`"
AC_SUBST(GUILE_MAJOR_VERSION)
AC_SUBST(GUILE_MINOR_VERSION)
AC_SUBST(GUILE_VERSION)
GUILE_LIBS="$LDFLAGS $THREAD_LIBS $LIBS"
AC_SUBST(GUILE_LIBS)
dnl timestamping the interpreter and scheme libraries:
dnl

View file

@ -62,6 +62,7 @@ host_triplet = @host@
AWK = @AWK@
CC = @CC@
CPP = @CPP@
GUILE_LIBS = @GUILE_LIBS@
GUILE_MAJOR_VERSION = @GUILE_MAJOR_VERSION@
GUILE_MINOR_VERSION = @GUILE_MINOR_VERSION@
GUILE_STAMP = @GUILE_STAMP@

View file

@ -62,6 +62,7 @@ host_triplet = @host@
AWK = @AWK@
CC = @CC@
CPP = @CPP@
GUILE_LIBS = @GUILE_LIBS@
GUILE_MAJOR_VERSION = @GUILE_MAJOR_VERSION@
GUILE_MINOR_VERSION = @GUILE_MINOR_VERSION@
GUILE_STAMP = @GUILE_STAMP@
@ -110,6 +111,7 @@ libguile_la_SOURCES = \
version.c vports.c weaks.c fluids.c
BUILT_SOURCES = \
cpp_err_symbols.c cpp_sig_symbols.c libpath.h versiondat.h \
alist.x appinit.x arbiters.x async.x boolean.x chars.x \
continuations.x dynl.x dynwind.x eq.x error.x eval.x feature.x \
filesys.x fports.x gc.x gdbint.x genio.x gh_data.x gh_eval.x \
@ -238,25 +240,26 @@ TAR = tar
GZIP = --best
DEP_FILES = .deps/alist.P .deps/alloca.P .deps/appinit.P \
.deps/arbiters.P .deps/async.P .deps/backtrace.P .deps/boolean.P \
.deps/chars.P .deps/continuations.P .deps/debug.P .deps/dynl.P \
.deps/dynwind.P .deps/eq.P .deps/error.P .deps/eval.P .deps/feature.P \
.deps/filesys.P .deps/fluids.P .deps/fports.P .deps/gc.P .deps/gdbint.P \
.deps/genio.P .deps/gh_data.P .deps/gh_eval.P .deps/gh_funcs.P \
.deps/gh_init.P .deps/gh_io.P .deps/gh_list.P .deps/gh_predicates.P \
.deps/gh_test_c.P .deps/gh_test_repl.P .deps/gsubr.P .deps/guile.P \
.deps/hash.P .deps/hashtab.P .deps/inet_aton.P .deps/init.P \
.deps/ioext.P .deps/iselect.P .deps/kw.P .deps/list.P .deps/load.P \
.deps/mallocs.P .deps/markers.P .deps/net_db.P .deps/numbers.P \
.deps/objects.P .deps/objprop.P .deps/options.P .deps/pairs.P \
.deps/ports.P .deps/posix.P .deps/print.P .deps/procprop.P \
.deps/procs.P .deps/putenv.P .deps/ramap.P .deps/read.P \
.deps/readline.P .deps/regex-posix.P .deps/root.P .deps/scmsigs.P \
.deps/script.P .deps/simpos.P .deps/smob.P .deps/socket.P \
.deps/srcprop.P .deps/stackchk.P .deps/stacks.P .deps/stime.P \
.deps/strerror.P .deps/strings.P .deps/strop.P .deps/strorder.P \
.deps/strports.P .deps/struct.P .deps/symbols.P .deps/tag.P \
.deps/threads.P .deps/throw.P .deps/unif.P .deps/variable.P \
.deps/vectors.P .deps/version.P .deps/vports.P .deps/weaks.P
.deps/chars.P .deps/continuations.P .deps/cpp_err_symbols \
.deps/cpp_sig_symbols .deps/debug.P .deps/dynl.P .deps/dynwind.P \
.deps/eq.P .deps/error.P .deps/eval.P .deps/feature.P .deps/filesys.P \
.deps/fluids.P .deps/fports.P .deps/gc.P .deps/gdbint.P .deps/genio.P \
.deps/gh_data.P .deps/gh_eval.P .deps/gh_funcs.P .deps/gh_init.P \
.deps/gh_io.P .deps/gh_list.P .deps/gh_predicates.P .deps/gh_test_c.P \
.deps/gh_test_repl.P .deps/gsubr.P .deps/guile.P .deps/hash.P \
.deps/hashtab.P .deps/inet_aton.P .deps/init.P .deps/ioext.P \
.deps/iselect.P .deps/kw.P .deps/list.P .deps/load.P .deps/mallocs.P \
.deps/markers.P .deps/net_db.P .deps/numbers.P .deps/objects.P \
.deps/objprop.P .deps/options.P .deps/pairs.P .deps/ports.P \
.deps/posix.P .deps/print.P .deps/procprop.P .deps/procs.P \
.deps/putenv.P .deps/ramap.P .deps/read.P .deps/readline.P \
.deps/regex-posix.P .deps/root.P .deps/scmsigs.P .deps/script.P \
.deps/simpos.P .deps/smob.P .deps/socket.P .deps/srcprop.P \
.deps/stackchk.P .deps/stacks.P .deps/stime.P .deps/strerror.P \
.deps/strings.P .deps/strop.P .deps/strorder.P .deps/strports.P \
.deps/struct.P .deps/symbols.P .deps/tag.P .deps/threads.P \
.deps/throw.P .deps/unif.P .deps/variable.P .deps/vectors.P \
.deps/version.P .deps/vports.P .deps/weaks.P
SOURCES = $(libguile_la_SOURCES) $(EXTRA_libguile_la_SOURCES) $(guile_SOURCES) $(gh_test_c_SOURCES) $(gh_test_repl_SOURCES)
OBJECTS = $(libguile_la_OBJECTS) $(guile_OBJECTS) $(gh_test_c_OBJECTS) $(gh_test_repl_OBJECTS)
@ -639,7 +642,7 @@ check-local:
echo '(+ 1 2 3)' | ./gh_test_c; echo
echo '(+ 1 2 3)' | ./gh_test_repl; echo
libpath.h: Makefile
libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
@echo "Generating libpath.h..."
@rm -f libpath.tmp
@echo '/* generated by Makefile */' > libpath.tmp
@ -667,11 +670,11 @@ libpath.h: Makefile
@echo ' { "pkglibdir", "$(libdir)/@PACKAGE@" }, \' >> libpath.tmp
@echo ' { "pkgincludedir", "$(includedir)/@PACKAGE@" }, \' \
>> libpath.tmp
@echo ' { "LIBS", "@THREAD_LIBS@" }, \' >> libpath.tmp
@echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp
@echo '}' >> libpath.tmp
@mv libpath.tmp libpath.h
versiondat.h: Makefile
versiondat.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
@echo "Generating versiondat.h..."
@rm -f versiondat.tmp
@echo '/* generated by Makefile */' > versiondat.tmp

View file

@ -62,6 +62,7 @@ host_triplet = @host@
AWK = @AWK@
CC = @CC@
CPP = @CPP@
GUILE_LIBS = @GUILE_LIBS@
GUILE_MAJOR_VERSION = @GUILE_MAJOR_VERSION@
GUILE_MINOR_VERSION = @GUILE_MINOR_VERSION@
GUILE_STAMP = @GUILE_STAMP@

View file

@ -62,6 +62,7 @@ host_triplet = @host@
AWK = @AWK@
CC = @CC@
CPP = @CPP@
GUILE_LIBS = @GUILE_LIBS@
GUILE_MAJOR_VERSION = @GUILE_MAJOR_VERSION@
GUILE_MINOR_VERSION = @GUILE_MINOR_VERSION@
GUILE_STAMP = @GUILE_STAMP@

View file

@ -62,6 +62,7 @@ host_triplet = @host@
AWK = @AWK@
CC = @CC@
CPP = @CPP@
GUILE_LIBS = @GUILE_LIBS@
GUILE_MAJOR_VERSION = @GUILE_MAJOR_VERSION@
GUILE_MINOR_VERSION = @GUILE_MINOR_VERSION@
GUILE_STAMP = @GUILE_STAMP@

View file

@ -1,102 +0,0 @@
dnl
dnl CY_AC_WITH_THREADS determines which thread library the user intends
dnl to put underneath guile. Pass it the path to find the guile top-level
dnl source directory. Eg CY_AC_WITH_THREADS(../..) for tcl/unix.
dnl
AC_DEFUN([CY_AC_WITH_THREADS],[
AC_CACHE_CHECK("threads package type",cy_cv_threads_package,[
AC_CACHE_VAL(cy_cv_threads_cflags,[
AC_CACHE_VAL(cy_cv_threads_libs,[
use_threads=no;
AC_ARG_WITH(threads,[ --with-threads thread interface],
use_threads=$withval, use_threads=no)
test -n "$use_threads" || use_threads=qt
threads_package=unknown
if test "$use_threads" != no; then
dnl
dnl Test for the qt threads package - used for cooperative threads
dnl This may not necessarily be built yet - so just check for the
dnl header files.
dnl
if test "$use_threads" = yes || test "$use_threads" = qt; then
# Look for qt in source directory.
if test -f $srcdir/qt/qt.c; then
qtsrcdir="`(cd $srcdir; pwd)`/qt"
threads_package=COOP
cy_cv_threads_cflags="-I$qtsrcdir -I../qt"
cy_cv_threads_libs="../qt/libqthreads.a"
fi
else
if test -f $use_threads/qt.c; then
# FIXME seems as though we should try to use an installed qt here.
threads_package=COOP
cy_cv_threads_cflags="-I$use_threads -I../qt"
cy_cv_threads_libs="../qt/libqthreads.a"
fi
fi
if test "$use_threads" = pthreads; then
# Look for pthreads in srcdir. See above to understand why
# we always set threads_package.
if test -f $srcdir/../../pthreads/pthreads/queue.c \
|| test -f $srcdir/../pthreads/pthreads/queue.c; then
threads_package=MIT
cy_cv_threads_cflags="-I$srcdir/../../pthreads/include"
cy_cv_threads_libs="-L../../pthreads/lib -lpthread"
fi
fi
saved_CPP="$CPPFLAGS"
saved_LD="$LDFLAGS"
saved_LIBS="$LIBS"
if test "$threads_package" = unknown; then
dnl
dnl Test for the FSU threads package
dnl
CPPFLAGS="-I$use_threads/include"
LDFLAGS="-L$use_threads/lib"
LIBS="-lgthreads -lmalloc"
AC_TRY_LINK([#include <pthread.h>],[
pthread_equal(NULL,NULL);
], threads_package=FSU)
fi
if test "$threads_package" = unknown; then
dnl
dnl Test for the MIT threads package
dnl
LIBS="-lpthread"
AC_TRY_LINK([#include <pthread.h>],[
pthread_equal(NULL,NULL);
], threads_package=MIT)
fi
if test "$threads_package" = unknown; then
dnl
dnl Test for the PCthreads package
dnl
LIBS="-lpthreads"
AC_TRY_LINK([#include <pthread.h>],[
pthread_equal(NULL,NULL);
], threads_package=PCthreads)
fi
dnl
dnl Set the appropriate flags!
dnl
cy_cv_threads_cflags="$CPPFLAGS $cy_cv_threads_cflags"
cy_cv_threads_libs="$LDFLAGS $LIBS $cy_cv_threads_libs"
cy_cv_threads_package=$threads_package
CPPFLAGS="$saved_CPP"
LDFLAGS="$saved_LD"
LIBS="$saved_LIBS"
if test "$threads_package" = unknown; then
AC_MSG_ERROR("cannot find thread library installation")
fi
fi
])
])
],
dnl
dnl Set flags according to what is cached.
dnl
CPPFLAGS="$cy_cv_threads_cflags"
LIBS="$cy_cv_threads_libs"
)
])