Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / misc / screen / patches / patch-ak
blobe091813e733728868d879f1366b761a11937887c
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
8 @@ -4925,6 +4925,8 @@
9  cat >>conftest.$ac_ext <<_ACEOF
10  /* end confdefs.h.  */
12 +#include <curses.h>
14  main()
15  {
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))
26  #include <utmpx.h>
27  #define utmp utmpx
28 +# if defined(__NetBSD__) || defined(__DragonFly__)
29 +#  define pututline pututxline
30 +#  define getutent  getutxent
31 +# endif
32  #else
33  #include <utmp.h>
34  #endif
35 @@ -7502,6 +7511,148 @@
36  fi
39 +for ac_header in sys/stropts.h
40 +do
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
47 +fi
48 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
49 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
50 +else
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"
56 +/* confdefs.h.  */
57 +_ACEOF
58 +cat confdefs.h >>conftest.$ac_ext
59 +cat >>conftest.$ac_ext <<_ACEOF
60 +/* end confdefs.h.  */
61 +$ac_includes_default
62 +#include <$ac_header>
63 +_ACEOF
64 +rm -f conftest.$ac_objext
65 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
66 +  (eval $ac_compile) 2>&5
67 +  ac_status=$?
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
72 +  (eval $ac_try) 2>&5
73 +  ac_status=$?
74 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
75 +  (exit $ac_status); }; }; then
76 +  ac_header_compiler=yes
77 +else
78 +  echo "$as_me: failed program was:" >&5
79 +sed 's/^/| /' conftest.$ac_ext >&5
81 +ac_header_compiler=no
82 +fi
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"
92 +/* confdefs.h.  */
93 +_ACEOF
94 +cat confdefs.h >>conftest.$ac_ext
95 +cat >>conftest.$ac_ext <<_ACEOF
96 +/* end confdefs.h.  */
97 +#include <$ac_header>
98 +_ACEOF
99 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
100 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
101 +  ac_status=$?
102 +  grep -v '^ *+' conftest.er1 >conftest.err
103 +  rm -f conftest.er1
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
109 +  else
110 +    ac_cpp_err=
111 +  fi
112 +else
113 +  ac_cpp_err=yes
115 +if test -z "$ac_cpp_err"; then
116 +  ac_header_preproc=yes
117 +else
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
129 +  yes:no )
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;}
134 +    (
135 +      cat <<\_ASBOX
136 +## ------------------------------------ ##
137 +## Report this to bug-autoconf@gnu.org. ##
138 +## ------------------------------------ ##
139 +_ASBOX
140 +    ) |
141 +      sed "s/^/$as_me: WARNING:     /" >&2
142 +    ;;
143 +  no:yes )
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;}
150 +    (
151 +      cat <<\_ASBOX
152 +## ------------------------------------ ##
153 +## Report this to bug-autoconf@gnu.org. ##
154 +## ------------------------------------ ##
155 +_ASBOX
156 +    ) |
157 +      sed "s/^/$as_me: WARNING:     /" >&2
158 +    ;;
159 +esac
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
164 +else
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
174 +_ACEOF
178 +done
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