diff options
author | joerg <joerg@pkgsrc.org> | 2008-04-24 07:45:49 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2008-04-24 07:45:49 +0000 |
commit | f8f9e4deb621a162171b0ea11fe9d79f1d33495b (patch) | |
tree | 4f2d97cbe4ee8d9a10327107e0cbfab59f2cc136 /x11/libX11/patches | |
parent | c62d464f56c230ceca9bfeaf378e86f87376ac1e (diff) | |
download | pkgsrc-f8f9e4deb621a162171b0ea11fe9d79f1d33495b.tar.gz |
Make sure that configure includes pthread.h when checking for pthread
stubs as they are macros at least on NetBSD. Bump revision.
Diffstat (limited to 'x11/libX11/patches')
-rw-r--r-- | x11/libX11/patches/patch-aa | 19 | ||||
-rw-r--r-- | x11/libX11/patches/patch-ac | 112 |
2 files changed, 124 insertions, 7 deletions
diff --git a/x11/libX11/patches/patch-aa b/x11/libX11/patches/patch-aa index abb2488ce00..b82d8c6a8fb 100644 --- a/x11/libX11/patches/patch-aa +++ b/x11/libX11/patches/patch-aa @@ -1,8 +1,21 @@ -$NetBSD: patch-aa,v 1.3 2007/08/01 16:48:41 joerg Exp $ +$NetBSD: patch-aa,v 1.4 2008/04/24 07:45:49 joerg Exp $ ---- configure.ac.orig 2007-07-27 18:02:55.000000000 +0200 +Include pthread.h as thread stubs might be macros like on NetBSD. + +Define conditional for cross-compiling support. + +--- configure.ac.orig 2008-03-06 21:48:26.000000000 +0100 +++ configure.ac -@@ -304,6 +304,8 @@ else +@@ -180,7 +180,7 @@ esac + AC_SUBST(XTHREADS) + AC_SUBST(XUSE_MTSAFE_API) + +-AC_CHECK_LIB(c, pthread_self, [thrstubs="no"], [thrstubs="yes"]) ++AC_CHECK_DECLS([pthread_self], [thrstubs="no"], [thrstubs="yes"], [[#include <pthread.h>]]) + AM_CONDITIONAL(THRSTUBS, test x$thrstubs = xyes) + + dnl XXX incomplete, please fill this in +@@ -322,6 +322,8 @@ else fi AC_SUBST(XKBPROTO_REQUIRES) diff --git a/x11/libX11/patches/patch-ac b/x11/libX11/patches/patch-ac index 09fdb9c2dc5..b07f4a2b594 100644 --- a/x11/libX11/patches/patch-ac +++ b/x11/libX11/patches/patch-ac @@ -1,6 +1,6 @@ -$NetBSD: patch-ac,v 1.3 2008/04/17 12:33:56 wiz Exp $ +$NetBSD: patch-ac,v 1.4 2008/04/24 07:45:49 joerg Exp $ ---- configure.orig 2008-03-06 20:48:42.000000000 +0000 +--- configure.orig 2008-03-06 21:48:42.000000000 +0100 +++ configure @@ -927,6 +927,8 @@ XKB_FALSE XKBPROTO_CFLAGS @@ -11,7 +11,111 @@ $NetBSD: patch-ac,v 1.3 2008/04/17 12:33:56 wiz Exp $ LINT LINT_FLAGS LINT_TRUE -@@ -23507,6 +23509,15 @@ else +@@ -22885,43 +22887,38 @@ esac + + + +-{ echo "$as_me:$LINENO: checking for pthread_self in -lc" >&5 +-echo $ECHO_N "checking for pthread_self in -lc... $ECHO_C" >&6; } +-if test "${ac_cv_lib_c_pthread_self+set}" = set; then ++{ echo "$as_me:$LINENO: checking whether pthread_self is declared" >&5 ++echo $ECHO_N "checking whether pthread_self is declared... $ECHO_C" >&6; } ++if test "${ac_cv_have_decl_pthread_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lc $LIBS" +-cat >conftest.$ac_ext <<_ACEOF ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ ++#include <pthread.h> + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char pthread_self (); + int + main () + { +-return pthread_self (); ++#ifndef pthread_self ++ (void) pthread_self; ++#endif ++ + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +- (eval "$ac_link") 2>conftest.er1 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 +@@ -22930,28 +22927,35 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err +- } && test -s conftest$ac_exeext && +- $as_test_x conftest$ac_exeext; then +- ac_cv_lib_c_pthread_self=yes ++ } && test -s conftest.$ac_objext; then ++ ac_cv_have_decl_pthread_self=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_lib_c_pthread_self=no ++ ac_cv_have_decl_pthread_self=no + fi + +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_self" >&5 +-echo "${ECHO_T}$ac_cv_lib_c_pthread_self" >&6; } +-if test $ac_cv_lib_c_pthread_self = yes; then +- thrstubs="no" ++{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_pthread_self" >&5 ++echo "${ECHO_T}$ac_cv_have_decl_pthread_self" >&6; } ++if test $ac_cv_have_decl_pthread_self = yes; then ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_PTHREAD_SELF 1 ++_ACEOF ++ ++thrstubs="no" + else +- thrstubs="yes" ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_PTHREAD_SELF 0 ++_ACEOF ++ ++thrstubs="yes" + fi + ++ + if test x$thrstubs = xyes; then + THRSTUBS_TRUE= + THRSTUBS_FALSE='#' +@@ -23507,6 +23511,15 @@ else fi @@ -27,7 +131,7 @@ $NetBSD: patch-ac,v 1.3 2008/04/17 12:33:56 wiz Exp $ for ac_header in stdlib.h unistd.h -@@ -24641,6 +24652,13 @@ echo "$as_me: error: conditional \"XKB\" +@@ -24641,6 +24654,13 @@ echo "$as_me: error: conditional \"XKB\" Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi |