3 --- configure.orig 2008-04-04 14:23:44.000000000 -0400
5 @@ -5996,6 +5996,224 @@ esac
7 need_locks="$enable_libtool_lock"
9 +if test "${ac_cv_header_sys_atomic_h+set}" = set; then
10 + { echo "$as_me:$LINENO: checking for sys/atomic.h" >&5
11 +echo $ECHO_N "checking for sys/atomic.h... $ECHO_C" >&6; }
12 +if test "${ac_cv_header_sys_atomic_h+set}" = set; then
13 + echo $ECHO_N "(cached) $ECHO_C" >&6
15 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_atomic_h" >&5
16 +echo "${ECHO_T}$ac_cv_header_sys_atomic_h" >&6; }
18 + # Is the header compilable?
19 +{ echo "$as_me:$LINENO: checking sys/atomic.h usability" >&5
20 +echo $ECHO_N "checking sys/atomic.h usability... $ECHO_C" >&6; }
21 +cat >conftest.$ac_ext <<_ACEOF
24 +cat confdefs.h >>conftest.$ac_ext
25 +cat >>conftest.$ac_ext <<_ACEOF
26 +/* end confdefs.h. */
28 +#include <sys/atomic.h>
30 +rm -f conftest.$ac_objext
31 +if { (ac_try="$ac_compile"
33 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34 + *) ac_try_echo=$ac_try;;
36 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37 + (eval "$ac_compile") 2>conftest.er1
39 + grep -v '^ *+' conftest.er1 >conftest.err
41 + cat conftest.err >&5
42 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
43 + (exit $ac_status); } && {
44 + test -z "$ac_c_werror_flag" ||
45 + test ! -s conftest.err
46 + } && test -s conftest.$ac_objext; then
47 + ac_header_compiler=yes
49 + echo "$as_me: failed program was:" >&5
50 +sed 's/^/| /' conftest.$ac_ext >&5
52 + ac_header_compiler=no
55 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56 +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
57 +echo "${ECHO_T}$ac_header_compiler" >&6; }
59 +# Is the header present?
60 +{ echo "$as_me:$LINENO: checking sys/atomic.h presence" >&5
61 +echo $ECHO_N "checking sys/atomic.h presence... $ECHO_C" >&6; }
62 +cat >conftest.$ac_ext <<_ACEOF
65 +cat confdefs.h >>conftest.$ac_ext
66 +cat >>conftest.$ac_ext <<_ACEOF
67 +/* end confdefs.h. */
68 +#include <sys/atomic.h>
70 +if { (ac_try="$ac_cpp conftest.$ac_ext"
72 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
73 + *) ac_try_echo=$ac_try;;
75 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
76 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
78 + grep -v '^ *+' conftest.er1 >conftest.err
80 + cat conftest.err >&5
81 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
82 + (exit $ac_status); } >/dev/null && {
83 + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
84 + test ! -s conftest.err
86 + ac_header_preproc=yes
88 + echo "$as_me: failed program was:" >&5
89 +sed 's/^/| /' conftest.$ac_ext >&5
91 + ac_header_preproc=no
94 +rm -f conftest.err conftest.$ac_ext
95 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
96 +echo "${ECHO_T}$ac_header_preproc" >&6; }
98 +# So? What about this header?
99 +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
101 + { echo "$as_me:$LINENO: WARNING: sys/atomic.h: accepted by the compiler, rejected by the preprocessor!" >&5
102 +echo "$as_me: WARNING: sys/atomic.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
103 + { echo "$as_me:$LINENO: WARNING: sys/atomic.h: proceeding with the compiler's result" >&5
104 +echo "$as_me: WARNING: sys/atomic.h: proceeding with the compiler's result" >&2;}
105 + ac_header_preproc=yes
108 + { echo "$as_me:$LINENO: WARNING: sys/atomic.h: present but cannot be compiled" >&5
109 +echo "$as_me: WARNING: sys/atomic.h: present but cannot be compiled" >&2;}
110 + { echo "$as_me:$LINENO: WARNING: sys/atomic.h: check for missing prerequisite headers?" >&5
111 +echo "$as_me: WARNING: sys/atomic.h: check for missing prerequisite headers?" >&2;}
112 + { echo "$as_me:$LINENO: WARNING: sys/atomic.h: see the Autoconf documentation" >&5
113 +echo "$as_me: WARNING: sys/atomic.h: see the Autoconf documentation" >&2;}
114 + { echo "$as_me:$LINENO: WARNING: sys/atomic.h: section \"Present But Cannot Be Compiled\"" >&5
115 +echo "$as_me: WARNING: sys/atomic.h: section \"Present But Cannot Be Compiled\"" >&2;}
116 + { echo "$as_me:$LINENO: WARNING: sys/atomic.h: proceeding with the preprocessor's result" >&5
117 +echo "$as_me: WARNING: sys/atomic.h: proceeding with the preprocessor's result" >&2;}
118 + { echo "$as_me:$LINENO: WARNING: sys/atomic.h: in the future, the compiler will take precedence" >&5
119 +echo "$as_me: WARNING: sys/atomic.h: in the future, the compiler will take precedence" >&2;}
123 +{ echo "$as_me:$LINENO: checking for sys/atomic.h" >&5
124 +echo $ECHO_N "checking for sys/atomic.h... $ECHO_C" >&6; }
125 +if test "${ac_cv_header_sys_atomic_h+set}" = set; then
126 + echo $ECHO_N "(cached) $ECHO_C" >&6
128 + ac_cv_header_sys_atomic_h=$ac_header_preproc
130 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_atomic_h" >&5
131 +echo "${ECHO_T}$ac_cv_header_sys_atomic_h" >&6; }
134 +if test $ac_cv_header_sys_atomic_h = yes; then
135 + { echo "$as_me:$LINENO: checking for atomic_inc_32_nv" >&5
136 +echo $ECHO_N "checking for atomic_inc_32_nv... $ECHO_C" >&6; }
137 +if test "${ac_cv_func_atomic_inc_32_nv+set}" = set; then
138 + echo $ECHO_N "(cached) $ECHO_C" >&6
140 + cat >conftest.$ac_ext <<_ACEOF
143 +cat confdefs.h >>conftest.$ac_ext
144 +cat >>conftest.$ac_ext <<_ACEOF
145 +/* end confdefs.h. */
146 +/* Define atomic_inc_32_nv to an innocuous variant, in case <limits.h> declares atomic_inc_32_nv.
147 + For example, HP-UX 11i <limits.h> declares gettimeofday. */
148 +#define atomic_inc_32_nv innocuous_atomic_inc_32_nv
150 +/* System header to define __stub macros and hopefully few prototypes,
151 + which can conflict with char atomic_inc_32_nv (); below.
152 + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
153 + <limits.h> exists even on freestanding compilers. */
156 +# include <limits.h>
158 +# include <assert.h>
161 +#undef atomic_inc_32_nv
163 +/* Override any GCC internal prototype to avoid an error.
164 + Use char because int might match the return type of a GCC
165 + builtin and then its argument prototype would still apply. */
169 +char atomic_inc_32_nv ();
170 +/* The GNU C library defines this for functions which it implements
171 + to always fail with ENOSYS. Some functions are actually named
172 + something starting with __ and the normal name is an alias. */
173 +#if defined __stub_atomic_inc_32_nv || defined __stub___atomic_inc_32_nv
180 +return atomic_inc_32_nv ();
185 +rm -f conftest.$ac_objext conftest$ac_exeext
186 +if { (ac_try="$ac_link"
188 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
189 + *) ac_try_echo=$ac_try;;
191 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
192 + (eval "$ac_link") 2>conftest.er1
194 + grep -v '^ *+' conftest.er1 >conftest.err
196 + cat conftest.err >&5
197 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
198 + (exit $ac_status); } && {
199 + test -z "$ac_c_werror_flag" ||
200 + test ! -s conftest.err
201 + } && test -s conftest$ac_exeext &&
202 + $as_test_x conftest$ac_exeext; then
203 + ac_cv_func_atomic_inc_32_nv=yes
205 + echo "$as_me: failed program was:" >&5
206 +sed 's/^/| /' conftest.$ac_ext >&5
208 + ac_cv_func_atomic_inc_32_nv=no
211 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
212 + conftest$ac_exeext conftest.$ac_ext
214 +{ echo "$as_me:$LINENO: result: $ac_cv_func_atomic_inc_32_nv" >&5
215 +echo "${ECHO_T}$ac_cv_func_atomic_inc_32_nv" >&6; }
216 +if test $ac_cv_func_atomic_inc_32_nv = yes; then
218 +cat >>confdefs.h <<\_ACEOF
219 +#define HAVE_NETBSD_ATOMIC_OPS 1
228 # On IRIX 5.3, sys/types and inttypes.h are conflicting.