dnl Gnulib.
gl_INIT
+dnl We provide our own lib/glthread/lock.h, so let other Gnulib modules
+dnl know that we have it. This allows them to be compiled with adequate
+dnl locking support. See <http://bugs.gnu.org/14404>.
+AC_DEFINE([GNULIB_LOCK], [1],
+ [Define to allow Gnulib modules to use Guile's locks.])
+
+
AC_PROG_CC_C89
# for per-target cflags in the libguile subdir
AC_TYPE_SIGNAL
AC_TYPE_MODE_T
-# On mingw -lm is empty, so this test is unnecessary, but it's
-# harmless so we don't hard-code to suppress it.
-#
-AC_CHECK_LIB(m, cos)
+dnl Check whether we need -lm.
+LT_LIB_M
+LIBS="$LIBS $LIBM"
AC_CHECK_FUNCS(gethostbyname)
if test $ac_cv_func_gethostbyname = no; then
strcoll strcoll_l newlocale utimensat sched_getaffinity \
sched_setaffinity sendfile])
-AM_CONDITIONAL([BUILD_ICE_9_POPEN],
- [test "x$enable_posix" = "xyes" && test "x$ac_cv_func_fork" = "xyes"])
-
# Reasons for testing:
# netdb.h - not in mingw
# sys/param.h - not in mingw
# pthread_attr_get_np - "np" meaning "non portable" says it
# all; specific to FreeBSD
# pthread_sigmask - not available on mingw
+ # pthread_cancel - not available on Android (Bionic libc)
#
- AC_CHECK_FUNCS(pthread_attr_getstack pthread_getattr_np pthread_get_stackaddr_np pthread_attr_get_np pthread_sigmask)
+ AC_CHECK_FUNCS([pthread_attr_getstack pthread_getattr_np \
+ pthread_get_stackaddr_np pthread_attr_get_np pthread_sigmask \
+ pthread_cancel])
# On past versions of Solaris, believe 8 through 10 at least, you
# had to write "pthread_once_t foo = { PTHREAD_ONCE_INIT };".
[test "x$build_pthread_support" = "xyes"])
-## Check whether pthread_attr_getstack works for the main thread
-
if test "$with_threads" = pthreads; then
+dnl Normally Gnulib's 'threadlib' module would define this macro, but
+dnl since we don't use it, define it by ourselves.
+AC_DEFINE([USE_POSIX_THREADS], [1],
+ [Define to let Gnulib modules know that we use POSIX threads.])
+
AC_MSG_CHECKING([whether pthread_attr_getstack works for the main thread])
old_CFLAGS="$CFLAGS"
CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
top_srcdir_absolute=`(cd $srcdir && pwd)`
AC_SUBST(top_srcdir_absolute)
+dnl Add -I flag so that lib/glthread/lock.h finds <libguile/threads.h>.
+CPPFLAGS="-I$top_srcdir_absolute $CPPFLAGS"
+
dnl `sitedir' goes into libpath.h and the pkg-config file.
pkgdatadir="$datadir/$PACKAGE_TARNAME"
sitedir="$pkgdatadir/site/$GUILE_EFFECTIVE_VERSION"
AC_SUBST([sitedir])
-dnl Name of the `guile' program.
-guile_program_name="`echo guile | "$SED" "$program_transform_name"`"
-AC_SUBST([guile_program_name])
-
# Additional SCM_I_GSC definitions are above.
AC_SUBST([SCM_I_GSC_GUILE_DEBUG])
AC_SUBST([SCM_I_GSC_ENABLE_DEPRECATED])
GUILE_CONFIG_SCRIPT([meta/guile])
GUILE_CONFIG_SCRIPT([meta/uninstalled-env])
GUILE_CONFIG_SCRIPT([meta/gdb-uninstalled-guile])
-GUILE_CONFIG_SCRIPT([meta/guild])
GUILE_CONFIG_SCRIPT([libguile/guile-snarf])
GUILE_CONFIG_SCRIPT([libguile/guile-snarf-docs])
GUILE_CONFIG_SCRIPT([test-suite/standalone/test-use-srfi])