1 $NetBSD: patch-ak,v 1.4 2008/04/04 21:09:16 tonnerre Exp $
3 Include curses header when testing tgetent in order to prevent
4 crash on 64-bit architectures.
6 --- configure.orig 2003-12-05 08:46:53.000000000 -0500
7 +++ configure 2004-06-16 16:12:06.000000000 -0400
9 cat >>conftest.$ac_ext <<_ACEOF
16 exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
17 @@ -5572,9 +5574,16 @@
19 #include <time.h> /* to get time_t on SCO */
20 #include <sys/types.h>
21 -#if defined(SVR4) && !defined(DGUX)
22 +#include <sys/param.h>
23 +#if (defined(SVR4) && !defined(DGUX)) \
24 + || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000)) \
25 + || (defined(__DragonFly__) && (__DragonFly_version >= 200902))
28 +# if defined(__NetBSD__) || defined(__DragonFly__)
29 +# define pututline pututxline
30 +# define getutent getutxent
35 @@ -7502,6 +7511,148 @@
39 +for ac_header in sys/stropts.h
41 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
42 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
43 + echo "$as_me:$LINENO: checking for $ac_header" >&5
44 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
45 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
46 + echo $ECHO_N "(cached) $ECHO_C" >&6
48 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
49 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
51 + # Is the header compilable?
52 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
53 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
54 +cat >conftest.$ac_ext <<_ACEOF
55 +#line $LINENO "configure"
58 +cat confdefs.h >>conftest.$ac_ext
59 +cat >>conftest.$ac_ext <<_ACEOF
60 +/* end confdefs.h. */
62 +#include <$ac_header>
64 +rm -f conftest.$ac_objext
65 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
66 + (eval $ac_compile) 2>&5
68 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
69 + (exit $ac_status); } &&
70 + { ac_try='test -s conftest.$ac_objext'
71 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
74 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
75 + (exit $ac_status); }; }; then
76 + ac_header_compiler=yes
78 + echo "$as_me: failed program was:" >&5
79 +sed 's/^/| /' conftest.$ac_ext >&5
81 +ac_header_compiler=no
83 +rm -f conftest.$ac_objext conftest.$ac_ext
84 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
85 +echo "${ECHO_T}$ac_header_compiler" >&6
87 +# Is the header present?
88 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
89 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
90 +cat >conftest.$ac_ext <<_ACEOF
91 +#line $LINENO "configure"
94 +cat confdefs.h >>conftest.$ac_ext
95 +cat >>conftest.$ac_ext <<_ACEOF
96 +/* end confdefs.h. */
97 +#include <$ac_header>
99 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
100 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
102 + grep -v '^ *+' conftest.er1 >conftest.err
104 + cat conftest.err >&5
105 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
106 + (exit $ac_status); } >/dev/null; then
107 + if test -s conftest.err; then
108 + ac_cpp_err=$ac_c_preproc_warn_flag
115 +if test -z "$ac_cpp_err"; then
116 + ac_header_preproc=yes
118 + echo "$as_me: failed program was:" >&5
119 +sed 's/^/| /' conftest.$ac_ext >&5
121 + ac_header_preproc=no
123 +rm -f conftest.err conftest.$ac_ext
124 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
125 +echo "${ECHO_T}$ac_header_preproc" >&6
127 +# So? What about this header?
128 +case $ac_header_compiler:$ac_header_preproc in
130 + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
131 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
132 + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
133 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
136 +## ------------------------------------ ##
137 +## Report this to bug-autoconf@gnu.org. ##
138 +## ------------------------------------ ##
141 + sed "s/^/$as_me: WARNING: /" >&2
144 + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
145 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
146 + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
147 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
148 + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
149 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
152 +## ------------------------------------ ##
153 +## Report this to bug-autoconf@gnu.org. ##
154 +## ------------------------------------ ##
157 + sed "s/^/$as_me: WARNING: /" >&2
160 +echo "$as_me:$LINENO: checking for $ac_header" >&5
161 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
162 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
163 + echo $ECHO_N "(cached) $ECHO_C" >&6
165 + eval "$as_ac_Header=$ac_header_preproc"
167 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
168 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
171 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
172 + cat >>confdefs.h <<_ACEOF
173 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
181 echo "$as_me:$LINENO: checking for setenv" >&5
182 echo $ECHO_N "checking for setenv... $ECHO_C" >&6
183 cat >conftest.$ac_ext <<_ACEOF