| @@ -1,40 +1,40 @@ | | | @@ -1,40 +1,40 @@ |
1 | $NetBSD: patch-ac,v 1.8 2009/06/06 22:37:28 wiz Exp $ | | 1 | $NetBSD: patch-ac,v 1.9 2009/07/18 10:20:51 wiz Exp $ |
2 | | | 2 | |
3 | _POSIX_THREAD_SAFE_FUNCTIONS is not used on NetBSD. Instead, | | 3 | _POSIX_THREAD_SAFE_FUNCTIONS is not used on NetBSD. Instead, |
4 | let's use _REENTRANT. | | 4 | let's use _REENTRANT. |
5 | | | 5 | |
6 | --- configure.orig 2009-04-07 22:40:47.000000000 +0000 | | 6 | --- configure.orig 2009-07-10 04:08:41.000000000 +0000 |
7 | +++ configure | | 7 | +++ configure |
8 | @@ -929,6 +929,8 @@ XKB_FALSE | | 8 | @@ -812,6 +812,8 @@ LINT_FALSE |
9 | XKBPROTO_CFLAGS | | | |
10 | XKBPROTO_LIBS | | | |
11 | XKBPROTO_REQUIRES | | | |
12 | +CROSS_COMPILING_TRUE | | | |
13 | +CROSS_COMPILING_FALSE | | | |
14 | LINT | | | |
15 | LINT_FLAGS | | | |
16 | LINT_TRUE | | 9 | LINT_TRUE |
17 | @@ -23139,43 +23141,38 @@ _ACEOF | | 10 | LINT_FLAGS |
| | | 11 | LINT |
| | | 12 | +CROSS_COMPILING_FALSE |
| | | 13 | +CROSS_COMPILING_TRUE |
| | | 14 | XKBPROTO_REQUIRES |
| | | 15 | XKBPROTO_LIBS |
| | | 16 | XKBPROTO_CFLAGS |
| | | 17 | @@ -15467,44 +15469,39 @@ _ACEOF |
18 | ;; | | 18 | ;; |
19 | esac | | 19 | esac |
20 | | | 20 | |
21 | -{ echo "$as_me:$LINENO: checking for pthread_self in -lc" >&5 | | 21 | -{ $as_echo "$as_me:$LINENO: checking for pthread_self in -lc" >&5 |
22 | -echo $ECHO_N "checking for pthread_self in -lc... $ECHO_C" >&6; } | | 22 | -$as_echo_n "checking for pthread_self in -lc... " >&6; } |
23 | -if test "${ac_cv_lib_c_pthread_self+set}" = set; then | | 23 | -if test "${ac_cv_lib_c_pthread_self+set}" = set; then |
24 | +{ echo "$as_me:$LINENO: checking whether pthread_self is declared" >&5 | | 24 | +{ $as_echo "$as_me:$LINENO: checking whether pthread_self is declared" >&5 |
25 | +echo $ECHO_N "checking whether pthread_self is declared... $ECHO_C" >&6; } | | 25 | +$as_echo_n "checking whether pthread_self is declared... " >&6; } |
26 | +if test "${ac_cv_have_decl_pthread_self+set}" = set; then | | 26 | +if test "${ac_cv_have_decl_pthread_self+set}" = set; then |
27 | echo $ECHO_N "(cached) $ECHO_C" >&6 | | 27 | $as_echo_n "(cached) " >&6 |
28 | else | | 28 | else |
29 | - ac_check_lib_save_LIBS=$LIBS | | 29 | - ac_check_lib_save_LIBS=$LIBS |
30 | -LIBS="-lc $LIBS" | | 30 | -LIBS="-lc $LIBS" |
31 | -cat >conftest.$ac_ext <<_ACEOF | | 31 | -cat >conftest.$ac_ext <<_ACEOF |
32 | + cat >conftest.$ac_ext <<_ACEOF | | 32 | + cat >conftest.$ac_ext <<_ACEOF |
33 | /* confdefs.h. */ | | 33 | /* confdefs.h. */ |
34 | _ACEOF | | 34 | _ACEOF |
35 | cat confdefs.h >>conftest.$ac_ext | | 35 | cat confdefs.h >>conftest.$ac_ext |
36 | cat >>conftest.$ac_ext <<_ACEOF | | 36 | cat >>conftest.$ac_ext <<_ACEOF |
37 | /* end confdefs.h. */ | | 37 | /* end confdefs.h. */ |
38 | +#include <pthread.h> | | 38 | +#include <pthread.h> |
39 | | | 39 | |
40 | -/* Override any GCC internal prototype to avoid an error. | | 40 | -/* Override any GCC internal prototype to avoid an error. |
| @@ -54,126 +54,112 @@ let's use _REENTRANT. | | | @@ -54,126 +54,112 @@ let's use _REENTRANT. |
54 | + | | 54 | + |
55 | ; | | 55 | ; |
56 | return 0; | | 56 | return 0; |
57 | } | | 57 | } |
58 | _ACEOF | | 58 | _ACEOF |
59 | -rm -f conftest.$ac_objext conftest$ac_exeext | | 59 | -rm -f conftest.$ac_objext conftest$ac_exeext |
60 | -if { (ac_try="$ac_link" | | 60 | -if { (ac_try="$ac_link" |
61 | +rm -f conftest.$ac_objext | | 61 | +rm -f conftest.$ac_objext |
62 | +if { (ac_try="$ac_compile" | | 62 | +if { (ac_try="$ac_compile" |
63 | case "(($ac_try" in | | 63 | case "(($ac_try" in |
64 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | | 64 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
65 | *) ac_try_echo=$ac_try;; | | 65 | *) ac_try_echo=$ac_try;; |
66 | esac | | 66 | esac |
67 | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 | | 67 | eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" |
| | | 68 | $as_echo "$ac_try_echo") >&5 |
68 | - (eval "$ac_link") 2>conftest.er1 | | 69 | - (eval "$ac_link") 2>conftest.er1 |
69 | + (eval "$ac_compile") 2>conftest.er1 | | 70 | + (eval "$ac_compile") 2>conftest.er1 |
70 | ac_status=$? | | 71 | ac_status=$? |
71 | grep -v '^ *+' conftest.er1 >conftest.err | | 72 | grep -v '^ *+' conftest.er1 >conftest.err |
72 | rm -f conftest.er1 | | 73 | rm -f conftest.er1 |
73 | @@ -23184,28 +23181,35 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec | | 74 | @@ -15513,31 +15510,35 @@ $as_echo "$ac_try_echo") >&5 |
74 | (exit $ac_status); } && { | | 75 | (exit $ac_status); } && { |
75 | test -z "$ac_c_werror_flag" || | | 76 | test -z "$ac_c_werror_flag" || |
76 | test ! -s conftest.err | | 77 | test ! -s conftest.err |
77 | - } && test -s conftest$ac_exeext && | | 78 | - } && test -s conftest$ac_exeext && { |
78 | - $as_test_x conftest$ac_exeext; then | | 79 | - test "$cross_compiling" = yes || |
| | | 80 | - $as_test_x conftest$ac_exeext |
| | | 81 | - }; then |
79 | - ac_cv_lib_c_pthread_self=yes | | 82 | - ac_cv_lib_c_pthread_self=yes |
80 | + } && test -s conftest.$ac_objext; then | | 83 | + } && test -s conftest.$ac_objext; then |
81 | + ac_cv_have_decl_pthread_self=yes | | 84 | + ac_cv_have_decl_pthread_self=yes |
82 | else | | 85 | else |
83 | echo "$as_me: failed program was:" >&5 | | 86 | $as_echo "$as_me: failed program was:" >&5 |
84 | sed 's/^/| /' conftest.$ac_ext >&5 | | 87 | sed 's/^/| /' conftest.$ac_ext >&5 |
85 | | | 88 | |
86 | - ac_cv_lib_c_pthread_self=no | | 89 | - ac_cv_lib_c_pthread_self=no |
87 | + ac_cv_have_decl_pthread_self=no | | 90 | + ac_cv_have_decl_pthread_self=no |
88 | fi | | 91 | fi |
89 | | | 92 | |
| | | 93 | -rm -rf conftest.dSYM |
90 | -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ | | 94 | -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ |
91 | - conftest$ac_exeext conftest.$ac_ext | | 95 | - conftest$ac_exeext conftest.$ac_ext |
92 | -LIBS=$ac_check_lib_save_LIBS | | 96 | -LIBS=$ac_check_lib_save_LIBS |
93 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | | 97 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
94 | fi | | 98 | fi |
95 | -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_self" >&5 | | 99 | -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_self" >&5 |
96 | -echo "${ECHO_T}$ac_cv_lib_c_pthread_self" >&6; } | | 100 | -$as_echo "$ac_cv_lib_c_pthread_self" >&6; } |
97 | -if test $ac_cv_lib_c_pthread_self = yes; then | | 101 | -if test "x$ac_cv_lib_c_pthread_self" = x""yes; then |
98 | - thrstubs="no" | | 102 | - thrstubs="no" |
99 | +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_pthread_self" >&5 | | 103 | +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_pthread_self" >&5 |
100 | +echo "${ECHO_T}$ac_cv_have_decl_pthread_self" >&6; } | | 104 | +$as_echo "$ac_cv_have_decl_pthread_self" >&6; } |
101 | +if test $ac_cv_have_decl_pthread_self = yes; then | | 105 | +if test "x$ac_cv_have_decl_pthread_self" = x""yes; then |
102 | + | | 106 | + |
103 | +cat >>confdefs.h <<_ACEOF | | 107 | +cat >>confdefs.h <<_ACEOF |
104 | +#define HAVE_DECL_PTHREAD_SELF 1 | | 108 | +#define HAVE_DECL_PTHREAD_SELF 1 |
105 | +_ACEOF | | 109 | +_ACEOF |
106 | + | | 110 | + |
107 | +thrstubs="no" | | 111 | +thrstubs="no" |
108 | else | | 112 | else |
109 | - thrstubs="yes" | | 113 | - thrstubs="yes" |
110 | + cat >>confdefs.h <<_ACEOF | | 114 | + cat >>confdefs.h <<_ACEOF |
111 | +#define HAVE_DECL_PTHREAD_SELF 0 | | 115 | +#define HAVE_DECL_PTHREAD_SELF 0 |
112 | +_ACEOF | | 116 | +_ACEOF |
113 | + | | 117 | + |
114 | +thrstubs="yes" | | 118 | +thrstubs="yes" |
115 | fi | | 119 | fi |
116 | | | 120 | |
117 | + | | 121 | + |
118 | if test x$thrstubs = xyes; then | | 122 | if test x$thrstubs = xyes; then |
119 | THRSTUBS_TRUE= | | 123 | THRSTUBS_TRUE= |
120 | THRSTUBS_FALSE='#' | | 124 | THRSTUBS_FALSE='#' |
121 | @@ -23220,8 +23224,8 @@ if test x$xthreads = xyes ; then | | 125 | @@ -15552,8 +15553,8 @@ if test x$xthreads = xyes ; then |
122 | linux*|openbsd*|gnu*|k*bsd*-gnu) | | 126 | linux*|openbsd*|gnu*|k*bsd*-gnu) |
123 | XTHREADLIB=-lpthread ;; | | 127 | XTHREADLIB=-lpthread ;; |
124 | netbsd*) | | 128 | netbsd*) |
125 | - XTHREAD_CFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS" | | 129 | - XTHREAD_CFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS" |
126 | - XTHREADLIB="-lpthread" ;; | | 130 | - XTHREADLIB="-lpthread" ;; |
127 | + XTHREAD_CFLAGS="-D_REENTRANT" | | 131 | + XTHREAD_CFLAGS="-D_REENTRANT" |
128 | + XTHREADLIB="-pthread" ;; | | 132 | + XTHREADLIB="-pthread" ;; |
129 | freebsd*) | | 133 | freebsd*) |
130 | XTHREAD_CFLAGS="-D_THREAD_SAFE" | | 134 | XTHREAD_CFLAGS="-D_THREAD_SAFE" |
131 | XTHREADLIB="-pthread" ;; | | 135 | XTHREADLIB="-pthread" ;; |
132 | @@ -23702,6 +23706,15 @@ else | | 136 | @@ -16082,6 +16083,15 @@ else |
133 | fi | | 137 | fi |
134 | | | 138 | |
135 | | | 139 | |
136 | + if test $cross_compiling = yes ; then | | 140 | + if test $cross_compiling = yes ; then |
137 | + CROSS_COMPILING_TRUE= | | 141 | + CROSS_COMPILING_TRUE= |
138 | + CROSS_COMPILING_FALSE='#' | | 142 | + CROSS_COMPILING_FALSE='#' |
139 | +else | | 143 | +else |
140 | + CROSS_COMPILING_TRUE='#' | | 144 | + CROSS_COMPILING_TRUE='#' |
141 | + CROSS_COMPILING_FALSE= | | 145 | + CROSS_COMPILING_FALSE= |
142 | +fi | | 146 | +fi |
143 | + | | 147 | + |
144 | + | | 148 | + |
145 | | | 149 | |
146 | | | 150 | |
147 | for ac_header in stdlib.h unistd.h | | 151 | for ac_header in stdlib.h unistd.h |
148 | @@ -24850,6 +24863,13 @@ echo "$as_me: error: conditional \"XKB\" | | 152 | @@ -17206,6 +17216,13 @@ $as_echo "$as_me: error: conditional \"X |
149 | Usually this means the macro was only invoked conditionally." >&2;} | | 153 | Usually this means the macro was only invoked conditionally." >&2;} |
150 | { (exit 1); exit 1; }; } | | 154 | { (exit 1); exit 1; }; } |
151 | fi | | 155 | fi |
152 | +if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then | | 156 | +if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then |
153 | + { { echo "$as_me:$LINENO: error: conditional \"CROSS_COMPILING\" was never defined. | | 157 | + { { $as_echo "$as_me:$LINENO: error: conditional \"CROSS_COMPILING\" was never defined. |
154 | +Usually this means the macro was only invoked conditionally." >&5 | | 158 | +Usually this means the macro was only invoked conditionally." >&5 |
155 | +echo "$as_me: error: conditional \"CROSS_COMPILING\" was never defined. | | 159 | +$as_echo "$as_me: error: conditional \"CROSS_COMPILING\" was never defined. |
156 | +Usually this means the macro was only invoked conditionally." >&2;} | | 160 | +Usually this means the macro was only invoked conditionally." >&2;} |
157 | + { (exit 1); exit 1; }; } | | 161 | + { (exit 1); exit 1; }; } |
158 | +fi | | 162 | +fi |
159 | if test -z "${LINT_TRUE}" && test -z "${LINT_FALSE}"; then | | 163 | if test -z "${LINT_TRUE}" && test -z "${LINT_FALSE}"; then |
160 | { { echo "$as_me:$LINENO: error: conditional \"LINT\" was never defined. | | 164 | { { $as_echo "$as_me:$LINENO: error: conditional \"LINT\" was never defined. |
161 | Usually this means the macro was only invoked conditionally." >&5 | | 165 | Usually this means the macro was only invoked conditionally." >&5 |
162 | @@ -25679,6 +25699,8 @@ XKB_FALSE!$XKB_FALSE$ac_delim | | | |
163 | XKBPROTO_CFLAGS!$XKBPROTO_CFLAGS$ac_delim | | | |
164 | XKBPROTO_LIBS!$XKBPROTO_LIBS$ac_delim | | | |
165 | XKBPROTO_REQUIRES!$XKBPROTO_REQUIRES$ac_delim | | | |
166 | +CROSS_COMPILING_TRUE!$CROSS_COMPILING_TRUE$ac_delim | | | |
167 | +CROSS_COMPILING_FALSE!$CROSS_COMPILING_FALSE$ac_delim | | | |
168 | LINT!$LINT$ac_delim | | | |
169 | LINT_FLAGS!$LINT_FLAGS$ac_delim | | | |
170 | LINT_TRUE!$LINT_TRUE$ac_delim | | | |
171 | @@ -25705,7 +25727,7 @@ LIBOBJS!$LIBOBJS$ac_delim | | | |
172 | LTLIBOBJS!$LTLIBOBJS$ac_delim | | | |
173 | _ACEOF | | | |
174 | | | | |
175 | - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 87; then | | | |
176 | + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then | | | |
177 | break | | | |
178 | elif $ac_last_try; then | | | |
179 | { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 | | | |