X-Git-Url: http://git.hcoop.net/bpt/guile.git/blobdiff_plain/705edb959b3093cb1cbe1390110d96ee833b63fc..c08adae4602e8aa2ac7d1d174292953f5a1ff2a7:/acinclude.m4 diff --git a/acinclude.m4 b/acinclude.m4 index ed537d0bd..8cfe1d41f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -57,7 +57,7 @@ AC_DEFUN([GUILE_HEADER_LIBC_WITH_UNISTD], ] ) if test "$guile_cv_header_libc_with_unistd" = yes; then - AC_DEFINE(LIBC_H_WITH_UNISTD_H, 1, + AC_DEFINE([LIBC_H_WITH_UNISTD_H], 1, [Define this if we should include when we've already included . On some systems, they conflict, and libc.h should be omitted. See GUILE_HEADER_LIBC_WITH_UNISTD in @@ -267,7 +267,7 @@ if test "x$acx_pthread_ok" = xyes; then done AC_MSG_RESULT($attr_name) if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, + AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], $attr_name, [Define to necessary symbol if this constant uses a non-standard name on your system.]) fi @@ -302,7 +302,7 @@ AC_SUBST(PTHREAD_CC) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) + ifelse([$1],,AC_DEFINE([HAVE_PTHREAD],1,[Define if you have POSIX threads libraries and header files.]),[$1]) : else acx_pthread_ok=no @@ -341,10 +341,28 @@ dnl Check for compiler thread-local storage (TLS) support. AC_DEFUN([GUILE_THREAD_LOCAL_STORAGE], [ AC_CACHE_CHECK([whether the `__thread' storage class is available], [ac_cv_have_thread_storage_class], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([__thread int tls_integer;], + [dnl On some systems, e.g., NetBSD 5.0 with GCC 4.1, `__thread' is + dnl properly compiled but fails to link due to the lack of TLS + dnl support in the C library. Thus we try to link, not just + dnl compile. Unfortunately, this test is not enough, so we + dnl explicitly check for known-broken systems. See + dnl http://lists.gnu.org/archive/html/guile-devel/2009-10/msg00138.html + dnl for details. + dnl + dnl Known broken systems includes: + dnl - x86_64-unknown-netbsd5.0. + dnl - sparc-sun-solaris2.8 + case "x$enable_shared--$host" in + xyes--*netbsd[0-5].[0-9].|xyes--*solaris2.8) + ac_cv_have_thread_storage_class="no" + ;; + *) + AC_LINK_IFELSE([AC_LANG_PROGRAM([__thread int tls_integer;], [tls_integer = 123;])], - [ac_cv_have_thread_storage_class="yes"], - [ac_cv_have_thread_storage_class="no"])]) + [ac_cv_have_thread_storage_class="yes"], + [ac_cv_have_thread_storage_class="no"]) + ;; + esac]) if test "x$ac_cv_have_thread_storage_class" = "xyes"; then SCM_I_GSC_HAVE_THREAD_STORAGE_CLASS=1 @@ -360,7 +378,7 @@ dnl dnl Check all the things needed by `guile-readline', the Readline dnl bindings. AC_DEFUN([GUILE_READLINE], [ - for termlib in ncurses curses termcap terminfo termlib ; do + for termlib in ncurses curses termcap terminfo termlib pdcurses ; do AC_CHECK_LIB(${termlib}, [tgoto], [READLINE_LIBS="-l${termlib} $READLINE_LIBS"; break]) done