X-Git-Url: http://git.hcoop.net/bpt/guile.git/blobdiff_plain/0dbc5e571aa3bdb73fd0b9b1631e502167c4325a..afdcb073d3f8f9c107f31485e3121b16a5a3e1e6:/configure.ac diff --git a/configure.ac b/configure.ac index 34c4aa451..55bfafcec 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ dnl define(GUILE_CONFIGURE_COPYRIGHT,[[ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. + 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. This file is part of GUILE @@ -51,6 +51,10 @@ GUILE_VERSION="$PACKAGE_VERSION" AC_CONFIG_HEADERS([config.h]) AH_TOP(/*GUILE_CONFIGURE_COPYRIGHT*/) +dnl We require the pkg.m4 set of macros from pkg-config. +dnl Make sure it's available. +m4_pattern_forbid([PKG_CHECK_MODULES]) + #-------------------------------------------------------------------- AC_LANG([C]) @@ -72,6 +76,13 @@ AM_PROG_AR 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 . +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 @@ -1409,10 +1420,13 @@ AM_CONDITIONAL([BUILD_PTHREAD_SUPPORT], [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" @@ -1488,7 +1502,8 @@ AC_SUBST(HOST_CC) GUILE_CHECK_GUILE_FOR_BUILD -## If we're using GCC, ask for aggressive warnings. +## If we're using GCC, add flags to reduce strictness of undefined +## behavior, and ask for aggressive warnings. GCC_CFLAGS="" case "$GCC" in yes ) @@ -1498,13 +1513,13 @@ case "$GCC" in ## -Wundef was removed because Gnulib prevented it (see ## .) - ## Build with `-fno-strict-aliasing' to prevent miscompilation on - ## some platforms. See + ## Build with `-fno-strict-aliasing' and `-fwrapv' to prevent + ## miscompilation on some platforms. See ## . POTENTIAL_GCC_CFLAGS="-Wall -Wmissing-prototypes \ -Wdeclaration-after-statement -Wpointer-arith \ - -Wswitch-enum -fno-strict-aliasing" + -Wswitch-enum -fno-strict-aliasing -fwrapv" # Do this here so we don't screw up any of the tests above that might # not be "warning free" if test "${GUILE_ERROR_ON_WARNING}" = yes @@ -1597,15 +1612,14 @@ AC_SUBST(top_builddir_absolute) top_srcdir_absolute=`(cd $srcdir && pwd)` AC_SUBST(top_srcdir_absolute) +dnl Add -I flag so that lib/glthread/lock.h finds . +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]) @@ -1642,7 +1656,6 @@ GUILE_CONFIG_SCRIPT([benchmark-guile]) 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])