From d077473517d2f5d62a297037b466826b4f0d7d11 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Kochma=C5=84ski?= Date: Sat, 29 Aug 2015 20:25:31 +0200 Subject: [PATCH] changelog: check for GC_get_thr_restart_signal only on threaded build MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ECL checked for GC_get_thr_restart_signal even if was built without threads. This function is present in boehm only when it's build with threads, but we don't need this functionality for single-threaded builds. Fixes #146. Signed-off-by: Daniel Kochmański --- src/aclocal.m4 | 4 ++-- src/configure | 44 ++++++++++++++++++++++---------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 557684c..6a74edd 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -935,12 +935,12 @@ if test "${enable_boehm}" = auto -o "${enable_boehm}" = system; then dnl Try first with the prebuilt versions, if installed and accessible dnl system_boehm=yes - AC_CHECK_LIB( [gc], [GC_get_thr_restart_signal], - [], [system_boehm="no"] ) if test "${enable_threads}" = no; then AC_CHECK_LIB( [gc], [GC_malloc], [], [system_boehm="no"] ) else + AC_CHECK_LIB( [gc], [GC_get_thr_restart_signal], + [], [system_boehm="no"] ) AC_CHECK_LIB( [gc], [GC_register_my_thread], [], [system_boehm="no"] ) fi diff --git a/src/configure b/src/configure index 51e93fd..585a4ee 100755 --- a/src/configure +++ b/src/configure @@ -5841,9 +5841,10 @@ case "${enable_boehm}" in esac if test "${enable_boehm}" = auto -o "${enable_boehm}" = system; then system_boehm=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GC_get_thr_restart_signal in -lgc" >&5 -$as_echo_n "checking for GC_get_thr_restart_signal in -lgc... " >&6; } -if ${ac_cv_lib_gc_GC_get_thr_restart_signal+:} false; then : + if test "${enable_threads}" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GC_malloc in -lgc" >&5 +$as_echo_n "checking for GC_malloc in -lgc... " >&6; } +if ${ac_cv_lib_gc_GC_malloc+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5857,27 +5858,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char GC_get_thr_restart_signal (); +char GC_malloc (); int main () { -return GC_get_thr_restart_signal (); +return GC_malloc (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gc_GC_get_thr_restart_signal=yes + ac_cv_lib_gc_GC_malloc=yes else - ac_cv_lib_gc_GC_get_thr_restart_signal=no + ac_cv_lib_gc_GC_malloc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_get_thr_restart_signal" >&5 -$as_echo "$ac_cv_lib_gc_GC_get_thr_restart_signal" >&6; } -if test "x$ac_cv_lib_gc_GC_get_thr_restart_signal" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_malloc" >&5 +$as_echo "$ac_cv_lib_gc_GC_malloc" >&6; } +if test "x$ac_cv_lib_gc_GC_malloc" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGC 1 _ACEOF @@ -5888,10 +5889,10 @@ else system_boehm="no" fi - if test "${enable_threads}" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GC_malloc in -lgc" >&5 -$as_echo_n "checking for GC_malloc in -lgc... " >&6; } -if ${ac_cv_lib_gc_GC_malloc+:} false; then : + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GC_get_thr_restart_signal in -lgc" >&5 +$as_echo_n "checking for GC_get_thr_restart_signal in -lgc... " >&6; } +if ${ac_cv_lib_gc_GC_get_thr_restart_signal+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5905,27 +5906,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char GC_malloc (); +char GC_get_thr_restart_signal (); int main () { -return GC_malloc (); +return GC_get_thr_restart_signal (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gc_GC_malloc=yes + ac_cv_lib_gc_GC_get_thr_restart_signal=yes else - ac_cv_lib_gc_GC_malloc=no + ac_cv_lib_gc_GC_get_thr_restart_signal=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_malloc" >&5 -$as_echo "$ac_cv_lib_gc_GC_malloc" >&6; } -if test "x$ac_cv_lib_gc_GC_malloc" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_get_thr_restart_signal" >&5 +$as_echo "$ac_cv_lib_gc_GC_get_thr_restart_signal" >&6; } +if test "x$ac_cv_lib_gc_GC_get_thr_restart_signal" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGC 1 _ACEOF @@ -5936,7 +5937,6 @@ else system_boehm="no" fi - else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GC_register_my_thread in -lgc" >&5 $as_echo_n "checking for GC_register_my_thread in -lgc... " >&6; } if ${ac_cv_lib_gc_GC_register_my_thread+:} false; then : -- 2.9.0