branch Attitude Adjustment packages
[12.09/packages.git] / net / ucarp / patches / 100-configure-cross-compilation.patch
1 --- a/configure
2 +++ b/configure
3 @@ -30129,174 +30129,11 @@ _ACEOF
4  
5  fi
6  
7 -{ $as_echo "$as_me:$LINENO: checking whether snprintf is C99 conformant" >&5
8 -$as_echo_n "checking whether snprintf is C99 conformant... " >&6; }
9 -if test "$cross_compiling" = yes; then
10 -  { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
11 -See \`config.log' for more details." >&5
12 -$as_echo "$as_me: error: cannot run test program while cross compiling
13 -See \`config.log' for more details." >&2;}
14 -   { (exit 1); exit 1; }; }
15 -else
16 -  cat >conftest.$ac_ext <<_ACEOF
17 -/* confdefs.h.  */
18 -_ACEOF
19 -cat confdefs.h >>conftest.$ac_ext
20 -cat >>conftest.$ac_ext <<_ACEOF
21 -/* end confdefs.h.  */
22 -
23 -#include <stdio.h>
24 -#ifdef STDC_HEADERS
25 -# include <stdlib.h>
26 -# include <stddef.h>
27 -#else
28 -# if HAVE_STDLIB_H
29 -#  include <stdlib.h>
30 -# endif
31 -#endif
32 -#ifdef HAVE_UNISTD_H
33 -# include <unistd.h>
34 -#endif
35 -
36 -int main(void)
37 -{
38 -    char buf[4];
39 -
40 -    (void) fprintf(fopen("conftestval", "w"), "%d\n",
41 -        (int) snprintf(buf, sizeof buf, "12345678"));
42 -    return 0;
43 -}
44 -
45 -_ACEOF
46 -rm -f conftest$ac_exeext
47 -if { (ac_try="$ac_link"
48 -case "(($ac_try" in
49 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
50 -  *) ac_try_echo=$ac_try;;
51 -esac
52 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
53 -$as_echo "$ac_try_echo") >&5
54 -  (eval "$ac_link") 2>&5
55 -  ac_status=$?
56 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
57 -  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
58 -  { (case "(($ac_try" in
59 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
60 -  *) ac_try_echo=$ac_try;;
61 -esac
62 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
63 -$as_echo "$ac_try_echo") >&5
64 -  (eval "$ac_try") 2>&5
65 -  ac_status=$?
66 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
67 -  (exit $ac_status); }; }; then
68 -  CONF_SNPRINTF_TYPE=`cat conftestval`
69 -
70 -else
71 -  $as_echo "$as_me: program exited with status $ac_status" >&5
72 -$as_echo "$as_me: failed program was:" >&5
73 -sed 's/^/| /' conftest.$ac_ext >&5
74 -
75 -fi
76 -rm -rf conftest.dSYM
77 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
78 -fi
79 -
80 -
81 -{ $as_echo "$as_me:$LINENO: result: done" >&5
82 -$as_echo "done" >&6; }
83 -if test "x$CONF_SNPRINTF_TYPE" = "x" ; then
84 -  { $as_echo "$as_me:$LINENO: WARNING: your operating system doesn't implement snprintf" >&5
85 -$as_echo "$as_me: WARNING: your operating system doesn't implement snprintf" >&2;}
86 -else
87 -
88  cat >>confdefs.h <<_ACEOF
89 -#define CONF_SNPRINTF_TYPE $CONF_SNPRINTF_TYPE
90 -_ACEOF
91 -
92 -fi
93 -
94 -{ $as_echo "$as_me:$LINENO: checking whether you already have a standard SHA1 implementation" >&5
95 -$as_echo_n "checking whether you already have a standard SHA1 implementation... " >&6; }
96 -if test "$cross_compiling" = yes; then
97 -  { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
98 -See \`config.log' for more details." >&5
99 -$as_echo "$as_me: error: cannot run test program while cross compiling
100 -See \`config.log' for more details." >&2;}
101 -   { (exit 1); exit 1; }; }
102 -else
103 -  cat >conftest.$ac_ext <<_ACEOF
104 -/* confdefs.h.  */
105 -_ACEOF
106 -cat confdefs.h >>conftest.$ac_ext
107 -cat >>conftest.$ac_ext <<_ACEOF
108 -/* end confdefs.h.  */
109 -
110 -#include <stdio.h>
111 -#include <string.h>
112 -#include <sys/types.h>
113 -#include <sha1.h>
114 -
115 -int main(void)
116 -{
117 -    SHA1_CTX ctx;
118 -    char b[41];
119 -
120 -    SHA1Init(&ctx);
121 -    SHA1Update(&ctx, (const unsigned char *) "test", 4U);
122 -    SHA1End(&ctx, b);
123 -    b[40] = 0;
124 -
125 -    return strcasecmp(b, "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3");
126 -}
127 -
128 -_ACEOF
129 -rm -f conftest$ac_exeext
130 -if { (ac_try="$ac_link"
131 -case "(($ac_try" in
132 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
133 -  *) ac_try_echo=$ac_try;;
134 -esac
135 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
136 -$as_echo "$ac_try_echo") >&5
137 -  (eval "$ac_link") 2>&5
138 -  ac_status=$?
139 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
140 -  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
141 -  { (case "(($ac_try" in
142 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
143 -  *) ac_try_echo=$ac_try;;
144 -esac
145 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
146 -$as_echo "$ac_try_echo") >&5
147 -  (eval "$ac_try") 2>&5
148 -  ac_status=$?
149 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
150 -  (exit $ac_status); }; }; then
151 -
152 -{ $as_echo "$as_me:$LINENO: result: yes" >&5
153 -$as_echo "yes" >&6; }
154 -
155 -cat >>confdefs.h <<\_ACEOF
156 -#define USE_SYSTEM_CRYPT_SHA1 /**/
157 +#define CONF_SNPRINTF_TYPE 1
158  _ACEOF
159  
160  
161 -else
162 -  $as_echo "$as_me: program exited with status $ac_status" >&5
163 -$as_echo "$as_me: failed program was:" >&5
164 -sed 's/^/| /' conftest.$ac_ext >&5
165 -
166 -( exit $ac_status )
167 -{ $as_echo "$as_me:$LINENO: result: no" >&5
168 -$as_echo "no" >&6; }
169 -
170 -fi
171 -rm -rf conftest.dSYM
172 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
173 -fi
174 -
175 -
176  
177  { $as_echo "$as_me:$LINENO: checking whether syslog names are available" >&5
178  $as_echo_n "checking whether syslog names are available... " >&6; }