summaryrefslogtreecommitdiff
path: root/misc/tmux/patches/patch-configure
blob: d717bad725ed4d48ea5aa0ab84242bb59eac46cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
$NetBSD: patch-configure,v 1.1 2011/09/16 05:18:58 minskim Exp $

Compatibility for b64_ntop.  SVN Revisions 2565 and 2568.

--- configure.orig	2011-07-09 16:12:35.000000000 +0000
+++ configure
@@ -637,6 +637,8 @@ NO_FORKPTY_TRUE
 NO_IMSG_FALSE
 NO_IMSG_TRUE
 XOPEN_DEFINES
+NO_B64_NTOP_FALSE
+NO_B64_NTOP_TRUE
 IS_GLIBC_FALSE
 IS_GLIBC_TRUE
 IS_SUNCC_FALSE
@@ -4605,119 +4607,83 @@ if test "x$found_curses" = xno; then
     as_fn_error "\"curses not found\"" "$LINENO" 5
 fi
 
-# Look for networking libraries.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing b64_ntop" >&5
-$as_echo_n "checking for library containing b64_ntop... " >&6; }
-if test "${ac_cv_search_b64_ntop+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
+# Check for b64_ntop.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for b64_ntop" >&5
+$as_echo_n "checking for b64_ntop... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.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 b64_ntop ();
+		#include <sys/types.h>
+		#include <netinet/in.h>
+		#include <resolv.h>
+
 int
 main ()
 {
-return b64_ntop ();
+b64_ntop(NULL, 0, NULL, 0);
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' resolv; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_b64_ntop=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_b64_ntop+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_b64_ntop+set}" = set; then :
-
+if ac_fn_c_try_link "$LINENO"; then :
+  found_b64_ntop=yes
 else
-  ac_cv_search_b64_ntop=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_b64_ntop" >&5
-$as_echo "$ac_cv_search_b64_ntop" >&6; }
-ac_res=$ac_cv_search_b64_ntop
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  found_b64_ntop=no
 
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test "x$found_b64_ntop" = xno; then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing __b64_ntop" >&5
-$as_echo_n "checking for library containing __b64_ntop... " >&6; }
-if test "${ac_cv_search___b64_ntop+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for b64_ntop with -lresolv" >&5
+$as_echo_n "checking for b64_ntop with -lresolv... " >&6; }
+	LIBS="$LIBS -lresolv"
+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.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 __b64_ntop ();
+			#include <sys/types.h>
+			#include <netinet/in.h>
+			#include <resolv.h>
+
 int
 main ()
 {
-return __b64_ntop ();
+b64_ntop(NULL, 0, NULL, 0);
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' resolv; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search___b64_ntop=$ac_res
+if ac_fn_c_try_link "$LINENO"; then :
+  found_b64_ntop=yes
+else
+  found_b64_ntop=no
+
 fi
 rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search___b64_ntop+set}" = set; then :
-  break
+    conftest$ac_exeext conftest.$ac_ext
+	if test "x$found_b64_ntop" = xno; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	fi
 fi
-done
-if test "${ac_cv_search___b64_ntop+set}" = set; then :
+if test "x$found_b64_ntop" = xyes; then
+	$as_echo "#define HAVE_B64_NTOP 1" >>confdefs.h
 
-else
-  ac_cv_search___b64_ntop=no
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+ if test "x$found_b64_ntop" = xno; then
+  NO_B64_NTOP_TRUE=
+  NO_B64_NTOP_FALSE='#'
+else
+  NO_B64_NTOP_TRUE='#'
+  NO_B64_NTOP_FALSE=
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search___b64_ntop" >&5
-$as_echo "$ac_cv_search___b64_ntop" >&6; }
-ac_res=$ac_cv_search___b64_ntop
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-fi
 
+# Look for networking libraries.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntoa" >&5
 $as_echo_n "checking for library containing inet_ntoa... " >&6; }
 if test "${ac_cv_search_inet_ntoa+set}" = set; then :