]> git.pld-linux.org Git - packages/php.git/blob - php-fpm.patch
- correct last changelog entry
[packages/php.git] / php-fpm.patch
1 diff -Nru php-5.2.4.vanilla/configure php-5.2.4.fpm/configure
2 --- php-5.2.4.vanilla/configure 2007-08-30 03:39:18.000000000 +0400
3 +++ php-5.2.4.fpm/configure     2007-09-11 23:59:31.000000000 +0400
4 @@ -1038,6 +1038,11 @@
5    --disable-path-info-check CGI: If this is disabled, paths such as
6                              /info.php/test?a=b will fail to work"
7  ac_help="$ac_help
8 +  --enable-fpm              FastCGI: If this is enabled, the fastcgi support
9 +                            will include experimental process manager code"
10 +ac_help="$ac_help
11 +  --with-xml-config=PATH      FPM: use xml-config in PATH to find libxml"
12 +ac_help="$ac_help
13  
14  General settings:
15  "
16 @@ -2149,12 +2154,12 @@
17  
18  
19  echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
20 -echo "configure:2153: checking for Cygwin environment" >&5
21 +echo "configure:2158: checking for Cygwin environment" >&5
22  if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
23    echo $ac_n "(cached) $ac_c" 1>&6
24  else
25    cat > conftest.$ac_ext <<EOF
26 -#line 2158 "configure"
27 +#line 2163 "configure"
28  #include "confdefs.h"
29  
30  int main() {
31 @@ -2165,7 +2170,7 @@
32  return __CYGWIN__;
33  ; return 0; }
34  EOF
35 -if { (eval echo configure:2169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
36 +if { (eval echo configure:2174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
37    rm -rf conftest*
38    ac_cv_cygwin=yes
39  else
40 @@ -2182,19 +2187,19 @@
41  CYGWIN=
42  test "$ac_cv_cygwin" = yes && CYGWIN=yes
43  echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
44 -echo "configure:2186: checking for mingw32 environment" >&5
45 +echo "configure:2191: checking for mingw32 environment" >&5
46  if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
47    echo $ac_n "(cached) $ac_c" 1>&6
48  else
49    cat > conftest.$ac_ext <<EOF
50 -#line 2191 "configure"
51 +#line 2196 "configure"
52  #include "confdefs.h"
53  
54  int main() {
55  return __MINGW32__;
56  ; return 0; }
57  EOF
58 -if { (eval echo configure:2198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
59 +if { (eval echo configure:2203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
60    rm -rf conftest*
61    ac_cv_mingw32=yes
62  else
63 @@ -2213,7 +2218,7 @@
64  
65  
66  echo $ac_n "checking for egrep""... $ac_c" 1>&6
67 -echo "configure:2217: checking for egrep" >&5
68 +echo "configure:2222: checking for egrep" >&5
69  if eval "test \"`echo '$''{'ac_cv_prog_egrep'+set}'`\" = set"; then
70    echo $ac_n "(cached) $ac_c" 1>&6
71  else
72 @@ -2228,7 +2233,7 @@
73   
74  
75  echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
76 -echo "configure:2232: checking for a sed that does not truncate output" >&5
77 +echo "configure:2237: checking for a sed that does not truncate output" >&5
78  if eval "test \"`echo '$''{'lt_cv_path_SED'+set}'`\" = set"; then
79    echo $ac_n "(cached) $ac_c" 1>&6
80  else
81 @@ -2378,7 +2383,7 @@
82  fi
83  
84  echo $ac_n "checking host system type""... $ac_c" 1>&6
85 -echo "configure:2382: checking host system type" >&5
86 +echo "configure:2387: checking host system type" >&5
87  
88  host_alias=$host
89  case "$host_alias" in
90 @@ -2399,7 +2404,7 @@
91  echo "$ac_t""$host" 1>&6
92  
93  echo $ac_n "checking target system type""... $ac_c" 1>&6
94 -echo "configure:2403: checking target system type" >&5
95 +echo "configure:2408: checking target system type" >&5
96  
97  target_alias=$target
98  case "$target_alias" in
99 @@ -2511,7 +2516,7 @@
100  # Extract the first word of "gcc", so it can be a program name with args.
101  set dummy gcc; ac_word=$2
102  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
103 -echo "configure:2515: checking for $ac_word" >&5
104 +echo "configure:2520: checking for $ac_word" >&5
105  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
106    echo $ac_n "(cached) $ac_c" 1>&6
107  else
108 @@ -2541,7 +2546,7 @@
109    # Extract the first word of "cc", so it can be a program name with args.
110  set dummy cc; ac_word=$2
111  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
112 -echo "configure:2545: checking for $ac_word" >&5
113 +echo "configure:2550: checking for $ac_word" >&5
114  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
115    echo $ac_n "(cached) $ac_c" 1>&6
116  else
117 @@ -2592,7 +2597,7 @@
118        # Extract the first word of "cl", so it can be a program name with args.
119  set dummy cl; ac_word=$2
120  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
121 -echo "configure:2596: checking for $ac_word" >&5
122 +echo "configure:2601: checking for $ac_word" >&5
123  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
124    echo $ac_n "(cached) $ac_c" 1>&6
125  else
126 @@ -2624,7 +2629,7 @@
127  fi
128  
129  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
130 -echo "configure:2628: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
131 +echo "configure:2633: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
132  
133  ac_ext=c
134  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
135 @@ -2635,12 +2640,12 @@
136  
137  cat > conftest.$ac_ext << EOF
138  
139 -#line 2639 "configure"
140 +#line 2644 "configure"
141  #include "confdefs.h"
142  
143  main(){return(0);}
144  EOF
145 -if { (eval echo configure:2644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
146 +if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
147    ac_cv_prog_cc_works=yes
148    # If we can't run a trivial program, we are probably using a cross compiler.
149    if (./conftest; exit) 2>/dev/null; then
150 @@ -2666,12 +2671,12 @@
151    { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
152  fi
153  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
154 -echo "configure:2670: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
155 +echo "configure:2675: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
156  echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
157  cross_compiling=$ac_cv_prog_cc_cross
158  
159  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
160 -echo "configure:2675: checking whether we are using GNU C" >&5
161 +echo "configure:2680: checking whether we are using GNU C" >&5
162  if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
163    echo $ac_n "(cached) $ac_c" 1>&6
164  else
165 @@ -2680,7 +2685,7 @@
166    yes;
167  #endif
168  EOF
169 -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
170 +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
171    ac_cv_prog_gcc=yes
172  else
173    ac_cv_prog_gcc=no
174 @@ -2699,7 +2704,7 @@
175  ac_save_CFLAGS="$CFLAGS"
176  CFLAGS=
177  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
178 -echo "configure:2703: checking whether ${CC-cc} accepts -g" >&5
179 +echo "configure:2708: checking whether ${CC-cc} accepts -g" >&5
180  if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
181    echo $ac_n "(cached) $ac_c" 1>&6
182  else
183 @@ -2731,7 +2736,7 @@
184  fi
185  
186  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
187 -echo "configure:2735: checking how to run the C preprocessor" >&5
188 +echo "configure:2740: checking how to run the C preprocessor" >&5
189  # On Suns, sometimes $CPP names a directory.
190  if test -n "$CPP" && test -d "$CPP"; then
191    CPP=
192 @@ -2746,13 +2751,13 @@
193    # On the NeXT, cc -E runs the code through the compiler's parser,
194    # not just through cpp.
195    cat > conftest.$ac_ext <<EOF
196 -#line 2750 "configure"
197 +#line 2755 "configure"
198  #include "confdefs.h"
199  #include <assert.h>
200  Syntax Error
201  EOF
202  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
203 -{ (eval echo configure:2756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
204 +{ (eval echo configure:2761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
205  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
206  if test -z "$ac_err"; then
207    :
208 @@ -2763,13 +2768,13 @@
209    rm -rf conftest*
210    CPP="${CC-cc} -E -traditional-cpp"
211    cat > conftest.$ac_ext <<EOF
212 -#line 2767 "configure"
213 +#line 2772 "configure"
214  #include "confdefs.h"
215  #include <assert.h>
216  Syntax Error
217  EOF
218  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
219 -{ (eval echo configure:2773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
220 +{ (eval echo configure:2778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
221  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
222  if test -z "$ac_err"; then
223    :
224 @@ -2780,13 +2785,13 @@
225    rm -rf conftest*
226    CPP="${CC-cc} -nologo -E"
227    cat > conftest.$ac_ext <<EOF
228 -#line 2784 "configure"
229 +#line 2789 "configure"
230  #include "confdefs.h"
231  #include <assert.h>
232  Syntax Error
233  EOF
234  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
235 -{ (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
236 +{ (eval echo configure:2795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
237  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
238  if test -z "$ac_err"; then
239    :
240 @@ -2813,9 +2818,9 @@
241  
242    ICC="no"
243    echo $ac_n "checking for icc""... $ac_c" 1>&6
244 -echo "configure:2817: checking for icc" >&5
245 +echo "configure:2822: checking for icc" >&5
246    cat > conftest.$ac_ext <<EOF
247 -#line 2819 "configure"
248 +#line 2824 "configure"
249  #include "confdefs.h"
250  __INTEL_COMPILER
251  EOF
252 @@ -2835,10 +2840,10 @@
253  
254  if test "x$CC" != xcc; then
255    echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
256 -echo "configure:2839: checking whether $CC and cc understand -c and -o together" >&5
257 +echo "configure:2844: checking whether $CC and cc understand -c and -o together" >&5
258  else
259    echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
260 -echo "configure:2842: checking whether cc understands -c and -o together" >&5
261 +echo "configure:2847: checking whether cc understands -c and -o together" >&5
262  fi
263  set dummy $CC; ac_cc="`echo $2 |
264                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
265 @@ -2850,16 +2855,16 @@
266  # We do the test twice because some compilers refuse to overwrite an
267  # existing .o file with -o, though they will create one.
268  ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
269 -if { (eval echo configure:2854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
270 -   test -f conftest.o && { (eval echo configure:2855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
271 +if { (eval echo configure:2859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
272 +   test -f conftest.o && { (eval echo configure:2860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
273  then
274    eval ac_cv_prog_cc_${ac_cc}_c_o=yes
275    if test "x$CC" != xcc; then
276      # Test first that cc exists at all.
277 -    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:2860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
278 +    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:2865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
279        ac_try='cc -c conftest.c -o conftest.o 1>&5'
280 -      if { (eval echo configure:2862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
281 -        test -f conftest.o && { (eval echo configure:2863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
282 +      if { (eval echo configure:2867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
283 +        test -f conftest.o && { (eval echo configure:2868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
284        then
285          # cc works too.
286          :
287 @@ -2886,7 +2891,7 @@
288  fi
289  
290  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
291 -echo "configure:2890: checking how to run the C preprocessor" >&5
292 +echo "configure:2895: checking how to run the C preprocessor" >&5
293  # On Suns, sometimes $CPP names a directory.
294  if test -n "$CPP" && test -d "$CPP"; then
295    CPP=
296 @@ -2901,13 +2906,13 @@
297    # On the NeXT, cc -E runs the code through the compiler's parser,
298    # not just through cpp.
299    cat > conftest.$ac_ext <<EOF
300 -#line 2905 "configure"
301 +#line 2910 "configure"
302  #include "confdefs.h"
303  #include <assert.h>
304  Syntax Error
305  EOF
306  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
307 -{ (eval echo configure:2911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
308 +{ (eval echo configure:2916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
309  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
310  if test -z "$ac_err"; then
311    :
312 @@ -2918,13 +2923,13 @@
313    rm -rf conftest*
314    CPP="${CC-cc} -E -traditional-cpp"
315    cat > conftest.$ac_ext <<EOF
316 -#line 2922 "configure"
317 +#line 2927 "configure"
318  #include "confdefs.h"
319  #include <assert.h>
320  Syntax Error
321  EOF
322  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
323 -{ (eval echo configure:2928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
324 +{ (eval echo configure:2933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
325  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
326  if test -z "$ac_err"; then
327    :
328 @@ -2935,13 +2940,13 @@
329    rm -rf conftest*
330    CPP="${CC-cc} -nologo -E"
331    cat > conftest.$ac_ext <<EOF
332 -#line 2939 "configure"
333 +#line 2944 "configure"
334  #include "confdefs.h"
335  #include <assert.h>
336  Syntax Error
337  EOF
338  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
339 -{ (eval echo configure:2945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
340 +{ (eval echo configure:2950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
341  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
342  if test -z "$ac_err"; then
343    :
344 @@ -2966,9 +2971,9 @@
345  echo "$ac_t""$CPP" 1>&6
346  
347  echo $ac_n "checking for AIX""... $ac_c" 1>&6
348 -echo "configure:2970: checking for AIX" >&5
349 +echo "configure:2975: checking for AIX" >&5
350  cat > conftest.$ac_ext <<EOF
351 -#line 2972 "configure"
352 +#line 2977 "configure"
353  #include "confdefs.h"
354  #ifdef _AIX
355    yes
356 @@ -2990,7 +2995,7 @@
357  
358  
359  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
360 -echo "configure:2994: checking whether ln -s works" >&5
361 +echo "configure:2999: checking whether ln -s works" >&5
362  if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
363    echo $ac_n "(cached) $ac_c" 1>&6
364  else
365 @@ -3015,7 +3020,7 @@
366  php_with_libdir=lib
367  
368  echo $ac_n "checking for system library directory""... $ac_c" 1>&6
369 -echo "configure:3019: checking for system library directory" >&5
370 +echo "configure:3024: checking for system library directory" >&5
371  # Check whether --with-libdir or --without-libdir was given.
372  if test "${with_libdir+set}" = set; then
373    withval="$with_libdir"
374 @@ -3041,7 +3046,7 @@
375  php_enable_rpath=yes
376  
377  echo $ac_n "checking whether to enable runpaths""... $ac_c" 1>&6
378 -echo "configure:3045: checking whether to enable runpaths" >&5
379 +echo "configure:3050: checking whether to enable runpaths" >&5
380  # Check whether --enable-rpath or --disable-rpath was given.
381  if test "${enable_rpath+set}" = set; then
382    enableval="$enable_rpath"
383 @@ -3065,7 +3070,7 @@
384  
385  
386  echo $ac_n "checking if compiler supports -R""... $ac_c" 1>&6
387 -echo "configure:3069: checking if compiler supports -R" >&5
388 +echo "configure:3074: checking if compiler supports -R" >&5
389  if eval "test \"`echo '$''{'php_cv_cc_dashr'+set}'`\" = set"; then
390    echo $ac_n "(cached) $ac_c" 1>&6
391  else
392 @@ -3073,14 +3078,14 @@
393    SAVE_LIBS=$LIBS
394    LIBS="-R /usr/$PHP_LIBDIR $LIBS"
395    cat > conftest.$ac_ext <<EOF
396 -#line 3077 "configure"
397 +#line 3082 "configure"
398  #include "confdefs.h"
399  
400  int main() {
401  
402  ; return 0; }
403  EOF
404 -if { (eval echo configure:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
405 +if { (eval echo configure:3089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
406    rm -rf conftest*
407    php_cv_cc_dashr=yes
408  else
409 @@ -3098,7 +3103,7 @@
410    ld_runpath_switch=-R
411  else
412    echo $ac_n "checking if compiler supports -Wl,-rpath,""... $ac_c" 1>&6
413 -echo "configure:3102: checking if compiler supports -Wl,-rpath," >&5
414 +echo "configure:3107: checking if compiler supports -Wl,-rpath," >&5
415    if eval "test \"`echo '$''{'php_cv_cc_rpath'+set}'`\" = set"; then
416    echo $ac_n "(cached) $ac_c" 1>&6
417  else
418 @@ -3106,14 +3111,14 @@
419      SAVE_LIBS=$LIBS
420      LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
421      cat > conftest.$ac_ext <<EOF
422 -#line 3110 "configure"
423 +#line 3115 "configure"
424  #include "confdefs.h"
425  
426  int main() {
427  
428  ; return 0; }
429  EOF
430 -if { (eval echo configure:3117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
431 +if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
432    rm -rf conftest*
433    php_cv_cc_rpath=yes
434  else
435 @@ -3142,7 +3147,7 @@
436    # Extract the first word of "re2c", so it can be a program name with args.
437  set dummy re2c; ac_word=$2
438  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
439 -echo "configure:3146: checking for $ac_word" >&5
440 +echo "configure:3151: checking for $ac_word" >&5
441  if eval "test \"`echo '$''{'ac_cv_prog_RE2C'+set}'`\" = set"; then
442    echo $ac_n "(cached) $ac_c" 1>&6
443  else
444 @@ -3170,7 +3175,7 @@
445  
446    if test -n "$RE2C"; then
447      echo $ac_n "checking for re2c version""... $ac_c" 1>&6
448 -echo "configure:3174: checking for re2c version" >&5
449 +echo "configure:3179: checking for re2c version" >&5
450  if eval "test \"`echo '$''{'php_cv_re2c_version'+set}'`\" = set"; then
451    echo $ac_n "(cached) $ac_c" 1>&6
452  else
453 @@ -3202,7 +3207,7 @@
454  # Extract the first word of "$ac_prog", so it can be a program name with args.
455  set dummy $ac_prog; ac_word=$2
456  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
457 -echo "configure:3206: checking for $ac_word" >&5
458 +echo "configure:3211: checking for $ac_word" >&5
459  if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
460    echo $ac_n "(cached) $ac_c" 1>&6
461  else
462 @@ -3243,7 +3248,7 @@
463        ;;
464      *)
465        echo $ac_n "checking if $AWK is broken""... $ac_c" 1>&6
466 -echo "configure:3247: checking if $AWK is broken" >&5
467 +echo "configure:3252: checking if $AWK is broken" >&5
468        if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then
469          echo "$ac_t""yes" 1>&6
470          { echo "configure: error: You should install GNU awk" 1>&2; exit 1; }
471 @@ -3262,7 +3267,7 @@
472  # Extract the first word of "$ac_prog", so it can be a program name with args.
473  set dummy $ac_prog; ac_word=$2
474  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
475 -echo "configure:3266: checking for $ac_word" >&5
476 +echo "configure:3271: checking for $ac_word" >&5
477  if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
478    echo $ac_n "(cached) $ac_c" 1>&6
479  else
480 @@ -3302,7 +3307,7 @@
481    bison_version=none
482    if test "$YACC"; then
483      echo $ac_n "checking for bison version""... $ac_c" 1>&6
484 -echo "configure:3306: checking for bison version" >&5
485 +echo "configure:3311: checking for bison version" >&5
486  if eval "test \"`echo '$''{'php_cv_bison_version'+set}'`\" = set"; then
487    echo $ac_n "(cached) $ac_c" 1>&6
488  else
489 @@ -3342,7 +3347,7 @@
490    # Extract the first word of "flex", so it can be a program name with args.
491  set dummy flex; ac_word=$2
492  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
493 -echo "configure:3346: checking for $ac_word" >&5
494 +echo "configure:3351: checking for $ac_word" >&5
495  if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
496    echo $ac_n "(cached) $ac_c" 1>&6
497  else
498 @@ -3376,7 +3381,7 @@
499    *) ac_lib=l ;;
500    esac
501    echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
502 -echo "configure:3380: checking for yywrap in -l$ac_lib" >&5
503 +echo "configure:3385: checking for yywrap in -l$ac_lib" >&5
504  ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
505  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
506    echo $ac_n "(cached) $ac_c" 1>&6
507 @@ -3384,7 +3389,7 @@
508    ac_save_LIBS="$LIBS"
509  LIBS="-l$ac_lib  $LIBS"
510  cat > conftest.$ac_ext <<EOF
511 -#line 3388 "configure"
512 +#line 3393 "configure"
513  #include "confdefs.h"
514  /* Override any gcc2 internal prototype to avoid an error.  */
515  /* We use char because int might match the return type of a gcc2
516 @@ -3395,7 +3400,7 @@
517  yywrap()
518  ; return 0; }
519  EOF
520 -if { (eval echo configure:3399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
521 +if { (eval echo configure:3404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
522    rm -rf conftest*
523    eval "ac_cv_lib_$ac_lib_var=yes"
524  else
525 @@ -3419,7 +3424,7 @@
526  
527    if test "$LEX" = "flex"; then
528      echo $ac_n "checking lex output file root""... $ac_c" 1>&6
529 -echo "configure:3423: checking lex output file root" >&5
530 +echo "configure:3428: checking lex output file root" >&5
531  if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
532    echo $ac_n "(cached) $ac_c" 1>&6
533  else
534 @@ -3440,7 +3445,7 @@
535  LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
536  
537  echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
538 -echo "configure:3444: checking whether yytext is a pointer" >&5
539 +echo "configure:3449: checking whether yytext is a pointer" >&5
540  if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
541    echo $ac_n "(cached) $ac_c" 1>&6
542  else
543 @@ -3452,14 +3457,14 @@
544  ac_save_LIBS="$LIBS"
545  LIBS="$LIBS $LEXLIB"
546  cat > conftest.$ac_ext <<EOF
547 -#line 3456 "configure"
548 +#line 3461 "configure"
549  #include "confdefs.h"
550  `cat $LEX_OUTPUT_ROOT.c`
551  int main() {
552  
553  ; return 0; }
554  EOF
555 -if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
556 +if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
557    rm -rf conftest*
558    ac_cv_prog_lex_yytext_pointer=yes
559  else
560 @@ -3483,12 +3488,12 @@
561      :
562    fi
563          echo $ac_n "checking for working const""... $ac_c" 1>&6
564 -echo "configure:3487: checking for working const" >&5
565 +echo "configure:3492: checking for working const" >&5
566  if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
567    echo $ac_n "(cached) $ac_c" 1>&6
568  else
569    cat > conftest.$ac_ext <<EOF
570 -#line 3492 "configure"
571 +#line 3497 "configure"
572  #include "confdefs.h"
573  
574  int main() {
575 @@ -3537,7 +3542,7 @@
576  
577  ; return 0; }
578  EOF
579 -if { (eval echo configure:3541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
580 +if { (eval echo configure:3546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
581    rm -rf conftest*
582    ac_cv_c_const=yes
583  else
584 @@ -3563,7 +3568,7 @@
585  
586    if test "$LEX" = "flex"; then
587      echo $ac_n "checking for flex version""... $ac_c" 1>&6
588 -echo "configure:3567: checking for flex version" >&5
589 +echo "configure:3572: checking for flex version" >&5
590  if eval "test \"`echo '$''{'php_cv_flex_version'+set}'`\" = set"; then
591    echo $ac_n "(cached) $ac_c" 1>&6
592  else
593 @@ -3629,7 +3634,7 @@
594        
595    gcc_arg_name=ac_cv_gcc_arg_no_cpp_precomp
596    echo $ac_n "checking whether $CC supports -no-cpp-precomp""... $ac_c" 1>&6
597 -echo "configure:3633: checking whether $CC supports -no-cpp-precomp" >&5
598 +echo "configure:3638: checking whether $CC supports -no-cpp-precomp" >&5
599  if eval "test \"`echo '$''{'ac_cv_gcc_arg_no_cpp_precomp'+set}'`\" = set"; then
600    echo $ac_n "(cached) $ac_c" 1>&6
601  else
602 @@ -3827,7 +3832,7 @@
603  # Disable PIC mode by default where it is known to be safe to do so,
604  # to avoid the performance hit from the lost register
605  echo $ac_n "checking whether to force non-PIC code in shared modules""... $ac_c" 1>&6
606 -echo "configure:3831: checking whether to force non-PIC code in shared modules" >&5
607 +echo "configure:3836: checking whether to force non-PIC code in shared modules" >&5
608  case $host_alias in
609  i?86-*-linux*|i?86-*-freebsd*)
610      if test "${with_pic+set}" != "set" || test "$with_pic" = "no"; then
611 @@ -3855,7 +3860,7 @@
612  
613  
614  echo $ac_n "checking whether /dev/urandom exists""... $ac_c" 1>&6
615 -echo "configure:3859: checking whether /dev/urandom exists" >&5 
616 +echo "configure:3864: checking whether /dev/urandom exists" >&5 
617  if test -r "/dev/urandom" && test -c "/dev/urandom"; then 
618    cat >> confdefs.h <<\EOF
619  #define HAVE_DEV_URANDOM 1
620 @@ -3916,7 +3921,7 @@
621  
622  else
623    cat > conftest.$ac_ext <<EOF
624 -#line 3920 "configure"
625 +#line 3925 "configure"
626  #include "confdefs.h"
627  
628  #include <pthread.h>
629 @@ -3934,7 +3939,7 @@
630      return pthread_create(&thd, NULL, thread_routine, &data);
631  } 
632  EOF
633 -if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
634 +if { (eval echo configure:3943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
635  then
636    
637    pthreads_working=yes
638 @@ -3954,7 +3959,7 @@
639    CFLAGS=$save_CFLAGS
640  
641    echo $ac_n "checking for pthreads_cflags""... $ac_c" 1>&6
642 -echo "configure:3958: checking for pthreads_cflags" >&5
643 +echo "configure:3963: checking for pthreads_cflags" >&5
644  if eval "test \"`echo '$''{'ac_cv_pthreads_cflags'+set}'`\" = set"; then
645    echo $ac_n "(cached) $ac_c" 1>&6
646  else
647 @@ -3976,7 +3981,7 @@
648  
649  else
650    cat > conftest.$ac_ext <<EOF
651 -#line 3980 "configure"
652 +#line 3985 "configure"
653  #include "confdefs.h"
654  
655  #include <pthread.h>
656 @@ -3994,7 +3999,7 @@
657      return pthread_create(&thd, NULL, thread_routine, &data);
658  } 
659  EOF
660 -if { (eval echo configure:3998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
661 +if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
662  then
663    
664    pthreads_working=yes
665 @@ -4024,7 +4029,7 @@
666  echo "$ac_t""$ac_cv_pthreads_cflags" 1>&6
667  
668  echo $ac_n "checking for pthreads_lib""... $ac_c" 1>&6
669 -echo "configure:4028: checking for pthreads_lib" >&5
670 +echo "configure:4033: checking for pthreads_lib" >&5
671  if eval "test \"`echo '$''{'ac_cv_pthreads_lib'+set}'`\" = set"; then
672    echo $ac_n "(cached) $ac_c" 1>&6
673  else
674 @@ -4046,7 +4051,7 @@
675  
676  else
677    cat > conftest.$ac_ext <<EOF
678 -#line 4050 "configure"
679 +#line 4055 "configure"
680  #include "confdefs.h"
681  
682  #include <pthread.h>
683 @@ -4064,7 +4069,7 @@
684      return pthread_create(&thd, NULL, thread_routine, &data);
685  } 
686  EOF
687 -if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
688 +if { (eval echo configure:4073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
689  then
690    
691    pthreads_working=yes
692 @@ -4198,7 +4203,7 @@
693  
694  
695  echo $ac_n "checking for AOLserver support""... $ac_c" 1>&6
696 -echo "configure:4202: checking for AOLserver support" >&5
697 +echo "configure:4207: checking for AOLserver support" >&5
698  
699  if test "$PHP_AOLSERVER" != "no"; then
700    if test -d "$PHP_AOLSERVER/include"; then
701 @@ -4455,7 +4460,7 @@
702  
703  
704  echo $ac_n "checking for Apache 1.x module support via DSO through APXS""... $ac_c" 1>&6
705 -echo "configure:4459: checking for Apache 1.x module support via DSO through APXS" >&5
706 +echo "configure:4464: checking for Apache 1.x module support via DSO through APXS" >&5
707  
708  if test "$PHP_APXS" != "no"; then
709    if test "$PHP_APXS" = "yes"; then
710 @@ -4778,7 +4783,7 @@
711  
712  
713  echo $ac_n "checking for Apache 1.x module support""... $ac_c" 1>&6
714 -echo "configure:4782: checking for Apache 1.x module support" >&5
715 +echo "configure:4787: checking for Apache 1.x module support" >&5
716  
717  if test "$PHP_SAPI" != "apache" && test "$PHP_APACHE" != "no"; then
718    
719 @@ -5611,7 +5616,7 @@
720  php_enable_mod_charset=no
721  
722  echo $ac_n "checking whether to enable Apache charset compatibility option""... $ac_c" 1>&6
723 -echo "configure:5615: checking whether to enable Apache charset compatibility option" >&5
724 +echo "configure:5620: checking whether to enable Apache charset compatibility option" >&5
725  # Check whether --enable-mod-charset or --disable-mod-charset was given.
726  if test "${enable_mod_charset+set}" = set; then
727    enableval="$enable_mod_charset"
728 @@ -5646,7 +5651,7 @@
729          
730    gcc_arg_name=ac_cv_gcc_arg_rdynamic
731    echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6
732 -echo "configure:5650: checking whether $CC supports -rdynamic" >&5
733 +echo "configure:5655: checking whether $CC supports -rdynamic" >&5
734  if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then
735    echo $ac_n "(cached) $ac_c" 1>&6
736  else
737 @@ -5689,7 +5694,7 @@
738  
739    
740  echo $ac_n "checking for member fd in BUFF *""... $ac_c" 1>&6
741 -echo "configure:5693: checking for member fd in BUFF *" >&5
742 +echo "configure:5698: checking for member fd in BUFF *" >&5
743  if eval "test \"`echo '$''{'ac_cv_php_fd_in_buff'+set}'`\" = set"; then
744    echo $ac_n "(cached) $ac_c" 1>&6
745  else
746 @@ -5701,14 +5706,14 @@
747      CPPFLAGS="$CPPFLAGS $APACHE_INCLUDE"
748    fi
749    cat > conftest.$ac_ext <<EOF
750 -#line 5705 "configure"
751 +#line 5710 "configure"
752  #include "confdefs.h"
753  #include <httpd.h>
754  int main() {
755  conn_rec *c; int fd = c->client->fd;
756  ; return 0; }
757  EOF
758 -if { (eval echo configure:5712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
759 +if { (eval echo configure:5717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
760    rm -rf conftest*
761    
762      ac_cv_php_fd_in_buff=yes
763 @@ -5784,7 +5789,7 @@
764  
765  
766  echo $ac_n "checking for Apache 2.0 filter-module support via DSO through APXS""... $ac_c" 1>&6
767 -echo "configure:5788: checking for Apache 2.0 filter-module support via DSO through APXS" >&5
768 +echo "configure:5793: checking for Apache 2.0 filter-module support via DSO through APXS" >&5
769  
770  if test "$PHP_APXS2FILTER" != "no"; then
771    if test "$PHP_APXS2FILTER" = "yes"; then
772 @@ -6632,7 +6637,7 @@
773  
774  
775  echo $ac_n "checking for Apache 2.0 handler-module support via DSO through APXS""... $ac_c" 1>&6
776 -echo "configure:6636: checking for Apache 2.0 handler-module support via DSO through APXS" >&5
777 +echo "configure:6641: checking for Apache 2.0 handler-module support via DSO through APXS" >&5
778  
779  if test "$PHP_APXS2" != "no"; then
780    if test "$PHP_APXS2" = "yes"; then
781 @@ -7481,7 +7486,7 @@
782  
783  
784  echo $ac_n "checking for Apache 1.x (hooks) module support via DSO through APXS""... $ac_c" 1>&6
785 -echo "configure:7485: checking for Apache 1.x (hooks) module support via DSO through APXS" >&5
786 +echo "configure:7490: checking for Apache 1.x (hooks) module support via DSO through APXS" >&5
787  
788  if test "$PHP_APACHE_HOOKS" != "no"; then
789    if test "$PHP_APACHE_HOOKS" = "yes"; then
790 @@ -7804,7 +7809,7 @@
791  
792  
793  echo $ac_n "checking for Apache 1.x (hooks) module support""... $ac_c" 1>&6
794 -echo "configure:7808: checking for Apache 1.x (hooks) module support" >&5
795 +echo "configure:7813: checking for Apache 1.x (hooks) module support" >&5
796  
797  if test "$PHP_SAPI" != "apache" && test "$PHP_SAPI" != "apache_hooks" && test "$PHP_APACHE_HOOKS_STATIC" != "no"; then
798  
799 @@ -8637,7 +8642,7 @@
800  php_enable_mod_charset=no
801  
802  echo $ac_n "checking whether to enable Apache charset compatibility option""... $ac_c" 1>&6
803 -echo "configure:8641: checking whether to enable Apache charset compatibility option" >&5
804 +echo "configure:8646: checking whether to enable Apache charset compatibility option" >&5
805  # Check whether --enable-mod-charset or --disable-mod-charset was given.
806  if test "${enable_mod_charset+set}" = set; then
807    enableval="$enable_mod_charset"
808 @@ -8672,7 +8677,7 @@
809          
810    gcc_arg_name=ac_cv_gcc_arg_rdynamic
811    echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6
812 -echo "configure:8676: checking whether $CC supports -rdynamic" >&5
813 +echo "configure:8681: checking whether $CC supports -rdynamic" >&5
814  if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then
815    echo $ac_n "(cached) $ac_c" 1>&6
816  else
817 @@ -8715,7 +8720,7 @@
818  
819    
820  echo $ac_n "checking for member fd in BUFF *""... $ac_c" 1>&6
821 -echo "configure:8719: checking for member fd in BUFF *" >&5
822 +echo "configure:8724: checking for member fd in BUFF *" >&5
823  if eval "test \"`echo '$''{'ac_cv_php_fd_in_buff'+set}'`\" = set"; then
824    echo $ac_n "(cached) $ac_c" 1>&6
825  else
826 @@ -8727,14 +8732,14 @@
827      CPPFLAGS="$CPPFLAGS $APACHE_INCLUDE"
828    fi
829    cat > conftest.$ac_ext <<EOF
830 -#line 8731 "configure"
831 +#line 8736 "configure"
832  #include "confdefs.h"
833  #include <httpd.h>
834  int main() {
835  conn_rec *c; int fd = c->client->fd;
836  ; return 0; }
837  EOF
838 -if { (eval echo configure:8738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
839 +if { (eval echo configure:8743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
840    rm -rf conftest*
841    
842      ac_cv_php_fd_in_buff=yes
843 @@ -8811,7 +8816,7 @@
844  
845  
846  echo $ac_n "checking for Caudium support""... $ac_c" 1>&6
847 -echo "configure:8815: checking for Caudium support" >&5
848 +echo "configure:8820: checking for Caudium support" >&5
849  
850  if test "$PHP_CAUDIUM" != "no"; then
851    if test "$prefix" = "NONE"; then CPREF=/usr/local/; fi
852 @@ -8881,7 +8886,7 @@
853        PIKE_C_INCLUDE=/usr/local/include/`basename $PIKE`
854      fi
855      echo $ac_n "checking for C includes in $PIKE_C_INCLUDE""... $ac_c" 1>&6
856 -echo "configure:8885: checking for C includes in $PIKE_C_INCLUDE" >&5
857 +echo "configure:8890: checking for C includes in $PIKE_C_INCLUDE" >&5
858      if test -f $PIKE_C_INCLUDE/version.h; then
859        PIKE_TEST_VER=`$PIKE -e 'string v; int rel;sscanf(version(), "Pike v%s release %d", v, rel); write(v+"."+rel);'`
860        ###### VERSION MATCH CHECK #######
861 @@ -9162,7 +9167,7 @@
862  
863  
864  echo $ac_n "checking for CLI build""... $ac_c" 1>&6
865 -echo "configure:9166: checking for CLI build" >&5
866 +echo "configure:9171: checking for CLI build" >&5
867  if test "$PHP_CLI" != "no"; then
868    
869    src=$abs_srcdir/sapi/cli/Makefile.frag
870 @@ -9208,7 +9213,7 @@
871  php_with_continuity=no
872  
873  echo $ac_n "checking for Continuity support""... $ac_c" 1>&6
874 -echo "configure:9212: checking for Continuity support" >&5
875 +echo "configure:9217: checking for Continuity support" >&5
876  # Check whether --with-continuity or --without-continuity was given.
877  if test "${with_continuity+set}" = set; then
878    withval="$with_continuity"
879 @@ -9235,7 +9240,7 @@
880      { echo "configure: error: Please specify the path to the root of your Continuity server using --with-continuity=DIR" 1>&2; exit 1; }
881    fi
882    echo $ac_n "checking for Continuity include files""... $ac_c" 1>&6
883 -echo "configure:9239: checking for Continuity include files" >&5
884 +echo "configure:9244: checking for Continuity include files" >&5
885    if test -d $PHP_CONTINUITY/include ; then
886      CAPI_INCLUDE=$PHP_CONTINUITY/include
887      echo "$ac_t""Continuity Binary Distribution" 1>&6
888 @@ -9485,7 +9490,7 @@
889  
890  
891  echo $ac_n "checking for embedded SAPI library support""... $ac_c" 1>&6
892 -echo "configure:9489: checking for embedded SAPI library support" >&5
893 +echo "configure:9494: checking for embedded SAPI library support" >&5
894  
895  if test "$PHP_EMBED" != "no"; then
896    case "$PHP_EMBED" in
897 @@ -9702,7 +9707,7 @@
898  php_with_isapi=no
899  
900  echo $ac_n "checking for Zeus ISAPI support""... $ac_c" 1>&6
901 -echo "configure:9706: checking for Zeus ISAPI support" >&5
902 +echo "configure:9711: checking for Zeus ISAPI support" >&5
903  # Check whether --with-isapi or --without-isapi was given.
904  if test "${with_isapi+set}" = set; then
905    withval="$with_isapi"
906 @@ -9951,7 +9956,7 @@
907  php_with_milter=no
908  
909  echo $ac_n "checking for Milter support""... $ac_c" 1>&6
910 -echo "configure:9955: checking for Milter support" >&5
911 +echo "configure:9960: checking for Milter support" >&5
912  # Check whether --with-milter or --without-milter was given.
913  if test "${with_milter+set}" = set; then
914    withval="$with_milter"
915 @@ -10235,7 +10240,7 @@
916  php_with_nsapi=no
917  
918  echo $ac_n "checking for NSAPI support""... $ac_c" 1>&6
919 -echo "configure:10239: checking for NSAPI support" >&5
920 +echo "configure:10244: checking for NSAPI support" >&5
921  # Check whether --with-nsapi or --without-nsapi was given.
922  if test "${with_nsapi+set}" = set; then
923    withval="$with_nsapi"
924 @@ -10262,7 +10267,7 @@
925      { echo "configure: error: Please specify the path to the root of your Netscape/iPlanet/Sun Webserver using --with-nsapi=DIR" 1>&2; exit 1; }
926    fi
927    echo $ac_n "checking for NSAPI include files""... $ac_c" 1>&6
928 -echo "configure:10266: checking for NSAPI include files" >&5
929 +echo "configure:10271: checking for NSAPI include files" >&5
930    if test -d $PHP_NSAPI/include ; then
931      NSAPI_INC_DIR="$PHP_NSAPI/include"
932      echo "$ac_t""Netscape 3.x / Sun 7.x style" 1>&6
933 @@ -10270,17 +10275,17 @@
934  do
935  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
936  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
937 -echo "configure:10274: checking for $ac_hdr" >&5
938 +echo "configure:10279: checking for $ac_hdr" >&5
939  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
940    echo $ac_n "(cached) $ac_c" 1>&6
941  else
942    cat > conftest.$ac_ext <<EOF
943 -#line 10279 "configure"
944 +#line 10284 "configure"
945  #include "confdefs.h"
946  #include <$ac_hdr>
947  EOF
948  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
949 -{ (eval echo configure:10284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
950 +{ (eval echo configure:10289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
951  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
952  if test -z "$ac_err"; then
953    rm -rf conftest*
954 @@ -10315,17 +10320,17 @@
955  do
956  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
957  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
958 -echo "configure:10319: checking for $ac_hdr" >&5
959 +echo "configure:10324: checking for $ac_hdr" >&5
960  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
961    echo $ac_n "(cached) $ac_c" 1>&6
962  else
963    cat > conftest.$ac_ext <<EOF
964 -#line 10324 "configure"
965 +#line 10329 "configure"
966  #include "confdefs.h"
967  #include <$ac_hdr>
968  EOF
969  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
970 -{ (eval echo configure:10329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
971 +{ (eval echo configure:10334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
972  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
973  if test -z "$ac_err"; then
974    rm -rf conftest*
975 @@ -10587,7 +10592,7 @@
976  php_with_phttpd=no
977  
978  echo $ac_n "checking for PHTTPD support""... $ac_c" 1>&6
979 -echo "configure:10591: checking for PHTTPD support" >&5
980 +echo "configure:10596: checking for PHTTPD support" >&5
981  # Check whether --with-phttpd or --without-phttpd was given.
982  if test "${with_phttpd+set}" = set; then
983    withval="$with_phttpd"
984 @@ -10833,7 +10838,7 @@
985  php_with_pi3web=no
986  
987  echo $ac_n "checking for Pi3Web support""... $ac_c" 1>&6
988 -echo "configure:10837: checking for Pi3Web support" >&5
989 +echo "configure:10842: checking for Pi3Web support" >&5
990  # Check whether --with-pi3web or --without-pi3web was given.
991  if test "${with_pi3web+set}" = set; then
992    withval="$with_pi3web"
993 @@ -11200,7 +11205,7 @@
994  php_enable_roxen_zts=no
995  
996  echo $ac_n "checking whether Roxen module is build using ZTS""... $ac_c" 1>&6
997 -echo "configure:11204: checking whether Roxen module is build using ZTS" >&5
998 +echo "configure:11209: checking whether Roxen module is build using ZTS" >&5
999  # Check whether --enable-roxen-zts or --disable-roxen-zts was given.
1000  if test "${enable_roxen_zts+set}" = set; then
1001    enableval="$enable_roxen_zts"
1002 @@ -11224,7 +11229,7 @@
1003  
1004  RESULT=
1005  echo $ac_n "checking for Roxen/Pike support""... $ac_c" 1>&6
1006 -echo "configure:11228: checking for Roxen/Pike support" >&5
1007 +echo "configure:11233: checking for Roxen/Pike support" >&5
1008  if test "$PHP_ROXEN" != "no"; then
1009    if test ! -d $PHP_ROXEN ; then
1010      { echo "configure: error: You did not specify a directory" 1>&2; exit 1; }
1011 @@ -11502,7 +11507,7 @@
1012  
1013  
1014  echo $ac_n "checking for thttpd""... $ac_c" 1>&6
1015 -echo "configure:11506: checking for thttpd" >&5
1016 +echo "configure:11511: checking for thttpd" >&5
1017  
1018  if test "$PHP_THTTPD" != "no"; then
1019    if test ! -d $PHP_THTTPD; then
1020 @@ -11535,7 +11540,7 @@
1021          
1022    gcc_arg_name=ac_cv_gcc_arg_rdynamic
1023    echo $ac_n "checking whether $CC supports -rdynamic""... $ac_c" 1>&6
1024 -echo "configure:11539: checking whether $CC supports -rdynamic" >&5
1025 +echo "configure:11544: checking whether $CC supports -rdynamic" >&5
1026  if eval "test \"`echo '$''{'ac_cv_gcc_arg_rdynamic'+set}'`\" = set"; then
1027    echo $ac_n "(cached) $ac_c" 1>&6
1028  else
1029 @@ -11763,24 +11768,24 @@
1030  
1031  
1032  echo $ac_n "checking for TUX""... $ac_c" 1>&6
1033 -echo "configure:11767: checking for TUX" >&5
1034 +echo "configure:11772: checking for TUX" >&5
1035  if test "$PHP_TUX" != "no"; then
1036    INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_SHARED $PHP_TUX/php5.tux.so"
1037    for ac_hdr in tuxmodule.h
1038  do
1039  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1040  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1041 -echo "configure:11774: checking for $ac_hdr" >&5
1042 +echo "configure:11779: checking for $ac_hdr" >&5
1043  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1044    echo $ac_n "(cached) $ac_c" 1>&6
1045  else
1046    cat > conftest.$ac_ext <<EOF
1047 -#line 11779 "configure"
1048 +#line 11784 "configure"
1049  #include "confdefs.h"
1050  #include <$ac_hdr>
1051  EOF
1052  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1053 -{ (eval echo configure:11784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1054 +{ (eval echo configure:11789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1055  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1056  if test -z "$ac_err"; then
1057    rm -rf conftest*
1058 @@ -12009,7 +12014,7 @@
1059  
1060  
1061  echo $ac_n "checking for webjames""... $ac_c" 1>&6
1062 -echo "configure:12013: checking for webjames" >&5
1063 +echo "configure:12018: checking for webjames" >&5
1064  
1065  if test "$PHP_WEBJAMES" != "no"; then
1066    
1067 @@ -12359,9 +12364,34 @@
1068  
1069  
1070  
1071 +
1072 +php_enable_fpm=no
1073 +
1074 +
1075 +# Check whether --enable-fpm or --disable-fpm was given.
1076 +if test "${enable_fpm+set}" = set; then
1077 +  enableval="$enable_fpm"
1078 +  PHP_FPM=$enableval
1079 +else
1080 +  
1081 +  PHP_FPM=no
1082 +
1083 +  if test "$PHP_ENABLE_ALL" && test "no" = "yes"; then
1084 +    PHP_FPM=$PHP_ENABLE_ALL
1085 +  fi
1086 +
1087 +fi
1088 +
1089 +
1090 +ext_output=$PHP_FPM
1091 +
1092 +
1093 +
1094 +
1095 +
1096  if test "$PHP_SAPI" = "default"; then
1097    echo $ac_n "checking whether to build CGI binary""... $ac_c" 1>&6
1098 -echo "configure:12365: checking whether to build CGI binary" >&5
1099 +echo "configure:12395: checking whether to build CGI binary" >&5
1100    if test "$PHP_CGI" != "no"; then
1101      echo "$ac_t""yes" 1>&6
1102      
1103 @@ -12384,7 +12414,7 @@
1104  
1105  
1106          echo $ac_n "checking whether to enable fastcgi support""... $ac_c" 1>&6
1107 -echo "configure:12388: checking whether to enable fastcgi support" >&5
1108 +echo "configure:12418: checking whether to enable fastcgi support" >&5
1109      if test "$PHP_FASTCGI" = "yes"; then
1110        PHP_ENABLE_FASTCGI=1
1111        PHP_FCGI_FILES="fastcgi.c"
1112 @@ -12398,8 +12428,25 @@
1113  
1114      echo "$ac_t""$PHP_FASTCGI" 1>&6
1115  
1116 +        if test "$PHP_FASTCGI" = "yes"; then
1117 +      echo $ac_n "checking whether to activate experimental fastcgi process manager code""... $ac_c" 1>&6
1118 +echo "configure:12434: checking whether to activate experimental fastcgi process manager code" >&5
1119 +      if test "$PHP_FPM" = "yes"; then
1120 +        PHP_FASTCGI_PM=1
1121 +      else
1122 +        PHP_FASTCGI_PM=0
1123 +      fi
1124 +      echo "$ac_t""$PHP_FPM" 1>&6
1125 +    else
1126 +      PHP_FASTCGI_PM=0
1127 +    fi
1128 +    cat >> confdefs.h <<EOF
1129 +#define PHP_FASTCGI_PM $PHP_FASTCGI_PM
1130 +EOF
1131 +
1132 +
1133          echo $ac_n "checking whether to force Apache CGI redirect""... $ac_c" 1>&6
1134 -echo "configure:12403: checking whether to force Apache CGI redirect" >&5
1135 +echo "configure:12450: checking whether to force Apache CGI redirect" >&5
1136      if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
1137        CGI_REDIRECT=1
1138      else
1139 @@ -12412,7 +12459,7 @@
1140      echo "$ac_t""$PHP_FORCE_CGI_REDIRECT" 1>&6
1141  
1142          echo $ac_n "checking whether to discard path_info + path_translated""... $ac_c" 1>&6
1143 -echo "configure:12416: checking whether to discard path_info + path_translated" >&5
1144 +echo "configure:12463: checking whether to discard path_info + path_translated" >&5
1145      if test "$PHP_DISCARD_PATH" = "yes"; then
1146        DISCARD_PATH=1
1147      else
1148 @@ -12425,7 +12472,7 @@
1149      echo "$ac_t""$PHP_DISCARD_PATH" 1>&6
1150  
1151          echo $ac_n "checking whether to enable path info checking""... $ac_c" 1>&6
1152 -echo "configure:12429: checking whether to enable path info checking" >&5
1153 +echo "configure:12476: checking whether to enable path info checking" >&5
1154      if test "$PHP_PATH_INFO_CHECK" = "yes"; then
1155        ENABLE_PATHINFO_CHECK=1
1156      else
1157 @@ -12614,10 +12661,10 @@
1158          BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
1159          ;;
1160        *darwin*)
1161 -        BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
1162 +        BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(SAPI_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
1163        ;;
1164        *)
1165 -        BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
1166 +        BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(SAPI_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
1167        ;;
1168      esac
1169  
1170 @@ -12637,7 +12684,7 @@
1171  
1172  
1173  echo $ac_n "checking for chosen SAPI module""... $ac_c" 1>&6
1174 -echo "configure:12641: checking for chosen SAPI module" >&5
1175 +echo "configure:12688: checking for chosen SAPI module" >&5
1176  echo "$ac_t""$PHP_SAPI" 1>&6
1177  
1178  if test "$enable_maintainer_zts" = "yes"; then
1179 @@ -12680,6 +12727,262 @@
1180  
1181  fi
1182  
1183 +if test "$PHP_FASTCGI" = "yes" -a "$PHP_FPM" = "yes"; then
1184 +  
1185 +  echo "$ac_t""" 1>&6
1186 +  echo "$ac_t""${T_MD}Running FastCGI Process Manager checks${T_ME}" 1>&6
1187 +
1188 +  
1189 +
1190 +
1191 +
1192 +
1193 +
1194 +
1195 +
1196 +
1197 +
1198 +  
1199 +
1200 +       echo "$ac_t""checking for XML configuration" 1>&6
1201 +
1202 +       # Check whether --with-xml-config or --without-xml-config was given.
1203 +if test "${with_xml_config+set}" = set; then
1204 +  withval="$with_xml_config"
1205 +  XMLCONFIG="$withval"
1206 +else
1207 +  for ac_prog in xml2-config xml-config
1208 +do
1209 +# Extract the first word of "$ac_prog", so it can be a program name with args.
1210 +set dummy $ac_prog; ac_word=$2
1211 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1212 +echo "configure:12760: checking for $ac_word" >&5
1213 +if eval "test \"`echo '$''{'ac_cv_path_XMLCONFIG'+set}'`\" = set"; then
1214 +  echo $ac_n "(cached) $ac_c" 1>&6
1215 +else
1216 +  case "$XMLCONFIG" in
1217 +  /*)
1218 +  ac_cv_path_XMLCONFIG="$XMLCONFIG" # Let the user override the test with a path.
1219 +  ;;
1220 +  ?:/*)                         
1221 +  ac_cv_path_XMLCONFIG="$XMLCONFIG" # Let the user override the test with a dos path.
1222 +  ;;
1223 +  *)
1224 +  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
1225 +  ac_dummy="$PATH"
1226 +  for ac_dir in $ac_dummy; do 
1227 +    test -z "$ac_dir" && ac_dir=.
1228 +    if test -f $ac_dir/$ac_word; then
1229 +      ac_cv_path_XMLCONFIG="$ac_dir/$ac_word"
1230 +      break
1231 +    fi
1232 +  done
1233 +  IFS="$ac_save_ifs"
1234 +  ;;
1235 +esac
1236 +fi
1237 +XMLCONFIG="$ac_cv_path_XMLCONFIG"
1238 +if test -n "$XMLCONFIG"; then
1239 +  echo "$ac_t""$XMLCONFIG" 1>&6
1240 +else
1241 +  echo "$ac_t""no" 1>&6
1242 +fi
1243 +
1244 +test -n "$XMLCONFIG" && break
1245 +done
1246 +test -n "$XMLCONFIG" || XMLCONFIG=""""
1247 +
1248 +       
1249 +fi
1250 +
1251 +
1252 +       if test "x$XMLCONFIG" = "x"; then
1253 +               { echo "configure: error: XML configuration could not be found" 1>&2; exit 1; }
1254 +       else
1255 +        echo $ac_n "checking for libxml library""... $ac_c" 1>&6
1256 +echo "configure:12804: checking for libxml library" >&5
1257 +
1258 +               if test ! -x "$XMLCONFIG"; then
1259 +                       { echo "configure: error: $XMLCONFIG cannot be executed" 1>&2; exit 1; }
1260 +               fi
1261 +
1262 +               LIBXML_LIBS="`$XMLCONFIG --libs`"
1263 +               LIBXML_CFLAGS="`$XMLCONFIG --cflags`"
1264 +               LIBXML_VERSION="`$XMLCONFIG --version`"
1265 +
1266 +        echo "$ac_t""yes, $LIBXML_VERSION" 1>&6
1267 +
1268 +               
1269 +       SAVED_CFLAGS="$CFLAGS"
1270 +       CFLAGS="$CFLAGS $LIBXML_CFLAGS"
1271 +       SAVED_LIBS="$LIBS"
1272 +       LIBS="$LIBS $LIBXML_LIBS"
1273 +
1274 +       echo $ac_n "checking for xmlParseFile""... $ac_c" 1>&6
1275 +echo "configure:12823: checking for xmlParseFile" >&5
1276 +if eval "test \"`echo '$''{'ac_cv_func_xmlParseFile'+set}'`\" = set"; then
1277 +  echo $ac_n "(cached) $ac_c" 1>&6
1278 +else
1279 +  cat > conftest.$ac_ext <<EOF
1280 +#line 12828 "configure"
1281 +#include "confdefs.h"
1282 +/* System header to define __stub macros and hopefully few prototypes,
1283 +    which can conflict with char xmlParseFile(); below.  */
1284 +#include <assert.h>
1285 +/* Override any gcc2 internal prototype to avoid an error.  */
1286 +/* We use char because int might match the return type of a gcc2
1287 +    builtin and then its argument prototype would still apply.  */
1288 +char xmlParseFile();
1289 +
1290 +int main() {
1291 +
1292 +/* The GNU C library defines this for functions which it implements
1293 +    to always fail with ENOSYS.  Some functions are actually named
1294 +    something starting with __ and the normal name is an alias.  */
1295 +#if defined (__stub_xmlParseFile) || defined (__stub___xmlParseFile)
1296 +choke me
1297 +#else
1298 +xmlParseFile();
1299 +#endif
1300 +
1301 +; return 0; }
1302 +EOF
1303 +if { (eval echo configure:12851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1304 +  rm -rf conftest*
1305 +  eval "ac_cv_func_xmlParseFile=yes"
1306 +else
1307 +  echo "configure: failed program was:" >&5
1308 +  cat conftest.$ac_ext >&5
1309 +  rm -rf conftest*
1310 +  eval "ac_cv_func_xmlParseFile=no"
1311 +fi
1312 +rm -f conftest*
1313 +fi
1314 +
1315 +if eval "test \"`echo '$ac_cv_func_'xmlParseFile`\" = yes"; then
1316 +  echo "$ac_t""yes" 1>&6
1317 +  :
1318 +else
1319 +  echo "$ac_t""no" 1>&6
1320 +{ echo "configure: error: Failed to link with libxml" 1>&2; exit 1; }
1321 +fi
1322 +
1323 +
1324 +       CFLAGS="$SAVED_CFLAGS"
1325 +       LIBS="$SAVED_LIBS"
1326 +
1327 +
1328 +               cat >> confdefs.h <<\EOF
1329 +#define HAVE_LIBXML 1
1330 +EOF
1331 +
1332 +       fi
1333 +
1334 +
1335 +LIBEVENT_CFLAGS="-I$abs_srcdir/libevent"
1336 +LIBEVENT_LIBS="$abs_builddir/libevent/libevent.la"
1337 +
1338 +SAPI_EXTRA_DEPS="$LIBEVENT_LIBS"
1339 +
1340 +FPM_SOURCES="fpm.c fpm_conf.c fpm_signals.c fpm_children.c fpm_worker_pool.c fpm_unix.c fpm_cleanup.c \
1341 +       fpm_sockets.c fpm_stdio.c fpm_env.c fpm_events.c fpm_php.c fpm_process_ctl.c fpm_shm.c xml_config.c zlog.c"
1342 +
1343 +FPM_CFLAGS="$LIBEVENT_CFLAGS $LIBXML_CFLAGS $JUDY_CFLAGS"
1344 +SAPI_EXTRA_LIBS="$LIBEVENT_LIBS $LIBXML_LIBS $JUDY_LIBS"
1345 +
1346 +FPM_CFLAGS="$FPM_CFLAGS -I$abs_srcdir/sapi/cgi" # for fastcgi.h
1347 +
1348 +if [ "x$CC" = "xgcc" ] ; then
1349 +       FPM_CFLAGS="-W -Wall -Wpointer-arith -Wno-unused-parameter -Wno-unused-function -Wunused-variable -Wunused-value $FPM_CFLAGS"
1350 +fi
1351 +
1352 +
1353 +  src=$abs_srcdir/sapi/cgi/fpm/Makefile.frag
1354 +  ac_srcdir=$ext_srcdir
1355 +  ac_builddir=$ext_builddir
1356 +  test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments
1357 +
1358 +
1359 +
1360 +  
1361 +  case sapi/cgi/fpm in
1362 +  "") ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
1363 +  /*) ac_srcdir=`echo "sapi/cgi/fpm"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
1364 +  *) ac_srcdir="$abs_srcdir/sapi/cgi/fpm/"; ac_bdir="sapi/cgi/fpm/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
1365 +  esac
1366 +  
1367 +  
1368 +
1369 +  b_c_pre=$php_c_pre
1370 +  b_cxx_pre=$php_cxx_pre
1371 +  b_c_meta=$php_c_meta
1372 +  b_cxx_meta=$php_cxx_meta
1373 +  b_c_post=$php_c_post
1374 +  b_cxx_post=$php_cxx_post
1375 +  b_lo=$php_lo
1376 +
1377 +
1378 +  old_IFS=$IFS
1379 +  for ac_src in $FPM_SOURCES; do
1380 +  
1381 +      IFS=.
1382 +      set $ac_src
1383 +      ac_obj=$1
1384 +      IFS=$old_IFS
1385 +      
1386 +      PHP_SAPI_OBJS="$PHP_SAPI_OBJS $ac_bdir$ac_obj.lo"
1387 +
1388 +      case $ac_src in
1389 +        *.c) ac_comp="$b_c_pre $FPM_CFLAGS $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
1390 +        *.s) ac_comp="$b_c_pre $FPM_CFLAGS $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
1391 +        *.S) ac_comp="$b_c_pre $FPM_CFLAGS $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_c_post" ;;
1392 +        *.cpp|*.cc|*.cxx) ac_comp="$b_cxx_pre $FPM_CFLAGS $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $b_cxx_post" ;;
1393 +      esac
1394 +
1395 +    cat >>Makefile.objects<<EOF
1396 +$ac_bdir$ac_obj.lo: $ac_srcdir$ac_src
1397 +       $ac_comp
1398 +EOF
1399 +  done
1400 +
1401 +
1402 +
1403 +
1404 +  
1405 +    BUILD_DIR="$BUILD_DIR sapi/cgi/fpm"
1406 +  
1407 +
1408 +
1409 +install_fpm="install-fpm"
1410 +
1411 +
1412 +  echo "$ac_t""" 1>&6
1413 +  echo "$ac_t""${T_MD}Configuring libevent${T_ME}" 1>&6
1414 +
1415 +
1416 +test -d "$abs_builddir/libevent" || mkdir -p $abs_builddir/libevent
1417 +
1418 +
1419 +chmod +x "$abs_srcdir/libevent/configure" \
1420 +               "$abs_srcdir/libevent/config.guess" \
1421 +               "$abs_srcdir/libevent/config.sub" \
1422 +               "$abs_srcdir/libevent/depcomp" \
1423 +               "$abs_srcdir/libevent/install-sh" \
1424 +               "$abs_srcdir/libevent/missing" \
1425 +               "$abs_srcdir/libevent/mkinstalldirs"
1426 +
1427 +libevent_configure="cd $abs_builddir/libevent ; $abs_srcdir/libevent/configure --disable-shared"
1428 +
1429 +(eval $libevent_configure)
1430 +
1431 +if [ ! -f "$abs_builddir/libevent/Makefile" ] ; then
1432 +       echo "Failed to configure libevent" >&2
1433 +       exit 1
1434 +fi
1435 +
1436 +
1437 +fi
1438 +
1439  
1440  
1441  
1442 @@ -12695,7 +12998,7 @@
1443    # Extract the first word of "sendmail", so it can be a program name with args.
1444  set dummy sendmail; ac_word=$2
1445  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1446 -echo "configure:12699: checking for $ac_word" >&5
1447 +echo "configure:13002: checking for $ac_word" >&5
1448  if eval "test \"`echo '$''{'ac_cv_path_PROG_SENDMAIL'+set}'`\" = set"; then
1449    echo $ac_n "(cached) $ac_c" 1>&6
1450  else
1451 @@ -12734,7 +13037,7 @@
1452  
1453  
1454    echo $ac_n "checking whether system uses EBCDIC""... $ac_c" 1>&6
1455 -echo "configure:12738: checking whether system uses EBCDIC" >&5
1456 +echo "configure:13041: checking whether system uses EBCDIC" >&5
1457  if eval "test \"`echo '$''{'ac_cv_ebcdic'+set}'`\" = set"; then
1458    echo $ac_n "(cached) $ac_c" 1>&6
1459  else
1460 @@ -12745,7 +13048,7 @@
1461  
1462  else
1463    cat > conftest.$ac_ext <<EOF
1464 -#line 12749 "configure"
1465 +#line 13052 "configure"
1466  #include "confdefs.h"
1467  
1468  int main(void) { 
1469 @@ -12753,7 +13056,7 @@
1470  } 
1471  
1472  EOF
1473 -if { (eval echo configure:12757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1474 +if { (eval echo configure:13060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1475  then
1476    
1477    ac_cv_ebcdic=yes
1478 @@ -12781,7 +13084,7 @@
1479  
1480  
1481  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1482 -echo "configure:12785: checking whether byte ordering is bigendian" >&5
1483 +echo "configure:13088: checking whether byte ordering is bigendian" >&5
1484  if eval "test \"`echo '$''{'ac_cv_c_bigendian_php'+set}'`\" = set"; then
1485    echo $ac_n "(cached) $ac_c" 1>&6
1486  else
1487 @@ -12791,7 +13094,7 @@
1488    ac_cv_c_bigendian_php=unknown
1489  else
1490    cat > conftest.$ac_ext <<EOF
1491 -#line 12795 "configure"
1492 +#line 13098 "configure"
1493  #include "confdefs.h"
1494  
1495  int main(void)
1496 @@ -12807,7 +13110,7 @@
1497  }
1498    
1499  EOF
1500 -if { (eval echo configure:12811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1501 +if { (eval echo configure:13114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1502  then
1503    ac_cv_c_bigendian_php=yes
1504  else
1505 @@ -12833,7 +13136,7 @@
1506  
1507  
1508    echo $ac_n "checking whether writing to stdout works""... $ac_c" 1>&6
1509 -echo "configure:12837: checking whether writing to stdout works" >&5
1510 +echo "configure:13140: checking whether writing to stdout works" >&5
1511  if eval "test \"`echo '$''{'ac_cv_write_stdout'+set}'`\" = set"; then
1512    echo $ac_n "(cached) $ac_c" 1>&6
1513  else
1514 @@ -12844,7 +13147,7 @@
1515      
1516  else
1517    cat > conftest.$ac_ext <<EOF
1518 -#line 12848 "configure"
1519 +#line 13151 "configure"
1520  #include "confdefs.h"
1521  
1522  #ifdef HAVE_UNISTD_H
1523 @@ -12862,7 +13165,7 @@
1524  }
1525      
1526  EOF
1527 -if { (eval echo configure:12866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1528 +if { (eval echo configure:13169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1529  then
1530    
1531        ac_cv_write_stdout=yes
1532 @@ -12937,12 +13240,12 @@
1533    unset found
1534    
1535    echo $ac_n "checking for socket""... $ac_c" 1>&6
1536 -echo "configure:12941: checking for socket" >&5
1537 +echo "configure:13244: checking for socket" >&5
1538  if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
1539    echo $ac_n "(cached) $ac_c" 1>&6
1540  else
1541    cat > conftest.$ac_ext <<EOF
1542 -#line 12946 "configure"
1543 +#line 13249 "configure"
1544  #include "confdefs.h"
1545  /* System header to define __stub macros and hopefully few prototypes,
1546      which can conflict with char socket(); below.  */
1547 @@ -12965,7 +13268,7 @@
1548  
1549  ; return 0; }
1550  EOF
1551 -if { (eval echo configure:12969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1552 +if { (eval echo configure:13272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1553    rm -rf conftest*
1554    eval "ac_cv_func_socket=yes"
1555  else
1556 @@ -12983,12 +13286,12 @@
1557  else
1558    echo "$ac_t""no" 1>&6
1559   echo $ac_n "checking for __socket""... $ac_c" 1>&6
1560 -echo "configure:12987: checking for __socket" >&5
1561 +echo "configure:13290: checking for __socket" >&5
1562  if eval "test \"`echo '$''{'ac_cv_func___socket'+set}'`\" = set"; then
1563    echo $ac_n "(cached) $ac_c" 1>&6
1564  else
1565    cat > conftest.$ac_ext <<EOF
1566 -#line 12992 "configure"
1567 +#line 13295 "configure"
1568  #include "confdefs.h"
1569  /* System header to define __stub macros and hopefully few prototypes,
1570      which can conflict with char __socket(); below.  */
1571 @@ -13011,7 +13314,7 @@
1572  
1573  ; return 0; }
1574  EOF
1575 -if { (eval echo configure:13015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1576 +if { (eval echo configure:13318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1577    rm -rf conftest*
1578    eval "ac_cv_func___socket=yes"
1579  else
1580 @@ -13049,7 +13352,7 @@
1581    unset ac_cv_lib_socket___socket
1582    unset found
1583    echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1584 -echo "configure:13053: checking for socket in -lsocket" >&5
1585 +echo "configure:13356: checking for socket in -lsocket" >&5
1586  ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1587  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1588    echo $ac_n "(cached) $ac_c" 1>&6
1589 @@ -13057,7 +13360,7 @@
1590    ac_save_LIBS="$LIBS"
1591  LIBS="-lsocket  $LIBS"
1592  cat > conftest.$ac_ext <<EOF
1593 -#line 13061 "configure"
1594 +#line 13364 "configure"
1595  #include "confdefs.h"
1596  /* Override any gcc2 internal prototype to avoid an error.  */
1597  /* We use char because int might match the return type of a gcc2
1598 @@ -13068,7 +13371,7 @@
1599  socket()
1600  ; return 0; }
1601  EOF
1602 -if { (eval echo configure:13072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1603 +if { (eval echo configure:13375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1604    rm -rf conftest*
1605    eval "ac_cv_lib_$ac_lib_var=yes"
1606  else
1607 @@ -13088,7 +13391,7 @@
1608    echo "$ac_t""no" 1>&6
1609  
1610      echo $ac_n "checking for __socket in -lsocket""... $ac_c" 1>&6
1611 -echo "configure:13092: checking for __socket in -lsocket" >&5
1612 +echo "configure:13395: checking for __socket in -lsocket" >&5
1613  ac_lib_var=`echo socket'_'__socket | sed 'y%./+-%__p_%'`
1614  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1615    echo $ac_n "(cached) $ac_c" 1>&6
1616 @@ -13096,7 +13399,7 @@
1617    ac_save_LIBS="$LIBS"
1618  LIBS="-lsocket  $LIBS"
1619  cat > conftest.$ac_ext <<EOF
1620 -#line 13100 "configure"
1621 +#line 13403 "configure"
1622  #include "confdefs.h"
1623  /* Override any gcc2 internal prototype to avoid an error.  */
1624  /* We use char because int might match the return type of a gcc2
1625 @@ -13107,7 +13410,7 @@
1626  __socket()
1627  ; return 0; }
1628  EOF
1629 -if { (eval echo configure:13111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1630 +if { (eval echo configure:13414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1631    rm -rf conftest*
1632    eval "ac_cv_lib_$ac_lib_var=yes"
1633  else
1634 @@ -13139,11 +13442,11 @@
1635    found=no
1636  else
1637    cat > conftest.$ac_ext <<EOF
1638 -#line 13143 "configure"
1639 +#line 13446 "configure"
1640  #include "confdefs.h"
1641  main() { return (0); }
1642  EOF
1643 -if { (eval echo configure:13147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1644 +if { (eval echo configure:13450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1645  then
1646    found=yes
1647  else
1648 @@ -13194,12 +13497,12 @@
1649    unset found
1650    
1651    echo $ac_n "checking for socketpair""... $ac_c" 1>&6
1652 -echo "configure:13198: checking for socketpair" >&5
1653 +echo "configure:13501: checking for socketpair" >&5
1654  if eval "test \"`echo '$''{'ac_cv_func_socketpair'+set}'`\" = set"; then
1655    echo $ac_n "(cached) $ac_c" 1>&6
1656  else
1657    cat > conftest.$ac_ext <<EOF
1658 -#line 13203 "configure"
1659 +#line 13506 "configure"
1660  #include "confdefs.h"
1661  /* System header to define __stub macros and hopefully few prototypes,
1662      which can conflict with char socketpair(); below.  */
1663 @@ -13222,7 +13525,7 @@
1664  
1665  ; return 0; }
1666  EOF
1667 -if { (eval echo configure:13226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1668 +if { (eval echo configure:13529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1669    rm -rf conftest*
1670    eval "ac_cv_func_socketpair=yes"
1671  else
1672 @@ -13240,12 +13543,12 @@
1673  else
1674    echo "$ac_t""no" 1>&6
1675   echo $ac_n "checking for __socketpair""... $ac_c" 1>&6
1676 -echo "configure:13244: checking for __socketpair" >&5
1677 +echo "configure:13547: checking for __socketpair" >&5
1678  if eval "test \"`echo '$''{'ac_cv_func___socketpair'+set}'`\" = set"; then
1679    echo $ac_n "(cached) $ac_c" 1>&6
1680  else
1681    cat > conftest.$ac_ext <<EOF
1682 -#line 13249 "configure"
1683 +#line 13552 "configure"
1684  #include "confdefs.h"
1685  /* System header to define __stub macros and hopefully few prototypes,
1686      which can conflict with char __socketpair(); below.  */
1687 @@ -13268,7 +13571,7 @@
1688  
1689  ; return 0; }
1690  EOF
1691 -if { (eval echo configure:13272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1692 +if { (eval echo configure:13575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1693    rm -rf conftest*
1694    eval "ac_cv_func___socketpair=yes"
1695  else
1696 @@ -13306,7 +13609,7 @@
1697    unset ac_cv_lib_socket___socketpair
1698    unset found
1699    echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
1700 -echo "configure:13310: checking for socketpair in -lsocket" >&5
1701 +echo "configure:13613: checking for socketpair in -lsocket" >&5
1702  ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
1703  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1704    echo $ac_n "(cached) $ac_c" 1>&6
1705 @@ -13314,7 +13617,7 @@
1706    ac_save_LIBS="$LIBS"
1707  LIBS="-lsocket  $LIBS"
1708  cat > conftest.$ac_ext <<EOF
1709 -#line 13318 "configure"
1710 +#line 13621 "configure"
1711  #include "confdefs.h"
1712  /* Override any gcc2 internal prototype to avoid an error.  */
1713  /* We use char because int might match the return type of a gcc2
1714 @@ -13325,7 +13628,7 @@
1715  socketpair()
1716  ; return 0; }
1717  EOF
1718 -if { (eval echo configure:13329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1719 +if { (eval echo configure:13632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1720    rm -rf conftest*
1721    eval "ac_cv_lib_$ac_lib_var=yes"
1722  else
1723 @@ -13345,7 +13648,7 @@
1724    echo "$ac_t""no" 1>&6
1725  
1726      echo $ac_n "checking for __socketpair in -lsocket""... $ac_c" 1>&6
1727 -echo "configure:13349: checking for __socketpair in -lsocket" >&5
1728 +echo "configure:13652: checking for __socketpair in -lsocket" >&5
1729  ac_lib_var=`echo socket'_'__socketpair | sed 'y%./+-%__p_%'`
1730  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1731    echo $ac_n "(cached) $ac_c" 1>&6
1732 @@ -13353,7 +13656,7 @@
1733    ac_save_LIBS="$LIBS"
1734  LIBS="-lsocket  $LIBS"
1735  cat > conftest.$ac_ext <<EOF
1736 -#line 13357 "configure"
1737 +#line 13660 "configure"
1738  #include "confdefs.h"
1739  /* Override any gcc2 internal prototype to avoid an error.  */
1740  /* We use char because int might match the return type of a gcc2
1741 @@ -13364,7 +13667,7 @@
1742  __socketpair()
1743  ; return 0; }
1744  EOF
1745 -if { (eval echo configure:13368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1746 +if { (eval echo configure:13671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1747    rm -rf conftest*
1748    eval "ac_cv_lib_$ac_lib_var=yes"
1749  else
1750 @@ -13396,11 +13699,11 @@
1751    found=no
1752  else
1753    cat > conftest.$ac_ext <<EOF
1754 -#line 13400 "configure"
1755 +#line 13703 "configure"
1756  #include "confdefs.h"
1757  main() { return (0); }
1758  EOF
1759 -if { (eval echo configure:13404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1760 +if { (eval echo configure:13707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1761  then
1762    found=yes
1763  else
1764 @@ -13451,12 +13754,12 @@
1765    unset found
1766    
1767    echo $ac_n "checking for htonl""... $ac_c" 1>&6
1768 -echo "configure:13455: checking for htonl" >&5
1769 +echo "configure:13758: checking for htonl" >&5
1770  if eval "test \"`echo '$''{'ac_cv_func_htonl'+set}'`\" = set"; then
1771    echo $ac_n "(cached) $ac_c" 1>&6
1772  else
1773    cat > conftest.$ac_ext <<EOF
1774 -#line 13460 "configure"
1775 +#line 13763 "configure"
1776  #include "confdefs.h"
1777  /* System header to define __stub macros and hopefully few prototypes,
1778      which can conflict with char htonl(); below.  */
1779 @@ -13479,7 +13782,7 @@
1780  
1781  ; return 0; }
1782  EOF
1783 -if { (eval echo configure:13483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1784 +if { (eval echo configure:13786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1785    rm -rf conftest*
1786    eval "ac_cv_func_htonl=yes"
1787  else
1788 @@ -13497,12 +13800,12 @@
1789  else
1790    echo "$ac_t""no" 1>&6
1791   echo $ac_n "checking for __htonl""... $ac_c" 1>&6
1792 -echo "configure:13501: checking for __htonl" >&5
1793 +echo "configure:13804: checking for __htonl" >&5
1794  if eval "test \"`echo '$''{'ac_cv_func___htonl'+set}'`\" = set"; then
1795    echo $ac_n "(cached) $ac_c" 1>&6
1796  else
1797    cat > conftest.$ac_ext <<EOF
1798 -#line 13506 "configure"
1799 +#line 13809 "configure"
1800  #include "confdefs.h"
1801  /* System header to define __stub macros and hopefully few prototypes,
1802      which can conflict with char __htonl(); below.  */
1803 @@ -13525,7 +13828,7 @@
1804  
1805  ; return 0; }
1806  EOF
1807 -if { (eval echo configure:13529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1808 +if { (eval echo configure:13832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1809    rm -rf conftest*
1810    eval "ac_cv_func___htonl=yes"
1811  else
1812 @@ -13563,7 +13866,7 @@
1813    unset ac_cv_lib_socket___htonl
1814    unset found
1815    echo $ac_n "checking for htonl in -lsocket""... $ac_c" 1>&6
1816 -echo "configure:13567: checking for htonl in -lsocket" >&5
1817 +echo "configure:13870: checking for htonl in -lsocket" >&5
1818  ac_lib_var=`echo socket'_'htonl | sed 'y%./+-%__p_%'`
1819  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1820    echo $ac_n "(cached) $ac_c" 1>&6
1821 @@ -13571,7 +13874,7 @@
1822    ac_save_LIBS="$LIBS"
1823  LIBS="-lsocket  $LIBS"
1824  cat > conftest.$ac_ext <<EOF
1825 -#line 13575 "configure"
1826 +#line 13878 "configure"
1827  #include "confdefs.h"
1828  /* Override any gcc2 internal prototype to avoid an error.  */
1829  /* We use char because int might match the return type of a gcc2
1830 @@ -13582,7 +13885,7 @@
1831  htonl()
1832  ; return 0; }
1833  EOF
1834 -if { (eval echo configure:13586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1835 +if { (eval echo configure:13889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1836    rm -rf conftest*
1837    eval "ac_cv_lib_$ac_lib_var=yes"
1838  else
1839 @@ -13602,7 +13905,7 @@
1840    echo "$ac_t""no" 1>&6
1841  
1842      echo $ac_n "checking for __htonl in -lsocket""... $ac_c" 1>&6
1843 -echo "configure:13606: checking for __htonl in -lsocket" >&5
1844 +echo "configure:13909: checking for __htonl in -lsocket" >&5
1845  ac_lib_var=`echo socket'_'__htonl | sed 'y%./+-%__p_%'`
1846  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1847    echo $ac_n "(cached) $ac_c" 1>&6
1848 @@ -13610,7 +13913,7 @@
1849    ac_save_LIBS="$LIBS"
1850  LIBS="-lsocket  $LIBS"
1851  cat > conftest.$ac_ext <<EOF
1852 -#line 13614 "configure"
1853 +#line 13917 "configure"
1854  #include "confdefs.h"
1855  /* Override any gcc2 internal prototype to avoid an error.  */
1856  /* We use char because int might match the return type of a gcc2
1857 @@ -13621,7 +13924,7 @@
1858  __htonl()
1859  ; return 0; }
1860  EOF
1861 -if { (eval echo configure:13625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1862 +if { (eval echo configure:13928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1863    rm -rf conftest*
1864    eval "ac_cv_lib_$ac_lib_var=yes"
1865  else
1866 @@ -13653,11 +13956,11 @@
1867    found=no
1868  else
1869    cat > conftest.$ac_ext <<EOF
1870 -#line 13657 "configure"
1871 +#line 13960 "configure"
1872  #include "confdefs.h"
1873  main() { return (0); }
1874  EOF
1875 -if { (eval echo configure:13661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1876 +if { (eval echo configure:13964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1877  then
1878    found=yes
1879  else
1880 @@ -13708,12 +14011,12 @@
1881    unset found
1882    
1883    echo $ac_n "checking for gethostname""... $ac_c" 1>&6
1884 -echo "configure:13712: checking for gethostname" >&5
1885 +echo "configure:14015: checking for gethostname" >&5
1886  if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
1887    echo $ac_n "(cached) $ac_c" 1>&6
1888  else
1889    cat > conftest.$ac_ext <<EOF
1890 -#line 13717 "configure"
1891 +#line 14020 "configure"
1892  #include "confdefs.h"
1893  /* System header to define __stub macros and hopefully few prototypes,
1894      which can conflict with char gethostname(); below.  */
1895 @@ -13736,7 +14039,7 @@
1896  
1897  ; return 0; }
1898  EOF
1899 -if { (eval echo configure:13740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1900 +if { (eval echo configure:14043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1901    rm -rf conftest*
1902    eval "ac_cv_func_gethostname=yes"
1903  else
1904 @@ -13754,12 +14057,12 @@
1905  else
1906    echo "$ac_t""no" 1>&6
1907   echo $ac_n "checking for __gethostname""... $ac_c" 1>&6
1908 -echo "configure:13758: checking for __gethostname" >&5
1909 +echo "configure:14061: checking for __gethostname" >&5
1910  if eval "test \"`echo '$''{'ac_cv_func___gethostname'+set}'`\" = set"; then
1911    echo $ac_n "(cached) $ac_c" 1>&6
1912  else
1913    cat > conftest.$ac_ext <<EOF
1914 -#line 13763 "configure"
1915 +#line 14066 "configure"
1916  #include "confdefs.h"
1917  /* System header to define __stub macros and hopefully few prototypes,
1918      which can conflict with char __gethostname(); below.  */
1919 @@ -13782,7 +14085,7 @@
1920  
1921  ; return 0; }
1922  EOF
1923 -if { (eval echo configure:13786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1924 +if { (eval echo configure:14089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1925    rm -rf conftest*
1926    eval "ac_cv_func___gethostname=yes"
1927  else
1928 @@ -13820,7 +14123,7 @@
1929    unset ac_cv_lib_nsl___gethostname
1930    unset found
1931    echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
1932 -echo "configure:13824: checking for gethostname in -lnsl" >&5
1933 +echo "configure:14127: checking for gethostname in -lnsl" >&5
1934  ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'`
1935  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1936    echo $ac_n "(cached) $ac_c" 1>&6
1937 @@ -13828,7 +14131,7 @@
1938    ac_save_LIBS="$LIBS"
1939  LIBS="-lnsl  $LIBS"
1940  cat > conftest.$ac_ext <<EOF
1941 -#line 13832 "configure"
1942 +#line 14135 "configure"
1943  #include "confdefs.h"
1944  /* Override any gcc2 internal prototype to avoid an error.  */
1945  /* We use char because int might match the return type of a gcc2
1946 @@ -13839,7 +14142,7 @@
1947  gethostname()
1948  ; return 0; }
1949  EOF
1950 -if { (eval echo configure:13843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1951 +if { (eval echo configure:14146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1952    rm -rf conftest*
1953    eval "ac_cv_lib_$ac_lib_var=yes"
1954  else
1955 @@ -13859,7 +14162,7 @@
1956    echo "$ac_t""no" 1>&6
1957  
1958      echo $ac_n "checking for __gethostname in -lnsl""... $ac_c" 1>&6
1959 -echo "configure:13863: checking for __gethostname in -lnsl" >&5
1960 +echo "configure:14166: checking for __gethostname in -lnsl" >&5
1961  ac_lib_var=`echo nsl'_'__gethostname | sed 'y%./+-%__p_%'`
1962  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1963    echo $ac_n "(cached) $ac_c" 1>&6
1964 @@ -13867,7 +14170,7 @@
1965    ac_save_LIBS="$LIBS"
1966  LIBS="-lnsl  $LIBS"
1967  cat > conftest.$ac_ext <<EOF
1968 -#line 13871 "configure"
1969 +#line 14174 "configure"
1970  #include "confdefs.h"
1971  /* Override any gcc2 internal prototype to avoid an error.  */
1972  /* We use char because int might match the return type of a gcc2
1973 @@ -13878,7 +14181,7 @@
1974  __gethostname()
1975  ; return 0; }
1976  EOF
1977 -if { (eval echo configure:13882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1978 +if { (eval echo configure:14185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1979    rm -rf conftest*
1980    eval "ac_cv_lib_$ac_lib_var=yes"
1981  else
1982 @@ -13910,11 +14213,11 @@
1983    found=no
1984  else
1985    cat > conftest.$ac_ext <<EOF
1986 -#line 13914 "configure"
1987 +#line 14217 "configure"
1988  #include "confdefs.h"
1989  main() { return (0); }
1990  EOF
1991 -if { (eval echo configure:13918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1992 +if { (eval echo configure:14221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1993  then
1994    found=yes
1995  else
1996 @@ -13965,12 +14268,12 @@
1997    unset found
1998    
1999    echo $ac_n "checking for gethostbyaddr""... $ac_c" 1>&6
2000 -echo "configure:13969: checking for gethostbyaddr" >&5
2001 +echo "configure:14272: checking for gethostbyaddr" >&5
2002  if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr'+set}'`\" = set"; then
2003    echo $ac_n "(cached) $ac_c" 1>&6
2004  else
2005    cat > conftest.$ac_ext <<EOF
2006 -#line 13974 "configure"
2007 +#line 14277 "configure"
2008  #include "confdefs.h"
2009  /* System header to define __stub macros and hopefully few prototypes,
2010      which can conflict with char gethostbyaddr(); below.  */
2011 @@ -13993,7 +14296,7 @@
2012  
2013  ; return 0; }
2014  EOF
2015 -if { (eval echo configure:13997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2016 +if { (eval echo configure:14300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2017    rm -rf conftest*
2018    eval "ac_cv_func_gethostbyaddr=yes"
2019  else
2020 @@ -14011,12 +14314,12 @@
2021  else
2022    echo "$ac_t""no" 1>&6
2023   echo $ac_n "checking for __gethostbyaddr""... $ac_c" 1>&6
2024 -echo "configure:14015: checking for __gethostbyaddr" >&5
2025 +echo "configure:14318: checking for __gethostbyaddr" >&5
2026  if eval "test \"`echo '$''{'ac_cv_func___gethostbyaddr'+set}'`\" = set"; then
2027    echo $ac_n "(cached) $ac_c" 1>&6
2028  else
2029    cat > conftest.$ac_ext <<EOF
2030 -#line 14020 "configure"
2031 +#line 14323 "configure"
2032  #include "confdefs.h"
2033  /* System header to define __stub macros and hopefully few prototypes,
2034      which can conflict with char __gethostbyaddr(); below.  */
2035 @@ -14039,7 +14342,7 @@
2036  
2037  ; return 0; }
2038  EOF
2039 -if { (eval echo configure:14043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2040 +if { (eval echo configure:14346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2041    rm -rf conftest*
2042    eval "ac_cv_func___gethostbyaddr=yes"
2043  else
2044 @@ -14077,7 +14380,7 @@
2045    unset ac_cv_lib_nsl___gethostbyaddr
2046    unset found
2047    echo $ac_n "checking for gethostbyaddr in -lnsl""... $ac_c" 1>&6
2048 -echo "configure:14081: checking for gethostbyaddr in -lnsl" >&5
2049 +echo "configure:14384: checking for gethostbyaddr in -lnsl" >&5
2050  ac_lib_var=`echo nsl'_'gethostbyaddr | sed 'y%./+-%__p_%'`
2051  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2052    echo $ac_n "(cached) $ac_c" 1>&6
2053 @@ -14085,7 +14388,7 @@
2054    ac_save_LIBS="$LIBS"
2055  LIBS="-lnsl  $LIBS"
2056  cat > conftest.$ac_ext <<EOF
2057 -#line 14089 "configure"
2058 +#line 14392 "configure"
2059  #include "confdefs.h"
2060  /* Override any gcc2 internal prototype to avoid an error.  */
2061  /* We use char because int might match the return type of a gcc2
2062 @@ -14096,7 +14399,7 @@
2063  gethostbyaddr()
2064  ; return 0; }
2065  EOF
2066 -if { (eval echo configure:14100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2067 +if { (eval echo configure:14403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2068    rm -rf conftest*
2069    eval "ac_cv_lib_$ac_lib_var=yes"
2070  else
2071 @@ -14116,7 +14419,7 @@
2072    echo "$ac_t""no" 1>&6
2073  
2074      echo $ac_n "checking for __gethostbyaddr in -lnsl""... $ac_c" 1>&6
2075 -echo "configure:14120: checking for __gethostbyaddr in -lnsl" >&5
2076 +echo "configure:14423: checking for __gethostbyaddr in -lnsl" >&5
2077  ac_lib_var=`echo nsl'_'__gethostbyaddr | sed 'y%./+-%__p_%'`
2078  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2079    echo $ac_n "(cached) $ac_c" 1>&6
2080 @@ -14124,7 +14427,7 @@
2081    ac_save_LIBS="$LIBS"
2082  LIBS="-lnsl  $LIBS"
2083  cat > conftest.$ac_ext <<EOF
2084 -#line 14128 "configure"
2085 +#line 14431 "configure"
2086  #include "confdefs.h"
2087  /* Override any gcc2 internal prototype to avoid an error.  */
2088  /* We use char because int might match the return type of a gcc2
2089 @@ -14135,7 +14438,7 @@
2090  __gethostbyaddr()
2091  ; return 0; }
2092  EOF
2093 -if { (eval echo configure:14139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2094 +if { (eval echo configure:14442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2095    rm -rf conftest*
2096    eval "ac_cv_lib_$ac_lib_var=yes"
2097  else
2098 @@ -14167,11 +14470,11 @@
2099    found=no
2100  else
2101    cat > conftest.$ac_ext <<EOF
2102 -#line 14171 "configure"
2103 +#line 14474 "configure"
2104  #include "confdefs.h"
2105  main() { return (0); }
2106  EOF
2107 -if { (eval echo configure:14175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2108 +if { (eval echo configure:14478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2109  then
2110    found=yes
2111  else
2112 @@ -14222,12 +14525,12 @@
2113    unset found
2114    
2115    echo $ac_n "checking for yp_get_default_domain""... $ac_c" 1>&6
2116 -echo "configure:14226: checking for yp_get_default_domain" >&5
2117 +echo "configure:14529: checking for yp_get_default_domain" >&5
2118  if eval "test \"`echo '$''{'ac_cv_func_yp_get_default_domain'+set}'`\" = set"; then
2119    echo $ac_n "(cached) $ac_c" 1>&6
2120  else
2121    cat > conftest.$ac_ext <<EOF
2122 -#line 14231 "configure"
2123 +#line 14534 "configure"
2124  #include "confdefs.h"
2125  /* System header to define __stub macros and hopefully few prototypes,
2126      which can conflict with char yp_get_default_domain(); below.  */
2127 @@ -14250,7 +14553,7 @@
2128  
2129  ; return 0; }
2130  EOF
2131 -if { (eval echo configure:14254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2132 +if { (eval echo configure:14557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2133    rm -rf conftest*
2134    eval "ac_cv_func_yp_get_default_domain=yes"
2135  else
2136 @@ -14268,12 +14571,12 @@
2137  else
2138    echo "$ac_t""no" 1>&6
2139   echo $ac_n "checking for __yp_get_default_domain""... $ac_c" 1>&6
2140 -echo "configure:14272: checking for __yp_get_default_domain" >&5
2141 +echo "configure:14575: checking for __yp_get_default_domain" >&5
2142  if eval "test \"`echo '$''{'ac_cv_func___yp_get_default_domain'+set}'`\" = set"; then
2143    echo $ac_n "(cached) $ac_c" 1>&6
2144  else
2145    cat > conftest.$ac_ext <<EOF
2146 -#line 14277 "configure"
2147 +#line 14580 "configure"
2148  #include "confdefs.h"
2149  /* System header to define __stub macros and hopefully few prototypes,
2150      which can conflict with char __yp_get_default_domain(); below.  */
2151 @@ -14296,7 +14599,7 @@
2152  
2153  ; return 0; }
2154  EOF
2155 -if { (eval echo configure:14300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2156 +if { (eval echo configure:14603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2157    rm -rf conftest*
2158    eval "ac_cv_func___yp_get_default_domain=yes"
2159  else
2160 @@ -14334,7 +14637,7 @@
2161    unset ac_cv_lib_nsl___yp_get_default_domain
2162    unset found
2163    echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
2164 -echo "configure:14338: checking for yp_get_default_domain in -lnsl" >&5
2165 +echo "configure:14641: checking for yp_get_default_domain in -lnsl" >&5
2166  ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
2167  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2168    echo $ac_n "(cached) $ac_c" 1>&6
2169 @@ -14342,7 +14645,7 @@
2170    ac_save_LIBS="$LIBS"
2171  LIBS="-lnsl  $LIBS"
2172  cat > conftest.$ac_ext <<EOF
2173 -#line 14346 "configure"
2174 +#line 14649 "configure"
2175  #include "confdefs.h"
2176  /* Override any gcc2 internal prototype to avoid an error.  */
2177  /* We use char because int might match the return type of a gcc2
2178 @@ -14353,7 +14656,7 @@
2179  yp_get_default_domain()
2180  ; return 0; }
2181  EOF
2182 -if { (eval echo configure:14357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2183 +if { (eval echo configure:14660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2184    rm -rf conftest*
2185    eval "ac_cv_lib_$ac_lib_var=yes"
2186  else
2187 @@ -14373,7 +14676,7 @@
2188    echo "$ac_t""no" 1>&6
2189  
2190      echo $ac_n "checking for __yp_get_default_domain in -lnsl""... $ac_c" 1>&6
2191 -echo "configure:14377: checking for __yp_get_default_domain in -lnsl" >&5
2192 +echo "configure:14680: checking for __yp_get_default_domain in -lnsl" >&5
2193  ac_lib_var=`echo nsl'_'__yp_get_default_domain | sed 'y%./+-%__p_%'`
2194  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2195    echo $ac_n "(cached) $ac_c" 1>&6
2196 @@ -14381,7 +14684,7 @@
2197    ac_save_LIBS="$LIBS"
2198  LIBS="-lnsl  $LIBS"
2199  cat > conftest.$ac_ext <<EOF
2200 -#line 14385 "configure"
2201 +#line 14688 "configure"
2202  #include "confdefs.h"
2203  /* Override any gcc2 internal prototype to avoid an error.  */
2204  /* We use char because int might match the return type of a gcc2
2205 @@ -14392,7 +14695,7 @@
2206  __yp_get_default_domain()
2207  ; return 0; }
2208  EOF
2209 -if { (eval echo configure:14396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2210 +if { (eval echo configure:14699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2211    rm -rf conftest*
2212    eval "ac_cv_lib_$ac_lib_var=yes"
2213  else
2214 @@ -14424,11 +14727,11 @@
2215    found=no
2216  else
2217    cat > conftest.$ac_ext <<EOF
2218 -#line 14428 "configure"
2219 +#line 14731 "configure"
2220  #include "confdefs.h"
2221  main() { return (0); }
2222  EOF
2223 -if { (eval echo configure:14432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2224 +if { (eval echo configure:14735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2225  then
2226    found=yes
2227  else
2228 @@ -14480,12 +14783,12 @@
2229    unset found
2230    
2231    echo $ac_n "checking for dlopen""... $ac_c" 1>&6
2232 -echo "configure:14484: checking for dlopen" >&5
2233 +echo "configure:14787: checking for dlopen" >&5
2234  if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
2235    echo $ac_n "(cached) $ac_c" 1>&6
2236  else
2237    cat > conftest.$ac_ext <<EOF
2238 -#line 14489 "configure"
2239 +#line 14792 "configure"
2240  #include "confdefs.h"
2241  /* System header to define __stub macros and hopefully few prototypes,
2242      which can conflict with char dlopen(); below.  */
2243 @@ -14508,7 +14811,7 @@
2244  
2245  ; return 0; }
2246  EOF
2247 -if { (eval echo configure:14512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2248 +if { (eval echo configure:14815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2249    rm -rf conftest*
2250    eval "ac_cv_func_dlopen=yes"
2251  else
2252 @@ -14526,12 +14829,12 @@
2253  else
2254    echo "$ac_t""no" 1>&6
2255   echo $ac_n "checking for __dlopen""... $ac_c" 1>&6
2256 -echo "configure:14530: checking for __dlopen" >&5
2257 +echo "configure:14833: checking for __dlopen" >&5
2258  if eval "test \"`echo '$''{'ac_cv_func___dlopen'+set}'`\" = set"; then
2259    echo $ac_n "(cached) $ac_c" 1>&6
2260  else
2261    cat > conftest.$ac_ext <<EOF
2262 -#line 14535 "configure"
2263 +#line 14838 "configure"
2264  #include "confdefs.h"
2265  /* System header to define __stub macros and hopefully few prototypes,
2266      which can conflict with char __dlopen(); below.  */
2267 @@ -14554,7 +14857,7 @@
2268  
2269  ; return 0; }
2270  EOF
2271 -if { (eval echo configure:14558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2272 +if { (eval echo configure:14861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2273    rm -rf conftest*
2274    eval "ac_cv_func___dlopen=yes"
2275  else
2276 @@ -14592,7 +14895,7 @@
2277    unset ac_cv_lib_dl___dlopen
2278    unset found
2279    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2280 -echo "configure:14596: checking for dlopen in -ldl" >&5
2281 +echo "configure:14899: checking for dlopen in -ldl" >&5
2282  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2283  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2284    echo $ac_n "(cached) $ac_c" 1>&6
2285 @@ -14600,7 +14903,7 @@
2286    ac_save_LIBS="$LIBS"
2287  LIBS="-ldl  $LIBS"
2288  cat > conftest.$ac_ext <<EOF
2289 -#line 14604 "configure"
2290 +#line 14907 "configure"
2291  #include "confdefs.h"
2292  /* Override any gcc2 internal prototype to avoid an error.  */
2293  /* We use char because int might match the return type of a gcc2
2294 @@ -14611,7 +14914,7 @@
2295  dlopen()
2296  ; return 0; }
2297  EOF
2298 -if { (eval echo configure:14615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2299 +if { (eval echo configure:14918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2300    rm -rf conftest*
2301    eval "ac_cv_lib_$ac_lib_var=yes"
2302  else
2303 @@ -14631,7 +14934,7 @@
2304    echo "$ac_t""no" 1>&6
2305  
2306      echo $ac_n "checking for __dlopen in -ldl""... $ac_c" 1>&6
2307 -echo "configure:14635: checking for __dlopen in -ldl" >&5
2308 +echo "configure:14938: checking for __dlopen in -ldl" >&5
2309  ac_lib_var=`echo dl'_'__dlopen | sed 'y%./+-%__p_%'`
2310  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2311    echo $ac_n "(cached) $ac_c" 1>&6
2312 @@ -14639,7 +14942,7 @@
2313    ac_save_LIBS="$LIBS"
2314  LIBS="-ldl  $LIBS"
2315  cat > conftest.$ac_ext <<EOF
2316 -#line 14643 "configure"
2317 +#line 14946 "configure"
2318  #include "confdefs.h"
2319  /* Override any gcc2 internal prototype to avoid an error.  */
2320  /* We use char because int might match the return type of a gcc2
2321 @@ -14650,7 +14953,7 @@
2322  __dlopen()
2323  ; return 0; }
2324  EOF
2325 -if { (eval echo configure:14654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2326 +if { (eval echo configure:14957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2327    rm -rf conftest*
2328    eval "ac_cv_lib_$ac_lib_var=yes"
2329  else
2330 @@ -14682,11 +14985,11 @@
2331    found=no
2332  else
2333    cat > conftest.$ac_ext <<EOF
2334 -#line 14686 "configure"
2335 +#line 14989 "configure"
2336  #include "confdefs.h"
2337  main() { return (0); }
2338  EOF
2339 -if { (eval echo configure:14690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2340 +if { (eval echo configure:14993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2341  then
2342    found=yes
2343  else
2344 @@ -14738,7 +15041,7 @@
2345  
2346  fi
2347  echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
2348 -echo "configure:14742: checking for sin in -lm" >&5
2349 +echo "configure:15045: checking for sin in -lm" >&5
2350  ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
2351  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2352    echo $ac_n "(cached) $ac_c" 1>&6
2353 @@ -14746,7 +15049,7 @@
2354    ac_save_LIBS="$LIBS"
2355  LIBS="-lm  $LIBS"
2356  cat > conftest.$ac_ext <<EOF
2357 -#line 14750 "configure"
2358 +#line 15053 "configure"
2359  #include "confdefs.h"
2360  /* Override any gcc2 internal prototype to avoid an error.  */
2361  /* We use char because int might match the return type of a gcc2
2362 @@ -14757,7 +15060,7 @@
2363  sin()
2364  ; return 0; }
2365  EOF
2366 -if { (eval echo configure:14761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2367 +if { (eval echo configure:15064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2368    rm -rf conftest*
2369    eval "ac_cv_lib_$ac_lib_var=yes"
2370  else
2371 @@ -14791,12 +15094,12 @@
2372    unset found
2373    
2374    echo $ac_n "checking for res_search""... $ac_c" 1>&6
2375 -echo "configure:14795: checking for res_search" >&5
2376 +echo "configure:15098: checking for res_search" >&5
2377  if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
2378    echo $ac_n "(cached) $ac_c" 1>&6
2379  else
2380    cat > conftest.$ac_ext <<EOF
2381 -#line 14800 "configure"
2382 +#line 15103 "configure"
2383  #include "confdefs.h"
2384  /* System header to define __stub macros and hopefully few prototypes,
2385      which can conflict with char res_search(); below.  */
2386 @@ -14819,7 +15122,7 @@
2387  
2388  ; return 0; }
2389  EOF
2390 -if { (eval echo configure:14823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2391 +if { (eval echo configure:15126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2392    rm -rf conftest*
2393    eval "ac_cv_func_res_search=yes"
2394  else
2395 @@ -14837,12 +15140,12 @@
2396  else
2397    echo "$ac_t""no" 1>&6
2398   echo $ac_n "checking for __res_search""... $ac_c" 1>&6
2399 -echo "configure:14841: checking for __res_search" >&5
2400 +echo "configure:15144: checking for __res_search" >&5
2401  if eval "test \"`echo '$''{'ac_cv_func___res_search'+set}'`\" = set"; then
2402    echo $ac_n "(cached) $ac_c" 1>&6
2403  else
2404    cat > conftest.$ac_ext <<EOF
2405 -#line 14846 "configure"
2406 +#line 15149 "configure"
2407  #include "confdefs.h"
2408  /* System header to define __stub macros and hopefully few prototypes,
2409      which can conflict with char __res_search(); below.  */
2410 @@ -14865,7 +15168,7 @@
2411  
2412  ; return 0; }
2413  EOF
2414 -if { (eval echo configure:14869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2415 +if { (eval echo configure:15172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2416    rm -rf conftest*
2417    eval "ac_cv_func___res_search=yes"
2418  else
2419 @@ -14903,7 +15206,7 @@
2420    unset ac_cv_lib_resolv___res_search
2421    unset found
2422    echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
2423 -echo "configure:14907: checking for res_search in -lresolv" >&5
2424 +echo "configure:15210: checking for res_search in -lresolv" >&5
2425  ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
2426  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2427    echo $ac_n "(cached) $ac_c" 1>&6
2428 @@ -14911,7 +15214,7 @@
2429    ac_save_LIBS="$LIBS"
2430  LIBS="-lresolv  $LIBS"
2431  cat > conftest.$ac_ext <<EOF
2432 -#line 14915 "configure"
2433 +#line 15218 "configure"
2434  #include "confdefs.h"
2435  /* Override any gcc2 internal prototype to avoid an error.  */
2436  /* We use char because int might match the return type of a gcc2
2437 @@ -14922,7 +15225,7 @@
2438  res_search()
2439  ; return 0; }
2440  EOF
2441 -if { (eval echo configure:14926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2442 +if { (eval echo configure:15229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2443    rm -rf conftest*
2444    eval "ac_cv_lib_$ac_lib_var=yes"
2445  else
2446 @@ -14942,7 +15245,7 @@
2447    echo "$ac_t""no" 1>&6
2448  
2449      echo $ac_n "checking for __res_search in -lresolv""... $ac_c" 1>&6
2450 -echo "configure:14946: checking for __res_search in -lresolv" >&5
2451 +echo "configure:15249: checking for __res_search in -lresolv" >&5
2452  ac_lib_var=`echo resolv'_'__res_search | sed 'y%./+-%__p_%'`
2453  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2454    echo $ac_n "(cached) $ac_c" 1>&6
2455 @@ -14950,7 +15253,7 @@
2456    ac_save_LIBS="$LIBS"
2457  LIBS="-lresolv  $LIBS"
2458  cat > conftest.$ac_ext <<EOF
2459 -#line 14954 "configure"
2460 +#line 15257 "configure"
2461  #include "confdefs.h"
2462  /* Override any gcc2 internal prototype to avoid an error.  */
2463  /* We use char because int might match the return type of a gcc2
2464 @@ -14961,7 +15264,7 @@
2465  __res_search()
2466  ; return 0; }
2467  EOF
2468 -if { (eval echo configure:14965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2469 +if { (eval echo configure:15268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2470    rm -rf conftest*
2471    eval "ac_cv_lib_$ac_lib_var=yes"
2472  else
2473 @@ -14993,11 +15296,11 @@
2474    found=no
2475  else
2476    cat > conftest.$ac_ext <<EOF
2477 -#line 14997 "configure"
2478 +#line 15300 "configure"
2479  #include "confdefs.h"
2480  main() { return (0); }
2481  EOF
2482 -if { (eval echo configure:15001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2483 +if { (eval echo configure:15304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2484  then
2485    found=yes
2486  else
2487 @@ -15039,7 +15342,7 @@
2488    unset ac_cv_lib_bind___res_search
2489    unset found
2490    echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
2491 -echo "configure:15043: checking for res_search in -lbind" >&5
2492 +echo "configure:15346: checking for res_search in -lbind" >&5
2493  ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
2494  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2495    echo $ac_n "(cached) $ac_c" 1>&6
2496 @@ -15047,7 +15350,7 @@
2497    ac_save_LIBS="$LIBS"
2498  LIBS="-lbind  $LIBS"
2499  cat > conftest.$ac_ext <<EOF
2500 -#line 15051 "configure"
2501 +#line 15354 "configure"
2502  #include "confdefs.h"
2503  /* Override any gcc2 internal prototype to avoid an error.  */
2504  /* We use char because int might match the return type of a gcc2
2505 @@ -15058,7 +15361,7 @@
2506  res_search()
2507  ; return 0; }
2508  EOF
2509 -if { (eval echo configure:15062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2510 +if { (eval echo configure:15365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2511    rm -rf conftest*
2512    eval "ac_cv_lib_$ac_lib_var=yes"
2513  else
2514 @@ -15078,7 +15381,7 @@
2515    echo "$ac_t""no" 1>&6
2516  
2517      echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
2518 -echo "configure:15082: checking for __res_search in -lbind" >&5
2519 +echo "configure:15385: checking for __res_search in -lbind" >&5
2520  ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-%__p_%'`
2521  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2522    echo $ac_n "(cached) $ac_c" 1>&6
2523 @@ -15086,7 +15389,7 @@
2524    ac_save_LIBS="$LIBS"
2525  LIBS="-lbind  $LIBS"
2526  cat > conftest.$ac_ext <<EOF
2527 -#line 15090 "configure"
2528 +#line 15393 "configure"
2529  #include "confdefs.h"
2530  /* Override any gcc2 internal prototype to avoid an error.  */
2531  /* We use char because int might match the return type of a gcc2
2532 @@ -15097,7 +15400,7 @@
2533  __res_search()
2534  ; return 0; }
2535  EOF
2536 -if { (eval echo configure:15101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2537 +if { (eval echo configure:15404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2538    rm -rf conftest*
2539    eval "ac_cv_lib_$ac_lib_var=yes"
2540  else
2541 @@ -15129,11 +15432,11 @@
2542    found=no
2543  else
2544    cat > conftest.$ac_ext <<EOF
2545 -#line 15133 "configure"
2546 +#line 15436 "configure"
2547  #include "confdefs.h"
2548  main() { return (0); }
2549  EOF
2550 -if { (eval echo configure:15137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2551 +if { (eval echo configure:15440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2552  then
2553    found=yes
2554  else
2555 @@ -15175,7 +15478,7 @@
2556    unset ac_cv_lib_socket___res_search
2557    unset found
2558    echo $ac_n "checking for res_search in -lsocket""... $ac_c" 1>&6
2559 -echo "configure:15179: checking for res_search in -lsocket" >&5
2560 +echo "configure:15482: checking for res_search in -lsocket" >&5
2561  ac_lib_var=`echo socket'_'res_search | sed 'y%./+-%__p_%'`
2562  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2563    echo $ac_n "(cached) $ac_c" 1>&6
2564 @@ -15183,7 +15486,7 @@
2565    ac_save_LIBS="$LIBS"
2566  LIBS="-lsocket  $LIBS"
2567  cat > conftest.$ac_ext <<EOF
2568 -#line 15187 "configure"
2569 +#line 15490 "configure"
2570  #include "confdefs.h"
2571  /* Override any gcc2 internal prototype to avoid an error.  */
2572  /* We use char because int might match the return type of a gcc2
2573 @@ -15194,7 +15497,7 @@
2574  res_search()
2575  ; return 0; }
2576  EOF
2577 -if { (eval echo configure:15198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2578 +if { (eval echo configure:15501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2579    rm -rf conftest*
2580    eval "ac_cv_lib_$ac_lib_var=yes"
2581  else
2582 @@ -15214,7 +15517,7 @@
2583    echo "$ac_t""no" 1>&6
2584  
2585      echo $ac_n "checking for __res_search in -lsocket""... $ac_c" 1>&6
2586 -echo "configure:15218: checking for __res_search in -lsocket" >&5
2587 +echo "configure:15521: checking for __res_search in -lsocket" >&5
2588  ac_lib_var=`echo socket'_'__res_search | sed 'y%./+-%__p_%'`
2589  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2590    echo $ac_n "(cached) $ac_c" 1>&6
2591 @@ -15222,7 +15525,7 @@
2592    ac_save_LIBS="$LIBS"
2593  LIBS="-lsocket  $LIBS"
2594  cat > conftest.$ac_ext <<EOF
2595 -#line 15226 "configure"
2596 +#line 15529 "configure"
2597  #include "confdefs.h"
2598  /* Override any gcc2 internal prototype to avoid an error.  */
2599  /* We use char because int might match the return type of a gcc2
2600 @@ -15233,7 +15536,7 @@
2601  __res_search()
2602  ; return 0; }
2603  EOF
2604 -if { (eval echo configure:15237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2605 +if { (eval echo configure:15540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2606    rm -rf conftest*
2607    eval "ac_cv_lib_$ac_lib_var=yes"
2608  else
2609 @@ -15265,11 +15568,11 @@
2610    found=no
2611  else
2612    cat > conftest.$ac_ext <<EOF
2613 -#line 15269 "configure"
2614 +#line 15572 "configure"
2615  #include "confdefs.h"
2616  main() { return (0); }
2617  EOF
2618 -if { (eval echo configure:15273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2619 +if { (eval echo configure:15576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2620  then
2621    found=yes
2622  else
2623 @@ -15327,12 +15630,12 @@
2624    unset found
2625    
2626    echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
2627 -echo "configure:15331: checking for inet_aton" >&5
2628 +echo "configure:15634: checking for inet_aton" >&5
2629  if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
2630    echo $ac_n "(cached) $ac_c" 1>&6
2631  else
2632    cat > conftest.$ac_ext <<EOF
2633 -#line 15336 "configure"
2634 +#line 15639 "configure"
2635  #include "confdefs.h"
2636  /* System header to define __stub macros and hopefully few prototypes,
2637      which can conflict with char inet_aton(); below.  */
2638 @@ -15355,7 +15658,7 @@
2639  
2640  ; return 0; }
2641  EOF
2642 -if { (eval echo configure:15359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2643 +if { (eval echo configure:15662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2644    rm -rf conftest*
2645    eval "ac_cv_func_inet_aton=yes"
2646  else
2647 @@ -15373,12 +15676,12 @@
2648  else
2649    echo "$ac_t""no" 1>&6
2650   echo $ac_n "checking for __inet_aton""... $ac_c" 1>&6
2651 -echo "configure:15377: checking for __inet_aton" >&5
2652 +echo "configure:15680: checking for __inet_aton" >&5
2653  if eval "test \"`echo '$''{'ac_cv_func___inet_aton'+set}'`\" = set"; then
2654    echo $ac_n "(cached) $ac_c" 1>&6
2655  else
2656    cat > conftest.$ac_ext <<EOF
2657 -#line 15382 "configure"
2658 +#line 15685 "configure"
2659  #include "confdefs.h"
2660  /* System header to define __stub macros and hopefully few prototypes,
2661      which can conflict with char __inet_aton(); below.  */
2662 @@ -15401,7 +15704,7 @@
2663  
2664  ; return 0; }
2665  EOF
2666 -if { (eval echo configure:15405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2667 +if { (eval echo configure:15708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2668    rm -rf conftest*
2669    eval "ac_cv_func___inet_aton=yes"
2670  else
2671 @@ -15439,7 +15742,7 @@
2672    unset ac_cv_lib_resolv___inet_aton
2673    unset found
2674    echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
2675 -echo "configure:15443: checking for inet_aton in -lresolv" >&5
2676 +echo "configure:15746: checking for inet_aton in -lresolv" >&5
2677  ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
2678  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2679    echo $ac_n "(cached) $ac_c" 1>&6
2680 @@ -15447,7 +15750,7 @@
2681    ac_save_LIBS="$LIBS"
2682  LIBS="-lresolv  $LIBS"
2683  cat > conftest.$ac_ext <<EOF
2684 -#line 15451 "configure"
2685 +#line 15754 "configure"
2686  #include "confdefs.h"
2687  /* Override any gcc2 internal prototype to avoid an error.  */
2688  /* We use char because int might match the return type of a gcc2
2689 @@ -15458,7 +15761,7 @@
2690  inet_aton()
2691  ; return 0; }
2692  EOF
2693 -if { (eval echo configure:15462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2694 +if { (eval echo configure:15765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2695    rm -rf conftest*
2696    eval "ac_cv_lib_$ac_lib_var=yes"
2697  else
2698 @@ -15478,7 +15781,7 @@
2699    echo "$ac_t""no" 1>&6
2700  
2701      echo $ac_n "checking for __inet_aton in -lresolv""... $ac_c" 1>&6
2702 -echo "configure:15482: checking for __inet_aton in -lresolv" >&5
2703 +echo "configure:15785: checking for __inet_aton in -lresolv" >&5
2704  ac_lib_var=`echo resolv'_'__inet_aton | sed 'y%./+-%__p_%'`
2705  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2706    echo $ac_n "(cached) $ac_c" 1>&6
2707 @@ -15486,7 +15789,7 @@
2708    ac_save_LIBS="$LIBS"
2709  LIBS="-lresolv  $LIBS"
2710  cat > conftest.$ac_ext <<EOF
2711 -#line 15490 "configure"
2712 +#line 15793 "configure"
2713  #include "confdefs.h"
2714  /* Override any gcc2 internal prototype to avoid an error.  */
2715  /* We use char because int might match the return type of a gcc2
2716 @@ -15497,7 +15800,7 @@
2717  __inet_aton()
2718  ; return 0; }
2719  EOF
2720 -if { (eval echo configure:15501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2721 +if { (eval echo configure:15804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2722    rm -rf conftest*
2723    eval "ac_cv_lib_$ac_lib_var=yes"
2724  else
2725 @@ -15529,11 +15832,11 @@
2726    found=no
2727  else
2728    cat > conftest.$ac_ext <<EOF
2729 -#line 15533 "configure"
2730 +#line 15836 "configure"
2731  #include "confdefs.h"
2732  main() { return (0); }
2733  EOF
2734 -if { (eval echo configure:15537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2735 +if { (eval echo configure:15840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2736  then
2737    found=yes
2738  else
2739 @@ -15575,7 +15878,7 @@
2740    unset ac_cv_lib_bind___inet_aton
2741    unset found
2742    echo $ac_n "checking for inet_aton in -lbind""... $ac_c" 1>&6
2743 -echo "configure:15579: checking for inet_aton in -lbind" >&5
2744 +echo "configure:15882: checking for inet_aton in -lbind" >&5
2745  ac_lib_var=`echo bind'_'inet_aton | sed 'y%./+-%__p_%'`
2746  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2747    echo $ac_n "(cached) $ac_c" 1>&6
2748 @@ -15583,7 +15886,7 @@
2749    ac_save_LIBS="$LIBS"
2750  LIBS="-lbind  $LIBS"
2751  cat > conftest.$ac_ext <<EOF
2752 -#line 15587 "configure"
2753 +#line 15890 "configure"
2754  #include "confdefs.h"
2755  /* Override any gcc2 internal prototype to avoid an error.  */
2756  /* We use char because int might match the return type of a gcc2
2757 @@ -15594,7 +15897,7 @@
2758  inet_aton()
2759  ; return 0; }
2760  EOF
2761 -if { (eval echo configure:15598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2762 +if { (eval echo configure:15901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2763    rm -rf conftest*
2764    eval "ac_cv_lib_$ac_lib_var=yes"
2765  else
2766 @@ -15614,7 +15917,7 @@
2767    echo "$ac_t""no" 1>&6
2768  
2769      echo $ac_n "checking for __inet_aton in -lbind""... $ac_c" 1>&6
2770 -echo "configure:15618: checking for __inet_aton in -lbind" >&5
2771 +echo "configure:15921: checking for __inet_aton in -lbind" >&5
2772  ac_lib_var=`echo bind'_'__inet_aton | sed 'y%./+-%__p_%'`
2773  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2774    echo $ac_n "(cached) $ac_c" 1>&6
2775 @@ -15622,7 +15925,7 @@
2776    ac_save_LIBS="$LIBS"
2777  LIBS="-lbind  $LIBS"
2778  cat > conftest.$ac_ext <<EOF
2779 -#line 15626 "configure"
2780 +#line 15929 "configure"
2781  #include "confdefs.h"
2782  /* Override any gcc2 internal prototype to avoid an error.  */
2783  /* We use char because int might match the return type of a gcc2
2784 @@ -15633,7 +15936,7 @@
2785  __inet_aton()
2786  ; return 0; }
2787  EOF
2788 -if { (eval echo configure:15637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2789 +if { (eval echo configure:15940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2790    rm -rf conftest*
2791    eval "ac_cv_lib_$ac_lib_var=yes"
2792  else
2793 @@ -15665,11 +15968,11 @@
2794    found=no
2795  else
2796    cat > conftest.$ac_ext <<EOF
2797 -#line 15669 "configure"
2798 +#line 15972 "configure"
2799  #include "confdefs.h"
2800  main() { return (0); }
2801  EOF
2802 -if { (eval echo configure:15673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2803 +if { (eval echo configure:15976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2804  then
2805    found=yes
2806  else
2807 @@ -15723,12 +16026,12 @@
2808    unset found
2809    
2810    echo $ac_n "checking for dn_skipname""... $ac_c" 1>&6
2811 -echo "configure:15727: checking for dn_skipname" >&5
2812 +echo "configure:16030: checking for dn_skipname" >&5
2813  if eval "test \"`echo '$''{'ac_cv_func_dn_skipname'+set}'`\" = set"; then
2814    echo $ac_n "(cached) $ac_c" 1>&6
2815  else
2816    cat > conftest.$ac_ext <<EOF
2817 -#line 15732 "configure"
2818 +#line 16035 "configure"
2819  #include "confdefs.h"
2820  /* System header to define __stub macros and hopefully few prototypes,
2821      which can conflict with char dn_skipname(); below.  */
2822 @@ -15751,7 +16054,7 @@
2823  
2824  ; return 0; }
2825  EOF
2826 -if { (eval echo configure:15755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2827 +if { (eval echo configure:16058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2828    rm -rf conftest*
2829    eval "ac_cv_func_dn_skipname=yes"
2830  else
2831 @@ -15769,12 +16072,12 @@
2832  else
2833    echo "$ac_t""no" 1>&6
2834   echo $ac_n "checking for __dn_skipname""... $ac_c" 1>&6
2835 -echo "configure:15773: checking for __dn_skipname" >&5
2836 +echo "configure:16076: checking for __dn_skipname" >&5
2837  if eval "test \"`echo '$''{'ac_cv_func___dn_skipname'+set}'`\" = set"; then
2838    echo $ac_n "(cached) $ac_c" 1>&6
2839  else
2840    cat > conftest.$ac_ext <<EOF
2841 -#line 15778 "configure"
2842 +#line 16081 "configure"
2843  #include "confdefs.h"
2844  /* System header to define __stub macros and hopefully few prototypes,
2845      which can conflict with char __dn_skipname(); below.  */
2846 @@ -15797,7 +16100,7 @@
2847  
2848  ; return 0; }
2849  EOF
2850 -if { (eval echo configure:15801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2851 +if { (eval echo configure:16104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2852    rm -rf conftest*
2853    eval "ac_cv_func___dn_skipname=yes"
2854  else
2855 @@ -15835,7 +16138,7 @@
2856    unset ac_cv_lib_resolv___dn_skipname
2857    unset found
2858    echo $ac_n "checking for dn_skipname in -lresolv""... $ac_c" 1>&6
2859 -echo "configure:15839: checking for dn_skipname in -lresolv" >&5
2860 +echo "configure:16142: checking for dn_skipname in -lresolv" >&5
2861  ac_lib_var=`echo resolv'_'dn_skipname | sed 'y%./+-%__p_%'`
2862  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2863    echo $ac_n "(cached) $ac_c" 1>&6
2864 @@ -15843,7 +16146,7 @@
2865    ac_save_LIBS="$LIBS"
2866  LIBS="-lresolv  $LIBS"
2867  cat > conftest.$ac_ext <<EOF
2868 -#line 15847 "configure"
2869 +#line 16150 "configure"
2870  #include "confdefs.h"
2871  /* Override any gcc2 internal prototype to avoid an error.  */
2872  /* We use char because int might match the return type of a gcc2
2873 @@ -15854,7 +16157,7 @@
2874  dn_skipname()
2875  ; return 0; }
2876  EOF
2877 -if { (eval echo configure:15858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2878 +if { (eval echo configure:16161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2879    rm -rf conftest*
2880    eval "ac_cv_lib_$ac_lib_var=yes"
2881  else
2882 @@ -15874,7 +16177,7 @@
2883    echo "$ac_t""no" 1>&6
2884  
2885      echo $ac_n "checking for __dn_skipname in -lresolv""... $ac_c" 1>&6
2886 -echo "configure:15878: checking for __dn_skipname in -lresolv" >&5
2887 +echo "configure:16181: checking for __dn_skipname in -lresolv" >&5
2888  ac_lib_var=`echo resolv'_'__dn_skipname | sed 'y%./+-%__p_%'`
2889  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2890    echo $ac_n "(cached) $ac_c" 1>&6
2891 @@ -15882,7 +16185,7 @@
2892    ac_save_LIBS="$LIBS"
2893  LIBS="-lresolv  $LIBS"
2894  cat > conftest.$ac_ext <<EOF
2895 -#line 15886 "configure"
2896 +#line 16189 "configure"
2897  #include "confdefs.h"
2898  /* Override any gcc2 internal prototype to avoid an error.  */
2899  /* We use char because int might match the return type of a gcc2
2900 @@ -15893,7 +16196,7 @@
2901  __dn_skipname()
2902  ; return 0; }
2903  EOF
2904 -if { (eval echo configure:15897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2905 +if { (eval echo configure:16200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2906    rm -rf conftest*
2907    eval "ac_cv_lib_$ac_lib_var=yes"
2908  else
2909 @@ -15925,11 +16228,11 @@
2910    found=no
2911  else
2912    cat > conftest.$ac_ext <<EOF
2913 -#line 15929 "configure"
2914 +#line 16232 "configure"
2915  #include "confdefs.h"
2916  main() { return (0); }
2917  EOF
2918 -if { (eval echo configure:15933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2919 +if { (eval echo configure:16236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2920  then
2921    found=yes
2922  else
2923 @@ -15971,7 +16274,7 @@
2924    unset ac_cv_lib_bind___dn_skipname
2925    unset found
2926    echo $ac_n "checking for dn_skipname in -lbind""... $ac_c" 1>&6
2927 -echo "configure:15975: checking for dn_skipname in -lbind" >&5
2928 +echo "configure:16278: checking for dn_skipname in -lbind" >&5
2929  ac_lib_var=`echo bind'_'dn_skipname | sed 'y%./+-%__p_%'`
2930  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2931    echo $ac_n "(cached) $ac_c" 1>&6
2932 @@ -15979,7 +16282,7 @@
2933    ac_save_LIBS="$LIBS"
2934  LIBS="-lbind  $LIBS"
2935  cat > conftest.$ac_ext <<EOF
2936 -#line 15983 "configure"
2937 +#line 16286 "configure"
2938  #include "confdefs.h"
2939  /* Override any gcc2 internal prototype to avoid an error.  */
2940  /* We use char because int might match the return type of a gcc2
2941 @@ -15990,7 +16293,7 @@
2942  dn_skipname()
2943  ; return 0; }
2944  EOF
2945 -if { (eval echo configure:15994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2946 +if { (eval echo configure:16297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2947    rm -rf conftest*
2948    eval "ac_cv_lib_$ac_lib_var=yes"
2949  else
2950 @@ -16010,7 +16313,7 @@
2951    echo "$ac_t""no" 1>&6
2952  
2953      echo $ac_n "checking for __dn_skipname in -lbind""... $ac_c" 1>&6
2954 -echo "configure:16014: checking for __dn_skipname in -lbind" >&5
2955 +echo "configure:16317: checking for __dn_skipname in -lbind" >&5
2956  ac_lib_var=`echo bind'_'__dn_skipname | sed 'y%./+-%__p_%'`
2957  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2958    echo $ac_n "(cached) $ac_c" 1>&6
2959 @@ -16018,7 +16321,7 @@
2960    ac_save_LIBS="$LIBS"
2961  LIBS="-lbind  $LIBS"
2962  cat > conftest.$ac_ext <<EOF
2963 -#line 16022 "configure"
2964 +#line 16325 "configure"
2965  #include "confdefs.h"
2966  /* Override any gcc2 internal prototype to avoid an error.  */
2967  /* We use char because int might match the return type of a gcc2
2968 @@ -16029,7 +16332,7 @@
2969  __dn_skipname()
2970  ; return 0; }
2971  EOF
2972 -if { (eval echo configure:16033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2973 +if { (eval echo configure:16336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2974    rm -rf conftest*
2975    eval "ac_cv_lib_$ac_lib_var=yes"
2976  else
2977 @@ -16061,11 +16364,11 @@
2978    found=no
2979  else
2980    cat > conftest.$ac_ext <<EOF
2981 -#line 16065 "configure"
2982 +#line 16368 "configure"
2983  #include "confdefs.h"
2984  main() { return (0); }
2985  EOF
2986 -if { (eval echo configure:16069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2987 +if { (eval echo configure:16372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2988  then
2989    found=yes
2990  else
2991 @@ -16117,12 +16420,12 @@
2992  
2993  
2994  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2995 -echo "configure:16121: checking for ANSI C header files" >&5
2996 +echo "configure:16424: checking for ANSI C header files" >&5
2997  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2998    echo $ac_n "(cached) $ac_c" 1>&6
2999  else
3000    cat > conftest.$ac_ext <<EOF
3001 -#line 16126 "configure"
3002 +#line 16429 "configure"
3003  #include "confdefs.h"
3004  #include <stdlib.h>
3005  #include <stdarg.h>
3006 @@ -16130,7 +16433,7 @@
3007  #include <float.h>
3008  EOF
3009  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3010 -{ (eval echo configure:16134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3011 +{ (eval echo configure:16437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3012  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3013  if test -z "$ac_err"; then
3014    rm -rf conftest*
3015 @@ -16147,7 +16450,7 @@
3016  if test $ac_cv_header_stdc = yes; then
3017    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3018  cat > conftest.$ac_ext <<EOF
3019 -#line 16151 "configure"
3020 +#line 16454 "configure"
3021  #include "confdefs.h"
3022  #include <string.h>
3023  EOF
3024 @@ -16165,7 +16468,7 @@
3025  if test $ac_cv_header_stdc = yes; then
3026    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3027  cat > conftest.$ac_ext <<EOF
3028 -#line 16169 "configure"
3029 +#line 16472 "configure"
3030  #include "confdefs.h"
3031  #include <stdlib.h>
3032  EOF
3033 @@ -16186,7 +16489,7 @@
3034    :
3035  else
3036    cat > conftest.$ac_ext <<EOF
3037 -#line 16190 "configure"
3038 +#line 16493 "configure"
3039  #include "confdefs.h"
3040  #include <ctype.h>
3041  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3042 @@ -16197,7 +16500,7 @@
3043  exit (0); }
3044  
3045  EOF
3046 -if { (eval echo configure:16201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3047 +if { (eval echo configure:16504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3048  then
3049    :
3050  else
3051 @@ -16225,12 +16528,12 @@
3052  do
3053  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3054  echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3055 -echo "configure:16229: checking for $ac_hdr that defines DIR" >&5
3056 +echo "configure:16532: checking for $ac_hdr that defines DIR" >&5
3057  if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3058    echo $ac_n "(cached) $ac_c" 1>&6
3059  else
3060    cat > conftest.$ac_ext <<EOF
3061 -#line 16234 "configure"
3062 +#line 16537 "configure"
3063  #include "confdefs.h"
3064  #include <sys/types.h>
3065  #include <$ac_hdr>
3066 @@ -16238,7 +16541,7 @@
3067  DIR *dirp = 0;
3068  ; return 0; }
3069  EOF
3070 -if { (eval echo configure:16242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3071 +if { (eval echo configure:16545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3072    rm -rf conftest*
3073    eval "ac_cv_header_dirent_$ac_safe=yes"
3074  else
3075 @@ -16263,7 +16566,7 @@
3076  # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3077  if test $ac_header_dirent = dirent.h; then
3078  echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3079 -echo "configure:16267: checking for opendir in -ldir" >&5
3080 +echo "configure:16570: checking for opendir in -ldir" >&5
3081  ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3082  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3083    echo $ac_n "(cached) $ac_c" 1>&6
3084 @@ -16271,7 +16574,7 @@
3085    ac_save_LIBS="$LIBS"
3086  LIBS="-ldir  $LIBS"
3087  cat > conftest.$ac_ext <<EOF
3088 -#line 16275 "configure"
3089 +#line 16578 "configure"
3090  #include "confdefs.h"
3091  /* Override any gcc2 internal prototype to avoid an error.  */
3092  /* We use char because int might match the return type of a gcc2
3093 @@ -16282,7 +16585,7 @@
3094  opendir()
3095  ; return 0; }
3096  EOF
3097 -if { (eval echo configure:16286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3098 +if { (eval echo configure:16589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3099    rm -rf conftest*
3100    eval "ac_cv_lib_$ac_lib_var=yes"
3101  else
3102 @@ -16304,7 +16607,7 @@
3103  
3104  else
3105  echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3106 -echo "configure:16308: checking for opendir in -lx" >&5
3107 +echo "configure:16611: checking for opendir in -lx" >&5
3108  ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3109  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3110    echo $ac_n "(cached) $ac_c" 1>&6
3111 @@ -16312,7 +16615,7 @@
3112    ac_save_LIBS="$LIBS"
3113  LIBS="-lx  $LIBS"
3114  cat > conftest.$ac_ext <<EOF
3115 -#line 16316 "configure"
3116 +#line 16619 "configure"
3117  #include "confdefs.h"
3118  /* Override any gcc2 internal prototype to avoid an error.  */
3119  /* We use char because int might match the return type of a gcc2
3120 @@ -16323,7 +16626,7 @@
3121  opendir()
3122  ; return 0; }
3123  EOF
3124 -if { (eval echo configure:16327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3125 +if { (eval echo configure:16630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3126    rm -rf conftest*
3127    eval "ac_cv_lib_$ac_lib_var=yes"
3128  else
3129 @@ -16405,17 +16708,17 @@
3130  do
3131  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3132  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3133 -echo "configure:16409: checking for $ac_hdr" >&5
3134 +echo "configure:16712: checking for $ac_hdr" >&5
3135  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3136    echo $ac_n "(cached) $ac_c" 1>&6
3137  else
3138    cat > conftest.$ac_ext <<EOF
3139 -#line 16414 "configure"
3140 +#line 16717 "configure"
3141  #include "confdefs.h"
3142  #include <$ac_hdr>
3143  EOF
3144  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3145 -{ (eval echo configure:16419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3146 +{ (eval echo configure:16722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3147  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3148  if test -z "$ac_err"; then
3149    rm -rf conftest*
3150 @@ -16444,12 +16747,12 @@
3151  
3152  
3153    echo $ac_n "checking for fopencookie""... $ac_c" 1>&6
3154 -echo "configure:16448: checking for fopencookie" >&5
3155 +echo "configure:16751: checking for fopencookie" >&5
3156  if eval "test \"`echo '$''{'ac_cv_func_fopencookie'+set}'`\" = set"; then
3157    echo $ac_n "(cached) $ac_c" 1>&6
3158  else
3159    cat > conftest.$ac_ext <<EOF
3160 -#line 16453 "configure"
3161 +#line 16756 "configure"
3162  #include "confdefs.h"
3163  /* System header to define __stub macros and hopefully few prototypes,
3164      which can conflict with char fopencookie(); below.  */
3165 @@ -16472,7 +16775,7 @@
3166  
3167  ; return 0; }
3168  EOF
3169 -if { (eval echo configure:16476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3170 +if { (eval echo configure:16779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3171    rm -rf conftest*
3172    eval "ac_cv_func_fopencookie=yes"
3173  else
3174 @@ -16494,7 +16797,7 @@
3175  
3176    if test "$have_glibc_fopencookie" = "yes"; then
3177  cat > conftest.$ac_ext <<EOF
3178 -#line 16498 "configure"
3179 +#line 16801 "configure"
3180  #include "confdefs.h"
3181  
3182  #define _GNU_SOURCE
3183 @@ -16504,7 +16807,7 @@
3184  cookie_io_functions_t cookie;
3185  ; return 0; }
3186  EOF
3187 -if { (eval echo configure:16508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3188 +if { (eval echo configure:16811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189    rm -rf conftest*
3190    have_cookie_io_functions_t=yes
3191  else
3192 @@ -16523,7 +16826,7 @@
3193  
3194  else
3195    cat > conftest.$ac_ext <<EOF
3196 -#line 16527 "configure"
3197 +#line 16830 "configure"
3198  #include "confdefs.h"
3199  
3200  #define _GNU_SOURCE
3201 @@ -16555,7 +16858,7 @@
3202  
3203  
3204  EOF
3205 -if { (eval echo configure:16559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3206 +if { (eval echo configure:16862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3207  then
3208    
3209    cookie_io_functions_use_off64_t=yes
3210 @@ -16575,7 +16878,7 @@
3211      else
3212  
3213  cat > conftest.$ac_ext <<EOF
3214 -#line 16579 "configure"
3215 +#line 16882 "configure"
3216  #include "confdefs.h"
3217  
3218  #define _GNU_SOURCE
3219 @@ -16585,7 +16888,7 @@
3220   _IO_cookie_io_functions_t cookie; 
3221  ; return 0; }
3222  EOF
3223 -if { (eval echo configure:16589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3224 +if { (eval echo configure:16892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3225    rm -rf conftest*
3226    have_IO_cookie_io_functions_t=yes
3227  else
3228 @@ -16619,7 +16922,7 @@
3229  
3230  
3231    echo $ac_n "checking for broken getcwd""... $ac_c" 1>&6
3232 -echo "configure:16623: checking for broken getcwd" >&5
3233 +echo "configure:16926: checking for broken getcwd" >&5
3234    os=`uname -sr 2>/dev/null`
3235    case $os in
3236      SunOS*)
3237 @@ -16634,14 +16937,14 @@
3238  
3239  
3240    echo $ac_n "checking for broken libc stdio""... $ac_c" 1>&6
3241 -echo "configure:16638: checking for broken libc stdio" >&5
3242 +echo "configure:16941: checking for broken libc stdio" >&5
3243    if eval "test \"`echo '$''{'have_broken_glibc_fopen_append'+set}'`\" = set"; then
3244    echo $ac_n "(cached) $ac_c" 1>&6
3245  else
3246    
3247    if test "$cross_compiling" = yes; then
3248    cat > conftest.$ac_ext <<EOF
3249 -#line 16645 "configure"
3250 +#line 16948 "configure"
3251  #include "confdefs.h"
3252  
3253  #include <features.h>
3254 @@ -16654,7 +16957,7 @@
3255  
3256  ; return 0; }
3257  EOF
3258 -if { (eval echo configure:16658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3259 +if { (eval echo configure:16961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3260    rm -rf conftest*
3261    have_broken_glibc_fopen_append=yes
3262  else
3263 @@ -16667,7 +16970,7 @@
3264  
3265  else
3266    cat > conftest.$ac_ext <<EOF
3267 -#line 16671 "configure"
3268 +#line 16974 "configure"
3269  #include "confdefs.h"
3270  
3271  #include <stdio.h>
3272 @@ -16695,7 +16998,7 @@
3273  }
3274  
3275  EOF
3276 -if { (eval echo configure:16699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3277 +if { (eval echo configure:17002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3278  then
3279    have_broken_glibc_fopen_append=no
3280  else
3281 @@ -16723,12 +17026,12 @@
3282  
3283  
3284  echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3285 -echo "configure:16727: checking whether struct tm is in sys/time.h or time.h" >&5
3286 +echo "configure:17030: checking whether struct tm is in sys/time.h or time.h" >&5
3287  if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3288    echo $ac_n "(cached) $ac_c" 1>&6
3289  else
3290    cat > conftest.$ac_ext <<EOF
3291 -#line 16732 "configure"
3292 +#line 17035 "configure"
3293  #include "confdefs.h"
3294  #include <sys/types.h>
3295  #include <time.h>
3296 @@ -16736,7 +17039,7 @@
3297  struct tm *tp; tp->tm_sec;
3298  ; return 0; }
3299  EOF
3300 -if { (eval echo configure:16740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3301 +if { (eval echo configure:17043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3302    rm -rf conftest*
3303    ac_cv_struct_tm=time.h
3304  else
3305 @@ -16757,12 +17060,12 @@
3306  fi
3307  
3308  echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3309 -echo "configure:16761: checking for tm_zone in struct tm" >&5
3310 +echo "configure:17064: checking for tm_zone in struct tm" >&5
3311  if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3312    echo $ac_n "(cached) $ac_c" 1>&6
3313  else
3314    cat > conftest.$ac_ext <<EOF
3315 -#line 16766 "configure"
3316 +#line 17069 "configure"
3317  #include "confdefs.h"
3318  #include <sys/types.h>
3319  #include <$ac_cv_struct_tm>
3320 @@ -16770,7 +17073,7 @@
3321  struct tm tm; tm.tm_zone;
3322  ; return 0; }
3323  EOF
3324 -if { (eval echo configure:16774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3325 +if { (eval echo configure:17077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3326    rm -rf conftest*
3327    ac_cv_struct_tm_zone=yes
3328  else
3329 @@ -16790,12 +17093,12 @@
3330  
3331  else
3332    echo $ac_n "checking for tzname""... $ac_c" 1>&6
3333 -echo "configure:16794: checking for tzname" >&5
3334 +echo "configure:17097: checking for tzname" >&5
3335  if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3336    echo $ac_n "(cached) $ac_c" 1>&6
3337  else
3338    cat > conftest.$ac_ext <<EOF
3339 -#line 16799 "configure"
3340 +#line 17102 "configure"
3341  #include "confdefs.h"
3342  #include <time.h>
3343  #ifndef tzname /* For SGI.  */
3344 @@ -16805,7 +17108,7 @@
3345  atoi(*tzname);
3346  ; return 0; }
3347  EOF
3348 -if { (eval echo configure:16809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3349 +if { (eval echo configure:17112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3350    rm -rf conftest*
3351    ac_cv_var_tzname=yes
3352  else
3353 @@ -16829,16 +17132,16 @@
3354  
3355  
3356    echo $ac_n "checking for missing declarations of reentrant functions""... $ac_c" 1>&6
3357 -echo "configure:16833: checking for missing declarations of reentrant functions" >&5
3358 +echo "configure:17136: checking for missing declarations of reentrant functions" >&5
3359    cat > conftest.$ac_ext <<EOF
3360 -#line 16835 "configure"
3361 +#line 17138 "configure"
3362  #include "confdefs.h"
3363  #include <time.h>
3364  int main() {
3365  struct tm *(*func)() = localtime_r
3366  ; return 0; }
3367  EOF
3368 -if { (eval echo configure:16842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3369 +if { (eval echo configure:17145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3370    rm -rf conftest*
3371    
3372      :
3373 @@ -16856,14 +17159,14 @@
3374  fi
3375  rm -f conftest*
3376    cat > conftest.$ac_ext <<EOF
3377 -#line 16860 "configure"
3378 +#line 17163 "configure"
3379  #include "confdefs.h"
3380  #include <time.h>
3381  int main() {
3382  struct tm *(*func)() = gmtime_r
3383  ; return 0; }
3384  EOF
3385 -if { (eval echo configure:16867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3386 +if { (eval echo configure:17170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3387    rm -rf conftest*
3388    
3389      :
3390 @@ -16881,14 +17184,14 @@
3391  fi
3392  rm -f conftest*
3393    cat > conftest.$ac_ext <<EOF
3394 -#line 16885 "configure"
3395 +#line 17188 "configure"
3396  #include "confdefs.h"
3397  #include <time.h>
3398  int main() {
3399  char *(*func)() = asctime_r
3400  ; return 0; }
3401  EOF
3402 -if { (eval echo configure:16892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3403 +if { (eval echo configure:17195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3404    rm -rf conftest*
3405    
3406      :
3407 @@ -16906,14 +17209,14 @@
3408  fi
3409  rm -f conftest*
3410    cat > conftest.$ac_ext <<EOF
3411 -#line 16910 "configure"
3412 +#line 17213 "configure"
3413  #include "confdefs.h"
3414  #include <time.h>
3415  int main() {
3416  char *(*func)() = ctime_r
3417  ; return 0; }
3418  EOF
3419 -if { (eval echo configure:16917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3420 +if { (eval echo configure:17220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3421    rm -rf conftest*
3422    
3423      :
3424 @@ -16931,14 +17234,14 @@
3425  fi
3426  rm -f conftest*
3427    cat > conftest.$ac_ext <<EOF
3428 -#line 16935 "configure"
3429 +#line 17238 "configure"
3430  #include "confdefs.h"
3431  #include <string.h>
3432  int main() {
3433  char *(*func)() = strtok_r
3434  ; return 0; }
3435  EOF
3436 -if { (eval echo configure:16942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3437 +if { (eval echo configure:17245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3438    rm -rf conftest*
3439    
3440      :
3441 @@ -16959,16 +17262,16 @@
3442  
3443  
3444    echo $ac_n "checking for fclose declaration""... $ac_c" 1>&6
3445 -echo "configure:16963: checking for fclose declaration" >&5
3446 +echo "configure:17266: checking for fclose declaration" >&5
3447    cat > conftest.$ac_ext <<EOF
3448 -#line 16965 "configure"
3449 +#line 17268 "configure"
3450  #include "confdefs.h"
3451  #include <stdio.h>
3452  int main() {
3453  int (*func)() = fclose
3454  ; return 0; }
3455  EOF
3456 -if { (eval echo configure:16972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3457 +if { (eval echo configure:17275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3458    rm -rf conftest*
3459    
3460      cat >> confdefs.h <<\EOF
3461 @@ -16994,12 +17297,12 @@
3462  
3463  
3464  echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
3465 -echo "configure:16998: checking for tm_gmtoff in struct tm" >&5
3466 +echo "configure:17301: checking for tm_gmtoff in struct tm" >&5
3467  if eval "test \"`echo '$''{'ac_cv_struct_tm_gmtoff'+set}'`\" = set"; then
3468    echo $ac_n "(cached) $ac_c" 1>&6
3469  else
3470    cat > conftest.$ac_ext <<EOF
3471 -#line 17003 "configure"
3472 +#line 17306 "configure"
3473  #include "confdefs.h"
3474  #include <sys/types.h>
3475  #include <$ac_cv_struct_tm>
3476 @@ -17007,7 +17310,7 @@
3477  struct tm tm; tm.tm_gmtoff;
3478  ; return 0; }
3479  EOF
3480 -if { (eval echo configure:17011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3481 +if { (eval echo configure:17314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3482    rm -rf conftest*
3483    ac_cv_struct_tm_gmtoff=yes
3484  else
3485 @@ -17030,12 +17333,12 @@
3486  
3487  
3488  echo $ac_n "checking for struct flock""... $ac_c" 1>&6
3489 -echo "configure:17034: checking for struct flock" >&5
3490 +echo "configure:17337: checking for struct flock" >&5
3491  if eval "test \"`echo '$''{'ac_cv_struct_flock'+set}'`\" = set"; then
3492    echo $ac_n "(cached) $ac_c" 1>&6
3493  else
3494    cat > conftest.$ac_ext <<EOF
3495 -#line 17039 "configure"
3496 +#line 17342 "configure"
3497  #include "confdefs.h"
3498  
3499  #include <unistd.h>
3500 @@ -17045,7 +17348,7 @@
3501  struct flock x;
3502  ; return 0; }
3503  EOF
3504 -if { (eval echo configure:17049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3505 +if { (eval echo configure:17352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3506    rm -rf conftest*
3507    
3508            ac_cv_struct_flock=yes
3509 @@ -17072,12 +17375,12 @@
3510  
3511  
3512  echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
3513 -echo "configure:17076: checking for socklen_t" >&5
3514 +echo "configure:17379: checking for socklen_t" >&5
3515  if eval "test \"`echo '$''{'ac_cv_socklen_t'+set}'`\" = set"; then
3516    echo $ac_n "(cached) $ac_c" 1>&6
3517  else
3518    cat > conftest.$ac_ext <<EOF
3519 -#line 17081 "configure"
3520 +#line 17384 "configure"
3521  #include "confdefs.h"
3522  
3523  #include <sys/types.h>
3524 @@ -17089,7 +17392,7 @@
3525  
3526  ; return 0; }
3527  EOF
3528 -if { (eval echo configure:17093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3529 +if { (eval echo configure:17396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3530    rm -rf conftest*
3531    
3532    ac_cv_socklen_t=yes
3533 @@ -17115,7 +17418,7 @@
3534  
3535  
3536  echo $ac_n "checking size of size_t""... $ac_c" 1>&6
3537 -echo "configure:17119: checking size of size_t" >&5
3538 +echo "configure:17422: checking size of size_t" >&5
3539  if eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then
3540    echo $ac_n "(cached) $ac_c" 1>&6
3541  else
3542 @@ -17123,18 +17426,18 @@
3543    ac_cv_sizeof_size_t=8
3544  else
3545    cat > conftest.$ac_ext <<EOF
3546 -#line 17127 "configure"
3547 +#line 17430 "configure"
3548  #include "confdefs.h"
3549  #include <stdio.h>
3550 -int main()
3551 +main()
3552  {
3553    FILE *f=fopen("conftestval", "w");
3554 -  if (!f) return(1);
3555 +  if (!f) exit(1);
3556    fprintf(f, "%d\n", sizeof(size_t));
3557 -  return(0);
3558 +  exit(0);
3559  }
3560  EOF
3561 -if { (eval echo configure:17138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3562 +if { (eval echo configure:17441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3563  then
3564    ac_cv_sizeof_size_t=`cat conftestval`
3565  else
3566 @@ -17154,7 +17457,7 @@
3567  
3568  
3569  echo $ac_n "checking size of long long""... $ac_c" 1>&6
3570 -echo "configure:17158: checking size of long long" >&5
3571 +echo "configure:17461: checking size of long long" >&5
3572  if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
3573    echo $ac_n "(cached) $ac_c" 1>&6
3574  else
3575 @@ -17162,18 +17465,18 @@
3576    ac_cv_sizeof_long_long=8
3577  else
3578    cat > conftest.$ac_ext <<EOF
3579 -#line 17166 "configure"
3580 +#line 17469 "configure"
3581  #include "confdefs.h"
3582  #include <stdio.h>
3583 -int main()
3584 +main()
3585  {
3586    FILE *f=fopen("conftestval", "w");
3587 -  if (!f) return(1);
3588 +  if (!f) exit(1);
3589    fprintf(f, "%d\n", sizeof(long long));
3590 -  return(0);
3591 +  exit(0);
3592  }
3593  EOF
3594 -if { (eval echo configure:17177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3595 +if { (eval echo configure:17480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3596  then
3597    ac_cv_sizeof_long_long=`cat conftestval`
3598  else
3599 @@ -17193,7 +17496,7 @@
3600  
3601  
3602  echo $ac_n "checking size of long long int""... $ac_c" 1>&6
3603 -echo "configure:17197: checking size of long long int" >&5
3604 +echo "configure:17500: checking size of long long int" >&5
3605  if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then
3606    echo $ac_n "(cached) $ac_c" 1>&6
3607  else
3608 @@ -17201,18 +17504,18 @@
3609    ac_cv_sizeof_long_long_int=8
3610  else
3611    cat > conftest.$ac_ext <<EOF
3612 -#line 17205 "configure"
3613 +#line 17508 "configure"
3614  #include "confdefs.h"
3615  #include <stdio.h>
3616 -int main()
3617 +main()
3618  {
3619    FILE *f=fopen("conftestval", "w");
3620 -  if (!f) return(1);
3621 +  if (!f) exit(1);
3622    fprintf(f, "%d\n", sizeof(long long int));
3623 -  return(0);
3624 +  exit(0);
3625  }
3626  EOF
3627 -if { (eval echo configure:17216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3628 +if { (eval echo configure:17519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3629  then
3630    ac_cv_sizeof_long_long_int=`cat conftestval`
3631  else
3632 @@ -17232,7 +17535,7 @@
3633  
3634  
3635  echo $ac_n "checking size of long""... $ac_c" 1>&6
3636 -echo "configure:17236: checking size of long" >&5
3637 +echo "configure:17539: checking size of long" >&5
3638  if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3639    echo $ac_n "(cached) $ac_c" 1>&6
3640  else
3641 @@ -17240,18 +17543,18 @@
3642    ac_cv_sizeof_long=8
3643  else
3644    cat > conftest.$ac_ext <<EOF
3645 -#line 17244 "configure"
3646 +#line 17547 "configure"
3647  #include "confdefs.h"
3648  #include <stdio.h>
3649 -int main()
3650 +main()
3651  {
3652    FILE *f=fopen("conftestval", "w");
3653 -  if (!f) return(1);
3654 +  if (!f) exit(1);
3655    fprintf(f, "%d\n", sizeof(long));
3656 -  return(0);
3657 +  exit(0);
3658  }
3659  EOF
3660 -if { (eval echo configure:17255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3661 +if { (eval echo configure:17558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3662  then
3663    ac_cv_sizeof_long=`cat conftestval`
3664  else
3665 @@ -17271,7 +17574,7 @@
3666  
3667  
3668  echo $ac_n "checking size of int""... $ac_c" 1>&6
3669 -echo "configure:17275: checking size of int" >&5
3670 +echo "configure:17578: checking size of int" >&5
3671  if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3672    echo $ac_n "(cached) $ac_c" 1>&6
3673  else
3674 @@ -17279,18 +17582,18 @@
3675    ac_cv_sizeof_int=4
3676  else
3677    cat > conftest.$ac_ext <<EOF
3678 -#line 17283 "configure"
3679 +#line 17586 "configure"
3680  #include "confdefs.h"
3681  #include <stdio.h>
3682 -int main()
3683 +main()
3684  {
3685    FILE *f=fopen("conftestval", "w");
3686 -  if (!f) return(1);
3687 +  if (!f) exit(1);
3688    fprintf(f, "%d\n", sizeof(int));
3689 -  return(0);
3690 +  exit(0);
3691  }
3692  EOF
3693 -if { (eval echo configure:17294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3694 +if { (eval echo configure:17597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3695  then
3696    ac_cv_sizeof_int=`cat conftestval`
3697  else
3698 @@ -17312,7 +17615,7 @@
3699  
3700  
3701    echo $ac_n "checking size of intmax_t""... $ac_c" 1>&6
3702 -echo "configure:17316: checking size of intmax_t" >&5
3703 +echo "configure:17619: checking size of intmax_t" >&5
3704    
3705    php_cache_value=php_cv_sizeof_intmax_t
3706    if eval "test \"`echo '$''{'php_cv_sizeof_intmax_t'+set}'`\" = set"; then
3707 @@ -17329,7 +17632,7 @@
3708  
3709  else
3710    cat > conftest.$ac_ext <<EOF
3711 -#line 17333 "configure"
3712 +#line 17636 "configure"
3713  #include "confdefs.h"
3714  #include <stdio.h>
3715  #if STDC_HEADERS
3716 @@ -17353,7 +17656,7 @@
3717  }
3718    
3719  EOF
3720 -if { (eval echo configure:17357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3721 +if { (eval echo configure:17660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3722  then
3723    
3724      eval $php_cache_value=`cat conftestval`
3725 @@ -17392,7 +17695,7 @@
3726  
3727  
3728    echo $ac_n "checking size of ssize_t""... $ac_c" 1>&6
3729 -echo "configure:17396: checking size of ssize_t" >&5
3730 +echo "configure:17699: checking size of ssize_t" >&5
3731    
3732    php_cache_value=php_cv_sizeof_ssize_t
3733    if eval "test \"`echo '$''{'php_cv_sizeof_ssize_t'+set}'`\" = set"; then
3734 @@ -17409,7 +17712,7 @@
3735  
3736  else
3737    cat > conftest.$ac_ext <<EOF
3738 -#line 17413 "configure"
3739 +#line 17716 "configure"
3740  #include "confdefs.h"
3741  #include <stdio.h>
3742  #if STDC_HEADERS
3743 @@ -17433,7 +17736,7 @@
3744  }
3745    
3746  EOF
3747 -if { (eval echo configure:17437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3748 +if { (eval echo configure:17740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3749  then
3750    
3751      eval $php_cache_value=`cat conftestval`
3752 @@ -17472,7 +17775,7 @@
3753  
3754  
3755    echo $ac_n "checking size of ptrdiff_t""... $ac_c" 1>&6
3756 -echo "configure:17476: checking size of ptrdiff_t" >&5
3757 +echo "configure:17779: checking size of ptrdiff_t" >&5
3758    
3759    php_cache_value=php_cv_sizeof_ptrdiff_t
3760    if eval "test \"`echo '$''{'php_cv_sizeof_ptrdiff_t'+set}'`\" = set"; then
3761 @@ -17489,7 +17792,7 @@
3762  
3763  else
3764    cat > conftest.$ac_ext <<EOF
3765 -#line 17493 "configure"
3766 +#line 17796 "configure"
3767  #include "confdefs.h"
3768  #include <stdio.h>
3769  #if STDC_HEADERS
3770 @@ -17513,7 +17816,7 @@
3771  }
3772    
3773  EOF
3774 -if { (eval echo configure:17517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3775 +if { (eval echo configure:17820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3776  then
3777    
3778      eval $php_cache_value=`cat conftestval`
3779 @@ -17552,12 +17855,12 @@
3780  
3781  
3782  echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
3783 -echo "configure:17556: checking for st_blksize in struct stat" >&5
3784 +echo "configure:17859: checking for st_blksize in struct stat" >&5
3785  if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
3786    echo $ac_n "(cached) $ac_c" 1>&6
3787  else
3788    cat > conftest.$ac_ext <<EOF
3789 -#line 17561 "configure"
3790 +#line 17864 "configure"
3791  #include "confdefs.h"
3792  #include <sys/types.h>
3793  #include <sys/stat.h>
3794 @@ -17565,7 +17868,7 @@
3795  struct stat s; s.st_blksize;
3796  ; return 0; }
3797  EOF
3798 -if { (eval echo configure:17569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3799 +if { (eval echo configure:17872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3800    rm -rf conftest*
3801    ac_cv_struct_st_blksize=yes
3802  else
3803 @@ -17587,12 +17890,12 @@
3804  
3805  if test "`uname -s 2>/dev/null`" != "QNX"; then
3806    echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
3807 -echo "configure:17591: checking for st_blocks in struct stat" >&5
3808 +echo "configure:17894: checking for st_blocks in struct stat" >&5
3809  if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
3810    echo $ac_n "(cached) $ac_c" 1>&6
3811  else
3812    cat > conftest.$ac_ext <<EOF
3813 -#line 17596 "configure"
3814 +#line 17899 "configure"
3815  #include "confdefs.h"
3816  #include <sys/types.h>
3817  #include <sys/stat.h>
3818 @@ -17600,7 +17903,7 @@
3819  struct stat s; s.st_blocks;
3820  ; return 0; }
3821  EOF
3822 -if { (eval echo configure:17604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3823 +if { (eval echo configure:17907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3824    rm -rf conftest*
3825    ac_cv_struct_st_blocks=yes
3826  else
3827 @@ -17627,12 +17930,12 @@
3828    WARNING_LEVEL=0
3829  fi
3830  echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3831 -echo "configure:17631: checking for st_rdev in struct stat" >&5
3832 +echo "configure:17934: checking for st_rdev in struct stat" >&5
3833  if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3834    echo $ac_n "(cached) $ac_c" 1>&6
3835  else
3836    cat > conftest.$ac_ext <<EOF
3837 -#line 17636 "configure"
3838 +#line 17939 "configure"
3839  #include "confdefs.h"
3840  #include <sys/types.h>
3841  #include <sys/stat.h>
3842 @@ -17640,7 +17943,7 @@
3843  struct stat s; s.st_rdev;
3844  ; return 0; }
3845  EOF
3846 -if { (eval echo configure:17644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3847 +if { (eval echo configure:17947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3848    rm -rf conftest*
3849    ac_cv_struct_st_rdev=yes
3850  else
3851 @@ -17662,12 +17965,12 @@
3852  
3853  
3854  echo $ac_n "checking for size_t""... $ac_c" 1>&6
3855 -echo "configure:17666: checking for size_t" >&5
3856 +echo "configure:17969: checking for size_t" >&5
3857  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3858    echo $ac_n "(cached) $ac_c" 1>&6
3859  else
3860    cat > conftest.$ac_ext <<EOF
3861 -#line 17671 "configure"
3862 +#line 17974 "configure"
3863  #include "confdefs.h"
3864  #include <sys/types.h>
3865  #if STDC_HEADERS
3866 @@ -17695,12 +17998,12 @@
3867  fi
3868  
3869  echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3870 -echo "configure:17699: checking for uid_t in sys/types.h" >&5
3871 +echo "configure:18002: checking for uid_t in sys/types.h" >&5
3872  if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3873    echo $ac_n "(cached) $ac_c" 1>&6
3874  else
3875    cat > conftest.$ac_ext <<EOF
3876 -#line 17704 "configure"
3877 +#line 18007 "configure"
3878  #include "confdefs.h"
3879  #include <sys/types.h>
3880  EOF
3881 @@ -17731,12 +18034,12 @@
3882  
3883  
3884      echo $ac_n "checking for struct sockaddr_storage""... $ac_c" 1>&6
3885 -echo "configure:17735: checking for struct sockaddr_storage" >&5
3886 +echo "configure:18038: checking for struct sockaddr_storage" >&5
3887  if eval "test \"`echo '$''{'ac_cv_sockaddr_storage'+set}'`\" = set"; then
3888    echo $ac_n "(cached) $ac_c" 1>&6
3889  else
3890    cat > conftest.$ac_ext <<EOF
3891 -#line 17740 "configure"
3892 +#line 18043 "configure"
3893  #include "confdefs.h"
3894  #include <sys/types.h>
3895  #include <sys/socket.h>
3896 @@ -17744,7 +18047,7 @@
3897  struct sockaddr_storage s; s
3898  ; return 0; }
3899  EOF
3900 -if { (eval echo configure:17748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3901 +if { (eval echo configure:18051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3902    rm -rf conftest*
3903    ac_cv_sockaddr_storage=yes
3904  else
3905 @@ -17765,13 +18068,13 @@
3906  
3907    fi
3908      echo $ac_n "checking for field sa_len in struct sockaddr""... $ac_c" 1>&6
3909 -echo "configure:17769: checking for field sa_len in struct sockaddr" >&5
3910 +echo "configure:18072: checking for field sa_len in struct sockaddr" >&5
3911  if eval "test \"`echo '$''{'ac_cv_sockaddr_sa_len'+set}'`\" = set"; then
3912    echo $ac_n "(cached) $ac_c" 1>&6
3913  else
3914    
3915      cat > conftest.$ac_ext <<EOF
3916 -#line 17775 "configure"
3917 +#line 18078 "configure"
3918  #include "confdefs.h"
3919  #include <sys/types.h>
3920  #include <sys/socket.h>
3921 @@ -17779,7 +18082,7 @@
3922  static struct sockaddr sa; int n = (int) sa.sa_len; return n;
3923  ; return 0; }
3924  EOF
3925 -if { (eval echo configure:17783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3926 +if { (eval echo configure:18086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3927    rm -rf conftest*
3928    ac_cv_sockaddr_sa_len=yes
3929  else
3930 @@ -17802,12 +18105,12 @@
3931  
3932  
3933  echo $ac_n "checking for IPv6 support""... $ac_c" 1>&6
3934 -echo "configure:17806: checking for IPv6 support" >&5
3935 +echo "configure:18109: checking for IPv6 support" >&5
3936  if eval "test \"`echo '$''{'ac_cv_ipv6_support'+set}'`\" = set"; then
3937    echo $ac_n "(cached) $ac_c" 1>&6
3938  else
3939    cat > conftest.$ac_ext <<EOF
3940 -#line 17811 "configure"
3941 +#line 18114 "configure"
3942  #include "confdefs.h"
3943   #include <sys/types.h>
3944  #include <sys/socket.h>
3945 @@ -17816,7 +18119,7 @@
3946  struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;
3947  ; return 0; }
3948  EOF
3949 -if { (eval echo configure:17820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3950 +if { (eval echo configure:18123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3951    rm -rf conftest*
3952    ac_cv_ipv6_support=yes
3953  else
3954 @@ -17832,12 +18135,12 @@
3955  
3956  
3957  echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3958 -echo "configure:17836: checking for vprintf" >&5
3959 +echo "configure:18139: checking for vprintf" >&5
3960  if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3961    echo $ac_n "(cached) $ac_c" 1>&6
3962  else
3963    cat > conftest.$ac_ext <<EOF
3964 -#line 17841 "configure"
3965 +#line 18144 "configure"
3966  #include "confdefs.h"
3967  /* System header to define __stub macros and hopefully few prototypes,
3968      which can conflict with char vprintf(); below.  */
3969 @@ -17860,7 +18163,7 @@
3970  
3971  ; return 0; }
3972  EOF
3973 -if { (eval echo configure:17864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3974 +if { (eval echo configure:18167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3975    rm -rf conftest*
3976    eval "ac_cv_func_vprintf=yes"
3977  else
3978 @@ -17884,12 +18187,12 @@
3979  
3980  if test "$ac_cv_func_vprintf" != yes; then
3981  echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3982 -echo "configure:17888: checking for _doprnt" >&5
3983 +echo "configure:18191: checking for _doprnt" >&5
3984  if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3985    echo $ac_n "(cached) $ac_c" 1>&6
3986  else
3987    cat > conftest.$ac_ext <<EOF
3988 -#line 17893 "configure"
3989 +#line 18196 "configure"
3990  #include "confdefs.h"
3991  /* System header to define __stub macros and hopefully few prototypes,
3992      which can conflict with char _doprnt(); below.  */
3993 @@ -17912,7 +18215,7 @@
3994  
3995  ; return 0; }
3996  EOF
3997 -if { (eval echo configure:17916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3998 +if { (eval echo configure:18219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3999    rm -rf conftest*
4000    eval "ac_cv_func__doprnt=yes"
4001  else
4002 @@ -17939,6 +18242,7 @@
4003  for ac_func in alphasort \
4004  asctime_r \
4005  chroot \
4006 +clearenv \
4007  ctime_r \
4008  cuserid \
4009  crypt \
4010 @@ -18019,12 +18323,12 @@
4011  
4012  do
4013  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4014 -echo "configure:18023: checking for $ac_func" >&5
4015 +echo "configure:18327: checking for $ac_func" >&5
4016  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4017    echo $ac_n "(cached) $ac_c" 1>&6
4018  else
4019    cat > conftest.$ac_ext <<EOF
4020 -#line 18028 "configure"
4021 +#line 18332 "configure"
4022  #include "confdefs.h"
4023  /* System header to define __stub macros and hopefully few prototypes,
4024      which can conflict with char $ac_func(); below.  */
4025 @@ -18047,7 +18351,7 @@
4026  
4027  ; return 0; }
4028  EOF
4029 -if { (eval echo configure:18051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4030 +if { (eval echo configure:18355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4031    rm -rf conftest*
4032    eval "ac_cv_func_$ac_func=yes"
4033  else
4034 @@ -18073,25 +18377,25 @@
4035  
4036  
4037  echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
4038 -echo "configure:18077: checking for getaddrinfo" >&5
4039 +echo "configure:18381: checking for getaddrinfo" >&5
4040  if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then
4041    echo $ac_n "(cached) $ac_c" 1>&6
4042  else
4043    cat > conftest.$ac_ext <<EOF
4044 -#line 18082 "configure"
4045 +#line 18386 "configure"
4046  #include "confdefs.h"
4047  #include <netdb.h>
4048  int main() {
4049  struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);
4050  ; return 0; }
4051  EOF
4052 -if { (eval echo configure:18089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4053 +if { (eval echo configure:18393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4054    rm -rf conftest*
4055    if test "$cross_compiling" = yes; then
4056    ac_cv_func_getaddrinfo=no
4057  else
4058    cat > conftest.$ac_ext <<EOF
4059 -#line 18095 "configure"
4060 +#line 18399 "configure"
4061  #include "confdefs.h"
4062  
4063  #include <netdb.h>
4064 @@ -18131,7 +18435,7 @@
4065  }
4066    
4067  EOF
4068 -if { (eval echo configure:18135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4069 +if { (eval echo configure:18439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4070  then
4071    ac_cv_func_getaddrinfo=yes
4072  else
4073 @@ -18163,12 +18467,12 @@
4074  for ac_func in strlcat strlcpy getopt
4075  do
4076  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4077 -echo "configure:18167: checking for $ac_func" >&5
4078 +echo "configure:18471: checking for $ac_func" >&5
4079  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4080    echo $ac_n "(cached) $ac_c" 1>&6
4081  else
4082    cat > conftest.$ac_ext <<EOF
4083 -#line 18172 "configure"
4084 +#line 18476 "configure"
4085  #include "confdefs.h"
4086  /* System header to define __stub macros and hopefully few prototypes,
4087      which can conflict with char $ac_func(); below.  */
4088 @@ -18191,7 +18495,7 @@
4089  
4090  ; return 0; }
4091  EOF
4092 -if { (eval echo configure:18195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4093 +if { (eval echo configure:18499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4094    rm -rf conftest*
4095    eval "ac_cv_func_$ac_func=yes"
4096  else
4097 @@ -18218,7 +18522,7 @@
4098  
4099  
4100  echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
4101 -echo "configure:18222: checking whether utime accepts a null argument" >&5
4102 +echo "configure:18526: checking whether utime accepts a null argument" >&5
4103  if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then
4104    echo $ac_n "(cached) $ac_c" 1>&6
4105  else
4106 @@ -18228,7 +18532,7 @@
4107    ac_cv_func_utime_null=no
4108  else
4109    cat > conftest.$ac_ext <<EOF
4110 -#line 18232 "configure"
4111 +#line 18536 "configure"
4112  #include "confdefs.h"
4113  #include <sys/types.h>
4114  #include <sys/stat.h>
4115 @@ -18239,7 +18543,7 @@
4116  && t.st_mtime - s.st_mtime < 120));
4117  }
4118  EOF
4119 -if { (eval echo configure:18243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4120 +if { (eval echo configure:18547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4121  then
4122    ac_cv_func_utime_null=yes
4123  else
4124 @@ -18265,19 +18569,19 @@
4125  # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4126  # for constant arguments.  Useless!
4127  echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4128 -echo "configure:18269: checking for working alloca.h" >&5
4129 +echo "configure:18573: checking for working alloca.h" >&5
4130  if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4131    echo $ac_n "(cached) $ac_c" 1>&6
4132  else
4133    cat > conftest.$ac_ext <<EOF
4134 -#line 18274 "configure"
4135 +#line 18578 "configure"
4136  #include "confdefs.h"
4137  #include <alloca.h>
4138  int main() {
4139  char *p = alloca(2 * sizeof(int));
4140  ; return 0; }
4141  EOF
4142 -if { (eval echo configure:18281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4143 +if { (eval echo configure:18585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4144    rm -rf conftest*
4145    ac_cv_header_alloca_h=yes
4146  else
4147 @@ -18298,12 +18602,12 @@
4148  fi
4149  
4150  echo $ac_n "checking for alloca""... $ac_c" 1>&6
4151 -echo "configure:18302: checking for alloca" >&5
4152 +echo "configure:18606: checking for alloca" >&5
4153  if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4154    echo $ac_n "(cached) $ac_c" 1>&6
4155  else
4156    cat > conftest.$ac_ext <<EOF
4157 -#line 18307 "configure"
4158 +#line 18611 "configure"
4159  #include "confdefs.h"
4160  
4161  #ifdef __GNUC__
4162 @@ -18331,7 +18635,7 @@
4163  char *p = (char *) alloca(1);
4164  ; return 0; }
4165  EOF
4166 -if { (eval echo configure:18335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4167 +if { (eval echo configure:18639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4168    rm -rf conftest*
4169    ac_cv_func_alloca_works=yes
4170  else
4171 @@ -18363,12 +18667,12 @@
4172  
4173  
4174  echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4175 -echo "configure:18367: checking whether alloca needs Cray hooks" >&5
4176 +echo "configure:18671: checking whether alloca needs Cray hooks" >&5
4177  if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4178    echo $ac_n "(cached) $ac_c" 1>&6
4179  else
4180    cat > conftest.$ac_ext <<EOF
4181 -#line 18372 "configure"
4182 +#line 18676 "configure"
4183  #include "confdefs.h"
4184  #if defined(CRAY) && ! defined(CRAY2)
4185  webecray
4186 @@ -18393,12 +18697,12 @@
4187  if test $ac_cv_os_cray = yes; then
4188  for ac_func in _getb67 GETB67 getb67; do
4189    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4190 -echo "configure:18397: checking for $ac_func" >&5
4191 +echo "configure:18701: checking for $ac_func" >&5
4192  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4193    echo $ac_n "(cached) $ac_c" 1>&6
4194  else
4195    cat > conftest.$ac_ext <<EOF
4196 -#line 18402 "configure"
4197 +#line 18706 "configure"
4198  #include "confdefs.h"
4199  /* System header to define __stub macros and hopefully few prototypes,
4200      which can conflict with char $ac_func(); below.  */
4201 @@ -18421,7 +18725,7 @@
4202  
4203  ; return 0; }
4204  EOF
4205 -if { (eval echo configure:18425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4206 +if { (eval echo configure:18729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4207    rm -rf conftest*
4208    eval "ac_cv_func_$ac_func=yes"
4209  else
4210 @@ -18448,7 +18752,7 @@
4211  fi
4212  
4213  echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4214 -echo "configure:18452: checking stack direction for C alloca" >&5
4215 +echo "configure:18756: checking stack direction for C alloca" >&5
4216  if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4217    echo $ac_n "(cached) $ac_c" 1>&6
4218  else
4219 @@ -18456,7 +18760,7 @@
4220    ac_cv_c_stack_direction=0
4221  else
4222    cat > conftest.$ac_ext <<EOF
4223 -#line 18460 "configure"
4224 +#line 18764 "configure"
4225  #include "confdefs.h"
4226  find_stack_direction ()
4227  {
4228 @@ -18475,7 +18779,7 @@
4229    exit (find_stack_direction() < 0);
4230  }
4231  EOF
4232 -if { (eval echo configure:18479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4233 +if { (eval echo configure:18783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4234  then
4235    ac_cv_c_stack_direction=1
4236  else
4237 @@ -18498,13 +18802,13 @@
4238  
4239  
4240    echo $ac_n "checking for declared timezone""... $ac_c" 1>&6
4241 -echo "configure:18502: checking for declared timezone" >&5
4242 +echo "configure:18806: checking for declared timezone" >&5
4243  if eval "test \"`echo '$''{'ac_cv_declared_timezone'+set}'`\" = set"; then
4244    echo $ac_n "(cached) $ac_c" 1>&6
4245  else
4246    
4247      cat > conftest.$ac_ext <<EOF
4248 -#line 18508 "configure"
4249 +#line 18812 "configure"
4250  #include "confdefs.h"
4251  
4252  #include <sys/types.h>
4253 @@ -18519,7 +18823,7 @@
4254  
4255  ; return 0; }
4256  EOF
4257 -if { (eval echo configure:18523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4258 +if { (eval echo configure:18827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4259    rm -rf conftest*
4260    
4261    ac_cv_declared_timezone=yes
4262 @@ -18545,7 +18849,7 @@
4263  
4264  
4265  echo $ac_n "checking for type of reentrant time-related functions""... $ac_c" 1>&6
4266 -echo "configure:18549: checking for type of reentrant time-related functions" >&5
4267 +echo "configure:18853: checking for type of reentrant time-related functions" >&5
4268  if eval "test \"`echo '$''{'ac_cv_time_r_type'+set}'`\" = set"; then
4269    echo $ac_n "(cached) $ac_c" 1>&6
4270  else
4271 @@ -18556,7 +18860,7 @@
4272  
4273  else
4274    cat > conftest.$ac_ext <<EOF
4275 -#line 18560 "configure"
4276 +#line 18864 "configure"
4277  #include "confdefs.h"
4278  
4279  #include <time.h>
4280 @@ -18574,7 +18878,7 @@
4281  }
4282  
4283  EOF
4284 -if { (eval echo configure:18578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4285 +if { (eval echo configure:18882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4286  then
4287    
4288    ac_cv_time_r_type=hpux
4289 @@ -18590,7 +18894,7 @@
4290    
4291  else
4292    cat > conftest.$ac_ext <<EOF
4293 -#line 18594 "configure"
4294 +#line 18898 "configure"
4295  #include "confdefs.h"
4296  
4297  #include <time.h>
4298 @@ -18606,7 +18910,7 @@
4299  }
4300    
4301  EOF
4302 -if { (eval echo configure:18610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4303 +if { (eval echo configure:18914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4304  then
4305    
4306      ac_cv_time_r_type=irix
4307 @@ -18644,12 +18948,12 @@
4308  
4309  
4310      echo $ac_n "checking for readdir_r""... $ac_c" 1>&6
4311 -echo "configure:18648: checking for readdir_r" >&5
4312 +echo "configure:18952: checking for readdir_r" >&5
4313  if eval "test \"`echo '$''{'ac_cv_func_readdir_r'+set}'`\" = set"; then
4314    echo $ac_n "(cached) $ac_c" 1>&6
4315  else
4316    cat > conftest.$ac_ext <<EOF
4317 -#line 18653 "configure"
4318 +#line 18957 "configure"
4319  #include "confdefs.h"
4320  /* System header to define __stub macros and hopefully few prototypes,
4321      which can conflict with char readdir_r(); below.  */
4322 @@ -18672,7 +18976,7 @@
4323  
4324  ; return 0; }
4325  EOF
4326 -if { (eval echo configure:18676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4327 +if { (eval echo configure:18980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4328    rm -rf conftest*
4329    eval "ac_cv_func_readdir_r=yes"
4330  else
4331 @@ -18694,7 +18998,7 @@
4332  
4333    if test "$ac_cv_func_readdir_r" = "yes"; then
4334    echo $ac_n "checking for type of readdir_r""... $ac_c" 1>&6
4335 -echo "configure:18698: checking for type of readdir_r" >&5
4336 +echo "configure:19002: checking for type of readdir_r" >&5
4337  if eval "test \"`echo '$''{'ac_cv_what_readdir_r'+set}'`\" = set"; then
4338    echo $ac_n "(cached) $ac_c" 1>&6
4339  else
4340 @@ -18705,7 +19009,7 @@
4341     
4342  else
4343    cat > conftest.$ac_ext <<EOF
4344 -#line 18709 "configure"
4345 +#line 19013 "configure"
4346  #include "confdefs.h"
4347  
4348  #define _REENTRANT
4349 @@ -18730,7 +19034,7 @@
4350  }
4351      
4352  EOF
4353 -if { (eval echo configure:18734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4354 +if { (eval echo configure:19038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4355  then
4356    
4357        ac_cv_what_readdir_r=POSIX
4358 @@ -18741,7 +19045,7 @@
4359    rm -fr conftest*
4360    
4361        cat > conftest.$ac_ext <<EOF
4362 -#line 18745 "configure"
4363 +#line 19049 "configure"
4364  #include "confdefs.h"
4365  
4366  #define _REENTRANT
4367 @@ -18751,7 +19055,7 @@
4368          
4369  EOF
4370  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4371 -{ (eval echo configure:18755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4372 +{ (eval echo configure:19059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4373  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4374  if test -z "$ac_err"; then
4375    rm -rf conftest*
4376 @@ -18793,12 +19097,12 @@
4377  
4378  
4379  echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
4380 -echo "configure:18797: checking for in_addr_t" >&5
4381 +echo "configure:19101: checking for in_addr_t" >&5
4382  if eval "test \"`echo '$''{'ac_cv_type_in_addr_t'+set}'`\" = set"; then
4383    echo $ac_n "(cached) $ac_c" 1>&6
4384  else
4385    cat > conftest.$ac_ext <<EOF
4386 -#line 18802 "configure"
4387 +#line 19106 "configure"
4388  #include "confdefs.h"
4389  #include <sys/types.h>
4390  #if STDC_HEADERS
4391 @@ -18832,12 +19136,12 @@
4392  for ac_func in crypt_r
4393  do
4394  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4395 -echo "configure:18836: checking for $ac_func" >&5
4396 +echo "configure:19140: checking for $ac_func" >&5
4397  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4398    echo $ac_n "(cached) $ac_c" 1>&6
4399  else
4400    cat > conftest.$ac_ext <<EOF
4401 -#line 18841 "configure"
4402 +#line 19145 "configure"
4403  #include "confdefs.h"
4404  /* System header to define __stub macros and hopefully few prototypes,
4405      which can conflict with char $ac_func(); below.  */
4406 @@ -18860,7 +19164,7 @@
4407  
4408  ; return 0; }
4409  EOF
4410 -if { (eval echo configure:18864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4411 +if { (eval echo configure:19168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4412    rm -rf conftest*
4413    eval "ac_cv_func_$ac_func=yes"
4414  else
4415 @@ -18888,14 +19192,14 @@
4416  if test "x$php_crypt_r" = "x1"; then
4417    
4418    echo $ac_n "checking which data struct is used by crypt_r""... $ac_c" 1>&6
4419 -echo "configure:18892: checking which data struct is used by crypt_r" >&5
4420 +echo "configure:19196: checking which data struct is used by crypt_r" >&5
4421  if eval "test \"`echo '$''{'php_cv_crypt_r_style'+set}'`\" = set"; then
4422    echo $ac_n "(cached) $ac_c" 1>&6
4423  else
4424    
4425      php_cv_crypt_r_style=none
4426      cat > conftest.$ac_ext <<EOF
4427 -#line 18899 "configure"
4428 +#line 19203 "configure"
4429  #include "confdefs.h"
4430  
4431  #define _REENTRANT 1
4432 @@ -18908,7 +19212,7 @@
4433  
4434  ; return 0; }
4435  EOF
4436 -if { (eval echo configure:18912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4437 +if { (eval echo configure:19216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4438    rm -rf conftest*
4439    php_cv_crypt_r_style=cryptd
4440  else
4441 @@ -18919,7 +19223,7 @@
4442  
4443      if test "$php_cv_crypt_r_style" = "none"; then
4444        cat > conftest.$ac_ext <<EOF
4445 -#line 18923 "configure"
4446 +#line 19227 "configure"
4447  #include "confdefs.h"
4448  
4449  #define _REENTRANT 1
4450 @@ -18932,7 +19236,7 @@
4451  
4452  ; return 0; }
4453  EOF
4454 -if { (eval echo configure:18936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4455 +if { (eval echo configure:19240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4456    rm -rf conftest*
4457    php_cv_crypt_r_style=struct_crypt_data
4458  else
4459 @@ -18944,7 +19248,7 @@
4460  
4461      if test "$php_cv_crypt_r_style" = "none"; then
4462        cat > conftest.$ac_ext <<EOF
4463 -#line 18948 "configure"
4464 +#line 19252 "configure"
4465  #include "confdefs.h"
4466  
4467  #define _REENTRANT 1
4468 @@ -18958,7 +19262,7 @@
4469  
4470  ; return 0; }
4471  EOF
4472 -if { (eval echo configure:18962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4473 +if { (eval echo configure:19266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4474    rm -rf conftest*
4475    php_cv_crypt_r_style=struct_crypt_data_gnu_source
4476  else
4477 @@ -19017,7 +19321,7 @@
4478  php_enable_gcov=no
4479  
4480  echo $ac_n "checking whether to include gcov symbols""... $ac_c" 1>&6
4481 -echo "configure:19021: checking whether to include gcov symbols" >&5
4482 +echo "configure:19325: checking whether to include gcov symbols" >&5
4483  # Check whether --enable-gcov or --disable-gcov was given.
4484  if test "${enable_gcov+set}" = set; then
4485    enableval="$enable_gcov"
4486 @@ -19059,7 +19363,7 @@
4487    # Extract the first word of "lcov", so it can be a program name with args.
4488  set dummy lcov; ac_word=$2
4489  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4490 -echo "configure:19063: checking for $ac_word" >&5
4491 +echo "configure:19367: checking for $ac_word" >&5
4492  if eval "test \"`echo '$''{'ac_cv_prog_LTP'+set}'`\" = set"; then
4493    echo $ac_n "(cached) $ac_c" 1>&6
4494  else
4495 @@ -19088,7 +19392,7 @@
4496    # Extract the first word of "genhtml", so it can be a program name with args.
4497  set dummy genhtml; ac_word=$2
4498  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4499 -echo "configure:19092: checking for $ac_word" >&5
4500 +echo "configure:19396: checking for $ac_word" >&5
4501  if eval "test \"`echo '$''{'ac_cv_prog_LTP_GENHTML'+set}'`\" = set"; then
4502    echo $ac_n "(cached) $ac_c" 1>&6
4503  else
4504 @@ -19123,7 +19427,7 @@
4505  
4506    if test "$LTP"; then
4507      echo $ac_n "checking for ltp version""... $ac_c" 1>&6
4508 -echo "configure:19127: checking for ltp version" >&5
4509 +echo "configure:19431: checking for ltp version" >&5
4510  if eval "test \"`echo '$''{'php_cv_ltp_version'+set}'`\" = set"; then
4511    echo $ac_n "(cached) $ac_c" 1>&6
4512  else
4513 @@ -19180,7 +19484,7 @@
4514  php_enable_debug=no
4515  
4516  echo $ac_n "checking whether to include debugging symbols""... $ac_c" 1>&6
4517 -echo "configure:19184: checking whether to include debugging symbols" >&5
4518 +echo "configure:19488: checking whether to include debugging symbols" >&5
4519  # Check whether --enable-debug or --disable-debug was given.
4520  if test "${enable_debug+set}" = set; then
4521    enableval="$enable_debug"
4522 @@ -19222,7 +19526,7 @@
4523  php_with_layout=PHP
4524  
4525  echo $ac_n "checking layout of installed files""... $ac_c" 1>&6
4526 -echo "configure:19226: checking layout of installed files" >&5
4527 +echo "configure:19530: checking layout of installed files" >&5
4528  # Check whether --with-layout or --without-layout was given.
4529  if test "${with_layout+set}" = set; then
4530    withval="$with_layout"
4531 @@ -19257,7 +19561,7 @@
4532  php_with_config_file_path=DEFAULT
4533  
4534  echo $ac_n "checking path to configuration file""... $ac_c" 1>&6
4535 -echo "configure:19261: checking path to configuration file" >&5
4536 +echo "configure:19565: checking path to configuration file" >&5
4537  # Check whether --with-config-file-path or --without-config-file-path was given.
4538  if test "${with_config_file_path+set}" = set; then
4539    withval="$with_config_file_path"
4540 @@ -19291,7 +19595,7 @@
4541  fi
4542  
4543  echo $ac_n "checking where to scan for configuration files""... $ac_c" 1>&6
4544 -echo "configure:19295: checking where to scan for configuration files" >&5
4545 +echo "configure:19599: checking where to scan for configuration files" >&5
4546  
4547  php_with_config_file_scan_dir=DEFAULT
4548  
4549 @@ -19327,7 +19631,7 @@
4550  php_enable_safe_mode=no
4551  
4552  echo $ac_n "checking whether to enable safe mode by default""... $ac_c" 1>&6
4553 -echo "configure:19331: checking whether to enable safe mode by default" >&5
4554 +echo "configure:19635: checking whether to enable safe mode by default" >&5
4555  # Check whether --enable-safe-mode or --disable-safe-mode was given.
4556  if test "${enable_safe_mode+set}" = set; then
4557    enableval="$enable_safe_mode"
4558 @@ -19362,7 +19666,7 @@
4559  fi
4560  
4561  echo $ac_n "checking for safe mode exec dir""... $ac_c" 1>&6
4562 -echo "configure:19366: checking for safe mode exec dir" >&5
4563 +echo "configure:19670: checking for safe mode exec dir" >&5
4564  
4565  php_with_exec_dir=no
4566  
4567 @@ -19406,7 +19710,7 @@
4568  php_enable_sigchild=no
4569  
4570  echo $ac_n "checking whether to enable PHP's own SIGCHLD handler""... $ac_c" 1>&6
4571 -echo "configure:19410: checking whether to enable PHP's own SIGCHLD handler" >&5
4572 +echo "configure:19714: checking whether to enable PHP's own SIGCHLD handler" >&5
4573  # Check whether --enable-sigchild or --disable-sigchild was given.
4574  if test "${enable_sigchild+set}" = set; then
4575    enableval="$enable_sigchild"
4576 @@ -19444,7 +19748,7 @@
4577  php_enable_magic_quotes=no
4578  
4579  echo $ac_n "checking whether to enable magic quotes by default""... $ac_c" 1>&6
4580 -echo "configure:19448: checking whether to enable magic quotes by default" >&5
4581 +echo "configure:19752: checking whether to enable magic quotes by default" >&5
4582  # Check whether --enable-magic-quotes or --disable-magic-quotes was given.
4583  if test "${enable_magic_quotes+set}" = set; then
4584    enableval="$enable_magic_quotes"
4585 @@ -19482,7 +19786,7 @@
4586  php_enable_libgcc=no
4587  
4588  echo $ac_n "checking whether to explicitly link against libgcc""... $ac_c" 1>&6
4589 -echo "configure:19486: checking whether to explicitly link against libgcc" >&5
4590 +echo "configure:19790: checking whether to explicitly link against libgcc" >&5
4591  # Check whether --enable-libgcc or --disable-libgcc was given.
4592  if test "${enable_libgcc+set}" = set; then
4593    enableval="$enable_libgcc"
4594 @@ -19562,7 +19866,7 @@
4595  php_enable_short_tags=yes
4596  
4597  echo $ac_n "checking whether to enable short tags by default""... $ac_c" 1>&6
4598 -echo "configure:19566: checking whether to enable short tags by default" >&5
4599 +echo "configure:19870: checking whether to enable short tags by default" >&5
4600  # Check whether --enable-short-tags or --disable-short-tags was given.
4601  if test "${enable_short_tags+set}" = set; then
4602    enableval="$enable_short_tags"
4603 @@ -19600,7 +19904,7 @@
4604  php_enable_dmalloc=no
4605  
4606  echo $ac_n "checking whether to enable dmalloc""... $ac_c" 1>&6
4607 -echo "configure:19604: checking whether to enable dmalloc" >&5
4608 +echo "configure:19908: checking whether to enable dmalloc" >&5
4609  # Check whether --enable-dmalloc or --disable-dmalloc was given.
4610  if test "${enable_dmalloc+set}" = set; then
4611    enableval="$enable_dmalloc"
4612 @@ -19624,7 +19928,7 @@
4613  
4614  if test "$PHP_DMALLOC" = "yes"; then
4615    echo $ac_n "checking for dmalloc_error in -ldmalloc""... $ac_c" 1>&6
4616 -echo "configure:19628: checking for dmalloc_error in -ldmalloc" >&5
4617 +echo "configure:19932: checking for dmalloc_error in -ldmalloc" >&5
4618  ac_lib_var=`echo dmalloc'_'dmalloc_error | sed 'y%./+-%__p_%'`
4619  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4620    echo $ac_n "(cached) $ac_c" 1>&6
4621 @@ -19632,7 +19936,7 @@
4622    ac_save_LIBS="$LIBS"
4623  LIBS="-ldmalloc  $LIBS"
4624  cat > conftest.$ac_ext <<EOF
4625 -#line 19636 "configure"
4626 +#line 19940 "configure"
4627  #include "confdefs.h"
4628  /* Override any gcc2 internal prototype to avoid an error.  */
4629  /* We use char because int might match the return type of a gcc2
4630 @@ -19643,7 +19947,7 @@
4631  dmalloc_error()
4632  ; return 0; }
4633  EOF
4634 -if { (eval echo configure:19647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4635 +if { (eval echo configure:19951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4636    rm -rf conftest*
4637    eval "ac_cv_lib_$ac_lib_var=yes"
4638  else
4639 @@ -19688,7 +19992,7 @@
4640  php_enable_ipv6=yes
4641  
4642  echo $ac_n "checking whether to enable IPv6 support""... $ac_c" 1>&6
4643 -echo "configure:19692: checking whether to enable IPv6 support" >&5
4644 +echo "configure:19996: checking whether to enable IPv6 support" >&5
4645  # Check whether --enable-ipv6 or --disable-ipv6 was given.
4646  if test "${enable_ipv6+set}" = set; then
4647    enableval="$enable_ipv6"
4648 @@ -19718,7 +20022,7 @@
4649  fi
4650  
4651  echo $ac_n "checking how big to make fd sets""... $ac_c" 1>&6
4652 -echo "configure:19722: checking how big to make fd sets" >&5
4653 +echo "configure:20026: checking how big to make fd sets" >&5
4654  
4655  php_enable_fd_setsize=no
4656  
4657 @@ -19789,7 +20093,7 @@
4658  php_enable_libxml=yes
4659  
4660  echo $ac_n "checking whether to enable LIBXML support""... $ac_c" 1>&6
4661 -echo "configure:19793: checking whether to enable LIBXML support" >&5
4662 +echo "configure:20097: checking whether to enable LIBXML support" >&5
4663  # Check whether --enable-libxml or --disable-libxml was given.
4664  if test "${enable_libxml+set}" = set; then
4665    enableval="$enable_libxml"
4666 @@ -19837,7 +20141,7 @@
4667  php_with_libxml_dir=no
4668  
4669  echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
4670 -echo "configure:19841: checking libxml2 install dir" >&5
4671 +echo "configure:20145: checking libxml2 install dir" >&5
4672  # Check whether --with-libxml-dir or --without-libxml-dir was given.
4673  if test "${with_libxml_dir+set}" = set; then
4674    withval="$with_libxml_dir"
4675 @@ -19866,7 +20170,7 @@
4676  
4677    
4678  echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
4679 -echo "configure:19870: checking for xml2-config path" >&5
4680 +echo "configure:20174: checking for xml2-config path" >&5
4681  if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
4682    echo $ac_n "(cached) $ac_c" 1>&6
4683  else
4684 @@ -20024,7 +20328,7 @@
4685  
4686  
4687              echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
4688 -echo "configure:20028: checking whether libxml build works" >&5
4689 +echo "configure:20332: checking whether libxml build works" >&5
4690  if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
4691    echo $ac_n "(cached) $ac_c" 1>&6
4692  else
4693 @@ -20040,7 +20344,7 @@
4694    
4695  else
4696    cat > conftest.$ac_ext <<EOF
4697 -#line 20044 "configure"
4698 +#line 20348 "configure"
4699  #include "confdefs.h"
4700  
4701      
4702 @@ -20051,7 +20355,7 @@
4703      }
4704    
4705  EOF
4706 -if { (eval echo configure:20055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4707 +if { (eval echo configure:20359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4708  then
4709    
4710      LIBS=$old_LIBS
4711 @@ -20405,7 +20709,7 @@
4712  php_with_openssl=no
4713  
4714  echo $ac_n "checking for OpenSSL support""... $ac_c" 1>&6
4715 -echo "configure:20409: checking for OpenSSL support" >&5
4716 +echo "configure:20713: checking for OpenSSL support" >&5
4717  # Check whether --with-openssl or --without-openssl was given.
4718  if test "${with_openssl+set}" = set; then
4719    withval="$with_openssl"
4720 @@ -20452,7 +20756,7 @@
4721  php_with_kerberos=no
4722  
4723  echo $ac_n "checking for Kerberos support""... $ac_c" 1>&6
4724 -echo "configure:20456: checking for Kerberos support" >&5
4725 +echo "configure:20760: checking for Kerberos support" >&5
4726  # Check whether --with-kerberos or --without-kerberos was given.
4727  if test "${with_kerberos+set}" = set; then
4728    withval="$with_kerberos"
4729 @@ -20770,7 +21074,7 @@
4730      # Extract the first word of "krb5-config", so it can be a program name with args.
4731  set dummy krb5-config; ac_word=$2
4732  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4733 -echo "configure:20774: checking for $ac_word" >&5
4734 +echo "configure:21078: checking for $ac_word" >&5
4735  if eval "test \"`echo '$''{'ac_cv_path_KRB5_CONFIG'+set}'`\" = set"; then
4736    echo $ac_n "(cached) $ac_c" 1>&6
4737  else
4738 @@ -21130,7 +21434,7 @@
4739    fi
4740  
4741    echo $ac_n "checking for DSA_get_default_method in -lssl""... $ac_c" 1>&6
4742 -echo "configure:21134: checking for DSA_get_default_method in -lssl" >&5
4743 +echo "configure:21438: checking for DSA_get_default_method in -lssl" >&5
4744  ac_lib_var=`echo ssl'_'DSA_get_default_method | sed 'y%./+-%__p_%'`
4745  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4746    echo $ac_n "(cached) $ac_c" 1>&6
4747 @@ -21138,7 +21442,7 @@
4748    ac_save_LIBS="$LIBS"
4749  LIBS="-lssl  $LIBS"
4750  cat > conftest.$ac_ext <<EOF
4751 -#line 21142 "configure"
4752 +#line 21446 "configure"
4753  #include "confdefs.h"
4754  /* Override any gcc2 internal prototype to avoid an error.  */
4755  /* We use char because int might match the return type of a gcc2
4756 @@ -21149,7 +21453,7 @@
4757  DSA_get_default_method()
4758  ; return 0; }
4759  EOF
4760 -if { (eval echo configure:21153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4761 +if { (eval echo configure:21457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4762    rm -rf conftest*
4763    eval "ac_cv_lib_$ac_lib_var=yes"
4764  else
4765 @@ -21191,7 +21495,7 @@
4766      # Extract the first word of "pkg-config", so it can be a program name with args.
4767  set dummy pkg-config; ac_word=$2
4768  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4769 -echo "configure:21195: checking for $ac_word" >&5
4770 +echo "configure:21499: checking for $ac_word" >&5
4771  if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
4772    echo $ac_n "(cached) $ac_c" 1>&6
4773  else
4774 @@ -21396,9 +21700,9 @@
4775      old_CPPFLAGS=$CPPFLAGS
4776      CPPFLAGS=-I$OPENSSL_INCDIR
4777      echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6
4778 -echo "configure:21400: checking for OpenSSL version" >&5
4779 +echo "configure:21704: checking for OpenSSL version" >&5
4780      cat > conftest.$ac_ext <<EOF
4781 -#line 21402 "configure"
4782 +#line 21706 "configure"
4783  #include "confdefs.h"
4784  
4785  #include <openssl/opensslv.h>
4786 @@ -21553,7 +21857,7 @@
4787    done
4788  
4789    echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6
4790 -echo "configure:21557: checking for CRYPTO_free in -lcrypto" >&5
4791 +echo "configure:21861: checking for CRYPTO_free in -lcrypto" >&5
4792  ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'`
4793  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4794    echo $ac_n "(cached) $ac_c" 1>&6
4795 @@ -21561,7 +21865,7 @@
4796    ac_save_LIBS="$LIBS"
4797  LIBS="-lcrypto  $LIBS"
4798  cat > conftest.$ac_ext <<EOF
4799 -#line 21565 "configure"
4800 +#line 21869 "configure"
4801  #include "confdefs.h"
4802  /* Override any gcc2 internal prototype to avoid an error.  */
4803  /* We use char because int might match the return type of a gcc2
4804 @@ -21572,7 +21876,7 @@
4805  CRYPTO_free()
4806  ; return 0; }
4807  EOF
4808 -if { (eval echo configure:21576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4809 +if { (eval echo configure:21880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4810    rm -rf conftest*
4811    eval "ac_cv_lib_$ac_lib_var=yes"
4812  else
4813 @@ -21729,7 +22033,7 @@
4814    done
4815  
4816    echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6
4817 -echo "configure:21733: checking for SSL_CTX_set_ssl_version in -lssl" >&5
4818 +echo "configure:22037: checking for SSL_CTX_set_ssl_version in -lssl" >&5
4819  ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'`
4820  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4821    echo $ac_n "(cached) $ac_c" 1>&6
4822 @@ -21737,7 +22041,7 @@
4823    ac_save_LIBS="$LIBS"
4824  LIBS="-lssl  $LIBS"
4825  cat > conftest.$ac_ext <<EOF
4826 -#line 21741 "configure"
4827 +#line 22045 "configure"
4828  #include "confdefs.h"
4829  /* Override any gcc2 internal prototype to avoid an error.  */
4830  /* We use char because int might match the return type of a gcc2
4831 @@ -21748,7 +22052,7 @@
4832  SSL_CTX_set_ssl_version()
4833  ; return 0; }
4834  EOF
4835 -if { (eval echo configure:21752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4836 +if { (eval echo configure:22056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4837    rm -rf conftest*
4838    eval "ac_cv_lib_$ac_lib_var=yes"
4839  else
4840 @@ -21870,7 +22174,7 @@
4841  php_with_pcre_regex=yes
4842  
4843  echo $ac_n "checking for PCRE support""... $ac_c" 1>&6
4844 -echo "configure:21874: checking for PCRE support" >&5
4845 +echo "configure:22178: checking for PCRE support" >&5
4846  # Check whether --with-pcre-regex or --without-pcre-regex was given.
4847  if test "${with_pcre_regex+set}" = set; then
4848    withval="$with_pcre_regex"
4849 @@ -22702,7 +23006,7 @@
4850  php_with_zlib=no
4851  
4852  echo $ac_n "checking for ZLIB support""... $ac_c" 1>&6
4853 -echo "configure:22706: checking for ZLIB support" >&5
4854 +echo "configure:23010: checking for ZLIB support" >&5
4855  # Check whether --with-zlib or --without-zlib was given.
4856  if test "${with_zlib+set}" = set; then
4857    withval="$with_zlib"
4858 @@ -22749,7 +23053,7 @@
4859  php_with_zlib_dir=no
4860  
4861  echo $ac_n "checking if the location of ZLIB install directory is defined""... $ac_c" 1>&6
4862 -echo "configure:22753: checking if the location of ZLIB install directory is defined" >&5
4863 +echo "configure:23057: checking if the location of ZLIB install directory is defined" >&5
4864  # Check whether --with-zlib-dir or --without-zlib-dir was given.
4865  if test "${with_zlib_dir+set}" = set; then
4866    withval="$with_zlib_dir"
4867 @@ -23184,7 +23488,7 @@
4868    done
4869  
4870    echo $ac_n "checking for gzgets in -lz""... $ac_c" 1>&6
4871 -echo "configure:23188: checking for gzgets in -lz" >&5
4872 +echo "configure:23492: checking for gzgets in -lz" >&5
4873  ac_lib_var=`echo z'_'gzgets | sed 'y%./+-%__p_%'`
4874  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4875    echo $ac_n "(cached) $ac_c" 1>&6
4876 @@ -23192,7 +23496,7 @@
4877    ac_save_LIBS="$LIBS"
4878  LIBS="-lz  $LIBS"
4879  cat > conftest.$ac_ext <<EOF
4880 -#line 23196 "configure"
4881 +#line 23500 "configure"
4882  #include "confdefs.h"
4883  /* Override any gcc2 internal prototype to avoid an error.  */
4884  /* We use char because int might match the return type of a gcc2
4885 @@ -23203,7 +23507,7 @@
4886  gzgets()
4887  ; return 0; }
4888  EOF
4889 -if { (eval echo configure:23207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4890 +if { (eval echo configure:23511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4891    rm -rf conftest*
4892    eval "ac_cv_lib_$ac_lib_var=yes"
4893  else
4894 @@ -23343,7 +23647,7 @@
4895  php_enable_bcmath=no
4896  
4897  echo $ac_n "checking whether to enable bc style precision math functions""... $ac_c" 1>&6
4898 -echo "configure:23347: checking whether to enable bc style precision math functions" >&5
4899 +echo "configure:23651: checking whether to enable bc style precision math functions" >&5
4900  # Check whether --enable-bcmath or --disable-bcmath was given.
4901  if test "${enable_bcmath+set}" = set; then
4902    enableval="$enable_bcmath"
4903 @@ -23700,7 +24004,7 @@
4904  php_with_bz2=no
4905  
4906  echo $ac_n "checking for BZip2 support""... $ac_c" 1>&6
4907 -echo "configure:23704: checking for BZip2 support" >&5
4908 +echo "configure:24008: checking for BZip2 support" >&5
4909  # Check whether --with-bz2 or --without-bz2 was given.
4910  if test "${with_bz2+set}" = set; then
4911    withval="$with_bz2"
4912 @@ -23748,7 +24052,7 @@
4913      BZIP_DIR=$PHP_BZ2
4914    else
4915      echo $ac_n "checking for BZip2 in default path""... $ac_c" 1>&6
4916 -echo "configure:23752: checking for BZip2 in default path" >&5
4917 +echo "configure:24056: checking for BZip2 in default path" >&5
4918      for i in /usr/local /usr; do
4919        if test -r $i/include/bzlib.h; then
4920          BZIP_DIR=$i
4921 @@ -23861,7 +24165,7 @@
4922    done
4923  
4924    echo $ac_n "checking for BZ2_bzerror in -lbz2""... $ac_c" 1>&6
4925 -echo "configure:23865: checking for BZ2_bzerror in -lbz2" >&5
4926 +echo "configure:24169: checking for BZ2_bzerror in -lbz2" >&5
4927  ac_lib_var=`echo bz2'_'BZ2_bzerror | sed 'y%./+-%__p_%'`
4928  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4929    echo $ac_n "(cached) $ac_c" 1>&6
4930 @@ -23869,7 +24173,7 @@
4931    ac_save_LIBS="$LIBS"
4932  LIBS="-lbz2  $LIBS"
4933  cat > conftest.$ac_ext <<EOF
4934 -#line 23873 "configure"
4935 +#line 24177 "configure"
4936  #include "confdefs.h"
4937  /* Override any gcc2 internal prototype to avoid an error.  */
4938  /* We use char because int might match the return type of a gcc2
4939 @@ -23880,7 +24184,7 @@
4940  BZ2_bzerror()
4941  ; return 0; }
4942  EOF
4943 -if { (eval echo configure:23884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4944 +if { (eval echo configure:24188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4945    rm -rf conftest*
4946    eval "ac_cv_lib_$ac_lib_var=yes"
4947  else
4948 @@ -24337,7 +24641,7 @@
4949  php_enable_calendar=no
4950  
4951  echo $ac_n "checking whether to enable calendar conversion support""... $ac_c" 1>&6
4952 -echo "configure:24341: checking whether to enable calendar conversion support" >&5
4953 +echo "configure:24645: checking whether to enable calendar conversion support" >&5
4954  # Check whether --enable-calendar or --disable-calendar was given.
4955  if test "${enable_calendar+set}" = set; then
4956    enableval="$enable_calendar"
4957 @@ -24673,7 +24977,7 @@
4958  php_enable_ctype=yes
4959  
4960  echo $ac_n "checking whether to enable ctype functions""... $ac_c" 1>&6
4961 -echo "configure:24677: checking whether to enable ctype functions" >&5
4962 +echo "configure:24981: checking whether to enable ctype functions" >&5
4963  # Check whether --enable-ctype or --disable-ctype was given.
4964  if test "${enable_ctype+set}" = set; then
4965    enableval="$enable_ctype"
4966 @@ -25009,7 +25313,7 @@
4967  php_with_curl=no
4968  
4969  echo $ac_n "checking for cURL support""... $ac_c" 1>&6
4970 -echo "configure:25013: checking for cURL support" >&5
4971 +echo "configure:25317: checking for cURL support" >&5
4972  # Check whether --with-curl or --without-curl was given.
4973  if test "${with_curl+set}" = set; then
4974    withval="$with_curl"
4975 @@ -25056,7 +25360,7 @@
4976  php_with_curlwrappers=no
4977  
4978  echo $ac_n "checking if we should use cURL for url streams""... $ac_c" 1>&6
4979 -echo "configure:25060: checking if we should use cURL for url streams" >&5
4980 +echo "configure:25364: checking if we should use cURL for url streams" >&5
4981  # Check whether --with-curlwrappers or --without-curlwrappers was given.
4982  if test "${with_curlwrappers+set}" = set; then
4983    withval="$with_curlwrappers"
4984 @@ -25083,7 +25387,7 @@
4985      CURL_DIR=$PHP_CURL
4986    else
4987      echo $ac_n "checking for cURL in default path""... $ac_c" 1>&6
4988 -echo "configure:25087: checking for cURL in default path" >&5
4989 +echo "configure:25391: checking for cURL in default path" >&5
4990      for i in /usr/local /usr; do
4991        if test -r $i/include/curl/easy.h; then
4992          CURL_DIR=$i
4993 @@ -25101,7 +25405,7 @@
4994  
4995    CURL_CONFIG="curl-config"
4996    echo $ac_n "checking for cURL 7.10.5 or greater""... $ac_c" 1>&6
4997 -echo "configure:25105: checking for cURL 7.10.5 or greater" >&5
4998 +echo "configure:25409: checking for cURL 7.10.5 or greater" >&5
4999  
5000    if ${CURL_DIR}/bin/curl-config --libs > /dev/null 2>&1; then
5001      CURL_CONFIG=${CURL_DIR}/bin/curl-config
5002 @@ -25121,7 +25425,7 @@
5003    fi
5004    
5005    echo $ac_n "checking for SSL support in libcurl""... $ac_c" 1>&6
5006 -echo "configure:25125: checking for SSL support in libcurl" >&5
5007 +echo "configure:25429: checking for SSL support in libcurl" >&5
5008    CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
5009    if test "$CURL_SSL" = "SSL"; then
5010     echo "$ac_t""yes" 1>&6
5011 @@ -25136,7 +25440,7 @@
5012     LDFLAGS="`$CURL_CONFIG --libs` $ld_runpath_switch$CURL_DIR/$PHP_LIBDIR"
5013     
5014     echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
5015 -echo "configure:25140: checking how to run the C preprocessor" >&5
5016 +echo "configure:25444: checking how to run the C preprocessor" >&5
5017  # On Suns, sometimes $CPP names a directory.
5018  if test -n "$CPP" && test -d "$CPP"; then
5019    CPP=
5020 @@ -25151,13 +25455,13 @@
5021    # On the NeXT, cc -E runs the code through the compiler's parser,
5022    # not just through cpp.
5023    cat > conftest.$ac_ext <<EOF
5024 -#line 25155 "configure"
5025 +#line 25459 "configure"
5026  #include "confdefs.h"
5027  #include <assert.h>
5028  Syntax Error
5029  EOF
5030  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5031 -{ (eval echo configure:25161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5032 +{ (eval echo configure:25465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5033  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5034  if test -z "$ac_err"; then
5035    :
5036 @@ -25168,13 +25472,13 @@
5037    rm -rf conftest*
5038    CPP="${CC-cc} -E -traditional-cpp"
5039    cat > conftest.$ac_ext <<EOF
5040 -#line 25172 "configure"
5041 +#line 25476 "configure"
5042  #include "confdefs.h"
5043  #include <assert.h>
5044  Syntax Error
5045  EOF
5046  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5047 -{ (eval echo configure:25178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5048 +{ (eval echo configure:25482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5049  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5050  if test -z "$ac_err"; then
5051    :
5052 @@ -25185,13 +25489,13 @@
5053    rm -rf conftest*
5054    CPP="${CC-cc} -nologo -E"
5055    cat > conftest.$ac_ext <<EOF
5056 -#line 25189 "configure"
5057 +#line 25493 "configure"
5058  #include "confdefs.h"
5059  #include <assert.h>
5060  Syntax Error
5061  EOF
5062  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5063 -{ (eval echo configure:25195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5064 +{ (eval echo configure:25499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5065  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5066  if test -z "$ac_err"; then
5067    :
5068 @@ -25216,14 +25520,14 @@
5069  echo "$ac_t""$CPP" 1>&6
5070  
5071     echo $ac_n "checking for openssl support in libcurl""... $ac_c" 1>&6
5072 -echo "configure:25220: checking for openssl support in libcurl" >&5
5073 +echo "configure:25524: checking for openssl support in libcurl" >&5
5074     if test "$cross_compiling" = yes; then
5075    
5076      echo "$ac_t""no" 1>&6
5077     
5078  else
5079    cat > conftest.$ac_ext <<EOF
5080 -#line 25227 "configure"
5081 +#line 25531 "configure"
5082  #include "confdefs.h"
5083  
5084      #include <curl/curl.h>
5085 @@ -25238,23 +25542,23 @@
5086      }
5087     
5088  EOF
5089 -if { (eval echo configure:25242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5090 +if { (eval echo configure:25546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5091  then
5092    
5093      echo "$ac_t""yes" 1>&6
5094      ac_safe=`echo "openssl/crypto.h" | sed 'y%./+-%__p_%'`
5095  echo $ac_n "checking for openssl/crypto.h""... $ac_c" 1>&6
5096 -echo "configure:25248: checking for openssl/crypto.h" >&5
5097 +echo "configure:25552: checking for openssl/crypto.h" >&5
5098  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5099    echo $ac_n "(cached) $ac_c" 1>&6
5100  else
5101    cat > conftest.$ac_ext <<EOF
5102 -#line 25253 "configure"
5103 +#line 25557 "configure"
5104  #include "confdefs.h"
5105  #include <openssl/crypto.h>
5106  EOF
5107  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5108 -{ (eval echo configure:25258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5109 +{ (eval echo configure:25562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5110  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5111  if test -z "$ac_err"; then
5112    rm -rf conftest*
5113 @@ -25294,14 +25598,14 @@
5114  
5115     
5116     echo $ac_n "checking for gnutls support in libcurl""... $ac_c" 1>&6
5117 -echo "configure:25298: checking for gnutls support in libcurl" >&5
5118 +echo "configure:25602: checking for gnutls support in libcurl" >&5
5119     if test "$cross_compiling" = yes; then
5120    
5121      echo "$ac_t""no" 1>&6
5122     
5123  else
5124    cat > conftest.$ac_ext <<EOF
5125 -#line 25305 "configure"
5126 +#line 25609 "configure"
5127  #include "confdefs.h"
5128  
5129      #include <curl/curl.h>
5130 @@ -25316,23 +25620,23 @@
5131      }
5132     
5133  EOF
5134 -if { (eval echo configure:25320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5135 +if { (eval echo configure:25624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5136  then
5137    
5138      echo "$ac_t""yes" 1>&6
5139      ac_safe=`echo "gcrypt.h" | sed 'y%./+-%__p_%'`
5140  echo $ac_n "checking for gcrypt.h""... $ac_c" 1>&6
5141 -echo "configure:25326: checking for gcrypt.h" >&5
5142 +echo "configure:25630: checking for gcrypt.h" >&5
5143  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5144    echo $ac_n "(cached) $ac_c" 1>&6
5145  else
5146    cat > conftest.$ac_ext <<EOF
5147 -#line 25331 "configure"
5148 +#line 25635 "configure"
5149  #include "confdefs.h"
5150  #include <gcrypt.h>
5151  EOF
5152  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5153 -{ (eval echo configure:25336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5154 +{ (eval echo configure:25640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5155  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5156  if test -z "$ac_err"; then
5157    rm -rf conftest*
5158 @@ -25693,7 +25997,7 @@
5159    done
5160  
5161    echo $ac_n "checking for curl_easy_perform in -lcurl""... $ac_c" 1>&6
5162 -echo "configure:25697: checking for curl_easy_perform in -lcurl" >&5
5163 +echo "configure:26001: checking for curl_easy_perform in -lcurl" >&5
5164  ac_lib_var=`echo curl'_'curl_easy_perform | sed 'y%./+-%__p_%'`
5165  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5166    echo $ac_n "(cached) $ac_c" 1>&6
5167 @@ -25701,7 +26005,7 @@
5168    ac_save_LIBS="$LIBS"
5169  LIBS="-lcurl  $LIBS"
5170  cat > conftest.$ac_ext <<EOF
5171 -#line 25705 "configure"
5172 +#line 26009 "configure"
5173  #include "confdefs.h"
5174  /* Override any gcc2 internal prototype to avoid an error.  */
5175  /* We use char because int might match the return type of a gcc2
5176 @@ -25712,7 +26016,7 @@
5177  curl_easy_perform()
5178  ; return 0; }
5179  EOF
5180 -if { (eval echo configure:25716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5181 +if { (eval echo configure:26020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5182    rm -rf conftest*
5183    eval "ac_cv_lib_$ac_lib_var=yes"
5184  else
5185 @@ -25848,7 +26152,7 @@
5186    done
5187  
5188    echo $ac_n "checking for curl_version_info in -lcurl""... $ac_c" 1>&6
5189 -echo "configure:25852: checking for curl_version_info in -lcurl" >&5
5190 +echo "configure:26156: checking for curl_version_info in -lcurl" >&5
5191  ac_lib_var=`echo curl'_'curl_version_info | sed 'y%./+-%__p_%'`
5192  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5193    echo $ac_n "(cached) $ac_c" 1>&6
5194 @@ -25856,7 +26160,7 @@
5195    ac_save_LIBS="$LIBS"
5196  LIBS="-lcurl  $LIBS"
5197  cat > conftest.$ac_ext <<EOF
5198 -#line 25860 "configure"
5199 +#line 26164 "configure"
5200  #include "confdefs.h"
5201  /* Override any gcc2 internal prototype to avoid an error.  */
5202  /* We use char because int might match the return type of a gcc2
5203 @@ -25867,7 +26171,7 @@
5204  curl_version_info()
5205  ; return 0; }
5206  EOF
5207 -if { (eval echo configure:25871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5208 +if { (eval echo configure:26175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5209    rm -rf conftest*
5210    eval "ac_cv_lib_$ac_lib_var=yes"
5211  else
5212 @@ -26001,7 +26305,7 @@
5213    done
5214  
5215    echo $ac_n "checking for curl_easy_strerror in -lcurl""... $ac_c" 1>&6
5216 -echo "configure:26005: checking for curl_easy_strerror in -lcurl" >&5
5217 +echo "configure:26309: checking for curl_easy_strerror in -lcurl" >&5
5218  ac_lib_var=`echo curl'_'curl_easy_strerror | sed 'y%./+-%__p_%'`
5219  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5220    echo $ac_n "(cached) $ac_c" 1>&6
5221 @@ -26009,7 +26313,7 @@
5222    ac_save_LIBS="$LIBS"
5223  LIBS="-lcurl  $LIBS"
5224  cat > conftest.$ac_ext <<EOF
5225 -#line 26013 "configure"
5226 +#line 26317 "configure"
5227  #include "confdefs.h"
5228  /* Override any gcc2 internal prototype to avoid an error.  */
5229  /* We use char because int might match the return type of a gcc2
5230 @@ -26020,7 +26324,7 @@
5231  curl_easy_strerror()
5232  ; return 0; }
5233  EOF
5234 -if { (eval echo configure:26024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5235 +if { (eval echo configure:26328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5236    rm -rf conftest*
5237    eval "ac_cv_lib_$ac_lib_var=yes"
5238  else
5239 @@ -26154,7 +26458,7 @@
5240    done
5241  
5242    echo $ac_n "checking for curl_multi_strerror in -lcurl""... $ac_c" 1>&6
5243 -echo "configure:26158: checking for curl_multi_strerror in -lcurl" >&5
5244 +echo "configure:26462: checking for curl_multi_strerror in -lcurl" >&5
5245  ac_lib_var=`echo curl'_'curl_multi_strerror | sed 'y%./+-%__p_%'`
5246  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5247    echo $ac_n "(cached) $ac_c" 1>&6
5248 @@ -26162,7 +26466,7 @@
5249    ac_save_LIBS="$LIBS"
5250  LIBS="-lcurl  $LIBS"
5251  cat > conftest.$ac_ext <<EOF
5252 -#line 26166 "configure"
5253 +#line 26470 "configure"
5254  #include "confdefs.h"
5255  /* Override any gcc2 internal prototype to avoid an error.  */
5256  /* We use char because int might match the return type of a gcc2
5257 @@ -26173,7 +26477,7 @@
5258  curl_multi_strerror()
5259  ; return 0; }
5260  EOF
5261 -if { (eval echo configure:26177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5262 +if { (eval echo configure:26481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5263    rm -rf conftest*
5264    eval "ac_cv_lib_$ac_lib_var=yes"
5265  else
5266 @@ -26507,7 +26811,7 @@
5267  
5268  
5269  echo $ac_n "checking size of long""... $ac_c" 1>&6
5270 -echo "configure:26511: checking size of long" >&5
5271 +echo "configure:26815: checking size of long" >&5
5272  if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
5273    echo $ac_n "(cached) $ac_c" 1>&6
5274  else
5275 @@ -26515,18 +26819,18 @@
5276    ac_cv_sizeof_long=8
5277  else
5278    cat > conftest.$ac_ext <<EOF
5279 -#line 26519 "configure"
5280 +#line 26823 "configure"
5281  #include "confdefs.h"
5282  #include <stdio.h>
5283 -int main()
5284 +main()
5285  {
5286    FILE *f=fopen("conftestval", "w");
5287 -  if (!f) return(1);
5288 +  if (!f) exit(1);
5289    fprintf(f, "%d\n", sizeof(long));
5290 -  return(0);
5291 +  exit(0);
5292  }
5293  EOF
5294 -if { (eval echo configure:26530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5295 +if { (eval echo configure:26834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5296  then
5297    ac_cv_sizeof_long=`cat conftestval`
5298  else
5299 @@ -26546,7 +26850,7 @@
5300  
5301  
5302  echo $ac_n "checking size of int""... $ac_c" 1>&6
5303 -echo "configure:26550: checking size of int" >&5
5304 +echo "configure:26854: checking size of int" >&5
5305  if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
5306    echo $ac_n "(cached) $ac_c" 1>&6
5307  else
5308 @@ -26554,18 +26858,18 @@
5309    ac_cv_sizeof_int=4
5310  else
5311    cat > conftest.$ac_ext <<EOF
5312 -#line 26558 "configure"
5313 +#line 26862 "configure"
5314  #include "confdefs.h"
5315  #include <stdio.h>
5316 -int main()
5317 +main()
5318  {
5319    FILE *f=fopen("conftestval", "w");
5320 -  if (!f) return(1);
5321 +  if (!f) exit(1);
5322    fprintf(f, "%d\n", sizeof(int));
5323 -  return(0);
5324 +  exit(0);
5325  }
5326  EOF
5327 -if { (eval echo configure:26569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5328 +if { (eval echo configure:26873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5329  then
5330    ac_cv_sizeof_int=`cat conftestval`
5331  else
5332 @@ -26586,13 +26890,13 @@
5333  
5334  
5335  echo $ac_n "checking for int32_t""... $ac_c" 1>&6
5336 -echo "configure:26590: checking for int32_t" >&5
5337 +echo "configure:26894: checking for int32_t" >&5
5338  if eval "test \"`echo '$''{'ac_cv_int_type_int32_t'+set}'`\" = set"; then
5339    echo $ac_n "(cached) $ac_c" 1>&6
5340  else
5341    
5342  cat > conftest.$ac_ext <<EOF
5343 -#line 26596 "configure"
5344 +#line 26900 "configure"
5345  #include "confdefs.h"
5346  
5347  #if HAVE_SYS_TYPES_H
5348 @@ -26611,7 +26915,7 @@
5349  
5350  ; return 0; }
5351  EOF
5352 -if { (eval echo configure:26615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5353 +if { (eval echo configure:26919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5354    rm -rf conftest*
5355    ac_cv_int_type_int32_t=yes
5356  else
5357 @@ -26634,13 +26938,13 @@
5358  
5359  
5360  echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
5361 -echo "configure:26638: checking for uint32_t" >&5
5362 +echo "configure:26942: checking for uint32_t" >&5
5363  if eval "test \"`echo '$''{'ac_cv_int_type_uint32_t'+set}'`\" = set"; then
5364    echo $ac_n "(cached) $ac_c" 1>&6
5365  else
5366    
5367  cat > conftest.$ac_ext <<EOF
5368 -#line 26644 "configure"
5369 +#line 26948 "configure"
5370  #include "confdefs.h"
5371  
5372  #if HAVE_SYS_TYPES_H
5373 @@ -26659,7 +26963,7 @@
5374  
5375  ; return 0; }
5376  EOF
5377 -if { (eval echo configure:26663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5378 +if { (eval echo configure:26967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5379    rm -rf conftest*
5380    ac_cv_int_type_uint32_t=yes
5381  else
5382 @@ -26691,17 +26995,17 @@
5383  do
5384  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5385  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5386 -echo "configure:26695: checking for $ac_hdr" >&5
5387 +echo "configure:26999: checking for $ac_hdr" >&5
5388  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5389    echo $ac_n "(cached) $ac_c" 1>&6
5390  else
5391    cat > conftest.$ac_ext <<EOF
5392 -#line 26700 "configure"
5393 +#line 27004 "configure"
5394  #include "confdefs.h"
5395  #include <$ac_hdr>
5396  EOF
5397  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5398 -{ (eval echo configure:26705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5399 +{ (eval echo configure:27009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5400  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5401  if test -z "$ac_err"; then
5402    rm -rf conftest*
5403 @@ -26731,12 +27035,12 @@
5404  for ac_func in strtoll atoll strftime
5405  do
5406  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5407 -echo "configure:26735: checking for $ac_func" >&5
5408 +echo "configure:27039: checking for $ac_func" >&5
5409  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5410    echo $ac_n "(cached) $ac_c" 1>&6
5411  else
5412    cat > conftest.$ac_ext <<EOF
5413 -#line 26740 "configure"
5414 +#line 27044 "configure"
5415  #include "confdefs.h"
5416  /* System header to define __stub macros and hopefully few prototypes,
5417      which can conflict with char $ac_func(); below.  */
5418 @@ -26759,7 +27063,7 @@
5419  
5420  ; return 0; }
5421  EOF
5422 -if { (eval echo configure:26763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5423 +if { (eval echo configure:27067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5424    rm -rf conftest*
5425    eval "ac_cv_func_$ac_func=yes"
5426  else
5427 @@ -27542,7 +27846,7 @@
5428    done
5429  
5430    echo $ac_n "checking for dpopen in -l$LIB""... $ac_c" 1>&6
5431 -echo "configure:27546: checking for dpopen in -l$LIB" >&5
5432 +echo "configure:27850: checking for dpopen in -l$LIB" >&5
5433  ac_lib_var=`echo $LIB'_'dpopen | sed 'y%./+-%__p_%'`
5434  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5435    echo $ac_n "(cached) $ac_c" 1>&6
5436 @@ -27550,7 +27854,7 @@
5437    ac_save_LIBS="$LIBS"
5438  LIBS="-l$LIB  $LIBS"
5439  cat > conftest.$ac_ext <<EOF
5440 -#line 27554 "configure"
5441 +#line 27858 "configure"
5442  #include "confdefs.h"
5443  /* Override any gcc2 internal prototype to avoid an error.  */
5444  /* We use char because int might match the return type of a gcc2
5445 @@ -27561,7 +27865,7 @@
5446  dpopen()
5447  ; return 0; }
5448  EOF
5449 -if { (eval echo configure:27565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5450 +if { (eval echo configure:27869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5451    rm -rf conftest*
5452    eval "ac_cv_lib_$ac_lib_var=yes"
5453  else
5454 @@ -27730,7 +28034,7 @@
5455      THIS_FULL_NAME="$THIS_NAME"
5456    fi
5457    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5458 -echo "configure:27734: checking for $THIS_FULL_NAME support" >&5
5459 +echo "configure:28038: checking for $THIS_FULL_NAME support" >&5
5460    if test -n ""; then
5461      { echo "configure: error: " 1>&2; exit 1; }
5462    fi
5463 @@ -27758,7 +28062,7 @@
5464      THIS_FULL_NAME="$THIS_NAME"
5465    fi
5466    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5467 -echo "configure:27762: checking for $THIS_FULL_NAME support" >&5
5468 +echo "configure:28066: checking for $THIS_FULL_NAME support" >&5
5469    if test -n "You cannot combine --with-gdbm with --with-qdbm"; then
5470      { echo "configure: error: You cannot combine --with-gdbm with --with-qdbm" 1>&2; exit 1; }
5471    fi
5472 @@ -27877,7 +28181,7 @@
5473    done
5474  
5475    echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
5476 -echo "configure:27881: checking for gdbm_open in -lgdbm" >&5
5477 +echo "configure:28185: checking for gdbm_open in -lgdbm" >&5
5478  ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
5479  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5480    echo $ac_n "(cached) $ac_c" 1>&6
5481 @@ -27885,7 +28189,7 @@
5482    ac_save_LIBS="$LIBS"
5483  LIBS="-lgdbm  $LIBS"
5484  cat > conftest.$ac_ext <<EOF
5485 -#line 27889 "configure"
5486 +#line 28193 "configure"
5487  #include "confdefs.h"
5488  /* Override any gcc2 internal prototype to avoid an error.  */
5489  /* We use char because int might match the return type of a gcc2
5490 @@ -27896,7 +28200,7 @@
5491  gdbm_open()
5492  ; return 0; }
5493  EOF
5494 -if { (eval echo configure:27900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5495 +if { (eval echo configure:28204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5496    rm -rf conftest*
5497    eval "ac_cv_lib_$ac_lib_var=yes"
5498  else
5499 @@ -28061,7 +28365,7 @@
5500      THIS_FULL_NAME="$THIS_NAME"
5501    fi
5502    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5503 -echo "configure:28065: checking for $THIS_FULL_NAME support" >&5
5504 +echo "configure:28369: checking for $THIS_FULL_NAME support" >&5
5505    if test -n ""; then
5506      { echo "configure: error: " 1>&2; exit 1; }
5507    fi
5508 @@ -28190,7 +28494,7 @@
5509    done
5510  
5511    echo $ac_n "checking for dbm_open in -l$LIB""... $ac_c" 1>&6
5512 -echo "configure:28194: checking for dbm_open in -l$LIB" >&5
5513 +echo "configure:28498: checking for dbm_open in -l$LIB" >&5
5514  ac_lib_var=`echo $LIB'_'dbm_open | sed 'y%./+-%__p_%'`
5515  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5516    echo $ac_n "(cached) $ac_c" 1>&6
5517 @@ -28198,7 +28502,7 @@
5518    ac_save_LIBS="$LIBS"
5519  LIBS="-l$LIB  $LIBS"
5520  cat > conftest.$ac_ext <<EOF
5521 -#line 28202 "configure"
5522 +#line 28506 "configure"
5523  #include "confdefs.h"
5524  /* Override any gcc2 internal prototype to avoid an error.  */
5525  /* We use char because int might match the return type of a gcc2
5526 @@ -28209,7 +28513,7 @@
5527  dbm_open()
5528  ; return 0; }
5529  EOF
5530 -if { (eval echo configure:28213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5531 +if { (eval echo configure:28517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5532    rm -rf conftest*
5533    eval "ac_cv_lib_$ac_lib_var=yes"
5534  else
5535 @@ -28378,7 +28682,7 @@
5536      THIS_FULL_NAME="$THIS_NAME"
5537    fi
5538    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5539 -echo "configure:28382: checking for $THIS_FULL_NAME support" >&5
5540 +echo "configure:28686: checking for $THIS_FULL_NAME support" >&5
5541    if test -n ""; then
5542      { echo "configure: error: " 1>&2; exit 1; }
5543    fi
5544 @@ -28440,7 +28744,7 @@
5545    LIBS="-l$LIB $LIBS"
5546    
5547          cat > conftest.$ac_ext <<EOF
5548 -#line 28444 "configure"
5549 +#line 28748 "configure"
5550  #include "confdefs.h"
5551  
5552  #include "$THIS_INCLUDE"
5553 @@ -28451,11 +28755,11 @@
5554          
5555  ; return 0; }
5556  EOF
5557 -if { (eval echo configure:28455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5558 +if { (eval echo configure:28759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5559    rm -rf conftest*
5560    
5561            cat > conftest.$ac_ext <<EOF
5562 -#line 28459 "configure"
5563 +#line 28763 "configure"
5564  #include "confdefs.h"
5565  
5566  #include "$THIS_INCLUDE"
5567 @@ -28492,14 +28796,14 @@
5568    done
5569    if test -z "$THIS_LIBS"; then
5570      echo $ac_n "checking for db4 major version""... $ac_c" 1>&6
5571 -echo "configure:28496: checking for db4 major version" >&5
5572 +echo "configure:28800: checking for db4 major version" >&5
5573      { echo "configure: error: Header contains different version" 1>&2; exit 1; }
5574    fi
5575    if test "4" = "4"; then
5576      echo $ac_n "checking for db4 minor version and patch level""... $ac_c" 1>&6
5577 -echo "configure:28501: checking for db4 minor version and patch level" >&5
5578 +echo "configure:28805: checking for db4 minor version and patch level" >&5
5579      cat > conftest.$ac_ext <<EOF
5580 -#line 28503 "configure"
5581 +#line 28807 "configure"
5582  #include "confdefs.h"
5583  
5584  #include "$THIS_INCLUDE"
5585 @@ -28525,9 +28829,9 @@
5586    fi
5587    if test "$ext_shared" = "yes"; then
5588      echo $ac_n "checking if dba can be used as shared extension""... $ac_c" 1>&6
5589 -echo "configure:28529: checking if dba can be used as shared extension" >&5
5590 +echo "configure:28833: checking if dba can be used as shared extension" >&5
5591      cat > conftest.$ac_ext <<EOF
5592 -#line 28531 "configure"
5593 +#line 28835 "configure"
5594  #include "confdefs.h"
5595  
5596  #include "$THIS_INCLUDE"
5597 @@ -28684,7 +28988,7 @@
5598      THIS_FULL_NAME="$THIS_NAME"
5599    fi
5600    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5601 -echo "configure:28688: checking for $THIS_FULL_NAME support" >&5
5602 +echo "configure:28992: checking for $THIS_FULL_NAME support" >&5
5603    if test -n ""; then
5604      { echo "configure: error: " 1>&2; exit 1; }
5605    fi
5606 @@ -28712,7 +29016,7 @@
5607      THIS_FULL_NAME="$THIS_NAME"
5608    fi
5609    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5610 -echo "configure:28716: checking for $THIS_FULL_NAME support" >&5
5611 +echo "configure:29020: checking for $THIS_FULL_NAME support" >&5
5612    if test -n "You cannot combine --with-db3 with --with-db4"; then
5613      { echo "configure: error: You cannot combine --with-db3 with --with-db4" 1>&2; exit 1; }
5614    fi
5615 @@ -28763,7 +29067,7 @@
5616    LIBS="-l$LIB $LIBS"
5617    
5618          cat > conftest.$ac_ext <<EOF
5619 -#line 28767 "configure"
5620 +#line 29071 "configure"
5621  #include "confdefs.h"
5622  
5623  #include "$THIS_INCLUDE"
5624 @@ -28774,11 +29078,11 @@
5625          
5626  ; return 0; }
5627  EOF
5628 -if { (eval echo configure:28778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5629 +if { (eval echo configure:29082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5630    rm -rf conftest*
5631    
5632            cat > conftest.$ac_ext <<EOF
5633 -#line 28782 "configure"
5634 +#line 29086 "configure"
5635  #include "confdefs.h"
5636  
5637  #include "$THIS_INCLUDE"
5638 @@ -28815,14 +29119,14 @@
5639    done
5640    if test -z "$THIS_LIBS"; then
5641      echo $ac_n "checking for db3 major version""... $ac_c" 1>&6
5642 -echo "configure:28819: checking for db3 major version" >&5
5643 +echo "configure:29123: checking for db3 major version" >&5
5644      { echo "configure: error: Header contains different version" 1>&2; exit 1; }
5645    fi
5646    if test "3" = "4"; then
5647      echo $ac_n "checking for db4 minor version and patch level""... $ac_c" 1>&6
5648 -echo "configure:28824: checking for db4 minor version and patch level" >&5
5649 +echo "configure:29128: checking for db4 minor version and patch level" >&5
5650      cat > conftest.$ac_ext <<EOF
5651 -#line 28826 "configure"
5652 +#line 29130 "configure"
5653  #include "confdefs.h"
5654  
5655  #include "$THIS_INCLUDE"
5656 @@ -28848,9 +29152,9 @@
5657    fi
5658    if test "$ext_shared" = "yes"; then
5659      echo $ac_n "checking if dba can be used as shared extension""... $ac_c" 1>&6
5660 -echo "configure:28852: checking if dba can be used as shared extension" >&5
5661 +echo "configure:29156: checking if dba can be used as shared extension" >&5
5662      cat > conftest.$ac_ext <<EOF
5663 -#line 28854 "configure"
5664 +#line 29158 "configure"
5665  #include "confdefs.h"
5666  
5667  #include "$THIS_INCLUDE"
5668 @@ -29007,7 +29311,7 @@
5669      THIS_FULL_NAME="$THIS_NAME"
5670    fi
5671    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5672 -echo "configure:29011: checking for $THIS_FULL_NAME support" >&5
5673 +echo "configure:29315: checking for $THIS_FULL_NAME support" >&5
5674    if test -n ""; then
5675      { echo "configure: error: " 1>&2; exit 1; }
5676    fi
5677 @@ -29035,7 +29339,7 @@
5678      THIS_FULL_NAME="$THIS_NAME"
5679    fi
5680    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5681 -echo "configure:29039: checking for $THIS_FULL_NAME support" >&5
5682 +echo "configure:29343: checking for $THIS_FULL_NAME support" >&5
5683    if test -n "You cannot combine --with-db2 with --with-db3 or --with-db4"; then
5684      { echo "configure: error: You cannot combine --with-db2 with --with-db3 or --with-db4" 1>&2; exit 1; }
5685    fi
5686 @@ -29086,7 +29390,7 @@
5687    LIBS="-l$LIB $LIBS"
5688    
5689          cat > conftest.$ac_ext <<EOF
5690 -#line 29090 "configure"
5691 +#line 29394 "configure"
5692  #include "confdefs.h"
5693  
5694  #include "$THIS_INCLUDE"
5695 @@ -29097,11 +29401,11 @@
5696          
5697  ; return 0; }
5698  EOF
5699 -if { (eval echo configure:29101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5700 +if { (eval echo configure:29405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5701    rm -rf conftest*
5702    
5703            cat > conftest.$ac_ext <<EOF
5704 -#line 29105 "configure"
5705 +#line 29409 "configure"
5706  #include "confdefs.h"
5707  
5708  #include "$THIS_INCLUDE"
5709 @@ -29138,14 +29442,14 @@
5710    done
5711    if test -z "$THIS_LIBS"; then
5712      echo $ac_n "checking for db2 major version""... $ac_c" 1>&6
5713 -echo "configure:29142: checking for db2 major version" >&5
5714 +echo "configure:29446: checking for db2 major version" >&5
5715      { echo "configure: error: Header contains different version" 1>&2; exit 1; }
5716    fi
5717    if test "2" = "4"; then
5718      echo $ac_n "checking for db4 minor version and patch level""... $ac_c" 1>&6
5719 -echo "configure:29147: checking for db4 minor version and patch level" >&5
5720 +echo "configure:29451: checking for db4 minor version and patch level" >&5
5721      cat > conftest.$ac_ext <<EOF
5722 -#line 29149 "configure"
5723 +#line 29453 "configure"
5724  #include "confdefs.h"
5725  
5726  #include "$THIS_INCLUDE"
5727 @@ -29171,9 +29475,9 @@
5728    fi
5729    if test "$ext_shared" = "yes"; then
5730      echo $ac_n "checking if dba can be used as shared extension""... $ac_c" 1>&6
5731 -echo "configure:29175: checking if dba can be used as shared extension" >&5
5732 +echo "configure:29479: checking if dba can be used as shared extension" >&5
5733      cat > conftest.$ac_ext <<EOF
5734 -#line 29177 "configure"
5735 +#line 29481 "configure"
5736  #include "confdefs.h"
5737  
5738  #include "$THIS_INCLUDE"
5739 @@ -29330,7 +29634,7 @@
5740      THIS_FULL_NAME="$THIS_NAME"
5741    fi
5742    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5743 -echo "configure:29334: checking for $THIS_FULL_NAME support" >&5
5744 +echo "configure:29638: checking for $THIS_FULL_NAME support" >&5
5745    if test -n ""; then
5746      { echo "configure: error: " 1>&2; exit 1; }
5747    fi
5748 @@ -29350,7 +29654,7 @@
5749    unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
5750  
5751    echo $ac_n "checking for DB1 in library""... $ac_c" 1>&6
5752 -echo "configure:29354: checking for DB1 in library" >&5
5753 +echo "configure:29658: checking for DB1 in library" >&5
5754    if test "$HAVE_DB4" = "1"; then
5755      THIS_VERSION=4
5756      THIS_LIBS=$DB4_LIBS
5757 @@ -29398,7 +29702,7 @@
5758    fi
5759    echo "$ac_t""$THIS_LIBS" 1>&6
5760    echo $ac_n "checking for DB1 in header""... $ac_c" 1>&6
5761 -echo "configure:29402: checking for DB1 in header" >&5
5762 +echo "configure:29706: checking for DB1 in header" >&5
5763    echo "$ac_t""$THIS_INCLUDE" 1>&6
5764    if test -n "$THIS_INCLUDE"; then
5765      
5766 @@ -29408,7 +29712,7 @@
5767    LIBS="-l$THIS_LIBS $LIBS"
5768    
5769        cat > conftest.$ac_ext <<EOF
5770 -#line 29412 "configure"
5771 +#line 29716 "configure"
5772  #include "confdefs.h"
5773  
5774  #include "$THIS_INCLUDE"
5775 @@ -29419,7 +29723,7 @@
5776        
5777  ; return 0; }
5778  EOF
5779 -if { (eval echo configure:29423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5780 +if { (eval echo configure:29727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5781    rm -rf conftest*
5782    
5783          cat >> confdefs.h <<EOF
5784 @@ -29569,7 +29873,7 @@
5785      THIS_FULL_NAME="$THIS_NAME"
5786    fi
5787    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5788 -echo "configure:29573: checking for $THIS_FULL_NAME support" >&5
5789 +echo "configure:29877: checking for $THIS_FULL_NAME support" >&5
5790    if test -n ""; then
5791      { echo "configure: error: " 1>&2; exit 1; }
5792    fi
5793 @@ -29597,7 +29901,7 @@
5794      THIS_FULL_NAME="$THIS_NAME"
5795    fi
5796    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5797 -echo "configure:29601: checking for $THIS_FULL_NAME support" >&5
5798 +echo "configure:29905: checking for $THIS_FULL_NAME support" >&5
5799    if test -n "You cannot combine --with-dbm with --with-qdbm"; then
5800      { echo "configure: error: You cannot combine --with-dbm with --with-qdbm" 1>&2; exit 1; }
5801    fi
5802 @@ -29721,7 +30025,7 @@
5803    done
5804  
5805    echo $ac_n "checking for dbminit in -l$LIB""... $ac_c" 1>&6
5806 -echo "configure:29725: checking for dbminit in -l$LIB" >&5
5807 +echo "configure:30029: checking for dbminit in -l$LIB" >&5
5808  ac_lib_var=`echo $LIB'_'dbminit | sed 'y%./+-%__p_%'`
5809  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5810    echo $ac_n "(cached) $ac_c" 1>&6
5811 @@ -29729,7 +30033,7 @@
5812    ac_save_LIBS="$LIBS"
5813  LIBS="-l$LIB  $LIBS"
5814  cat > conftest.$ac_ext <<EOF
5815 -#line 29733 "configure"
5816 +#line 30037 "configure"
5817  #include "confdefs.h"
5818  /* Override any gcc2 internal prototype to avoid an error.  */
5819  /* We use char because int might match the return type of a gcc2
5820 @@ -29740,7 +30044,7 @@
5821  dbminit()
5822  ; return 0; }
5823  EOF
5824 -if { (eval echo configure:29744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5825 +if { (eval echo configure:30048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5826    rm -rf conftest*
5827    eval "ac_cv_lib_$ac_lib_var=yes"
5828  else
5829 @@ -29760,7 +30064,7 @@
5830      ext_shared=$save_ext_shared
5831      
5832          echo $ac_n "checking for DBM using GDBM""... $ac_c" 1>&6
5833 -echo "configure:29764: checking for DBM using GDBM" >&5
5834 +echo "configure:30068: checking for DBM using GDBM" >&5
5835          cat >> confdefs.h <<EOF
5836  #define DBM_INCLUDE_FILE "$THIS_INCLUDE"
5837  EOF
5838 @@ -29924,7 +30228,7 @@
5839      THIS_FULL_NAME="$THIS_NAME"
5840    fi
5841    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5842 -echo "configure:29928: checking for $THIS_FULL_NAME support" >&5
5843 +echo "configure:30232: checking for $THIS_FULL_NAME support" >&5
5844    if test -n ""; then
5845      { echo "configure: error: " 1>&2; exit 1; }
5846    fi
5847 @@ -30145,7 +30449,7 @@
5848    done
5849  
5850    echo $ac_n "checking for cdb_read in -l$LIB""... $ac_c" 1>&6
5851 -echo "configure:30149: checking for cdb_read in -l$LIB" >&5
5852 +echo "configure:30453: checking for cdb_read in -l$LIB" >&5
5853  ac_lib_var=`echo $LIB'_'cdb_read | sed 'y%./+-%__p_%'`
5854  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5855    echo $ac_n "(cached) $ac_c" 1>&6
5856 @@ -30153,7 +30457,7 @@
5857    ac_save_LIBS="$LIBS"
5858  LIBS="-l$LIB  $LIBS"
5859  cat > conftest.$ac_ext <<EOF
5860 -#line 30157 "configure"
5861 +#line 30461 "configure"
5862  #include "confdefs.h"
5863  /* Override any gcc2 internal prototype to avoid an error.  */
5864  /* We use char because int might match the return type of a gcc2
5865 @@ -30164,7 +30468,7 @@
5866  cdb_read()
5867  ; return 0; }
5868  EOF
5869 -if { (eval echo configure:30168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5870 +if { (eval echo configure:30472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5871    rm -rf conftest*
5872    eval "ac_cv_lib_$ac_lib_var=yes"
5873  else
5874 @@ -30333,7 +30637,7 @@
5875      THIS_FULL_NAME="$THIS_NAME"
5876    fi
5877    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5878 -echo "configure:30337: checking for $THIS_FULL_NAME support" >&5
5879 +echo "configure:30641: checking for $THIS_FULL_NAME support" >&5
5880    if test -n ""; then
5881      { echo "configure: error: " 1>&2; exit 1; }
5882    fi
5883 @@ -30364,7 +30668,7 @@
5884      THIS_FULL_NAME="$THIS_NAME"
5885    fi
5886    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5887 -echo "configure:30368: checking for $THIS_FULL_NAME support" >&5
5888 +echo "configure:30672: checking for $THIS_FULL_NAME support" >&5
5889    if test -n ""; then
5890      { echo "configure: error: " 1>&2; exit 1; }
5891    fi
5892 @@ -30395,7 +30699,7 @@
5893      THIS_FULL_NAME="$THIS_NAME"
5894    fi
5895    echo $ac_n "checking for $THIS_FULL_NAME support""... $ac_c" 1>&6
5896 -echo "configure:30399: checking for $THIS_FULL_NAME support" >&5
5897 +echo "configure:30703: checking for $THIS_FULL_NAME support" >&5
5898    if test -n ""; then
5899      { echo "configure: error: " 1>&2; exit 1; }
5900    fi
5901 @@ -30410,7 +30714,7 @@
5902  
5903  
5904  echo $ac_n "checking whether to enable DBA interface""... $ac_c" 1>&6
5905 -echo "configure:30414: checking whether to enable DBA interface" >&5
5906 +echo "configure:30718: checking whether to enable DBA interface" >&5
5907  if test "$HAVE_DBA" = "1"; then
5908    if test "$ext_shared" = "yes"; then
5909      echo "$ac_t""yes, shared" 1>&6
5910 @@ -30729,7 +31033,7 @@
5911  php_enable_dbase=no
5912  
5913  echo $ac_n "checking whether to enable dbase support""... $ac_c" 1>&6
5914 -echo "configure:30733: checking whether to enable dbase support" >&5
5915 +echo "configure:31037: checking whether to enable dbase support" >&5
5916  # Check whether --enable-dbase or --disable-dbase was given.
5917  if test "${enable_dbase+set}" = set; then
5918    enableval="$enable_dbase"
5919 @@ -31065,7 +31369,7 @@
5920  php_enable_dom=yes
5921  
5922  echo $ac_n "checking whether to enable DOM support""... $ac_c" 1>&6
5923 -echo "configure:31069: checking whether to enable DOM support" >&5
5924 +echo "configure:31373: checking whether to enable DOM support" >&5
5925  # Check whether --enable-dom or --disable-dom was given.
5926  if test "${enable_dom+set}" = set; then
5927    enableval="$enable_dom"
5928 @@ -31113,7 +31417,7 @@
5929  php_with_libxml_dir=no
5930  
5931  echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
5932 -echo "configure:31117: checking libxml2 install dir" >&5
5933 +echo "configure:31421: checking libxml2 install dir" >&5
5934  # Check whether --with-libxml-dir or --without-libxml-dir was given.
5935  if test "${with_libxml_dir+set}" = set; then
5936    withval="$with_libxml_dir"
5937 @@ -31144,7 +31448,7 @@
5938  
5939    
5940  echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
5941 -echo "configure:31148: checking for xml2-config path" >&5
5942 +echo "configure:31452: checking for xml2-config path" >&5
5943  if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
5944    echo $ac_n "(cached) $ac_c" 1>&6
5945  else
5946 @@ -31302,7 +31606,7 @@
5947  
5948  
5949              echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
5950 -echo "configure:31306: checking whether libxml build works" >&5
5951 +echo "configure:31610: checking whether libxml build works" >&5
5952  if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
5953    echo $ac_n "(cached) $ac_c" 1>&6
5954  else
5955 @@ -31318,7 +31622,7 @@
5956    
5957  else
5958    cat > conftest.$ac_ext <<EOF
5959 -#line 31322 "configure"
5960 +#line 31626 "configure"
5961  #include "confdefs.h"
5962  
5963      
5964 @@ -31329,7 +31633,7 @@
5965      }
5966    
5967  EOF
5968 -if { (eval echo configure:31333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5969 +if { (eval echo configure:31637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5970  then
5971    
5972      LIBS=$old_LIBS
5973 @@ -31741,7 +32045,7 @@
5974  php_enable_exif=no
5975  
5976  echo $ac_n "checking whether to enable EXIF (metadata from images) support""... $ac_c" 1>&6
5977 -echo "configure:31745: checking whether to enable EXIF (metadata from images) support" >&5
5978 +echo "configure:32049: checking whether to enable EXIF (metadata from images) support" >&5
5979  # Check whether --enable-exif or --disable-exif was given.
5980  if test "${enable_exif+set}" = set; then
5981    enableval="$enable_exif"
5982 @@ -32077,7 +32381,7 @@
5983  php_with_fbsql=no
5984  
5985  echo $ac_n "checking for FrontBase SQL92 (fbsql) support""... $ac_c" 1>&6
5986 -echo "configure:32081: checking for FrontBase SQL92 (fbsql) support" >&5
5987 +echo "configure:32385: checking for FrontBase SQL92 (fbsql) support" >&5
5988  # Check whether --with-fbsql or --without-fbsql was given.
5989  if test "${with_fbsql+set}" = set; then
5990    withval="$with_fbsql"
5991 @@ -32573,7 +32877,7 @@
5992  php_with_fdftk=no
5993  
5994  echo $ac_n "checking for FDF support""... $ac_c" 1>&6
5995 -echo "configure:32577: checking for FDF support" >&5
5996 +echo "configure:32881: checking for FDF support" >&5
5997  # Check whether --with-fdftk or --without-fdftk was given.
5998  if test "${with_fdftk+set}" = set; then
5999    withval="$with_fdftk"
6000 @@ -32791,7 +33095,7 @@
6001    done
6002  
6003    echo $ac_n "checking for FDFOpen in -l$file""... $ac_c" 1>&6
6004 -echo "configure:32795: checking for FDFOpen in -l$file" >&5
6005 +echo "configure:33099: checking for FDFOpen in -l$file" >&5
6006  ac_lib_var=`echo $file'_'FDFOpen | sed 'y%./+-%__p_%'`
6007  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6008    echo $ac_n "(cached) $ac_c" 1>&6
6009 @@ -32799,7 +33103,7 @@
6010    ac_save_LIBS="$LIBS"
6011  LIBS="-l$file  $LIBS"
6012  cat > conftest.$ac_ext <<EOF
6013 -#line 32803 "configure"
6014 +#line 33107 "configure"
6015  #include "confdefs.h"
6016  /* Override any gcc2 internal prototype to avoid an error.  */
6017  /* We use char because int might match the return type of a gcc2
6018 @@ -32810,7 +33114,7 @@
6019  FDFOpen()
6020  ; return 0; }
6021  EOF
6022 -if { (eval echo configure:32814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6023 +if { (eval echo configure:33118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6024    rm -rf conftest*
6025    eval "ac_cv_lib_$ac_lib_var=yes"
6026  else
6027 @@ -32937,7 +33241,7 @@
6028    done
6029  
6030    echo $ac_n "checking for FDFGetFDFVersion in -l$file""... $ac_c" 1>&6
6031 -echo "configure:32941: checking for FDFGetFDFVersion in -l$file" >&5
6032 +echo "configure:33245: checking for FDFGetFDFVersion in -l$file" >&5
6033  ac_lib_var=`echo $file'_'FDFGetFDFVersion | sed 'y%./+-%__p_%'`
6034  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6035    echo $ac_n "(cached) $ac_c" 1>&6
6036 @@ -32945,7 +33249,7 @@
6037    ac_save_LIBS="$LIBS"
6038  LIBS="-l$file  $LIBS"
6039  cat > conftest.$ac_ext <<EOF
6040 -#line 32949 "configure"
6041 +#line 33253 "configure"
6042  #include "confdefs.h"
6043  /* Override any gcc2 internal prototype to avoid an error.  */
6044  /* We use char because int might match the return type of a gcc2
6045 @@ -32956,7 +33260,7 @@
6046  FDFGetFDFVersion()
6047  ; return 0; }
6048  EOF
6049 -if { (eval echo configure:32960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6050 +if { (eval echo configure:33264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6051    rm -rf conftest*
6052    eval "ac_cv_lib_$ac_lib_var=yes"
6053  else
6054 @@ -33393,7 +33697,7 @@
6055  php_enable_filter=yes
6056  
6057  echo $ac_n "checking whether to enable input filter support""... $ac_c" 1>&6
6058 -echo "configure:33397: checking whether to enable input filter support" >&5
6059 +echo "configure:33701: checking whether to enable input filter support" >&5
6060  # Check whether --enable-filter or --disable-filter was given.
6061  if test "${enable_filter+set}" = set; then
6062    enableval="$enable_filter"
6063 @@ -33440,7 +33744,7 @@
6064  php_with_pcre_dir=no
6065  
6066  echo $ac_n "checking pcre install prefix""... $ac_c" 1>&6
6067 -echo "configure:33444: checking pcre install prefix" >&5
6068 +echo "configure:33748: checking pcre install prefix" >&5
6069  # Check whether --with-pcre-dir or --without-pcre-dir was given.
6070  if test "${with_pcre_dir+set}" = set; then
6071    withval="$with_pcre_dir"
6072 @@ -33470,7 +33774,7 @@
6073          old_CPPFLAGS=$CPPFLAGS
6074      CPPFLAGS=$INCLUDES
6075      cat > conftest.$ac_ext <<EOF
6076 -#line 33474 "configure"
6077 +#line 33778 "configure"
6078  #include "confdefs.h"
6079  
6080  #include <main/php_config.h>
6081 @@ -33489,7 +33793,7 @@
6082    rm -rf conftest*
6083    
6084        cat > conftest.$ac_ext <<EOF
6085 -#line 33493 "configure"
6086 +#line 33797 "configure"
6087  #include "confdefs.h"
6088  
6089  #include <main/php_config.h>
6090 @@ -33848,7 +34152,7 @@
6091  php_enable_ftp=no
6092  
6093  echo $ac_n "checking whether to enable FTP support""... $ac_c" 1>&6
6094 -echo "configure:33852: checking whether to enable FTP support" >&5
6095 +echo "configure:34156: checking whether to enable FTP support" >&5
6096  # Check whether --enable-ftp or --disable-ftp was given.
6097  if test "${enable_ftp+set}" = set; then
6098    enableval="$enable_ftp"
6099 @@ -33895,7 +34199,7 @@
6100  php_with_openssl_dir=no
6101  
6102  echo $ac_n "checking OpenSSL dir for FTP""... $ac_c" 1>&6
6103 -echo "configure:33899: checking OpenSSL dir for FTP" >&5
6104 +echo "configure:34203: checking OpenSSL dir for FTP" >&5
6105  # Check whether --with-openssl-dir or --without-openssl-dir was given.
6106  if test "${with_openssl_dir+set}" = set; then
6107    withval="$with_openssl_dir"
6108 @@ -34225,7 +34529,7 @@
6109      # Extract the first word of "pkg-config", so it can be a program name with args.
6110  set dummy pkg-config; ac_word=$2
6111  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6112 -echo "configure:34229: checking for $ac_word" >&5
6113 +echo "configure:34533: checking for $ac_word" >&5
6114  if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
6115    echo $ac_n "(cached) $ac_c" 1>&6
6116  else
6117 @@ -34430,9 +34734,9 @@
6118      old_CPPFLAGS=$CPPFLAGS
6119      CPPFLAGS=-I$OPENSSL_INCDIR
6120      echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6
6121 -echo "configure:34434: checking for OpenSSL version" >&5
6122 +echo "configure:34738: checking for OpenSSL version" >&5
6123      cat > conftest.$ac_ext <<EOF
6124 -#line 34436 "configure"
6125 +#line 34740 "configure"
6126  #include "confdefs.h"
6127  
6128  #include <openssl/opensslv.h>
6129 @@ -34587,7 +34891,7 @@
6130    done
6131  
6132    echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6
6133 -echo "configure:34591: checking for CRYPTO_free in -lcrypto" >&5
6134 +echo "configure:34895: checking for CRYPTO_free in -lcrypto" >&5
6135  ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'`
6136  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6137    echo $ac_n "(cached) $ac_c" 1>&6
6138 @@ -34595,7 +34899,7 @@
6139    ac_save_LIBS="$LIBS"
6140  LIBS="-lcrypto  $LIBS"
6141  cat > conftest.$ac_ext <<EOF
6142 -#line 34599 "configure"
6143 +#line 34903 "configure"
6144  #include "confdefs.h"
6145  /* Override any gcc2 internal prototype to avoid an error.  */
6146  /* We use char because int might match the return type of a gcc2
6147 @@ -34606,7 +34910,7 @@
6148  CRYPTO_free()
6149  ; return 0; }
6150  EOF
6151 -if { (eval echo configure:34610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6152 +if { (eval echo configure:34914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6153    rm -rf conftest*
6154    eval "ac_cv_lib_$ac_lib_var=yes"
6155  else
6156 @@ -34763,7 +35067,7 @@
6157    done
6158  
6159    echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6
6160 -echo "configure:34767: checking for SSL_CTX_set_ssl_version in -lssl" >&5
6161 +echo "configure:35071: checking for SSL_CTX_set_ssl_version in -lssl" >&5
6162  ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'`
6163  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6164    echo $ac_n "(cached) $ac_c" 1>&6
6165 @@ -34771,7 +35075,7 @@
6166    ac_save_LIBS="$LIBS"
6167  LIBS="-lssl  $LIBS"
6168  cat > conftest.$ac_ext <<EOF
6169 -#line 34775 "configure"
6170 +#line 35079 "configure"
6171  #include "confdefs.h"
6172  /* Override any gcc2 internal prototype to avoid an error.  */
6173  /* We use char because int might match the return type of a gcc2
6174 @@ -34782,7 +35086,7 @@
6175  SSL_CTX_set_ssl_version()
6176  ; return 0; }
6177  EOF
6178 -if { (eval echo configure:34786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6179 +if { (eval echo configure:35090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6180    rm -rf conftest*
6181    eval "ac_cv_lib_$ac_lib_var=yes"
6182  else
6183 @@ -34901,7 +35205,7 @@
6184  php_with_gd=no
6185  
6186  echo $ac_n "checking for GD support""... $ac_c" 1>&6
6187 -echo "configure:34905: checking for GD support" >&5
6188 +echo "configure:35209: checking for GD support" >&5
6189  # Check whether --with-gd or --without-gd was given.
6190  if test "${with_gd+set}" = set; then
6191    withval="$with_gd"
6192 @@ -34949,7 +35253,7 @@
6193  php_with_jpeg_dir=no
6194  
6195  echo $ac_n "checking for the location of libjpeg""... $ac_c" 1>&6
6196 -echo "configure:34953: checking for the location of libjpeg" >&5
6197 +echo "configure:35257: checking for the location of libjpeg" >&5
6198  # Check whether --with-jpeg-dir or --without-jpeg-dir was given.
6199  if test "${with_jpeg_dir+set}" = set; then
6200    withval="$with_jpeg_dir"
6201 @@ -34977,7 +35281,7 @@
6202  php_with_png_dir=no
6203  
6204  echo $ac_n "checking for the location of libpng""... $ac_c" 1>&6
6205 -echo "configure:34981: checking for the location of libpng" >&5
6206 +echo "configure:35285: checking for the location of libpng" >&5
6207  # Check whether --with-png-dir or --without-png-dir was given.
6208  if test "${with_png_dir+set}" = set; then
6209    withval="$with_png_dir"
6210 @@ -35005,7 +35309,7 @@
6211  php_with_zlib_dir=no
6212  
6213  echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
6214 -echo "configure:35009: checking for the location of libz" >&5
6215 +echo "configure:35313: checking for the location of libz" >&5
6216  # Check whether --with-zlib-dir or --without-zlib-dir was given.
6217  if test "${with_zlib_dir+set}" = set; then
6218    withval="$with_zlib_dir"
6219 @@ -35032,7 +35336,7 @@
6220  php_with_xpm_dir=no
6221  
6222  echo $ac_n "checking for the location of libXpm""... $ac_c" 1>&6
6223 -echo "configure:35036: checking for the location of libXpm" >&5
6224 +echo "configure:35340: checking for the location of libXpm" >&5
6225  # Check whether --with-xpm-dir or --without-xpm-dir was given.
6226  if test "${with_xpm_dir+set}" = set; then
6227    withval="$with_xpm_dir"
6228 @@ -35058,7 +35362,7 @@
6229  php_with_ttf=no
6230  
6231  echo $ac_n "checking for FreeType 1.x support""... $ac_c" 1>&6
6232 -echo "configure:35062: checking for FreeType 1.x support" >&5
6233 +echo "configure:35366: checking for FreeType 1.x support" >&5
6234  # Check whether --with-ttf or --without-ttf was given.
6235  if test "${with_ttf+set}" = set; then
6236    withval="$with_ttf"
6237 @@ -35084,7 +35388,7 @@
6238  php_with_freetype_dir=no
6239  
6240  echo $ac_n "checking for FreeType 2""... $ac_c" 1>&6
6241 -echo "configure:35088: checking for FreeType 2" >&5
6242 +echo "configure:35392: checking for FreeType 2" >&5
6243  # Check whether --with-freetype-dir or --without-freetype-dir was given.
6244  if test "${with_freetype_dir+set}" = set; then
6245    withval="$with_freetype_dir"
6246 @@ -35110,7 +35414,7 @@
6247  php_with_t1lib=no
6248  
6249  echo $ac_n "checking for T1lib support""... $ac_c" 1>&6
6250 -echo "configure:35114: checking for T1lib support" >&5
6251 +echo "configure:35418: checking for T1lib support" >&5
6252  # Check whether --with-t1lib or --without-t1lib was given.
6253  if test "${with_t1lib+set}" = set; then
6254    withval="$with_t1lib"
6255 @@ -35136,7 +35440,7 @@
6256  php_enable_gd_native_ttf=no
6257  
6258  echo $ac_n "checking whether to enable truetype string function in GD""... $ac_c" 1>&6
6259 -echo "configure:35140: checking whether to enable truetype string function in GD" >&5
6260 +echo "configure:35444: checking whether to enable truetype string function in GD" >&5
6261  # Check whether --enable-gd-native-ttf or --disable-gd-native-ttf was given.
6262  if test "${enable_gd_native_ttf+set}" = set; then
6263    enableval="$enable_gd_native_ttf"
6264 @@ -35162,7 +35466,7 @@
6265  php_enable_gd_jis_conv=no
6266  
6267  echo $ac_n "checking whether to enable JIS-mapped Japanese font support in GD""... $ac_c" 1>&6
6268 -echo "configure:35166: checking whether to enable JIS-mapped Japanese font support in GD" >&5
6269 +echo "configure:35470: checking whether to enable JIS-mapped Japanese font support in GD" >&5
6270  # Check whether --enable-gd-jis-conv or --disable-gd-jis-conv was given.
6271  if test "${enable_gd_jis_conv+set}" = set; then
6272    enableval="$enable_gd_jis_conv"
6273 @@ -35218,12 +35522,12 @@
6274    for ac_func in fabsf floorf
6275  do
6276  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6277 -echo "configure:35222: checking for $ac_func" >&5
6278 +echo "configure:35526: checking for $ac_func" >&5
6279  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6280    echo $ac_n "(cached) $ac_c" 1>&6
6281  else
6282    cat > conftest.$ac_ext <<EOF
6283 -#line 35227 "configure"
6284 +#line 35531 "configure"
6285  #include "confdefs.h"
6286  /* System header to define __stub macros and hopefully few prototypes,
6287      which can conflict with char $ac_func(); below.  */
6288 @@ -35246,7 +35550,7 @@
6289  
6290  ; return 0; }
6291  EOF
6292 -if { (eval echo configure:35250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6293 +if { (eval echo configure:35554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6294    rm -rf conftest*
6295    eval "ac_cv_func_$ac_func=yes"
6296  else
6297 @@ -35418,7 +35722,7 @@
6298    done
6299  
6300    echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
6301 -echo "configure:35422: checking for jpeg_read_header in -ljpeg" >&5
6302 +echo "configure:35726: checking for jpeg_read_header in -ljpeg" >&5
6303  ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
6304  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6305    echo $ac_n "(cached) $ac_c" 1>&6
6306 @@ -35426,7 +35730,7 @@
6307    ac_save_LIBS="$LIBS"
6308  LIBS="-ljpeg  $LIBS"
6309  cat > conftest.$ac_ext <<EOF
6310 -#line 35430 "configure"
6311 +#line 35734 "configure"
6312  #include "confdefs.h"
6313  /* Override any gcc2 internal prototype to avoid an error.  */
6314  /* We use char because int might match the return type of a gcc2
6315 @@ -35437,7 +35741,7 @@
6316  jpeg_read_header()
6317  ; return 0; }
6318  EOF
6319 -if { (eval echo configure:35441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6320 +if { (eval echo configure:35745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6321    rm -rf conftest*
6322    eval "ac_cv_lib_$ac_lib_var=yes"
6323  else
6324 @@ -35719,7 +36023,7 @@
6325    done
6326  
6327    echo $ac_n "checking for png_write_image in -lpng""... $ac_c" 1>&6
6328 -echo "configure:35723: checking for png_write_image in -lpng" >&5
6329 +echo "configure:36027: checking for png_write_image in -lpng" >&5
6330  ac_lib_var=`echo png'_'png_write_image | sed 'y%./+-%__p_%'`
6331  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6332    echo $ac_n "(cached) $ac_c" 1>&6
6333 @@ -35727,7 +36031,7 @@
6334    ac_save_LIBS="$LIBS"
6335  LIBS="-lpng  $LIBS"
6336  cat > conftest.$ac_ext <<EOF
6337 -#line 35731 "configure"
6338 +#line 36035 "configure"
6339  #include "confdefs.h"
6340  /* Override any gcc2 internal prototype to avoid an error.  */
6341  /* We use char because int might match the return type of a gcc2
6342 @@ -35738,7 +36042,7 @@
6343  png_write_image()
6344  ; return 0; }
6345  EOF
6346 -if { (eval echo configure:35742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6347 +if { (eval echo configure:36046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6348    rm -rf conftest*
6349    eval "ac_cv_lib_$ac_lib_var=yes"
6350  else
6351 @@ -36118,7 +36422,7 @@
6352    done
6353  
6354    echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6
6355 -echo "configure:36122: checking for XpmFreeXpmImage in -lXpm" >&5
6356 +echo "configure:36426: checking for XpmFreeXpmImage in -lXpm" >&5
6357  ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'`
6358  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6359    echo $ac_n "(cached) $ac_c" 1>&6
6360 @@ -36126,7 +36430,7 @@
6361    ac_save_LIBS="$LIBS"
6362  LIBS="-lXpm  $LIBS"
6363  cat > conftest.$ac_ext <<EOF
6364 -#line 36130 "configure"
6365 +#line 36434 "configure"
6366  #include "confdefs.h"
6367  /* Override any gcc2 internal prototype to avoid an error.  */
6368  /* We use char because int might match the return type of a gcc2
6369 @@ -36137,7 +36441,7 @@
6370  XpmFreeXpmImage()
6371  ; return 0; }
6372  EOF
6373 -if { (eval echo configure:36141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6374 +if { (eval echo configure:36445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6375    rm -rf conftest*
6376    eval "ac_cv_lib_$ac_lib_var=yes"
6377  else
6378 @@ -36512,7 +36816,7 @@
6379    done
6380  
6381    echo $ac_n "checking for FT_New_Face in -lfreetype""... $ac_c" 1>&6
6382 -echo "configure:36516: checking for FT_New_Face in -lfreetype" >&5
6383 +echo "configure:36820: checking for FT_New_Face in -lfreetype" >&5
6384  ac_lib_var=`echo freetype'_'FT_New_Face | sed 'y%./+-%__p_%'`
6385  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6386    echo $ac_n "(cached) $ac_c" 1>&6
6387 @@ -36520,7 +36824,7 @@
6388    ac_save_LIBS="$LIBS"
6389  LIBS="-lfreetype  $LIBS"
6390  cat > conftest.$ac_ext <<EOF
6391 -#line 36524 "configure"
6392 +#line 36828 "configure"
6393  #include "confdefs.h"
6394  /* Override any gcc2 internal prototype to avoid an error.  */
6395  /* We use char because int might match the return type of a gcc2
6396 @@ -36531,7 +36835,7 @@
6397  FT_New_Face()
6398  ; return 0; }
6399  EOF
6400 -if { (eval echo configure:36535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6401 +if { (eval echo configure:36839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6402    rm -rf conftest*
6403    eval "ac_cv_lib_$ac_lib_var=yes"
6404  else
6405 @@ -36894,7 +37198,7 @@
6406  
6407      else
6408        echo $ac_n "checking for FreeType 1 support""... $ac_c" 1>&6
6409 -echo "configure:36898: checking for FreeType 1 support" >&5
6410 +echo "configure:37202: checking for FreeType 1 support" >&5
6411        echo "$ac_t""no - FreeType 2.x is to be used instead" 1>&6
6412      fi
6413    fi
6414 @@ -37008,7 +37312,7 @@
6415    done
6416  
6417    echo $ac_n "checking for T1_StrError in -lt1""... $ac_c" 1>&6
6418 -echo "configure:37012: checking for T1_StrError in -lt1" >&5
6419 +echo "configure:37316: checking for T1_StrError in -lt1" >&5
6420  ac_lib_var=`echo t1'_'T1_StrError | sed 'y%./+-%__p_%'`
6421  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6422    echo $ac_n "(cached) $ac_c" 1>&6
6423 @@ -37016,7 +37320,7 @@
6424    ac_save_LIBS="$LIBS"
6425  LIBS="-lt1  $LIBS"
6426  cat > conftest.$ac_ext <<EOF
6427 -#line 37020 "configure"
6428 +#line 37324 "configure"
6429  #include "confdefs.h"
6430  /* Override any gcc2 internal prototype to avoid an error.  */
6431  /* We use char because int might match the return type of a gcc2
6432 @@ -37027,7 +37331,7 @@
6433  T1_StrError()
6434  ; return 0; }
6435  EOF
6436 -if { (eval echo configure:37031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6437 +if { (eval echo configure:37335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6438    rm -rf conftest*
6439    eval "ac_cv_lib_$ac_lib_var=yes"
6440  else
6441 @@ -37469,7 +37773,7 @@
6442    done
6443  
6444    echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
6445 -echo "configure:37473: checking for jpeg_read_header in -ljpeg" >&5
6446 +echo "configure:37777: checking for jpeg_read_header in -ljpeg" >&5
6447  ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
6448  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6449    echo $ac_n "(cached) $ac_c" 1>&6
6450 @@ -37477,7 +37781,7 @@
6451    ac_save_LIBS="$LIBS"
6452  LIBS="-ljpeg  $LIBS"
6453  cat > conftest.$ac_ext <<EOF
6454 -#line 37481 "configure"
6455 +#line 37785 "configure"
6456  #include "confdefs.h"
6457  /* Override any gcc2 internal prototype to avoid an error.  */
6458  /* We use char because int might match the return type of a gcc2
6459 @@ -37488,7 +37792,7 @@
6460  jpeg_read_header()
6461  ; return 0; }
6462  EOF
6463 -if { (eval echo configure:37492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6464 +if { (eval echo configure:37796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6465    rm -rf conftest*
6466    eval "ac_cv_lib_$ac_lib_var=yes"
6467  else
6468 @@ -37770,7 +38074,7 @@
6469    done
6470  
6471    echo $ac_n "checking for png_write_image in -lpng""... $ac_c" 1>&6
6472 -echo "configure:37774: checking for png_write_image in -lpng" >&5
6473 +echo "configure:38078: checking for png_write_image in -lpng" >&5
6474  ac_lib_var=`echo png'_'png_write_image | sed 'y%./+-%__p_%'`
6475  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6476    echo $ac_n "(cached) $ac_c" 1>&6
6477 @@ -37778,7 +38082,7 @@
6478    ac_save_LIBS="$LIBS"
6479  LIBS="-lpng  $LIBS"
6480  cat > conftest.$ac_ext <<EOF
6481 -#line 37782 "configure"
6482 +#line 38086 "configure"
6483  #include "confdefs.h"
6484  /* Override any gcc2 internal prototype to avoid an error.  */
6485  /* We use char because int might match the return type of a gcc2
6486 @@ -37789,7 +38093,7 @@
6487  png_write_image()
6488  ; return 0; }
6489  EOF
6490 -if { (eval echo configure:37793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6491 +if { (eval echo configure:38097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6492    rm -rf conftest*
6493    eval "ac_cv_lib_$ac_lib_var=yes"
6494  else
6495 @@ -38169,7 +38473,7 @@
6496    done
6497  
6498    echo $ac_n "checking for XpmFreeXpmImage in -lXpm""... $ac_c" 1>&6
6499 -echo "configure:38173: checking for XpmFreeXpmImage in -lXpm" >&5
6500 +echo "configure:38477: checking for XpmFreeXpmImage in -lXpm" >&5
6501  ac_lib_var=`echo Xpm'_'XpmFreeXpmImage | sed 'y%./+-%__p_%'`
6502  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6503    echo $ac_n "(cached) $ac_c" 1>&6
6504 @@ -38177,7 +38481,7 @@
6505    ac_save_LIBS="$LIBS"
6506  LIBS="-lXpm  $LIBS"
6507  cat > conftest.$ac_ext <<EOF
6508 -#line 38181 "configure"
6509 +#line 38485 "configure"
6510  #include "confdefs.h"
6511  /* Override any gcc2 internal prototype to avoid an error.  */
6512  /* We use char because int might match the return type of a gcc2
6513 @@ -38188,7 +38492,7 @@
6514  XpmFreeXpmImage()
6515  ; return 0; }
6516  EOF
6517 -if { (eval echo configure:38192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6518 +if { (eval echo configure:38496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6519    rm -rf conftest*
6520    eval "ac_cv_lib_$ac_lib_var=yes"
6521  else
6522 @@ -38563,7 +38867,7 @@
6523    done
6524  
6525    echo $ac_n "checking for FT_New_Face in -lfreetype""... $ac_c" 1>&6
6526 -echo "configure:38567: checking for FT_New_Face in -lfreetype" >&5
6527 +echo "configure:38871: checking for FT_New_Face in -lfreetype" >&5
6528  ac_lib_var=`echo freetype'_'FT_New_Face | sed 'y%./+-%__p_%'`
6529  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6530    echo $ac_n "(cached) $ac_c" 1>&6
6531 @@ -38571,7 +38875,7 @@
6532    ac_save_LIBS="$LIBS"
6533  LIBS="-lfreetype  $LIBS"
6534  cat > conftest.$ac_ext <<EOF
6535 -#line 38575 "configure"
6536 +#line 38879 "configure"
6537  #include "confdefs.h"
6538  /* Override any gcc2 internal prototype to avoid an error.  */
6539  /* We use char because int might match the return type of a gcc2
6540 @@ -38582,7 +38886,7 @@
6541  FT_New_Face()
6542  ; return 0; }
6543  EOF
6544 -if { (eval echo configure:38586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6545 +if { (eval echo configure:38890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6546    rm -rf conftest*
6547    eval "ac_cv_lib_$ac_lib_var=yes"
6548  else
6549 @@ -38945,7 +39249,7 @@
6550  
6551      else
6552        echo $ac_n "checking for FreeType 1 support""... $ac_c" 1>&6
6553 -echo "configure:38949: checking for FreeType 1 support" >&5
6554 +echo "configure:39253: checking for FreeType 1 support" >&5
6555        echo "$ac_t""no - FreeType 2.x is to be used instead" 1>&6
6556      fi
6557    fi
6558 @@ -39059,7 +39363,7 @@
6559    done
6560  
6561    echo $ac_n "checking for T1_StrError in -lt1""... $ac_c" 1>&6
6562 -echo "configure:39063: checking for T1_StrError in -lt1" >&5
6563 +echo "configure:39367: checking for T1_StrError in -lt1" >&5
6564  ac_lib_var=`echo t1'_'T1_StrError | sed 'y%./+-%__p_%'`
6565  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6566    echo $ac_n "(cached) $ac_c" 1>&6
6567 @@ -39067,7 +39371,7 @@
6568    ac_save_LIBS="$LIBS"
6569  LIBS="-lt1  $LIBS"
6570  cat > conftest.$ac_ext <<EOF
6571 -#line 39071 "configure"
6572 +#line 39375 "configure"
6573  #include "confdefs.h"
6574  /* Override any gcc2 internal prototype to avoid an error.  */
6575  /* We use char because int might match the return type of a gcc2
6576 @@ -39078,7 +39382,7 @@
6577  T1_StrError()
6578  ; return 0; }
6579  EOF
6580 -if { (eval echo configure:39082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6581 +if { (eval echo configure:39386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6582    rm -rf conftest*
6583    eval "ac_cv_lib_$ac_lib_var=yes"
6584  else
6585 @@ -39453,7 +39757,7 @@
6586    done
6587  
6588    echo $ac_n "checking for gdImageString16 in -lgd""... $ac_c" 1>&6
6589 -echo "configure:39457: checking for gdImageString16 in -lgd" >&5
6590 +echo "configure:39761: checking for gdImageString16 in -lgd" >&5
6591  ac_lib_var=`echo gd'_'gdImageString16 | sed 'y%./+-%__p_%'`
6592  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6593    echo $ac_n "(cached) $ac_c" 1>&6
6594 @@ -39461,7 +39765,7 @@
6595    ac_save_LIBS="$LIBS"
6596  LIBS="-lgd  $LIBS"
6597  cat > conftest.$ac_ext <<EOF
6598 -#line 39465 "configure"
6599 +#line 39769 "configure"
6600  #include "confdefs.h"
6601  /* Override any gcc2 internal prototype to avoid an error.  */
6602  /* We use char because int might match the return type of a gcc2
6603 @@ -39472,7 +39776,7 @@
6604  gdImageString16()
6605  ; return 0; }
6606  EOF
6607 -if { (eval echo configure:39476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6608 +if { (eval echo configure:39780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6609    rm -rf conftest*
6610    eval "ac_cv_lib_$ac_lib_var=yes"
6611  else
6612 @@ -39601,7 +39905,7 @@
6613    done
6614  
6615    echo $ac_n "checking for gdImagePaletteCopy in -lgd""... $ac_c" 1>&6
6616 -echo "configure:39605: checking for gdImagePaletteCopy in -lgd" >&5
6617 +echo "configure:39909: checking for gdImagePaletteCopy in -lgd" >&5
6618  ac_lib_var=`echo gd'_'gdImagePaletteCopy | sed 'y%./+-%__p_%'`
6619  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6620    echo $ac_n "(cached) $ac_c" 1>&6
6621 @@ -39609,7 +39913,7 @@
6622    ac_save_LIBS="$LIBS"
6623  LIBS="-lgd  $LIBS"
6624  cat > conftest.$ac_ext <<EOF
6625 -#line 39613 "configure"
6626 +#line 39917 "configure"
6627  #include "confdefs.h"
6628  /* Override any gcc2 internal prototype to avoid an error.  */
6629  /* We use char because int might match the return type of a gcc2
6630 @@ -39620,7 +39924,7 @@
6631  gdImagePaletteCopy()
6632  ; return 0; }
6633  EOF
6634 -if { (eval echo configure:39624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6635 +if { (eval echo configure:39928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6636    rm -rf conftest*
6637    eval "ac_cv_lib_$ac_lib_var=yes"
6638  else
6639 @@ -39749,7 +40053,7 @@
6640    done
6641  
6642    echo $ac_n "checking for gdImageCreateFromPng in -lgd""... $ac_c" 1>&6
6643 -echo "configure:39753: checking for gdImageCreateFromPng in -lgd" >&5
6644 +echo "configure:40057: checking for gdImageCreateFromPng in -lgd" >&5
6645  ac_lib_var=`echo gd'_'gdImageCreateFromPng | sed 'y%./+-%__p_%'`
6646  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6647    echo $ac_n "(cached) $ac_c" 1>&6
6648 @@ -39757,7 +40061,7 @@
6649    ac_save_LIBS="$LIBS"
6650  LIBS="-lgd  $LIBS"
6651  cat > conftest.$ac_ext <<EOF
6652 -#line 39761 "configure"
6653 +#line 40065 "configure"
6654  #include "confdefs.h"
6655  /* Override any gcc2 internal prototype to avoid an error.  */
6656  /* We use char because int might match the return type of a gcc2
6657 @@ -39768,7 +40072,7 @@
6658  gdImageCreateFromPng()
6659  ; return 0; }
6660  EOF
6661 -if { (eval echo configure:39772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6662 +if { (eval echo configure:40076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6663    rm -rf conftest*
6664    eval "ac_cv_lib_$ac_lib_var=yes"
6665  else
6666 @@ -39897,7 +40201,7 @@
6667    done
6668  
6669    echo $ac_n "checking for gdImageCreateFromGif in -lgd""... $ac_c" 1>&6
6670 -echo "configure:39901: checking for gdImageCreateFromGif in -lgd" >&5
6671 +echo "configure:40205: checking for gdImageCreateFromGif in -lgd" >&5
6672  ac_lib_var=`echo gd'_'gdImageCreateFromGif | sed 'y%./+-%__p_%'`
6673  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6674    echo $ac_n "(cached) $ac_c" 1>&6
6675 @@ -39905,7 +40209,7 @@
6676    ac_save_LIBS="$LIBS"
6677  LIBS="-lgd  $LIBS"
6678  cat > conftest.$ac_ext <<EOF
6679 -#line 39909 "configure"
6680 +#line 40213 "configure"
6681  #include "confdefs.h"
6682  /* Override any gcc2 internal prototype to avoid an error.  */
6683  /* We use char because int might match the return type of a gcc2
6684 @@ -39916,7 +40220,7 @@
6685  gdImageCreateFromGif()
6686  ; return 0; }
6687  EOF
6688 -if { (eval echo configure:39920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6689 +if { (eval echo configure:40224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6690    rm -rf conftest*
6691    eval "ac_cv_lib_$ac_lib_var=yes"
6692  else
6693 @@ -40045,7 +40349,7 @@
6694    done
6695  
6696    echo $ac_n "checking for gdImageGif in -lgd""... $ac_c" 1>&6
6697 -echo "configure:40049: checking for gdImageGif in -lgd" >&5
6698 +echo "configure:40353: checking for gdImageGif in -lgd" >&5
6699  ac_lib_var=`echo gd'_'gdImageGif | sed 'y%./+-%__p_%'`
6700  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6701    echo $ac_n "(cached) $ac_c" 1>&6
6702 @@ -40053,7 +40357,7 @@
6703    ac_save_LIBS="$LIBS"
6704  LIBS="-lgd  $LIBS"
6705  cat > conftest.$ac_ext <<EOF
6706 -#line 40057 "configure"
6707 +#line 40361 "configure"
6708  #include "confdefs.h"
6709  /* Override any gcc2 internal prototype to avoid an error.  */
6710  /* We use char because int might match the return type of a gcc2
6711 @@ -40064,7 +40368,7 @@
6712  gdImageGif()
6713  ; return 0; }
6714  EOF
6715 -if { (eval echo configure:40068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6716 +if { (eval echo configure:40372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6717    rm -rf conftest*
6718    eval "ac_cv_lib_$ac_lib_var=yes"
6719  else
6720 @@ -40193,7 +40497,7 @@
6721    done
6722  
6723    echo $ac_n "checking for gdImageWBMP in -lgd""... $ac_c" 1>&6
6724 -echo "configure:40197: checking for gdImageWBMP in -lgd" >&5
6725 +echo "configure:40501: checking for gdImageWBMP in -lgd" >&5
6726  ac_lib_var=`echo gd'_'gdImageWBMP | sed 'y%./+-%__p_%'`
6727  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6728    echo $ac_n "(cached) $ac_c" 1>&6
6729 @@ -40201,7 +40505,7 @@
6730    ac_save_LIBS="$LIBS"
6731  LIBS="-lgd  $LIBS"
6732  cat > conftest.$ac_ext <<EOF
6733 -#line 40205 "configure"
6734 +#line 40509 "configure"
6735  #include "confdefs.h"
6736  /* Override any gcc2 internal prototype to avoid an error.  */
6737  /* We use char because int might match the return type of a gcc2
6738 @@ -40212,7 +40516,7 @@
6739  gdImageWBMP()
6740  ; return 0; }
6741  EOF
6742 -if { (eval echo configure:40216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6743 +if { (eval echo configure:40520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6744    rm -rf conftest*
6745    eval "ac_cv_lib_$ac_lib_var=yes"
6746  else
6747 @@ -40341,7 +40645,7 @@
6748    done
6749  
6750    echo $ac_n "checking for gdImageCreateFromJpeg in -lgd""... $ac_c" 1>&6
6751 -echo "configure:40345: checking for gdImageCreateFromJpeg in -lgd" >&5
6752 +echo "configure:40649: checking for gdImageCreateFromJpeg in -lgd" >&5
6753  ac_lib_var=`echo gd'_'gdImageCreateFromJpeg | sed 'y%./+-%__p_%'`
6754  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6755    echo $ac_n "(cached) $ac_c" 1>&6
6756 @@ -40349,7 +40653,7 @@
6757    ac_save_LIBS="$LIBS"
6758  LIBS="-lgd  $LIBS"
6759  cat > conftest.$ac_ext <<EOF
6760 -#line 40353 "configure"
6761 +#line 40657 "configure"
6762  #include "confdefs.h"
6763  /* Override any gcc2 internal prototype to avoid an error.  */
6764  /* We use char because int might match the return type of a gcc2
6765 @@ -40360,7 +40664,7 @@
6766  gdImageCreateFromJpeg()
6767  ; return 0; }
6768  EOF
6769 -if { (eval echo configure:40364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6770 +if { (eval echo configure:40668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6771    rm -rf conftest*
6772    eval "ac_cv_lib_$ac_lib_var=yes"
6773  else
6774 @@ -40489,7 +40793,7 @@
6775    done
6776  
6777    echo $ac_n "checking for gdImageCreateFromXpm in -lgd""... $ac_c" 1>&6
6778 -echo "configure:40493: checking for gdImageCreateFromXpm in -lgd" >&5
6779 +echo "configure:40797: checking for gdImageCreateFromXpm in -lgd" >&5
6780  ac_lib_var=`echo gd'_'gdImageCreateFromXpm | sed 'y%./+-%__p_%'`
6781  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6782    echo $ac_n "(cached) $ac_c" 1>&6
6783 @@ -40497,7 +40801,7 @@
6784    ac_save_LIBS="$LIBS"
6785  LIBS="-lgd  $LIBS"
6786  cat > conftest.$ac_ext <<EOF
6787 -#line 40501 "configure"
6788 +#line 40805 "configure"
6789  #include "confdefs.h"
6790  /* Override any gcc2 internal prototype to avoid an error.  */
6791  /* We use char because int might match the return type of a gcc2
6792 @@ -40508,7 +40812,7 @@
6793  gdImageCreateFromXpm()
6794  ; return 0; }
6795  EOF
6796 -if { (eval echo configure:40512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6797 +if { (eval echo configure:40816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6798    rm -rf conftest*
6799    eval "ac_cv_lib_$ac_lib_var=yes"
6800  else
6801 @@ -40637,7 +40941,7 @@
6802    done
6803  
6804    echo $ac_n "checking for gdImageCreateFromGd2 in -lgd""... $ac_c" 1>&6
6805 -echo "configure:40641: checking for gdImageCreateFromGd2 in -lgd" >&5
6806 +echo "configure:40945: checking for gdImageCreateFromGd2 in -lgd" >&5
6807  ac_lib_var=`echo gd'_'gdImageCreateFromGd2 | sed 'y%./+-%__p_%'`
6808  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6809    echo $ac_n "(cached) $ac_c" 1>&6
6810 @@ -40645,7 +40949,7 @@
6811    ac_save_LIBS="$LIBS"
6812  LIBS="-lgd  $LIBS"
6813  cat > conftest.$ac_ext <<EOF
6814 -#line 40649 "configure"
6815 +#line 40953 "configure"
6816  #include "confdefs.h"
6817  /* Override any gcc2 internal prototype to avoid an error.  */
6818  /* We use char because int might match the return type of a gcc2
6819 @@ -40656,7 +40960,7 @@
6820  gdImageCreateFromGd2()
6821  ; return 0; }
6822  EOF
6823 -if { (eval echo configure:40660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6824 +if { (eval echo configure:40964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6825    rm -rf conftest*
6826    eval "ac_cv_lib_$ac_lib_var=yes"
6827  else
6828 @@ -40785,7 +41089,7 @@
6829    done
6830  
6831    echo $ac_n "checking for gdImageCreateTrueColor in -lgd""... $ac_c" 1>&6
6832 -echo "configure:40789: checking for gdImageCreateTrueColor in -lgd" >&5
6833 +echo "configure:41093: checking for gdImageCreateTrueColor in -lgd" >&5
6834  ac_lib_var=`echo gd'_'gdImageCreateTrueColor | sed 'y%./+-%__p_%'`
6835  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6836    echo $ac_n "(cached) $ac_c" 1>&6
6837 @@ -40793,7 +41097,7 @@
6838    ac_save_LIBS="$LIBS"
6839  LIBS="-lgd  $LIBS"
6840  cat > conftest.$ac_ext <<EOF
6841 -#line 40797 "configure"
6842 +#line 41101 "configure"
6843  #include "confdefs.h"
6844  /* Override any gcc2 internal prototype to avoid an error.  */
6845  /* We use char because int might match the return type of a gcc2
6846 @@ -40804,7 +41108,7 @@
6847  gdImageCreateTrueColor()
6848  ; return 0; }
6849  EOF
6850 -if { (eval echo configure:40808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6851 +if { (eval echo configure:41112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6852    rm -rf conftest*
6853    eval "ac_cv_lib_$ac_lib_var=yes"
6854  else
6855 @@ -40933,7 +41237,7 @@
6856    done
6857  
6858    echo $ac_n "checking for gdImageSetTile in -lgd""... $ac_c" 1>&6
6859 -echo "configure:40937: checking for gdImageSetTile in -lgd" >&5
6860 +echo "configure:41241: checking for gdImageSetTile in -lgd" >&5
6861  ac_lib_var=`echo gd'_'gdImageSetTile | sed 'y%./+-%__p_%'`
6862  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6863    echo $ac_n "(cached) $ac_c" 1>&6
6864 @@ -40941,7 +41245,7 @@
6865    ac_save_LIBS="$LIBS"
6866  LIBS="-lgd  $LIBS"
6867  cat > conftest.$ac_ext <<EOF
6868 -#line 40945 "configure"
6869 +#line 41249 "configure"
6870  #include "confdefs.h"
6871  /* Override any gcc2 internal prototype to avoid an error.  */
6872  /* We use char because int might match the return type of a gcc2
6873 @@ -40952,7 +41256,7 @@
6874  gdImageSetTile()
6875  ; return 0; }
6876  EOF
6877 -if { (eval echo configure:40956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6878 +if { (eval echo configure:41260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6879    rm -rf conftest*
6880    eval "ac_cv_lib_$ac_lib_var=yes"
6881  else
6882 @@ -41081,7 +41385,7 @@
6883    done
6884  
6885    echo $ac_n "checking for gdImageEllipse in -lgd""... $ac_c" 1>&6
6886 -echo "configure:41085: checking for gdImageEllipse in -lgd" >&5
6887 +echo "configure:41389: checking for gdImageEllipse in -lgd" >&5
6888  ac_lib_var=`echo gd'_'gdImageEllipse | sed 'y%./+-%__p_%'`
6889  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6890    echo $ac_n "(cached) $ac_c" 1>&6
6891 @@ -41089,7 +41393,7 @@
6892    ac_save_LIBS="$LIBS"
6893  LIBS="-lgd  $LIBS"
6894  cat > conftest.$ac_ext <<EOF
6895 -#line 41093 "configure"
6896 +#line 41397 "configure"
6897  #include "confdefs.h"
6898  /* Override any gcc2 internal prototype to avoid an error.  */
6899  /* We use char because int might match the return type of a gcc2
6900 @@ -41100,7 +41404,7 @@
6901  gdImageEllipse()
6902  ; return 0; }
6903  EOF
6904 -if { (eval echo configure:41104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6905 +if { (eval echo configure:41408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6906    rm -rf conftest*
6907    eval "ac_cv_lib_$ac_lib_var=yes"
6908  else
6909 @@ -41229,7 +41533,7 @@
6910    done
6911  
6912    echo $ac_n "checking for gdImageSetBrush in -lgd""... $ac_c" 1>&6
6913 -echo "configure:41233: checking for gdImageSetBrush in -lgd" >&5
6914 +echo "configure:41537: checking for gdImageSetBrush in -lgd" >&5
6915  ac_lib_var=`echo gd'_'gdImageSetBrush | sed 'y%./+-%__p_%'`
6916  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6917    echo $ac_n "(cached) $ac_c" 1>&6
6918 @@ -41237,7 +41541,7 @@
6919    ac_save_LIBS="$LIBS"
6920  LIBS="-lgd  $LIBS"
6921  cat > conftest.$ac_ext <<EOF
6922 -#line 41241 "configure"
6923 +#line 41545 "configure"
6924  #include "confdefs.h"
6925  /* Override any gcc2 internal prototype to avoid an error.  */
6926  /* We use char because int might match the return type of a gcc2
6927 @@ -41248,7 +41552,7 @@
6928  gdImageSetBrush()
6929  ; return 0; }
6930  EOF
6931 -if { (eval echo configure:41252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6932 +if { (eval echo configure:41556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6933    rm -rf conftest*
6934    eval "ac_cv_lib_$ac_lib_var=yes"
6935  else
6936 @@ -41377,7 +41681,7 @@
6937    done
6938  
6939    echo $ac_n "checking for gdImageStringTTF in -lgd""... $ac_c" 1>&6
6940 -echo "configure:41381: checking for gdImageStringTTF in -lgd" >&5
6941 +echo "configure:41685: checking for gdImageStringTTF in -lgd" >&5
6942  ac_lib_var=`echo gd'_'gdImageStringTTF | sed 'y%./+-%__p_%'`
6943  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6944    echo $ac_n "(cached) $ac_c" 1>&6
6945 @@ -41385,7 +41689,7 @@
6946    ac_save_LIBS="$LIBS"
6947  LIBS="-lgd  $LIBS"
6948  cat > conftest.$ac_ext <<EOF
6949 -#line 41389 "configure"
6950 +#line 41693 "configure"
6951  #include "confdefs.h"
6952  /* Override any gcc2 internal prototype to avoid an error.  */
6953  /* We use char because int might match the return type of a gcc2
6954 @@ -41396,7 +41700,7 @@
6955  gdImageStringTTF()
6956  ; return 0; }
6957  EOF
6958 -if { (eval echo configure:41400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6959 +if { (eval echo configure:41704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6960    rm -rf conftest*
6961    eval "ac_cv_lib_$ac_lib_var=yes"
6962  else
6963 @@ -41525,7 +41829,7 @@
6964    done
6965  
6966    echo $ac_n "checking for gdImageStringFT in -lgd""... $ac_c" 1>&6
6967 -echo "configure:41529: checking for gdImageStringFT in -lgd" >&5
6968 +echo "configure:41833: checking for gdImageStringFT in -lgd" >&5
6969  ac_lib_var=`echo gd'_'gdImageStringFT | sed 'y%./+-%__p_%'`
6970  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6971    echo $ac_n "(cached) $ac_c" 1>&6
6972 @@ -41533,7 +41837,7 @@
6973    ac_save_LIBS="$LIBS"
6974  LIBS="-lgd  $LIBS"
6975  cat > conftest.$ac_ext <<EOF
6976 -#line 41537 "configure"
6977 +#line 41841 "configure"
6978  #include "confdefs.h"
6979  /* Override any gcc2 internal prototype to avoid an error.  */
6980  /* We use char because int might match the return type of a gcc2
6981 @@ -41544,7 +41848,7 @@
6982  gdImageStringFT()
6983  ; return 0; }
6984  EOF
6985 -if { (eval echo configure:41548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6986 +if { (eval echo configure:41852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6987    rm -rf conftest*
6988    eval "ac_cv_lib_$ac_lib_var=yes"
6989  else
6990 @@ -41673,7 +41977,7 @@
6991    done
6992  
6993    echo $ac_n "checking for gdImageStringFTEx in -lgd""... $ac_c" 1>&6
6994 -echo "configure:41677: checking for gdImageStringFTEx in -lgd" >&5
6995 +echo "configure:41981: checking for gdImageStringFTEx in -lgd" >&5
6996  ac_lib_var=`echo gd'_'gdImageStringFTEx | sed 'y%./+-%__p_%'`
6997  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6998    echo $ac_n "(cached) $ac_c" 1>&6
6999 @@ -41681,7 +41985,7 @@
7000    ac_save_LIBS="$LIBS"
7001  LIBS="-lgd  $LIBS"
7002  cat > conftest.$ac_ext <<EOF
7003 -#line 41685 "configure"
7004 +#line 41989 "configure"
7005  #include "confdefs.h"
7006  /* Override any gcc2 internal prototype to avoid an error.  */
7007  /* We use char because int might match the return type of a gcc2
7008 @@ -41692,7 +41996,7 @@
7009  gdImageStringFTEx()
7010  ; return 0; }
7011  EOF
7012 -if { (eval echo configure:41696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7013 +if { (eval echo configure:42000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7014    rm -rf conftest*
7015    eval "ac_cv_lib_$ac_lib_var=yes"
7016  else
7017 @@ -41821,7 +42125,7 @@
7018    done
7019  
7020    echo $ac_n "checking for gdImageColorClosestHWB in -lgd""... $ac_c" 1>&6
7021 -echo "configure:41825: checking for gdImageColorClosestHWB in -lgd" >&5
7022 +echo "configure:42129: checking for gdImageColorClosestHWB in -lgd" >&5
7023  ac_lib_var=`echo gd'_'gdImageColorClosestHWB | sed 'y%./+-%__p_%'`
7024  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7025    echo $ac_n "(cached) $ac_c" 1>&6
7026 @@ -41829,7 +42133,7 @@
7027    ac_save_LIBS="$LIBS"
7028  LIBS="-lgd  $LIBS"
7029  cat > conftest.$ac_ext <<EOF
7030 -#line 41833 "configure"
7031 +#line 42137 "configure"
7032  #include "confdefs.h"
7033  /* Override any gcc2 internal prototype to avoid an error.  */
7034  /* We use char because int might match the return type of a gcc2
7035 @@ -41840,7 +42144,7 @@
7036  gdImageColorClosestHWB()
7037  ; return 0; }
7038  EOF
7039 -if { (eval echo configure:41844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7040 +if { (eval echo configure:42148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7041    rm -rf conftest*
7042    eval "ac_cv_lib_$ac_lib_var=yes"
7043  else
7044 @@ -41969,7 +42273,7 @@
7045    done
7046  
7047    echo $ac_n "checking for gdImageColorResolve in -lgd""... $ac_c" 1>&6
7048 -echo "configure:41973: checking for gdImageColorResolve in -lgd" >&5
7049 +echo "configure:42277: checking for gdImageColorResolve in -lgd" >&5
7050  ac_lib_var=`echo gd'_'gdImageColorResolve | sed 'y%./+-%__p_%'`
7051  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7052    echo $ac_n "(cached) $ac_c" 1>&6
7053 @@ -41977,7 +42281,7 @@
7054    ac_save_LIBS="$LIBS"
7055  LIBS="-lgd  $LIBS"
7056  cat > conftest.$ac_ext <<EOF
7057 -#line 41981 "configure"
7058 +#line 42285 "configure"
7059  #include "confdefs.h"
7060  /* Override any gcc2 internal prototype to avoid an error.  */
7061  /* We use char because int might match the return type of a gcc2
7062 @@ -41988,7 +42292,7 @@
7063  gdImageColorResolve()
7064  ; return 0; }
7065  EOF
7066 -if { (eval echo configure:41992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7067 +if { (eval echo configure:42296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7068    rm -rf conftest*
7069    eval "ac_cv_lib_$ac_lib_var=yes"
7070  else
7071 @@ -42117,7 +42421,7 @@
7072    done
7073  
7074    echo $ac_n "checking for gdImageGifCtx in -lgd""... $ac_c" 1>&6
7075 -echo "configure:42121: checking for gdImageGifCtx in -lgd" >&5
7076 +echo "configure:42425: checking for gdImageGifCtx in -lgd" >&5
7077  ac_lib_var=`echo gd'_'gdImageGifCtx | sed 'y%./+-%__p_%'`
7078  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7079    echo $ac_n "(cached) $ac_c" 1>&6
7080 @@ -42125,7 +42429,7 @@
7081    ac_save_LIBS="$LIBS"
7082  LIBS="-lgd  $LIBS"
7083  cat > conftest.$ac_ext <<EOF
7084 -#line 42129 "configure"
7085 +#line 42433 "configure"
7086  #include "confdefs.h"
7087  /* Override any gcc2 internal prototype to avoid an error.  */
7088  /* We use char because int might match the return type of a gcc2
7089 @@ -42136,7 +42440,7 @@
7090  gdImageGifCtx()
7091  ; return 0; }
7092  EOF
7093 -if { (eval echo configure:42140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7094 +if { (eval echo configure:42444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7095    rm -rf conftest*
7096    eval "ac_cv_lib_$ac_lib_var=yes"
7097  else
7098 @@ -42265,7 +42569,7 @@
7099    done
7100  
7101    echo $ac_n "checking for gdCacheCreate in -lgd""... $ac_c" 1>&6
7102 -echo "configure:42269: checking for gdCacheCreate in -lgd" >&5
7103 +echo "configure:42573: checking for gdCacheCreate in -lgd" >&5
7104  ac_lib_var=`echo gd'_'gdCacheCreate | sed 'y%./+-%__p_%'`
7105  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7106    echo $ac_n "(cached) $ac_c" 1>&6
7107 @@ -42273,7 +42577,7 @@
7108    ac_save_LIBS="$LIBS"
7109  LIBS="-lgd  $LIBS"
7110  cat > conftest.$ac_ext <<EOF
7111 -#line 42277 "configure"
7112 +#line 42581 "configure"
7113  #include "confdefs.h"
7114  /* Override any gcc2 internal prototype to avoid an error.  */
7115  /* We use char because int might match the return type of a gcc2
7116 @@ -42284,7 +42588,7 @@
7117  gdCacheCreate()
7118  ; return 0; }
7119  EOF
7120 -if { (eval echo configure:42288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7121 +if { (eval echo configure:42592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7122    rm -rf conftest*
7123    eval "ac_cv_lib_$ac_lib_var=yes"
7124  else
7125 @@ -42413,7 +42717,7 @@
7126    done
7127  
7128    echo $ac_n "checking for gdFontCacheShutdown in -lgd""... $ac_c" 1>&6
7129 -echo "configure:42417: checking for gdFontCacheShutdown in -lgd" >&5
7130 +echo "configure:42721: checking for gdFontCacheShutdown in -lgd" >&5
7131  ac_lib_var=`echo gd'_'gdFontCacheShutdown | sed 'y%./+-%__p_%'`
7132  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7133    echo $ac_n "(cached) $ac_c" 1>&6
7134 @@ -42421,7 +42725,7 @@
7135    ac_save_LIBS="$LIBS"
7136  LIBS="-lgd  $LIBS"
7137  cat > conftest.$ac_ext <<EOF
7138 -#line 42425 "configure"
7139 +#line 42729 "configure"
7140  #include "confdefs.h"
7141  /* Override any gcc2 internal prototype to avoid an error.  */
7142  /* We use char because int might match the return type of a gcc2
7143 @@ -42432,7 +42736,7 @@
7144  gdFontCacheShutdown()
7145  ; return 0; }
7146  EOF
7147 -if { (eval echo configure:42436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7148 +if { (eval echo configure:42740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7149    rm -rf conftest*
7150    eval "ac_cv_lib_$ac_lib_var=yes"
7151  else
7152 @@ -42561,7 +42865,7 @@
7153    done
7154  
7155    echo $ac_n "checking for gdFreeFontCache in -lgd""... $ac_c" 1>&6
7156 -echo "configure:42565: checking for gdFreeFontCache in -lgd" >&5
7157 +echo "configure:42869: checking for gdFreeFontCache in -lgd" >&5
7158  ac_lib_var=`echo gd'_'gdFreeFontCache | sed 'y%./+-%__p_%'`
7159  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7160    echo $ac_n "(cached) $ac_c" 1>&6
7161 @@ -42569,7 +42873,7 @@
7162    ac_save_LIBS="$LIBS"
7163  LIBS="-lgd  $LIBS"
7164  cat > conftest.$ac_ext <<EOF
7165 -#line 42573 "configure"
7166 +#line 42877 "configure"
7167  #include "confdefs.h"
7168  /* Override any gcc2 internal prototype to avoid an error.  */
7169  /* We use char because int might match the return type of a gcc2
7170 @@ -42580,7 +42884,7 @@
7171  gdFreeFontCache()
7172  ; return 0; }
7173  EOF
7174 -if { (eval echo configure:42584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7175 +if { (eval echo configure:42888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7176    rm -rf conftest*
7177    eval "ac_cv_lib_$ac_lib_var=yes"
7178  else
7179 @@ -42709,7 +43013,7 @@
7180    done
7181  
7182    echo $ac_n "checking for gdFontCacheMutexSetup in -lgd""... $ac_c" 1>&6
7183 -echo "configure:42713: checking for gdFontCacheMutexSetup in -lgd" >&5
7184 +echo "configure:43017: checking for gdFontCacheMutexSetup in -lgd" >&5
7185  ac_lib_var=`echo gd'_'gdFontCacheMutexSetup | sed 'y%./+-%__p_%'`
7186  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7187    echo $ac_n "(cached) $ac_c" 1>&6
7188 @@ -42717,7 +43021,7 @@
7189    ac_save_LIBS="$LIBS"
7190  LIBS="-lgd  $LIBS"
7191  cat > conftest.$ac_ext <<EOF
7192 -#line 42721 "configure"
7193 +#line 43025 "configure"
7194  #include "confdefs.h"
7195  /* Override any gcc2 internal prototype to avoid an error.  */
7196  /* We use char because int might match the return type of a gcc2
7197 @@ -42728,7 +43032,7 @@
7198  gdFontCacheMutexSetup()
7199  ; return 0; }
7200  EOF
7201 -if { (eval echo configure:42732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7202 +if { (eval echo configure:43036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7203    rm -rf conftest*
7204    eval "ac_cv_lib_$ac_lib_var=yes"
7205  else
7206 @@ -42857,7 +43161,7 @@
7207    done
7208  
7209    echo $ac_n "checking for gdNewDynamicCtxEx in -lgd""... $ac_c" 1>&6
7210 -echo "configure:42861: checking for gdNewDynamicCtxEx in -lgd" >&5
7211 +echo "configure:43165: checking for gdNewDynamicCtxEx in -lgd" >&5
7212  ac_lib_var=`echo gd'_'gdNewDynamicCtxEx | sed 'y%./+-%__p_%'`
7213  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7214    echo $ac_n "(cached) $ac_c" 1>&6
7215 @@ -42865,7 +43169,7 @@
7216    ac_save_LIBS="$LIBS"
7217  LIBS="-lgd  $LIBS"
7218  cat > conftest.$ac_ext <<EOF
7219 -#line 42869 "configure"
7220 +#line 43173 "configure"
7221  #include "confdefs.h"
7222  /* Override any gcc2 internal prototype to avoid an error.  */
7223  /* We use char because int might match the return type of a gcc2
7224 @@ -42876,7 +43180,7 @@
7225  gdNewDynamicCtxEx()
7226  ; return 0; }
7227  EOF
7228 -if { (eval echo configure:42880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7229 +if { (eval echo configure:43184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7230    rm -rf conftest*
7231    eval "ac_cv_lib_$ac_lib_var=yes"
7232  else
7233 @@ -42931,7 +43235,7 @@
7234          old_CPPFLAGS=$CPPFLAGS
7235    CPPFLAGS=-I$GD_INCLUDE
7236    cat > conftest.$ac_ext <<EOF
7237 -#line 42935 "configure"
7238 +#line 43239 "configure"
7239  #include "confdefs.h"
7240  
7241  #include <gd.h>
7242 @@ -42945,7 +43249,7 @@
7243    
7244  ; return 0; }
7245  EOF
7246 -if { (eval echo configure:42949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7247 +if { (eval echo configure:43253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7248    rm -rf conftest*
7249    
7250      cat >> confdefs.h <<\EOF
7251 @@ -43264,7 +43568,7 @@
7252    
7253  else
7254    cat > conftest.$ac_ext <<EOF
7255 -#line 43268 "configure"
7256 +#line 43572 "configure"
7257  #include "confdefs.h"
7258  
7259      char foobar () {}
7260 @@ -43275,7 +43579,7 @@
7261      }
7262    
7263  EOF
7264 -if { (eval echo configure:43279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7265 +if { (eval echo configure:43583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7266  then
7267    
7268      LIBS=$old_LIBS
7269 @@ -43427,7 +43731,7 @@
7270    done
7271  
7272    echo $ac_n "checking for gdImageCreate in -lgd""... $ac_c" 1>&6
7273 -echo "configure:43431: checking for gdImageCreate in -lgd" >&5
7274 +echo "configure:43735: checking for gdImageCreate in -lgd" >&5
7275  ac_lib_var=`echo gd'_'gdImageCreate | sed 'y%./+-%__p_%'`
7276  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7277    echo $ac_n "(cached) $ac_c" 1>&6
7278 @@ -43435,7 +43739,7 @@
7279    ac_save_LIBS="$LIBS"
7280  LIBS="-lgd  $LIBS"
7281  cat > conftest.$ac_ext <<EOF
7282 -#line 43439 "configure"
7283 +#line 43743 "configure"
7284  #include "confdefs.h"
7285  /* Override any gcc2 internal prototype to avoid an error.  */
7286  /* We use char because int might match the return type of a gcc2
7287 @@ -43446,7 +43750,7 @@
7288  gdImageCreate()
7289  ; return 0; }
7290  EOF
7291 -if { (eval echo configure:43450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7292 +if { (eval echo configure:43754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7293    rm -rf conftest*
7294    eval "ac_cv_lib_$ac_lib_var=yes"
7295  else
7296 @@ -43511,7 +43815,7 @@
7297  php_with_gettext=no
7298  
7299  echo $ac_n "checking for GNU gettext support""... $ac_c" 1>&6
7300 -echo "configure:43515: checking for GNU gettext support" >&5
7301 +echo "configure:43819: checking for GNU gettext support" >&5
7302  # Check whether --with-gettext or --without-gettext was given.
7303  if test "${with_gettext+set}" = set; then
7304    withval="$with_gettext"
7305 @@ -43569,7 +43873,7 @@
7306    O_LDFLAGS=$LDFLAGS
7307    LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR"
7308    echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
7309 -echo "configure:43573: checking for bindtextdomain in -lintl" >&5
7310 +echo "configure:43877: checking for bindtextdomain in -lintl" >&5
7311  ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
7312  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7313    echo $ac_n "(cached) $ac_c" 1>&6
7314 @@ -43577,7 +43881,7 @@
7315    ac_save_LIBS="$LIBS"
7316  LIBS="-lintl  $LIBS"
7317  cat > conftest.$ac_ext <<EOF
7318 -#line 43581 "configure"
7319 +#line 43885 "configure"
7320  #include "confdefs.h"
7321  /* Override any gcc2 internal prototype to avoid an error.  */
7322  /* We use char because int might match the return type of a gcc2
7323 @@ -43588,7 +43892,7 @@
7324  bindtextdomain()
7325  ; return 0; }
7326  EOF
7327 -if { (eval echo configure:43592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7328 +if { (eval echo configure:43896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7329    rm -rf conftest*
7330    eval "ac_cv_lib_$ac_lib_var=yes"
7331  else
7332 @@ -43610,7 +43914,7 @@
7333  else
7334    echo "$ac_t""no" 1>&6
7335  echo $ac_n "checking for bindtextdomain in -lc""... $ac_c" 1>&6
7336 -echo "configure:43614: checking for bindtextdomain in -lc" >&5
7337 +echo "configure:43918: checking for bindtextdomain in -lc" >&5
7338  ac_lib_var=`echo c'_'bindtextdomain | sed 'y%./+-%__p_%'`
7339  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7340    echo $ac_n "(cached) $ac_c" 1>&6
7341 @@ -43618,7 +43922,7 @@
7342    ac_save_LIBS="$LIBS"
7343  LIBS="-lc  $LIBS"
7344  cat > conftest.$ac_ext <<EOF
7345 -#line 43622 "configure"
7346 +#line 43926 "configure"
7347  #include "confdefs.h"
7348  /* Override any gcc2 internal prototype to avoid an error.  */
7349  /* We use char because int might match the return type of a gcc2
7350 @@ -43629,7 +43933,7 @@
7351  bindtextdomain()
7352  ; return 0; }
7353  EOF
7354 -if { (eval echo configure:43633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7355 +if { (eval echo configure:43937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7356    rm -rf conftest*
7357    eval "ac_cv_lib_$ac_lib_var=yes"
7358  else
7359 @@ -44082,7 +44386,7 @@
7360  
7361  
7362    echo $ac_n "checking for ngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6
7363 -echo "configure:44086: checking for ngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
7364 +echo "configure:44390: checking for ngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
7365  ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'ngettext | sed 'y%./+-%__p_%'`
7366  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7367    echo $ac_n "(cached) $ac_c" 1>&6
7368 @@ -44090,7 +44394,7 @@
7369    ac_save_LIBS="$LIBS"
7370  LIBS="-l$GETTEXT_CHECK_IN_LIB  $LIBS"
7371  cat > conftest.$ac_ext <<EOF
7372 -#line 44094 "configure"
7373 +#line 44398 "configure"
7374  #include "confdefs.h"
7375  /* Override any gcc2 internal prototype to avoid an error.  */
7376  /* We use char because int might match the return type of a gcc2
7377 @@ -44101,7 +44405,7 @@
7378  ngettext()
7379  ; return 0; }
7380  EOF
7381 -if { (eval echo configure:44105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7382 +if { (eval echo configure:44409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7383    rm -rf conftest*
7384    eval "ac_cv_lib_$ac_lib_var=yes"
7385  else
7386 @@ -44125,7 +44429,7 @@
7387  fi
7388  
7389    echo $ac_n "checking for dngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6
7390 -echo "configure:44129: checking for dngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
7391 +echo "configure:44433: checking for dngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
7392  ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'dngettext | sed 'y%./+-%__p_%'`
7393  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7394    echo $ac_n "(cached) $ac_c" 1>&6
7395 @@ -44133,7 +44437,7 @@
7396    ac_save_LIBS="$LIBS"
7397  LIBS="-l$GETTEXT_CHECK_IN_LIB  $LIBS"
7398  cat > conftest.$ac_ext <<EOF
7399 -#line 44137 "configure"
7400 +#line 44441 "configure"
7401  #include "confdefs.h"
7402  /* Override any gcc2 internal prototype to avoid an error.  */
7403  /* We use char because int might match the return type of a gcc2
7404 @@ -44144,7 +44448,7 @@
7405  dngettext()
7406  ; return 0; }
7407  EOF
7408 -if { (eval echo configure:44148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7409 +if { (eval echo configure:44452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7410    rm -rf conftest*
7411    eval "ac_cv_lib_$ac_lib_var=yes"
7412  else
7413 @@ -44168,7 +44472,7 @@
7414  fi
7415  
7416    echo $ac_n "checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6
7417 -echo "configure:44172: checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
7418 +echo "configure:44476: checking for dcngettext in -l$GETTEXT_CHECK_IN_LIB" >&5
7419  ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'dcngettext | sed 'y%./+-%__p_%'`
7420  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7421    echo $ac_n "(cached) $ac_c" 1>&6
7422 @@ -44176,7 +44480,7 @@
7423    ac_save_LIBS="$LIBS"
7424  LIBS="-l$GETTEXT_CHECK_IN_LIB  $LIBS"
7425  cat > conftest.$ac_ext <<EOF
7426 -#line 44180 "configure"
7427 +#line 44484 "configure"
7428  #include "confdefs.h"
7429  /* Override any gcc2 internal prototype to avoid an error.  */
7430  /* We use char because int might match the return type of a gcc2
7431 @@ -44187,7 +44491,7 @@
7432  dcngettext()
7433  ; return 0; }
7434  EOF
7435 -if { (eval echo configure:44191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7436 +if { (eval echo configure:44495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7437    rm -rf conftest*
7438    eval "ac_cv_lib_$ac_lib_var=yes"
7439  else
7440 @@ -44211,7 +44515,7 @@
7441  fi
7442  
7443    echo $ac_n "checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB""... $ac_c" 1>&6
7444 -echo "configure:44215: checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB" >&5
7445 +echo "configure:44519: checking for bind_textdomain_codeset in -l$GETTEXT_CHECK_IN_LIB" >&5
7446  ac_lib_var=`echo $GETTEXT_CHECK_IN_LIB'_'bind_textdomain_codeset | sed 'y%./+-%__p_%'`
7447  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7448    echo $ac_n "(cached) $ac_c" 1>&6
7449 @@ -44219,7 +44523,7 @@
7450    ac_save_LIBS="$LIBS"
7451  LIBS="-l$GETTEXT_CHECK_IN_LIB  $LIBS"
7452  cat > conftest.$ac_ext <<EOF
7453 -#line 44223 "configure"
7454 +#line 44527 "configure"
7455  #include "confdefs.h"
7456  /* Override any gcc2 internal prototype to avoid an error.  */
7457  /* We use char because int might match the return type of a gcc2
7458 @@ -44230,7 +44534,7 @@
7459  bind_textdomain_codeset()
7460  ; return 0; }
7461  EOF
7462 -if { (eval echo configure:44234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7463 +if { (eval echo configure:44538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7464    rm -rf conftest*
7465    eval "ac_cv_lib_$ac_lib_var=yes"
7466  else
7467 @@ -44261,7 +44565,7 @@
7468  php_with_gmp=no
7469  
7470  echo $ac_n "checking for GNU MP support""... $ac_c" 1>&6
7471 -echo "configure:44265: checking for GNU MP support" >&5
7472 +echo "configure:44569: checking for GNU MP support" >&5
7473  # Check whether --with-gmp or --without-gmp was given.
7474  if test "${with_gmp+set}" = set; then
7475    withval="$with_gmp"
7476 @@ -44412,7 +44716,7 @@
7477    done
7478  
7479    echo $ac_n "checking for __gmp_randinit_lc_2exp_size in -lgmp""... $ac_c" 1>&6
7480 -echo "configure:44416: checking for __gmp_randinit_lc_2exp_size in -lgmp" >&5
7481 +echo "configure:44720: checking for __gmp_randinit_lc_2exp_size in -lgmp" >&5
7482  ac_lib_var=`echo gmp'_'__gmp_randinit_lc_2exp_size | sed 'y%./+-%__p_%'`
7483  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7484    echo $ac_n "(cached) $ac_c" 1>&6
7485 @@ -44420,7 +44724,7 @@
7486    ac_save_LIBS="$LIBS"
7487  LIBS="-lgmp  $LIBS"
7488  cat > conftest.$ac_ext <<EOF
7489 -#line 44424 "configure"
7490 +#line 44728 "configure"
7491  #include "confdefs.h"
7492  /* Override any gcc2 internal prototype to avoid an error.  */
7493  /* We use char because int might match the return type of a gcc2
7494 @@ -44431,7 +44735,7 @@
7495  __gmp_randinit_lc_2exp_size()
7496  ; return 0; }
7497  EOF
7498 -if { (eval echo configure:44435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7499 +if { (eval echo configure:44739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7500    rm -rf conftest*
7501    eval "ac_cv_lib_$ac_lib_var=yes"
7502  else
7503 @@ -44556,7 +44860,7 @@
7504    done
7505  
7506    echo $ac_n "checking for gmp_randinit_lc_2exp_size in -lgmp""... $ac_c" 1>&6
7507 -echo "configure:44560: checking for gmp_randinit_lc_2exp_size in -lgmp" >&5
7508 +echo "configure:44864: checking for gmp_randinit_lc_2exp_size in -lgmp" >&5
7509  ac_lib_var=`echo gmp'_'gmp_randinit_lc_2exp_size | sed 'y%./+-%__p_%'`
7510  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7511    echo $ac_n "(cached) $ac_c" 1>&6
7512 @@ -44564,7 +44868,7 @@
7513    ac_save_LIBS="$LIBS"
7514  LIBS="-lgmp  $LIBS"
7515  cat > conftest.$ac_ext <<EOF
7516 -#line 44568 "configure"
7517 +#line 44872 "configure"
7518  #include "confdefs.h"
7519  /* Override any gcc2 internal prototype to avoid an error.  */
7520  /* We use char because int might match the return type of a gcc2
7521 @@ -44575,7 +44879,7 @@
7522  gmp_randinit_lc_2exp_size()
7523  ; return 0; }
7524  EOF
7525 -if { (eval echo configure:44579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7526 +if { (eval echo configure:44883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7527    rm -rf conftest*
7528    eval "ac_cv_lib_$ac_lib_var=yes"
7529  else
7530 @@ -45036,7 +45340,7 @@
7531  php_enable_hash=yes
7532  
7533  echo $ac_n "checking whether to enable hash support""... $ac_c" 1>&6
7534 -echo "configure:45040: checking whether to enable hash support" >&5
7535 +echo "configure:45344: checking whether to enable hash support" >&5
7536  # Check whether --enable-hash or --disable-hash was given.
7537  if test "${enable_hash+set}" = set; then
7538    enableval="$enable_hash"
7539 @@ -45086,7 +45390,7 @@
7540  
7541  
7542    echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
7543 -echo "configure:45090: checking whether byte ordering is bigendian" >&5
7544 +echo "configure:45394: checking whether byte ordering is bigendian" >&5
7545  if eval "test \"`echo '$''{'ac_cv_c_bigendian_php'+set}'`\" = set"; then
7546    echo $ac_n "(cached) $ac_c" 1>&6
7547  else
7548 @@ -45096,7 +45400,7 @@
7549    ac_cv_c_bigendian_php=unknown
7550  else
7551    cat > conftest.$ac_ext <<EOF
7552 -#line 45100 "configure"
7553 +#line 45404 "configure"
7554  #include "confdefs.h"
7555  
7556  int main(void)
7557 @@ -45112,7 +45416,7 @@
7558  }
7559    
7560  EOF
7561 -if { (eval echo configure:45116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7562 +if { (eval echo configure:45420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7563  then
7564    ac_cv_c_bigendian_php=yes
7565  else
7566 @@ -45137,7 +45441,7 @@
7567  
7568  
7569    echo $ac_n "checking size of short""... $ac_c" 1>&6
7570 -echo "configure:45141: checking size of short" >&5
7571 +echo "configure:45445: checking size of short" >&5
7572  if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
7573    echo $ac_n "(cached) $ac_c" 1>&6
7574  else
7575 @@ -45145,18 +45449,18 @@
7576    ac_cv_sizeof_short=2
7577  else
7578    cat > conftest.$ac_ext <<EOF
7579 -#line 45149 "configure"
7580 +#line 45453 "configure"
7581  #include "confdefs.h"
7582  #include <stdio.h>
7583 -int main()
7584 +main()
7585  {
7586    FILE *f=fopen("conftestval", "w");
7587 -  if (!f) return(1);
7588 +  if (!f) exit(1);
7589    fprintf(f, "%d\n", sizeof(short));
7590 -  return(0);
7591 +  exit(0);
7592  }
7593  EOF
7594 -if { (eval echo configure:45160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7595 +if { (eval echo configure:45464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7596  then
7597    ac_cv_sizeof_short=`cat conftestval`
7598  else
7599 @@ -45176,7 +45480,7 @@
7600  
7601  
7602    echo $ac_n "checking size of int""... $ac_c" 1>&6
7603 -echo "configure:45180: checking size of int" >&5
7604 +echo "configure:45484: checking size of int" >&5
7605  if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
7606    echo $ac_n "(cached) $ac_c" 1>&6
7607  else
7608 @@ -45184,18 +45488,18 @@
7609    ac_cv_sizeof_int=4
7610  else
7611    cat > conftest.$ac_ext <<EOF
7612 -#line 45188 "configure"
7613 +#line 45492 "configure"
7614  #include "confdefs.h"
7615  #include <stdio.h>
7616 -int main()
7617 +main()
7618  {
7619    FILE *f=fopen("conftestval", "w");
7620 -  if (!f) return(1);
7621 +  if (!f) exit(1);
7622    fprintf(f, "%d\n", sizeof(int));
7623 -  return(0);
7624 +  exit(0);
7625  }
7626  EOF
7627 -if { (eval echo configure:45199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7628 +if { (eval echo configure:45503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7629  then
7630    ac_cv_sizeof_int=`cat conftestval`
7631  else
7632 @@ -45215,7 +45519,7 @@
7633  
7634  
7635    echo $ac_n "checking size of long""... $ac_c" 1>&6
7636 -echo "configure:45219: checking size of long" >&5
7637 +echo "configure:45523: checking size of long" >&5
7638  if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
7639    echo $ac_n "(cached) $ac_c" 1>&6
7640  else
7641 @@ -45223,18 +45527,18 @@
7642    ac_cv_sizeof_long=4
7643  else
7644    cat > conftest.$ac_ext <<EOF
7645 -#line 45227 "configure"
7646 +#line 45531 "configure"
7647  #include "confdefs.h"
7648  #include <stdio.h>
7649 -int main()
7650 +main()
7651  {
7652    FILE *f=fopen("conftestval", "w");
7653 -  if (!f) return(1);
7654 +  if (!f) exit(1);
7655    fprintf(f, "%d\n", sizeof(long));
7656 -  return(0);
7657 +  exit(0);
7658  }
7659  EOF
7660 -if { (eval echo configure:45238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7661 +if { (eval echo configure:45542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7662  then
7663    ac_cv_sizeof_long=`cat conftestval`
7664  else
7665 @@ -45254,7 +45558,7 @@
7666  
7667  
7668    echo $ac_n "checking size of long long""... $ac_c" 1>&6
7669 -echo "configure:45258: checking size of long long" >&5
7670 +echo "configure:45562: checking size of long long" >&5
7671  if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
7672    echo $ac_n "(cached) $ac_c" 1>&6
7673  else
7674 @@ -45262,18 +45566,18 @@
7675    ac_cv_sizeof_long_long=8
7676  else
7677    cat > conftest.$ac_ext <<EOF
7678 -#line 45266 "configure"
7679 +#line 45570 "configure"
7680  #include "confdefs.h"
7681  #include <stdio.h>
7682 -int main()
7683 +main()
7684  {
7685    FILE *f=fopen("conftestval", "w");
7686 -  if (!f) return(1);
7687 +  if (!f) exit(1);
7688    fprintf(f, "%d\n", sizeof(long long));
7689 -  return(0);
7690 +  exit(0);
7691  }
7692  EOF
7693 -if { (eval echo configure:45277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7694 +if { (eval echo configure:45581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7695  then
7696    ac_cv_sizeof_long_long=`cat conftestval`
7697  else
7698 @@ -45610,7 +45914,7 @@
7699  php_with_iconv=yes
7700  
7701  echo $ac_n "checking for iconv support""... $ac_c" 1>&6
7702 -echo "configure:45614: checking for iconv support" >&5
7703 +echo "configure:45918: checking for iconv support" >&5
7704  # Check whether --with-iconv or --without-iconv was given.
7705  if test "${with_iconv+set}" = set; then
7706    withval="$with_iconv"
7707 @@ -45672,12 +45976,12 @@
7708  
7709          if test "$PHP_ICONV" = "yes"; then
7710      echo $ac_n "checking for iconv""... $ac_c" 1>&6
7711 -echo "configure:45676: checking for iconv" >&5
7712 +echo "configure:45980: checking for iconv" >&5
7713  if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then
7714    echo $ac_n "(cached) $ac_c" 1>&6
7715  else
7716    cat > conftest.$ac_ext <<EOF
7717 -#line 45681 "configure"
7718 +#line 45985 "configure"
7719  #include "confdefs.h"
7720  /* System header to define __stub macros and hopefully few prototypes,
7721      which can conflict with char iconv(); below.  */
7722 @@ -45700,7 +46004,7 @@
7723  
7724  ; return 0; }
7725  EOF
7726 -if { (eval echo configure:45704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7727 +if { (eval echo configure:46008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7728    rm -rf conftest*
7729    eval "ac_cv_func_iconv=yes"
7730  else
7731 @@ -45721,12 +46025,12 @@
7732    echo "$ac_t""no" 1>&6
7733  
7734        echo $ac_n "checking for libiconv""... $ac_c" 1>&6
7735 -echo "configure:45725: checking for libiconv" >&5
7736 +echo "configure:46029: checking for libiconv" >&5
7737  if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then
7738    echo $ac_n "(cached) $ac_c" 1>&6
7739  else
7740    cat > conftest.$ac_ext <<EOF
7741 -#line 45730 "configure"
7742 +#line 46034 "configure"
7743  #include "confdefs.h"
7744  /* System header to define __stub macros and hopefully few prototypes,
7745      which can conflict with char libiconv(); below.  */
7746 @@ -45749,7 +46053,7 @@
7747  
7748  ; return 0; }
7749  EOF
7750 -if { (eval echo configure:45753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7751 +if { (eval echo configure:46057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7752    rm -rf conftest*
7753    eval "ac_cv_func_libiconv=yes"
7754  else
7755 @@ -45905,7 +46209,7 @@
7756    done
7757  
7758    echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6
7759 -echo "configure:45909: checking for libiconv in -l$iconv_lib_name" >&5
7760 +echo "configure:46213: checking for libiconv in -l$iconv_lib_name" >&5
7761  ac_lib_var=`echo $iconv_lib_name'_'libiconv | sed 'y%./+-%__p_%'`
7762  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7763    echo $ac_n "(cached) $ac_c" 1>&6
7764 @@ -45913,7 +46217,7 @@
7765    ac_save_LIBS="$LIBS"
7766  LIBS="-l$iconv_lib_name  $LIBS"
7767  cat > conftest.$ac_ext <<EOF
7768 -#line 45917 "configure"
7769 +#line 46221 "configure"
7770  #include "confdefs.h"
7771  /* Override any gcc2 internal prototype to avoid an error.  */
7772  /* We use char because int might match the return type of a gcc2
7773 @@ -45924,7 +46228,7 @@
7774  libiconv()
7775  ; return 0; }
7776  EOF
7777 -if { (eval echo configure:45928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7778 +if { (eval echo configure:46232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7779    rm -rf conftest*
7780    eval "ac_cv_lib_$ac_lib_var=yes"
7781  else
7782 @@ -46058,7 +46362,7 @@
7783    done
7784  
7785    echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6
7786 -echo "configure:46062: checking for iconv in -l$iconv_lib_name" >&5
7787 +echo "configure:46366: checking for iconv in -l$iconv_lib_name" >&5
7788  ac_lib_var=`echo $iconv_lib_name'_'iconv | sed 'y%./+-%__p_%'`
7789  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7790    echo $ac_n "(cached) $ac_c" 1>&6
7791 @@ -46066,7 +46370,7 @@
7792    ac_save_LIBS="$LIBS"
7793  LIBS="-l$iconv_lib_name  $LIBS"
7794  cat > conftest.$ac_ext <<EOF
7795 -#line 46070 "configure"
7796 +#line 46374 "configure"
7797  #include "confdefs.h"
7798  /* Override any gcc2 internal prototype to avoid an error.  */
7799  /* We use char because int might match the return type of a gcc2
7800 @@ -46077,7 +46381,7 @@
7801  iconv()
7802  ; return 0; }
7803  EOF
7804 -if { (eval echo configure:46081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7805 +if { (eval echo configure:46385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7806    rm -rf conftest*
7807    eval "ac_cv_lib_$ac_lib_var=yes"
7808  else
7809 @@ -46288,16 +46592,16 @@
7810      fi 
7811  
7812      echo $ac_n "checking if iconv is glibc's""... $ac_c" 1>&6
7813 -echo "configure:46292: checking if iconv is glibc's" >&5
7814 +echo "configure:46596: checking if iconv is glibc's" >&5
7815      cat > conftest.$ac_ext <<EOF
7816 -#line 46294 "configure"
7817 +#line 46598 "configure"
7818  #include "confdefs.h"
7819  #include <gnu/libc-version.h>
7820  int main() {
7821  gnu_get_libc_version();
7822  ; return 0; }
7823  EOF
7824 -if { (eval echo configure:46301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7825 +if { (eval echo configure:46605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7826    rm -rf conftest*
7827    
7828        echo "$ac_t""yes" 1>&6
7829 @@ -46315,7 +46619,7 @@
7830  
7831      if test -z "$iconv_impl_name"; then
7832        echo $ac_n "checking if using GNU libiconv""... $ac_c" 1>&6
7833 -echo "configure:46319: checking if using GNU libiconv" >&5
7834 +echo "configure:46623: checking if using GNU libiconv" >&5
7835        php_iconv_old_ld="$LDFLAGS"
7836        LDFLAGS="-liconv $LDFLAGS"
7837        if test "$cross_compiling" = yes; then
7838 @@ -46325,7 +46629,7 @@
7839        
7840  else
7841    cat > conftest.$ac_ext <<EOF
7842 -#line 46329 "configure"
7843 +#line 46633 "configure"
7844  #include "confdefs.h"
7845  
7846  #include <$PHP_ICONV_H_PATH>
7847 @@ -46335,7 +46639,7 @@
7848  }
7849        
7850  EOF
7851 -if { (eval echo configure:46339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7852 +if { (eval echo configure:46643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7853  then
7854    
7855          echo "$ac_t""yes" 1>&6
7856 @@ -46357,16 +46661,16 @@
7857  
7858      if test -z "$iconv_impl_name"; then
7859        echo $ac_n "checking if iconv is Konstantin Chuguev's""... $ac_c" 1>&6
7860 -echo "configure:46361: checking if iconv is Konstantin Chuguev's" >&5
7861 +echo "configure:46665: checking if iconv is Konstantin Chuguev's" >&5
7862        cat > conftest.$ac_ext <<EOF
7863 -#line 46363 "configure"
7864 +#line 46667 "configure"
7865  #include "confdefs.h"
7866  #include <iconv.h>
7867  int main() {
7868  iconv_ccs_init(NULL, NULL);
7869  ; return 0; }
7870  EOF
7871 -if { (eval echo configure:46370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7872 +if { (eval echo configure:46674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7873    rm -rf conftest*
7874    
7875          echo "$ac_t""yes" 1>&6
7876 @@ -46534,7 +46838,7 @@
7877      esac
7878  
7879      echo $ac_n "checking if iconv supports errno""... $ac_c" 1>&6
7880 -echo "configure:46538: checking if iconv supports errno" >&5
7881 +echo "configure:46842: checking if iconv supports errno" >&5
7882      if test "$cross_compiling" = yes; then
7883    
7884        echo "$ac_t""no" 1>&6
7885 @@ -46548,7 +46852,7 @@
7886      
7887  else
7888    cat > conftest.$ac_ext <<EOF
7889 -#line 46552 "configure"
7890 +#line 46856 "configure"
7891  #include "confdefs.h"
7892  
7893  #include <$PHP_ICONV_H_PATH>
7894 @@ -46569,7 +46873,7 @@
7895  }
7896      
7897  EOF
7898 -if { (eval echo configure:46573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7899 +if { (eval echo configure:46877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7900  then
7901    
7902        echo "$ac_t""yes" 1>&6
7903 @@ -46601,9 +46905,9 @@
7904  
7905  
7906      echo $ac_n "checking if your cpp allows macro usage in include lines""... $ac_c" 1>&6
7907 -echo "configure:46605: checking if your cpp allows macro usage in include lines" >&5
7908 +echo "configure:46909: checking if your cpp allows macro usage in include lines" >&5
7909      cat > conftest.$ac_ext <<EOF
7910 -#line 46607 "configure"
7911 +#line 46911 "configure"
7912  #include "confdefs.h"
7913  
7914  #define FOO <$PHP_ICONV_H_PATH>
7915 @@ -46613,7 +46917,7 @@
7916  
7917  ; return 0; }
7918  EOF
7919 -if { (eval echo configure:46617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7920 +if { (eval echo configure:46921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7921    rm -rf conftest*
7922    
7923        echo "$ac_t""yes" 1>&6
7924 @@ -46958,7 +47262,7 @@
7925  php_with_imap=no
7926  
7927  echo $ac_n "checking for IMAP support""... $ac_c" 1>&6
7928 -echo "configure:46962: checking for IMAP support" >&5
7929 +echo "configure:47266: checking for IMAP support" >&5
7930  # Check whether --with-imap or --without-imap was given.
7931  if test "${with_imap+set}" = set; then
7932    withval="$with_imap"
7933 @@ -47005,7 +47309,7 @@
7934  php_with_kerberos=no
7935  
7936  echo $ac_n "checking for IMAP Kerberos support""... $ac_c" 1>&6
7937 -echo "configure:47009: checking for IMAP Kerberos support" >&5
7938 +echo "configure:47313: checking for IMAP Kerberos support" >&5
7939  # Check whether --with-kerberos or --without-kerberos was given.
7940  if test "${with_kerberos+set}" = set; then
7941    withval="$with_kerberos"
7942 @@ -47031,7 +47335,7 @@
7943  php_with_imap_ssl=no
7944  
7945  echo $ac_n "checking for IMAP SSL support""... $ac_c" 1>&6
7946 -echo "configure:47035: checking for IMAP SSL support" >&5
7947 +echo "configure:47339: checking for IMAP SSL support" >&5
7948  # Check whether --with-imap-ssl or --without-imap-ssl was given.
7949  if test "${with_imap_ssl+set}" = set; then
7950    withval="$with_imap_ssl"
7951 @@ -47427,7 +47731,7 @@
7952      done
7953  
7954          cat > conftest.$ac_ext <<EOF
7955 -#line 47431 "configure"
7956 +#line 47735 "configure"
7957  #include "confdefs.h"
7958  #include <$IMAP_INC_DIR/mail.h>
7959  EOF
7960 @@ -47447,12 +47751,12 @@
7961          old_CFLAGS=$CFLAGS
7962      CFLAGS="-I$IMAP_INC_DIR"
7963      echo $ac_n "checking for utf8_mime2text signature""... $ac_c" 1>&6
7964 -echo "configure:47451: checking for utf8_mime2text signature" >&5
7965 +echo "configure:47755: checking for utf8_mime2text signature" >&5
7966  if eval "test \"`echo '$''{'ac_cv_utf8_mime2text'+set}'`\" = set"; then
7967    echo $ac_n "(cached) $ac_c" 1>&6
7968  else
7969    cat > conftest.$ac_ext <<EOF
7970 -#line 47456 "configure"
7971 +#line 47760 "configure"
7972  #include "confdefs.h"
7973  
7974  #include <stdio.h>
7975 @@ -47465,7 +47769,7 @@
7976        
7977  ; return 0; }
7978  EOF
7979 -if { (eval echo configure:47469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7980 +if { (eval echo configure:47773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7981    rm -rf conftest*
7982    
7983          ac_cv_utf8_mime2text=old
7984 @@ -47494,12 +47798,12 @@
7985      old_CFLAGS=$CFLAGS
7986      CFLAGS="-I$IMAP_INC_DIR"
7987      echo $ac_n "checking for U8T_CANONICAL""... $ac_c" 1>&6
7988 -echo "configure:47498: checking for U8T_CANONICAL" >&5
7989 +echo "configure:47802: checking for U8T_CANONICAL" >&5
7990  if eval "test \"`echo '$''{'ac_cv_u8t_canonical'+set}'`\" = set"; then
7991    echo $ac_n "(cached) $ac_c" 1>&6
7992  else
7993    cat > conftest.$ac_ext <<EOF
7994 -#line 47503 "configure"
7995 +#line 47807 "configure"
7996  #include "confdefs.h"
7997  
7998  #include <c-client.h>
7999 @@ -47510,7 +47814,7 @@
8000        
8001  ; return 0; }
8002  EOF
8003 -if { (eval echo configure:47514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8004 +if { (eval echo configure:47818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8005    rm -rf conftest*
8006    
8007           ac_cv_u8t_canonical=yes
8008 @@ -47540,7 +47844,7 @@
8009          old_CPPFLAGS=$CPPFLAGS
8010      CPPFLAGS=-I$IMAP_INC_DIR
8011      cat > conftest.$ac_ext <<EOF
8012 -#line 47544 "configure"
8013 +#line 47848 "configure"
8014  #include "confdefs.h"
8015  
8016  #include "imap4r1.h"
8017 @@ -47659,7 +47963,7 @@
8018    done
8019  
8020    echo $ac_n "checking for pam_start in -lpam""... $ac_c" 1>&6
8021 -echo "configure:47663: checking for pam_start in -lpam" >&5
8022 +echo "configure:47967: checking for pam_start in -lpam" >&5
8023  ac_lib_var=`echo pam'_'pam_start | sed 'y%./+-%__p_%'`
8024  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8025    echo $ac_n "(cached) $ac_c" 1>&6
8026 @@ -47667,7 +47971,7 @@
8027    ac_save_LIBS="$LIBS"
8028  LIBS="-lpam  $LIBS"
8029  cat > conftest.$ac_ext <<EOF
8030 -#line 47671 "configure"
8031 +#line 47975 "configure"
8032  #include "confdefs.h"
8033  /* Override any gcc2 internal prototype to avoid an error.  */
8034  /* We use char because int might match the return type of a gcc2
8035 @@ -47678,7 +47982,7 @@
8036  pam_start()
8037  ; return 0; }
8038  EOF
8039 -if { (eval echo configure:47682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8040 +if { (eval echo configure:47986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8041    rm -rf conftest*
8042    eval "ac_cv_lib_$ac_lib_var=yes"
8043  else
8044 @@ -47833,7 +48137,7 @@
8045    done
8046  
8047    echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8048 -echo "configure:47837: checking for crypt in -lcrypt" >&5
8049 +echo "configure:48141: checking for crypt in -lcrypt" >&5
8050  ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8051  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8052    echo $ac_n "(cached) $ac_c" 1>&6
8053 @@ -47841,7 +48145,7 @@
8054    ac_save_LIBS="$LIBS"
8055  LIBS="-lcrypt  $LIBS"
8056  cat > conftest.$ac_ext <<EOF
8057 -#line 47845 "configure"
8058 +#line 48149 "configure"
8059  #include "confdefs.h"
8060  /* Override any gcc2 internal prototype to avoid an error.  */
8061  /* We use char because int might match the return type of a gcc2
8062 @@ -47852,7 +48156,7 @@
8063  crypt()
8064  ; return 0; }
8065  EOF
8066 -if { (eval echo configure:47856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8067 +if { (eval echo configure:48160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8068    rm -rf conftest*
8069    eval "ac_cv_lib_$ac_lib_var=yes"
8070  else
8071 @@ -48056,7 +48360,7 @@
8072      # Extract the first word of "krb5-config", so it can be a program name with args.
8073  set dummy krb5-config; ac_word=$2
8074  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8075 -echo "configure:48060: checking for $ac_word" >&5
8076 +echo "configure:48364: checking for $ac_word" >&5
8077  if eval "test \"`echo '$''{'ac_cv_path_KRB5_CONFIG'+set}'`\" = set"; then
8078    echo $ac_n "(cached) $ac_c" 1>&6
8079  else
8080 @@ -48425,7 +48729,7 @@
8081  
8082    else
8083      cat > conftest.$ac_ext <<EOF
8084 -#line 48429 "configure"
8085 +#line 48733 "configure"
8086  #include "confdefs.h"
8087  #include <$IMAP_INC_DIR/linkage.h>
8088  EOF
8089 @@ -48466,7 +48770,7 @@
8090      # Extract the first word of "pkg-config", so it can be a program name with args.
8091  set dummy pkg-config; ac_word=$2
8092  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8093 -echo "configure:48470: checking for $ac_word" >&5
8094 +echo "configure:48774: checking for $ac_word" >&5
8095  if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
8096    echo $ac_n "(cached) $ac_c" 1>&6
8097  else
8098 @@ -48671,9 +48975,9 @@
8099      old_CPPFLAGS=$CPPFLAGS
8100      CPPFLAGS=-I$OPENSSL_INCDIR
8101      echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6
8102 -echo "configure:48675: checking for OpenSSL version" >&5
8103 +echo "configure:48979: checking for OpenSSL version" >&5
8104      cat > conftest.$ac_ext <<EOF
8105 -#line 48677 "configure"
8106 +#line 48981 "configure"
8107  #include "confdefs.h"
8108  
8109  #include <openssl/opensslv.h>
8110 @@ -48828,7 +49132,7 @@
8111    done
8112  
8113    echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6
8114 -echo "configure:48832: checking for CRYPTO_free in -lcrypto" >&5
8115 +echo "configure:49136: checking for CRYPTO_free in -lcrypto" >&5
8116  ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'`
8117  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8118    echo $ac_n "(cached) $ac_c" 1>&6
8119 @@ -48836,7 +49140,7 @@
8120    ac_save_LIBS="$LIBS"
8121  LIBS="-lcrypto  $LIBS"
8122  cat > conftest.$ac_ext <<EOF
8123 -#line 48840 "configure"
8124 +#line 49144 "configure"
8125  #include "confdefs.h"
8126  /* Override any gcc2 internal prototype to avoid an error.  */
8127  /* We use char because int might match the return type of a gcc2
8128 @@ -48847,7 +49151,7 @@
8129  CRYPTO_free()
8130  ; return 0; }
8131  EOF
8132 -if { (eval echo configure:48851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8133 +if { (eval echo configure:49155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8134    rm -rf conftest*
8135    eval "ac_cv_lib_$ac_lib_var=yes"
8136  else
8137 @@ -49004,7 +49308,7 @@
8138    done
8139  
8140    echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6
8141 -echo "configure:49008: checking for SSL_CTX_set_ssl_version in -lssl" >&5
8142 +echo "configure:49312: checking for SSL_CTX_set_ssl_version in -lssl" >&5
8143  ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'`
8144  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8145    echo $ac_n "(cached) $ac_c" 1>&6
8146 @@ -49012,7 +49316,7 @@
8147    ac_save_LIBS="$LIBS"
8148  LIBS="-lssl  $LIBS"
8149  cat > conftest.$ac_ext <<EOF
8150 -#line 49016 "configure"
8151 +#line 49320 "configure"
8152  #include "confdefs.h"
8153  /* Override any gcc2 internal prototype to avoid an error.  */
8154  /* We use char because int might match the return type of a gcc2
8155 @@ -49023,7 +49327,7 @@
8156  SSL_CTX_set_ssl_version()
8157  ; return 0; }
8158  EOF
8159 -if { (eval echo configure:49027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8160 +if { (eval echo configure:49331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8161    rm -rf conftest*
8162    eval "ac_cv_lib_$ac_lib_var=yes"
8163  else
8164 @@ -49142,7 +49446,7 @@
8165  
8166    elif test -f "$IMAP_INC_DIR/linkage.c"; then
8167      cat > conftest.$ac_ext <<EOF
8168 -#line 49146 "configure"
8169 +#line 49450 "configure"
8170  #include "confdefs.h"
8171  #include <$IMAP_INC_DIR/linkage.c>
8172  EOF
8173 @@ -49173,7 +49477,7 @@
8174    
8175  else
8176    cat > conftest.$ac_ext <<EOF
8177 -#line 49177 "configure"
8178 +#line 49481 "configure"
8179  #include "confdefs.h"
8180  
8181      
8182 @@ -49200,7 +49504,7 @@
8183      }
8184    
8185  EOF
8186 -if { (eval echo configure:49204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8187 +if { (eval echo configure:49508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8188  then
8189    
8190      LIBS=$old_LIBS
8191 @@ -49227,7 +49531,7 @@
8192  
8193  
8194      echo $ac_n "checking whether build with IMAP works""... $ac_c" 1>&6
8195 -echo "configure:49231: checking whether build with IMAP works" >&5
8196 +echo "configure:49535: checking whether build with IMAP works" >&5
8197      
8198    
8199    old_LIBS=$LIBS
8200 @@ -49238,7 +49542,7 @@
8201    
8202  else
8203    cat > conftest.$ac_ext <<EOF
8204 -#line 49242 "configure"
8205 +#line 49546 "configure"
8206  #include "confdefs.h"
8207  
8208      
8209 @@ -49265,7 +49569,7 @@
8210      }
8211    
8212  EOF
8213 -if { (eval echo configure:49269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8214 +if { (eval echo configure:49573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8215  then
8216    
8217      LIBS=$old_LIBS
8218 @@ -49297,7 +49601,7 @@
8219  php_with_interbase=no
8220  
8221  echo $ac_n "checking for InterBase support""... $ac_c" 1>&6
8222 -echo "configure:49301: checking for InterBase support" >&5
8223 +echo "configure:49605: checking for InterBase support" >&5
8224  # Check whether --with-interbase or --without-interbase was given.
8225  if test "${with_interbase+set}" = set; then
8226    withval="$with_interbase"
8227 @@ -49447,7 +49751,7 @@
8228    done
8229  
8230    echo $ac_n "checking for isc_detach_database in -lfbclient""... $ac_c" 1>&6
8231 -echo "configure:49451: checking for isc_detach_database in -lfbclient" >&5
8232 +echo "configure:49755: checking for isc_detach_database in -lfbclient" >&5
8233  ac_lib_var=`echo fbclient'_'isc_detach_database | sed 'y%./+-%__p_%'`
8234  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8235    echo $ac_n "(cached) $ac_c" 1>&6
8236 @@ -49455,7 +49759,7 @@
8237    ac_save_LIBS="$LIBS"
8238  LIBS="-lfbclient  $LIBS"
8239  cat > conftest.$ac_ext <<EOF
8240 -#line 49459 "configure"
8241 +#line 49763 "configure"
8242  #include "confdefs.h"
8243  /* Override any gcc2 internal prototype to avoid an error.  */
8244  /* We use char because int might match the return type of a gcc2
8245 @@ -49466,7 +49770,7 @@
8246  isc_detach_database()
8247  ; return 0; }
8248  EOF
8249 -if { (eval echo configure:49470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8250 +if { (eval echo configure:49774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8251    rm -rf conftest*
8252    eval "ac_cv_lib_$ac_lib_var=yes"
8253  else
8254 @@ -49593,7 +49897,7 @@
8255    done
8256  
8257    echo $ac_n "checking for isc_detach_database in -lgds""... $ac_c" 1>&6
8258 -echo "configure:49597: checking for isc_detach_database in -lgds" >&5
8259 +echo "configure:49901: checking for isc_detach_database in -lgds" >&5
8260  ac_lib_var=`echo gds'_'isc_detach_database | sed 'y%./+-%__p_%'`
8261  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8262    echo $ac_n "(cached) $ac_c" 1>&6
8263 @@ -49601,7 +49905,7 @@
8264    ac_save_LIBS="$LIBS"
8265  LIBS="-lgds  $LIBS"
8266  cat > conftest.$ac_ext <<EOF
8267 -#line 49605 "configure"
8268 +#line 49909 "configure"
8269  #include "confdefs.h"
8270  /* Override any gcc2 internal prototype to avoid an error.  */
8271  /* We use char because int might match the return type of a gcc2
8272 @@ -49612,7 +49916,7 @@
8273  isc_detach_database()
8274  ; return 0; }
8275  EOF
8276 -if { (eval echo configure:49616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8277 +if { (eval echo configure:49920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8278    rm -rf conftest*
8279    eval "ac_cv_lib_$ac_lib_var=yes"
8280  else
8281 @@ -49739,7 +50043,7 @@
8282    done
8283  
8284    echo $ac_n "checking for isc_detach_database in -lib_util""... $ac_c" 1>&6
8285 -echo "configure:49743: checking for isc_detach_database in -lib_util" >&5
8286 +echo "configure:50047: checking for isc_detach_database in -lib_util" >&5
8287  ac_lib_var=`echo ib_util'_'isc_detach_database | sed 'y%./+-%__p_%'`
8288  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8289    echo $ac_n "(cached) $ac_c" 1>&6
8290 @@ -49747,7 +50051,7 @@
8291    ac_save_LIBS="$LIBS"
8292  LIBS="-lib_util  $LIBS"
8293  cat > conftest.$ac_ext <<EOF
8294 -#line 49751 "configure"
8295 +#line 50055 "configure"
8296  #include "confdefs.h"
8297  /* Override any gcc2 internal prototype to avoid an error.  */
8298  /* We use char because int might match the return type of a gcc2
8299 @@ -49758,7 +50062,7 @@
8300  isc_detach_database()
8301  ; return 0; }
8302  EOF
8303 -if { (eval echo configure:49762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8304 +if { (eval echo configure:50066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8305    rm -rf conftest*
8306    eval "ac_cv_lib_$ac_lib_var=yes"
8307  else
8308 @@ -50224,7 +50528,7 @@
8309  php_enable_json=yes
8310  
8311  echo $ac_n "checking whether to enable JavaScript Object Serialization support""... $ac_c" 1>&6
8312 -echo "configure:50228: checking whether to enable JavaScript Object Serialization support" >&5
8313 +echo "configure:50532: checking whether to enable JavaScript Object Serialization support" >&5
8314  # Check whether --enable-json or --disable-json was given.
8315  if test "${enable_json+set}" = set; then
8316    enableval="$enable_json"
8317 @@ -50273,12 +50577,12 @@
8318  EOF
8319  
8320    echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8321 -echo "configure:50277: checking for ANSI C header files" >&5
8322 +echo "configure:50581: checking for ANSI C header files" >&5
8323  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
8324    echo $ac_n "(cached) $ac_c" 1>&6
8325  else
8326    cat > conftest.$ac_ext <<EOF
8327 -#line 50282 "configure"
8328 +#line 50586 "configure"
8329  #include "confdefs.h"
8330  #include <stdlib.h>
8331  #include <stdarg.h>
8332 @@ -50286,7 +50590,7 @@
8333  #include <float.h>
8334  EOF
8335  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8336 -{ (eval echo configure:50290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8337 +{ (eval echo configure:50594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8338  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8339  if test -z "$ac_err"; then
8340    rm -rf conftest*
8341 @@ -50303,7 +50607,7 @@
8342  if test $ac_cv_header_stdc = yes; then
8343    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8344  cat > conftest.$ac_ext <<EOF
8345 -#line 50307 "configure"
8346 +#line 50611 "configure"
8347  #include "confdefs.h"
8348  #include <string.h>
8349  EOF
8350 @@ -50321,7 +50625,7 @@
8351  if test $ac_cv_header_stdc = yes; then
8352    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8353  cat > conftest.$ac_ext <<EOF
8354 -#line 50325 "configure"
8355 +#line 50629 "configure"
8356  #include "confdefs.h"
8357  #include <stdlib.h>
8358  EOF
8359 @@ -50342,7 +50646,7 @@
8360    :
8361  else
8362    cat > conftest.$ac_ext <<EOF
8363 -#line 50346 "configure"
8364 +#line 50650 "configure"
8365  #include "confdefs.h"
8366  #include <ctype.h>
8367  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8368 @@ -50353,7 +50657,7 @@
8369  exit (0); }
8370  
8371  EOF
8372 -if { (eval echo configure:50357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8373 +if { (eval echo configure:50661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8374  then
8375    :
8376  else
8377 @@ -50672,7 +50976,7 @@
8378  php_with_ldap=no
8379  
8380  echo $ac_n "checking for LDAP support""... $ac_c" 1>&6
8381 -echo "configure:50676: checking for LDAP support" >&5
8382 +echo "configure:50980: checking for LDAP support" >&5
8383  # Check whether --with-ldap or --without-ldap was given.
8384  if test "${with_ldap+set}" = set; then
8385    withval="$with_ldap"
8386 @@ -50719,7 +51023,7 @@
8387  php_with_ldap_sasl=no
8388  
8389  echo $ac_n "checking for LDAP Cyrus SASL support""... $ac_c" 1>&6
8390 -echo "configure:50723: checking for LDAP Cyrus SASL support" >&5
8391 +echo "configure:51027: checking for LDAP Cyrus SASL support" >&5
8392  # Check whether --with-ldap-sasl or --without-ldap-sasl was given.
8393  if test "${with_ldap_sasl+set}" = set; then
8394    withval="$with_ldap_sasl"
8395 @@ -53053,19 +53357,19 @@
8396    LIBS="$LIBS $LDAP_SHARED_LIBADD"
8397  
8398      echo $ac_n "checking for 3 arg ldap_set_rebind_proc""... $ac_c" 1>&6
8399 -echo "configure:53057: checking for 3 arg ldap_set_rebind_proc" >&5
8400 +echo "configure:53361: checking for 3 arg ldap_set_rebind_proc" >&5
8401  if eval "test \"`echo '$''{'ac_cv_3arg_setrebindproc'+set}'`\" = set"; then
8402    echo $ac_n "(cached) $ac_c" 1>&6
8403  else
8404    cat > conftest.$ac_ext <<EOF
8405 -#line 53062 "configure"
8406 +#line 53366 "configure"
8407  #include "confdefs.h"
8408  #include <ldap.h>
8409  int main() {
8410  ldap_set_rebind_proc(0,0,0)
8411  ; return 0; }
8412  EOF
8413 -if { (eval echo configure:53069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8414 +if { (eval echo configure:53373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8415    rm -rf conftest*
8416    ac_cv_3arg_setrebindproc=yes
8417  else
8418 @@ -53088,12 +53392,12 @@
8419        for ac_func in ldap_parse_result ldap_parse_reference ldap_start_tls_s
8420  do
8421  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8422 -echo "configure:53092: checking for $ac_func" >&5
8423 +echo "configure:53396: checking for $ac_func" >&5
8424  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8425    echo $ac_n "(cached) $ac_c" 1>&6
8426  else
8427    cat > conftest.$ac_ext <<EOF
8428 -#line 53097 "configure"
8429 +#line 53401 "configure"
8430  #include "confdefs.h"
8431  /* System header to define __stub macros and hopefully few prototypes,
8432      which can conflict with char $ac_func(); below.  */
8433 @@ -53116,7 +53420,7 @@
8434  
8435  ; return 0; }
8436  EOF
8437 -if { (eval echo configure:53120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8438 +if { (eval echo configure:53424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8439    rm -rf conftest*
8440    eval "ac_cv_func_$ac_func=yes"
8441  else
8442 @@ -53278,7 +53582,7 @@
8443    done
8444  
8445    echo $ac_n "checking for sasl_version in -lldap""... $ac_c" 1>&6
8446 -echo "configure:53282: checking for sasl_version in -lldap" >&5
8447 +echo "configure:53586: checking for sasl_version in -lldap" >&5
8448  ac_lib_var=`echo ldap'_'sasl_version | sed 'y%./+-%__p_%'`
8449  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8450    echo $ac_n "(cached) $ac_c" 1>&6
8451 @@ -53286,7 +53590,7 @@
8452    ac_save_LIBS="$LIBS"
8453  LIBS="-lldap  $LIBS"
8454  cat > conftest.$ac_ext <<EOF
8455 -#line 53290 "configure"
8456 +#line 53594 "configure"
8457  #include "confdefs.h"
8458  /* Override any gcc2 internal prototype to avoid an error.  */
8459  /* We use char because int might match the return type of a gcc2
8460 @@ -53297,7 +53601,7 @@
8461  sasl_version()
8462  ; return 0; }
8463  EOF
8464 -if { (eval echo configure:53301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8465 +if { (eval echo configure:53605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8466    rm -rf conftest*
8467    eval "ac_cv_lib_$ac_lib_var=yes"
8468  else
8469 @@ -53466,12 +53770,12 @@
8470    fi
8471  
8472          echo $ac_n "checking for ldap_bind_s""... $ac_c" 1>&6
8473 -echo "configure:53470: checking for ldap_bind_s" >&5
8474 +echo "configure:53774: checking for ldap_bind_s" >&5
8475  if eval "test \"`echo '$''{'ac_cv_func_ldap_bind_s'+set}'`\" = set"; then
8476    echo $ac_n "(cached) $ac_c" 1>&6
8477  else
8478    cat > conftest.$ac_ext <<EOF
8479 -#line 53475 "configure"
8480 +#line 53779 "configure"
8481  #include "confdefs.h"
8482  /* System header to define __stub macros and hopefully few prototypes,
8483      which can conflict with char ldap_bind_s(); below.  */
8484 @@ -53494,7 +53798,7 @@
8485  
8486  ; return 0; }
8487  EOF
8488 -if { (eval echo configure:53498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8489 +if { (eval echo configure:53802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8490    rm -rf conftest*
8491    eval "ac_cv_func_ldap_bind_s=yes"
8492  else
8493 @@ -53545,7 +53849,7 @@
8494  php_enable_mbstring=no
8495  
8496  echo $ac_n "checking whether to enable multibyte string support""... $ac_c" 1>&6
8497 -echo "configure:53549: checking whether to enable multibyte string support" >&5
8498 +echo "configure:53853: checking whether to enable multibyte string support" >&5
8499  # Check whether --enable-mbstring or --disable-mbstring was given.
8500  if test "${enable_mbstring+set}" = set; then
8501    enableval="$enable_mbstring"
8502 @@ -53592,7 +53896,7 @@
8503  php_enable_mbregex=yes
8504  
8505  echo $ac_n "checking whether to enable multibyte regex support""... $ac_c" 1>&6
8506 -echo "configure:53596: checking whether to enable multibyte regex support" >&5
8507 +echo "configure:53900: checking whether to enable multibyte regex support" >&5
8508  # Check whether --enable-mbregex or --disable-mbregex was given.
8509  if test "${enable_mbregex+set}" = set; then
8510    enableval="$enable_mbregex"
8511 @@ -53618,7 +53922,7 @@
8512  php_enable_mbregex_backtrack=yes
8513  
8514  echo $ac_n "checking whether to check multibyte regex backtrack""... $ac_c" 1>&6
8515 -echo "configure:53622: checking whether to check multibyte regex backtrack" >&5
8516 +echo "configure:53926: checking whether to check multibyte regex backtrack" >&5
8517  # Check whether --enable-mbregex_backtrack or --disable-mbregex_backtrack was given.
8518  if test "${enable_mbregex_backtrack+set}" = set; then
8519    enableval="$enable_mbregex_backtrack"
8520 @@ -53644,7 +53948,7 @@
8521  php_with_libmbfl=no
8522  
8523  echo $ac_n "checking for external libmbfl""... $ac_c" 1>&6
8524 -echo "configure:53648: checking for external libmbfl" >&5
8525 +echo "configure:53952: checking for external libmbfl" >&5
8526  # Check whether --with-libmbfl or --without-libmbfl was given.
8527  if test "${with_libmbfl+set}" = set; then
8528    withval="$with_libmbfl"
8529 @@ -53680,7 +53984,7 @@
8530      
8531    if test "$PHP_MBREGEX" = "yes"; then
8532      echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
8533 -echo "configure:53684: checking for variable length prototypes and stdarg.h" >&5
8534 +echo "configure:53988: checking for variable length prototypes and stdarg.h" >&5
8535  if eval "test \"`echo '$''{'cv_php_mbstring_stdarg'+set}'`\" = set"; then
8536    echo $ac_n "(cached) $ac_c" 1>&6
8537  else
8538 @@ -53699,7 +54003,7 @@
8539  
8540  else
8541    cat > conftest.$ac_ext <<EOF
8542 -#line 53703 "configure"
8543 +#line 54007 "configure"
8544  #include "confdefs.h"
8545  
8546  #include <stdarg.h>
8547 @@ -53714,7 +54018,7 @@
8548  int main() { return foo(10, "", 3.14); }
8549        
8550  EOF
8551 -if { (eval echo configure:53718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8552 +if { (eval echo configure:54022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8553  then
8554    cv_php_mbstring_stdarg=yes
8555  else
8556 @@ -53735,17 +54039,17 @@
8557  do
8558  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8559  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8560 -echo "configure:53739: checking for $ac_hdr" >&5
8561 +echo "configure:54043: checking for $ac_hdr" >&5
8562  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8563    echo $ac_n "(cached) $ac_c" 1>&6
8564  else
8565    cat > conftest.$ac_ext <<EOF
8566 -#line 53744 "configure"
8567 +#line 54048 "configure"
8568  #include "confdefs.h"
8569  #include <$ac_hdr>
8570  EOF
8571  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8572 -{ (eval echo configure:53749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8573 +{ (eval echo configure:54053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8574  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8575  if test -z "$ac_err"; then
8576    rm -rf conftest*
8577 @@ -53772,7 +54076,7 @@
8578  done
8579  
8580      echo $ac_n "checking size of int""... $ac_c" 1>&6
8581 -echo "configure:53776: checking size of int" >&5
8582 +echo "configure:54080: checking size of int" >&5
8583  if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
8584    echo $ac_n "(cached) $ac_c" 1>&6
8585  else
8586 @@ -53780,18 +54084,18 @@
8587    ac_cv_sizeof_int=4
8588  else
8589    cat > conftest.$ac_ext <<EOF
8590 -#line 53784 "configure"
8591 +#line 54088 "configure"
8592  #include "confdefs.h"
8593  #include <stdio.h>
8594 -int main()
8595 +main()
8596  {
8597    FILE *f=fopen("conftestval", "w");
8598 -  if (!f) return(1);
8599 +  if (!f) exit(1);
8600    fprintf(f, "%d\n", sizeof(int));
8601 -  return(0);
8602 +  exit(0);
8603  }
8604  EOF
8605 -if { (eval echo configure:53795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8606 +if { (eval echo configure:54099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8607  then
8608    ac_cv_sizeof_int=`cat conftestval`
8609  else
8610 @@ -53811,7 +54115,7 @@
8611  
8612  
8613      echo $ac_n "checking size of short""... $ac_c" 1>&6
8614 -echo "configure:53815: checking size of short" >&5
8615 +echo "configure:54119: checking size of short" >&5
8616  if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
8617    echo $ac_n "(cached) $ac_c" 1>&6
8618  else
8619 @@ -53819,18 +54123,18 @@
8620    ac_cv_sizeof_short=2
8621  else
8622    cat > conftest.$ac_ext <<EOF
8623 -#line 53823 "configure"
8624 +#line 54127 "configure"
8625  #include "confdefs.h"
8626  #include <stdio.h>
8627 -int main()
8628 +main()
8629  {
8630    FILE *f=fopen("conftestval", "w");
8631 -  if (!f) return(1);
8632 +  if (!f) exit(1);
8633    fprintf(f, "%d\n", sizeof(short));
8634 -  return(0);
8635 +  exit(0);
8636  }
8637  EOF
8638 -if { (eval echo configure:53834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8639 +if { (eval echo configure:54138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8640  then
8641    ac_cv_sizeof_short=`cat conftestval`
8642  else
8643 @@ -53850,7 +54154,7 @@
8644  
8645  
8646      echo $ac_n "checking size of long""... $ac_c" 1>&6
8647 -echo "configure:53854: checking size of long" >&5
8648 +echo "configure:54158: checking size of long" >&5
8649  if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
8650    echo $ac_n "(cached) $ac_c" 1>&6
8651  else
8652 @@ -53858,18 +54162,18 @@
8653    ac_cv_sizeof_long=4
8654  else
8655    cat > conftest.$ac_ext <<EOF
8656 -#line 53862 "configure"
8657 +#line 54166 "configure"
8658  #include "confdefs.h"
8659  #include <stdio.h>
8660 -int main()
8661 +main()
8662  {
8663    FILE *f=fopen("conftestval", "w");
8664 -  if (!f) return(1);
8665 +  if (!f) exit(1);
8666    fprintf(f, "%d\n", sizeof(long));
8667 -  return(0);
8668 +  exit(0);
8669  }
8670  EOF
8671 -if { (eval echo configure:53873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8672 +if { (eval echo configure:54177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8673  then
8674    ac_cv_sizeof_long=`cat conftestval`
8675  else
8676 @@ -53889,12 +54193,12 @@
8677  
8678  
8679      echo $ac_n "checking for working const""... $ac_c" 1>&6
8680 -echo "configure:53893: checking for working const" >&5
8681 +echo "configure:54197: checking for working const" >&5
8682  if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
8683    echo $ac_n "(cached) $ac_c" 1>&6
8684  else
8685    cat > conftest.$ac_ext <<EOF
8686 -#line 53898 "configure"
8687 +#line 54202 "configure"
8688  #include "confdefs.h"
8689  
8690  int main() {
8691 @@ -53943,7 +54247,7 @@
8692  
8693  ; return 0; }
8694  EOF
8695 -if { (eval echo configure:53947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8696 +if { (eval echo configure:54251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8697    rm -rf conftest*
8698    ac_cv_c_const=yes
8699  else
8700 @@ -53964,12 +54268,12 @@
8701  fi
8702  
8703      echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
8704 -echo "configure:53968: checking whether time.h and sys/time.h may both be included" >&5
8705 +echo "configure:54272: checking whether time.h and sys/time.h may both be included" >&5
8706  if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
8707    echo $ac_n "(cached) $ac_c" 1>&6
8708  else
8709    cat > conftest.$ac_ext <<EOF
8710 -#line 53973 "configure"
8711 +#line 54277 "configure"
8712  #include "confdefs.h"
8713  #include <sys/types.h>
8714  #include <sys/time.h>
8715 @@ -53978,7 +54282,7 @@
8716  struct tm *tp;
8717  ; return 0; }
8718  EOF
8719 -if { (eval echo configure:53982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8720 +if { (eval echo configure:54286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8721    rm -rf conftest*
8722    ac_cv_header_time=yes
8723  else
8724 @@ -54001,19 +54305,19 @@
8725      # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8726  # for constant arguments.  Useless!
8727  echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
8728 -echo "configure:54005: checking for working alloca.h" >&5
8729 +echo "configure:54309: checking for working alloca.h" >&5
8730  if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
8731    echo $ac_n "(cached) $ac_c" 1>&6
8732  else
8733    cat > conftest.$ac_ext <<EOF
8734 -#line 54010 "configure"
8735 +#line 54314 "configure"
8736  #include "confdefs.h"
8737  #include <alloca.h>
8738  int main() {
8739  char *p = alloca(2 * sizeof(int));
8740  ; return 0; }
8741  EOF
8742 -if { (eval echo configure:54017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8743 +if { (eval echo configure:54321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8744    rm -rf conftest*
8745    ac_cv_header_alloca_h=yes
8746  else
8747 @@ -54034,12 +54338,12 @@
8748  fi
8749  
8750  echo $ac_n "checking for alloca""... $ac_c" 1>&6
8751 -echo "configure:54038: checking for alloca" >&5
8752 +echo "configure:54342: checking for alloca" >&5
8753  if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
8754    echo $ac_n "(cached) $ac_c" 1>&6
8755  else
8756    cat > conftest.$ac_ext <<EOF
8757 -#line 54043 "configure"
8758 +#line 54347 "configure"
8759  #include "confdefs.h"
8760  
8761  #ifdef __GNUC__
8762 @@ -54067,7 +54371,7 @@
8763  char *p = (char *) alloca(1);
8764  ; return 0; }
8765  EOF
8766 -if { (eval echo configure:54071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8767 +if { (eval echo configure:54375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8768    rm -rf conftest*
8769    ac_cv_func_alloca_works=yes
8770  else
8771 @@ -54099,12 +54403,12 @@
8772  
8773  
8774  echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
8775 -echo "configure:54103: checking whether alloca needs Cray hooks" >&5
8776 +echo "configure:54407: checking whether alloca needs Cray hooks" >&5
8777  if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
8778    echo $ac_n "(cached) $ac_c" 1>&6
8779  else
8780    cat > conftest.$ac_ext <<EOF
8781 -#line 54108 "configure"
8782 +#line 54412 "configure"
8783  #include "confdefs.h"
8784  #if defined(CRAY) && ! defined(CRAY2)
8785  webecray
8786 @@ -54129,12 +54433,12 @@
8787  if test $ac_cv_os_cray = yes; then
8788  for ac_func in _getb67 GETB67 getb67; do
8789    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8790 -echo "configure:54133: checking for $ac_func" >&5
8791 +echo "configure:54437: checking for $ac_func" >&5
8792  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8793    echo $ac_n "(cached) $ac_c" 1>&6
8794  else
8795    cat > conftest.$ac_ext <<EOF
8796 -#line 54138 "configure"
8797 +#line 54442 "configure"
8798  #include "confdefs.h"
8799  /* System header to define __stub macros and hopefully few prototypes,
8800      which can conflict with char $ac_func(); below.  */
8801 @@ -54157,7 +54461,7 @@
8802  
8803  ; return 0; }
8804  EOF
8805 -if { (eval echo configure:54161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8806 +if { (eval echo configure:54465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8807    rm -rf conftest*
8808    eval "ac_cv_func_$ac_func=yes"
8809  else
8810 @@ -54184,7 +54488,7 @@
8811  fi
8812  
8813  echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
8814 -echo "configure:54188: checking stack direction for C alloca" >&5
8815 +echo "configure:54492: checking stack direction for C alloca" >&5
8816  if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
8817    echo $ac_n "(cached) $ac_c" 1>&6
8818  else
8819 @@ -54192,7 +54496,7 @@
8820    ac_cv_c_stack_direction=0
8821  else
8822    cat > conftest.$ac_ext <<EOF
8823 -#line 54196 "configure"
8824 +#line 54500 "configure"
8825  #include "confdefs.h"
8826  find_stack_direction ()
8827  {
8828 @@ -54211,7 +54515,7 @@
8829    exit (find_stack_direction() < 0);
8830  }
8831  EOF
8832 -if { (eval echo configure:54215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8833 +if { (eval echo configure:54519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8834  then
8835    ac_cv_c_stack_direction=1
8836  else
8837 @@ -54233,7 +54537,7 @@
8838  fi
8839  
8840      echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
8841 -echo "configure:54237: checking for 8-bit clean memcmp" >&5
8842 +echo "configure:54541: checking for 8-bit clean memcmp" >&5
8843  if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
8844    echo $ac_n "(cached) $ac_c" 1>&6
8845  else
8846 @@ -54241,7 +54545,7 @@
8847    ac_cv_func_memcmp_clean=no
8848  else
8849    cat > conftest.$ac_ext <<EOF
8850 -#line 54245 "configure"
8851 +#line 54549 "configure"
8852  #include "confdefs.h"
8853  
8854  main()
8855 @@ -54251,7 +54555,7 @@
8856  }
8857  
8858  EOF
8859 -if { (eval echo configure:54255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8860 +if { (eval echo configure:54559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8861  then
8862    ac_cv_func_memcmp_clean=yes
8863  else
8864 @@ -54601,7 +54905,7 @@
8865    done
8866  
8867    echo $ac_n "checking for mbfl_buffer_converter_new in -lmbfl""... $ac_c" 1>&6
8868 -echo "configure:54605: checking for mbfl_buffer_converter_new in -lmbfl" >&5
8869 +echo "configure:54909: checking for mbfl_buffer_converter_new in -lmbfl" >&5
8870  ac_lib_var=`echo mbfl'_'mbfl_buffer_converter_new | sed 'y%./+-%__p_%'`
8871  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8872    echo $ac_n "(cached) $ac_c" 1>&6
8873 @@ -54609,7 +54913,7 @@
8874    ac_save_LIBS="$LIBS"
8875  LIBS="-lmbfl  $LIBS"
8876  cat > conftest.$ac_ext <<EOF
8877 -#line 54613 "configure"
8878 +#line 54917 "configure"
8879  #include "confdefs.h"
8880  /* Override any gcc2 internal prototype to avoid an error.  */
8881  /* We use char because int might match the return type of a gcc2
8882 @@ -54620,7 +54924,7 @@
8883  mbfl_buffer_converter_new()
8884  ; return 0; }
8885  EOF
8886 -if { (eval echo configure:54624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8887 +if { (eval echo configure:54928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8888    rm -rf conftest*
8889    eval "ac_cv_lib_$ac_lib_var=yes"
8890  else
8891 @@ -55243,7 +55547,7 @@
8892  php_with_mcrypt=no
8893  
8894  echo $ac_n "checking for mcrypt support""... $ac_c" 1>&6
8895 -echo "configure:55247: checking for mcrypt support" >&5
8896 +echo "configure:55551: checking for mcrypt support" >&5
8897  # Check whether --with-mcrypt or --without-mcrypt was given.
8898  if test "${with_mcrypt+set}" = set; then
8899    withval="$with_mcrypt"
8900 @@ -55299,9 +55603,9 @@
8901    old_CPPFLAGS=$CPPFLAGS
8902    CPPFLAGS=-I$MCRYPT_DIR/include
8903    echo $ac_n "checking for libmcrypt version""... $ac_c" 1>&6
8904 -echo "configure:55303: checking for libmcrypt version" >&5
8905 +echo "configure:55607: checking for libmcrypt version" >&5
8906    cat > conftest.$ac_ext <<EOF
8907 -#line 55305 "configure"
8908 +#line 55609 "configure"
8909  #include "confdefs.h"
8910  
8911  #include <mcrypt.h>
8912 @@ -55425,7 +55729,7 @@
8913    done
8914  
8915    echo $ac_n "checking for mcrypt_module_open in -lmcrypt""... $ac_c" 1>&6
8916 -echo "configure:55429: checking for mcrypt_module_open in -lmcrypt" >&5
8917 +echo "configure:55733: checking for mcrypt_module_open in -lmcrypt" >&5
8918  ac_lib_var=`echo mcrypt'_'mcrypt_module_open | sed 'y%./+-%__p_%'`
8919  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8920    echo $ac_n "(cached) $ac_c" 1>&6
8921 @@ -55433,7 +55737,7 @@
8922    ac_save_LIBS="$LIBS"
8923  LIBS="-lmcrypt  $LIBS"
8924  cat > conftest.$ac_ext <<EOF
8925 -#line 55437 "configure"
8926 +#line 55741 "configure"
8927  #include "confdefs.h"
8928  /* Override any gcc2 internal prototype to avoid an error.  */
8929  /* We use char because int might match the return type of a gcc2
8930 @@ -55444,7 +55748,7 @@
8931  mcrypt_module_open()
8932  ; return 0; }
8933  EOF
8934 -if { (eval echo configure:55448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8935 +if { (eval echo configure:55752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8936    rm -rf conftest*
8937    eval "ac_cv_lib_$ac_lib_var=yes"
8938  else
8939 @@ -55597,7 +55901,7 @@
8940    done
8941  
8942    echo $ac_n "checking for mcrypt_module_open in -lmcrypt""... $ac_c" 1>&6
8943 -echo "configure:55601: checking for mcrypt_module_open in -lmcrypt" >&5
8944 +echo "configure:55905: checking for mcrypt_module_open in -lmcrypt" >&5
8945  ac_lib_var=`echo mcrypt'_'mcrypt_module_open | sed 'y%./+-%__p_%'`
8946  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8947    echo $ac_n "(cached) $ac_c" 1>&6
8948 @@ -55605,7 +55909,7 @@
8949    ac_save_LIBS="$LIBS"
8950  LIBS="-lmcrypt  $LIBS"
8951  cat > conftest.$ac_ext <<EOF
8952 -#line 55609 "configure"
8953 +#line 55913 "configure"
8954  #include "confdefs.h"
8955  /* Override any gcc2 internal prototype to avoid an error.  */
8956  /* We use char because int might match the return type of a gcc2
8957 @@ -55616,7 +55920,7 @@
8958  mcrypt_module_open()
8959  ; return 0; }
8960  EOF
8961 -if { (eval echo configure:55620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8962 +if { (eval echo configure:55924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8963    rm -rf conftest*
8964    eval "ac_cv_lib_$ac_lib_var=yes"
8965  else
8966 @@ -56078,7 +56382,7 @@
8967  php_with_mhash=no
8968  
8969  echo $ac_n "checking for mhash support""... $ac_c" 1>&6
8970 -echo "configure:56082: checking for mhash support" >&5
8971 +echo "configure:56386: checking for mhash support" >&5
8972  # Check whether --with-mhash or --without-mhash was given.
8973  if test "${with_mhash+set}" = set; then
8974    withval="$with_mhash"
8975 @@ -56554,7 +56858,7 @@
8976  php_with_mime_magic=no
8977  
8978  echo $ac_n "checking whether to include mime_magic support""... $ac_c" 1>&6
8979 -echo "configure:56558: checking whether to include mime_magic support" >&5
8980 +echo "configure:56862: checking whether to include mime_magic support" >&5
8981  # Check whether --with-mime-magic or --without-mime-magic was given.
8982  if test "${with_mime_magic+set}" = set; then
8983    withval="$with_mime_magic"
8984 @@ -56912,7 +57216,7 @@
8985  php_with_ming=no
8986  
8987  echo $ac_n "checking for MING support""... $ac_c" 1>&6
8988 -echo "configure:56916: checking for MING support" >&5
8989 +echo "configure:57220: checking for MING support" >&5
8990  # Check whether --with-ming or --without-ming was given.
8991  if test "${with_ming+set}" = set; then
8992    withval="$with_ming"
8993 @@ -56957,7 +57261,7 @@
8994  
8995  if test "$PHP_MING" != "no"; then
8996    echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
8997 -echo "configure:56961: checking for sin in -lm" >&5
8998 +echo "configure:57265: checking for sin in -lm" >&5
8999  ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
9000  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9001    echo $ac_n "(cached) $ac_c" 1>&6
9002 @@ -56965,7 +57269,7 @@
9003    ac_save_LIBS="$LIBS"
9004  LIBS="-lm  $LIBS"
9005  cat > conftest.$ac_ext <<EOF
9006 -#line 56969 "configure"
9007 +#line 57273 "configure"
9008  #include "confdefs.h"
9009  /* Override any gcc2 internal prototype to avoid an error.  */
9010  /* We use char because int might match the return type of a gcc2
9011 @@ -56976,7 +57280,7 @@
9012  sin()
9013  ; return 0; }
9014  EOF
9015 -if { (eval echo configure:56980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9016 +if { (eval echo configure:57284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9017    rm -rf conftest*
9018    eval "ac_cv_lib_$ac_lib_var=yes"
9019  else
9020 @@ -57123,7 +57427,7 @@
9021    done
9022  
9023    echo $ac_n "checking for Ming_useSWFVersion in -lming""... $ac_c" 1>&6
9024 -echo "configure:57127: checking for Ming_useSWFVersion in -lming" >&5
9025 +echo "configure:57431: checking for Ming_useSWFVersion in -lming" >&5
9026  ac_lib_var=`echo ming'_'Ming_useSWFVersion | sed 'y%./+-%__p_%'`
9027  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9028    echo $ac_n "(cached) $ac_c" 1>&6
9029 @@ -57131,7 +57435,7 @@
9030    ac_save_LIBS="$LIBS"
9031  LIBS="-lming  $LIBS"
9032  cat > conftest.$ac_ext <<EOF
9033 -#line 57135 "configure"
9034 +#line 57439 "configure"
9035  #include "confdefs.h"
9036  /* Override any gcc2 internal prototype to avoid an error.  */
9037  /* We use char because int might match the return type of a gcc2
9038 @@ -57142,7 +57446,7 @@
9039  Ming_useSWFVersion()
9040  ; return 0; }
9041  EOF
9042 -if { (eval echo configure:57146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9043 +if { (eval echo configure:57450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9044    rm -rf conftest*
9045    eval "ac_cv_lib_$ac_lib_var=yes"
9046  else
9047 @@ -57405,7 +57709,7 @@
9048    done
9049  
9050    echo $ac_n "checking for SWFPrebuiltClip in -lming""... $ac_c" 1>&6
9051 -echo "configure:57409: checking for SWFPrebuiltClip in -lming" >&5
9052 +echo "configure:57713: checking for SWFPrebuiltClip in -lming" >&5
9053  ac_lib_var=`echo ming'_'SWFPrebuiltClip | sed 'y%./+-%__p_%'`
9054  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9055    echo $ac_n "(cached) $ac_c" 1>&6
9056 @@ -57413,7 +57717,7 @@
9057    ac_save_LIBS="$LIBS"
9058  LIBS="-lming  $LIBS"
9059  cat > conftest.$ac_ext <<EOF
9060 -#line 57417 "configure"
9061 +#line 57721 "configure"
9062  #include "confdefs.h"
9063  /* Override any gcc2 internal prototype to avoid an error.  */
9064  /* We use char because int might match the return type of a gcc2
9065 @@ -57424,7 +57728,7 @@
9066  SWFPrebuiltClip()
9067  ; return 0; }
9068  EOF
9069 -if { (eval echo configure:57428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9070 +if { (eval echo configure:57732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9071    rm -rf conftest*
9072    eval "ac_cv_lib_$ac_lib_var=yes"
9073  else
9074 @@ -57553,7 +57857,7 @@
9075    done
9076  
9077    echo $ac_n "checking for SWFMovie_namedAnchor in -lming""... $ac_c" 1>&6
9078 -echo "configure:57557: checking for SWFMovie_namedAnchor in -lming" >&5
9079 +echo "configure:57861: checking for SWFMovie_namedAnchor in -lming" >&5
9080  ac_lib_var=`echo ming'_'SWFMovie_namedAnchor | sed 'y%./+-%__p_%'`
9081  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9082    echo $ac_n "(cached) $ac_c" 1>&6
9083 @@ -57561,7 +57865,7 @@
9084    ac_save_LIBS="$LIBS"
9085  LIBS="-lming  $LIBS"
9086  cat > conftest.$ac_ext <<EOF
9087 -#line 57565 "configure"
9088 +#line 57869 "configure"
9089  #include "confdefs.h"
9090  /* Override any gcc2 internal prototype to avoid an error.  */
9091  /* We use char because int might match the return type of a gcc2
9092 @@ -57572,7 +57876,7 @@
9093  SWFMovie_namedAnchor()
9094  ; return 0; }
9095  EOF
9096 -if { (eval echo configure:57576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9097 +if { (eval echo configure:57880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9098    rm -rf conftest*
9099    eval "ac_cv_lib_$ac_lib_var=yes"
9100  else
9101 @@ -57701,7 +58005,7 @@
9102    done
9103  
9104    echo $ac_n "checking for Ming_setSWFCompression in -lming""... $ac_c" 1>&6
9105 -echo "configure:57705: checking for Ming_setSWFCompression in -lming" >&5
9106 +echo "configure:58009: checking for Ming_setSWFCompression in -lming" >&5
9107  ac_lib_var=`echo ming'_'Ming_setSWFCompression | sed 'y%./+-%__p_%'`
9108  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9109    echo $ac_n "(cached) $ac_c" 1>&6
9110 @@ -57709,7 +58013,7 @@
9111    ac_save_LIBS="$LIBS"
9112  LIBS="-lming  $LIBS"
9113  cat > conftest.$ac_ext <<EOF
9114 -#line 57713 "configure"
9115 +#line 58017 "configure"
9116  #include "confdefs.h"
9117  /* Override any gcc2 internal prototype to avoid an error.  */
9118  /* We use char because int might match the return type of a gcc2
9119 @@ -57720,7 +58024,7 @@
9120  Ming_setSWFCompression()
9121  ; return 0; }
9122  EOF
9123 -if { (eval echo configure:57724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9124 +if { (eval echo configure:58028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9125    rm -rf conftest*
9126    eval "ac_cv_lib_$ac_lib_var=yes"
9127  else
9128 @@ -57757,14 +58061,14 @@
9129    old_CPPFLAGS=$CPPFLAGS
9130    CPPFLAGS=-I$MING_INC_DIR
9131    echo $ac_n "checking for destroySWFBlock""... $ac_c" 1>&6
9132 -echo "configure:57761: checking for destroySWFBlock" >&5
9133 +echo "configure:58065: checking for destroySWFBlock" >&5
9134    if test "$cross_compiling" = yes; then
9135    
9136      echo "$ac_t""unknown" 1>&6
9137    
9138  else
9139    cat > conftest.$ac_ext <<EOF
9140 -#line 57768 "configure"
9141 +#line 58072 "configure"
9142  #include "confdefs.h"
9143  
9144  #include "ming.h"
9145 @@ -57776,7 +58080,7 @@
9146  }
9147    
9148  EOF
9149 -if { (eval echo configure:57780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9150 +if { (eval echo configure:58084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9151  then
9152    
9153      echo "$ac_t""missing" 1>&6
9154 @@ -57798,7 +58102,7 @@
9155   
9156  
9157    cat > conftest.$ac_ext <<EOF
9158 -#line 57802 "configure"
9159 +#line 58106 "configure"
9160  #include "confdefs.h"
9161  
9162  #include <ming.h>
9163 @@ -57825,7 +58129,7 @@
9164  
9165  
9166      cat > conftest.$ac_ext <<EOF
9167 -#line 57829 "configure"
9168 +#line 58133 "configure"
9169  #include "confdefs.h"
9170  
9171  #include <ming.h>
9172 @@ -57836,7 +58140,7 @@
9173    
9174  ; return 0; }
9175  EOF
9176 -if { (eval echo configure:57840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9177 +if { (eval echo configure:58144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9178    rm -rf conftest*
9179    
9180      cat >> confdefs.h <<\EOF
9181 @@ -58144,7 +58448,7 @@
9182  php_with_msql=no
9183  
9184  echo $ac_n "checking for mSQL support""... $ac_c" 1>&6
9185 -echo "configure:58148: checking for mSQL support" >&5
9186 +echo "configure:58452: checking for mSQL support" >&5
9187  # Check whether --with-msql or --without-msql was given.
9188  if test "${with_msql+set}" = set; then
9189    withval="$with_msql"
9190 @@ -58613,11 +58917,11 @@
9191  
9192      
9193    echo $ac_n "checking mSQL version""... $ac_c" 1>&6
9194 -echo "configure:58617: checking mSQL version" >&5
9195 +echo "configure:58921: checking mSQL version" >&5
9196    ac_php_oldcppflags=$CPPFLAGS
9197    CPPFLAGS="$INCLUDES $CPPFLAGS"
9198    cat > conftest.$ac_ext <<EOF
9199 -#line 58621 "configure"
9200 +#line 58925 "configure"
9201  #include "confdefs.h"
9202  #include <sys/types.h>
9203  #include "msql.h"
9204 @@ -58625,7 +58929,7 @@
9205  int i = IDX_TYPE
9206  ; return 0; }
9207  EOF
9208 -if { (eval echo configure:58629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9209 +if { (eval echo configure:58933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9210    rm -rf conftest*
9211    
9212      cat >> confdefs.h <<\EOF
9213 @@ -58657,7 +58961,7 @@
9214  php_with_mssql=no
9215  
9216  echo $ac_n "checking for MSSQL support via FreeTDS""... $ac_c" 1>&6
9217 -echo "configure:58661: checking for MSSQL support via FreeTDS" >&5
9218 +echo "configure:58965: checking for MSSQL support via FreeTDS" >&5
9219  # Check whether --with-mssql or --without-mssql was given.
9220  if test "${with_mssql+set}" = set; then
9221    withval="$with_mssql"
9222 @@ -59147,7 +59451,7 @@
9223    fi
9224  
9225    echo $ac_n "checking for dnet_addr in -ldnet_stub""... $ac_c" 1>&6
9226 -echo "configure:59151: checking for dnet_addr in -ldnet_stub" >&5
9227 +echo "configure:59455: checking for dnet_addr in -ldnet_stub" >&5
9228  ac_lib_var=`echo dnet_stub'_'dnet_addr | sed 'y%./+-%__p_%'`
9229  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9230    echo $ac_n "(cached) $ac_c" 1>&6
9231 @@ -59155,7 +59459,7 @@
9232    ac_save_LIBS="$LIBS"
9233  LIBS="-ldnet_stub  $LIBS"
9234  cat > conftest.$ac_ext <<EOF
9235 -#line 59159 "configure"
9236 +#line 59463 "configure"
9237  #include "confdefs.h"
9238  /* Override any gcc2 internal prototype to avoid an error.  */
9239  /* We use char because int might match the return type of a gcc2
9240 @@ -59166,7 +59470,7 @@
9241  dnet_addr()
9242  ; return 0; }
9243  EOF
9244 -if { (eval echo configure:59170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9245 +if { (eval echo configure:59474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9246    rm -rf conftest*
9247    eval "ac_cv_lib_$ac_lib_var=yes"
9248  else
9249 @@ -59310,7 +59614,7 @@
9250  php_with_mysql=no
9251  
9252  echo $ac_n "checking for MySQL support""... $ac_c" 1>&6
9253 -echo "configure:59314: checking for MySQL support" >&5
9254 +echo "configure:59618: checking for MySQL support" >&5
9255  # Check whether --with-mysql or --without-mysql was given.
9256  if test "${with_mysql+set}" = set; then
9257    withval="$with_mysql"
9258 @@ -59357,7 +59661,7 @@
9259  php_with_mysql_sock=no
9260  
9261  echo $ac_n "checking for specified location of the MySQL UNIX socket""... $ac_c" 1>&6
9262 -echo "configure:59361: checking for specified location of the MySQL UNIX socket" >&5
9263 +echo "configure:59665: checking for specified location of the MySQL UNIX socket" >&5
9264  # Check whether --with-mysql-sock or --without-mysql-sock was given.
9265  if test "${with_mysql_sock+set}" = set; then
9266    withval="$with_mysql_sock"
9267 @@ -59384,7 +59688,7 @@
9268  php_with_zlib_dir=no
9269  
9270  echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
9271 -echo "configure:59388: checking for the location of libz" >&5
9272 +echo "configure:59692: checking for the location of libz" >&5
9273  # Check whether --with-zlib-dir or --without-zlib-dir was given.
9274  if test "${with_zlib_dir+set}" = set; then
9275    withval="$with_zlib_dir"
9276 @@ -59415,7 +59719,7 @@
9277  
9278  
9279    echo $ac_n "checking for MySQL UNIX socket location""... $ac_c" 1>&6
9280 -echo "configure:59419: checking for MySQL UNIX socket location" >&5
9281 +echo "configure:59723: checking for MySQL UNIX socket location" >&5
9282    if test "$PHP_MYSQL_SOCK" != "no" && test "$PHP_MYSQL_SOCK" != "yes"; then
9283      MYSQL_SOCK=$PHP_MYSQL_SOCK
9284      cat >> confdefs.h <<EOF
9285 @@ -59606,7 +59910,7 @@
9286    done
9287  
9288    echo $ac_n "checking for mysql_close in -l$MYSQL_LIBNAME""... $ac_c" 1>&6
9289 -echo "configure:59610: checking for mysql_close in -l$MYSQL_LIBNAME" >&5
9290 +echo "configure:59914: checking for mysql_close in -l$MYSQL_LIBNAME" >&5
9291  ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_close | sed 'y%./+-%__p_%'`
9292  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9293    echo $ac_n "(cached) $ac_c" 1>&6
9294 @@ -59614,7 +59918,7 @@
9295    ac_save_LIBS="$LIBS"
9296  LIBS="-l$MYSQL_LIBNAME  $LIBS"
9297  cat > conftest.$ac_ext <<EOF
9298 -#line 59618 "configure"
9299 +#line 59922 "configure"
9300  #include "confdefs.h"
9301  /* Override any gcc2 internal prototype to avoid an error.  */
9302  /* We use char because int might match the return type of a gcc2
9303 @@ -59625,7 +59929,7 @@
9304  mysql_close()
9305  ; return 0; }
9306  EOF
9307 -if { (eval echo configure:59629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9308 +if { (eval echo configure:59933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9309    rm -rf conftest*
9310    eval "ac_cv_lib_$ac_lib_var=yes"
9311  else
9312 @@ -59848,7 +60152,7 @@
9313    done
9314  
9315    echo $ac_n "checking for mysql_error in -l$MYSQL_LIBNAME""... $ac_c" 1>&6
9316 -echo "configure:59852: checking for mysql_error in -l$MYSQL_LIBNAME" >&5
9317 +echo "configure:60156: checking for mysql_error in -l$MYSQL_LIBNAME" >&5
9318  ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_error | sed 'y%./+-%__p_%'`
9319  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9320    echo $ac_n "(cached) $ac_c" 1>&6
9321 @@ -59856,7 +60160,7 @@
9322    ac_save_LIBS="$LIBS"
9323  LIBS="-l$MYSQL_LIBNAME  $LIBS"
9324  cat > conftest.$ac_ext <<EOF
9325 -#line 59860 "configure"
9326 +#line 60164 "configure"
9327  #include "confdefs.h"
9328  /* Override any gcc2 internal prototype to avoid an error.  */
9329  /* We use char because int might match the return type of a gcc2
9330 @@ -59867,7 +60171,7 @@
9331  mysql_error()
9332  ; return 0; }
9333  EOF
9334 -if { (eval echo configure:59871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9335 +if { (eval echo configure:60175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9336    rm -rf conftest*
9337    eval "ac_cv_lib_$ac_lib_var=yes"
9338  else
9339 @@ -60022,7 +60326,7 @@
9340    done
9341  
9342    echo $ac_n "checking for mysql_errno in -l$MYSQL_LIBNAME""... $ac_c" 1>&6
9343 -echo "configure:60026: checking for mysql_errno in -l$MYSQL_LIBNAME" >&5
9344 +echo "configure:60330: checking for mysql_errno in -l$MYSQL_LIBNAME" >&5
9345  ac_lib_var=`echo $MYSQL_LIBNAME'_'mysql_errno | sed 'y%./+-%__p_%'`
9346  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9347    echo $ac_n "(cached) $ac_c" 1>&6
9348 @@ -60030,7 +60334,7 @@
9349    ac_save_LIBS="$LIBS"
9350  LIBS="-l$MYSQL_LIBNAME  $LIBS"
9351  cat > conftest.$ac_ext <<EOF
9352 -#line 60034 "configure"
9353 +#line 60338 "configure"
9354  #include "confdefs.h"
9355  /* Override any gcc2 internal prototype to avoid an error.  */
9356  /* We use char because int might match the return type of a gcc2
9357 @@ -60041,7 +60345,7 @@
9358  mysql_errno()
9359  ; return 0; }
9360  EOF
9361 -if { (eval echo configure:60045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9362 +if { (eval echo configure:60349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9363    rm -rf conftest*
9364    eval "ac_cv_lib_$ac_lib_var=yes"
9365  else
9366 @@ -60523,7 +60827,7 @@
9367  php_with_mysqli=no
9368  
9369  echo $ac_n "checking for MySQLi support""... $ac_c" 1>&6
9370 -echo "configure:60527: checking for MySQLi support" >&5
9371 +echo "configure:60831: checking for MySQLi support" >&5
9372  # Check whether --with-mysqli or --without-mysqli was given.
9373  if test "${with_mysqli+set}" = set; then
9374    withval="$with_mysqli"
9375 @@ -60570,7 +60874,7 @@
9376  php_enable_embedded_mysqli=no
9377  
9378  echo $ac_n "checking whether to enable embedded MySQLi support""... $ac_c" 1>&6
9379 -echo "configure:60574: checking whether to enable embedded MySQLi support" >&5
9380 +echo "configure:60878: checking whether to enable embedded MySQLi support" >&5
9381  # Check whether --enable-embedded_mysqli or --disable-embedded_mysqli was given.
9382  if test "${enable_embedded_mysqli+set}" = set; then
9383    enableval="$enable_embedded_mysqli"
9384 @@ -60721,7 +61025,7 @@
9385    done
9386  
9387    echo $ac_n "checking for mysql_set_server_option in -l$MYSQL_LIB_NAME""... $ac_c" 1>&6
9388 -echo "configure:60725: checking for mysql_set_server_option in -l$MYSQL_LIB_NAME" >&5
9389 +echo "configure:61029: checking for mysql_set_server_option in -l$MYSQL_LIB_NAME" >&5
9390  ac_lib_var=`echo $MYSQL_LIB_NAME'_'mysql_set_server_option | sed 'y%./+-%__p_%'`
9391  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9392    echo $ac_n "(cached) $ac_c" 1>&6
9393 @@ -60729,7 +61033,7 @@
9394    ac_save_LIBS="$LIBS"
9395  LIBS="-l$MYSQL_LIB_NAME  $LIBS"
9396  cat > conftest.$ac_ext <<EOF
9397 -#line 60733 "configure"
9398 +#line 61037 "configure"
9399  #include "confdefs.h"
9400  /* Override any gcc2 internal prototype to avoid an error.  */
9401  /* We use char because int might match the return type of a gcc2
9402 @@ -60740,7 +61044,7 @@
9403  mysql_set_server_option()
9404  ; return 0; }
9405  EOF
9406 -if { (eval echo configure:60744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9407 +if { (eval echo configure:61048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9408    rm -rf conftest*
9409    eval "ac_cv_lib_$ac_lib_var=yes"
9410  else
9411 @@ -60988,7 +61292,7 @@
9412    done
9413  
9414    echo $ac_n "checking for mysql_stmt_field_count in -l$MYSQL_LIB_NAME""... $ac_c" 1>&6
9415 -echo "configure:60992: checking for mysql_stmt_field_count in -l$MYSQL_LIB_NAME" >&5
9416 +echo "configure:61296: checking for mysql_stmt_field_count in -l$MYSQL_LIB_NAME" >&5
9417  ac_lib_var=`echo $MYSQL_LIB_NAME'_'mysql_stmt_field_count | sed 'y%./+-%__p_%'`
9418  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9419    echo $ac_n "(cached) $ac_c" 1>&6
9420 @@ -60996,7 +61300,7 @@
9421    ac_save_LIBS="$LIBS"
9422  LIBS="-l$MYSQL_LIB_NAME  $LIBS"
9423  cat > conftest.$ac_ext <<EOF
9424 -#line 61000 "configure"
9425 +#line 61304 "configure"
9426  #include "confdefs.h"
9427  /* Override any gcc2 internal prototype to avoid an error.  */
9428  /* We use char because int might match the return type of a gcc2
9429 @@ -61007,7 +61311,7 @@
9430  mysql_stmt_field_count()
9431  ; return 0; }
9432  EOF
9433 -if { (eval echo configure:61011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9434 +if { (eval echo configure:61315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9435    rm -rf conftest*
9436    eval "ac_cv_lib_$ac_lib_var=yes"
9437  else
9438 @@ -61345,7 +61649,7 @@
9439  php_with_ncurses=no
9440  
9441  echo $ac_n "checking for ncurses support""... $ac_c" 1>&6
9442 -echo "configure:61349: checking for ncurses support" >&5
9443 +echo "configure:61653: checking for ncurses support" >&5
9444  # Check whether --with-ncurses or --without-ncurses was given.
9445  if test "${with_ncurses+set}" = set; then
9446    withval="$with_ncurses"
9447 @@ -61552,7 +61856,7 @@
9448    done
9449  
9450    echo $ac_n "checking for $LIBSYMBOL in -l$LIBNAME""... $ac_c" 1>&6
9451 -echo "configure:61556: checking for $LIBSYMBOL in -l$LIBNAME" >&5
9452 +echo "configure:61860: checking for $LIBSYMBOL in -l$LIBNAME" >&5
9453  ac_lib_var=`echo $LIBNAME'_'$LIBSYMBOL | sed 'y%./+-%__p_%'`
9454  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9455    echo $ac_n "(cached) $ac_c" 1>&6
9456 @@ -61560,7 +61864,7 @@
9457    ac_save_LIBS="$LIBS"
9458  LIBS="-l$LIBNAME  $LIBS"
9459  cat > conftest.$ac_ext <<EOF
9460 -#line 61564 "configure"
9461 +#line 61868 "configure"
9462  #include "confdefs.h"
9463  /* Override any gcc2 internal prototype to avoid an error.  */
9464  /* We use char because int might match the return type of a gcc2
9465 @@ -61571,7 +61875,7 @@
9466  $LIBSYMBOL()
9467  ; return 0; }
9468  EOF
9469 -if { (eval echo configure:61575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9470 +if { (eval echo configure:61879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9471    rm -rf conftest*
9472    eval "ac_cv_lib_$ac_lib_var=yes"
9473  else
9474 @@ -61790,7 +62094,7 @@
9475    done
9476  
9477    echo $ac_n "checking for new_panel in -lpanel""... $ac_c" 1>&6
9478 -echo "configure:61794: checking for new_panel in -lpanel" >&5
9479 +echo "configure:62098: checking for new_panel in -lpanel" >&5
9480  ac_lib_var=`echo panel'_'new_panel | sed 'y%./+-%__p_%'`
9481  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9482    echo $ac_n "(cached) $ac_c" 1>&6
9483 @@ -61798,7 +62102,7 @@
9484    ac_save_LIBS="$LIBS"
9485  LIBS="-lpanel  $LIBS"
9486  cat > conftest.$ac_ext <<EOF
9487 -#line 61802 "configure"
9488 +#line 62106 "configure"
9489  #include "confdefs.h"
9490  /* Override any gcc2 internal prototype to avoid an error.  */
9491  /* We use char because int might match the return type of a gcc2
9492 @@ -61809,7 +62113,7 @@
9493  new_panel()
9494  ; return 0; }
9495  EOF
9496 -if { (eval echo configure:61813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9497 +if { (eval echo configure:62117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9498    rm -rf conftest*
9499    eval "ac_cv_lib_$ac_lib_var=yes"
9500  else
9501 @@ -61957,7 +62261,7 @@
9502  
9503   
9504     echo $ac_n "checking for color_set in -l$LIBNAME""... $ac_c" 1>&6
9505 -echo "configure:61961: checking for color_set in -l$LIBNAME" >&5
9506 +echo "configure:62265: checking for color_set in -l$LIBNAME" >&5
9507  ac_lib_var=`echo $LIBNAME'_'color_set | sed 'y%./+-%__p_%'`
9508  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9509    echo $ac_n "(cached) $ac_c" 1>&6
9510 @@ -61965,7 +62269,7 @@
9511    ac_save_LIBS="$LIBS"
9512  LIBS="-l$LIBNAME  $LIBS"
9513  cat > conftest.$ac_ext <<EOF
9514 -#line 61969 "configure"
9515 +#line 62273 "configure"
9516  #include "confdefs.h"
9517  /* Override any gcc2 internal prototype to avoid an error.  */
9518  /* We use char because int might match the return type of a gcc2
9519 @@ -61976,7 +62280,7 @@
9520  color_set()
9521  ; return 0; }
9522  EOF
9523 -if { (eval echo configure:61980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9524 +if { (eval echo configure:62284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9525    rm -rf conftest*
9526    eval "ac_cv_lib_$ac_lib_var=yes"
9527  else
9528 @@ -62000,7 +62304,7 @@
9529  fi
9530  
9531     echo $ac_n "checking for slk_color in -l$LIBNAME""... $ac_c" 1>&6
9532 -echo "configure:62004: checking for slk_color in -l$LIBNAME" >&5
9533 +echo "configure:62308: checking for slk_color in -l$LIBNAME" >&5
9534  ac_lib_var=`echo $LIBNAME'_'slk_color | sed 'y%./+-%__p_%'`
9535  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9536    echo $ac_n "(cached) $ac_c" 1>&6
9537 @@ -62008,7 +62312,7 @@
9538    ac_save_LIBS="$LIBS"
9539  LIBS="-l$LIBNAME  $LIBS"
9540  cat > conftest.$ac_ext <<EOF
9541 -#line 62012 "configure"
9542 +#line 62316 "configure"
9543  #include "confdefs.h"
9544  /* Override any gcc2 internal prototype to avoid an error.  */
9545  /* We use char because int might match the return type of a gcc2
9546 @@ -62019,7 +62323,7 @@
9547  slk_color()
9548  ; return 0; }
9549  EOF
9550 -if { (eval echo configure:62023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9551 +if { (eval echo configure:62327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9552    rm -rf conftest*
9553    eval "ac_cv_lib_$ac_lib_var=yes"
9554  else
9555 @@ -62043,7 +62347,7 @@
9556  fi
9557  
9558     echo $ac_n "checking for assume_default_colors in -l$LIBNAME""... $ac_c" 1>&6
9559 -echo "configure:62047: checking for assume_default_colors in -l$LIBNAME" >&5
9560 +echo "configure:62351: checking for assume_default_colors in -l$LIBNAME" >&5
9561  ac_lib_var=`echo $LIBNAME'_'assume_default_colors | sed 'y%./+-%__p_%'`
9562  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9563    echo $ac_n "(cached) $ac_c" 1>&6
9564 @@ -62051,7 +62355,7 @@
9565    ac_save_LIBS="$LIBS"
9566  LIBS="-l$LIBNAME  $LIBS"
9567  cat > conftest.$ac_ext <<EOF
9568 -#line 62055 "configure"
9569 +#line 62359 "configure"
9570  #include "confdefs.h"
9571  /* Override any gcc2 internal prototype to avoid an error.  */
9572  /* We use char because int might match the return type of a gcc2
9573 @@ -62062,7 +62366,7 @@
9574  assume_default_colors()
9575  ; return 0; }
9576  EOF
9577 -if { (eval echo configure:62066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9578 +if { (eval echo configure:62370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9579    rm -rf conftest*
9580    eval "ac_cv_lib_$ac_lib_var=yes"
9581  else
9582 @@ -62086,7 +62390,7 @@
9583  fi
9584  
9585     echo $ac_n "checking for use_extended_names in -l$LIBNAME""... $ac_c" 1>&6
9586 -echo "configure:62090: checking for use_extended_names in -l$LIBNAME" >&5
9587 +echo "configure:62394: checking for use_extended_names in -l$LIBNAME" >&5
9588  ac_lib_var=`echo $LIBNAME'_'use_extended_names | sed 'y%./+-%__p_%'`
9589  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9590    echo $ac_n "(cached) $ac_c" 1>&6
9591 @@ -62094,7 +62398,7 @@
9592    ac_save_LIBS="$LIBS"
9593  LIBS="-l$LIBNAME  $LIBS"
9594  cat > conftest.$ac_ext <<EOF
9595 -#line 62098 "configure"
9596 +#line 62402 "configure"
9597  #include "confdefs.h"
9598  /* Override any gcc2 internal prototype to avoid an error.  */
9599  /* We use char because int might match the return type of a gcc2
9600 @@ -62105,7 +62409,7 @@
9601  use_extended_names()
9602  ; return 0; }
9603  EOF
9604 -if { (eval echo configure:62109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9605 +if { (eval echo configure:62413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9606    rm -rf conftest*
9607    eval "ac_cv_lib_$ac_lib_var=yes"
9608  else
9609 @@ -62437,7 +62741,7 @@
9610  php_with_oci8=no
9611  
9612  echo $ac_n "checking for Oracle (OCI8) support""... $ac_c" 1>&6
9613 -echo "configure:62441: checking for Oracle (OCI8) support" >&5
9614 +echo "configure:62745: checking for Oracle (OCI8) support" >&5
9615  # Check whether --with-oci8 or --without-oci8 was given.
9616  if test "${with_oci8+set}" = set; then
9617    withval="$with_oci8"
9618 @@ -62482,7 +62786,7 @@
9619  
9620  if test "$PHP_OCI8" != "no"; then 
9621    echo $ac_n "checking PHP version""... $ac_c" 1>&6
9622 -echo "configure:62486: checking PHP version" >&5
9623 +echo "configure:62790: checking PHP version" >&5
9624  
9625    tmp_version=$PHP_VERSION
9626    if test -z "$tmp_version"; then
9627 @@ -62536,7 +62840,7 @@
9628  if test "$PHP_OCI8" != "no" && test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
9629  
9630    echo $ac_n "checking Oracle Install Directory""... $ac_c" 1>&6
9631 -echo "configure:62540: checking Oracle Install Directory" >&5
9632 +echo "configure:62844: checking Oracle Install Directory" >&5
9633    if test "$PHP_OCI8" = "yes"; then
9634      OCI8_DIR=$ORACLE_HOME
9635    else
9636 @@ -62546,7 +62850,7 @@
9637  
9638    
9639    echo $ac_n "checking size of long int""... $ac_c" 1>&6
9640 -echo "configure:62550: checking size of long int" >&5
9641 +echo "configure:62854: checking size of long int" >&5
9642  if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
9643    echo $ac_n "(cached) $ac_c" 1>&6
9644  else
9645 @@ -62554,18 +62858,18 @@
9646    ac_cv_sizeof_long_int=4
9647  else
9648    cat > conftest.$ac_ext <<EOF
9649 -#line 62558 "configure"
9650 +#line 62862 "configure"
9651  #include "confdefs.h"
9652  #include <stdio.h>
9653 -int main()
9654 +main()
9655  {
9656    FILE *f=fopen("conftestval", "w");
9657 -  if (!f) return(1);
9658 +  if (!f) exit(1);
9659    fprintf(f, "%d\n", sizeof(long int));
9660 -  return(0);
9661 +  exit(0);
9662  }
9663  EOF
9664 -if { (eval echo configure:62569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9665 +if { (eval echo configure:62873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9666  then
9667    ac_cv_sizeof_long_int=`cat conftestval`
9668  else
9669 @@ -62585,7 +62889,7 @@
9670  
9671  
9672    echo $ac_n "checking if we're on a 64-bit platform""... $ac_c" 1>&6
9673 -echo "configure:62589: checking if we're on a 64-bit platform" >&5
9674 +echo "configure:62893: checking if we're on a 64-bit platform" >&5
9675    if test "$ac_cv_sizeof_long_int" = "4" ; then
9676      echo "$ac_t""no" 1>&6
9677      TMP_OCI8_LIB_DIR=lib32 
9678 @@ -62595,7 +62899,7 @@
9679    fi
9680  
9681    echo $ac_n "checking OCI8 libraries dir""... $ac_c" 1>&6
9682 -echo "configure:62599: checking OCI8 libraries dir" >&5
9683 +echo "configure:62903: checking OCI8 libraries dir" >&5
9684    if test -d "$OCI8_DIR/lib" && test ! -d "$OCI8_DIR/lib32"; then
9685      OCI8_LIB_DIR=lib
9686    elif test ! -d "$OCI8_DIR/lib" && test -d "$OCI8_DIR/lib32"; then
9687 @@ -62929,7 +63233,7 @@
9688  
9689    
9690    echo $ac_n "checking Oracle version""... $ac_c" 1>&6
9691 -echo "configure:62933: checking Oracle version" >&5
9692 +echo "configure:63237: checking Oracle version" >&5
9693    if test -s "$OCI8_DIR/orainst/unix.rgs"; then
9694      OCI8_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | $PHP_OCI8_SED 's/  */:/g' | cut -d: -f 6 | cut -c 2-4`
9695      test -z "$OCI8_VERSION" && OCI8_VERSION=7.3
9696 @@ -63444,7 +63748,7 @@
9697    done
9698  
9699    echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6
9700 -echo "configure:63448: checking for OCIEnvCreate in -lclntsh" >&5
9701 +echo "configure:63752: checking for OCIEnvCreate in -lclntsh" >&5
9702  ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'`
9703  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9704    echo $ac_n "(cached) $ac_c" 1>&6
9705 @@ -63452,7 +63756,7 @@
9706    ac_save_LIBS="$LIBS"
9707  LIBS="-lclntsh  $LIBS"
9708  cat > conftest.$ac_ext <<EOF
9709 -#line 63456 "configure"
9710 +#line 63760 "configure"
9711  #include "confdefs.h"
9712  /* Override any gcc2 internal prototype to avoid an error.  */
9713  /* We use char because int might match the return type of a gcc2
9714 @@ -63463,7 +63767,7 @@
9715  OCIEnvCreate()
9716  ; return 0; }
9717  EOF
9718 -if { (eval echo configure:63467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9719 +if { (eval echo configure:63771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9720    rm -rf conftest*
9721    eval "ac_cv_lib_$ac_lib_var=yes"
9722  else
9723 @@ -63597,7 +63901,7 @@
9724    done
9725  
9726    echo $ac_n "checking for OCIStmtPrepare2 in -lclntsh""... $ac_c" 1>&6
9727 -echo "configure:63601: checking for OCIStmtPrepare2 in -lclntsh" >&5
9728 +echo "configure:63905: checking for OCIStmtPrepare2 in -lclntsh" >&5
9729  ac_lib_var=`echo clntsh'_'OCIStmtPrepare2 | sed 'y%./+-%__p_%'`
9730  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9731    echo $ac_n "(cached) $ac_c" 1>&6
9732 @@ -63605,7 +63909,7 @@
9733    ac_save_LIBS="$LIBS"
9734  LIBS="-lclntsh  $LIBS"
9735  cat > conftest.$ac_ext <<EOF
9736 -#line 63609 "configure"
9737 +#line 63913 "configure"
9738  #include "confdefs.h"
9739  /* Override any gcc2 internal prototype to avoid an error.  */
9740  /* We use char because int might match the return type of a gcc2
9741 @@ -63616,7 +63920,7 @@
9742  OCIStmtPrepare2()
9743  ; return 0; }
9744  EOF
9745 -if { (eval echo configure:63620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9746 +if { (eval echo configure:63924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9747    rm -rf conftest*
9748    eval "ac_cv_lib_$ac_lib_var=yes"
9749  else
9750 @@ -63814,7 +64118,7 @@
9751    done
9752  
9753    echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6
9754 -echo "configure:63818: checking for OCIEnvCreate in -lclntsh" >&5
9755 +echo "configure:64122: checking for OCIEnvCreate in -lclntsh" >&5
9756  ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'`
9757  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9758    echo $ac_n "(cached) $ac_c" 1>&6
9759 @@ -63822,7 +64126,7 @@
9760    ac_save_LIBS="$LIBS"
9761  LIBS="-lclntsh  $LIBS"
9762  cat > conftest.$ac_ext <<EOF
9763 -#line 63826 "configure"
9764 +#line 64130 "configure"
9765  #include "confdefs.h"
9766  /* Override any gcc2 internal prototype to avoid an error.  */
9767  /* We use char because int might match the return type of a gcc2
9768 @@ -63833,7 +64137,7 @@
9769  OCIEnvCreate()
9770  ; return 0; }
9771  EOF
9772 -if { (eval echo configure:63837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9773 +if { (eval echo configure:64141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9774    rm -rf conftest*
9775    eval "ac_cv_lib_$ac_lib_var=yes"
9776  else
9777 @@ -63967,7 +64271,7 @@
9778    done
9779  
9780    echo $ac_n "checking for OCIStmtPrepare2 in -lclntsh""... $ac_c" 1>&6
9781 -echo "configure:63971: checking for OCIStmtPrepare2 in -lclntsh" >&5
9782 +echo "configure:64275: checking for OCIStmtPrepare2 in -lclntsh" >&5
9783  ac_lib_var=`echo clntsh'_'OCIStmtPrepare2 | sed 'y%./+-%__p_%'`
9784  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9785    echo $ac_n "(cached) $ac_c" 1>&6
9786 @@ -63975,7 +64279,7 @@
9787    ac_save_LIBS="$LIBS"
9788  LIBS="-lclntsh  $LIBS"
9789  cat > conftest.$ac_ext <<EOF
9790 -#line 63979 "configure"
9791 +#line 64283 "configure"
9792  #include "confdefs.h"
9793  /* Override any gcc2 internal prototype to avoid an error.  */
9794  /* We use char because int might match the return type of a gcc2
9795 @@ -63986,7 +64290,7 @@
9796  OCIStmtPrepare2()
9797  ; return 0; }
9798  EOF
9799 -if { (eval echo configure:63990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9800 +if { (eval echo configure:64294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9801    rm -rf conftest*
9802    eval "ac_cv_lib_$ac_lib_var=yes"
9803  else
9804 @@ -64026,7 +64330,7 @@
9805    old_CPPFLAGS=$CPPFLAGS
9806    CPPFLAGS=$OCI8_INCLUDES
9807    cat > conftest.$ac_ext <<EOF
9808 -#line 64030 "configure"
9809 +#line 64334 "configure"
9810  #include "confdefs.h"
9811  
9812  #include <oci.h>
9813 @@ -64221,7 +64525,7 @@
9814    done
9815  
9816    echo $ac_n "checking for OCIEnvNlsCreate in -lclntsh""... $ac_c" 1>&6
9817 -echo "configure:64225: checking for OCIEnvNlsCreate in -lclntsh" >&5
9818 +echo "configure:64529: checking for OCIEnvNlsCreate in -lclntsh" >&5
9819  ac_lib_var=`echo clntsh'_'OCIEnvNlsCreate | sed 'y%./+-%__p_%'`
9820  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9821    echo $ac_n "(cached) $ac_c" 1>&6
9822 @@ -64229,7 +64533,7 @@
9823    ac_save_LIBS="$LIBS"
9824  LIBS="-lclntsh  $LIBS"
9825  cat > conftest.$ac_ext <<EOF
9826 -#line 64233 "configure"
9827 +#line 64537 "configure"
9828  #include "confdefs.h"
9829  /* Override any gcc2 internal prototype to avoid an error.  */
9830  /* We use char because int might match the return type of a gcc2
9831 @@ -64240,7 +64544,7 @@
9832  OCIEnvNlsCreate()
9833  ; return 0; }
9834  EOF
9835 -if { (eval echo configure:64244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9836 +if { (eval echo configure:64548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9837    rm -rf conftest*
9838    eval "ac_cv_lib_$ac_lib_var=yes"
9839  else
9840 @@ -64357,7 +64661,7 @@
9841    done
9842  
9843    echo $ac_n "checking for OCINlsCharSetNameToId in -lclntsh""... $ac_c" 1>&6
9844 -echo "configure:64361: checking for OCINlsCharSetNameToId in -lclntsh" >&5
9845 +echo "configure:64665: checking for OCINlsCharSetNameToId in -lclntsh" >&5
9846  ac_lib_var=`echo clntsh'_'OCINlsCharSetNameToId | sed 'y%./+-%__p_%'`
9847  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9848    echo $ac_n "(cached) $ac_c" 1>&6
9849 @@ -64365,7 +64669,7 @@
9850    ac_save_LIBS="$LIBS"
9851  LIBS="-lclntsh  $LIBS"
9852  cat > conftest.$ac_ext <<EOF
9853 -#line 64369 "configure"
9854 +#line 64673 "configure"
9855  #include "confdefs.h"
9856  /* Override any gcc2 internal prototype to avoid an error.  */
9857  /* We use char because int might match the return type of a gcc2
9858 @@ -64376,7 +64680,7 @@
9859  OCINlsCharSetNameToId()
9860  ; return 0; }
9861  EOF
9862 -if { (eval echo configure:64380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9863 +if { (eval echo configure:64684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9864    rm -rf conftest*
9865    eval "ac_cv_lib_$ac_lib_var=yes"
9866  else
9867 @@ -64523,7 +64827,7 @@
9868    done
9869  
9870    echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6
9871 -echo "configure:64527: checking for OCIEnvCreate in -lclntsh" >&5
9872 +echo "configure:64831: checking for OCIEnvCreate in -lclntsh" >&5
9873  ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'`
9874  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9875    echo $ac_n "(cached) $ac_c" 1>&6
9876 @@ -64531,7 +64835,7 @@
9877    ac_save_LIBS="$LIBS"
9878  LIBS="-lclntsh  $LIBS"
9879  cat > conftest.$ac_ext <<EOF
9880 -#line 64535 "configure"
9881 +#line 64839 "configure"
9882  #include "confdefs.h"
9883  /* Override any gcc2 internal prototype to avoid an error.  */
9884  /* We use char because int might match the return type of a gcc2
9885 @@ -64542,7 +64846,7 @@
9886  OCIEnvCreate()
9887  ; return 0; }
9888  EOF
9889 -if { (eval echo configure:64546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9890 +if { (eval echo configure:64850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9891    rm -rf conftest*
9892    eval "ac_cv_lib_$ac_lib_var=yes"
9893  else
9894 @@ -64676,7 +64980,7 @@
9895    done
9896  
9897    echo $ac_n "checking for OCIStmtPrepare2 in -lclntsh""... $ac_c" 1>&6
9898 -echo "configure:64680: checking for OCIStmtPrepare2 in -lclntsh" >&5
9899 +echo "configure:64984: checking for OCIStmtPrepare2 in -lclntsh" >&5
9900  ac_lib_var=`echo clntsh'_'OCIStmtPrepare2 | sed 'y%./+-%__p_%'`
9901  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9902    echo $ac_n "(cached) $ac_c" 1>&6
9903 @@ -64684,7 +64988,7 @@
9904    ac_save_LIBS="$LIBS"
9905  LIBS="-lclntsh  $LIBS"
9906  cat > conftest.$ac_ext <<EOF
9907 -#line 64688 "configure"
9908 +#line 64992 "configure"
9909  #include "confdefs.h"
9910  /* Override any gcc2 internal prototype to avoid an error.  */
9911  /* We use char because int might match the return type of a gcc2
9912 @@ -64695,7 +64999,7 @@
9913  OCIStmtPrepare2()
9914  ; return 0; }
9915  EOF
9916 -if { (eval echo configure:64699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9917 +if { (eval echo configure:65003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9918    rm -rf conftest*
9919    eval "ac_cv_lib_$ac_lib_var=yes"
9920  else
9921 @@ -64829,7 +65133,7 @@
9922    done
9923  
9924    echo $ac_n "checking for OCILobRead2 in -lclntsh""... $ac_c" 1>&6
9925 -echo "configure:64833: checking for OCILobRead2 in -lclntsh" >&5
9926 +echo "configure:65137: checking for OCILobRead2 in -lclntsh" >&5
9927  ac_lib_var=`echo clntsh'_'OCILobRead2 | sed 'y%./+-%__p_%'`
9928  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9929    echo $ac_n "(cached) $ac_c" 1>&6
9930 @@ -64837,7 +65141,7 @@
9931    ac_save_LIBS="$LIBS"
9932  LIBS="-lclntsh  $LIBS"
9933  cat > conftest.$ac_ext <<EOF
9934 -#line 64841 "configure"
9935 +#line 65145 "configure"
9936  #include "confdefs.h"
9937  /* Override any gcc2 internal prototype to avoid an error.  */
9938  /* We use char because int might match the return type of a gcc2
9939 @@ -64848,7 +65152,7 @@
9940  OCILobRead2()
9941  ; return 0; }
9942  EOF
9943 -if { (eval echo configure:64852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9944 +if { (eval echo configure:65156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9945    rm -rf conftest*
9946    eval "ac_cv_lib_$ac_lib_var=yes"
9947  else
9948 @@ -65080,7 +65384,7 @@
9949    done
9950  
9951    echo $ac_n "checking for OCILobIsTemporary in -lclntsh""... $ac_c" 1>&6
9952 -echo "configure:65084: checking for OCILobIsTemporary in -lclntsh" >&5
9953 +echo "configure:65388: checking for OCILobIsTemporary in -lclntsh" >&5
9954  ac_lib_var=`echo clntsh'_'OCILobIsTemporary | sed 'y%./+-%__p_%'`
9955  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9956    echo $ac_n "(cached) $ac_c" 1>&6
9957 @@ -65088,7 +65392,7 @@
9958    ac_save_LIBS="$LIBS"
9959  LIBS="-lclntsh  $LIBS"
9960  cat > conftest.$ac_ext <<EOF
9961 -#line 65092 "configure"
9962 +#line 65396 "configure"
9963  #include "confdefs.h"
9964  /* Override any gcc2 internal prototype to avoid an error.  */
9965  /* We use char because int might match the return type of a gcc2
9966 @@ -65099,7 +65403,7 @@
9967  OCILobIsTemporary()
9968  ; return 0; }
9969  EOF
9970 -if { (eval echo configure:65103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9971 +if { (eval echo configure:65407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9972    rm -rf conftest*
9973    eval "ac_cv_lib_$ac_lib_var=yes"
9974  else
9975 @@ -65229,7 +65533,7 @@
9976    done
9977  
9978    echo $ac_n "checking for OCILobIsTemporary in -locijdbc8""... $ac_c" 1>&6
9979 -echo "configure:65233: checking for OCILobIsTemporary in -locijdbc8" >&5
9980 +echo "configure:65537: checking for OCILobIsTemporary in -locijdbc8" >&5
9981  ac_lib_var=`echo ocijdbc8'_'OCILobIsTemporary | sed 'y%./+-%__p_%'`
9982  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9983    echo $ac_n "(cached) $ac_c" 1>&6
9984 @@ -65237,7 +65541,7 @@
9985    ac_save_LIBS="$LIBS"
9986  LIBS="-locijdbc8  $LIBS"
9987  cat > conftest.$ac_ext <<EOF
9988 -#line 65241 "configure"
9989 +#line 65545 "configure"
9990  #include "confdefs.h"
9991  /* Override any gcc2 internal prototype to avoid an error.  */
9992  /* We use char because int might match the return type of a gcc2
9993 @@ -65248,7 +65552,7 @@
9994  OCILobIsTemporary()
9995  ; return 0; }
9996  EOF
9997 -if { (eval echo configure:65252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9998 +if { (eval echo configure:65556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9999    rm -rf conftest*
10000    eval "ac_cv_lib_$ac_lib_var=yes"
10001  else
10002 @@ -65409,7 +65713,7 @@
10003    done
10004  
10005    echo $ac_n "checking for OCICollAssign in -lclntsh""... $ac_c" 1>&6
10006 -echo "configure:65413: checking for OCICollAssign in -lclntsh" >&5
10007 +echo "configure:65717: checking for OCICollAssign in -lclntsh" >&5
10008  ac_lib_var=`echo clntsh'_'OCICollAssign | sed 'y%./+-%__p_%'`
10009  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10010    echo $ac_n "(cached) $ac_c" 1>&6
10011 @@ -65417,7 +65721,7 @@
10012    ac_save_LIBS="$LIBS"
10013  LIBS="-lclntsh  $LIBS"
10014  cat > conftest.$ac_ext <<EOF
10015 -#line 65421 "configure"
10016 +#line 65725 "configure"
10017  #include "confdefs.h"
10018  /* Override any gcc2 internal prototype to avoid an error.  */
10019  /* We use char because int might match the return type of a gcc2
10020 @@ -65428,7 +65732,7 @@
10021  OCICollAssign()
10022  ; return 0; }
10023  EOF
10024 -if { (eval echo configure:65432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10025 +if { (eval echo configure:65736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10026    rm -rf conftest*
10027    eval "ac_cv_lib_$ac_lib_var=yes"
10028  else
10029 @@ -66054,7 +66358,7 @@
10030  elif test "$PHP_OCI8" != "no" && test "$PHP_OCI8_INSTANT_CLIENT" != "no"; then
10031  
10032    echo $ac_n "checking Oracle Instant Client directory""... $ac_c" 1>&6
10033 -echo "configure:66058: checking Oracle Instant Client directory" >&5
10034 +echo "configure:66362: checking Oracle Instant Client directory" >&5
10035    if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then
10036      PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client/lib  2> /dev/null | tail -1`
10037      if test -z "$PHP_OCI8_INSTANT_CLIENT"; then
10038 @@ -66066,7 +66370,7 @@
10039    OCI8_DIR=$PHP_OCI8_INSTANT_CLIENT
10040  
10041    echo $ac_n "checking Oracle Instant Client SDK header directory""... $ac_c" 1>&6
10042 -echo "configure:66070: checking Oracle Instant Client SDK header directory" >&5
10043 +echo "configure:66374: checking Oracle Instant Client SDK header directory" >&5
10044  
10045    OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client/lib/*$!/usr/include/oracle/\1/client!'`
10046  
10047 @@ -66275,7 +66579,7 @@
10048  
10049    
10050    echo $ac_n "checking Oracle Instant Client version""... $ac_c" 1>&6
10051 -echo "configure:66279: checking Oracle Instant Client version" >&5
10052 +echo "configure:66583: checking Oracle Instant Client version" >&5
10053    if test -f $PHP_OCI8_INSTANT_CLIENT/libnnz11.$SHLIB_SUFFIX_NAME; then
10054      if test -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then
10055        if test ! -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME; then
10056 @@ -66769,7 +67073,7 @@
10057  
10058    if test "$PHP_ADABAS" != "no"; then
10059      echo $ac_n "checking for Adabas support""... $ac_c" 1>&6
10060 -echo "configure:66773: checking for Adabas support" >&5
10061 +echo "configure:67077: checking for Adabas support" >&5
10062      if test "$PHP_ADABAS" = "yes"; then
10063        PHP_ADABAS=/usr/local
10064      fi
10065 @@ -66975,7 +67279,7 @@
10066  
10067    if test "$PHP_SAPDB" != "no"; then
10068      echo $ac_n "checking for SAP DB support""... $ac_c" 1>&6
10069 -echo "configure:66979: checking for SAP DB support" >&5
10070 +echo "configure:67283: checking for SAP DB support" >&5
10071      if test "$PHP_SAPDB" = "yes"; then
10072        PHP_SAPDB=/usr/local
10073      fi
10074 @@ -67111,7 +67415,7 @@
10075  
10076    if test "$PHP_SOLID" != "no"; then
10077      echo $ac_n "checking for Solid support""... $ac_c" 1>&6
10078 -echo "configure:67115: checking for Solid support" >&5
10079 +echo "configure:67419: checking for Solid support" >&5
10080      if test "$PHP_SOLID" = "yes"; then
10081        PHP_SOLID=/usr/local/solid
10082      fi
10083 @@ -67138,7 +67442,7 @@
10084      echo "$ac_t""$ext_output" 1>&6
10085      
10086    echo $ac_n "checking Solid library file""... $ac_c" 1>&6
10087 -echo "configure:67142: checking Solid library file" >&5  
10088 +echo "configure:67446: checking Solid library file" >&5  
10089    ac_solid_uname_r=`uname -r 2>/dev/null`
10090    ac_solid_uname_s=`uname -s 2>/dev/null`
10091    case $ac_solid_uname_s in
10092 @@ -67262,7 +67566,7 @@
10093  
10094    if test "$PHP_IBM_DB2" != "no"; then
10095      echo $ac_n "checking for IBM DB2 support""... $ac_c" 1>&6
10096 -echo "configure:67266: checking for IBM DB2 support" >&5
10097 +echo "configure:67570: checking for IBM DB2 support" >&5
10098      if test "$PHP_IBM_DB2" = "yes"; then
10099        ODBC_INCDIR=/home/db2inst1/sqllib/include
10100        ODBC_LIBDIR=/home/db2inst1/sqllib/lib
10101 @@ -67293,7 +67597,7 @@
10102    
10103  else
10104    cat > conftest.$ac_ext <<EOF
10105 -#line 67297 "configure"
10106 +#line 67601 "configure"
10107  #include "confdefs.h"
10108  
10109      
10110 @@ -67304,7 +67608,7 @@
10111      }
10112    
10113  EOF
10114 -if { (eval echo configure:67308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10115 +if { (eval echo configure:67612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10116  then
10117    
10118      LIBS=$old_LIBS
10119 @@ -67388,7 +67692,7 @@
10120  
10121    if test "$PHP_ODBCROUTER" != "no"; then
10122      echo $ac_n "checking for ODBCRouter.com support""... $ac_c" 1>&6
10123 -echo "configure:67392: checking for ODBCRouter.com support" >&5
10124 +echo "configure:67696: checking for ODBCRouter.com support" >&5
10125      if test "$PHP_ODBCROUTER" = "yes"; then
10126        PHP_ODBCROUTER=/usr
10127      fi
10128 @@ -67455,7 +67759,7 @@
10129  
10130    if test "$PHP_EMPRESS" != "no"; then
10131      echo $ac_n "checking for Empress support""... $ac_c" 1>&6
10132 -echo "configure:67459: checking for Empress support" >&5
10133 +echo "configure:67763: checking for Empress support" >&5
10134      if test "$PHP_EMPRESS" = "yes"; then
10135        ODBC_INCDIR=$EMPRESSPATH/include/odbc
10136        ODBC_LIBDIR=$EMPRESSPATH/shlib
10137 @@ -67473,7 +67777,7 @@
10138      echo "$ac_t""$ext_output" 1>&6
10139      
10140    echo $ac_n "checking Empress library file""... $ac_c" 1>&6
10141 -echo "configure:67477: checking Empress library file" >&5
10142 +echo "configure:67781: checking Empress library file" >&5
10143    ODBC_LIBS=`echo $ODBC_LIBDIR/libempodbccl.so | cut -d' ' -f1`
10144    if test ! -f $ODBC_LIBS; then
10145      ODBC_LIBS=`echo $ODBC_LIBDIR/libempodbccl.so | cut -d' ' -f1`
10146 @@ -67532,7 +67836,7 @@
10147  
10148    if test "$PHP_EMPRESS_BCS" != "no"; then
10149      echo $ac_n "checking for Empress local access support""... $ac_c" 1>&6
10150 -echo "configure:67536: checking for Empress local access support" >&5
10151 +echo "configure:67840: checking for Empress local access support" >&5
10152      if test "$PHP_EMPRESS_BCS" = "yes"; then
10153        ODBC_INCDIR=$EMPRESSPATH/include/odbc
10154        ODBC_LIBDIR=$EMPRESSPATH/shlib
10155 @@ -67566,7 +67870,7 @@
10156      echo "$ac_t""$ext_output" 1>&6
10157      
10158    echo $ac_n "checking Empress local access library file""... $ac_c" 1>&6
10159 -echo "configure:67570: checking Empress local access library file" >&5
10160 +echo "configure:67874: checking Empress local access library file" >&5
10161    ODBCBCS_LIBS=`echo $ODBC_LIBDIR/libempodbcbcs.a | cut -d' ' -f1`
10162    if test ! -f $ODBCBCS_LIBS; then
10163      ODBCBCS_LIBS=`echo $ODBC_LIBDIR/libempodbcbcs.a | cut -d' ' -f1`
10164 @@ -67625,7 +67929,7 @@
10165    
10166    if test "$PHP_BIRDSTEP" != "no"; then
10167      echo $ac_n "checking for Birdstep support""... $ac_c" 1>&6
10168 -echo "configure:67629: checking for Birdstep support" >&5
10169 +echo "configure:67933: checking for Birdstep support" >&5
10170      if test "$PHP_BIRDSTEP" = "yes"; then
10171          ODBC_INCDIR=/usr/local/birdstep/include
10172          ODBC_LIBDIR=/usr/local/birdstep/lib
10173 @@ -67740,7 +68044,7 @@
10174  
10175    if test "$PHP_CUSTOM_ODBC" != "no"; then
10176      echo $ac_n "checking for a custom ODBC support""... $ac_c" 1>&6
10177 -echo "configure:67744: checking for a custom ODBC support" >&5
10178 +echo "configure:68048: checking for a custom ODBC support" >&5
10179      if test "$PHP_CUSTOM_ODBC" = "yes"; then
10180        PHP_CUSTOM_ODBC=/usr/local
10181      fi
10182 @@ -67807,7 +68111,7 @@
10183  
10184    if test "$PHP_IODBC" != "no"; then
10185      echo $ac_n "checking for iODBC support""... $ac_c" 1>&6
10186 -echo "configure:67811: checking for iODBC support" >&5
10187 +echo "configure:68115: checking for iODBC support" >&5
10188      if test "$PHP_IODBC" = "yes"; then
10189        PHP_IODBC=/usr/local
10190      fi
10191 @@ -67956,7 +68260,7 @@
10192  
10193    if test "$PHP_ESOOB" != "no"; then
10194      echo $ac_n "checking for Easysoft ODBC-ODBC Bridge support""... $ac_c" 1>&6
10195 -echo "configure:67960: checking for Easysoft ODBC-ODBC Bridge support" >&5
10196 +echo "configure:68264: checking for Easysoft ODBC-ODBC Bridge support" >&5
10197      if test "$PHP_ESOOB" = "yes"; then
10198        PHP_ESOOB=/usr/local/easysoft/oob/client
10199      fi
10200 @@ -68023,7 +68327,7 @@
10201  
10202    if test "$PHP_UNIXODBC" != "no"; then
10203      echo $ac_n "checking for unixODBC support""... $ac_c" 1>&6
10204 -echo "configure:68027: checking for unixODBC support" >&5
10205 +echo "configure:68331: checking for unixODBC support" >&5
10206      if test "$PHP_UNIXODBC" = "yes"; then
10207        PHP_UNIXODBC=/usr/local
10208      fi
10209 @@ -68095,7 +68399,7 @@
10210  
10211    if test "$PHP_DBMAKER" != "no"; then
10212      echo $ac_n "checking for DBMaker support""... $ac_c" 1>&6
10213 -echo "configure:68099: checking for DBMaker support" >&5
10214 +echo "configure:68403: checking for DBMaker support" >&5
10215      if test "$PHP_DBMAKER" = "yes"; then
10216        # find dbmaker's home directory
10217        DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | $AWK -F: '{print $6}'`
10218 @@ -68647,7 +68951,7 @@
10219  php_enable_pcntl=no
10220  
10221  echo $ac_n "checking whether to enable pcntl support""... $ac_c" 1>&6
10222 -echo "configure:68651: checking whether to enable pcntl support" >&5
10223 +echo "configure:68955: checking whether to enable pcntl support" >&5
10224  # Check whether --enable-pcntl or --disable-pcntl was given.
10225  if test "${enable_pcntl+set}" = set; then
10226    enableval="$enable_pcntl"
10227 @@ -68695,12 +68999,12 @@
10228    for ac_func in fork
10229  do
10230  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10231 -echo "configure:68699: checking for $ac_func" >&5
10232 +echo "configure:69003: checking for $ac_func" >&5
10233  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10234    echo $ac_n "(cached) $ac_c" 1>&6
10235  else
10236    cat > conftest.$ac_ext <<EOF
10237 -#line 68704 "configure"
10238 +#line 69008 "configure"
10239  #include "confdefs.h"
10240  /* System header to define __stub macros and hopefully few prototypes,
10241      which can conflict with char $ac_func(); below.  */
10242 @@ -68723,7 +69027,7 @@
10243  
10244  ; return 0; }
10245  EOF
10246 -if { (eval echo configure:68727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10247 +if { (eval echo configure:69031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10248    rm -rf conftest*
10249    eval "ac_cv_func_$ac_func=yes"
10250  else
10251 @@ -68754,12 +69058,12 @@
10252    for ac_func in waitpid
10253  do
10254  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10255 -echo "configure:68758: checking for $ac_func" >&5
10256 +echo "configure:69062: checking for $ac_func" >&5
10257  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10258    echo $ac_n "(cached) $ac_c" 1>&6
10259  else
10260    cat > conftest.$ac_ext <<EOF
10261 -#line 68763 "configure"
10262 +#line 69067 "configure"
10263  #include "confdefs.h"
10264  /* System header to define __stub macros and hopefully few prototypes,
10265      which can conflict with char $ac_func(); below.  */
10266 @@ -68782,7 +69086,7 @@
10267  
10268  ; return 0; }
10269  EOF
10270 -if { (eval echo configure:68786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10271 +if { (eval echo configure:69090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10272    rm -rf conftest*
10273    eval "ac_cv_func_$ac_func=yes"
10274  else
10275 @@ -68813,12 +69117,12 @@
10276    for ac_func in sigaction
10277  do
10278  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10279 -echo "configure:68817: checking for $ac_func" >&5
10280 +echo "configure:69121: checking for $ac_func" >&5
10281  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10282    echo $ac_n "(cached) $ac_c" 1>&6
10283  else
10284    cat > conftest.$ac_ext <<EOF
10285 -#line 68822 "configure"
10286 +#line 69126 "configure"
10287  #include "confdefs.h"
10288  /* System header to define __stub macros and hopefully few prototypes,
10289      which can conflict with char $ac_func(); below.  */
10290 @@ -68841,7 +69145,7 @@
10291  
10292  ; return 0; }
10293  EOF
10294 -if { (eval echo configure:68845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10295 +if { (eval echo configure:69149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10296    rm -rf conftest*
10297    eval "ac_cv_func_$ac_func=yes"
10298  else
10299 @@ -68872,12 +69176,12 @@
10300    for ac_func in getpriority setpriority wait3
10301  do
10302  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10303 -echo "configure:68876: checking for $ac_func" >&5
10304 +echo "configure:69180: checking for $ac_func" >&5
10305  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10306    echo $ac_n "(cached) $ac_c" 1>&6
10307  else
10308    cat > conftest.$ac_ext <<EOF
10309 -#line 68881 "configure"
10310 +#line 69185 "configure"
10311  #include "confdefs.h"
10312  /* System header to define __stub macros and hopefully few prototypes,
10313      which can conflict with char $ac_func(); below.  */
10314 @@ -68900,7 +69204,7 @@
10315  
10316  ; return 0; }
10317  EOF
10318 -if { (eval echo configure:68904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10319 +if { (eval echo configure:69208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10320    rm -rf conftest*
10321    eval "ac_cv_func_$ac_func=yes"
10322  else
10323 @@ -69215,7 +69519,7 @@
10324  php_enable_pdo=yes
10325  
10326  echo $ac_n "checking whether to enable PDO support""... $ac_c" 1>&6
10327 -echo "configure:69219: checking whether to enable PDO support" >&5
10328 +echo "configure:69523: checking whether to enable PDO support" >&5
10329  # Check whether --enable-pdo or --disable-pdo was given.
10330  if test "${enable_pdo+set}" = set; then
10331    enableval="$enable_pdo"
10332 @@ -69640,7 +69944,7 @@
10333  php_with_pdo_dblib=no
10334  
10335  echo $ac_n "checking for PDO_DBLIB support via FreeTDS""... $ac_c" 1>&6
10336 -echo "configure:69644: checking for PDO_DBLIB support via FreeTDS" >&5
10337 +echo "configure:69948: checking for PDO_DBLIB support via FreeTDS" >&5
10338  # Check whether --with-pdo-dblib or --without-pdo-dblib was given.
10339  if test "${with_pdo_dblib+set}" = set; then
10340    withval="$with_pdo_dblib"
10341 @@ -69857,13 +70161,13 @@
10342    
10343      
10344    echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
10345 -echo "configure:69861: checking for PDO includes" >&5
10346 +echo "configure:70165: checking for PDO includes" >&5
10347  if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
10348    echo $ac_n "(cached) $ac_c" 1>&6
10349  else
10350    
10351      echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
10352 -echo "configure:69867: checking for PDO includes" >&5
10353 +echo "configure:70171: checking for PDO includes" >&5
10354      if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
10355        pdo_inc_path=$abs_srcdir/ext
10356      elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
10357 @@ -70166,7 +70470,7 @@
10358    fi
10359  
10360    echo $ac_n "checking for dnet_addr in -ldnet_stub""... $ac_c" 1>&6
10361 -echo "configure:70170: checking for dnet_addr in -ldnet_stub" >&5
10362 +echo "configure:70474: checking for dnet_addr in -ldnet_stub" >&5
10363  ac_lib_var=`echo dnet_stub'_'dnet_addr | sed 'y%./+-%__p_%'`
10364  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10365    echo $ac_n "(cached) $ac_c" 1>&6
10366 @@ -70174,7 +70478,7 @@
10367    ac_save_LIBS="$LIBS"
10368  LIBS="-ldnet_stub  $LIBS"
10369  cat > conftest.$ac_ext <<EOF
10370 -#line 70178 "configure"
10371 +#line 70482 "configure"
10372  #include "confdefs.h"
10373  /* Override any gcc2 internal prototype to avoid an error.  */
10374  /* We use char because int might match the return type of a gcc2
10375 @@ -70185,7 +70489,7 @@
10376  dnet_addr()
10377  ; return 0; }
10378  EOF
10379 -if { (eval echo configure:70189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10380 +if { (eval echo configure:70493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10381    rm -rf conftest*
10382    eval "ac_cv_lib_$ac_lib_var=yes"
10383  else
10384 @@ -70350,7 +70654,7 @@
10385  php_with_pdo_firebird=no
10386  
10387  echo $ac_n "checking for Firebird support for PDO""... $ac_c" 1>&6
10388 -echo "configure:70354: checking for Firebird support for PDO" >&5
10389 +echo "configure:70658: checking for Firebird support for PDO" >&5
10390  # Check whether --with-pdo-firebird or --without-pdo-firebird was given.
10391  if test "${with_pdo_firebird+set}" = set; then
10392    withval="$with_pdo_firebird"
10393 @@ -70500,7 +70804,7 @@
10394    done
10395  
10396    echo $ac_n "checking for isc_detach_database in -lfbclient""... $ac_c" 1>&6
10397 -echo "configure:70504: checking for isc_detach_database in -lfbclient" >&5
10398 +echo "configure:70808: checking for isc_detach_database in -lfbclient" >&5
10399  ac_lib_var=`echo fbclient'_'isc_detach_database | sed 'y%./+-%__p_%'`
10400  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10401    echo $ac_n "(cached) $ac_c" 1>&6
10402 @@ -70508,7 +70812,7 @@
10403    ac_save_LIBS="$LIBS"
10404  LIBS="-lfbclient  $LIBS"
10405  cat > conftest.$ac_ext <<EOF
10406 -#line 70512 "configure"
10407 +#line 70816 "configure"
10408  #include "confdefs.h"
10409  /* Override any gcc2 internal prototype to avoid an error.  */
10410  /* We use char because int might match the return type of a gcc2
10411 @@ -70519,7 +70823,7 @@
10412  isc_detach_database()
10413  ; return 0; }
10414  EOF
10415 -if { (eval echo configure:70523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10416 +if { (eval echo configure:70827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10417    rm -rf conftest*
10418    eval "ac_cv_lib_$ac_lib_var=yes"
10419  else
10420 @@ -70646,7 +70950,7 @@
10421    done
10422  
10423    echo $ac_n "checking for isc_detach_database in -lgds""... $ac_c" 1>&6
10424 -echo "configure:70650: checking for isc_detach_database in -lgds" >&5
10425 +echo "configure:70954: checking for isc_detach_database in -lgds" >&5
10426  ac_lib_var=`echo gds'_'isc_detach_database | sed 'y%./+-%__p_%'`
10427  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10428    echo $ac_n "(cached) $ac_c" 1>&6
10429 @@ -70654,7 +70958,7 @@
10430    ac_save_LIBS="$LIBS"
10431  LIBS="-lgds  $LIBS"
10432  cat > conftest.$ac_ext <<EOF
10433 -#line 70658 "configure"
10434 +#line 70962 "configure"
10435  #include "confdefs.h"
10436  /* Override any gcc2 internal prototype to avoid an error.  */
10437  /* We use char because int might match the return type of a gcc2
10438 @@ -70665,7 +70969,7 @@
10439  isc_detach_database()
10440  ; return 0; }
10441  EOF
10442 -if { (eval echo configure:70669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10443 +if { (eval echo configure:70973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10444    rm -rf conftest*
10445    eval "ac_cv_lib_$ac_lib_var=yes"
10446  else
10447 @@ -70792,7 +71096,7 @@
10448    done
10449  
10450    echo $ac_n "checking for isc_detach_database in -lib_util""... $ac_c" 1>&6
10451 -echo "configure:70796: checking for isc_detach_database in -lib_util" >&5
10452 +echo "configure:71100: checking for isc_detach_database in -lib_util" >&5
10453  ac_lib_var=`echo ib_util'_'isc_detach_database | sed 'y%./+-%__p_%'`
10454  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10455    echo $ac_n "(cached) $ac_c" 1>&6
10456 @@ -70800,7 +71104,7 @@
10457    ac_save_LIBS="$LIBS"
10458  LIBS="-lib_util  $LIBS"
10459  cat > conftest.$ac_ext <<EOF
10460 -#line 70804 "configure"
10461 +#line 71108 "configure"
10462  #include "confdefs.h"
10463  /* Override any gcc2 internal prototype to avoid an error.  */
10464  /* We use char because int might match the return type of a gcc2
10465 @@ -70811,7 +71115,7 @@
10466  isc_detach_database()
10467  ; return 0; }
10468  EOF
10469 -if { (eval echo configure:70815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10470 +if { (eval echo configure:71119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10471    rm -rf conftest*
10472    eval "ac_cv_lib_$ac_lib_var=yes"
10473  else
10474 @@ -70856,13 +71160,13 @@
10475   
10476    
10477    echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
10478 -echo "configure:70860: checking for PDO includes" >&5
10479 +echo "configure:71164: checking for PDO includes" >&5
10480  if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
10481    echo $ac_n "(cached) $ac_c" 1>&6
10482  else
10483    
10484      echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
10485 -echo "configure:70866: checking for PDO includes" >&5
10486 +echo "configure:71170: checking for PDO includes" >&5
10487      if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
10488        pdo_inc_path=$abs_srcdir/ext
10489      elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
10490 @@ -71329,7 +71633,7 @@
10491  php_with_pdo_mysql=no
10492  
10493  echo $ac_n "checking for MySQL support for PDO""... $ac_c" 1>&6
10494 -echo "configure:71333: checking for MySQL support for PDO" >&5
10495 +echo "configure:71637: checking for MySQL support for PDO" >&5
10496  # Check whether --with-pdo-mysql or --without-pdo-mysql was given.
10497  if test "${with_pdo_mysql+set}" = set; then
10498    withval="$with_pdo_mysql"
10499 @@ -71377,7 +71681,7 @@
10500  php_with_zlib_dir=no
10501  
10502  echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
10503 -echo "configure:71381: checking for the location of libz" >&5
10504 +echo "configure:71685: checking for the location of libz" >&5
10505  # Check whether --with-zlib-dir or --without-zlib-dir was given.
10506  if test "${with_zlib_dir+set}" = set; then
10507    withval="$with_zlib_dir"
10508 @@ -71407,7 +71711,7 @@
10509  
10510  
10511    echo $ac_n "checking for mysql_config""... $ac_c" 1>&6
10512 -echo "configure:71411: checking for mysql_config" >&5
10513 +echo "configure:71715: checking for mysql_config" >&5
10514  
10515    if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then
10516      PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
10517 @@ -71441,7 +71745,7 @@
10518        # Extract the first word of "sed", so it can be a program name with args.
10519  set dummy sed; ac_word=$2
10520  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
10521 -echo "configure:71445: checking for $ac_word" >&5
10522 +echo "configure:71749: checking for $ac_word" >&5
10523  if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
10524    echo $ac_n "(cached) $ac_c" 1>&6
10525  else
10526 @@ -71489,7 +71793,7 @@
10527    else
10528      echo "$ac_t""not found" 1>&6
10529      echo $ac_n "checking for mysql install under $PDO_MYSQL_DIR""... $ac_c" 1>&6
10530 -echo "configure:71493: checking for mysql install under $PDO_MYSQL_DIR" >&5
10531 +echo "configure:71797: checking for mysql install under $PDO_MYSQL_DIR" >&5
10532      if test -r $PDO_MYSQL_DIR/include/mysql; then
10533        PDO_MYSQL_INC_DIR=$PDO_MYSQL_DIR/include/mysql
10534      else
10535 @@ -71743,7 +72047,7 @@
10536    done
10537  
10538    echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6
10539 -echo "configure:71747: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
10540 +echo "configure:72051: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
10541  ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'`
10542  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10543    echo $ac_n "(cached) $ac_c" 1>&6
10544 @@ -71751,7 +72055,7 @@
10545    ac_save_LIBS="$LIBS"
10546  LIBS="-l$PDO_MYSQL_LIBNAME  $LIBS"
10547  cat > conftest.$ac_ext <<EOF
10548 -#line 71755 "configure"
10549 +#line 72059 "configure"
10550  #include "confdefs.h"
10551  /* Override any gcc2 internal prototype to avoid an error.  */
10552  /* We use char because int might match the return type of a gcc2
10553 @@ -71762,7 +72066,7 @@
10554  mysql_query()
10555  ; return 0; }
10556  EOF
10557 -if { (eval echo configure:71766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10558 +if { (eval echo configure:72070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10559    rm -rf conftest*
10560    eval "ac_cv_lib_$ac_lib_var=yes"
10561  else
10562 @@ -72115,7 +72419,7 @@
10563    done
10564  
10565    echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6
10566 -echo "configure:72119: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
10567 +echo "configure:72423: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
10568  ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'`
10569  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10570    echo $ac_n "(cached) $ac_c" 1>&6
10571 @@ -72123,7 +72427,7 @@
10572    ac_save_LIBS="$LIBS"
10573  LIBS="-l$PDO_MYSQL_LIBNAME  $LIBS"
10574  cat > conftest.$ac_ext <<EOF
10575 -#line 72127 "configure"
10576 +#line 72431 "configure"
10577  #include "confdefs.h"
10578  /* Override any gcc2 internal prototype to avoid an error.  */
10579  /* We use char because int might match the return type of a gcc2
10580 @@ -72134,7 +72438,7 @@
10581  mysql_query()
10582  ; return 0; }
10583  EOF
10584 -if { (eval echo configure:72138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10585 +if { (eval echo configure:72442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10586    rm -rf conftest*
10587    eval "ac_cv_lib_$ac_lib_var=yes"
10588  else
10589 @@ -72289,7 +72593,7 @@
10590    done
10591  
10592    echo $ac_n "checking for mysql_query in -l$PDO_MYSQL_LIBNAME""... $ac_c" 1>&6
10593 -echo "configure:72293: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
10594 +echo "configure:72597: checking for mysql_query in -l$PDO_MYSQL_LIBNAME" >&5
10595  ac_lib_var=`echo $PDO_MYSQL_LIBNAME'_'mysql_query | sed 'y%./+-%__p_%'`
10596  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10597    echo $ac_n "(cached) $ac_c" 1>&6
10598 @@ -72297,7 +72601,7 @@
10599    ac_save_LIBS="$LIBS"
10600  LIBS="-l$PDO_MYSQL_LIBNAME  $LIBS"
10601  cat > conftest.$ac_ext <<EOF
10602 -#line 72301 "configure"
10603 +#line 72605 "configure"
10604  #include "confdefs.h"
10605  /* Override any gcc2 internal prototype to avoid an error.  */
10606  /* We use char because int might match the return type of a gcc2
10607 @@ -72308,7 +72612,7 @@
10608  mysql_query()
10609  ; return 0; }
10610  EOF
10611 -if { (eval echo configure:72312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10612 +if { (eval echo configure:72616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10613    rm -rf conftest*
10614    eval "ac_cv_lib_$ac_lib_var=yes"
10615  else
10616 @@ -72481,12 +72785,12 @@
10617    for ac_func in mysql_commit mysql_stmt_prepare mysql_next_result mysql_sqlstate
10618  do
10619  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10620 -echo "configure:72485: checking for $ac_func" >&5
10621 +echo "configure:72789: checking for $ac_func" >&5
10622  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10623    echo $ac_n "(cached) $ac_c" 1>&6
10624  else
10625    cat > conftest.$ac_ext <<EOF
10626 -#line 72490 "configure"
10627 +#line 72794 "configure"
10628  #include "confdefs.h"
10629  /* System header to define __stub macros and hopefully few prototypes,
10630      which can conflict with char $ac_func(); below.  */
10631 @@ -72509,7 +72813,7 @@
10632  
10633  ; return 0; }
10634  EOF
10635 -if { (eval echo configure:72513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10636 +if { (eval echo configure:72817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10637    rm -rf conftest*
10638    eval "ac_cv_func_$ac_func=yes"
10639  else
10640 @@ -72538,13 +72842,13 @@
10641    
10642      
10643    echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
10644 -echo "configure:72542: checking for PDO includes" >&5
10645 +echo "configure:72846: checking for PDO includes" >&5
10646  if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
10647    echo $ac_n "(cached) $ac_c" 1>&6
10648  else
10649    
10650      echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
10651 -echo "configure:72548: checking for PDO includes" >&5
10652 +echo "configure:72852: checking for PDO includes" >&5
10653      if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
10654        pdo_inc_path=$abs_srcdir/ext
10655      elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
10656 @@ -72892,7 +73196,7 @@
10657  php_with_pdo_oci=no
10658  
10659  echo $ac_n "checking Oracle OCI support for PDO""... $ac_c" 1>&6
10660 -echo "configure:72896: checking Oracle OCI support for PDO" >&5
10661 +echo "configure:73200: checking Oracle OCI support for PDO" >&5
10662  # Check whether --with-pdo-oci or --without-pdo-oci was given.
10663  if test "${with_pdo_oci+set}" = set; then
10664    withval="$with_pdo_oci"
10665 @@ -72937,7 +73241,7 @@
10666  
10667  if test "$PHP_PDO_OCI" != "no"; then
10668    echo $ac_n "checking Oracle Install-Dir""... $ac_c" 1>&6
10669 -echo "configure:72941: checking Oracle Install-Dir" >&5
10670 +echo "configure:73245: checking Oracle Install-Dir" >&5
10671    if test "$PHP_PDO_OCI" = "yes" || test -z "$PHP_PDO_OCI"; then
10672      PDO_OCI_DIR=$ORACLE_HOME
10673    else
10674 @@ -72946,7 +73250,7 @@
10675    echo "$ac_t""$PDO_OCI_DIR :$PHP_PDO_OCI:" 1>&6
10676  
10677    echo $ac_n "checking if that is sane""... $ac_c" 1>&6
10678 -echo "configure:72950: checking if that is sane" >&5
10679 +echo "configure:73254: checking if that is sane" >&5
10680    if test -z "$PDO_OCI_DIR"; then
10681      { echo "configure: error: 
10682  You need to tell me where to find your oracle SDK, or set ORACLE_HOME.
10683 @@ -72959,7 +73263,7 @@
10684      PDO_OCI_IC_PREFIX="`echo $PDO_OCI_DIR | cut -d, -f2`"
10685      PDO_OCI_IC_VERS="`echo $PDO_OCI_DIR | cut -d, -f3`"
10686      echo $ac_n "checking for oci.h""... $ac_c" 1>&6
10687 -echo "configure:72963: checking for oci.h" >&5
10688 +echo "configure:73267: checking for oci.h" >&5
10689      if test -f $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client/oci.h ; then
10690        
10691    if test "$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client" != "/usr/include"; then
10692 @@ -73108,7 +73412,7 @@
10693    else
10694      
10695    echo $ac_n "checking size of long int""... $ac_c" 1>&6
10696 -echo "configure:73112: checking size of long int" >&5
10697 +echo "configure:73416: checking size of long int" >&5
10698  if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
10699    echo $ac_n "(cached) $ac_c" 1>&6
10700  else
10701 @@ -73116,18 +73420,18 @@
10702    ac_cv_sizeof_long_int=4
10703  else
10704    cat > conftest.$ac_ext <<EOF
10705 -#line 73120 "configure"
10706 +#line 73424 "configure"
10707  #include "confdefs.h"
10708  #include <stdio.h>
10709 -int main()
10710 +main()
10711  {
10712    FILE *f=fopen("conftestval", "w");
10713 -  if (!f) return(1);
10714 +  if (!f) exit(1);
10715    fprintf(f, "%d\n", sizeof(long int));
10716 -  return(0);
10717 +  exit(0);
10718  }
10719  EOF
10720 -if { (eval echo configure:73131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10721 +if { (eval echo configure:73435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10722  then
10723    ac_cv_sizeof_long_int=`cat conftestval`
10724  else
10725 @@ -73147,7 +73451,7 @@
10726  
10727  
10728    echo $ac_n "checking if we're on a 64-bit platform""... $ac_c" 1>&6
10729 -echo "configure:73151: checking if we're on a 64-bit platform" >&5
10730 +echo "configure:73455: checking if we're on a 64-bit platform" >&5
10731    if test "$ac_cv_sizeof_long_int" = "4" ; then
10732      echo "$ac_t""no" 1>&6
10733      TMP_PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib32"
10734 @@ -73157,7 +73461,7 @@
10735    fi
10736  
10737    echo $ac_n "checking OCI8 libraries dir""... $ac_c" 1>&6
10738 -echo "configure:73161: checking OCI8 libraries dir" >&5
10739 +echo "configure:73465: checking OCI8 libraries dir" >&5
10740    if test -d "$PDO_OCI_DIR/lib" && test ! -d "$PDO_OCI_DIR/lib32"; then
10741      PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib"
10742    elif test ! -d "$PDO_OCI_DIR/lib" && test -d "$PDO_OCI_DIR/lib32"; then
10743 @@ -73524,7 +73828,7 @@
10744      fi
10745      
10746    echo $ac_n "checking Oracle version""... $ac_c" 1>&6
10747 -echo "configure:73528: checking Oracle version" >&5
10748 +echo "configure:73832: checking Oracle version" >&5
10749    if test -s "$PDO_OCI_DIR/orainst/unix.rgs"; then
10750      PDO_OCI_VERSION=`grep '"ocommon"' $PDO_OCI_DIR/orainst/unix.rgs | sed 's/  */:/g' | cut -d: -f 6 | cut -c 2-4`
10751      test -z "$PDO_OCI_VERSION" && PDO_OCI_VERSION=7.3
10752 @@ -74215,7 +74519,7 @@
10753    done
10754  
10755    echo $ac_n "checking for OCIEnvCreate in -lclntsh""... $ac_c" 1>&6
10756 -echo "configure:74219: checking for OCIEnvCreate in -lclntsh" >&5
10757 +echo "configure:74523: checking for OCIEnvCreate in -lclntsh" >&5
10758  ac_lib_var=`echo clntsh'_'OCIEnvCreate | sed 'y%./+-%__p_%'`
10759  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10760    echo $ac_n "(cached) $ac_c" 1>&6
10761 @@ -74223,7 +74527,7 @@
10762    ac_save_LIBS="$LIBS"
10763  LIBS="-lclntsh  $LIBS"
10764  cat > conftest.$ac_ext <<EOF
10765 -#line 74227 "configure"
10766 +#line 74531 "configure"
10767  #include "confdefs.h"
10768  /* Override any gcc2 internal prototype to avoid an error.  */
10769  /* We use char because int might match the return type of a gcc2
10770 @@ -74234,7 +74538,7 @@
10771  OCIEnvCreate()
10772  ; return 0; }
10773  EOF
10774 -if { (eval echo configure:74238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10775 +if { (eval echo configure:74542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10776    rm -rf conftest*
10777    eval "ac_cv_lib_$ac_lib_var=yes"
10778  else
10779 @@ -74368,7 +74672,7 @@
10780    done
10781  
10782    echo $ac_n "checking for OCIEnvNlsCreate in -lclntsh""... $ac_c" 1>&6
10783 -echo "configure:74372: checking for OCIEnvNlsCreate in -lclntsh" >&5
10784 +echo "configure:74676: checking for OCIEnvNlsCreate in -lclntsh" >&5
10785  ac_lib_var=`echo clntsh'_'OCIEnvNlsCreate | sed 'y%./+-%__p_%'`
10786  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10787    echo $ac_n "(cached) $ac_c" 1>&6
10788 @@ -74376,7 +74680,7 @@
10789    ac_save_LIBS="$LIBS"
10790  LIBS="-lclntsh  $LIBS"
10791  cat > conftest.$ac_ext <<EOF
10792 -#line 74380 "configure"
10793 +#line 74684 "configure"
10794  #include "confdefs.h"
10795  /* Override any gcc2 internal prototype to avoid an error.  */
10796  /* We use char because int might match the return type of a gcc2
10797 @@ -74387,7 +74691,7 @@
10798  OCIEnvNlsCreate()
10799  ; return 0; }
10800  EOF
10801 -if { (eval echo configure:74391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10802 +if { (eval echo configure:74695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10803    rm -rf conftest*
10804    eval "ac_cv_lib_$ac_lib_var=yes"
10805  else
10806 @@ -74521,7 +74825,7 @@
10807    done
10808  
10809    echo $ac_n "checking for OCILobIsTemporary in -lclntsh""... $ac_c" 1>&6
10810 -echo "configure:74525: checking for OCILobIsTemporary in -lclntsh" >&5
10811 +echo "configure:74829: checking for OCILobIsTemporary in -lclntsh" >&5
10812  ac_lib_var=`echo clntsh'_'OCILobIsTemporary | sed 'y%./+-%__p_%'`
10813  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10814    echo $ac_n "(cached) $ac_c" 1>&6
10815 @@ -74529,7 +74833,7 @@
10816    ac_save_LIBS="$LIBS"
10817  LIBS="-lclntsh  $LIBS"
10818  cat > conftest.$ac_ext <<EOF
10819 -#line 74533 "configure"
10820 +#line 74837 "configure"
10821  #include "confdefs.h"
10822  /* Override any gcc2 internal prototype to avoid an error.  */
10823  /* We use char because int might match the return type of a gcc2
10824 @@ -74540,7 +74844,7 @@
10825  OCILobIsTemporary()
10826  ; return 0; }
10827  EOF
10828 -if { (eval echo configure:74544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10829 +if { (eval echo configure:74848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10830    rm -rf conftest*
10831    eval "ac_cv_lib_$ac_lib_var=yes"
10832  else
10833 @@ -74670,7 +74974,7 @@
10834    done
10835  
10836    echo $ac_n "checking for OCILobIsTemporary in -locijdbc8""... $ac_c" 1>&6
10837 -echo "configure:74674: checking for OCILobIsTemporary in -locijdbc8" >&5
10838 +echo "configure:74978: checking for OCILobIsTemporary in -locijdbc8" >&5
10839  ac_lib_var=`echo ocijdbc8'_'OCILobIsTemporary | sed 'y%./+-%__p_%'`
10840  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10841    echo $ac_n "(cached) $ac_c" 1>&6
10842 @@ -74678,7 +74982,7 @@
10843    ac_save_LIBS="$LIBS"
10844  LIBS="-locijdbc8  $LIBS"
10845  cat > conftest.$ac_ext <<EOF
10846 -#line 74682 "configure"
10847 +#line 74986 "configure"
10848  #include "confdefs.h"
10849  /* Override any gcc2 internal prototype to avoid an error.  */
10850  /* We use char because int might match the return type of a gcc2
10851 @@ -74689,7 +74993,7 @@
10852  OCILobIsTemporary()
10853  ; return 0; }
10854  EOF
10855 -if { (eval echo configure:74693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10856 +if { (eval echo configure:74997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10857    rm -rf conftest*
10858    eval "ac_cv_lib_$ac_lib_var=yes"
10859  else
10860 @@ -74850,7 +75154,7 @@
10861    done
10862  
10863    echo $ac_n "checking for OCICollAssign in -lclntsh""... $ac_c" 1>&6
10864 -echo "configure:74854: checking for OCICollAssign in -lclntsh" >&5
10865 +echo "configure:75158: checking for OCICollAssign in -lclntsh" >&5
10866  ac_lib_var=`echo clntsh'_'OCICollAssign | sed 'y%./+-%__p_%'`
10867  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10868    echo $ac_n "(cached) $ac_c" 1>&6
10869 @@ -74858,7 +75162,7 @@
10870    ac_save_LIBS="$LIBS"
10871  LIBS="-lclntsh  $LIBS"
10872  cat > conftest.$ac_ext <<EOF
10873 -#line 74862 "configure"
10874 +#line 75166 "configure"
10875  #include "confdefs.h"
10876  /* Override any gcc2 internal prototype to avoid an error.  */
10877  /* We use char because int might match the return type of a gcc2
10878 @@ -74869,7 +75173,7 @@
10879  OCICollAssign()
10880  ; return 0; }
10881  EOF
10882 -if { (eval echo configure:74873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10883 +if { (eval echo configure:75177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10884    rm -rf conftest*
10885    eval "ac_cv_lib_$ac_lib_var=yes"
10886  else
10887 @@ -75003,7 +75307,7 @@
10888    done
10889  
10890    echo $ac_n "checking for OCIStmtFetch2 in -lclntsh""... $ac_c" 1>&6
10891 -echo "configure:75007: checking for OCIStmtFetch2 in -lclntsh" >&5
10892 +echo "configure:75311: checking for OCIStmtFetch2 in -lclntsh" >&5
10893  ac_lib_var=`echo clntsh'_'OCIStmtFetch2 | sed 'y%./+-%__p_%'`
10894  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10895    echo $ac_n "(cached) $ac_c" 1>&6
10896 @@ -75011,7 +75315,7 @@
10897    ac_save_LIBS="$LIBS"
10898  LIBS="-lclntsh  $LIBS"
10899  cat > conftest.$ac_ext <<EOF
10900 -#line 75015 "configure"
10901 +#line 75319 "configure"
10902  #include "confdefs.h"
10903  /* Override any gcc2 internal prototype to avoid an error.  */
10904  /* We use char because int might match the return type of a gcc2
10905 @@ -75022,7 +75326,7 @@
10906  OCIStmtFetch2()
10907  ; return 0; }
10908  EOF
10909 -if { (eval echo configure:75026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10910 +if { (eval echo configure:75330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10911    rm -rf conftest*
10912    eval "ac_cv_lib_$ac_lib_var=yes"
10913  else
10914 @@ -75061,13 +75365,13 @@
10915    
10916      
10917    echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
10918 -echo "configure:75065: checking for PDO includes" >&5
10919 +echo "configure:75369: checking for PDO includes" >&5
10920  if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
10921    echo $ac_n "(cached) $ac_c" 1>&6
10922  else
10923    
10924      echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
10925 -echo "configure:75071: checking for PDO includes" >&5
10926 +echo "configure:75375: checking for PDO includes" >&5
10927      if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
10928        pdo_inc_path=$abs_srcdir/ext
10929      elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
10930 @@ -75422,7 +75726,7 @@
10931  php_with_pdo_odbc=no
10932  
10933  echo $ac_n "checking for ODBC v3 support for PDO""... $ac_c" 1>&6
10934 -echo "configure:75426: checking for ODBC v3 support for PDO" >&5
10935 +echo "configure:75730: checking for ODBC v3 support for PDO" >&5
10936  # Check whether --with-pdo-odbc or --without-pdo-odbc was given.
10937  if test "${with_pdo_odbc+set}" = set; then
10938    withval="$with_pdo_odbc"
10939 @@ -75473,13 +75777,13 @@
10940    
10941      
10942    echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
10943 -echo "configure:75477: checking for PDO includes" >&5
10944 +echo "configure:75781: checking for PDO includes" >&5
10945  if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
10946    echo $ac_n "(cached) $ac_c" 1>&6
10947  else
10948    
10949      echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
10950 -echo "configure:75483: checking for PDO includes" >&5
10951 +echo "configure:75787: checking for PDO includes" >&5
10952      if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
10953        pdo_inc_path=$abs_srcdir/ext
10954      elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
10955 @@ -75500,7 +75804,7 @@
10956    
10957  
10958    echo $ac_n "checking for selected PDO ODBC flavour""... $ac_c" 1>&6
10959 -echo "configure:75504: checking for selected PDO ODBC flavour" >&5
10960 +echo "configure:75808: checking for selected PDO ODBC flavour" >&5
10961  
10962    pdo_odbc_flavour="`echo $PHP_PDO_ODBC | cut -d, -f1`"
10963    pdo_odbc_dir="`echo $PHP_PDO_ODBC | cut -d, -f2`"
10964 @@ -75573,7 +75877,7 @@
10965  
10966    
10967    echo $ac_n "checking for odbc.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
10968 -echo "configure:75577: checking for odbc.h in $PDO_ODBC_INCDIR" >&5
10969 +echo "configure:75881: checking for odbc.h in $PDO_ODBC_INCDIR" >&5
10970    if test -f "$PDO_ODBC_INCDIR/odbc.h"; then
10971      php_pdo_have_header=yes
10972      cat >> confdefs.h <<\EOF
10973 @@ -75587,7 +75891,7 @@
10974  
10975    
10976    echo $ac_n "checking for odbcsdk.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
10977 -echo "configure:75591: checking for odbcsdk.h in $PDO_ODBC_INCDIR" >&5
10978 +echo "configure:75895: checking for odbcsdk.h in $PDO_ODBC_INCDIR" >&5
10979    if test -f "$PDO_ODBC_INCDIR/odbcsdk.h"; then
10980      php_pdo_have_header=yes
10981      cat >> confdefs.h <<\EOF
10982 @@ -75601,7 +75905,7 @@
10983  
10984    
10985    echo $ac_n "checking for iodbc.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
10986 -echo "configure:75605: checking for iodbc.h in $PDO_ODBC_INCDIR" >&5
10987 +echo "configure:75909: checking for iodbc.h in $PDO_ODBC_INCDIR" >&5
10988    if test -f "$PDO_ODBC_INCDIR/iodbc.h"; then
10989      php_pdo_have_header=yes
10990      cat >> confdefs.h <<\EOF
10991 @@ -75615,7 +75919,7 @@
10992  
10993    
10994    echo $ac_n "checking for sqlunix.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
10995 -echo "configure:75619: checking for sqlunix.h in $PDO_ODBC_INCDIR" >&5
10996 +echo "configure:75923: checking for sqlunix.h in $PDO_ODBC_INCDIR" >&5
10997    if test -f "$PDO_ODBC_INCDIR/sqlunix.h"; then
10998      php_pdo_have_header=yes
10999      cat >> confdefs.h <<\EOF
11000 @@ -75629,7 +75933,7 @@
11001  
11002    
11003    echo $ac_n "checking for sqltypes.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11004 -echo "configure:75633: checking for sqltypes.h in $PDO_ODBC_INCDIR" >&5
11005 +echo "configure:75937: checking for sqltypes.h in $PDO_ODBC_INCDIR" >&5
11006    if test -f "$PDO_ODBC_INCDIR/sqltypes.h"; then
11007      php_pdo_have_header=yes
11008      cat >> confdefs.h <<\EOF
11009 @@ -75643,7 +75947,7 @@
11010  
11011    
11012    echo $ac_n "checking for sqlucode.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11013 -echo "configure:75647: checking for sqlucode.h in $PDO_ODBC_INCDIR" >&5
11014 +echo "configure:75951: checking for sqlucode.h in $PDO_ODBC_INCDIR" >&5
11015    if test -f "$PDO_ODBC_INCDIR/sqlucode.h"; then
11016      php_pdo_have_header=yes
11017      cat >> confdefs.h <<\EOF
11018 @@ -75657,7 +75961,7 @@
11019  
11020    
11021    echo $ac_n "checking for sql.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11022 -echo "configure:75661: checking for sql.h in $PDO_ODBC_INCDIR" >&5
11023 +echo "configure:75965: checking for sql.h in $PDO_ODBC_INCDIR" >&5
11024    if test -f "$PDO_ODBC_INCDIR/sql.h"; then
11025      php_pdo_have_header=yes
11026      cat >> confdefs.h <<\EOF
11027 @@ -75671,7 +75975,7 @@
11028  
11029    
11030    echo $ac_n "checking for isql.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11031 -echo "configure:75675: checking for isql.h in $PDO_ODBC_INCDIR" >&5
11032 +echo "configure:75979: checking for isql.h in $PDO_ODBC_INCDIR" >&5
11033    if test -f "$PDO_ODBC_INCDIR/isql.h"; then
11034      php_pdo_have_header=yes
11035      cat >> confdefs.h <<\EOF
11036 @@ -75685,7 +75989,7 @@
11037  
11038    
11039    echo $ac_n "checking for sqlext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11040 -echo "configure:75689: checking for sqlext.h in $PDO_ODBC_INCDIR" >&5
11041 +echo "configure:75993: checking for sqlext.h in $PDO_ODBC_INCDIR" >&5
11042    if test -f "$PDO_ODBC_INCDIR/sqlext.h"; then
11043      php_pdo_have_header=yes
11044      cat >> confdefs.h <<\EOF
11045 @@ -75699,7 +76003,7 @@
11046  
11047    
11048    echo $ac_n "checking for isqlext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11049 -echo "configure:75703: checking for isqlext.h in $PDO_ODBC_INCDIR" >&5
11050 +echo "configure:76007: checking for isqlext.h in $PDO_ODBC_INCDIR" >&5
11051    if test -f "$PDO_ODBC_INCDIR/isqlext.h"; then
11052      php_pdo_have_header=yes
11053      cat >> confdefs.h <<\EOF
11054 @@ -75713,7 +76017,7 @@
11055  
11056    
11057    echo $ac_n "checking for udbcext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11058 -echo "configure:75717: checking for udbcext.h in $PDO_ODBC_INCDIR" >&5
11059 +echo "configure:76021: checking for udbcext.h in $PDO_ODBC_INCDIR" >&5
11060    if test -f "$PDO_ODBC_INCDIR/udbcext.h"; then
11061      php_pdo_have_header=yes
11062      cat >> confdefs.h <<\EOF
11063 @@ -75727,7 +76031,7 @@
11064  
11065    
11066    echo $ac_n "checking for sqlcli1.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11067 -echo "configure:75731: checking for sqlcli1.h in $PDO_ODBC_INCDIR" >&5
11068 +echo "configure:76035: checking for sqlcli1.h in $PDO_ODBC_INCDIR" >&5
11069    if test -f "$PDO_ODBC_INCDIR/sqlcli1.h"; then
11070      php_pdo_have_header=yes
11071      cat >> confdefs.h <<\EOF
11072 @@ -75741,7 +76045,7 @@
11073  
11074    
11075    echo $ac_n "checking for LibraryManager.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11076 -echo "configure:75745: checking for LibraryManager.h in $PDO_ODBC_INCDIR" >&5
11077 +echo "configure:76049: checking for LibraryManager.h in $PDO_ODBC_INCDIR" >&5
11078    if test -f "$PDO_ODBC_INCDIR/LibraryManager.h"; then
11079      php_pdo_have_header=yes
11080      cat >> confdefs.h <<\EOF
11081 @@ -75755,7 +76059,7 @@
11082  
11083    
11084    echo $ac_n "checking for cli0core.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11085 -echo "configure:75759: checking for cli0core.h in $PDO_ODBC_INCDIR" >&5
11086 +echo "configure:76063: checking for cli0core.h in $PDO_ODBC_INCDIR" >&5
11087    if test -f "$PDO_ODBC_INCDIR/cli0core.h"; then
11088      php_pdo_have_header=yes
11089      cat >> confdefs.h <<\EOF
11090 @@ -75769,7 +76073,7 @@
11091  
11092    
11093    echo $ac_n "checking for cli0ext.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11094 -echo "configure:75773: checking for cli0ext.h in $PDO_ODBC_INCDIR" >&5
11095 +echo "configure:76077: checking for cli0ext.h in $PDO_ODBC_INCDIR" >&5
11096    if test -f "$PDO_ODBC_INCDIR/cli0ext.h"; then
11097      php_pdo_have_header=yes
11098      cat >> confdefs.h <<\EOF
11099 @@ -75783,7 +76087,7 @@
11100  
11101    
11102    echo $ac_n "checking for cli0cli.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11103 -echo "configure:75787: checking for cli0cli.h in $PDO_ODBC_INCDIR" >&5
11104 +echo "configure:76091: checking for cli0cli.h in $PDO_ODBC_INCDIR" >&5
11105    if test -f "$PDO_ODBC_INCDIR/cli0cli.h"; then
11106      php_pdo_have_header=yes
11107      cat >> confdefs.h <<\EOF
11108 @@ -75797,7 +76101,7 @@
11109  
11110    
11111    echo $ac_n "checking for cli0defs.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11112 -echo "configure:75801: checking for cli0defs.h in $PDO_ODBC_INCDIR" >&5
11113 +echo "configure:76105: checking for cli0defs.h in $PDO_ODBC_INCDIR" >&5
11114    if test -f "$PDO_ODBC_INCDIR/cli0defs.h"; then
11115      php_pdo_have_header=yes
11116      cat >> confdefs.h <<\EOF
11117 @@ -75811,7 +76115,7 @@
11118  
11119    
11120    echo $ac_n "checking for cli0env.h in $PDO_ODBC_INCDIR""... $ac_c" 1>&6
11121 -echo "configure:75815: checking for cli0env.h in $PDO_ODBC_INCDIR" >&5
11122 +echo "configure:76119: checking for cli0env.h in $PDO_ODBC_INCDIR" >&5
11123    if test -f "$PDO_ODBC_INCDIR/cli0env.h"; then
11124      php_pdo_have_header=yes
11125      cat >> confdefs.h <<\EOF
11126 @@ -76017,7 +76321,7 @@
11127    done
11128  
11129    echo $ac_n "checking for SQLBindCol in -l$pdo_odbc_def_lib""... $ac_c" 1>&6
11130 -echo "configure:76021: checking for SQLBindCol in -l$pdo_odbc_def_lib" >&5
11131 +echo "configure:76325: checking for SQLBindCol in -l$pdo_odbc_def_lib" >&5
11132  ac_lib_var=`echo $pdo_odbc_def_lib'_'SQLBindCol | sed 'y%./+-%__p_%'`
11133  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11134    echo $ac_n "(cached) $ac_c" 1>&6
11135 @@ -76025,7 +76329,7 @@
11136    ac_save_LIBS="$LIBS"
11137  LIBS="-l$pdo_odbc_def_lib  $LIBS"
11138  cat > conftest.$ac_ext <<EOF
11139 -#line 76029 "configure"
11140 +#line 76333 "configure"
11141  #include "confdefs.h"
11142  /* Override any gcc2 internal prototype to avoid an error.  */
11143  /* We use char because int might match the return type of a gcc2
11144 @@ -76036,7 +76340,7 @@
11145  SQLBindCol()
11146  ; return 0; }
11147  EOF
11148 -if { (eval echo configure:76040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11149 +if { (eval echo configure:76344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11150    rm -rf conftest*
11151    eval "ac_cv_lib_$ac_lib_var=yes"
11152  else
11153 @@ -76151,7 +76455,7 @@
11154    done
11155  
11156    echo $ac_n "checking for SQLAllocHandle in -l$pdo_odbc_def_lib""... $ac_c" 1>&6
11157 -echo "configure:76155: checking for SQLAllocHandle in -l$pdo_odbc_def_lib" >&5
11158 +echo "configure:76459: checking for SQLAllocHandle in -l$pdo_odbc_def_lib" >&5
11159  ac_lib_var=`echo $pdo_odbc_def_lib'_'SQLAllocHandle | sed 'y%./+-%__p_%'`
11160  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11161    echo $ac_n "(cached) $ac_c" 1>&6
11162 @@ -76159,7 +76463,7 @@
11163    ac_save_LIBS="$LIBS"
11164  LIBS="-l$pdo_odbc_def_lib  $LIBS"
11165  cat > conftest.$ac_ext <<EOF
11166 -#line 76163 "configure"
11167 +#line 76467 "configure"
11168  #include "confdefs.h"
11169  /* Override any gcc2 internal prototype to avoid an error.  */
11170  /* We use char because int might match the return type of a gcc2
11171 @@ -76170,7 +76474,7 @@
11172  SQLAllocHandle()
11173  ; return 0; }
11174  EOF
11175 -if { (eval echo configure:76174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11176 +if { (eval echo configure:76478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11177    rm -rf conftest*
11178    eval "ac_cv_lib_$ac_lib_var=yes"
11179  else
11180 @@ -76537,7 +76841,7 @@
11181  php_with_pdo_pgsql=no
11182  
11183  echo $ac_n "checking for PostgreSQL support for PDO""... $ac_c" 1>&6
11184 -echo "configure:76541: checking for PostgreSQL support for PDO" >&5
11185 +echo "configure:76845: checking for PostgreSQL support for PDO" >&5
11186  # Check whether --with-pdo-pgsql or --without-pdo-pgsql was given.
11187  if test "${with_pdo_pgsql+set}" = set; then
11188    withval="$with_pdo_pgsql"
11189 @@ -76594,7 +76898,7 @@
11190  
11191  
11192    echo $ac_n "checking for pg_config""... $ac_c" 1>&6
11193 -echo "configure:76598: checking for pg_config" >&5
11194 +echo "configure:76902: checking for pg_config" >&5
11195    for i in $PHP_PDO_PGSQL $PHP_PDO_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do
11196      if test -x $i/pg_config; then
11197        PG_CONFIG="$i/pg_config"
11198 @@ -76658,13 +76962,13 @@
11199  
11200  
11201    echo $ac_n "checking for openssl dependencies""... $ac_c" 1>&6
11202 -echo "configure:76662: checking for openssl dependencies" >&5
11203 +echo "configure:76966: checking for openssl dependencies" >&5
11204    if grep -q openssl $PGSQL_INCLUDE/libpq-fe.h ; then
11205      echo "$ac_t""yes" 1>&6
11206          # Extract the first word of "pkg-config", so it can be a program name with args.
11207  set dummy pkg-config; ac_word=$2
11208  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11209 -echo "configure:76668: checking for $ac_word" >&5
11210 +echo "configure:76972: checking for $ac_word" >&5
11211  if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
11212    echo $ac_n "(cached) $ac_c" 1>&6
11213  else
11214 @@ -76708,7 +77012,7 @@
11215    old_LDFLAGS=$LDFLAGS
11216    LDFLAGS="$LDFLAGS -L$PGSQL_LIBDIR"
11217    echo $ac_n "checking for PQescapeString in -lpq""... $ac_c" 1>&6
11218 -echo "configure:76712: checking for PQescapeString in -lpq" >&5
11219 +echo "configure:77016: checking for PQescapeString in -lpq" >&5
11220  ac_lib_var=`echo pq'_'PQescapeString | sed 'y%./+-%__p_%'`
11221  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11222    echo $ac_n "(cached) $ac_c" 1>&6
11223 @@ -76716,7 +77020,7 @@
11224    ac_save_LIBS="$LIBS"
11225  LIBS="-lpq  $LIBS"
11226  cat > conftest.$ac_ext <<EOF
11227 -#line 76720 "configure"
11228 +#line 77024 "configure"
11229  #include "confdefs.h"
11230  /* Override any gcc2 internal prototype to avoid an error.  */
11231  /* We use char because int might match the return type of a gcc2
11232 @@ -76727,7 +77031,7 @@
11233  PQescapeString()
11234  ; return 0; }
11235  EOF
11236 -if { (eval echo configure:76731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11237 +if { (eval echo configure:77035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11238    rm -rf conftest*
11239    eval "ac_cv_lib_$ac_lib_var=yes"
11240  else
11241 @@ -76751,7 +77055,7 @@
11242  fi
11243  
11244    echo $ac_n "checking for PQescapeStringConn in -lpq""... $ac_c" 1>&6
11245 -echo "configure:76755: checking for PQescapeStringConn in -lpq" >&5
11246 +echo "configure:77059: checking for PQescapeStringConn in -lpq" >&5
11247  ac_lib_var=`echo pq'_'PQescapeStringConn | sed 'y%./+-%__p_%'`
11248  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11249    echo $ac_n "(cached) $ac_c" 1>&6
11250 @@ -76759,7 +77063,7 @@
11251    ac_save_LIBS="$LIBS"
11252  LIBS="-lpq  $LIBS"
11253  cat > conftest.$ac_ext <<EOF
11254 -#line 76763 "configure"
11255 +#line 77067 "configure"
11256  #include "confdefs.h"
11257  /* Override any gcc2 internal prototype to avoid an error.  */
11258  /* We use char because int might match the return type of a gcc2
11259 @@ -76770,7 +77074,7 @@
11260  PQescapeStringConn()
11261  ; return 0; }
11262  EOF
11263 -if { (eval echo configure:76774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11264 +if { (eval echo configure:77078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11265    rm -rf conftest*
11266    eval "ac_cv_lib_$ac_lib_var=yes"
11267  else
11268 @@ -76794,7 +77098,7 @@
11269  fi
11270  
11271    echo $ac_n "checking for PQescapeByteaConn in -lpq""... $ac_c" 1>&6
11272 -echo "configure:76798: checking for PQescapeByteaConn in -lpq" >&5
11273 +echo "configure:77102: checking for PQescapeByteaConn in -lpq" >&5
11274  ac_lib_var=`echo pq'_'PQescapeByteaConn | sed 'y%./+-%__p_%'`
11275  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11276    echo $ac_n "(cached) $ac_c" 1>&6
11277 @@ -76802,7 +77106,7 @@
11278    ac_save_LIBS="$LIBS"
11279  LIBS="-lpq  $LIBS"
11280  cat > conftest.$ac_ext <<EOF
11281 -#line 76806 "configure"
11282 +#line 77110 "configure"
11283  #include "confdefs.h"
11284  /* Override any gcc2 internal prototype to avoid an error.  */
11285  /* We use char because int might match the return type of a gcc2
11286 @@ -76813,7 +77117,7 @@
11287  PQescapeByteaConn()
11288  ; return 0; }
11289  EOF
11290 -if { (eval echo configure:76817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11291 +if { (eval echo configure:77121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11292    rm -rf conftest*
11293    eval "ac_cv_lib_$ac_lib_var=yes"
11294  else
11295 @@ -76837,7 +77141,7 @@
11296  fi
11297  
11298    echo $ac_n "checking for PQsetnonblocking in -lpq""... $ac_c" 1>&6
11299 -echo "configure:76841: checking for PQsetnonblocking in -lpq" >&5
11300 +echo "configure:77145: checking for PQsetnonblocking in -lpq" >&5
11301  ac_lib_var=`echo pq'_'PQsetnonblocking | sed 'y%./+-%__p_%'`
11302  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11303    echo $ac_n "(cached) $ac_c" 1>&6
11304 @@ -76845,7 +77149,7 @@
11305    ac_save_LIBS="$LIBS"
11306  LIBS="-lpq  $LIBS"
11307  cat > conftest.$ac_ext <<EOF
11308 -#line 76849 "configure"
11309 +#line 77153 "configure"
11310  #include "confdefs.h"
11311  /* Override any gcc2 internal prototype to avoid an error.  */
11312  /* We use char because int might match the return type of a gcc2
11313 @@ -76856,7 +77160,7 @@
11314  PQsetnonblocking()
11315  ; return 0; }
11316  EOF
11317 -if { (eval echo configure:76860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11318 +if { (eval echo configure:77164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11319    rm -rf conftest*
11320    eval "ac_cv_lib_$ac_lib_var=yes"
11321  else
11322 @@ -76880,7 +77184,7 @@
11323  fi
11324  
11325    echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
11326 -echo "configure:76884: checking for PQcmdTuples in -lpq" >&5
11327 +echo "configure:77188: checking for PQcmdTuples in -lpq" >&5
11328  ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
11329  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11330    echo $ac_n "(cached) $ac_c" 1>&6
11331 @@ -76888,7 +77192,7 @@
11332    ac_save_LIBS="$LIBS"
11333  LIBS="-lpq  $LIBS"
11334  cat > conftest.$ac_ext <<EOF
11335 -#line 76892 "configure"
11336 +#line 77196 "configure"
11337  #include "confdefs.h"
11338  /* Override any gcc2 internal prototype to avoid an error.  */
11339  /* We use char because int might match the return type of a gcc2
11340 @@ -76899,7 +77203,7 @@
11341  PQcmdTuples()
11342  ; return 0; }
11343  EOF
11344 -if { (eval echo configure:76903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11345 +if { (eval echo configure:77207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11346    rm -rf conftest*
11347    eval "ac_cv_lib_$ac_lib_var=yes"
11348  else
11349 @@ -76923,7 +77227,7 @@
11350  fi
11351  
11352    echo $ac_n "checking for PQoidValue in -lpq""... $ac_c" 1>&6
11353 -echo "configure:76927: checking for PQoidValue in -lpq" >&5
11354 +echo "configure:77231: checking for PQoidValue in -lpq" >&5
11355  ac_lib_var=`echo pq'_'PQoidValue | sed 'y%./+-%__p_%'`
11356  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11357    echo $ac_n "(cached) $ac_c" 1>&6
11358 @@ -76931,7 +77235,7 @@
11359    ac_save_LIBS="$LIBS"
11360  LIBS="-lpq  $LIBS"
11361  cat > conftest.$ac_ext <<EOF
11362 -#line 76935 "configure"
11363 +#line 77239 "configure"
11364  #include "confdefs.h"
11365  /* Override any gcc2 internal prototype to avoid an error.  */
11366  /* We use char because int might match the return type of a gcc2
11367 @@ -76942,7 +77246,7 @@
11368  PQoidValue()
11369  ; return 0; }
11370  EOF
11371 -if { (eval echo configure:76946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11372 +if { (eval echo configure:77250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11373    rm -rf conftest*
11374    eval "ac_cv_lib_$ac_lib_var=yes"
11375  else
11376 @@ -76966,7 +77270,7 @@
11377  fi
11378  
11379    echo $ac_n "checking for PQclientEncoding in -lpq""... $ac_c" 1>&6
11380 -echo "configure:76970: checking for PQclientEncoding in -lpq" >&5
11381 +echo "configure:77274: checking for PQclientEncoding in -lpq" >&5
11382  ac_lib_var=`echo pq'_'PQclientEncoding | sed 'y%./+-%__p_%'`
11383  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11384    echo $ac_n "(cached) $ac_c" 1>&6
11385 @@ -76974,7 +77278,7 @@
11386    ac_save_LIBS="$LIBS"
11387  LIBS="-lpq  $LIBS"
11388  cat > conftest.$ac_ext <<EOF
11389 -#line 76978 "configure"
11390 +#line 77282 "configure"
11391  #include "confdefs.h"
11392  /* Override any gcc2 internal prototype to avoid an error.  */
11393  /* We use char because int might match the return type of a gcc2
11394 @@ -76985,7 +77289,7 @@
11395  PQclientEncoding()
11396  ; return 0; }
11397  EOF
11398 -if { (eval echo configure:76989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11399 +if { (eval echo configure:77293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11400    rm -rf conftest*
11401    eval "ac_cv_lib_$ac_lib_var=yes"
11402  else
11403 @@ -77009,7 +77313,7 @@
11404  fi
11405  
11406    echo $ac_n "checking for PQparameterStatus in -lpq""... $ac_c" 1>&6
11407 -echo "configure:77013: checking for PQparameterStatus in -lpq" >&5
11408 +echo "configure:77317: checking for PQparameterStatus in -lpq" >&5
11409  ac_lib_var=`echo pq'_'PQparameterStatus | sed 'y%./+-%__p_%'`
11410  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11411    echo $ac_n "(cached) $ac_c" 1>&6
11412 @@ -77017,7 +77321,7 @@
11413    ac_save_LIBS="$LIBS"
11414  LIBS="-lpq  $LIBS"
11415  cat > conftest.$ac_ext <<EOF
11416 -#line 77021 "configure"
11417 +#line 77325 "configure"
11418  #include "confdefs.h"
11419  /* Override any gcc2 internal prototype to avoid an error.  */
11420  /* We use char because int might match the return type of a gcc2
11421 @@ -77028,7 +77332,7 @@
11422  PQparameterStatus()
11423  ; return 0; }
11424  EOF
11425 -if { (eval echo configure:77032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11426 +if { (eval echo configure:77336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11427    rm -rf conftest*
11428    eval "ac_cv_lib_$ac_lib_var=yes"
11429  else
11430 @@ -77052,7 +77356,7 @@
11431  fi
11432  
11433    echo $ac_n "checking for PQprotocolVersion in -lpq""... $ac_c" 1>&6
11434 -echo "configure:77056: checking for PQprotocolVersion in -lpq" >&5
11435 +echo "configure:77360: checking for PQprotocolVersion in -lpq" >&5
11436  ac_lib_var=`echo pq'_'PQprotocolVersion | sed 'y%./+-%__p_%'`
11437  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11438    echo $ac_n "(cached) $ac_c" 1>&6
11439 @@ -77060,7 +77364,7 @@
11440    ac_save_LIBS="$LIBS"
11441  LIBS="-lpq  $LIBS"
11442  cat > conftest.$ac_ext <<EOF
11443 -#line 77064 "configure"
11444 +#line 77368 "configure"
11445  #include "confdefs.h"
11446  /* Override any gcc2 internal prototype to avoid an error.  */
11447  /* We use char because int might match the return type of a gcc2
11448 @@ -77071,7 +77375,7 @@
11449  PQprotocolVersion()
11450  ; return 0; }
11451  EOF
11452 -if { (eval echo configure:77075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11453 +if { (eval echo configure:77379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11454    rm -rf conftest*
11455    eval "ac_cv_lib_$ac_lib_var=yes"
11456  else
11457 @@ -77095,7 +77399,7 @@
11458  fi
11459  
11460    echo $ac_n "checking for PQtransactionStatus in -lpq""... $ac_c" 1>&6
11461 -echo "configure:77099: checking for PQtransactionStatus in -lpq" >&5
11462 +echo "configure:77403: checking for PQtransactionStatus in -lpq" >&5
11463  ac_lib_var=`echo pq'_'PQtransactionStatus | sed 'y%./+-%__p_%'`
11464  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11465    echo $ac_n "(cached) $ac_c" 1>&6
11466 @@ -77103,7 +77407,7 @@
11467    ac_save_LIBS="$LIBS"
11468  LIBS="-lpq  $LIBS"
11469  cat > conftest.$ac_ext <<EOF
11470 -#line 77107 "configure"
11471 +#line 77411 "configure"
11472  #include "confdefs.h"
11473  /* Override any gcc2 internal prototype to avoid an error.  */
11474  /* We use char because int might match the return type of a gcc2
11475 @@ -77114,7 +77418,7 @@
11476  PQtransactionStatus()
11477  ; return 0; }
11478  EOF
11479 -if { (eval echo configure:77118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11480 +if { (eval echo configure:77422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11481    rm -rf conftest*
11482    eval "ac_cv_lib_$ac_lib_var=yes"
11483  else
11484 @@ -77138,7 +77442,7 @@
11485  fi
11486  
11487    echo $ac_n "checking for PQunescapeBytea in -lpq""... $ac_c" 1>&6
11488 -echo "configure:77142: checking for PQunescapeBytea in -lpq" >&5
11489 +echo "configure:77446: checking for PQunescapeBytea in -lpq" >&5
11490  ac_lib_var=`echo pq'_'PQunescapeBytea | sed 'y%./+-%__p_%'`
11491  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11492    echo $ac_n "(cached) $ac_c" 1>&6
11493 @@ -77146,7 +77450,7 @@
11494    ac_save_LIBS="$LIBS"
11495  LIBS="-lpq  $LIBS"
11496  cat > conftest.$ac_ext <<EOF
11497 -#line 77150 "configure"
11498 +#line 77454 "configure"
11499  #include "confdefs.h"
11500  /* Override any gcc2 internal prototype to avoid an error.  */
11501  /* We use char because int might match the return type of a gcc2
11502 @@ -77157,7 +77461,7 @@
11503  PQunescapeBytea()
11504  ; return 0; }
11505  EOF
11506 -if { (eval echo configure:77161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11507 +if { (eval echo configure:77465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11508    rm -rf conftest*
11509    eval "ac_cv_lib_$ac_lib_var=yes"
11510  else
11511 @@ -77181,7 +77485,7 @@
11512  fi
11513  
11514    echo $ac_n "checking for PQExecParams in -lpq""... $ac_c" 1>&6
11515 -echo "configure:77185: checking for PQExecParams in -lpq" >&5
11516 +echo "configure:77489: checking for PQExecParams in -lpq" >&5
11517  ac_lib_var=`echo pq'_'PQExecParams | sed 'y%./+-%__p_%'`
11518  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11519    echo $ac_n "(cached) $ac_c" 1>&6
11520 @@ -77189,7 +77493,7 @@
11521    ac_save_LIBS="$LIBS"
11522  LIBS="-lpq  $LIBS"
11523  cat > conftest.$ac_ext <<EOF
11524 -#line 77193 "configure"
11525 +#line 77497 "configure"
11526  #include "confdefs.h"
11527  /* Override any gcc2 internal prototype to avoid an error.  */
11528  /* We use char because int might match the return type of a gcc2
11529 @@ -77200,7 +77504,7 @@
11530  PQExecParams()
11531  ; return 0; }
11532  EOF
11533 -if { (eval echo configure:77204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11534 +if { (eval echo configure:77508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11535    rm -rf conftest*
11536    eval "ac_cv_lib_$ac_lib_var=yes"
11537  else
11538 @@ -77224,7 +77528,7 @@
11539  fi
11540  
11541    echo $ac_n "checking for PQresultErrorField in -lpq""... $ac_c" 1>&6
11542 -echo "configure:77228: checking for PQresultErrorField in -lpq" >&5
11543 +echo "configure:77532: checking for PQresultErrorField in -lpq" >&5
11544  ac_lib_var=`echo pq'_'PQresultErrorField | sed 'y%./+-%__p_%'`
11545  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11546    echo $ac_n "(cached) $ac_c" 1>&6
11547 @@ -77232,7 +77536,7 @@
11548    ac_save_LIBS="$LIBS"
11549  LIBS="-lpq  $LIBS"
11550  cat > conftest.$ac_ext <<EOF
11551 -#line 77236 "configure"
11552 +#line 77540 "configure"
11553  #include "confdefs.h"
11554  /* Override any gcc2 internal prototype to avoid an error.  */
11555  /* We use char because int might match the return type of a gcc2
11556 @@ -77243,7 +77547,7 @@
11557  PQresultErrorField()
11558  ; return 0; }
11559  EOF
11560 -if { (eval echo configure:77247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11561 +if { (eval echo configure:77551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11562    rm -rf conftest*
11563    eval "ac_cv_lib_$ac_lib_var=yes"
11564  else
11565 @@ -77267,7 +77571,7 @@
11566  fi
11567  
11568    echo $ac_n "checking for pg_encoding_to_char in -lpq""... $ac_c" 1>&6
11569 -echo "configure:77271: checking for pg_encoding_to_char in -lpq" >&5
11570 +echo "configure:77575: checking for pg_encoding_to_char in -lpq" >&5
11571  ac_lib_var=`echo pq'_'pg_encoding_to_char | sed 'y%./+-%__p_%'`
11572  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11573    echo $ac_n "(cached) $ac_c" 1>&6
11574 @@ -77275,7 +77579,7 @@
11575    ac_save_LIBS="$LIBS"
11576  LIBS="-lpq  $LIBS"
11577  cat > conftest.$ac_ext <<EOF
11578 -#line 77279 "configure"
11579 +#line 77583 "configure"
11580  #include "confdefs.h"
11581  /* Override any gcc2 internal prototype to avoid an error.  */
11582  /* We use char because int might match the return type of a gcc2
11583 @@ -77286,7 +77590,7 @@
11584  pg_encoding_to_char()
11585  ; return 0; }
11586  EOF
11587 -if { (eval echo configure:77290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11588 +if { (eval echo configure:77594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11589    rm -rf conftest*
11590    eval "ac_cv_lib_$ac_lib_var=yes"
11591  else
11592 @@ -77311,7 +77615,7 @@
11593  
11594    
11595    echo $ac_n "checking for PQprepare in -lpq""... $ac_c" 1>&6
11596 -echo "configure:77315: checking for PQprepare in -lpq" >&5
11597 +echo "configure:77619: checking for PQprepare in -lpq" >&5
11598  ac_lib_var=`echo pq'_'PQprepare | sed 'y%./+-%__p_%'`
11599  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11600    echo $ac_n "(cached) $ac_c" 1>&6
11601 @@ -77319,7 +77623,7 @@
11602    ac_save_LIBS="$LIBS"
11603  LIBS="-lpq  $LIBS"
11604  cat > conftest.$ac_ext <<EOF
11605 -#line 77323 "configure"
11606 +#line 77627 "configure"
11607  #include "confdefs.h"
11608  /* Override any gcc2 internal prototype to avoid an error.  */
11609  /* We use char because int might match the return type of a gcc2
11610 @@ -77330,7 +77634,7 @@
11611  PQprepare()
11612  ; return 0; }
11613  EOF
11614 -if { (eval echo configure:77334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11615 +if { (eval echo configure:77638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11616    rm -rf conftest*
11617    eval "ac_cv_lib_$ac_lib_var=yes"
11618  else
11619 @@ -77493,13 +77797,13 @@
11620    
11621      
11622    echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
11623 -echo "configure:77497: checking for PDO includes" >&5
11624 +echo "configure:77801: checking for PDO includes" >&5
11625  if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
11626    echo $ac_n "(cached) $ac_c" 1>&6
11627  else
11628    
11629      echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
11630 -echo "configure:77503: checking for PDO includes" >&5
11631 +echo "configure:77807: checking for PDO includes" >&5
11632      if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
11633        pdo_inc_path=$abs_srcdir/ext
11634      elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
11635 @@ -77832,7 +78136,7 @@
11636  php_with_pdo_sqlite=yes
11637  
11638  echo $ac_n "checking for sqlite 3 support for PDO""... $ac_c" 1>&6
11639 -echo "configure:77836: checking for sqlite 3 support for PDO" >&5
11640 +echo "configure:78140: checking for sqlite 3 support for PDO" >&5
11641  # Check whether --with-pdo-sqlite or --without-pdo-sqlite was given.
11642  if test "${with_pdo_sqlite+set}" = set; then
11643    withval="$with_pdo_sqlite"
11644 @@ -77880,13 +78184,13 @@
11645    
11646      
11647    echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
11648 -echo "configure:77884: checking for PDO includes" >&5
11649 +echo "configure:78188: checking for PDO includes" >&5
11650  if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
11651    echo $ac_n "(cached) $ac_c" 1>&6
11652  else
11653    
11654      echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
11655 -echo "configure:77890: checking for PDO includes" >&5
11656 +echo "configure:78194: checking for PDO includes" >&5
11657      if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
11658        pdo_inc_path=$abs_srcdir/ext
11659      elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
11660 @@ -77915,7 +78219,7 @@
11661        PDO_SQLITE_DIR=$PHP_PDO_SQLITE
11662      else # search default path list
11663        echo $ac_n "checking for sqlite3 files in default path""... $ac_c" 1>&6
11664 -echo "configure:77919: checking for sqlite3 files in default path" >&5
11665 +echo "configure:78223: checking for sqlite3 files in default path" >&5
11666        for i in $SEARCH_PATH ; do
11667          if test -r $i/$SEARCH_FOR; then
11668            PDO_SQLITE_DIR=$i
11669 @@ -78061,7 +78365,7 @@
11670    done
11671  
11672    echo $ac_n "checking for $LIBSYMBOL in -l$LIBNAME""... $ac_c" 1>&6
11673 -echo "configure:78065: checking for $LIBSYMBOL in -l$LIBNAME" >&5
11674 +echo "configure:78369: checking for $LIBSYMBOL in -l$LIBNAME" >&5
11675  ac_lib_var=`echo $LIBNAME'_'$LIBSYMBOL | sed 'y%./+-%__p_%'`
11676  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11677    echo $ac_n "(cached) $ac_c" 1>&6
11678 @@ -78069,7 +78373,7 @@
11679    ac_save_LIBS="$LIBS"
11680  LIBS="-l$LIBNAME  $LIBS"
11681  cat > conftest.$ac_ext <<EOF
11682 -#line 78073 "configure"
11683 +#line 78377 "configure"
11684  #include "confdefs.h"
11685  /* Override any gcc2 internal prototype to avoid an error.  */
11686  /* We use char because int might match the return type of a gcc2
11687 @@ -78080,7 +78384,7 @@
11688  $LIBSYMBOL()
11689  ; return 0; }
11690  EOF
11691 -if { (eval echo configure:78084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11692 +if { (eval echo configure:78388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11693    rm -rf conftest*
11694    eval "ac_cv_lib_$ac_lib_var=yes"
11695  else
11696 @@ -78310,7 +78614,7 @@
11697    done
11698  
11699    echo $ac_n "checking for sqlite3_key in -lsqlite3""... $ac_c" 1>&6
11700 -echo "configure:78314: checking for sqlite3_key in -lsqlite3" >&5
11701 +echo "configure:78618: checking for sqlite3_key in -lsqlite3" >&5
11702  ac_lib_var=`echo sqlite3'_'sqlite3_key | sed 'y%./+-%__p_%'`
11703  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11704    echo $ac_n "(cached) $ac_c" 1>&6
11705 @@ -78318,7 +78622,7 @@
11706    ac_save_LIBS="$LIBS"
11707  LIBS="-lsqlite3  $LIBS"
11708  cat > conftest.$ac_ext <<EOF
11709 -#line 78322 "configure"
11710 +#line 78626 "configure"
11711  #include "confdefs.h"
11712  /* Override any gcc2 internal prototype to avoid an error.  */
11713  /* We use char because int might match the return type of a gcc2
11714 @@ -78329,7 +78633,7 @@
11715  sqlite3_key()
11716  ; return 0; }
11717  EOF
11718 -if { (eval echo configure:78333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11719 +if { (eval echo configure:78637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11720    rm -rf conftest*
11721    eval "ac_cv_lib_$ac_lib_var=yes"
11722  else
11723 @@ -78960,7 +79264,7 @@
11724    
11725  
11726        echo $ac_n "checking size of char *""... $ac_c" 1>&6
11727 -echo "configure:78964: checking size of char *" >&5
11728 +echo "configure:79268: checking size of char *" >&5
11729  if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
11730    echo $ac_n "(cached) $ac_c" 1>&6
11731  else
11732 @@ -78968,18 +79272,18 @@
11733    ac_cv_sizeof_char_p=4
11734  else
11735    cat > conftest.$ac_ext <<EOF
11736 -#line 78972 "configure"
11737 +#line 79276 "configure"
11738  #include "confdefs.h"
11739  #include <stdio.h>
11740 -int main()
11741 +main()
11742  {
11743    FILE *f=fopen("conftestval", "w");
11744 -  if (!f) return(1);
11745 +  if (!f) exit(1);
11746    fprintf(f, "%d\n", sizeof(char *));
11747 -  return(0);
11748 +  exit(0);
11749  }
11750  EOF
11751 -if { (eval echo configure:78983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11752 +if { (eval echo configure:79287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11753  then
11754    ac_cv_sizeof_char_p=`cat conftestval`
11755  else
11756 @@ -79026,12 +79330,12 @@
11757        for ac_func in usleep nanosleep
11758  do
11759  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11760 -echo "configure:79030: checking for $ac_func" >&5
11761 +echo "configure:79334: checking for $ac_func" >&5
11762  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11763    echo $ac_n "(cached) $ac_c" 1>&6
11764  else
11765    cat > conftest.$ac_ext <<EOF
11766 -#line 79035 "configure"
11767 +#line 79339 "configure"
11768  #include "confdefs.h"
11769  /* System header to define __stub macros and hopefully few prototypes,
11770      which can conflict with char $ac_func(); below.  */
11771 @@ -79054,7 +79358,7 @@
11772  
11773  ; return 0; }
11774  EOF
11775 -if { (eval echo configure:79058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11776 +if { (eval echo configure:79362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11777    rm -rf conftest*
11778    eval "ac_cv_func_$ac_func=yes"
11779  else
11780 @@ -79082,17 +79386,17 @@
11781  do
11782  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11783  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11784 -echo "configure:79086: checking for $ac_hdr" >&5
11785 +echo "configure:79390: checking for $ac_hdr" >&5
11786  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11787    echo $ac_n "(cached) $ac_c" 1>&6
11788  else
11789    cat > conftest.$ac_ext <<EOF
11790 -#line 79091 "configure"
11791 +#line 79395 "configure"
11792  #include "confdefs.h"
11793  #include <$ac_hdr>
11794  EOF
11795  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11796 -{ (eval echo configure:79096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11797 +{ (eval echo configure:79400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11798  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11799  if test -z "$ac_err"; then
11800    rm -rf conftest*
11801 @@ -79216,7 +79520,7 @@
11802    done
11803  
11804    echo $ac_n "checking for fdatasync in -lrt""... $ac_c" 1>&6
11805 -echo "configure:79220: checking for fdatasync in -lrt" >&5
11806 +echo "configure:79524: checking for fdatasync in -lrt" >&5
11807  ac_lib_var=`echo rt'_'fdatasync | sed 'y%./+-%__p_%'`
11808  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11809    echo $ac_n "(cached) $ac_c" 1>&6
11810 @@ -79224,7 +79528,7 @@
11811    ac_save_LIBS="$LIBS"
11812  LIBS="-lrt  $LIBS"
11813  cat > conftest.$ac_ext <<EOF
11814 -#line 79228 "configure"
11815 +#line 79532 "configure"
11816  #include "confdefs.h"
11817  /* Override any gcc2 internal prototype to avoid an error.  */
11818  /* We use char because int might match the return type of a gcc2
11819 @@ -79235,7 +79539,7 @@
11820  fdatasync()
11821  ; return 0; }
11822  EOF
11823 -if { (eval echo configure:79239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11824 +if { (eval echo configure:79543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11825    rm -rf conftest*
11826    eval "ac_cv_lib_$ac_lib_var=yes"
11827  else
11828 @@ -79318,7 +79622,7 @@
11829  php_with_pgsql=no
11830  
11831  echo $ac_n "checking for PostgreSQL support""... $ac_c" 1>&6
11832 -echo "configure:79322: checking for PostgreSQL support" >&5
11833 +echo "configure:79626: checking for PostgreSQL support" >&5
11834  # Check whether --with-pgsql or --without-pgsql was given.
11835  if test "${with_pgsql+set}" = set; then
11836    withval="$with_pgsql"
11837 @@ -79375,7 +79679,7 @@
11838  
11839  
11840    echo $ac_n "checking for pg_config""... $ac_c" 1>&6
11841 -echo "configure:79379: checking for pg_config" >&5
11842 +echo "configure:79683: checking for pg_config" >&5
11843    for i in $PHP_PGSQL $PHP_PGSQL/bin /usr/local/pgsql/bin /usr/local/bin /usr/bin ""; do
11844         if test -x $i/pg_config; then
11845        PG_CONFIG="$i/pg_config"
11846 @@ -79443,7 +79747,7 @@
11847    old_LDFLAGS=$LDFLAGS
11848    LDFLAGS="$LDFLAGS -L$PGSQL_LIBDIR"
11849    echo $ac_n "checking for PQescapeString in -lpq""... $ac_c" 1>&6
11850 -echo "configure:79447: checking for PQescapeString in -lpq" >&5
11851 +echo "configure:79751: checking for PQescapeString in -lpq" >&5
11852  ac_lib_var=`echo pq'_'PQescapeString | sed 'y%./+-%__p_%'`
11853  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11854    echo $ac_n "(cached) $ac_c" 1>&6
11855 @@ -79451,7 +79755,7 @@
11856    ac_save_LIBS="$LIBS"
11857  LIBS="-lpq  $LIBS"
11858  cat > conftest.$ac_ext <<EOF
11859 -#line 79455 "configure"
11860 +#line 79759 "configure"
11861  #include "confdefs.h"
11862  /* Override any gcc2 internal prototype to avoid an error.  */
11863  /* We use char because int might match the return type of a gcc2
11864 @@ -79462,7 +79766,7 @@
11865  PQescapeString()
11866  ; return 0; }
11867  EOF
11868 -if { (eval echo configure:79466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11869 +if { (eval echo configure:79770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11870    rm -rf conftest*
11871    eval "ac_cv_lib_$ac_lib_var=yes"
11872  else
11873 @@ -79486,7 +79790,7 @@
11874  fi
11875  
11876    echo $ac_n "checking for PQunescapeBytea in -lpq""... $ac_c" 1>&6
11877 -echo "configure:79490: checking for PQunescapeBytea in -lpq" >&5
11878 +echo "configure:79794: checking for PQunescapeBytea in -lpq" >&5
11879  ac_lib_var=`echo pq'_'PQunescapeBytea | sed 'y%./+-%__p_%'`
11880  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11881    echo $ac_n "(cached) $ac_c" 1>&6
11882 @@ -79494,7 +79798,7 @@
11883    ac_save_LIBS="$LIBS"
11884  LIBS="-lpq  $LIBS"
11885  cat > conftest.$ac_ext <<EOF
11886 -#line 79498 "configure"
11887 +#line 79802 "configure"
11888  #include "confdefs.h"
11889  /* Override any gcc2 internal prototype to avoid an error.  */
11890  /* We use char because int might match the return type of a gcc2
11891 @@ -79505,7 +79809,7 @@
11892  PQunescapeBytea()
11893  ; return 0; }
11894  EOF
11895 -if { (eval echo configure:79509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11896 +if { (eval echo configure:79813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11897    rm -rf conftest*
11898    eval "ac_cv_lib_$ac_lib_var=yes"
11899  else
11900 @@ -79529,7 +79833,7 @@
11901  fi
11902  
11903    echo $ac_n "checking for PQsetnonblocking in -lpq""... $ac_c" 1>&6
11904 -echo "configure:79533: checking for PQsetnonblocking in -lpq" >&5
11905 +echo "configure:79837: checking for PQsetnonblocking in -lpq" >&5
11906  ac_lib_var=`echo pq'_'PQsetnonblocking | sed 'y%./+-%__p_%'`
11907  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11908    echo $ac_n "(cached) $ac_c" 1>&6
11909 @@ -79537,7 +79841,7 @@
11910    ac_save_LIBS="$LIBS"
11911  LIBS="-lpq  $LIBS"
11912  cat > conftest.$ac_ext <<EOF
11913 -#line 79541 "configure"
11914 +#line 79845 "configure"
11915  #include "confdefs.h"
11916  /* Override any gcc2 internal prototype to avoid an error.  */
11917  /* We use char because int might match the return type of a gcc2
11918 @@ -79548,7 +79852,7 @@
11919  PQsetnonblocking()
11920  ; return 0; }
11921  EOF
11922 -if { (eval echo configure:79552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11923 +if { (eval echo configure:79856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11924    rm -rf conftest*
11925    eval "ac_cv_lib_$ac_lib_var=yes"
11926  else
11927 @@ -79572,7 +79876,7 @@
11928  fi
11929  
11930    echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
11931 -echo "configure:79576: checking for PQcmdTuples in -lpq" >&5
11932 +echo "configure:79880: checking for PQcmdTuples in -lpq" >&5
11933  ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
11934  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11935    echo $ac_n "(cached) $ac_c" 1>&6
11936 @@ -79580,7 +79884,7 @@
11937    ac_save_LIBS="$LIBS"
11938  LIBS="-lpq  $LIBS"
11939  cat > conftest.$ac_ext <<EOF
11940 -#line 79584 "configure"
11941 +#line 79888 "configure"
11942  #include "confdefs.h"
11943  /* Override any gcc2 internal prototype to avoid an error.  */
11944  /* We use char because int might match the return type of a gcc2
11945 @@ -79591,7 +79895,7 @@
11946  PQcmdTuples()
11947  ; return 0; }
11948  EOF
11949 -if { (eval echo configure:79595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11950 +if { (eval echo configure:79899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11951    rm -rf conftest*
11952    eval "ac_cv_lib_$ac_lib_var=yes"
11953  else
11954 @@ -79615,7 +79919,7 @@
11955  fi
11956  
11957    echo $ac_n "checking for PQoidValue in -lpq""... $ac_c" 1>&6
11958 -echo "configure:79619: checking for PQoidValue in -lpq" >&5
11959 +echo "configure:79923: checking for PQoidValue in -lpq" >&5
11960  ac_lib_var=`echo pq'_'PQoidValue | sed 'y%./+-%__p_%'`
11961  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11962    echo $ac_n "(cached) $ac_c" 1>&6
11963 @@ -79623,7 +79927,7 @@
11964    ac_save_LIBS="$LIBS"
11965  LIBS="-lpq  $LIBS"
11966  cat > conftest.$ac_ext <<EOF
11967 -#line 79627 "configure"
11968 +#line 79931 "configure"
11969  #include "confdefs.h"
11970  /* Override any gcc2 internal prototype to avoid an error.  */
11971  /* We use char because int might match the return type of a gcc2
11972 @@ -79634,7 +79938,7 @@
11973  PQoidValue()
11974  ; return 0; }
11975  EOF
11976 -if { (eval echo configure:79638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11977 +if { (eval echo configure:79942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11978    rm -rf conftest*
11979    eval "ac_cv_lib_$ac_lib_var=yes"
11980  else
11981 @@ -79658,7 +79962,7 @@
11982  fi
11983  
11984    echo $ac_n "checking for PQclientEncoding in -lpq""... $ac_c" 1>&6
11985 -echo "configure:79662: checking for PQclientEncoding in -lpq" >&5
11986 +echo "configure:79966: checking for PQclientEncoding in -lpq" >&5
11987  ac_lib_var=`echo pq'_'PQclientEncoding | sed 'y%./+-%__p_%'`
11988  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11989    echo $ac_n "(cached) $ac_c" 1>&6
11990 @@ -79666,7 +79970,7 @@
11991    ac_save_LIBS="$LIBS"
11992  LIBS="-lpq  $LIBS"
11993  cat > conftest.$ac_ext <<EOF
11994 -#line 79670 "configure"
11995 +#line 79974 "configure"
11996  #include "confdefs.h"
11997  /* Override any gcc2 internal prototype to avoid an error.  */
11998  /* We use char because int might match the return type of a gcc2
11999 @@ -79677,7 +79981,7 @@
12000  PQclientEncoding()
12001  ; return 0; }
12002  EOF
12003 -if { (eval echo configure:79681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12004 +if { (eval echo configure:79985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12005    rm -rf conftest*
12006    eval "ac_cv_lib_$ac_lib_var=yes"
12007  else
12008 @@ -79701,7 +80005,7 @@
12009  fi
12010  
12011    echo $ac_n "checking for PQparameterStatus in -lpq""... $ac_c" 1>&6
12012 -echo "configure:79705: checking for PQparameterStatus in -lpq" >&5
12013 +echo "configure:80009: checking for PQparameterStatus in -lpq" >&5
12014  ac_lib_var=`echo pq'_'PQparameterStatus | sed 'y%./+-%__p_%'`
12015  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12016    echo $ac_n "(cached) $ac_c" 1>&6
12017 @@ -79709,7 +80013,7 @@
12018    ac_save_LIBS="$LIBS"
12019  LIBS="-lpq  $LIBS"
12020  cat > conftest.$ac_ext <<EOF
12021 -#line 79713 "configure"
12022 +#line 80017 "configure"
12023  #include "confdefs.h"
12024  /* Override any gcc2 internal prototype to avoid an error.  */
12025  /* We use char because int might match the return type of a gcc2
12026 @@ -79720,7 +80024,7 @@
12027  PQparameterStatus()
12028  ; return 0; }
12029  EOF
12030 -if { (eval echo configure:79724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12031 +if { (eval echo configure:80028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12032    rm -rf conftest*
12033    eval "ac_cv_lib_$ac_lib_var=yes"
12034  else
12035 @@ -79744,7 +80048,7 @@
12036  fi
12037  
12038    echo $ac_n "checking for PQprotocolVersion in -lpq""... $ac_c" 1>&6
12039 -echo "configure:79748: checking for PQprotocolVersion in -lpq" >&5
12040 +echo "configure:80052: checking for PQprotocolVersion in -lpq" >&5
12041  ac_lib_var=`echo pq'_'PQprotocolVersion | sed 'y%./+-%__p_%'`
12042  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12043    echo $ac_n "(cached) $ac_c" 1>&6
12044 @@ -79752,7 +80056,7 @@
12045    ac_save_LIBS="$LIBS"
12046  LIBS="-lpq  $LIBS"
12047  cat > conftest.$ac_ext <<EOF
12048 -#line 79756 "configure"
12049 +#line 80060 "configure"
12050  #include "confdefs.h"
12051  /* Override any gcc2 internal prototype to avoid an error.  */
12052  /* We use char because int might match the return type of a gcc2
12053 @@ -79763,7 +80067,7 @@
12054  PQprotocolVersion()
12055  ; return 0; }
12056  EOF
12057 -if { (eval echo configure:79767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12058 +if { (eval echo configure:80071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12059    rm -rf conftest*
12060    eval "ac_cv_lib_$ac_lib_var=yes"
12061  else
12062 @@ -79787,7 +80091,7 @@
12063  fi
12064  
12065    echo $ac_n "checking for PQtransactionStatus in -lpq""... $ac_c" 1>&6
12066 -echo "configure:79791: checking for PQtransactionStatus in -lpq" >&5
12067 +echo "configure:80095: checking for PQtransactionStatus in -lpq" >&5
12068  ac_lib_var=`echo pq'_'PQtransactionStatus | sed 'y%./+-%__p_%'`
12069  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12070    echo $ac_n "(cached) $ac_c" 1>&6
12071 @@ -79795,7 +80099,7 @@
12072    ac_save_LIBS="$LIBS"
12073  LIBS="-lpq  $LIBS"
12074  cat > conftest.$ac_ext <<EOF
12075 -#line 79799 "configure"
12076 +#line 80103 "configure"
12077  #include "confdefs.h"
12078  /* Override any gcc2 internal prototype to avoid an error.  */
12079  /* We use char because int might match the return type of a gcc2
12080 @@ -79806,7 +80110,7 @@
12081  PQtransactionStatus()
12082  ; return 0; }
12083  EOF
12084 -if { (eval echo configure:79810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12085 +if { (eval echo configure:80114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12086    rm -rf conftest*
12087    eval "ac_cv_lib_$ac_lib_var=yes"
12088  else
12089 @@ -79830,7 +80134,7 @@
12090  fi
12091  
12092    echo $ac_n "checking for PQexecParams in -lpq""... $ac_c" 1>&6
12093 -echo "configure:79834: checking for PQexecParams in -lpq" >&5
12094 +echo "configure:80138: checking for PQexecParams in -lpq" >&5
12095  ac_lib_var=`echo pq'_'PQexecParams | sed 'y%./+-%__p_%'`
12096  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12097    echo $ac_n "(cached) $ac_c" 1>&6
12098 @@ -79838,7 +80142,7 @@
12099    ac_save_LIBS="$LIBS"
12100  LIBS="-lpq  $LIBS"
12101  cat > conftest.$ac_ext <<EOF
12102 -#line 79842 "configure"
12103 +#line 80146 "configure"
12104  #include "confdefs.h"
12105  /* Override any gcc2 internal prototype to avoid an error.  */
12106  /* We use char because int might match the return type of a gcc2
12107 @@ -79849,7 +80153,7 @@
12108  PQexecParams()
12109  ; return 0; }
12110  EOF
12111 -if { (eval echo configure:79853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12112 +if { (eval echo configure:80157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12113    rm -rf conftest*
12114    eval "ac_cv_lib_$ac_lib_var=yes"
12115  else
12116 @@ -79873,7 +80177,7 @@
12117  fi
12118  
12119    echo $ac_n "checking for PQprepare in -lpq""... $ac_c" 1>&6
12120 -echo "configure:79877: checking for PQprepare in -lpq" >&5
12121 +echo "configure:80181: checking for PQprepare in -lpq" >&5
12122  ac_lib_var=`echo pq'_'PQprepare | sed 'y%./+-%__p_%'`
12123  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12124    echo $ac_n "(cached) $ac_c" 1>&6
12125 @@ -79881,7 +80185,7 @@
12126    ac_save_LIBS="$LIBS"
12127  LIBS="-lpq  $LIBS"
12128  cat > conftest.$ac_ext <<EOF
12129 -#line 79885 "configure"
12130 +#line 80189 "configure"
12131  #include "confdefs.h"
12132  /* Override any gcc2 internal prototype to avoid an error.  */
12133  /* We use char because int might match the return type of a gcc2
12134 @@ -79892,7 +80196,7 @@
12135  PQprepare()
12136  ; return 0; }
12137  EOF
12138 -if { (eval echo configure:79896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12139 +if { (eval echo configure:80200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12140    rm -rf conftest*
12141    eval "ac_cv_lib_$ac_lib_var=yes"
12142  else
12143 @@ -79916,7 +80220,7 @@
12144  fi
12145  
12146    echo $ac_n "checking for PQexecPrepared in -lpq""... $ac_c" 1>&6
12147 -echo "configure:79920: checking for PQexecPrepared in -lpq" >&5
12148 +echo "configure:80224: checking for PQexecPrepared in -lpq" >&5
12149  ac_lib_var=`echo pq'_'PQexecPrepared | sed 'y%./+-%__p_%'`
12150  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12151    echo $ac_n "(cached) $ac_c" 1>&6
12152 @@ -79924,7 +80228,7 @@
12153    ac_save_LIBS="$LIBS"
12154  LIBS="-lpq  $LIBS"
12155  cat > conftest.$ac_ext <<EOF
12156 -#line 79928 "configure"
12157 +#line 80232 "configure"
12158  #include "confdefs.h"
12159  /* Override any gcc2 internal prototype to avoid an error.  */
12160  /* We use char because int might match the return type of a gcc2
12161 @@ -79935,7 +80239,7 @@
12162  PQexecPrepared()
12163  ; return 0; }
12164  EOF
12165 -if { (eval echo configure:79939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12166 +if { (eval echo configure:80243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12167    rm -rf conftest*
12168    eval "ac_cv_lib_$ac_lib_var=yes"
12169  else
12170 @@ -79959,7 +80263,7 @@
12171  fi
12172  
12173    echo $ac_n "checking for PQresultErrorField in -lpq""... $ac_c" 1>&6
12174 -echo "configure:79963: checking for PQresultErrorField in -lpq" >&5
12175 +echo "configure:80267: checking for PQresultErrorField in -lpq" >&5
12176  ac_lib_var=`echo pq'_'PQresultErrorField | sed 'y%./+-%__p_%'`
12177  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12178    echo $ac_n "(cached) $ac_c" 1>&6
12179 @@ -79967,7 +80271,7 @@
12180    ac_save_LIBS="$LIBS"
12181  LIBS="-lpq  $LIBS"
12182  cat > conftest.$ac_ext <<EOF
12183 -#line 79971 "configure"
12184 +#line 80275 "configure"
12185  #include "confdefs.h"
12186  /* Override any gcc2 internal prototype to avoid an error.  */
12187  /* We use char because int might match the return type of a gcc2
12188 @@ -79978,7 +80282,7 @@
12189  PQresultErrorField()
12190  ; return 0; }
12191  EOF
12192 -if { (eval echo configure:79982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12193 +if { (eval echo configure:80286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12194    rm -rf conftest*
12195    eval "ac_cv_lib_$ac_lib_var=yes"
12196  else
12197 @@ -80002,7 +80306,7 @@
12198  fi
12199  
12200    echo $ac_n "checking for PQsendQueryParams in -lpq""... $ac_c" 1>&6
12201 -echo "configure:80006: checking for PQsendQueryParams in -lpq" >&5
12202 +echo "configure:80310: checking for PQsendQueryParams in -lpq" >&5
12203  ac_lib_var=`echo pq'_'PQsendQueryParams | sed 'y%./+-%__p_%'`
12204  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12205    echo $ac_n "(cached) $ac_c" 1>&6
12206 @@ -80010,7 +80314,7 @@
12207    ac_save_LIBS="$LIBS"
12208  LIBS="-lpq  $LIBS"
12209  cat > conftest.$ac_ext <<EOF
12210 -#line 80014 "configure"
12211 +#line 80318 "configure"
12212  #include "confdefs.h"
12213  /* Override any gcc2 internal prototype to avoid an error.  */
12214  /* We use char because int might match the return type of a gcc2
12215 @@ -80021,7 +80325,7 @@
12216  PQsendQueryParams()
12217  ; return 0; }
12218  EOF
12219 -if { (eval echo configure:80025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12220 +if { (eval echo configure:80329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12221    rm -rf conftest*
12222    eval "ac_cv_lib_$ac_lib_var=yes"
12223  else
12224 @@ -80045,7 +80349,7 @@
12225  fi
12226  
12227    echo $ac_n "checking for PQsendPrepare in -lpq""... $ac_c" 1>&6
12228 -echo "configure:80049: checking for PQsendPrepare in -lpq" >&5
12229 +echo "configure:80353: checking for PQsendPrepare in -lpq" >&5
12230  ac_lib_var=`echo pq'_'PQsendPrepare | sed 'y%./+-%__p_%'`
12231  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12232    echo $ac_n "(cached) $ac_c" 1>&6
12233 @@ -80053,7 +80357,7 @@
12234    ac_save_LIBS="$LIBS"
12235  LIBS="-lpq  $LIBS"
12236  cat > conftest.$ac_ext <<EOF
12237 -#line 80057 "configure"
12238 +#line 80361 "configure"
12239  #include "confdefs.h"
12240  /* Override any gcc2 internal prototype to avoid an error.  */
12241  /* We use char because int might match the return type of a gcc2
12242 @@ -80064,7 +80368,7 @@
12243  PQsendPrepare()
12244  ; return 0; }
12245  EOF
12246 -if { (eval echo configure:80068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12247 +if { (eval echo configure:80372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12248    rm -rf conftest*
12249    eval "ac_cv_lib_$ac_lib_var=yes"
12250  else
12251 @@ -80088,7 +80392,7 @@
12252  fi
12253  
12254    echo $ac_n "checking for PQsendQueryPrepared in -lpq""... $ac_c" 1>&6
12255 -echo "configure:80092: checking for PQsendQueryPrepared in -lpq" >&5
12256 +echo "configure:80396: checking for PQsendQueryPrepared in -lpq" >&5
12257  ac_lib_var=`echo pq'_'PQsendQueryPrepared | sed 'y%./+-%__p_%'`
12258  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12259    echo $ac_n "(cached) $ac_c" 1>&6
12260 @@ -80096,7 +80400,7 @@
12261    ac_save_LIBS="$LIBS"
12262  LIBS="-lpq  $LIBS"
12263  cat > conftest.$ac_ext <<EOF
12264 -#line 80100 "configure"
12265 +#line 80404 "configure"
12266  #include "confdefs.h"
12267  /* Override any gcc2 internal prototype to avoid an error.  */
12268  /* We use char because int might match the return type of a gcc2
12269 @@ -80107,7 +80411,7 @@
12270  PQsendQueryPrepared()
12271  ; return 0; }
12272  EOF
12273 -if { (eval echo configure:80111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12274 +if { (eval echo configure:80415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12275    rm -rf conftest*
12276    eval "ac_cv_lib_$ac_lib_var=yes"
12277  else
12278 @@ -80131,7 +80435,7 @@
12279  fi
12280  
12281    echo $ac_n "checking for PQputCopyData in -lpq""... $ac_c" 1>&6
12282 -echo "configure:80135: checking for PQputCopyData in -lpq" >&5
12283 +echo "configure:80439: checking for PQputCopyData in -lpq" >&5
12284  ac_lib_var=`echo pq'_'PQputCopyData | sed 'y%./+-%__p_%'`
12285  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12286    echo $ac_n "(cached) $ac_c" 1>&6
12287 @@ -80139,7 +80443,7 @@
12288    ac_save_LIBS="$LIBS"
12289  LIBS="-lpq  $LIBS"
12290  cat > conftest.$ac_ext <<EOF
12291 -#line 80143 "configure"
12292 +#line 80447 "configure"
12293  #include "confdefs.h"
12294  /* Override any gcc2 internal prototype to avoid an error.  */
12295  /* We use char because int might match the return type of a gcc2
12296 @@ -80150,7 +80454,7 @@
12297  PQputCopyData()
12298  ; return 0; }
12299  EOF
12300 -if { (eval echo configure:80154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12301 +if { (eval echo configure:80458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12302    rm -rf conftest*
12303    eval "ac_cv_lib_$ac_lib_var=yes"
12304  else
12305 @@ -80174,7 +80478,7 @@
12306  fi
12307  
12308    echo $ac_n "checking for PQputCopyEnd in -lpq""... $ac_c" 1>&6
12309 -echo "configure:80178: checking for PQputCopyEnd in -lpq" >&5
12310 +echo "configure:80482: checking for PQputCopyEnd in -lpq" >&5
12311  ac_lib_var=`echo pq'_'PQputCopyEnd | sed 'y%./+-%__p_%'`
12312  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12313    echo $ac_n "(cached) $ac_c" 1>&6
12314 @@ -80182,7 +80486,7 @@
12315    ac_save_LIBS="$LIBS"
12316  LIBS="-lpq  $LIBS"
12317  cat > conftest.$ac_ext <<EOF
12318 -#line 80186 "configure"
12319 +#line 80490 "configure"
12320  #include "confdefs.h"
12321  /* Override any gcc2 internal prototype to avoid an error.  */
12322  /* We use char because int might match the return type of a gcc2
12323 @@ -80193,7 +80497,7 @@
12324  PQputCopyEnd()
12325  ; return 0; }
12326  EOF
12327 -if { (eval echo configure:80197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12328 +if { (eval echo configure:80501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12329    rm -rf conftest*
12330    eval "ac_cv_lib_$ac_lib_var=yes"
12331  else
12332 @@ -80217,7 +80521,7 @@
12333  fi
12334  
12335    echo $ac_n "checking for PQgetCopyData in -lpq""... $ac_c" 1>&6
12336 -echo "configure:80221: checking for PQgetCopyData in -lpq" >&5
12337 +echo "configure:80525: checking for PQgetCopyData in -lpq" >&5
12338  ac_lib_var=`echo pq'_'PQgetCopyData | sed 'y%./+-%__p_%'`
12339  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12340    echo $ac_n "(cached) $ac_c" 1>&6
12341 @@ -80225,7 +80529,7 @@
12342    ac_save_LIBS="$LIBS"
12343  LIBS="-lpq  $LIBS"
12344  cat > conftest.$ac_ext <<EOF
12345 -#line 80229 "configure"
12346 +#line 80533 "configure"
12347  #include "confdefs.h"
12348  /* Override any gcc2 internal prototype to avoid an error.  */
12349  /* We use char because int might match the return type of a gcc2
12350 @@ -80236,7 +80540,7 @@
12351  PQgetCopyData()
12352  ; return 0; }
12353  EOF
12354 -if { (eval echo configure:80240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12355 +if { (eval echo configure:80544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12356    rm -rf conftest*
12357    eval "ac_cv_lib_$ac_lib_var=yes"
12358  else
12359 @@ -80260,7 +80564,7 @@
12360  fi
12361  
12362    echo $ac_n "checking for PQfreemem in -lpq""... $ac_c" 1>&6
12363 -echo "configure:80264: checking for PQfreemem in -lpq" >&5
12364 +echo "configure:80568: checking for PQfreemem in -lpq" >&5
12365  ac_lib_var=`echo pq'_'PQfreemem | sed 'y%./+-%__p_%'`
12366  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12367    echo $ac_n "(cached) $ac_c" 1>&6
12368 @@ -80268,7 +80572,7 @@
12369    ac_save_LIBS="$LIBS"
12370  LIBS="-lpq  $LIBS"
12371  cat > conftest.$ac_ext <<EOF
12372 -#line 80272 "configure"
12373 +#line 80576 "configure"
12374  #include "confdefs.h"
12375  /* Override any gcc2 internal prototype to avoid an error.  */
12376  /* We use char because int might match the return type of a gcc2
12377 @@ -80279,7 +80583,7 @@
12378  PQfreemem()
12379  ; return 0; }
12380  EOF
12381 -if { (eval echo configure:80283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12382 +if { (eval echo configure:80587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12383    rm -rf conftest*
12384    eval "ac_cv_lib_$ac_lib_var=yes"
12385  else
12386 @@ -80303,7 +80607,7 @@
12387  fi
12388  
12389    echo $ac_n "checking for PQsetErrorVerbosity in -lpq""... $ac_c" 1>&6
12390 -echo "configure:80307: checking for PQsetErrorVerbosity in -lpq" >&5
12391 +echo "configure:80611: checking for PQsetErrorVerbosity in -lpq" >&5
12392  ac_lib_var=`echo pq'_'PQsetErrorVerbosity | sed 'y%./+-%__p_%'`
12393  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12394    echo $ac_n "(cached) $ac_c" 1>&6
12395 @@ -80311,7 +80615,7 @@
12396    ac_save_LIBS="$LIBS"
12397  LIBS="-lpq  $LIBS"
12398  cat > conftest.$ac_ext <<EOF
12399 -#line 80315 "configure"
12400 +#line 80619 "configure"
12401  #include "confdefs.h"
12402  /* Override any gcc2 internal prototype to avoid an error.  */
12403  /* We use char because int might match the return type of a gcc2
12404 @@ -80322,7 +80626,7 @@
12405  PQsetErrorVerbosity()
12406  ; return 0; }
12407  EOF
12408 -if { (eval echo configure:80326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12409 +if { (eval echo configure:80630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12410    rm -rf conftest*
12411    eval "ac_cv_lib_$ac_lib_var=yes"
12412  else
12413 @@ -80346,7 +80650,7 @@
12414  fi
12415  
12416    echo $ac_n "checking for PQftable in -lpq""... $ac_c" 1>&6
12417 -echo "configure:80350: checking for PQftable in -lpq" >&5
12418 +echo "configure:80654: checking for PQftable in -lpq" >&5
12419  ac_lib_var=`echo pq'_'PQftable | sed 'y%./+-%__p_%'`
12420  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12421    echo $ac_n "(cached) $ac_c" 1>&6
12422 @@ -80354,7 +80658,7 @@
12423    ac_save_LIBS="$LIBS"
12424  LIBS="-lpq  $LIBS"
12425  cat > conftest.$ac_ext <<EOF
12426 -#line 80358 "configure"
12427 +#line 80662 "configure"
12428  #include "confdefs.h"
12429  /* Override any gcc2 internal prototype to avoid an error.  */
12430  /* We use char because int might match the return type of a gcc2
12431 @@ -80365,7 +80669,7 @@
12432  PQftable()
12433  ; return 0; }
12434  EOF
12435 -if { (eval echo configure:80369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12436 +if { (eval echo configure:80673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12437    rm -rf conftest*
12438    eval "ac_cv_lib_$ac_lib_var=yes"
12439  else
12440 @@ -80389,7 +80693,7 @@
12441  fi
12442  
12443    echo $ac_n "checking for PQescapeStringConn in -lpq""... $ac_c" 1>&6
12444 -echo "configure:80393: checking for PQescapeStringConn in -lpq" >&5
12445 +echo "configure:80697: checking for PQescapeStringConn in -lpq" >&5
12446  ac_lib_var=`echo pq'_'PQescapeStringConn | sed 'y%./+-%__p_%'`
12447  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12448    echo $ac_n "(cached) $ac_c" 1>&6
12449 @@ -80397,7 +80701,7 @@
12450    ac_save_LIBS="$LIBS"
12451  LIBS="-lpq  $LIBS"
12452  cat > conftest.$ac_ext <<EOF
12453 -#line 80401 "configure"
12454 +#line 80705 "configure"
12455  #include "confdefs.h"
12456  /* Override any gcc2 internal prototype to avoid an error.  */
12457  /* We use char because int might match the return type of a gcc2
12458 @@ -80408,7 +80712,7 @@
12459  PQescapeStringConn()
12460  ; return 0; }
12461  EOF
12462 -if { (eval echo configure:80412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12463 +if { (eval echo configure:80716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12464    rm -rf conftest*
12465    eval "ac_cv_lib_$ac_lib_var=yes"
12466  else
12467 @@ -80432,7 +80736,7 @@
12468  fi
12469  
12470    echo $ac_n "checking for PQescapeByteaConn in -lpq""... $ac_c" 1>&6
12471 -echo "configure:80436: checking for PQescapeByteaConn in -lpq" >&5
12472 +echo "configure:80740: checking for PQescapeByteaConn in -lpq" >&5
12473  ac_lib_var=`echo pq'_'PQescapeByteaConn | sed 'y%./+-%__p_%'`
12474  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12475    echo $ac_n "(cached) $ac_c" 1>&6
12476 @@ -80440,7 +80744,7 @@
12477    ac_save_LIBS="$LIBS"
12478  LIBS="-lpq  $LIBS"
12479  cat > conftest.$ac_ext <<EOF
12480 -#line 80444 "configure"
12481 +#line 80748 "configure"
12482  #include "confdefs.h"
12483  /* Override any gcc2 internal prototype to avoid an error.  */
12484  /* We use char because int might match the return type of a gcc2
12485 @@ -80451,7 +80755,7 @@
12486  PQescapeByteaConn()
12487  ; return 0; }
12488  EOF
12489 -if { (eval echo configure:80455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12490 +if { (eval echo configure:80759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12491    rm -rf conftest*
12492    eval "ac_cv_lib_$ac_lib_var=yes"
12493  else
12494 @@ -80475,7 +80779,7 @@
12495  fi
12496  
12497    echo $ac_n "checking for pg_encoding_to_char in -lpq""... $ac_c" 1>&6
12498 -echo "configure:80479: checking for pg_encoding_to_char in -lpq" >&5
12499 +echo "configure:80783: checking for pg_encoding_to_char in -lpq" >&5
12500  ac_lib_var=`echo pq'_'pg_encoding_to_char | sed 'y%./+-%__p_%'`
12501  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12502    echo $ac_n "(cached) $ac_c" 1>&6
12503 @@ -80483,7 +80787,7 @@
12504    ac_save_LIBS="$LIBS"
12505  LIBS="-lpq  $LIBS"
12506  cat > conftest.$ac_ext <<EOF
12507 -#line 80487 "configure"
12508 +#line 80791 "configure"
12509  #include "confdefs.h"
12510  /* Override any gcc2 internal prototype to avoid an error.  */
12511  /* We use char because int might match the return type of a gcc2
12512 @@ -80494,7 +80798,7 @@
12513  pg_encoding_to_char()
12514  ; return 0; }
12515  EOF
12516 -if { (eval echo configure:80498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12517 +if { (eval echo configure:80802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12518    rm -rf conftest*
12519    eval "ac_cv_lib_$ac_lib_var=yes"
12520  else
12521 @@ -80943,7 +81247,7 @@
12522  php_enable_posix=yes
12523  
12524  echo $ac_n "checking whether to enable POSIX-like functions""... $ac_c" 1>&6
12525 -echo "configure:80947: checking whether to enable POSIX-like functions" >&5
12526 +echo "configure:81251: checking whether to enable POSIX-like functions" >&5
12527  # Check whether --enable-posix or --disable-posix was given.
12528  if test "${enable_posix+set}" = set; then
12529    enableval="$enable_posix"
12530 @@ -81277,17 +81581,17 @@
12531  do
12532  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12533  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12534 -echo "configure:81281: checking for $ac_hdr" >&5
12535 +echo "configure:81585: checking for $ac_hdr" >&5
12536  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12537    echo $ac_n "(cached) $ac_c" 1>&6
12538  else
12539    cat > conftest.$ac_ext <<EOF
12540 -#line 81286 "configure"
12541 +#line 81590 "configure"
12542  #include "confdefs.h"
12543  #include <$ac_hdr>
12544  EOF
12545  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12546 -{ (eval echo configure:81291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12547 +{ (eval echo configure:81595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12548  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12549  if test -z "$ac_err"; then
12550    rm -rf conftest*
12551 @@ -81317,12 +81621,12 @@
12552    for ac_func in seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r
12553  do
12554  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12555 -echo "configure:81321: checking for $ac_func" >&5
12556 +echo "configure:81625: checking for $ac_func" >&5
12557  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12558    echo $ac_n "(cached) $ac_c" 1>&6
12559  else
12560    cat > conftest.$ac_ext <<EOF
12561 -#line 81326 "configure"
12562 +#line 81630 "configure"
12563  #include "confdefs.h"
12564  /* System header to define __stub macros and hopefully few prototypes,
12565      which can conflict with char $ac_func(); below.  */
12566 @@ -81345,7 +81649,7 @@
12567  
12568  ; return 0; }
12569  EOF
12570 -if { (eval echo configure:81349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12571 +if { (eval echo configure:81653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12572    rm -rf conftest*
12573    eval "ac_cv_func_$ac_func=yes"
12574  else
12575 @@ -81371,14 +81675,14 @@
12576  
12577  
12578    echo $ac_n "checking for working ttyname_r() implementation""... $ac_c" 1>&6
12579 -echo "configure:81375: checking for working ttyname_r() implementation" >&5
12580 +echo "configure:81679: checking for working ttyname_r() implementation" >&5
12581    if test "$cross_compiling" = yes; then
12582    
12583      echo "$ac_t""no, cannot detect working ttyname_r() when cross compiling. posix_ttyname() will be thread-unsafe" 1>&6
12584    
12585  else
12586    cat > conftest.$ac_ext <<EOF
12587 -#line 81382 "configure"
12588 +#line 81686 "configure"
12589  #include "confdefs.h"
12590  
12591  #include <unistd.h>
12592 @@ -81391,7 +81695,7 @@
12593  }
12594    
12595  EOF
12596 -if { (eval echo configure:81395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12597 +if { (eval echo configure:81699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12598  then
12599    
12600      echo "$ac_t""yes" 1>&6
12601 @@ -81418,7 +81722,7 @@
12602  php_with_pspell=no
12603  
12604  echo $ac_n "checking for PSPELL support""... $ac_c" 1>&6
12605 -echo "configure:81422: checking for PSPELL support" >&5
12606 +echo "configure:81726: checking for PSPELL support" >&5
12607  # Check whether --with-pspell or --without-pspell was given.
12608  if test "${with_pspell+set}" = set; then
12609    withval="$with_pspell"
12610 @@ -81960,7 +82264,7 @@
12611    done
12612  
12613    echo $ac_n "checking for new_aspell_config in -laspell""... $ac_c" 1>&6
12614 -echo "configure:81964: checking for new_aspell_config in -laspell" >&5
12615 +echo "configure:82268: checking for new_aspell_config in -laspell" >&5
12616  ac_lib_var=`echo aspell'_'new_aspell_config | sed 'y%./+-%__p_%'`
12617  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12618    echo $ac_n "(cached) $ac_c" 1>&6
12619 @@ -81968,7 +82272,7 @@
12620    ac_save_LIBS="$LIBS"
12621  LIBS="-laspell  $LIBS"
12622  cat > conftest.$ac_ext <<EOF
12623 -#line 81972 "configure"
12624 +#line 82276 "configure"
12625  #include "confdefs.h"
12626  /* Override any gcc2 internal prototype to avoid an error.  */
12627  /* We use char because int might match the return type of a gcc2
12628 @@ -81979,7 +82283,7 @@
12629  new_aspell_config()
12630  ; return 0; }
12631  EOF
12632 -if { (eval echo configure:81983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12633 +if { (eval echo configure:82287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12634    rm -rf conftest*
12635    eval "ac_cv_lib_$ac_lib_var=yes"
12636  else
12637 @@ -82153,7 +82457,7 @@
12638  php_with_libedit=no
12639  
12640  echo $ac_n "checking for libedit readline replacement""... $ac_c" 1>&6
12641 -echo "configure:82157: checking for libedit readline replacement" >&5
12642 +echo "configure:82461: checking for libedit readline replacement" >&5
12643  # Check whether --with-libedit or --without-libedit was given.
12644  if test "${with_libedit+set}" = set; then
12645    withval="$with_libedit"
12646 @@ -82201,7 +82505,7 @@
12647  php_with_readline=no
12648  
12649  echo $ac_n "checking for readline support""... $ac_c" 1>&6
12650 -echo "configure:82205: checking for readline support" >&5
12651 +echo "configure:82509: checking for readline support" >&5
12652  # Check whether --with-readline or --without-readline was given.
12653  if test "${with_readline+set}" = set; then
12654    withval="$with_readline"
12655 @@ -82288,7 +82592,7 @@
12656  
12657    PHP_READLINE_LIBS=""
12658    echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12659 -echo "configure:82292: checking for tgetent in -lncurses" >&5
12660 +echo "configure:82596: checking for tgetent in -lncurses" >&5
12661  ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12662  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12663    echo $ac_n "(cached) $ac_c" 1>&6
12664 @@ -82296,7 +82600,7 @@
12665    ac_save_LIBS="$LIBS"
12666  LIBS="-lncurses  $LIBS"
12667  cat > conftest.$ac_ext <<EOF
12668 -#line 82300 "configure"
12669 +#line 82604 "configure"
12670  #include "confdefs.h"
12671  /* Override any gcc2 internal prototype to avoid an error.  */
12672  /* We use char because int might match the return type of a gcc2
12673 @@ -82307,7 +82611,7 @@
12674  tgetent()
12675  ; return 0; }
12676  EOF
12677 -if { (eval echo configure:82311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12678 +if { (eval echo configure:82615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12679    rm -rf conftest*
12680    eval "ac_cv_lib_$ac_lib_var=yes"
12681  else
12682 @@ -82352,7 +82656,7 @@
12683    echo "$ac_t""no" 1>&6
12684  
12685      echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12686 -echo "configure:82356: checking for tgetent in -ltermcap" >&5
12687 +echo "configure:82660: checking for tgetent in -ltermcap" >&5
12688  ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12689  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12690    echo $ac_n "(cached) $ac_c" 1>&6
12691 @@ -82360,7 +82664,7 @@
12692    ac_save_LIBS="$LIBS"
12693  LIBS="-ltermcap  $LIBS"
12694  cat > conftest.$ac_ext <<EOF
12695 -#line 82364 "configure"
12696 +#line 82668 "configure"
12697  #include "confdefs.h"
12698  /* Override any gcc2 internal prototype to avoid an error.  */
12699  /* We use char because int might match the return type of a gcc2
12700 @@ -82371,7 +82675,7 @@
12701  tgetent()
12702  ; return 0; }
12703  EOF
12704 -if { (eval echo configure:82375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12705 +if { (eval echo configure:82679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12706    rm -rf conftest*
12707    eval "ac_cv_lib_$ac_lib_var=yes"
12708  else
12709 @@ -82518,7 +82822,7 @@
12710    done
12711  
12712    echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12713 -echo "configure:82522: checking for readline in -lreadline" >&5
12714 +echo "configure:82826: checking for readline in -lreadline" >&5
12715  ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
12716  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12717    echo $ac_n "(cached) $ac_c" 1>&6
12718 @@ -82526,7 +82830,7 @@
12719    ac_save_LIBS="$LIBS"
12720  LIBS="-lreadline  $LIBS"
12721  cat > conftest.$ac_ext <<EOF
12722 -#line 82530 "configure"
12723 +#line 82834 "configure"
12724  #include "confdefs.h"
12725  /* Override any gcc2 internal prototype to avoid an error.  */
12726  /* We use char because int might match the return type of a gcc2
12727 @@ -82537,7 +82841,7 @@
12728  readline()
12729  ; return 0; }
12730  EOF
12731 -if { (eval echo configure:82541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12732 +if { (eval echo configure:82845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12733    rm -rf conftest*
12734    eval "ac_cv_lib_$ac_lib_var=yes"
12735  else
12736 @@ -82766,7 +83070,7 @@
12737    done
12738  
12739    echo $ac_n "checking for rl_callback_read_char in -lreadline""... $ac_c" 1>&6
12740 -echo "configure:82770: checking for rl_callback_read_char in -lreadline" >&5
12741 +echo "configure:83074: checking for rl_callback_read_char in -lreadline" >&5
12742  ac_lib_var=`echo readline'_'rl_callback_read_char | sed 'y%./+-%__p_%'`
12743  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12744    echo $ac_n "(cached) $ac_c" 1>&6
12745 @@ -82774,7 +83078,7 @@
12746    ac_save_LIBS="$LIBS"
12747  LIBS="-lreadline  $LIBS"
12748  cat > conftest.$ac_ext <<EOF
12749 -#line 82778 "configure"
12750 +#line 83082 "configure"
12751  #include "confdefs.h"
12752  /* Override any gcc2 internal prototype to avoid an error.  */
12753  /* We use char because int might match the return type of a gcc2
12754 @@ -82785,7 +83089,7 @@
12755  rl_callback_read_char()
12756  ; return 0; }
12757  EOF
12758 -if { (eval echo configure:82789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12759 +if { (eval echo configure:83093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12760    rm -rf conftest*
12761    eval "ac_cv_lib_$ac_lib_var=yes"
12762  else
12763 @@ -82919,7 +83223,7 @@
12764    done
12765  
12766    echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
12767 -echo "configure:82923: checking for add_history in -lhistory" >&5
12768 +echo "configure:83227: checking for add_history in -lhistory" >&5
12769  ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
12770  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12771    echo $ac_n "(cached) $ac_c" 1>&6
12772 @@ -82927,7 +83231,7 @@
12773    ac_save_LIBS="$LIBS"
12774  LIBS="-lhistory  $LIBS"
12775  cat > conftest.$ac_ext <<EOF
12776 -#line 82931 "configure"
12777 +#line 83235 "configure"
12778  #include "confdefs.h"
12779  /* Override any gcc2 internal prototype to avoid an error.  */
12780  /* We use char because int might match the return type of a gcc2
12781 @@ -82938,7 +83242,7 @@
12782  add_history()
12783  ; return 0; }
12784  EOF
12785 -if { (eval echo configure:82942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12786 +if { (eval echo configure:83246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12787    rm -rf conftest*
12788    eval "ac_cv_lib_$ac_lib_var=yes"
12789  else
12790 @@ -83117,7 +83421,7 @@
12791  
12792  
12793    echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12794 -echo "configure:83121: checking for tgetent in -lncurses" >&5
12795 +echo "configure:83425: checking for tgetent in -lncurses" >&5
12796  ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12797  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12798    echo $ac_n "(cached) $ac_c" 1>&6
12799 @@ -83125,7 +83429,7 @@
12800    ac_save_LIBS="$LIBS"
12801  LIBS="-lncurses  $LIBS"
12802  cat > conftest.$ac_ext <<EOF
12803 -#line 83129 "configure"
12804 +#line 83433 "configure"
12805  #include "confdefs.h"
12806  /* Override any gcc2 internal prototype to avoid an error.  */
12807  /* We use char because int might match the return type of a gcc2
12808 @@ -83136,7 +83440,7 @@
12809  tgetent()
12810  ; return 0; }
12811  EOF
12812 -if { (eval echo configure:83140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12813 +if { (eval echo configure:83444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12814    rm -rf conftest*
12815    eval "ac_cv_lib_$ac_lib_var=yes"
12816  else
12817 @@ -83180,7 +83484,7 @@
12818    echo "$ac_t""no" 1>&6
12819  
12820      echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12821 -echo "configure:83184: checking for tgetent in -ltermcap" >&5
12822 +echo "configure:83488: checking for tgetent in -ltermcap" >&5
12823  ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12824  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12825    echo $ac_n "(cached) $ac_c" 1>&6
12826 @@ -83188,7 +83492,7 @@
12827    ac_save_LIBS="$LIBS"
12828  LIBS="-ltermcap  $LIBS"
12829  cat > conftest.$ac_ext <<EOF
12830 -#line 83192 "configure"
12831 +#line 83496 "configure"
12832  #include "confdefs.h"
12833  /* Override any gcc2 internal prototype to avoid an error.  */
12834  /* We use char because int might match the return type of a gcc2
12835 @@ -83199,7 +83503,7 @@
12836  tgetent()
12837  ; return 0; }
12838  EOF
12839 -if { (eval echo configure:83203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12840 +if { (eval echo configure:83507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12841    rm -rf conftest*
12842    eval "ac_cv_lib_$ac_lib_var=yes"
12843  else
12844 @@ -83345,7 +83649,7 @@
12845    done
12846  
12847    echo $ac_n "checking for readline in -ledit""... $ac_c" 1>&6
12848 -echo "configure:83349: checking for readline in -ledit" >&5
12849 +echo "configure:83653: checking for readline in -ledit" >&5
12850  ac_lib_var=`echo edit'_'readline | sed 'y%./+-%__p_%'`
12851  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12852    echo $ac_n "(cached) $ac_c" 1>&6
12853 @@ -83353,7 +83657,7 @@
12854    ac_save_LIBS="$LIBS"
12855  LIBS="-ledit  $LIBS"
12856  cat > conftest.$ac_ext <<EOF
12857 -#line 83357 "configure"
12858 +#line 83661 "configure"
12859  #include "confdefs.h"
12860  /* Override any gcc2 internal prototype to avoid an error.  */
12861  /* We use char because int might match the return type of a gcc2
12862 @@ -83364,7 +83668,7 @@
12863  readline()
12864  ; return 0; }
12865  EOF
12866 -if { (eval echo configure:83368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12867 +if { (eval echo configure:83672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12868    rm -rf conftest*
12869    eval "ac_cv_lib_$ac_lib_var=yes"
12870  else
12871 @@ -83505,12 +83809,12 @@
12872    for ac_func in rl_completion_matches
12873  do
12874  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12875 -echo "configure:83509: checking for $ac_func" >&5
12876 +echo "configure:83813: checking for $ac_func" >&5
12877  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12878    echo $ac_n "(cached) $ac_c" 1>&6
12879  else
12880    cat > conftest.$ac_ext <<EOF
12881 -#line 83514 "configure"
12882 +#line 83818 "configure"
12883  #include "confdefs.h"
12884  /* System header to define __stub macros and hopefully few prototypes,
12885      which can conflict with char $ac_func(); below.  */
12886 @@ -83533,7 +83837,7 @@
12887  
12888  ; return 0; }
12889  EOF
12890 -if { (eval echo configure:83537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12891 +if { (eval echo configure:83841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12892    rm -rf conftest*
12893    eval "ac_cv_func_$ac_func=yes"
12894  else
12895 @@ -83848,7 +84152,7 @@
12896  php_with_recode=no
12897  
12898  echo $ac_n "checking for recode support""... $ac_c" 1>&6
12899 -echo "configure:83852: checking for recode support" >&5
12900 +echo "configure:84156: checking for recode support" >&5
12901  # Check whether --with-recode or --without-recode was given.
12902  if test "${with_recode+set}" = set; then
12903    withval="$with_recode"
12904 @@ -84015,7 +84319,7 @@
12905    done
12906  
12907    echo $ac_n "checking for recode_format_table in -lrecode""... $ac_c" 1>&6
12908 -echo "configure:84019: checking for recode_format_table in -lrecode" >&5
12909 +echo "configure:84323: checking for recode_format_table in -lrecode" >&5
12910  ac_lib_var=`echo recode'_'recode_format_table | sed 'y%./+-%__p_%'`
12911  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12912    echo $ac_n "(cached) $ac_c" 1>&6
12913 @@ -84023,7 +84327,7 @@
12914    ac_save_LIBS="$LIBS"
12915  LIBS="-lrecode  $LIBS"
12916  cat > conftest.$ac_ext <<EOF
12917 -#line 84027 "configure"
12918 +#line 84331 "configure"
12919  #include "confdefs.h"
12920  /* Override any gcc2 internal prototype to avoid an error.  */
12921  /* We use char because int might match the return type of a gcc2
12922 @@ -84034,7 +84338,7 @@
12923  recode_format_table()
12924  ; return 0; }
12925  EOF
12926 -if { (eval echo configure:84038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12927 +if { (eval echo configure:84342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12928    rm -rf conftest*
12929    eval "ac_cv_lib_$ac_lib_var=yes"
12930  else
12931 @@ -84164,7 +84468,7 @@
12932      LDFLAGS="$LDFLAGS -L$RECODE_DIR/$RECODE_LIB"
12933      LIBS="$LIBS -lrecode"
12934      cat > conftest.$ac_ext <<EOF
12935 -#line 84168 "configure"
12936 +#line 84472 "configure"
12937  #include "confdefs.h"
12938  
12939  char *program_name;
12940 @@ -84175,7 +84479,7 @@
12941      
12942  ; return 0; }
12943  EOF
12944 -if { (eval echo configure:84179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12945 +if { (eval echo configure:84483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12946    rm -rf conftest*
12947    
12948        
12949 @@ -84338,17 +84642,17 @@
12950  do
12951  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12952  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12953 -echo "configure:84342: checking for $ac_hdr" >&5
12954 +echo "configure:84646: checking for $ac_hdr" >&5
12955  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12956    echo $ac_n "(cached) $ac_c" 1>&6
12957  else
12958    cat > conftest.$ac_ext <<EOF
12959 -#line 84347 "configure"
12960 +#line 84651 "configure"
12961  #include "confdefs.h"
12962  #include <$ac_hdr>
12963  EOF
12964  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12965 -{ (eval echo configure:84352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12966 +{ (eval echo configure:84656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12967  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12968  if test -z "$ac_err"; then
12969    rm -rf conftest*
12970 @@ -84662,7 +84966,7 @@
12971  php_enable_reflection=yes
12972  
12973  echo $ac_n "checking whether to enable reflection support""... $ac_c" 1>&6
12974 -echo "configure:84666: checking whether to enable reflection support" >&5
12975 +echo "configure:84970: checking whether to enable reflection support" >&5
12976  # Check whether --enable-reflection or --disable-reflection was given.
12977  if test "${enable_reflection+set}" = set; then
12978    enableval="$enable_reflection"
12979 @@ -84977,7 +85281,7 @@
12980  php_enable_session=yes
12981  
12982  echo $ac_n "checking whether to enable PHP sessions""... $ac_c" 1>&6
12983 -echo "configure:84981: checking whether to enable PHP sessions" >&5
12984 +echo "configure:85285: checking whether to enable PHP sessions" >&5
12985  # Check whether --enable-session or --disable-session was given.
12986  if test "${enable_session+set}" = set; then
12987    enableval="$enable_session"
12988 @@ -85024,7 +85328,7 @@
12989  php_with_mm=no
12990  
12991  echo $ac_n "checking for mm support""... $ac_c" 1>&6
12992 -echo "configure:85028: checking for mm support" >&5
12993 +echo "configure:85332: checking for mm support" >&5
12994  # Check whether --with-mm or --without-mm was given.
12995  if test "${with_mm+set}" = set; then
12996    withval="$with_mm"
12997 @@ -85049,7 +85353,7 @@
12998  if test "$PHP_SESSION" != "no"; then
12999    
13000    echo $ac_n "checking whether pwrite works""... $ac_c" 1>&6
13001 -echo "configure:85053: checking whether pwrite works" >&5
13002 +echo "configure:85357: checking whether pwrite works" >&5
13003  if eval "test \"`echo '$''{'ac_cv_pwrite'+set}'`\" = set"; then
13004    echo $ac_n "(cached) $ac_c" 1>&6
13005  else
13006 @@ -85061,7 +85365,7 @@
13007    
13008  else
13009    cat > conftest.$ac_ext <<EOF
13010 -#line 85065 "configure"
13011 +#line 85369 "configure"
13012  #include "confdefs.h"
13013  
13014  #include <sys/types.h>
13015 @@ -85082,7 +85386,7 @@
13016  
13017    
13018  EOF
13019 -if { (eval echo configure:85086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13020 +if { (eval echo configure:85390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13021  then
13022    
13023      ac_cv_pwrite=yes
13024 @@ -85107,7 +85411,7 @@
13025    
13026  else
13027    cat > conftest.$ac_ext <<EOF
13028 -#line 85111 "configure"
13029 +#line 85415 "configure"
13030  #include "confdefs.h"
13031  
13032  #include <sys/types.h>
13033 @@ -85128,7 +85432,7 @@
13034  
13035    
13036  EOF
13037 -if { (eval echo configure:85132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13038 +if { (eval echo configure:85436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13039  then
13040    
13041      ac_cv_pwrite=yes
13042 @@ -85169,7 +85473,7 @@
13043  
13044    
13045    echo $ac_n "checking whether pread works""... $ac_c" 1>&6
13046 -echo "configure:85173: checking whether pread works" >&5
13047 +echo "configure:85477: checking whether pread works" >&5
13048  if eval "test \"`echo '$''{'ac_cv_pread'+set}'`\" = set"; then
13049    echo $ac_n "(cached) $ac_c" 1>&6
13050  else
13051 @@ -85182,7 +85486,7 @@
13052    
13053  else
13054    cat > conftest.$ac_ext <<EOF
13055 -#line 85186 "configure"
13056 +#line 85490 "configure"
13057  #include "confdefs.h"
13058  
13059  #include <sys/types.h>
13060 @@ -85202,7 +85506,7 @@
13061      }
13062    
13063  EOF
13064 -if { (eval echo configure:85206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13065 +if { (eval echo configure:85510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13066  then
13067    
13068      ac_cv_pread=yes
13069 @@ -85229,7 +85533,7 @@
13070    
13071  else
13072    cat > conftest.$ac_ext <<EOF
13073 -#line 85233 "configure"
13074 +#line 85537 "configure"
13075  #include "confdefs.h"
13076  
13077  #include <sys/types.h>
13078 @@ -85249,7 +85553,7 @@
13079      }
13080    
13081  EOF
13082 -if { (eval echo configure:85253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13083 +if { (eval echo configure:85557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13084  then
13085    
13086      ac_cv_pread=yes
13087 @@ -85764,7 +86068,7 @@
13088  php_enable_shmop=no
13089  
13090  echo $ac_n "checking whether to enable shmop support""... $ac_c" 1>&6
13091 -echo "configure:85768: checking whether to enable shmop support" >&5
13092 +echo "configure:86072: checking whether to enable shmop support" >&5
13093  # Check whether --enable-shmop or --disable-shmop was given.
13094  if test "${enable_shmop+set}" = set; then
13095    enableval="$enable_shmop"
13096 @@ -86100,7 +86404,7 @@
13097  php_enable_simplexml=yes
13098  
13099  echo $ac_n "checking whether to enable SimpleXML support""... $ac_c" 1>&6
13100 -echo "configure:86104: checking whether to enable SimpleXML support" >&5
13101 +echo "configure:86408: checking whether to enable SimpleXML support" >&5
13102  # Check whether --enable-simplexml or --disable-simplexml was given.
13103  if test "${enable_simplexml+set}" = set; then
13104    enableval="$enable_simplexml"
13105 @@ -86148,7 +86452,7 @@
13106  php_with_libxml_dir=no
13107  
13108  echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
13109 -echo "configure:86152: checking libxml2 install dir" >&5
13110 +echo "configure:86456: checking libxml2 install dir" >&5
13111  # Check whether --with-libxml-dir or --without-libxml-dir was given.
13112  if test "${with_libxml_dir+set}" = set; then
13113    withval="$with_libxml_dir"
13114 @@ -86179,7 +86483,7 @@
13115  
13116    
13117  echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
13118 -echo "configure:86183: checking for xml2-config path" >&5
13119 +echo "configure:86487: checking for xml2-config path" >&5
13120  if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
13121    echo $ac_n "(cached) $ac_c" 1>&6
13122  else
13123 @@ -86337,7 +86641,7 @@
13124  
13125  
13126              echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
13127 -echo "configure:86341: checking whether libxml build works" >&5
13128 +echo "configure:86645: checking whether libxml build works" >&5
13129  if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
13130    echo $ac_n "(cached) $ac_c" 1>&6
13131  else
13132 @@ -86353,7 +86657,7 @@
13133    
13134  else
13135    cat > conftest.$ac_ext <<EOF
13136 -#line 86357 "configure"
13137 +#line 86661 "configure"
13138  #include "confdefs.h"
13139  
13140      
13141 @@ -86364,7 +86668,7 @@
13142      }
13143    
13144  EOF
13145 -if { (eval echo configure:86368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13146 +if { (eval echo configure:86672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13147  then
13148    
13149      LIBS=$old_LIBS
13150 @@ -86741,7 +87045,7 @@
13151  php_with_snmp=no
13152  
13153  echo $ac_n "checking for SNMP support""... $ac_c" 1>&6
13154 -echo "configure:86745: checking for SNMP support" >&5
13155 +echo "configure:87049: checking for SNMP support" >&5
13156  # Check whether --with-snmp or --without-snmp was given.
13157  if test "${with_snmp+set}" = set; then
13158    withval="$with_snmp"
13159 @@ -86788,7 +87092,7 @@
13160  php_with_openssl_dir=no
13161  
13162  echo $ac_n "checking OpenSSL dir for SNMP""... $ac_c" 1>&6
13163 -echo "configure:86792: checking OpenSSL dir for SNMP" >&5
13164 +echo "configure:87096: checking OpenSSL dir for SNMP" >&5
13165  # Check whether --with-openssl-dir or --without-openssl-dir was given.
13166  if test "${with_openssl_dir+set}" = set; then
13167    withval="$with_openssl_dir"
13168 @@ -86814,7 +87118,7 @@
13169  php_enable_ucd_snmp_hack=no
13170  
13171  echo $ac_n "checking whether to enable UCD SNMP hack""... $ac_c" 1>&6
13172 -echo "configure:86818: checking whether to enable UCD SNMP hack" >&5
13173 +echo "configure:87122: checking whether to enable UCD SNMP hack" >&5
13174  # Check whether --enable-ucd-snmp-hack or --disable-ucd-snmp-hack was given.
13175  if test "${enable_ucd_snmp_hack+set}" = set; then
13176    enableval="$enable_ucd_snmp_hack"
13177 @@ -86842,7 +87146,7 @@
13178      # Extract the first word of "net-snmp-config", so it can be a program name with args.
13179  set dummy net-snmp-config; ac_word=$2
13180  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13181 -echo "configure:86846: checking for $ac_word" >&5
13182 +echo "configure:87150: checking for $ac_word" >&5
13183  if eval "test \"`echo '$''{'ac_cv_path_SNMP_CONFIG'+set}'`\" = set"; then
13184    echo $ac_n "(cached) $ac_c" 1>&6
13185  else
13186 @@ -87043,17 +87347,17 @@
13187  do
13188  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13189  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13190 -echo "configure:87047: checking for $ac_hdr" >&5
13191 +echo "configure:87351: checking for $ac_hdr" >&5
13192  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
13193    echo $ac_n "(cached) $ac_c" 1>&6
13194  else
13195    cat > conftest.$ac_ext <<EOF
13196 -#line 87052 "configure"
13197 +#line 87356 "configure"
13198  #include "confdefs.h"
13199  #include <$ac_hdr>
13200  EOF
13201  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13202 -{ (eval echo configure:87057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13203 +{ (eval echo configure:87361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13204  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13205  if test -z "$ac_err"; then
13206    rm -rf conftest*
13207 @@ -87081,9 +87385,9 @@
13208  
13209      if test "$ac_cv_header_default_store_h" = "yes"; then
13210        echo $ac_n "checking for OpenSSL support in SNMP libraries""... $ac_c" 1>&6
13211 -echo "configure:87085: checking for OpenSSL support in SNMP libraries" >&5
13212 +echo "configure:87389: checking for OpenSSL support in SNMP libraries" >&5
13213        cat > conftest.$ac_ext <<EOF
13214 -#line 87087 "configure"
13215 +#line 87391 "configure"
13216  #include "confdefs.h"
13217  
13218  #include <ucd-snmp-config.h>
13219 @@ -87138,7 +87442,7 @@
13220      # Extract the first word of "pkg-config", so it can be a program name with args.
13221  set dummy pkg-config; ac_word=$2
13222  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13223 -echo "configure:87142: checking for $ac_word" >&5
13224 +echo "configure:87446: checking for $ac_word" >&5
13225  if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
13226    echo $ac_n "(cached) $ac_c" 1>&6
13227  else
13228 @@ -87343,9 +87647,9 @@
13229      old_CPPFLAGS=$CPPFLAGS
13230      CPPFLAGS=-I$OPENSSL_INCDIR
13231      echo $ac_n "checking for OpenSSL version""... $ac_c" 1>&6
13232 -echo "configure:87347: checking for OpenSSL version" >&5
13233 +echo "configure:87651: checking for OpenSSL version" >&5
13234      cat > conftest.$ac_ext <<EOF
13235 -#line 87349 "configure"
13236 +#line 87653 "configure"
13237  #include "confdefs.h"
13238  
13239  #include <openssl/opensslv.h>
13240 @@ -87500,7 +87804,7 @@
13241    done
13242  
13243    echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6
13244 -echo "configure:87504: checking for CRYPTO_free in -lcrypto" >&5
13245 +echo "configure:87808: checking for CRYPTO_free in -lcrypto" >&5
13246  ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'`
13247  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13248    echo $ac_n "(cached) $ac_c" 1>&6
13249 @@ -87508,7 +87812,7 @@
13250    ac_save_LIBS="$LIBS"
13251  LIBS="-lcrypto  $LIBS"
13252  cat > conftest.$ac_ext <<EOF
13253 -#line 87512 "configure"
13254 +#line 87816 "configure"
13255  #include "confdefs.h"
13256  /* Override any gcc2 internal prototype to avoid an error.  */
13257  /* We use char because int might match the return type of a gcc2
13258 @@ -87519,7 +87823,7 @@
13259  CRYPTO_free()
13260  ; return 0; }
13261  EOF
13262 -if { (eval echo configure:87523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13263 +if { (eval echo configure:87827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13264    rm -rf conftest*
13265    eval "ac_cv_lib_$ac_lib_var=yes"
13266  else
13267 @@ -87676,7 +87980,7 @@
13268    done
13269  
13270    echo $ac_n "checking for SSL_CTX_set_ssl_version in -lssl""... $ac_c" 1>&6
13271 -echo "configure:87680: checking for SSL_CTX_set_ssl_version in -lssl" >&5
13272 +echo "configure:87984: checking for SSL_CTX_set_ssl_version in -lssl" >&5
13273  ac_lib_var=`echo ssl'_'SSL_CTX_set_ssl_version | sed 'y%./+-%__p_%'`
13274  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13275    echo $ac_n "(cached) $ac_c" 1>&6
13276 @@ -87684,7 +87988,7 @@
13277    ac_save_LIBS="$LIBS"
13278  LIBS="-lssl  $LIBS"
13279  cat > conftest.$ac_ext <<EOF
13280 -#line 87688 "configure"
13281 +#line 87992 "configure"
13282  #include "confdefs.h"
13283  /* Override any gcc2 internal prototype to avoid an error.  */
13284  /* We use char because int might match the return type of a gcc2
13285 @@ -87695,7 +87999,7 @@
13286  SSL_CTX_set_ssl_version()
13287  ; return 0; }
13288  EOF
13289 -if { (eval echo configure:87699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13290 +if { (eval echo configure:88003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13291    rm -rf conftest*
13292    eval "ac_cv_lib_$ac_lib_var=yes"
13293  else
13294 @@ -87808,7 +88112,7 @@
13295      fi
13296  
13297      echo $ac_n "checking for kstat_read in -lkstat""... $ac_c" 1>&6
13298 -echo "configure:87812: checking for kstat_read in -lkstat" >&5
13299 +echo "configure:88116: checking for kstat_read in -lkstat" >&5
13300  ac_lib_var=`echo kstat'_'kstat_read | sed 'y%./+-%__p_%'`
13301  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13302    echo $ac_n "(cached) $ac_c" 1>&6
13303 @@ -87816,7 +88120,7 @@
13304    ac_save_LIBS="$LIBS"
13305  LIBS="-lkstat  $LIBS"
13306  cat > conftest.$ac_ext <<EOF
13307 -#line 87820 "configure"
13308 +#line 88124 "configure"
13309  #include "confdefs.h"
13310  /* Override any gcc2 internal prototype to avoid an error.  */
13311  /* We use char because int might match the return type of a gcc2
13312 @@ -87827,7 +88131,7 @@
13313  kstat_read()
13314  ; return 0; }
13315  EOF
13316 -if { (eval echo configure:87831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13317 +if { (eval echo configure:88135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13318    rm -rf conftest*
13319    eval "ac_cv_lib_$ac_lib_var=yes"
13320  else
13321 @@ -88098,7 +88402,7 @@
13322    done
13323  
13324    echo $ac_n "checking for snmp_parse_oid in -l$SNMP_LIBNAME""... $ac_c" 1>&6
13325 -echo "configure:88102: checking for snmp_parse_oid in -l$SNMP_LIBNAME" >&5
13326 +echo "configure:88406: checking for snmp_parse_oid in -l$SNMP_LIBNAME" >&5
13327  ac_lib_var=`echo $SNMP_LIBNAME'_'snmp_parse_oid | sed 'y%./+-%__p_%'`
13328  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13329    echo $ac_n "(cached) $ac_c" 1>&6
13330 @@ -88106,7 +88410,7 @@
13331    ac_save_LIBS="$LIBS"
13332  LIBS="-l$SNMP_LIBNAME  $LIBS"
13333  cat > conftest.$ac_ext <<EOF
13334 -#line 88110 "configure"
13335 +#line 88414 "configure"
13336  #include "confdefs.h"
13337  /* Override any gcc2 internal prototype to avoid an error.  */
13338  /* We use char because int might match the return type of a gcc2
13339 @@ -88117,7 +88421,7 @@
13340  snmp_parse_oid()
13341  ; return 0; }
13342  EOF
13343 -if { (eval echo configure:88121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13344 +if { (eval echo configure:88425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13345    rm -rf conftest*
13346    eval "ac_cv_lib_$ac_lib_var=yes"
13347  else
13348 @@ -88251,7 +88555,7 @@
13349    done
13350  
13351    echo $ac_n "checking for init_snmp in -l$SNMP_LIBNAME""... $ac_c" 1>&6
13352 -echo "configure:88255: checking for init_snmp in -l$SNMP_LIBNAME" >&5
13353 +echo "configure:88559: checking for init_snmp in -l$SNMP_LIBNAME" >&5
13354  ac_lib_var=`echo $SNMP_LIBNAME'_'init_snmp | sed 'y%./+-%__p_%'`
13355  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13356    echo $ac_n "(cached) $ac_c" 1>&6
13357 @@ -88259,7 +88563,7 @@
13358    ac_save_LIBS="$LIBS"
13359  LIBS="-l$SNMP_LIBNAME  $LIBS"
13360  cat > conftest.$ac_ext <<EOF
13361 -#line 88263 "configure"
13362 +#line 88567 "configure"
13363  #include "confdefs.h"
13364  /* Override any gcc2 internal prototype to avoid an error.  */
13365  /* We use char because int might match the return type of a gcc2
13366 @@ -88270,7 +88574,7 @@
13367  init_snmp()
13368  ; return 0; }
13369  EOF
13370 -if { (eval echo configure:88274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13371 +if { (eval echo configure:88578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13372    rm -rf conftest*
13373    eval "ac_cv_lib_$ac_lib_var=yes"
13374  else
13375 @@ -88606,7 +88910,7 @@
13376  php_enable_soap=no
13377  
13378  echo $ac_n "checking whether to enable SOAP support""... $ac_c" 1>&6
13379 -echo "configure:88610: checking whether to enable SOAP support" >&5
13380 +echo "configure:88914: checking whether to enable SOAP support" >&5
13381  # Check whether --enable-soap or --disable-soap was given.
13382  if test "${enable_soap+set}" = set; then
13383    enableval="$enable_soap"
13384 @@ -88654,7 +88958,7 @@
13385  php_with_libxml_dir=no
13386  
13387  echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
13388 -echo "configure:88658: checking libxml2 install dir" >&5
13389 +echo "configure:88962: checking libxml2 install dir" >&5
13390  # Check whether --with-libxml-dir or --without-libxml-dir was given.
13391  if test "${with_libxml_dir+set}" = set; then
13392    withval="$with_libxml_dir"
13393 @@ -88685,7 +88989,7 @@
13394  
13395    
13396  echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
13397 -echo "configure:88689: checking for xml2-config path" >&5
13398 +echo "configure:88993: checking for xml2-config path" >&5
13399  if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
13400    echo $ac_n "(cached) $ac_c" 1>&6
13401  else
13402 @@ -88843,7 +89147,7 @@
13403  
13404  
13405              echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
13406 -echo "configure:88847: checking whether libxml build works" >&5
13407 +echo "configure:89151: checking whether libxml build works" >&5
13408  if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
13409    echo $ac_n "(cached) $ac_c" 1>&6
13410  else
13411 @@ -88859,7 +89163,7 @@
13412    
13413  else
13414    cat > conftest.$ac_ext <<EOF
13415 -#line 88863 "configure"
13416 +#line 89167 "configure"
13417  #include "confdefs.h"
13418  
13419      
13420 @@ -88870,7 +89174,7 @@
13421      }
13422    
13423  EOF
13424 -if { (eval echo configure:88874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13425 +if { (eval echo configure:89178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13426  then
13427    
13428      LIBS=$old_LIBS
13429 @@ -89209,7 +89513,7 @@
13430  php_enable_sockets=no
13431  
13432  echo $ac_n "checking whether to enable sockets support""... $ac_c" 1>&6
13433 -echo "configure:89213: checking whether to enable sockets support" >&5
13434 +echo "configure:89517: checking whether to enable sockets support" >&5
13435  # Check whether --enable-sockets or --disable-sockets was given.
13436  if test "${enable_sockets+set}" = set; then
13437    enableval="$enable_sockets"
13438 @@ -89254,13 +89558,13 @@
13439  
13440  if test "$PHP_SOCKETS" != "no"; then
13441      echo $ac_n "checking for struct cmsghdr""... $ac_c" 1>&6
13442 -echo "configure:89258: checking for struct cmsghdr" >&5
13443 +echo "configure:89562: checking for struct cmsghdr" >&5
13444  if eval "test \"`echo '$''{'ac_cv_cmsghdr'+set}'`\" = set"; then
13445    echo $ac_n "(cached) $ac_c" 1>&6
13446  else
13447    
13448      cat > conftest.$ac_ext <<EOF
13449 -#line 89264 "configure"
13450 +#line 89568 "configure"
13451  #include "confdefs.h"
13452  
13453  #include <sys/types.h>
13454 @@ -89269,7 +89573,7 @@
13455  struct cmsghdr s; s
13456  ; return 0; }
13457  EOF
13458 -if { (eval echo configure:89273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13459 +if { (eval echo configure:89577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13460    rm -rf conftest*
13461    ac_cv_cmsghdr=yes
13462  else
13463 @@ -89294,12 +89598,12 @@
13464    for ac_func in hstrerror socketpair
13465  do
13466  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13467 -echo "configure:89298: checking for $ac_func" >&5
13468 +echo "configure:89602: checking for $ac_func" >&5
13469  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
13470    echo $ac_n "(cached) $ac_c" 1>&6
13471  else
13472    cat > conftest.$ac_ext <<EOF
13473 -#line 89303 "configure"
13474 +#line 89607 "configure"
13475  #include "confdefs.h"
13476  /* System header to define __stub macros and hopefully few prototypes,
13477      which can conflict with char $ac_func(); below.  */
13478 @@ -89322,7 +89626,7 @@
13479  
13480  ; return 0; }
13481  EOF
13482 -if { (eval echo configure:89326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13483 +if { (eval echo configure:89630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13484    rm -rf conftest*
13485    eval "ac_cv_func_$ac_func=yes"
13486  else
13487 @@ -89350,17 +89654,17 @@
13488  do
13489  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13490  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13491 -echo "configure:89354: checking for $ac_hdr" >&5
13492 +echo "configure:89658: checking for $ac_hdr" >&5
13493  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
13494    echo $ac_n "(cached) $ac_c" 1>&6
13495  else
13496    cat > conftest.$ac_ext <<EOF
13497 -#line 89359 "configure"
13498 +#line 89663 "configure"
13499  #include "confdefs.h"
13500  #include <$ac_hdr>
13501  EOF
13502  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13503 -{ (eval echo configure:89364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13504 +{ (eval echo configure:89668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13505  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13506  if test -z "$ac_err"; then
13507    rm -rf conftest*
13508 @@ -89387,7 +89691,7 @@
13509  done
13510  
13511    cat > conftest.$ac_ext <<EOF
13512 -#line 89391 "configure"
13513 +#line 89695 "configure"
13514  #include "confdefs.h"
13515  
13516  #include <sys/types.h>
13517 @@ -89397,7 +89701,7 @@
13518  static struct msghdr tp; int n = (int) tp.msg_flags; return n
13519  ; return 0; }
13520  EOF
13521 -if { (eval echo configure:89401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13522 +if { (eval echo configure:89705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13523    :
13524  else
13525    echo "configure: failed program was:" >&5
13526 @@ -89703,7 +90007,7 @@
13527  php_enable_spl=yes
13528  
13529  echo $ac_n "checking enable SPL suppport""... $ac_c" 1>&6
13530 -echo "configure:89707: checking enable SPL suppport" >&5
13531 +echo "configure:90011: checking enable SPL suppport" >&5
13532  # Check whether --enable-spl or --disable-spl was given.
13533  if test "${enable_spl+set}" = set; then
13534    enableval="$enable_spl"
13535 @@ -89748,7 +90052,7 @@
13536  
13537  if test "$PHP_SPL" != "no"; then
13538    echo $ac_n "checking whether zend_object_value is packed""... $ac_c" 1>&6
13539 -echo "configure:89752: checking whether zend_object_value is packed" >&5
13540 +echo "configure:90056: checking whether zend_object_value is packed" >&5
13541    old_CPPFLAGS=$CPPFLAGS
13542    CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS"
13543    if test "$cross_compiling" = yes; then
13544 @@ -89758,7 +90062,7 @@
13545    
13546  else
13547    cat > conftest.$ac_ext <<EOF
13548 -#line 89762 "configure"
13549 +#line 90066 "configure"
13550  #include "confdefs.h"
13551  
13552  #include "Zend/zend_types.h"
13553 @@ -89767,7 +90071,7 @@
13554  }
13555    
13556  EOF
13557 -if { (eval echo configure:89771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13558 +if { (eval echo configure:90075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13559  then
13560    
13561      ac_result=1
13562 @@ -90121,7 +90425,7 @@
13563  php_with_sqlite=yes
13564  
13565  echo $ac_n "checking for sqlite support""... $ac_c" 1>&6
13566 -echo "configure:90125: checking for sqlite support" >&5
13567 +echo "configure:90429: checking for sqlite support" >&5
13568  # Check whether --with-sqlite or --without-sqlite was given.
13569  if test "${with_sqlite+set}" = set; then
13570    withval="$with_sqlite"
13571 @@ -90168,7 +90472,7 @@
13572  php_enable_sqlite_utf8=no
13573  
13574  echo $ac_n "checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)""... $ac_c" 1>&6
13575 -echo "configure:90172: checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)" >&5
13576 +echo "configure:90476: checking whether to enable UTF-8 support in sqlite (default: ISO-8859-1)" >&5
13577  # Check whether --enable-sqlite-utf8 or --disable-sqlite-utf8 was given.
13578  if test "${enable_sqlite_utf8+set}" = set; then
13579    enableval="$enable_sqlite_utf8"
13580 @@ -90199,13 +90503,13 @@
13581    if test "$PHP_PDO" != "no"; then
13582      
13583    echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
13584 -echo "configure:90203: checking for PDO includes" >&5
13585 +echo "configure:90507: checking for PDO includes" >&5
13586  if eval "test \"`echo '$''{'pdo_inc_path'+set}'`\" = set"; then
13587    echo $ac_n "(cached) $ac_c" 1>&6
13588  else
13589    
13590      echo $ac_n "checking for PDO includes""... $ac_c" 1>&6
13591 -echo "configure:90209: checking for PDO includes" >&5
13592 +echo "configure:90513: checking for PDO includes" >&5
13593      if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
13594        pdo_inc_path=$abs_srcdir/ext
13595      elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
13596 @@ -90239,7 +90543,7 @@
13597        SQLITE_DIR=$PHP_SQLITE
13598      else # search default path list
13599        echo $ac_n "checking for sqlite files in default path""... $ac_c" 1>&6
13600 -echo "configure:90243: checking for sqlite files in default path" >&5
13601 +echo "configure:90547: checking for sqlite files in default path" >&5
13602        for i in $SEARCH_PATH ; do
13603          if test -r $i/$SEARCH_FOR; then
13604            SQLITE_DIR=$i
13605 @@ -90351,7 +90655,7 @@
13606    done
13607  
13608    echo $ac_n "checking for sqlite_open in -lsqlite""... $ac_c" 1>&6
13609 -echo "configure:90355: checking for sqlite_open in -lsqlite" >&5
13610 +echo "configure:90659: checking for sqlite_open in -lsqlite" >&5
13611  ac_lib_var=`echo sqlite'_'sqlite_open | sed 'y%./+-%__p_%'`
13612  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13613    echo $ac_n "(cached) $ac_c" 1>&6
13614 @@ -90359,7 +90663,7 @@
13615    ac_save_LIBS="$LIBS"
13616  LIBS="-lsqlite  $LIBS"
13617  cat > conftest.$ac_ext <<EOF
13618 -#line 90363 "configure"
13619 +#line 90667 "configure"
13620  #include "confdefs.h"
13621  /* Override any gcc2 internal prototype to avoid an error.  */
13622  /* We use char because int might match the return type of a gcc2
13623 @@ -90370,7 +90674,7 @@
13624  sqlite_open()
13625  ; return 0; }
13626  EOF
13627 -if { (eval echo configure:90374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13628 +if { (eval echo configure:90678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13629    rm -rf conftest*
13630    eval "ac_cv_lib_$ac_lib_var=yes"
13631  else
13632 @@ -90543,7 +90847,7 @@
13633    # Extract the first word of "lemon", so it can be a program name with args.
13634  set dummy lemon; ac_word=$2
13635  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13636 -echo "configure:90547: checking for $ac_word" >&5
13637 +echo "configure:90851: checking for $ac_word" >&5
13638  if eval "test \"`echo '$''{'ac_cv_prog_LEMON'+set}'`\" = set"; then
13639    echo $ac_n "(cached) $ac_c" 1>&6
13640  else
13641 @@ -90571,7 +90875,7 @@
13642  
13643    if test "$LEMON"; then
13644      echo $ac_n "checking for lemon version""... $ac_c" 1>&6
13645 -echo "configure:90575: checking for lemon version" >&5
13646 +echo "configure:90879: checking for lemon version" >&5
13647  if eval "test \"`echo '$''{'php_cv_lemon_version'+set}'`\" = set"; then
13648    echo $ac_n "(cached) $ac_c" 1>&6
13649  else
13650 @@ -90973,7 +91277,7 @@
13651    
13652  
13653      echo $ac_n "checking size of char *""... $ac_c" 1>&6
13654 -echo "configure:90977: checking size of char *" >&5
13655 +echo "configure:91281: checking size of char *" >&5
13656  if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
13657    echo $ac_n "(cached) $ac_c" 1>&6
13658  else
13659 @@ -90981,18 +91285,18 @@
13660    ac_cv_sizeof_char_p=4
13661  else
13662    cat > conftest.$ac_ext <<EOF
13663 -#line 90985 "configure"
13664 +#line 91289 "configure"
13665  #include "confdefs.h"
13666  #include <stdio.h>
13667 -int main()
13668 +main()
13669  {
13670    FILE *f=fopen("conftestval", "w");
13671 -  if (!f) return(1);
13672 +  if (!f) exit(1);
13673    fprintf(f, "%d\n", sizeof(char *));
13674 -  return(0);
13675 +  exit(0);
13676  }
13677  EOF
13678 -if { (eval echo configure:90996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13679 +if { (eval echo configure:91300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13680  then
13681    ac_cv_sizeof_char_p=`cat conftestval`
13682  else
13683 @@ -91054,12 +91358,12 @@
13684    for ac_func in usleep nanosleep
13685  do
13686  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13687 -echo "configure:91058: checking for $ac_func" >&5
13688 +echo "configure:91362: checking for $ac_func" >&5
13689  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
13690    echo $ac_n "(cached) $ac_c" 1>&6
13691  else
13692    cat > conftest.$ac_ext <<EOF
13693 -#line 91063 "configure"
13694 +#line 91367 "configure"
13695  #include "confdefs.h"
13696  /* System header to define __stub macros and hopefully few prototypes,
13697      which can conflict with char $ac_func(); below.  */
13698 @@ -91082,7 +91386,7 @@
13699  
13700  ; return 0; }
13701  EOF
13702 -if { (eval echo configure:91086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13703 +if { (eval echo configure:91390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13704    rm -rf conftest*
13705    eval "ac_cv_func_$ac_func=yes"
13706  else
13707 @@ -91110,17 +91414,17 @@
13708  do
13709  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13710  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13711 -echo "configure:91114: checking for $ac_hdr" >&5
13712 +echo "configure:91418: checking for $ac_hdr" >&5
13713  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
13714    echo $ac_n "(cached) $ac_c" 1>&6
13715  else
13716    cat > conftest.$ac_ext <<EOF
13717 -#line 91119 "configure"
13718 +#line 91423 "configure"
13719  #include "confdefs.h"
13720  #include <$ac_hdr>
13721  EOF
13722  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13723 -{ (eval echo configure:91124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13724 +{ (eval echo configure:91428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13725  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13726  if test -z "$ac_err"; then
13727    rm -rf conftest*
13728 @@ -91151,7 +91455,7 @@
13729  
13730  
13731  echo $ac_n "checking whether flush should be called explicitly after a buffered io""... $ac_c" 1>&6
13732 -echo "configure:91155: checking whether flush should be called explicitly after a buffered io" >&5
13733 +echo "configure:91459: checking whether flush should be called explicitly after a buffered io" >&5
13734  if eval "test \"`echo '$''{'ac_cv_flush_io'+set}'`\" = set"; then
13735    echo $ac_n "(cached) $ac_c" 1>&6
13736  else
13737 @@ -91162,7 +91466,7 @@
13738  
13739  else
13740    cat > conftest.$ac_ext <<EOF
13741 -#line 91166 "configure"
13742 +#line 91470 "configure"
13743  #include "confdefs.h"
13744  
13745  #include <stdio.h>
13746 @@ -91200,7 +91504,7 @@
13747  }
13748  
13749  EOF
13750 -if { (eval echo configure:91204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13751 +if { (eval echo configure:91508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13752  then
13753    
13754    ac_cv_flush_io=no
13755 @@ -91228,7 +91532,7 @@
13756  
13757  if test "$ac_cv_func_crypt" = "no"; then
13758    echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
13759 -echo "configure:91232: checking for crypt in -lcrypt" >&5
13760 +echo "configure:91536: checking for crypt in -lcrypt" >&5
13761  ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
13762  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13763    echo $ac_n "(cached) $ac_c" 1>&6
13764 @@ -91236,7 +91540,7 @@
13765    ac_save_LIBS="$LIBS"
13766  LIBS="-lcrypt  $LIBS"
13767  cat > conftest.$ac_ext <<EOF
13768 -#line 91240 "configure"
13769 +#line 91544 "configure"
13770  #include "confdefs.h"
13771  /* Override any gcc2 internal prototype to avoid an error.  */
13772  /* We use char because int might match the return type of a gcc2
13773 @@ -91247,7 +91551,7 @@
13774  crypt()
13775  ; return 0; }
13776  EOF
13777 -if { (eval echo configure:91251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13778 +if { (eval echo configure:91555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13779    rm -rf conftest*
13780    eval "ac_cv_lib_$ac_lib_var=yes"
13781  else
13782 @@ -91276,7 +91580,7 @@
13783  fi
13784    
13785  echo $ac_n "checking for standard DES crypt""... $ac_c" 1>&6
13786 -echo "configure:91280: checking for standard DES crypt" >&5
13787 +echo "configure:91584: checking for standard DES crypt" >&5
13788  if eval "test \"`echo '$''{'ac_cv_crypt_des'+set}'`\" = set"; then
13789    echo $ac_n "(cached) $ac_c" 1>&6
13790  else
13791 @@ -91287,7 +91591,7 @@
13792  
13793  else
13794    cat > conftest.$ac_ext <<EOF
13795 -#line 91291 "configure"
13796 +#line 91595 "configure"
13797  #include "confdefs.h"
13798  
13799  #if HAVE_UNISTD_H
13800 @@ -91306,7 +91610,7 @@
13801  #endif
13802  }
13803  EOF
13804 -if { (eval echo configure:91310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13805 +if { (eval echo configure:91614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13806  then
13807    
13808    ac_cv_crypt_des=yes
13809 @@ -91336,7 +91640,7 @@
13810  
13811  
13812  echo $ac_n "checking for extended DES crypt""... $ac_c" 1>&6
13813 -echo "configure:91340: checking for extended DES crypt" >&5
13814 +echo "configure:91644: checking for extended DES crypt" >&5
13815  if eval "test \"`echo '$''{'ac_cv_crypt_ext_des'+set}'`\" = set"; then
13816    echo $ac_n "(cached) $ac_c" 1>&6
13817  else
13818 @@ -91347,7 +91651,7 @@
13819  
13820  else
13821    cat > conftest.$ac_ext <<EOF
13822 -#line 91351 "configure"
13823 +#line 91655 "configure"
13824  #include "confdefs.h"
13825  
13826  #if HAVE_UNISTD_H
13827 @@ -91366,7 +91670,7 @@
13828  #endif
13829  }
13830  EOF
13831 -if { (eval echo configure:91370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13832 +if { (eval echo configure:91674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13833  then
13834    
13835    ac_cv_crypt_ext_des=yes
13836 @@ -91396,7 +91700,7 @@
13837  
13838  
13839  echo $ac_n "checking for MD5 crypt""... $ac_c" 1>&6
13840 -echo "configure:91400: checking for MD5 crypt" >&5
13841 +echo "configure:91704: checking for MD5 crypt" >&5
13842  if eval "test \"`echo '$''{'ac_cv_crypt_md5'+set}'`\" = set"; then
13843    echo $ac_n "(cached) $ac_c" 1>&6
13844  else
13845 @@ -91407,7 +91711,7 @@
13846  
13847  else
13848    cat > conftest.$ac_ext <<EOF
13849 -#line 91411 "configure"
13850 +#line 91715 "configure"
13851  #include "confdefs.h"
13852  
13853  #if HAVE_UNISTD_H
13854 @@ -91435,7 +91739,7 @@
13855  #endif
13856  }
13857  EOF
13858 -if { (eval echo configure:91439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13859 +if { (eval echo configure:91743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13860  then
13861    
13862    ac_cv_crypt_md5=yes
13863 @@ -91494,7 +91798,7 @@
13864  
13865  
13866  echo $ac_n "checking for Blowfish crypt""... $ac_c" 1>&6
13867 -echo "configure:91498: checking for Blowfish crypt" >&5
13868 +echo "configure:91802: checking for Blowfish crypt" >&5
13869  if eval "test \"`echo '$''{'ac_cv_crypt_blowfish'+set}'`\" = set"; then
13870    echo $ac_n "(cached) $ac_c" 1>&6
13871  else
13872 @@ -91505,7 +91809,7 @@
13873  
13874  else
13875    cat > conftest.$ac_ext <<EOF
13876 -#line 91509 "configure"
13877 +#line 91813 "configure"
13878  #include "confdefs.h"
13879  
13880  #if HAVE_UNISTD_H
13881 @@ -91530,7 +91834,7 @@
13882  #endif
13883  }
13884  EOF
13885 -if { (eval echo configure:91534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13886 +if { (eval echo configure:91838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13887  then
13888    
13889    ac_cv_crypt_blowfish=yes
13890 @@ -91562,12 +91866,12 @@
13891  for ac_func in getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan
13892  do
13893  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13894 -echo "configure:91566: checking for $ac_func" >&5
13895 +echo "configure:91870: checking for $ac_func" >&5
13896  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
13897    echo $ac_n "(cached) $ac_c" 1>&6
13898  else
13899    cat > conftest.$ac_ext <<EOF
13900 -#line 91571 "configure"
13901 +#line 91875 "configure"
13902  #include "confdefs.h"
13903  /* System header to define __stub macros and hopefully few prototypes,
13904      which can conflict with char $ac_func(); below.  */
13905 @@ -91590,7 +91894,7 @@
13906  
13907  ; return 0; }
13908  EOF
13909 -if { (eval echo configure:91594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13910 +if { (eval echo configure:91898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13911    rm -rf conftest*
13912    eval "ac_cv_func_$ac_func=yes"
13913  else
13914 @@ -91615,7 +91919,7 @@
13915  done
13916  
13917  echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
13918 -echo "configure:91619: checking for working fnmatch" >&5
13919 +echo "configure:91923: checking for working fnmatch" >&5
13920  if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
13921    echo $ac_n "(cached) $ac_c" 1>&6
13922  else
13923 @@ -91626,11 +91930,11 @@
13924    ac_cv_func_fnmatch_works=no
13925  else
13926    cat > conftest.$ac_ext <<EOF
13927 -#line 91630 "configure"
13928 +#line 91934 "configure"
13929  #include "confdefs.h"
13930  main() { exit (fnmatch ("a*", "abc", 0) != 0); }
13931  EOF
13932 -if { (eval echo configure:91634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13933 +if { (eval echo configure:91938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13934  then
13935    ac_cv_func_fnmatch_works=yes
13936  else
13937 @@ -91761,13 +92065,13 @@
13938  EOF
13939  
13940      echo $ac_n "checking whether field re_magic exists in struct regex_t""... $ac_c" 1>&6
13941 -echo "configure:91765: checking whether field re_magic exists in struct regex_t" >&5
13942 +echo "configure:92069: checking whether field re_magic exists in struct regex_t" >&5
13943  if eval "test \"`echo '$''{'ac_cv_regex_t_re_magic'+set}'`\" = set"; then
13944    echo $ac_n "(cached) $ac_c" 1>&6
13945  else
13946    
13947    cat > conftest.$ac_ext <<EOF
13948 -#line 91771 "configure"
13949 +#line 92075 "configure"
13950  #include "confdefs.h"
13951  #include <sys/types.h>
13952  #include <regex.h>
13953 @@ -91775,7 +92079,7 @@
13954  regex_t rt; rt.re_magic;
13955  ; return 0; }
13956  EOF
13957 -if { (eval echo configure:91779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13958 +if { (eval echo configure:92083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13959    rm -rf conftest*
13960    ac_cv_regex_t_re_magic=yes
13961  else
13962 @@ -91796,11 +92100,11 @@
13963    fi 
13964  fi   
13965  echo $ac_n "checking which regex library to use""... $ac_c" 1>&6
13966 -echo "configure:91800: checking which regex library to use" >&5
13967 +echo "configure:92104: checking which regex library to use" >&5
13968  echo "$ac_t""$REGEX_TYPE" 1>&6
13969  
13970  echo $ac_n "checking whether rounding works as expected""... $ac_c" 1>&6
13971 -echo "configure:91804: checking whether rounding works as expected" >&5
13972 +echo "configure:92108: checking whether rounding works as expected" >&5
13973  if test "$cross_compiling" = yes; then
13974    
13975    PHP_ROUND_FUZZ=0.50000000001
13976 @@ -91808,7 +92112,7 @@
13977  
13978  else
13979    cat > conftest.$ac_ext <<EOF
13980 -#line 91812 "configure"
13981 +#line 92116 "configure"
13982  #include "confdefs.h"
13983  
13984  #include <math.h>
13985 @@ -91821,7 +92125,7 @@
13986    }
13987  
13988  EOF
13989 -if { (eval echo configure:91825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13990 +if { (eval echo configure:92129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13991  then
13992    
13993    PHP_ROUND_FUZZ=0.5
13994 @@ -91851,12 +92155,12 @@
13995  for ac_func in fork CreateProcess
13996  do
13997  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13998 -echo "configure:91855: checking for $ac_func" >&5
13999 +echo "configure:92159: checking for $ac_func" >&5
14000  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14001    echo $ac_n "(cached) $ac_c" 1>&6
14002  else
14003    cat > conftest.$ac_ext <<EOF
14004 -#line 91860 "configure"
14005 +#line 92164 "configure"
14006  #include "confdefs.h"
14007  /* System header to define __stub macros and hopefully few prototypes,
14008      which can conflict with char $ac_func(); below.  */
14009 @@ -91879,7 +92183,7 @@
14010  
14011  ; return 0; }
14012  EOF
14013 -if { (eval echo configure:91883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14014 +if { (eval echo configure:92187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14015    rm -rf conftest*
14016    eval "ac_cv_func_$ac_func=yes"
14017  else
14018 @@ -91911,7 +92215,7 @@
14019  fi
14020  
14021  echo $ac_n "checking if your OS can spawn processes with inherited handles""... $ac_c" 1>&6
14022 -echo "configure:91915: checking if your OS can spawn processes with inherited handles" >&5
14023 +echo "configure:92219: checking if your OS can spawn processes with inherited handles" >&5
14024  if test "$php_can_support_proc_open" = "yes"; then
14025    echo "$ac_t""yes" 1>&6
14026    cat >> confdefs.h <<\EOF
14027 @@ -91936,12 +92240,12 @@
14028    unset found
14029    
14030    echo $ac_n "checking for res_nmkquery""... $ac_c" 1>&6
14031 -echo "configure:91940: checking for res_nmkquery" >&5
14032 +echo "configure:92244: checking for res_nmkquery" >&5
14033  if eval "test \"`echo '$''{'ac_cv_func_res_nmkquery'+set}'`\" = set"; then
14034    echo $ac_n "(cached) $ac_c" 1>&6
14035  else
14036    cat > conftest.$ac_ext <<EOF
14037 -#line 91945 "configure"
14038 +#line 92249 "configure"
14039  #include "confdefs.h"
14040  /* System header to define __stub macros and hopefully few prototypes,
14041      which can conflict with char res_nmkquery(); below.  */
14042 @@ -91964,7 +92268,7 @@
14043  
14044  ; return 0; }
14045  EOF
14046 -if { (eval echo configure:91968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14047 +if { (eval echo configure:92272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14048    rm -rf conftest*
14049    eval "ac_cv_func_res_nmkquery=yes"
14050  else
14051 @@ -91982,12 +92286,12 @@
14052  else
14053    echo "$ac_t""no" 1>&6
14054   echo $ac_n "checking for __res_nmkquery""... $ac_c" 1>&6
14055 -echo "configure:91986: checking for __res_nmkquery" >&5
14056 +echo "configure:92290: checking for __res_nmkquery" >&5
14057  if eval "test \"`echo '$''{'ac_cv_func___res_nmkquery'+set}'`\" = set"; then
14058    echo $ac_n "(cached) $ac_c" 1>&6
14059  else
14060    cat > conftest.$ac_ext <<EOF
14061 -#line 91991 "configure"
14062 +#line 92295 "configure"
14063  #include "confdefs.h"
14064  /* System header to define __stub macros and hopefully few prototypes,
14065      which can conflict with char __res_nmkquery(); below.  */
14066 @@ -92010,7 +92314,7 @@
14067  
14068  ; return 0; }
14069  EOF
14070 -if { (eval echo configure:92014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14071 +if { (eval echo configure:92318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14072    rm -rf conftest*
14073    eval "ac_cv_func___res_nmkquery=yes"
14074  else
14075 @@ -92048,7 +92352,7 @@
14076    unset ac_cv_lib_resolv___res_nmkquery
14077    unset found
14078    echo $ac_n "checking for res_nmkquery in -lresolv""... $ac_c" 1>&6
14079 -echo "configure:92052: checking for res_nmkquery in -lresolv" >&5
14080 +echo "configure:92356: checking for res_nmkquery in -lresolv" >&5
14081  ac_lib_var=`echo resolv'_'res_nmkquery | sed 'y%./+-%__p_%'`
14082  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14083    echo $ac_n "(cached) $ac_c" 1>&6
14084 @@ -92056,7 +92360,7 @@
14085    ac_save_LIBS="$LIBS"
14086  LIBS="-lresolv  $LIBS"
14087  cat > conftest.$ac_ext <<EOF
14088 -#line 92060 "configure"
14089 +#line 92364 "configure"
14090  #include "confdefs.h"
14091  /* Override any gcc2 internal prototype to avoid an error.  */
14092  /* We use char because int might match the return type of a gcc2
14093 @@ -92067,7 +92371,7 @@
14094  res_nmkquery()
14095  ; return 0; }
14096  EOF
14097 -if { (eval echo configure:92071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14098 +if { (eval echo configure:92375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14099    rm -rf conftest*
14100    eval "ac_cv_lib_$ac_lib_var=yes"
14101  else
14102 @@ -92087,7 +92391,7 @@
14103    echo "$ac_t""no" 1>&6
14104  
14105      echo $ac_n "checking for __res_nmkquery in -lresolv""... $ac_c" 1>&6
14106 -echo "configure:92091: checking for __res_nmkquery in -lresolv" >&5
14107 +echo "configure:92395: checking for __res_nmkquery in -lresolv" >&5
14108  ac_lib_var=`echo resolv'_'__res_nmkquery | sed 'y%./+-%__p_%'`
14109  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14110    echo $ac_n "(cached) $ac_c" 1>&6
14111 @@ -92095,7 +92399,7 @@
14112    ac_save_LIBS="$LIBS"
14113  LIBS="-lresolv  $LIBS"
14114  cat > conftest.$ac_ext <<EOF
14115 -#line 92099 "configure"
14116 +#line 92403 "configure"
14117  #include "confdefs.h"
14118  /* Override any gcc2 internal prototype to avoid an error.  */
14119  /* We use char because int might match the return type of a gcc2
14120 @@ -92106,7 +92410,7 @@
14121  __res_nmkquery()
14122  ; return 0; }
14123  EOF
14124 -if { (eval echo configure:92110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14125 +if { (eval echo configure:92414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14126    rm -rf conftest*
14127    eval "ac_cv_lib_$ac_lib_var=yes"
14128  else
14129 @@ -92138,11 +92442,11 @@
14130    found=no
14131  else
14132    cat > conftest.$ac_ext <<EOF
14133 -#line 92142 "configure"
14134 +#line 92446 "configure"
14135  #include "confdefs.h"
14136  main() { return (0); }
14137  EOF
14138 -if { (eval echo configure:92146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14139 +if { (eval echo configure:92450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14140  then
14141    found=yes
14142  else
14143 @@ -92184,7 +92488,7 @@
14144    unset ac_cv_lib_bind___res_nmkquery
14145    unset found
14146    echo $ac_n "checking for res_nmkquery in -lbind""... $ac_c" 1>&6
14147 -echo "configure:92188: checking for res_nmkquery in -lbind" >&5
14148 +echo "configure:92492: checking for res_nmkquery in -lbind" >&5
14149  ac_lib_var=`echo bind'_'res_nmkquery | sed 'y%./+-%__p_%'`
14150  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14151    echo $ac_n "(cached) $ac_c" 1>&6
14152 @@ -92192,7 +92496,7 @@
14153    ac_save_LIBS="$LIBS"
14154  LIBS="-lbind  $LIBS"
14155  cat > conftest.$ac_ext <<EOF
14156 -#line 92196 "configure"
14157 +#line 92500 "configure"
14158  #include "confdefs.h"
14159  /* Override any gcc2 internal prototype to avoid an error.  */
14160  /* We use char because int might match the return type of a gcc2
14161 @@ -92203,7 +92507,7 @@
14162  res_nmkquery()
14163  ; return 0; }
14164  EOF
14165 -if { (eval echo configure:92207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14166 +if { (eval echo configure:92511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14167    rm -rf conftest*
14168    eval "ac_cv_lib_$ac_lib_var=yes"
14169  else
14170 @@ -92223,7 +92527,7 @@
14171    echo "$ac_t""no" 1>&6
14172  
14173      echo $ac_n "checking for __res_nmkquery in -lbind""... $ac_c" 1>&6
14174 -echo "configure:92227: checking for __res_nmkquery in -lbind" >&5
14175 +echo "configure:92531: checking for __res_nmkquery in -lbind" >&5
14176  ac_lib_var=`echo bind'_'__res_nmkquery | sed 'y%./+-%__p_%'`
14177  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14178    echo $ac_n "(cached) $ac_c" 1>&6
14179 @@ -92231,7 +92535,7 @@
14180    ac_save_LIBS="$LIBS"
14181  LIBS="-lbind  $LIBS"
14182  cat > conftest.$ac_ext <<EOF
14183 -#line 92235 "configure"
14184 +#line 92539 "configure"
14185  #include "confdefs.h"
14186  /* Override any gcc2 internal prototype to avoid an error.  */
14187  /* We use char because int might match the return type of a gcc2
14188 @@ -92242,7 +92546,7 @@
14189  __res_nmkquery()
14190  ; return 0; }
14191  EOF
14192 -if { (eval echo configure:92246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14193 +if { (eval echo configure:92550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14194    rm -rf conftest*
14195    eval "ac_cv_lib_$ac_lib_var=yes"
14196  else
14197 @@ -92274,11 +92578,11 @@
14198    found=no
14199  else
14200    cat > conftest.$ac_ext <<EOF
14201 -#line 92278 "configure"
14202 +#line 92582 "configure"
14203  #include "confdefs.h"
14204  main() { return (0); }
14205  EOF
14206 -if { (eval echo configure:92282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14207 +if { (eval echo configure:92586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14208  then
14209    found=yes
14210  else
14211 @@ -92320,7 +92624,7 @@
14212    unset ac_cv_lib_socket___res_nmkquery
14213    unset found
14214    echo $ac_n "checking for res_nmkquery in -lsocket""... $ac_c" 1>&6
14215 -echo "configure:92324: checking for res_nmkquery in -lsocket" >&5
14216 +echo "configure:92628: checking for res_nmkquery in -lsocket" >&5
14217  ac_lib_var=`echo socket'_'res_nmkquery | sed 'y%./+-%__p_%'`
14218  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14219    echo $ac_n "(cached) $ac_c" 1>&6
14220 @@ -92328,7 +92632,7 @@
14221    ac_save_LIBS="$LIBS"
14222  LIBS="-lsocket  $LIBS"
14223  cat > conftest.$ac_ext <<EOF
14224 -#line 92332 "configure"
14225 +#line 92636 "configure"
14226  #include "confdefs.h"
14227  /* Override any gcc2 internal prototype to avoid an error.  */
14228  /* We use char because int might match the return type of a gcc2
14229 @@ -92339,7 +92643,7 @@
14230  res_nmkquery()
14231  ; return 0; }
14232  EOF
14233 -if { (eval echo configure:92343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14234 +if { (eval echo configure:92647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14235    rm -rf conftest*
14236    eval "ac_cv_lib_$ac_lib_var=yes"
14237  else
14238 @@ -92359,7 +92663,7 @@
14239    echo "$ac_t""no" 1>&6
14240  
14241      echo $ac_n "checking for __res_nmkquery in -lsocket""... $ac_c" 1>&6
14242 -echo "configure:92363: checking for __res_nmkquery in -lsocket" >&5
14243 +echo "configure:92667: checking for __res_nmkquery in -lsocket" >&5
14244  ac_lib_var=`echo socket'_'__res_nmkquery | sed 'y%./+-%__p_%'`
14245  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14246    echo $ac_n "(cached) $ac_c" 1>&6
14247 @@ -92367,7 +92671,7 @@
14248    ac_save_LIBS="$LIBS"
14249  LIBS="-lsocket  $LIBS"
14250  cat > conftest.$ac_ext <<EOF
14251 -#line 92371 "configure"
14252 +#line 92675 "configure"
14253  #include "confdefs.h"
14254  /* Override any gcc2 internal prototype to avoid an error.  */
14255  /* We use char because int might match the return type of a gcc2
14256 @@ -92378,7 +92682,7 @@
14257  __res_nmkquery()
14258  ; return 0; }
14259  EOF
14260 -if { (eval echo configure:92382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14261 +if { (eval echo configure:92686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14262    rm -rf conftest*
14263    eval "ac_cv_lib_$ac_lib_var=yes"
14264  else
14265 @@ -92410,11 +92714,11 @@
14266    found=no
14267  else
14268    cat > conftest.$ac_ext <<EOF
14269 -#line 92414 "configure"
14270 +#line 92718 "configure"
14271  #include "confdefs.h"
14272  main() { return (0); }
14273  EOF
14274 -if { (eval echo configure:92418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14275 +if { (eval echo configure:92722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14276  then
14277    found=yes
14278  else
14279 @@ -92471,12 +92775,12 @@
14280    unset found
14281    
14282    echo $ac_n "checking for res_nsend""... $ac_c" 1>&6
14283 -echo "configure:92475: checking for res_nsend" >&5
14284 +echo "configure:92779: checking for res_nsend" >&5
14285  if eval "test \"`echo '$''{'ac_cv_func_res_nsend'+set}'`\" = set"; then
14286    echo $ac_n "(cached) $ac_c" 1>&6
14287  else
14288    cat > conftest.$ac_ext <<EOF
14289 -#line 92480 "configure"
14290 +#line 92784 "configure"
14291  #include "confdefs.h"
14292  /* System header to define __stub macros and hopefully few prototypes,
14293      which can conflict with char res_nsend(); below.  */
14294 @@ -92499,7 +92803,7 @@
14295  
14296  ; return 0; }
14297  EOF
14298 -if { (eval echo configure:92503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14299 +if { (eval echo configure:92807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14300    rm -rf conftest*
14301    eval "ac_cv_func_res_nsend=yes"
14302  else
14303 @@ -92517,12 +92821,12 @@
14304  else
14305    echo "$ac_t""no" 1>&6
14306   echo $ac_n "checking for __res_nsend""... $ac_c" 1>&6
14307 -echo "configure:92521: checking for __res_nsend" >&5
14308 +echo "configure:92825: checking for __res_nsend" >&5
14309  if eval "test \"`echo '$''{'ac_cv_func___res_nsend'+set}'`\" = set"; then
14310    echo $ac_n "(cached) $ac_c" 1>&6
14311  else
14312    cat > conftest.$ac_ext <<EOF
14313 -#line 92526 "configure"
14314 +#line 92830 "configure"
14315  #include "confdefs.h"
14316  /* System header to define __stub macros and hopefully few prototypes,
14317      which can conflict with char __res_nsend(); below.  */
14318 @@ -92545,7 +92849,7 @@
14319  
14320  ; return 0; }
14321  EOF
14322 -if { (eval echo configure:92549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14323 +if { (eval echo configure:92853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14324    rm -rf conftest*
14325    eval "ac_cv_func___res_nsend=yes"
14326  else
14327 @@ -92583,7 +92887,7 @@
14328    unset ac_cv_lib_resolv___res_nsend
14329    unset found
14330    echo $ac_n "checking for res_nsend in -lresolv""... $ac_c" 1>&6
14331 -echo "configure:92587: checking for res_nsend in -lresolv" >&5
14332 +echo "configure:92891: checking for res_nsend in -lresolv" >&5
14333  ac_lib_var=`echo resolv'_'res_nsend | sed 'y%./+-%__p_%'`
14334  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14335    echo $ac_n "(cached) $ac_c" 1>&6
14336 @@ -92591,7 +92895,7 @@
14337    ac_save_LIBS="$LIBS"
14338  LIBS="-lresolv  $LIBS"
14339  cat > conftest.$ac_ext <<EOF
14340 -#line 92595 "configure"
14341 +#line 92899 "configure"
14342  #include "confdefs.h"
14343  /* Override any gcc2 internal prototype to avoid an error.  */
14344  /* We use char because int might match the return type of a gcc2
14345 @@ -92602,7 +92906,7 @@
14346  res_nsend()
14347  ; return 0; }
14348  EOF
14349 -if { (eval echo configure:92606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14350 +if { (eval echo configure:92910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14351    rm -rf conftest*
14352    eval "ac_cv_lib_$ac_lib_var=yes"
14353  else
14354 @@ -92622,7 +92926,7 @@
14355    echo "$ac_t""no" 1>&6
14356  
14357      echo $ac_n "checking for __res_nsend in -lresolv""... $ac_c" 1>&6
14358 -echo "configure:92626: checking for __res_nsend in -lresolv" >&5
14359 +echo "configure:92930: checking for __res_nsend in -lresolv" >&5
14360  ac_lib_var=`echo resolv'_'__res_nsend | sed 'y%./+-%__p_%'`
14361  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14362    echo $ac_n "(cached) $ac_c" 1>&6
14363 @@ -92630,7 +92934,7 @@
14364    ac_save_LIBS="$LIBS"
14365  LIBS="-lresolv  $LIBS"
14366  cat > conftest.$ac_ext <<EOF
14367 -#line 92634 "configure"
14368 +#line 92938 "configure"
14369  #include "confdefs.h"
14370  /* Override any gcc2 internal prototype to avoid an error.  */
14371  /* We use char because int might match the return type of a gcc2
14372 @@ -92641,7 +92945,7 @@
14373  __res_nsend()
14374  ; return 0; }
14375  EOF
14376 -if { (eval echo configure:92645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14377 +if { (eval echo configure:92949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14378    rm -rf conftest*
14379    eval "ac_cv_lib_$ac_lib_var=yes"
14380  else
14381 @@ -92673,11 +92977,11 @@
14382    found=no
14383  else
14384    cat > conftest.$ac_ext <<EOF
14385 -#line 92677 "configure"
14386 +#line 92981 "configure"
14387  #include "confdefs.h"
14388  main() { return (0); }
14389  EOF
14390 -if { (eval echo configure:92681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14391 +if { (eval echo configure:92985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14392  then
14393    found=yes
14394  else
14395 @@ -92719,7 +93023,7 @@
14396    unset ac_cv_lib_bind___res_nsend
14397    unset found
14398    echo $ac_n "checking for res_nsend in -lbind""... $ac_c" 1>&6
14399 -echo "configure:92723: checking for res_nsend in -lbind" >&5
14400 +echo "configure:93027: checking for res_nsend in -lbind" >&5
14401  ac_lib_var=`echo bind'_'res_nsend | sed 'y%./+-%__p_%'`
14402  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14403    echo $ac_n "(cached) $ac_c" 1>&6
14404 @@ -92727,7 +93031,7 @@
14405    ac_save_LIBS="$LIBS"
14406  LIBS="-lbind  $LIBS"
14407  cat > conftest.$ac_ext <<EOF
14408 -#line 92731 "configure"
14409 +#line 93035 "configure"
14410  #include "confdefs.h"
14411  /* Override any gcc2 internal prototype to avoid an error.  */
14412  /* We use char because int might match the return type of a gcc2
14413 @@ -92738,7 +93042,7 @@
14414  res_nsend()
14415  ; return 0; }
14416  EOF
14417 -if { (eval echo configure:92742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14418 +if { (eval echo configure:93046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14419    rm -rf conftest*
14420    eval "ac_cv_lib_$ac_lib_var=yes"
14421  else
14422 @@ -92758,7 +93062,7 @@
14423    echo "$ac_t""no" 1>&6
14424  
14425      echo $ac_n "checking for __res_nsend in -lbind""... $ac_c" 1>&6
14426 -echo "configure:92762: checking for __res_nsend in -lbind" >&5
14427 +echo "configure:93066: checking for __res_nsend in -lbind" >&5
14428  ac_lib_var=`echo bind'_'__res_nsend | sed 'y%./+-%__p_%'`
14429  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14430    echo $ac_n "(cached) $ac_c" 1>&6
14431 @@ -92766,7 +93070,7 @@
14432    ac_save_LIBS="$LIBS"
14433  LIBS="-lbind  $LIBS"
14434  cat > conftest.$ac_ext <<EOF
14435 -#line 92770 "configure"
14436 +#line 93074 "configure"
14437  #include "confdefs.h"
14438  /* Override any gcc2 internal prototype to avoid an error.  */
14439  /* We use char because int might match the return type of a gcc2
14440 @@ -92777,7 +93081,7 @@
14441  __res_nsend()
14442  ; return 0; }
14443  EOF
14444 -if { (eval echo configure:92781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14445 +if { (eval echo configure:93085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14446    rm -rf conftest*
14447    eval "ac_cv_lib_$ac_lib_var=yes"
14448  else
14449 @@ -92809,11 +93113,11 @@
14450    found=no
14451  else
14452    cat > conftest.$ac_ext <<EOF
14453 -#line 92813 "configure"
14454 +#line 93117 "configure"
14455  #include "confdefs.h"
14456  main() { return (0); }
14457  EOF
14458 -if { (eval echo configure:92817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14459 +if { (eval echo configure:93121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14460  then
14461    found=yes
14462  else
14463 @@ -92855,7 +93159,7 @@
14464    unset ac_cv_lib_socket___res_nsend
14465    unset found
14466    echo $ac_n "checking for res_nsend in -lsocket""... $ac_c" 1>&6
14467 -echo "configure:92859: checking for res_nsend in -lsocket" >&5
14468 +echo "configure:93163: checking for res_nsend in -lsocket" >&5
14469  ac_lib_var=`echo socket'_'res_nsend | sed 'y%./+-%__p_%'`
14470  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14471    echo $ac_n "(cached) $ac_c" 1>&6
14472 @@ -92863,7 +93167,7 @@
14473    ac_save_LIBS="$LIBS"
14474  LIBS="-lsocket  $LIBS"
14475  cat > conftest.$ac_ext <<EOF
14476 -#line 92867 "configure"
14477 +#line 93171 "configure"
14478  #include "confdefs.h"
14479  /* Override any gcc2 internal prototype to avoid an error.  */
14480  /* We use char because int might match the return type of a gcc2
14481 @@ -92874,7 +93178,7 @@
14482  res_nsend()
14483  ; return 0; }
14484  EOF
14485 -if { (eval echo configure:92878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14486 +if { (eval echo configure:93182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14487    rm -rf conftest*
14488    eval "ac_cv_lib_$ac_lib_var=yes"
14489  else
14490 @@ -92894,7 +93198,7 @@
14491    echo "$ac_t""no" 1>&6
14492  
14493      echo $ac_n "checking for __res_nsend in -lsocket""... $ac_c" 1>&6
14494 -echo "configure:92898: checking for __res_nsend in -lsocket" >&5
14495 +echo "configure:93202: checking for __res_nsend in -lsocket" >&5
14496  ac_lib_var=`echo socket'_'__res_nsend | sed 'y%./+-%__p_%'`
14497  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14498    echo $ac_n "(cached) $ac_c" 1>&6
14499 @@ -92902,7 +93206,7 @@
14500    ac_save_LIBS="$LIBS"
14501  LIBS="-lsocket  $LIBS"
14502  cat > conftest.$ac_ext <<EOF
14503 -#line 92906 "configure"
14504 +#line 93210 "configure"
14505  #include "confdefs.h"
14506  /* Override any gcc2 internal prototype to avoid an error.  */
14507  /* We use char because int might match the return type of a gcc2
14508 @@ -92913,7 +93217,7 @@
14509  __res_nsend()
14510  ; return 0; }
14511  EOF
14512 -if { (eval echo configure:92917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14513 +if { (eval echo configure:93221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14514    rm -rf conftest*
14515    eval "ac_cv_lib_$ac_lib_var=yes"
14516  else
14517 @@ -92945,11 +93249,11 @@
14518    found=no
14519  else
14520    cat > conftest.$ac_ext <<EOF
14521 -#line 92949 "configure"
14522 +#line 93253 "configure"
14523  #include "confdefs.h"
14524  main() { return (0); }
14525  EOF
14526 -if { (eval echo configure:92953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14527 +if { (eval echo configure:93257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14528  then
14529    found=yes
14530  else
14531 @@ -93006,12 +93310,12 @@
14532    unset found
14533    
14534    echo $ac_n "checking for dn_expand""... $ac_c" 1>&6
14535 -echo "configure:93010: checking for dn_expand" >&5
14536 +echo "configure:93314: checking for dn_expand" >&5
14537  if eval "test \"`echo '$''{'ac_cv_func_dn_expand'+set}'`\" = set"; then
14538    echo $ac_n "(cached) $ac_c" 1>&6
14539  else
14540    cat > conftest.$ac_ext <<EOF
14541 -#line 93015 "configure"
14542 +#line 93319 "configure"
14543  #include "confdefs.h"
14544  /* System header to define __stub macros and hopefully few prototypes,
14545      which can conflict with char dn_expand(); below.  */
14546 @@ -93034,7 +93338,7 @@
14547  
14548  ; return 0; }
14549  EOF
14550 -if { (eval echo configure:93038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14551 +if { (eval echo configure:93342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14552    rm -rf conftest*
14553    eval "ac_cv_func_dn_expand=yes"
14554  else
14555 @@ -93052,12 +93356,12 @@
14556  else
14557    echo "$ac_t""no" 1>&6
14558   echo $ac_n "checking for __dn_expand""... $ac_c" 1>&6
14559 -echo "configure:93056: checking for __dn_expand" >&5
14560 +echo "configure:93360: checking for __dn_expand" >&5
14561  if eval "test \"`echo '$''{'ac_cv_func___dn_expand'+set}'`\" = set"; then
14562    echo $ac_n "(cached) $ac_c" 1>&6
14563  else
14564    cat > conftest.$ac_ext <<EOF
14565 -#line 93061 "configure"
14566 +#line 93365 "configure"
14567  #include "confdefs.h"
14568  /* System header to define __stub macros and hopefully few prototypes,
14569      which can conflict with char __dn_expand(); below.  */
14570 @@ -93080,7 +93384,7 @@
14571  
14572  ; return 0; }
14573  EOF
14574 -if { (eval echo configure:93084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14575 +if { (eval echo configure:93388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14576    rm -rf conftest*
14577    eval "ac_cv_func___dn_expand=yes"
14578  else
14579 @@ -93118,7 +93422,7 @@
14580    unset ac_cv_lib_resolv___dn_expand
14581    unset found
14582    echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
14583 -echo "configure:93122: checking for dn_expand in -lresolv" >&5
14584 +echo "configure:93426: checking for dn_expand in -lresolv" >&5
14585  ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
14586  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14587    echo $ac_n "(cached) $ac_c" 1>&6
14588 @@ -93126,7 +93430,7 @@
14589    ac_save_LIBS="$LIBS"
14590  LIBS="-lresolv  $LIBS"
14591  cat > conftest.$ac_ext <<EOF
14592 -#line 93130 "configure"
14593 +#line 93434 "configure"
14594  #include "confdefs.h"
14595  /* Override any gcc2 internal prototype to avoid an error.  */
14596  /* We use char because int might match the return type of a gcc2
14597 @@ -93137,7 +93441,7 @@
14598  dn_expand()
14599  ; return 0; }
14600  EOF
14601 -if { (eval echo configure:93141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14602 +if { (eval echo configure:93445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14603    rm -rf conftest*
14604    eval "ac_cv_lib_$ac_lib_var=yes"
14605  else
14606 @@ -93157,7 +93461,7 @@
14607    echo "$ac_t""no" 1>&6
14608  
14609      echo $ac_n "checking for __dn_expand in -lresolv""... $ac_c" 1>&6
14610 -echo "configure:93161: checking for __dn_expand in -lresolv" >&5
14611 +echo "configure:93465: checking for __dn_expand in -lresolv" >&5
14612  ac_lib_var=`echo resolv'_'__dn_expand | sed 'y%./+-%__p_%'`
14613  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14614    echo $ac_n "(cached) $ac_c" 1>&6
14615 @@ -93165,7 +93469,7 @@
14616    ac_save_LIBS="$LIBS"
14617  LIBS="-lresolv  $LIBS"
14618  cat > conftest.$ac_ext <<EOF
14619 -#line 93169 "configure"
14620 +#line 93473 "configure"
14621  #include "confdefs.h"
14622  /* Override any gcc2 internal prototype to avoid an error.  */
14623  /* We use char because int might match the return type of a gcc2
14624 @@ -93176,7 +93480,7 @@
14625  __dn_expand()
14626  ; return 0; }
14627  EOF
14628 -if { (eval echo configure:93180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14629 +if { (eval echo configure:93484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14630    rm -rf conftest*
14631    eval "ac_cv_lib_$ac_lib_var=yes"
14632  else
14633 @@ -93208,11 +93512,11 @@
14634    found=no
14635  else
14636    cat > conftest.$ac_ext <<EOF
14637 -#line 93212 "configure"
14638 +#line 93516 "configure"
14639  #include "confdefs.h"
14640  main() { return (0); }
14641  EOF
14642 -if { (eval echo configure:93216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14643 +if { (eval echo configure:93520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14644  then
14645    found=yes
14646  else
14647 @@ -93254,7 +93558,7 @@
14648    unset ac_cv_lib_bind___dn_expand
14649    unset found
14650    echo $ac_n "checking for dn_expand in -lbind""... $ac_c" 1>&6
14651 -echo "configure:93258: checking for dn_expand in -lbind" >&5
14652 +echo "configure:93562: checking for dn_expand in -lbind" >&5
14653  ac_lib_var=`echo bind'_'dn_expand | sed 'y%./+-%__p_%'`
14654  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14655    echo $ac_n "(cached) $ac_c" 1>&6
14656 @@ -93262,7 +93566,7 @@
14657    ac_save_LIBS="$LIBS"
14658  LIBS="-lbind  $LIBS"
14659  cat > conftest.$ac_ext <<EOF
14660 -#line 93266 "configure"
14661 +#line 93570 "configure"
14662  #include "confdefs.h"
14663  /* Override any gcc2 internal prototype to avoid an error.  */
14664  /* We use char because int might match the return type of a gcc2
14665 @@ -93273,7 +93577,7 @@
14666  dn_expand()
14667  ; return 0; }
14668  EOF
14669 -if { (eval echo configure:93277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14670 +if { (eval echo configure:93581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14671    rm -rf conftest*
14672    eval "ac_cv_lib_$ac_lib_var=yes"
14673  else
14674 @@ -93293,7 +93597,7 @@
14675    echo "$ac_t""no" 1>&6
14676  
14677      echo $ac_n "checking for __dn_expand in -lbind""... $ac_c" 1>&6
14678 -echo "configure:93297: checking for __dn_expand in -lbind" >&5
14679 +echo "configure:93601: checking for __dn_expand in -lbind" >&5
14680  ac_lib_var=`echo bind'_'__dn_expand | sed 'y%./+-%__p_%'`
14681  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14682    echo $ac_n "(cached) $ac_c" 1>&6
14683 @@ -93301,7 +93605,7 @@
14684    ac_save_LIBS="$LIBS"
14685  LIBS="-lbind  $LIBS"
14686  cat > conftest.$ac_ext <<EOF
14687 -#line 93305 "configure"
14688 +#line 93609 "configure"
14689  #include "confdefs.h"
14690  /* Override any gcc2 internal prototype to avoid an error.  */
14691  /* We use char because int might match the return type of a gcc2
14692 @@ -93312,7 +93616,7 @@
14693  __dn_expand()
14694  ; return 0; }
14695  EOF
14696 -if { (eval echo configure:93316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14697 +if { (eval echo configure:93620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14698    rm -rf conftest*
14699    eval "ac_cv_lib_$ac_lib_var=yes"
14700  else
14701 @@ -93344,11 +93648,11 @@
14702    found=no
14703  else
14704    cat > conftest.$ac_ext <<EOF
14705 -#line 93348 "configure"
14706 +#line 93652 "configure"
14707  #include "confdefs.h"
14708  main() { return (0); }
14709  EOF
14710 -if { (eval echo configure:93352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14711 +if { (eval echo configure:93656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14712  then
14713    found=yes
14714  else
14715 @@ -93390,7 +93694,7 @@
14716    unset ac_cv_lib_socket___dn_expand
14717    unset found
14718    echo $ac_n "checking for dn_expand in -lsocket""... $ac_c" 1>&6
14719 -echo "configure:93394: checking for dn_expand in -lsocket" >&5
14720 +echo "configure:93698: checking for dn_expand in -lsocket" >&5
14721  ac_lib_var=`echo socket'_'dn_expand | sed 'y%./+-%__p_%'`
14722  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14723    echo $ac_n "(cached) $ac_c" 1>&6
14724 @@ -93398,7 +93702,7 @@
14725    ac_save_LIBS="$LIBS"
14726  LIBS="-lsocket  $LIBS"
14727  cat > conftest.$ac_ext <<EOF
14728 -#line 93402 "configure"
14729 +#line 93706 "configure"
14730  #include "confdefs.h"
14731  /* Override any gcc2 internal prototype to avoid an error.  */
14732  /* We use char because int might match the return type of a gcc2
14733 @@ -93409,7 +93713,7 @@
14734  dn_expand()
14735  ; return 0; }
14736  EOF
14737 -if { (eval echo configure:93413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14738 +if { (eval echo configure:93717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14739    rm -rf conftest*
14740    eval "ac_cv_lib_$ac_lib_var=yes"
14741  else
14742 @@ -93429,7 +93733,7 @@
14743    echo "$ac_t""no" 1>&6
14744  
14745      echo $ac_n "checking for __dn_expand in -lsocket""... $ac_c" 1>&6
14746 -echo "configure:93433: checking for __dn_expand in -lsocket" >&5
14747 +echo "configure:93737: checking for __dn_expand in -lsocket" >&5
14748  ac_lib_var=`echo socket'_'__dn_expand | sed 'y%./+-%__p_%'`
14749  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14750    echo $ac_n "(cached) $ac_c" 1>&6
14751 @@ -93437,7 +93741,7 @@
14752    ac_save_LIBS="$LIBS"
14753  LIBS="-lsocket  $LIBS"
14754  cat > conftest.$ac_ext <<EOF
14755 -#line 93441 "configure"
14756 +#line 93745 "configure"
14757  #include "confdefs.h"
14758  /* Override any gcc2 internal prototype to avoid an error.  */
14759  /* We use char because int might match the return type of a gcc2
14760 @@ -93448,7 +93752,7 @@
14761  __dn_expand()
14762  ; return 0; }
14763  EOF
14764 -if { (eval echo configure:93452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14765 +if { (eval echo configure:93756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14766    rm -rf conftest*
14767    eval "ac_cv_lib_$ac_lib_var=yes"
14768  else
14769 @@ -93480,11 +93784,11 @@
14770    found=no
14771  else
14772    cat > conftest.$ac_ext <<EOF
14773 -#line 93484 "configure"
14774 +#line 93788 "configure"
14775  #include "confdefs.h"
14776  main() { return (0); }
14777  EOF
14778 -if { (eval echo configure:93488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14779 +if { (eval echo configure:93792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14780  then
14781    found=yes
14782  else
14783 @@ -93537,7 +93841,7 @@
14784  
14785  
14786  echo $ac_n "checking whether atof() accepts NAN""... $ac_c" 1>&6
14787 -echo "configure:93541: checking whether atof() accepts NAN" >&5
14788 +echo "configure:93845: checking whether atof() accepts NAN" >&5
14789  if eval "test \"`echo '$''{'ac_cv_atof_accept_nan'+set}'`\" = set"; then
14790    echo $ac_n "(cached) $ac_c" 1>&6
14791  else
14792 @@ -93548,7 +93852,7 @@
14793  
14794  else
14795    cat > conftest.$ac_ext <<EOF
14796 -#line 93552 "configure"
14797 +#line 93856 "configure"
14798  #include "confdefs.h"
14799  
14800  #include <math.h>
14801 @@ -93568,7 +93872,7 @@
14802  }
14803  
14804  EOF
14805 -if { (eval echo configure:93572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14806 +if { (eval echo configure:93876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14807  then
14808    
14809    ac_cv_atof_accept_nan=yes
14810 @@ -93595,7 +93899,7 @@
14811  fi
14812  
14813  echo $ac_n "checking whether atof() accepts INF""... $ac_c" 1>&6
14814 -echo "configure:93599: checking whether atof() accepts INF" >&5
14815 +echo "configure:93903: checking whether atof() accepts INF" >&5
14816  if eval "test \"`echo '$''{'ac_cv_atof_accept_inf'+set}'`\" = set"; then
14817    echo $ac_n "(cached) $ac_c" 1>&6
14818  else
14819 @@ -93606,7 +93910,7 @@
14820  
14821  else
14822    cat > conftest.$ac_ext <<EOF
14823 -#line 93610 "configure"
14824 +#line 93914 "configure"
14825  #include "confdefs.h"
14826  
14827  #include <math.h>
14828 @@ -93629,7 +93933,7 @@
14829  }
14830  
14831  EOF
14832 -if { (eval echo configure:93633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14833 +if { (eval echo configure:93937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14834  then
14835    
14836    ac_cv_atof_accept_inf=yes
14837 @@ -93656,7 +93960,7 @@
14838  fi
14839  
14840  echo $ac_n "checking whether HUGE_VAL == INF""... $ac_c" 1>&6
14841 -echo "configure:93660: checking whether HUGE_VAL == INF" >&5
14842 +echo "configure:93964: checking whether HUGE_VAL == INF" >&5
14843  if eval "test \"`echo '$''{'ac_cv_huge_val_inf'+set}'`\" = set"; then
14844    echo $ac_n "(cached) $ac_c" 1>&6
14845  else
14846 @@ -93667,7 +93971,7 @@
14847  
14848  else
14849    cat > conftest.$ac_ext <<EOF
14850 -#line 93671 "configure"
14851 +#line 93975 "configure"
14852  #include "confdefs.h"
14853  
14854  #include <math.h>
14855 @@ -93690,7 +93994,7 @@
14856  }
14857  
14858  EOF
14859 -if { (eval echo configure:93694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14860 +if { (eval echo configure:93998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14861  then
14862    
14863    ac_cv_huge_val_inf=yes
14864 @@ -93717,7 +94021,7 @@
14865  fi
14866  
14867  echo $ac_n "checking whether HUGE_VAL + -HUGEVAL == NAN""... $ac_c" 1>&6
14868 -echo "configure:93721: checking whether HUGE_VAL + -HUGEVAL == NAN" >&5
14869 +echo "configure:94025: checking whether HUGE_VAL + -HUGEVAL == NAN" >&5
14870  if eval "test \"`echo '$''{'ac_cv_huge_val_nan'+set}'`\" = set"; then
14871    echo $ac_n "(cached) $ac_c" 1>&6
14872  else
14873 @@ -93728,7 +94032,7 @@
14874  
14875  else
14876    cat > conftest.$ac_ext <<EOF
14877 -#line 93732 "configure"
14878 +#line 94036 "configure"
14879  #include "confdefs.h"
14880  
14881  #include <math.h>
14882 @@ -93753,7 +94057,7 @@
14883  }
14884  
14885  EOF
14886 -if { (eval echo configure:93757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14887 +if { (eval echo configure:94061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14888  then
14889    
14890    ac_cv_huge_val_nan=yes
14891 @@ -93780,13 +94084,13 @@
14892  fi
14893  
14894  echo $ac_n "checking whether strptime() declaration fails""... $ac_c" 1>&6
14895 -echo "configure:93784: checking whether strptime() declaration fails" >&5
14896 +echo "configure:94088: checking whether strptime() declaration fails" >&5
14897  if eval "test \"`echo '$''{'ac_cv_strptime_decl_fails'+set}'`\" = set"; then
14898    echo $ac_n "(cached) $ac_c" 1>&6
14899  else
14900    
14901  cat > conftest.$ac_ext <<EOF
14902 -#line 93790 "configure"
14903 +#line 94094 "configure"
14904  #include "confdefs.h"
14905  
14906  #include <time.h>
14907 @@ -93802,7 +94106,7 @@
14908  
14909  ; return 0; }
14910  EOF
14911 -if { (eval echo configure:93806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14912 +if { (eval echo configure:94110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14913    rm -rf conftest*
14914    
14915    ac_cv_strptime_decl_fails=no
14916 @@ -93830,17 +94134,17 @@
14917  do
14918  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14919  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14920 -echo "configure:93834: checking for $ac_hdr" >&5
14921 +echo "configure:94138: checking for $ac_hdr" >&5
14922  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
14923    echo $ac_n "(cached) $ac_c" 1>&6
14924  else
14925    cat > conftest.$ac_ext <<EOF
14926 -#line 93839 "configure"
14927 +#line 94143 "configure"
14928  #include "confdefs.h"
14929  #include <$ac_hdr>
14930  EOF
14931  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14932 -{ (eval echo configure:93844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14933 +{ (eval echo configure:94148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14934  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14935  if test -z "$ac_err"; then
14936    rm -rf conftest*
14937 @@ -93869,12 +94173,12 @@
14938  for ac_func in mblen
14939  do
14940  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14941 -echo "configure:93873: checking for $ac_func" >&5
14942 +echo "configure:94177: checking for $ac_func" >&5
14943  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14944    echo $ac_n "(cached) $ac_c" 1>&6
14945  else
14946    cat > conftest.$ac_ext <<EOF
14947 -#line 93878 "configure"
14948 +#line 94182 "configure"
14949  #include "confdefs.h"
14950  /* System header to define __stub macros and hopefully few prototypes,
14951      which can conflict with char $ac_func(); below.  */
14952 @@ -93897,7 +94201,7 @@
14953  
14954  ; return 0; }
14955  EOF
14956 -if { (eval echo configure:93901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14957 +if { (eval echo configure:94205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14958    rm -rf conftest*
14959    eval "ac_cv_func_$ac_func=yes"
14960  else
14961 @@ -93924,12 +94228,12 @@
14962  for ac_func in mbrlen mbsinit
14963  do
14964  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14965 -echo "configure:93928: checking for $ac_func" >&5
14966 +echo "configure:94232: checking for $ac_func" >&5
14967  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
14968    echo $ac_n "(cached) $ac_c" 1>&6
14969  else
14970    cat > conftest.$ac_ext <<EOF
14971 -#line 93933 "configure"
14972 +#line 94237 "configure"
14973  #include "confdefs.h"
14974  /* System header to define __stub macros and hopefully few prototypes,
14975      which can conflict with char $ac_func(); below.  */
14976 @@ -93952,7 +94256,7 @@
14977  
14978  ; return 0; }
14979  EOF
14980 -if { (eval echo configure:93956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14981 +if { (eval echo configure:94260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14982    rm -rf conftest*
14983    eval "ac_cv_func_$ac_func=yes"
14984  else
14985 @@ -93977,13 +94281,13 @@
14986  done
14987  
14988  echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
14989 -echo "configure:93981: checking for mbstate_t" >&5
14990 +echo "configure:94285: checking for mbstate_t" >&5
14991  if eval "test \"`echo '$''{'ac_cv_type_mbstate_t'+set}'`\" = set"; then
14992    echo $ac_n "(cached) $ac_c" 1>&6
14993  else
14994    
14995  cat > conftest.$ac_ext <<EOF
14996 -#line 93987 "configure"
14997 +#line 94291 "configure"
14998  #include "confdefs.h"
14999  
15000  #ifdef HAVE_WCHAR_H
15001 @@ -93996,7 +94300,7 @@
15002  
15003  ; return 0; }
15004  EOF
15005 -if { (eval echo configure:94000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15006 +if { (eval echo configure:94304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15007    rm -rf conftest*
15008    
15009    ac_cv_type_mbstate_t=yes
15010 @@ -94372,7 +94676,7 @@
15011  php_with_sybase=no
15012  
15013  echo $ac_n "checking for Sybase support""... $ac_c" 1>&6
15014 -echo "configure:94376: checking for Sybase support" >&5
15015 +echo "configure:94680: checking for Sybase support" >&5
15016  # Check whether --with-sybase or --without-sybase was given.
15017  if test "${with_sybase+set}" = set; then
15018    withval="$with_sybase"
15019 @@ -94833,7 +95137,7 @@
15020    fi
15021  
15022    echo $ac_n "checking for dnet_addr in -ldnet_stub""... $ac_c" 1>&6
15023 -echo "configure:94837: checking for dnet_addr in -ldnet_stub" >&5
15024 +echo "configure:95141: checking for dnet_addr in -ldnet_stub" >&5
15025  ac_lib_var=`echo dnet_stub'_'dnet_addr | sed 'y%./+-%__p_%'`
15026  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
15027    echo $ac_n "(cached) $ac_c" 1>&6
15028 @@ -94841,7 +95145,7 @@
15029    ac_save_LIBS="$LIBS"
15030  LIBS="-ldnet_stub  $LIBS"
15031  cat > conftest.$ac_ext <<EOF
15032 -#line 94845 "configure"
15033 +#line 95149 "configure"
15034  #include "confdefs.h"
15035  /* Override any gcc2 internal prototype to avoid an error.  */
15036  /* We use char because int might match the return type of a gcc2
15037 @@ -94852,7 +95156,7 @@
15038  dnet_addr()
15039  ; return 0; }
15040  EOF
15041 -if { (eval echo configure:94856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15042 +if { (eval echo configure:95160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15043    rm -rf conftest*
15044    eval "ac_cv_lib_$ac_lib_var=yes"
15045  else
15046 @@ -94978,7 +95282,7 @@
15047  EOF
15048  
15049    echo $ac_n "checking for tdsdbopen in -lsybdb""... $ac_c" 1>&6
15050 -echo "configure:94982: checking for tdsdbopen in -lsybdb" >&5
15051 +echo "configure:95286: checking for tdsdbopen in -lsybdb" >&5
15052  ac_lib_var=`echo sybdb'_'tdsdbopen | sed 'y%./+-%__p_%'`
15053  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
15054    echo $ac_n "(cached) $ac_c" 1>&6
15055 @@ -94986,7 +95290,7 @@
15056    ac_save_LIBS="$LIBS"
15057  LIBS="-lsybdb  $LIBS"
15058  cat > conftest.$ac_ext <<EOF
15059 -#line 94990 "configure"
15060 +#line 95294 "configure"
15061  #include "confdefs.h"
15062  /* Override any gcc2 internal prototype to avoid an error.  */
15063  /* We use char because int might match the return type of a gcc2
15064 @@ -94997,7 +95301,7 @@
15065  tdsdbopen()
15066  ; return 0; }
15067  EOF
15068 -if { (eval echo configure:95001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15069 +if { (eval echo configure:95305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15070    rm -rf conftest*
15071    eval "ac_cv_lib_$ac_lib_var=yes"
15072  else
15073 @@ -95039,7 +95343,7 @@
15074  php_with_sybase_ct=no
15075  
15076  echo $ac_n "checking for Sybase-CT support""... $ac_c" 1>&6
15077 -echo "configure:95043: checking for Sybase-CT support" >&5
15078 +echo "configure:95347: checking for Sybase-CT support" >&5
15079  # Check whether --with-sybase-ct or --without-sybase-ct was given.
15080  if test "${with_sybase_ct+set}" = set; then
15081    withval="$with_sybase_ct"
15082 @@ -95678,7 +95982,7 @@
15083    done
15084  
15085    echo $ac_n "checking for netg_errstr in -ltcl""... $ac_c" 1>&6
15086 -echo "configure:95682: checking for netg_errstr in -ltcl" >&5
15087 +echo "configure:95986: checking for netg_errstr in -ltcl" >&5
15088  ac_lib_var=`echo tcl'_'netg_errstr | sed 'y%./+-%__p_%'`
15089  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
15090    echo $ac_n "(cached) $ac_c" 1>&6
15091 @@ -95686,7 +95990,7 @@
15092    ac_save_LIBS="$LIBS"
15093  LIBS="-ltcl  $LIBS"
15094  cat > conftest.$ac_ext <<EOF
15095 -#line 95690 "configure"
15096 +#line 95994 "configure"
15097  #include "confdefs.h"
15098  /* Override any gcc2 internal prototype to avoid an error.  */
15099  /* We use char because int might match the return type of a gcc2
15100 @@ -95697,7 +96001,7 @@
15101  netg_errstr()
15102  ; return 0; }
15103  EOF
15104 -if { (eval echo configure:95701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15105 +if { (eval echo configure:96005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15106    rm -rf conftest*
15107    eval "ac_cv_lib_$ac_lib_var=yes"
15108  else
15109 @@ -95872,7 +96176,7 @@
15110    done
15111  
15112    echo $ac_n "checking for insck__getVdate in -linsck""... $ac_c" 1>&6
15113 -echo "configure:95876: checking for insck__getVdate in -linsck" >&5
15114 +echo "configure:96180: checking for insck__getVdate in -linsck" >&5
15115  ac_lib_var=`echo insck'_'insck__getVdate | sed 'y%./+-%__p_%'`
15116  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
15117    echo $ac_n "(cached) $ac_c" 1>&6
15118 @@ -95880,7 +96184,7 @@
15119    ac_save_LIBS="$LIBS"
15120  LIBS="-linsck  $LIBS"
15121  cat > conftest.$ac_ext <<EOF
15122 -#line 95884 "configure"
15123 +#line 96188 "configure"
15124  #include "confdefs.h"
15125  /* Override any gcc2 internal prototype to avoid an error.  */
15126  /* We use char because int might match the return type of a gcc2
15127 @@ -95891,7 +96195,7 @@
15128  insck__getVdate()
15129  ; return 0; }
15130  EOF
15131 -if { (eval echo configure:95895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15132 +if { (eval echo configure:96199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15133    rm -rf conftest*
15134    eval "ac_cv_lib_$ac_lib_var=yes"
15135  else
15136 @@ -96039,7 +96343,7 @@
15137    done
15138  
15139    echo $ac_n "checking for bsd_tcp in -linsck""... $ac_c" 1>&6
15140 -echo "configure:96043: checking for bsd_tcp in -linsck" >&5
15141 +echo "configure:96347: checking for bsd_tcp in -linsck" >&5
15142  ac_lib_var=`echo insck'_'bsd_tcp | sed 'y%./+-%__p_%'`
15143  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
15144    echo $ac_n "(cached) $ac_c" 1>&6
15145 @@ -96047,7 +96351,7 @@
15146    ac_save_LIBS="$LIBS"
15147  LIBS="-linsck  $LIBS"
15148  cat > conftest.$ac_ext <<EOF
15149 -#line 96051 "configure"
15150 +#line 96355 "configure"
15151  #include "confdefs.h"
15152  /* Override any gcc2 internal prototype to avoid an error.  */
15153  /* We use char because int might match the return type of a gcc2
15154 @@ -96058,7 +96362,7 @@
15155  bsd_tcp()
15156  ; return 0; }
15157  EOF
15158 -if { (eval echo configure:96062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15159 +if { (eval echo configure:96366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15160    rm -rf conftest*
15161    eval "ac_cv_lib_$ac_lib_var=yes"
15162  else
15163 @@ -96118,7 +96422,7 @@
15164  php_enable_sysvmsg=no
15165  
15166  echo $ac_n "checking whether to enable System V IPC support""... $ac_c" 1>&6
15167 -echo "configure:96122: checking whether to enable System V IPC support" >&5
15168 +echo "configure:96426: checking whether to enable System V IPC support" >&5
15169  # Check whether --enable-sysvmsg or --disable-sysvmsg was given.
15170  if test "${enable_sysvmsg+set}" = set; then
15171    enableval="$enable_sysvmsg"
15172 @@ -96164,17 +96468,17 @@
15173  if test "$PHP_SYSVMSG" != "no"; then
15174    ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
15175  echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
15176 -echo "configure:96168: checking for sys/msg.h" >&5
15177 +echo "configure:96472: checking for sys/msg.h" >&5
15178  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
15179    echo $ac_n "(cached) $ac_c" 1>&6
15180  else
15181    cat > conftest.$ac_ext <<EOF
15182 -#line 96173 "configure"
15183 +#line 96477 "configure"
15184  #include "confdefs.h"
15185  #include <sys/msg.h>
15186  EOF
15187  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15188 -{ (eval echo configure:96178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15189 +{ (eval echo configure:96482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15190  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15191  if test -z "$ac_err"; then
15192    rm -rf conftest*
15193 @@ -96490,7 +96794,7 @@
15194  php_enable_sysvsem=no
15195  
15196  echo $ac_n "checking whether to enable System V semaphore support""... $ac_c" 1>&6
15197 -echo "configure:96494: checking whether to enable System V semaphore support" >&5
15198 +echo "configure:96798: checking whether to enable System V semaphore support" >&5
15199  # Check whether --enable-sysvsem or --disable-sysvsem was given.
15200  if test "${enable_sysvsem+set}" = set; then
15201    enableval="$enable_sysvsem"
15202 @@ -96820,12 +97124,12 @@
15203  EOF
15204  
15205   echo $ac_n "checking for union semun""... $ac_c" 1>&6
15206 -echo "configure:96824: checking for union semun" >&5
15207 +echo "configure:97128: checking for union semun" >&5
15208  if eval "test \"`echo '$''{'php_cv_semun'+set}'`\" = set"; then
15209    echo $ac_n "(cached) $ac_c" 1>&6
15210  else
15211    cat > conftest.$ac_ext <<EOF
15212 -#line 96829 "configure"
15213 +#line 97133 "configure"
15214  #include "confdefs.h"
15215  
15216  #include <sys/types.h>
15217 @@ -96836,7 +97140,7 @@
15218  union semun x;
15219  ; return 0; }
15220  EOF
15221 -if { (eval echo configure:96840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15222 +if { (eval echo configure:97144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15223    rm -rf conftest*
15224    
15225       php_cv_semun=yes
15226 @@ -96872,7 +97176,7 @@
15227  php_enable_sysvshm=no
15228  
15229  echo $ac_n "checking whether to enable System V shared memory support""... $ac_c" 1>&6
15230 -echo "configure:96876: checking whether to enable System V shared memory support" >&5
15231 +echo "configure:97180: checking whether to enable System V shared memory support" >&5
15232  # Check whether --enable-sysvshm or --disable-sysvshm was given.
15233  if test "${enable_sysvshm+set}" = set; then
15234    enableval="$enable_sysvshm"
15235 @@ -97208,7 +97512,7 @@
15236  php_with_tidy=no
15237  
15238  echo $ac_n "checking for TIDY support""... $ac_c" 1>&6
15239 -echo "configure:97212: checking for TIDY support" >&5
15240 +echo "configure:97516: checking for TIDY support" >&5
15241  # Check whether --with-tidy or --without-tidy was given.
15242  if test "${with_tidy+set}" = set; then
15243    withval="$with_tidy"
15244 @@ -97500,7 +97804,7 @@
15245    done
15246  
15247    echo $ac_n "checking for tidyOptGetDoc in -ltidy""... $ac_c" 1>&6
15248 -echo "configure:97504: checking for tidyOptGetDoc in -ltidy" >&5
15249 +echo "configure:97808: checking for tidyOptGetDoc in -ltidy" >&5
15250  ac_lib_var=`echo tidy'_'tidyOptGetDoc | sed 'y%./+-%__p_%'`
15251  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
15252    echo $ac_n "(cached) $ac_c" 1>&6
15253 @@ -97508,7 +97812,7 @@
15254    ac_save_LIBS="$LIBS"
15255  LIBS="-ltidy  $LIBS"
15256  cat > conftest.$ac_ext <<EOF
15257 -#line 97512 "configure"
15258 +#line 97816 "configure"
15259  #include "confdefs.h"
15260  /* Override any gcc2 internal prototype to avoid an error.  */
15261  /* We use char because int might match the return type of a gcc2
15262 @@ -97519,7 +97823,7 @@
15263  tidyOptGetDoc()
15264  ; return 0; }
15265  EOF
15266 -if { (eval echo configure:97523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15267 +if { (eval echo configure:97827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15268    rm -rf conftest*
15269    eval "ac_cv_lib_$ac_lib_var=yes"
15270  else
15271 @@ -97852,7 +98156,7 @@
15272  php_enable_tokenizer=yes
15273  
15274  echo $ac_n "checking whether to enable tokenizer support""... $ac_c" 1>&6
15275 -echo "configure:97856: checking whether to enable tokenizer support" >&5
15276 +echo "configure:98160: checking whether to enable tokenizer support" >&5
15277  # Check whether --enable-tokenizer or --disable-tokenizer was given.
15278  if test "${enable_tokenizer+set}" = set; then
15279    enableval="$enable_tokenizer"
15280 @@ -98190,7 +98494,7 @@
15281  php_enable_wddx=no
15282  
15283  echo $ac_n "checking whether to enable WDDX support""... $ac_c" 1>&6
15284 -echo "configure:98194: checking whether to enable WDDX support" >&5
15285 +echo "configure:98498: checking whether to enable WDDX support" >&5
15286  # Check whether --enable-wddx or --disable-wddx was given.
15287  if test "${enable_wddx+set}" = set; then
15288    enableval="$enable_wddx"
15289 @@ -98238,7 +98542,7 @@
15290  php_with_libxml_dir=no
15291  
15292  echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
15293 -echo "configure:98242: checking libxml2 install dir" >&5
15294 +echo "configure:98546: checking libxml2 install dir" >&5
15295  # Check whether --with-libxml-dir or --without-libxml-dir was given.
15296  if test "${with_libxml_dir+set}" = set; then
15297    withval="$with_libxml_dir"
15298 @@ -98265,7 +98569,7 @@
15299  php_with_libexpat_dir=no
15300  
15301  echo $ac_n "checking libexpat dir for WDDX""... $ac_c" 1>&6
15302 -echo "configure:98269: checking libexpat dir for WDDX" >&5
15303 +echo "configure:98573: checking libexpat dir for WDDX" >&5
15304  # Check whether --with-libexpat-dir or --without-libexpat-dir was given.
15305  if test "${with_libexpat_dir+set}" = set; then
15306    withval="$with_libexpat_dir"
15307 @@ -98296,7 +98600,7 @@
15308  
15309      
15310  echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
15311 -echo "configure:98300: checking for xml2-config path" >&5
15312 +echo "configure:98604: checking for xml2-config path" >&5
15313  if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
15314    echo $ac_n "(cached) $ac_c" 1>&6
15315  else
15316 @@ -98454,7 +98758,7 @@
15317  
15318  
15319              echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
15320 -echo "configure:98458: checking whether libxml build works" >&5
15321 +echo "configure:98762: checking whether libxml build works" >&5
15322  if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
15323    echo $ac_n "(cached) $ac_c" 1>&6
15324  else
15325 @@ -98470,7 +98774,7 @@
15326    
15327  else
15328    cat > conftest.$ac_ext <<EOF
15329 -#line 98474 "configure"
15330 +#line 98778 "configure"
15331  #include "confdefs.h"
15332  
15333      
15334 @@ -98481,7 +98785,7 @@
15335      }
15336    
15337  EOF
15338 -if { (eval echo configure:98485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15339 +if { (eval echo configure:98789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15340  then
15341    
15342      LIBS=$old_LIBS
15343 @@ -99037,7 +99341,7 @@
15344  php_enable_xml=yes
15345  
15346  echo $ac_n "checking whether to enable XML support""... $ac_c" 1>&6
15347 -echo "configure:99041: checking whether to enable XML support" >&5
15348 +echo "configure:99345: checking whether to enable XML support" >&5
15349  # Check whether --enable-xml or --disable-xml was given.
15350  if test "${enable_xml+set}" = set; then
15351    enableval="$enable_xml"
15352 @@ -99085,7 +99389,7 @@
15353  php_with_libxml_dir=no
15354  
15355  echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
15356 -echo "configure:99089: checking libxml2 install dir" >&5
15357 +echo "configure:99393: checking libxml2 install dir" >&5
15358  # Check whether --with-libxml-dir or --without-libxml-dir was given.
15359  if test "${with_libxml_dir+set}" = set; then
15360    withval="$with_libxml_dir"
15361 @@ -99112,7 +99416,7 @@
15362  php_with_libexpat_dir=no
15363  
15364  echo $ac_n "checking libexpat install dir""... $ac_c" 1>&6
15365 -echo "configure:99116: checking libexpat install dir" >&5
15366 +echo "configure:99420: checking libexpat install dir" >&5
15367  # Check whether --with-libexpat-dir or --without-libexpat-dir was given.
15368  if test "${with_libexpat_dir+set}" = set; then
15369    withval="$with_libexpat_dir"
15370 @@ -99144,7 +99448,7 @@
15371  
15372      
15373  echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
15374 -echo "configure:99148: checking for xml2-config path" >&5
15375 +echo "configure:99452: checking for xml2-config path" >&5
15376  if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
15377    echo $ac_n "(cached) $ac_c" 1>&6
15378  else
15379 @@ -99302,7 +99606,7 @@
15380  
15381  
15382              echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
15383 -echo "configure:99306: checking whether libxml build works" >&5
15384 +echo "configure:99610: checking whether libxml build works" >&5
15385  if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
15386    echo $ac_n "(cached) $ac_c" 1>&6
15387  else
15388 @@ -99318,7 +99622,7 @@
15389    
15390  else
15391    cat > conftest.$ac_ext <<EOF
15392 -#line 99322 "configure"
15393 +#line 99626 "configure"
15394  #include "confdefs.h"
15395  
15396      
15397 @@ -99329,7 +99633,7 @@
15398      }
15399    
15400  EOF
15401 -if { (eval echo configure:99333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15402 +if { (eval echo configure:99637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15403  then
15404    
15405      LIBS=$old_LIBS
15406 @@ -99854,7 +100158,7 @@
15407  php_enable_xmlreader=yes
15408  
15409  echo $ac_n "checking whether to enable XMLReader support""... $ac_c" 1>&6
15410 -echo "configure:99858: checking whether to enable XMLReader support" >&5
15411 +echo "configure:100162: checking whether to enable XMLReader support" >&5
15412  # Check whether --enable-xmlreader or --disable-xmlreader was given.
15413  if test "${enable_xmlreader+set}" = set; then
15414    enableval="$enable_xmlreader"
15415 @@ -99902,7 +100206,7 @@
15416  php_with_libxml_dir=no
15417  
15418  echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
15419 -echo "configure:99906: checking libxml2 install dir" >&5
15420 +echo "configure:100210: checking libxml2 install dir" >&5
15421  # Check whether --with-libxml-dir or --without-libxml-dir was given.
15422  if test "${with_libxml_dir+set}" = set; then
15423    withval="$with_libxml_dir"
15424 @@ -99933,7 +100237,7 @@
15425  
15426    
15427  echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
15428 -echo "configure:99937: checking for xml2-config path" >&5
15429 +echo "configure:100241: checking for xml2-config path" >&5
15430  if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
15431    echo $ac_n "(cached) $ac_c" 1>&6
15432  else
15433 @@ -100091,7 +100395,7 @@
15434  
15435  
15436              echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
15437 -echo "configure:100095: checking whether libxml build works" >&5
15438 +echo "configure:100399: checking whether libxml build works" >&5
15439  if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
15440    echo $ac_n "(cached) $ac_c" 1>&6
15441  else
15442 @@ -100107,7 +100411,7 @@
15443    
15444  else
15445    cat > conftest.$ac_ext <<EOF
15446 -#line 100111 "configure"
15447 +#line 100415 "configure"
15448  #include "confdefs.h"
15449  
15450      
15451 @@ -100118,7 +100422,7 @@
15452      }
15453    
15454  EOF
15455 -if { (eval echo configure:100122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15456 +if { (eval echo configure:100426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15457  then
15458    
15459      LIBS=$old_LIBS
15460 @@ -100489,7 +100793,7 @@
15461  php_with_xmlrpc=no
15462  
15463  echo $ac_n "checking for XMLRPC-EPI support""... $ac_c" 1>&6
15464 -echo "configure:100493: checking for XMLRPC-EPI support" >&5
15465 +echo "configure:100797: checking for XMLRPC-EPI support" >&5
15466  # Check whether --with-xmlrpc or --without-xmlrpc was given.
15467  if test "${with_xmlrpc+set}" = set; then
15468    withval="$with_xmlrpc"
15469 @@ -100537,7 +100841,7 @@
15470  php_with_libxml_dir=no
15471  
15472  echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
15473 -echo "configure:100541: checking libxml2 install dir" >&5
15474 +echo "configure:100845: checking libxml2 install dir" >&5
15475  # Check whether --with-libxml-dir or --without-libxml-dir was given.
15476  if test "${with_libxml_dir+set}" = set; then
15477    withval="$with_libxml_dir"
15478 @@ -100564,7 +100868,7 @@
15479  php_with_libexpat_dir=no
15480  
15481  echo $ac_n "checking libexpat dir for XMLRPC-EPI""... $ac_c" 1>&6
15482 -echo "configure:100568: checking libexpat dir for XMLRPC-EPI" >&5
15483 +echo "configure:100872: checking libexpat dir for XMLRPC-EPI" >&5
15484  # Check whether --with-libexpat-dir or --without-libexpat-dir was given.
15485  if test "${with_libexpat_dir+set}" = set; then
15486    withval="$with_libexpat_dir"
15487 @@ -100590,7 +100894,7 @@
15488  php_with_iconv_dir=no
15489  
15490  echo $ac_n "checking iconv dir for XMLRPC-EPI""... $ac_c" 1>&6
15491 -echo "configure:100594: checking iconv dir for XMLRPC-EPI" >&5
15492 +echo "configure:100898: checking iconv dir for XMLRPC-EPI" >&5
15493  # Check whether --with-iconv-dir or --without-iconv-dir was given.
15494  if test "${with_iconv_dir+set}" = set; then
15495    withval="$with_iconv_dir"
15496 @@ -100649,7 +100953,7 @@
15497  
15498      
15499  echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
15500 -echo "configure:100653: checking for xml2-config path" >&5
15501 +echo "configure:100957: checking for xml2-config path" >&5
15502  if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
15503    echo $ac_n "(cached) $ac_c" 1>&6
15504  else
15505 @@ -100807,7 +101111,7 @@
15506  
15507  
15508              echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
15509 -echo "configure:100811: checking whether libxml build works" >&5
15510 +echo "configure:101115: checking whether libxml build works" >&5
15511  if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
15512    echo $ac_n "(cached) $ac_c" 1>&6
15513  else
15514 @@ -100823,7 +101127,7 @@
15515    
15516  else
15517    cat > conftest.$ac_ext <<EOF
15518 -#line 100827 "configure"
15519 +#line 101131 "configure"
15520  #include "confdefs.h"
15521  
15522      
15523 @@ -100834,7 +101138,7 @@
15524      }
15525    
15526  EOF
15527 -if { (eval echo configure:100838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15528 +if { (eval echo configure:101142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15529  then
15530    
15531      LIBS=$old_LIBS
15532 @@ -101099,12 +101403,12 @@
15533  
15534          if test "$PHP_ICONV" = "yes"; then
15535      echo $ac_n "checking for iconv""... $ac_c" 1>&6
15536 -echo "configure:101103: checking for iconv" >&5
15537 +echo "configure:101407: checking for iconv" >&5
15538  if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then
15539    echo $ac_n "(cached) $ac_c" 1>&6
15540  else
15541    cat > conftest.$ac_ext <<EOF
15542 -#line 101108 "configure"
15543 +#line 101412 "configure"
15544  #include "confdefs.h"
15545  /* System header to define __stub macros and hopefully few prototypes,
15546      which can conflict with char iconv(); below.  */
15547 @@ -101127,7 +101431,7 @@
15548  
15549  ; return 0; }
15550  EOF
15551 -if { (eval echo configure:101131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15552 +if { (eval echo configure:101435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15553    rm -rf conftest*
15554    eval "ac_cv_func_iconv=yes"
15555  else
15556 @@ -101148,12 +101452,12 @@
15557    echo "$ac_t""no" 1>&6
15558  
15559        echo $ac_n "checking for libiconv""... $ac_c" 1>&6
15560 -echo "configure:101152: checking for libiconv" >&5
15561 +echo "configure:101456: checking for libiconv" >&5
15562  if eval "test \"`echo '$''{'ac_cv_func_libiconv'+set}'`\" = set"; then
15563    echo $ac_n "(cached) $ac_c" 1>&6
15564  else
15565    cat > conftest.$ac_ext <<EOF
15566 -#line 101157 "configure"
15567 +#line 101461 "configure"
15568  #include "confdefs.h"
15569  /* System header to define __stub macros and hopefully few prototypes,
15570      which can conflict with char libiconv(); below.  */
15571 @@ -101176,7 +101480,7 @@
15572  
15573  ; return 0; }
15574  EOF
15575 -if { (eval echo configure:101180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15576 +if { (eval echo configure:101484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15577    rm -rf conftest*
15578    eval "ac_cv_func_libiconv=yes"
15579  else
15580 @@ -101332,7 +101636,7 @@
15581    done
15582  
15583    echo $ac_n "checking for libiconv in -l$iconv_lib_name""... $ac_c" 1>&6
15584 -echo "configure:101336: checking for libiconv in -l$iconv_lib_name" >&5
15585 +echo "configure:101640: checking for libiconv in -l$iconv_lib_name" >&5
15586  ac_lib_var=`echo $iconv_lib_name'_'libiconv | sed 'y%./+-%__p_%'`
15587  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
15588    echo $ac_n "(cached) $ac_c" 1>&6
15589 @@ -101340,7 +101644,7 @@
15590    ac_save_LIBS="$LIBS"
15591  LIBS="-l$iconv_lib_name  $LIBS"
15592  cat > conftest.$ac_ext <<EOF
15593 -#line 101344 "configure"
15594 +#line 101648 "configure"
15595  #include "confdefs.h"
15596  /* Override any gcc2 internal prototype to avoid an error.  */
15597  /* We use char because int might match the return type of a gcc2
15598 @@ -101351,7 +101655,7 @@
15599  libiconv()
15600  ; return 0; }
15601  EOF
15602 -if { (eval echo configure:101355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15603 +if { (eval echo configure:101659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15604    rm -rf conftest*
15605    eval "ac_cv_lib_$ac_lib_var=yes"
15606  else
15607 @@ -101485,7 +101789,7 @@
15608    done
15609  
15610    echo $ac_n "checking for iconv in -l$iconv_lib_name""... $ac_c" 1>&6
15611 -echo "configure:101489: checking for iconv in -l$iconv_lib_name" >&5
15612 +echo "configure:101793: checking for iconv in -l$iconv_lib_name" >&5
15613  ac_lib_var=`echo $iconv_lib_name'_'iconv | sed 'y%./+-%__p_%'`
15614  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
15615    echo $ac_n "(cached) $ac_c" 1>&6
15616 @@ -101493,7 +101797,7 @@
15617    ac_save_LIBS="$LIBS"
15618  LIBS="-l$iconv_lib_name  $LIBS"
15619  cat > conftest.$ac_ext <<EOF
15620 -#line 101497 "configure"
15621 +#line 101801 "configure"
15622  #include "confdefs.h"
15623  /* Override any gcc2 internal prototype to avoid an error.  */
15624  /* We use char because int might match the return type of a gcc2
15625 @@ -101504,7 +101808,7 @@
15626  iconv()
15627  ; return 0; }
15628  EOF
15629 -if { (eval echo configure:101508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15630 +if { (eval echo configure:101812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15631    rm -rf conftest*
15632    eval "ac_cv_lib_$ac_lib_var=yes"
15633  else
15634 @@ -101693,7 +101997,7 @@
15635    # Extract the first word of "ranlib", so it can be a program name with args.
15636  set dummy ranlib; ac_word=$2
15637  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
15638 -echo "configure:101697: checking for $ac_word" >&5
15639 +echo "configure:102001: checking for $ac_word" >&5
15640  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
15641    echo $ac_n "(cached) $ac_c" 1>&6
15642  else
15643 @@ -101721,21 +102025,21 @@
15644  fi
15645  
15646  echo $ac_n "checking for inline""... $ac_c" 1>&6
15647 -echo "configure:101725: checking for inline" >&5
15648 +echo "configure:102029: checking for inline" >&5
15649  if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
15650    echo $ac_n "(cached) $ac_c" 1>&6
15651  else
15652    ac_cv_c_inline=no
15653  for ac_kw in inline __inline__ __inline; do
15654    cat > conftest.$ac_ext <<EOF
15655 -#line 101732 "configure"
15656 +#line 102036 "configure"
15657  #include "confdefs.h"
15658  
15659  int main() {
15660  } $ac_kw foo() {
15661  ; return 0; }
15662  EOF
15663 -if { (eval echo configure:101739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15664 +if { (eval echo configure:102043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15665    rm -rf conftest*
15666    ac_cv_c_inline=$ac_kw; break
15667  else
15668 @@ -101773,12 +102077,12 @@
15669  
15670  
15671  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
15672 -echo "configure:101777: checking for ANSI C header files" >&5
15673 +echo "configure:102081: checking for ANSI C header files" >&5
15674  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
15675    echo $ac_n "(cached) $ac_c" 1>&6
15676  else
15677    cat > conftest.$ac_ext <<EOF
15678 -#line 101782 "configure"
15679 +#line 102086 "configure"
15680  #include "confdefs.h"
15681  #include <stdlib.h>
15682  #include <stdarg.h>
15683 @@ -101786,7 +102090,7 @@
15684  #include <float.h>
15685  EOF
15686  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15687 -{ (eval echo configure:101790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15688 +{ (eval echo configure:102094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15689  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15690  if test -z "$ac_err"; then
15691    rm -rf conftest*
15692 @@ -101803,7 +102107,7 @@
15693  if test $ac_cv_header_stdc = yes; then
15694    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15695  cat > conftest.$ac_ext <<EOF
15696 -#line 101807 "configure"
15697 +#line 102111 "configure"
15698  #include "confdefs.h"
15699  #include <string.h>
15700  EOF
15701 @@ -101821,7 +102125,7 @@
15702  if test $ac_cv_header_stdc = yes; then
15703    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15704  cat > conftest.$ac_ext <<EOF
15705 -#line 101825 "configure"
15706 +#line 102129 "configure"
15707  #include "confdefs.h"
15708  #include <stdlib.h>
15709  EOF
15710 @@ -101842,7 +102146,7 @@
15711    :
15712  else
15713    cat > conftest.$ac_ext <<EOF
15714 -#line 101846 "configure"
15715 +#line 102150 "configure"
15716  #include "confdefs.h"
15717  #include <ctype.h>
15718  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15719 @@ -101853,7 +102157,7 @@
15720  exit (0); }
15721  
15722  EOF
15723 -if { (eval echo configure:101857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15724 +if { (eval echo configure:102161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15725  then
15726    :
15727  else
15728 @@ -101880,17 +102184,17 @@
15729  do
15730  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15731  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15732 -echo "configure:101884: checking for $ac_hdr" >&5
15733 +echo "configure:102188: checking for $ac_hdr" >&5
15734  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
15735    echo $ac_n "(cached) $ac_c" 1>&6
15736  else
15737    cat > conftest.$ac_ext <<EOF
15738 -#line 101889 "configure"
15739 +#line 102193 "configure"
15740  #include "confdefs.h"
15741  #include <$ac_hdr>
15742  EOF
15743  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15744 -{ (eval echo configure:101894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15745 +{ (eval echo configure:102198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15746  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15747  if test -z "$ac_err"; then
15748    rm -rf conftest*
15749 @@ -101922,7 +102226,7 @@
15750  
15751  
15752  echo $ac_n "checking size of char""... $ac_c" 1>&6
15753 -echo "configure:101926: checking size of char" >&5
15754 +echo "configure:102230: checking size of char" >&5
15755  if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
15756    echo $ac_n "(cached) $ac_c" 1>&6
15757  else
15758 @@ -101930,18 +102234,18 @@
15759    ac_cv_sizeof_char=1
15760  else
15761    cat > conftest.$ac_ext <<EOF
15762 -#line 101934 "configure"
15763 +#line 102238 "configure"
15764  #include "confdefs.h"
15765  #include <stdio.h>
15766 -int main()
15767 +main()
15768  {
15769    FILE *f=fopen("conftestval", "w");
15770 -  if (!f) return(1);
15771 +  if (!f) exit(1);
15772    fprintf(f, "%d\n", sizeof(char));
15773 -  return(0);
15774 +  exit(0);
15775  }
15776  EOF
15777 -if { (eval echo configure:101945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15778 +if { (eval echo configure:102249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15779  then
15780    ac_cv_sizeof_char=`cat conftestval`
15781  else
15782 @@ -101962,7 +102266,7 @@
15783  
15784  
15785  echo $ac_n "checking size of int""... $ac_c" 1>&6
15786 -echo "configure:101966: checking size of int" >&5
15787 +echo "configure:102270: checking size of int" >&5
15788  if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
15789    echo $ac_n "(cached) $ac_c" 1>&6
15790  else
15791 @@ -101970,18 +102274,18 @@
15792    ac_cv_sizeof_int=4
15793  else
15794    cat > conftest.$ac_ext <<EOF
15795 -#line 101974 "configure"
15796 +#line 102278 "configure"
15797  #include "confdefs.h"
15798  #include <stdio.h>
15799 -int main()
15800 +main()
15801  {
15802    FILE *f=fopen("conftestval", "w");
15803 -  if (!f) return(1);
15804 +  if (!f) exit(1);
15805    fprintf(f, "%d\n", sizeof(int));
15806 -  return(0);
15807 +  exit(0);
15808  }
15809  EOF
15810 -if { (eval echo configure:101985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15811 +if { (eval echo configure:102289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15812  then
15813    ac_cv_sizeof_int=`cat conftestval`
15814  else
15815 @@ -102001,7 +102305,7 @@
15816  
15817  
15818  echo $ac_n "checking size of long""... $ac_c" 1>&6
15819 -echo "configure:102005: checking size of long" >&5
15820 +echo "configure:102309: checking size of long" >&5
15821  if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
15822    echo $ac_n "(cached) $ac_c" 1>&6
15823  else
15824 @@ -102009,18 +102313,18 @@
15825    ac_cv_sizeof_long=4
15826  else
15827    cat > conftest.$ac_ext <<EOF
15828 -#line 102013 "configure"
15829 +#line 102317 "configure"
15830  #include "confdefs.h"
15831  #include <stdio.h>
15832 -int main()
15833 +main()
15834  {
15835    FILE *f=fopen("conftestval", "w");
15836 -  if (!f) return(1);
15837 +  if (!f) exit(1);
15838    fprintf(f, "%d\n", sizeof(long));
15839 -  return(0);
15840 +  exit(0);
15841  }
15842  EOF
15843 -if { (eval echo configure:102024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15844 +if { (eval echo configure:102328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15845  then
15846    ac_cv_sizeof_long=`cat conftestval`
15847  else
15848 @@ -102040,7 +102344,7 @@
15849  
15850  
15851  echo $ac_n "checking size of long long""... $ac_c" 1>&6
15852 -echo "configure:102044: checking size of long long" >&5
15853 +echo "configure:102348: checking size of long long" >&5
15854  if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
15855    echo $ac_n "(cached) $ac_c" 1>&6
15856  else
15857 @@ -102048,18 +102352,18 @@
15858    ac_cv_sizeof_long_long=8
15859  else
15860    cat > conftest.$ac_ext <<EOF
15861 -#line 102052 "configure"
15862 +#line 102356 "configure"
15863  #include "confdefs.h"
15864  #include <stdio.h>
15865 -int main()
15866 +main()
15867  {
15868    FILE *f=fopen("conftestval", "w");
15869 -  if (!f) return(1);
15870 +  if (!f) exit(1);
15871    fprintf(f, "%d\n", sizeof(long long));
15872 -  return(0);
15873 +  exit(0);
15874  }
15875  EOF
15876 -if { (eval echo configure:102063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15877 +if { (eval echo configure:102367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15878  then
15879    ac_cv_sizeof_long_long=`cat conftestval`
15880  else
15881 @@ -102079,12 +102383,12 @@
15882  
15883  
15884  echo $ac_n "checking for size_t""... $ac_c" 1>&6
15885 -echo "configure:102083: checking for size_t" >&5
15886 +echo "configure:102387: checking for size_t" >&5
15887  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
15888    echo $ac_n "(cached) $ac_c" 1>&6
15889  else
15890    cat > conftest.$ac_ext <<EOF
15891 -#line 102088 "configure"
15892 +#line 102392 "configure"
15893  #include "confdefs.h"
15894  #include <sys/types.h>
15895  #if STDC_HEADERS
15896 @@ -102112,12 +102416,12 @@
15897  fi
15898  
15899  echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
15900 -echo "configure:102116: checking whether time.h and sys/time.h may both be included" >&5
15901 +echo "configure:102420: checking whether time.h and sys/time.h may both be included" >&5
15902  if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
15903    echo $ac_n "(cached) $ac_c" 1>&6
15904  else
15905    cat > conftest.$ac_ext <<EOF
15906 -#line 102121 "configure"
15907 +#line 102425 "configure"
15908  #include "confdefs.h"
15909  #include <sys/types.h>
15910  #include <sys/time.h>
15911 @@ -102126,7 +102430,7 @@
15912  struct tm *tp;
15913  ; return 0; }
15914  EOF
15915 -if { (eval echo configure:102130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15916 +if { (eval echo configure:102434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15917    rm -rf conftest*
15918    ac_cv_header_time=yes
15919  else
15920 @@ -102147,12 +102451,12 @@
15921  fi
15922  
15923  echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
15924 -echo "configure:102151: checking for uid_t in sys/types.h" >&5
15925 +echo "configure:102455: checking for uid_t in sys/types.h" >&5
15926  if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
15927    echo $ac_n "(cached) $ac_c" 1>&6
15928  else
15929    cat > conftest.$ac_ext <<EOF
15930 -#line 102156 "configure"
15931 +#line 102460 "configure"
15932  #include "confdefs.h"
15933  #include <sys/types.h>
15934  EOF
15935 @@ -102192,12 +102496,12 @@
15936   memcpy memmove
15937  do
15938  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15939 -echo "configure:102196: checking for $ac_func" >&5
15940 +echo "configure:102500: checking for $ac_func" >&5
15941  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
15942    echo $ac_n "(cached) $ac_c" 1>&6
15943  else
15944    cat > conftest.$ac_ext <<EOF
15945 -#line 102201 "configure"
15946 +#line 102505 "configure"
15947  #include "confdefs.h"
15948  /* System header to define __stub macros and hopefully few prototypes,
15949      which can conflict with char $ac_func(); below.  */
15950 @@ -102220,7 +102524,7 @@
15951  
15952  ; return 0; }
15953  EOF
15954 -if { (eval echo configure:102224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15955 +if { (eval echo configure:102528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15956    rm -rf conftest*
15957    eval "ac_cv_func_$ac_func=yes"
15958  else
15959 @@ -102563,7 +102867,7 @@
15960      XMLRPC_DIR=$PHP_XMLRPC/include/xmlrpc-epi
15961    else
15962      echo $ac_n "checking for XMLRPC-EPI in default path""... $ac_c" 1>&6
15963 -echo "configure:102567: checking for XMLRPC-EPI in default path" >&5
15964 +echo "configure:102871: checking for XMLRPC-EPI in default path" >&5
15965      for i in /usr/local /usr; do
15966        if test -r $i/include/xmlrpc.h; then
15967          XMLRPC_DIR=$i/include
15968 @@ -102995,7 +103299,7 @@
15969  php_enable_xmlwriter=yes
15970  
15971  echo $ac_n "checking whether to enable XMLWriter support""... $ac_c" 1>&6
15972 -echo "configure:102999: checking whether to enable XMLWriter support" >&5
15973 +echo "configure:103303: checking whether to enable XMLWriter support" >&5
15974  # Check whether --enable-xmlwriter or --disable-xmlwriter was given.
15975  if test "${enable_xmlwriter+set}" = set; then
15976    enableval="$enable_xmlwriter"
15977 @@ -103043,7 +103347,7 @@
15978  php_with_libxml_dir=no
15979  
15980  echo $ac_n "checking libxml2 install dir""... $ac_c" 1>&6
15981 -echo "configure:103047: checking libxml2 install dir" >&5
15982 +echo "configure:103351: checking libxml2 install dir" >&5
15983  # Check whether --with-libxml-dir or --without-libxml-dir was given.
15984  if test "${with_libxml_dir+set}" = set; then
15985    withval="$with_libxml_dir"
15986 @@ -103074,7 +103378,7 @@
15987  
15988    
15989  echo $ac_n "checking for xml2-config path""... $ac_c" 1>&6
15990 -echo "configure:103078: checking for xml2-config path" >&5
15991 +echo "configure:103382: checking for xml2-config path" >&5
15992  if eval "test \"`echo '$''{'ac_cv_php_xml2_config_path'+set}'`\" = set"; then
15993    echo $ac_n "(cached) $ac_c" 1>&6
15994  else
15995 @@ -103232,7 +103536,7 @@
15996  
15997  
15998              echo $ac_n "checking whether libxml build works""... $ac_c" 1>&6
15999 -echo "configure:103236: checking whether libxml build works" >&5
16000 +echo "configure:103540: checking whether libxml build works" >&5
16001  if eval "test \"`echo '$''{'php_cv_libxml_build_works'+set}'`\" = set"; then
16002    echo $ac_n "(cached) $ac_c" 1>&6
16003  else
16004 @@ -103248,7 +103552,7 @@
16005    
16006  else
16007    cat > conftest.$ac_ext <<EOF
16008 -#line 103252 "configure"
16009 +#line 103556 "configure"
16010  #include "confdefs.h"
16011  
16012      
16013 @@ -103259,7 +103563,7 @@
16014      }
16015    
16016  EOF
16017 -if { (eval echo configure:103263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16018 +if { (eval echo configure:103567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16019  then
16020    
16021      LIBS=$old_LIBS
16022 @@ -103598,7 +103902,7 @@
16023  php_with_xsl=no
16024  
16025  echo $ac_n "checking for XSL support""... $ac_c" 1>&6
16026 -echo "configure:103602: checking for XSL support" >&5
16027 +echo "configure:103906: checking for XSL support" >&5
16028  # Check whether --with-xsl or --without-xsl was given.
16029  if test "${with_xsl+set}" = set; then
16030    withval="$with_xsl"
16031 @@ -103801,7 +104105,7 @@
16032  
16033        
16034        echo $ac_n "checking for EXSLT support""... $ac_c" 1>&6
16035 -echo "configure:103805: checking for EXSLT support" >&5
16036 +echo "configure:104109: checking for EXSLT support" >&5
16037        for i in $PHP_XSL /usr/local /usr; do
16038          if test -r "$i/include/libexslt/exslt.h"; then
16039            PHP_XSL_EXSL_DIR=$i
16040 @@ -104266,7 +104570,7 @@
16041  php_enable_zip=no
16042  
16043  echo $ac_n "checking for zip archive read/writesupport""... $ac_c" 1>&6
16044 -echo "configure:104270: checking for zip archive read/writesupport" >&5
16045 +echo "configure:104574: checking for zip archive read/writesupport" >&5
16046  # Check whether --enable-zip or --disable-zip was given.
16047  if test "${enable_zip+set}" = set; then
16048    enableval="$enable_zip"
16049 @@ -104314,7 +104618,7 @@
16050  php_with_zlib_dir=no
16051  
16052  echo $ac_n "checking for the location of libz""... $ac_c" 1>&6
16053 -echo "configure:104318: checking for the location of libz" >&5
16054 +echo "configure:104622: checking for the location of libz" >&5
16055  # Check whether --with-zlib-dir or --without-zlib-dir was given.
16056  if test "${with_zlib_dir+set}" = set; then
16057    withval="$with_zlib_dir"
16058 @@ -104362,7 +104666,7 @@
16059         fi
16060  
16061                 echo $ac_n "checking for the location of zlib""... $ac_c" 1>&6
16062 -echo "configure:104366: checking for the location of zlib" >&5
16063 +echo "configure:104670: checking for the location of zlib" >&5
16064         if test "$PHP_ZLIB_DIR" = "no"; then
16065                 { echo "configure: error: zip support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located" 1>&2; exit 1; }
16066         else
16067 @@ -104879,7 +105183,7 @@
16068  php_with_pear=DEFAULT
16069  
16070  echo $ac_n "checking whether to install PEAR""... $ac_c" 1>&6
16071 -echo "configure:104883: checking whether to install PEAR" >&5
16072 +echo "configure:105187: checking whether to install PEAR" >&5
16073  # Check whether --with-pear or --without-pear was given.
16074  if test "${with_pear+set}" = set; then
16075    withval="$with_pear"
16076 @@ -104989,7 +105293,7 @@
16077    bison_version=none
16078    if test "$YACC"; then
16079      echo $ac_n "checking for bison version""... $ac_c" 1>&6
16080 -echo "configure:104993: checking for bison version" >&5
16081 +echo "configure:105297: checking for bison version" >&5
16082  if eval "test \"`echo '$''{'php_cv_bison_version'+set}'`\" = set"; then
16083    echo $ac_n "(cached) $ac_c" 1>&6
16084  else
16085 @@ -105046,17 +105350,17 @@
16086  do
16087  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16088  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16089 -echo "configure:105050: checking for $ac_hdr" >&5
16090 +echo "configure:105354: checking for $ac_hdr" >&5
16091  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
16092    echo $ac_n "(cached) $ac_c" 1>&6
16093  else
16094    cat > conftest.$ac_ext <<EOF
16095 -#line 105055 "configure"
16096 +#line 105359 "configure"
16097  #include "confdefs.h"
16098  #include <$ac_hdr>
16099  EOF
16100  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16101 -{ (eval echo configure:105060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16102 +{ (eval echo configure:105364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16103  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16104  if test -z "$ac_err"; then
16105    rm -rf conftest*
16106 @@ -105084,12 +105388,12 @@
16107  
16108  
16109  echo $ac_n "checking for size_t""... $ac_c" 1>&6
16110 -echo "configure:105088: checking for size_t" >&5
16111 +echo "configure:105392: checking for size_t" >&5
16112  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
16113    echo $ac_n "(cached) $ac_c" 1>&6
16114  else
16115    cat > conftest.$ac_ext <<EOF
16116 -#line 105093 "configure"
16117 +#line 105397 "configure"
16118  #include "confdefs.h"
16119  #include <sys/types.h>
16120  #if STDC_HEADERS
16121 @@ -105117,12 +105421,12 @@
16122  fi
16123  
16124  echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
16125 -echo "configure:105121: checking return type of signal handlers" >&5
16126 +echo "configure:105425: checking return type of signal handlers" >&5
16127  if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
16128    echo $ac_n "(cached) $ac_c" 1>&6
16129  else
16130    cat > conftest.$ac_ext <<EOF
16131 -#line 105126 "configure"
16132 +#line 105430 "configure"
16133  #include "confdefs.h"
16134  #include <sys/types.h>
16135  #include <signal.h>
16136 @@ -105139,7 +105443,7 @@
16137  int i;
16138  ; return 0; }
16139  EOF
16140 -if { (eval echo configure:105143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16141 +if { (eval echo configure:105447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16142    rm -rf conftest*
16143    ac_cv_type_signal=void
16144  else
16145 @@ -105163,12 +105467,12 @@
16146  
16147  
16148  echo $ac_n "checking for uint""... $ac_c" 1>&6
16149 -echo "configure:105167: checking for uint" >&5
16150 +echo "configure:105471: checking for uint" >&5
16151  if eval "test \"`echo '$''{'ac_cv_type_uint'+set}'`\" = set"; then
16152    echo $ac_n "(cached) $ac_c" 1>&6
16153  else
16154    cat > conftest.$ac_ext <<EOF
16155 -#line 105172 "configure"
16156 +#line 105476 "configure"
16157  #include "confdefs.h"
16158  #include <sys/types.h>
16159  #if STDC_HEADERS
16160 @@ -105196,12 +105500,12 @@
16161  fi
16162  
16163  echo $ac_n "checking for ulong""... $ac_c" 1>&6
16164 -echo "configure:105200: checking for ulong" >&5
16165 +echo "configure:105504: checking for ulong" >&5
16166  if eval "test \"`echo '$''{'ac_cv_type_ulong'+set}'`\" = set"; then
16167    echo $ac_n "(cached) $ac_c" 1>&6
16168  else
16169    cat > conftest.$ac_ext <<EOF
16170 -#line 105205 "configure"
16171 +#line 105509 "configure"
16172  #include "confdefs.h"
16173  #include <sys/types.h>
16174  #if STDC_HEADERS
16175 @@ -105231,9 +105535,9 @@
16176  
16177  
16178  echo $ac_n "checking for int32_t""... $ac_c" 1>&6
16179 -echo "configure:105235: checking for int32_t" >&5
16180 +echo "configure:105539: checking for int32_t" >&5
16181  cat > conftest.$ac_ext <<EOF
16182 -#line 105237 "configure"
16183 +#line 105541 "configure"
16184  #include "confdefs.h"
16185  
16186  #if HAVE_SYS_TYPES_H  
16187 @@ -105252,7 +105556,7 @@
16188  
16189  ; return 0; }
16190  EOF
16191 -if { (eval echo configure:105256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16192 +if { (eval echo configure:105560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16193    rm -rf conftest*
16194    
16195    cat >> confdefs.h <<EOF
16196 @@ -105271,9 +105575,9 @@
16197  rm -f conftest*
16198  
16199  echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
16200 -echo "configure:105275: checking for uint32_t" >&5
16201 +echo "configure:105579: checking for uint32_t" >&5
16202  cat > conftest.$ac_ext <<EOF
16203 -#line 105277 "configure"
16204 +#line 105581 "configure"
16205  #include "confdefs.h"
16206  
16207  #if HAVE_SYS_TYPES_H  
16208 @@ -105292,7 +105596,7 @@
16209  
16210  ; return 0; }
16211  EOF
16212 -if { (eval echo configure:105296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16213 +if { (eval echo configure:105600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16214    rm -rf conftest*
16215    
16216    cat >> confdefs.h <<EOF
16217 @@ -105311,12 +105615,12 @@
16218  rm -f conftest*
16219  
16220  echo $ac_n "checking for vprintf""... $ac_c" 1>&6
16221 -echo "configure:105315: checking for vprintf" >&5
16222 +echo "configure:105619: checking for vprintf" >&5
16223  if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
16224    echo $ac_n "(cached) $ac_c" 1>&6
16225  else
16226    cat > conftest.$ac_ext <<EOF
16227 -#line 105320 "configure"
16228 +#line 105624 "configure"
16229  #include "confdefs.h"
16230  /* System header to define __stub macros and hopefully few prototypes,
16231      which can conflict with char vprintf(); below.  */
16232 @@ -105339,7 +105643,7 @@
16233  
16234  ; return 0; }
16235  EOF
16236 -if { (eval echo configure:105343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16237 +if { (eval echo configure:105647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16238    rm -rf conftest*
16239    eval "ac_cv_func_vprintf=yes"
16240  else
16241 @@ -105363,12 +105667,12 @@
16242  
16243  if test "$ac_cv_func_vprintf" != yes; then
16244  echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
16245 -echo "configure:105367: checking for _doprnt" >&5
16246 +echo "configure:105671: checking for _doprnt" >&5
16247  if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
16248    echo $ac_n "(cached) $ac_c" 1>&6
16249  else
16250    cat > conftest.$ac_ext <<EOF
16251 -#line 105372 "configure"
16252 +#line 105676 "configure"
16253  #include "confdefs.h"
16254  /* System header to define __stub macros and hopefully few prototypes,
16255      which can conflict with char _doprnt(); below.  */
16256 @@ -105391,7 +105695,7 @@
16257  
16258  ; return 0; }
16259  EOF
16260 -if { (eval echo configure:105395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16261 +if { (eval echo configure:105699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16262    rm -rf conftest*
16263    eval "ac_cv_func__doprnt=yes"
16264  else
16265 @@ -105416,7 +105720,7 @@
16266  fi
16267  
16268  echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
16269 -echo "configure:105420: checking for 8-bit clean memcmp" >&5
16270 +echo "configure:105724: checking for 8-bit clean memcmp" >&5
16271  if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
16272    echo $ac_n "(cached) $ac_c" 1>&6
16273  else
16274 @@ -105424,7 +105728,7 @@
16275    ac_cv_func_memcmp_clean=no
16276  else
16277    cat > conftest.$ac_ext <<EOF
16278 -#line 105428 "configure"
16279 +#line 105732 "configure"
16280  #include "confdefs.h"
16281  
16282  main()
16283 @@ -105434,7 +105738,7 @@
16284  }
16285  
16286  EOF
16287 -if { (eval echo configure:105438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16288 +if { (eval echo configure:105742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16289  then
16290    ac_cv_func_memcmp_clean=yes
16291  else
16292 @@ -105454,19 +105758,19 @@
16293  # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
16294  # for constant arguments.  Useless!
16295  echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
16296 -echo "configure:105458: checking for working alloca.h" >&5
16297 +echo "configure:105762: checking for working alloca.h" >&5
16298  if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
16299    echo $ac_n "(cached) $ac_c" 1>&6
16300  else
16301    cat > conftest.$ac_ext <<EOF
16302 -#line 105463 "configure"
16303 +#line 105767 "configure"
16304  #include "confdefs.h"
16305  #include <alloca.h>
16306  int main() {
16307  char *p = alloca(2 * sizeof(int));
16308  ; return 0; }
16309  EOF
16310 -if { (eval echo configure:105470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16311 +if { (eval echo configure:105774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16312    rm -rf conftest*
16313    ac_cv_header_alloca_h=yes
16314  else
16315 @@ -105487,12 +105791,12 @@
16316  fi
16317  
16318  echo $ac_n "checking for alloca""... $ac_c" 1>&6
16319 -echo "configure:105491: checking for alloca" >&5
16320 +echo "configure:105795: checking for alloca" >&5
16321  if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
16322    echo $ac_n "(cached) $ac_c" 1>&6
16323  else
16324    cat > conftest.$ac_ext <<EOF
16325 -#line 105496 "configure"
16326 +#line 105800 "configure"
16327  #include "confdefs.h"
16328  
16329  #ifdef __GNUC__
16330 @@ -105520,7 +105824,7 @@
16331  char *p = (char *) alloca(1);
16332  ; return 0; }
16333  EOF
16334 -if { (eval echo configure:105524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16335 +if { (eval echo configure:105828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16336    rm -rf conftest*
16337    ac_cv_func_alloca_works=yes
16338  else
16339 @@ -105552,12 +105856,12 @@
16340  
16341  
16342  echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
16343 -echo "configure:105556: checking whether alloca needs Cray hooks" >&5
16344 +echo "configure:105860: checking whether alloca needs Cray hooks" >&5
16345  if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
16346    echo $ac_n "(cached) $ac_c" 1>&6
16347  else
16348    cat > conftest.$ac_ext <<EOF
16349 -#line 105561 "configure"
16350 +#line 105865 "configure"
16351  #include "confdefs.h"
16352  #if defined(CRAY) && ! defined(CRAY2)
16353  webecray
16354 @@ -105582,12 +105886,12 @@
16355  if test $ac_cv_os_cray = yes; then
16356  for ac_func in _getb67 GETB67 getb67; do
16357    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16358 -echo "configure:105586: checking for $ac_func" >&5
16359 +echo "configure:105890: checking for $ac_func" >&5
16360  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
16361    echo $ac_n "(cached) $ac_c" 1>&6
16362  else
16363    cat > conftest.$ac_ext <<EOF
16364 -#line 105591 "configure"
16365 +#line 105895 "configure"
16366  #include "confdefs.h"
16367  /* System header to define __stub macros and hopefully few prototypes,
16368      which can conflict with char $ac_func(); below.  */
16369 @@ -105610,7 +105914,7 @@
16370  
16371  ; return 0; }
16372  EOF
16373 -if { (eval echo configure:105614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16374 +if { (eval echo configure:105918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16375    rm -rf conftest*
16376    eval "ac_cv_func_$ac_func=yes"
16377  else
16378 @@ -105637,7 +105941,7 @@
16379  fi
16380  
16381  echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
16382 -echo "configure:105641: checking stack direction for C alloca" >&5
16383 +echo "configure:105945: checking stack direction for C alloca" >&5
16384  if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
16385    echo $ac_n "(cached) $ac_c" 1>&6
16386  else
16387 @@ -105645,7 +105949,7 @@
16388    ac_cv_c_stack_direction=0
16389  else
16390    cat > conftest.$ac_ext <<EOF
16391 -#line 105649 "configure"
16392 +#line 105953 "configure"
16393  #include "confdefs.h"
16394  find_stack_direction ()
16395  {
16396 @@ -105664,7 +105968,7 @@
16397    exit (find_stack_direction() < 0);
16398  }
16399  EOF
16400 -if { (eval echo configure:105668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16401 +if { (eval echo configure:105972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16402  then
16403    ac_cv_c_stack_direction=1
16404  else
16405 @@ -105688,12 +105992,12 @@
16406  for ac_func in memcpy strdup getpid kill strtod strtol finite fpclass
16407  do
16408  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16409 -echo "configure:105692: checking for $ac_func" >&5
16410 +echo "configure:105996: checking for $ac_func" >&5
16411  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
16412    echo $ac_n "(cached) $ac_c" 1>&6
16413  else
16414    cat > conftest.$ac_ext <<EOF
16415 -#line 105697 "configure"
16416 +#line 106001 "configure"
16417  #include "confdefs.h"
16418  /* System header to define __stub macros and hopefully few prototypes,
16419      which can conflict with char $ac_func(); below.  */
16420 @@ -105716,7 +106020,7 @@
16421  
16422  ; return 0; }
16423  EOF
16424 -if { (eval echo configure:105720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16425 +if { (eval echo configure:106024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16426    rm -rf conftest*
16427    eval "ac_cv_func_$ac_func=yes"
16428  else
16429 @@ -105742,7 +106046,7 @@
16430  
16431  
16432    echo $ac_n "checking whether sprintf is broken""... $ac_c" 1>&6
16433 -echo "configure:105746: checking whether sprintf is broken" >&5
16434 +echo "configure:106050: checking whether sprintf is broken" >&5
16435  if eval "test \"`echo '$''{'ac_cv_broken_sprintf'+set}'`\" = set"; then
16436    echo $ac_n "(cached) $ac_c" 1>&6
16437  else
16438 @@ -105753,11 +106057,11 @@
16439      
16440  else
16441    cat > conftest.$ac_ext <<EOF
16442 -#line 105757 "configure"
16443 +#line 106061 "configure"
16444  #include "confdefs.h"
16445  main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }
16446  EOF
16447 -if { (eval echo configure:105761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16448 +if { (eval echo configure:106065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16449  then
16450    
16451        ac_cv_broken_sprintf=no
16452 @@ -105791,12 +106095,12 @@
16453  for ac_func in finite isfinite isinf isnan
16454  do
16455  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16456 -echo "configure:105795: checking for $ac_func" >&5
16457 +echo "configure:106099: checking for $ac_func" >&5
16458  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
16459    echo $ac_n "(cached) $ac_c" 1>&6
16460  else
16461    cat > conftest.$ac_ext <<EOF
16462 -#line 105800 "configure"
16463 +#line 106104 "configure"
16464  #include "confdefs.h"
16465  /* System header to define __stub macros and hopefully few prototypes,
16466      which can conflict with char $ac_func(); below.  */
16467 @@ -105819,7 +106123,7 @@
16468  
16469  ; return 0; }
16470  EOF
16471 -if { (eval echo configure:105823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16472 +if { (eval echo configure:106127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16473    rm -rf conftest*
16474    eval "ac_cv_func_$ac_func=yes"
16475  else
16476 @@ -105846,13 +106150,13 @@
16477  
16478  
16479    echo $ac_n "checking whether fp_except is defined""... $ac_c" 1>&6
16480 -echo "configure:105850: checking whether fp_except is defined" >&5
16481 +echo "configure:106154: checking whether fp_except is defined" >&5
16482  if eval "test \"`echo '$''{'ac_cv_type_fp_except'+set}'`\" = set"; then
16483    echo $ac_n "(cached) $ac_c" 1>&6
16484  else
16485    
16486      cat > conftest.$ac_ext <<EOF
16487 -#line 105856 "configure"
16488 +#line 106160 "configure"
16489  #include "confdefs.h"
16490  
16491  #include <floatingpoint.h>
16492 @@ -105863,7 +106167,7 @@
16493  
16494  ; return 0; }
16495  EOF
16496 -if { (eval echo configure:105867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16497 +if { (eval echo configure:106171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16498    rm -rf conftest*
16499    
16500       ac_cv_type_fp_except=yes
16501 @@ -105893,17 +106197,17 @@
16502  do
16503  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16504  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16505 -echo "configure:105897: checking for $ac_hdr" >&5
16506 +echo "configure:106201: checking for $ac_hdr" >&5
16507  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
16508    echo $ac_n "(cached) $ac_c" 1>&6
16509  else
16510    cat > conftest.$ac_ext <<EOF
16511 -#line 105902 "configure"
16512 +#line 106206 "configure"
16513  #include "confdefs.h"
16514  #include <$ac_hdr>
16515  EOF
16516  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16517 -{ (eval echo configure:105907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16518 +{ (eval echo configure:106211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16519  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16520  if test -z "$ac_err"; then
16521    rm -rf conftest*
16522 @@ -105931,14 +106235,14 @@
16523  
16524  
16525  echo $ac_n "checking whether dlsym() requires a leading underscore in symbol names""... $ac_c" 1>&6
16526 -echo "configure:105935: checking whether dlsym() requires a leading underscore in symbol names" >&5
16527 +echo "configure:106239: checking whether dlsym() requires a leading underscore in symbol names" >&5
16528  if test "$cross_compiling" = yes; then :
16529    
16530  else
16531    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16532    lt_status=$lt_dlunknown
16533    cat > conftest.$ac_ext <<EOF
16534 -#line 105942 "configure"
16535 +#line 106246 "configure"
16536  #include "confdefs.h"
16537  
16538  #if HAVE_DLFCN_H
16539 @@ -105999,7 +106303,7 @@
16540      exit (status);
16541  }
16542  EOF
16543 -  if { (eval echo configure:106003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
16544 +  if { (eval echo configure:106307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
16545      (./conftest; exit; ) >&5 2>/dev/null
16546      lt_status=$?
16547      case x$lt_status in
16548 @@ -106082,23 +106386,23 @@
16549  
16550  
16551  echo $ac_n "checking virtual machine dispatch method""... $ac_c" 1>&6
16552 -echo "configure:106086: checking virtual machine dispatch method" >&5
16553 +echo "configure:106390: checking virtual machine dispatch method" >&5
16554  echo "$ac_t""$PHP_ZEND_VM" 1>&6
16555  
16556  echo $ac_n "checking whether to enable thread-safety""... $ac_c" 1>&6
16557 -echo "configure:106090: checking whether to enable thread-safety" >&5
16558 +echo "configure:106394: checking whether to enable thread-safety" >&5
16559  echo "$ac_t""$ZEND_MAINTAINER_ZTS" 1>&6
16560  
16561  echo $ac_n "checking whether to enable inline optimization for GCC""... $ac_c" 1>&6
16562 -echo "configure:106094: checking whether to enable inline optimization for GCC" >&5
16563 +echo "configure:106398: checking whether to enable inline optimization for GCC" >&5
16564  echo "$ac_t""$ZEND_INLINE_OPTIMIZATION" 1>&6
16565  
16566  echo $ac_n "checking whether to enable Zend debugging""... $ac_c" 1>&6
16567 -echo "configure:106098: checking whether to enable Zend debugging" >&5
16568 +echo "configure:106402: checking whether to enable Zend debugging" >&5
16569  echo "$ac_t""$ZEND_DEBUG" 1>&6
16570  
16571  echo $ac_n "checking whether to enable Zend multibyte""... $ac_c" 1>&6
16572 -echo "configure:106102: checking whether to enable Zend multibyte" >&5
16573 +echo "configure:106406: checking whether to enable Zend multibyte" >&5
16574  echo "$ac_t""$ZEND_MULTIBYTE" 1>&6
16575         
16576  case $PHP_ZEND_VM in
16577 @@ -106171,21 +106475,21 @@
16578  
16579  
16580  echo $ac_n "checking for inline""... $ac_c" 1>&6
16581 -echo "configure:106175: checking for inline" >&5
16582 +echo "configure:106479: checking for inline" >&5
16583  if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
16584    echo $ac_n "(cached) $ac_c" 1>&6
16585  else
16586    ac_cv_c_inline=no
16587  for ac_kw in inline __inline__ __inline; do
16588    cat > conftest.$ac_ext <<EOF
16589 -#line 106182 "configure"
16590 +#line 106486 "configure"
16591  #include "confdefs.h"
16592  
16593  int main() {
16594  } $ac_kw foo() {
16595  ; return 0; }
16596  EOF
16597 -if { (eval echo configure:106189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16598 +if { (eval echo configure:106493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16599    rm -rf conftest*
16600    ac_cv_c_inline=$ac_kw; break
16601  else
16602 @@ -106214,7 +106518,7 @@
16603  
16604  
16605  echo $ac_n "checking target system is Darwin""... $ac_c" 1>&6
16606 -echo "configure:106218: checking target system is Darwin" >&5
16607 +echo "configure:106522: checking target system is Darwin" >&5
16608  if echo "$target" | grep "darwin" > /dev/null; then
16609    cat >> confdefs.h <<\EOF
16610  #define DARWIN 1
16611 @@ -106226,7 +106530,7 @@
16612  fi
16613  
16614  echo $ac_n "checking for MM alignment and log values""... $ac_c" 1>&6
16615 -echo "configure:106230: checking for MM alignment and log values" >&5
16616 +echo "configure:106534: checking for MM alignment and log values" >&5
16617  
16618  if test "$cross_compiling" = yes; then
16619    
16620 @@ -106234,7 +106538,7 @@
16621  
16622  else
16623    cat > conftest.$ac_ext <<EOF
16624 -#line 106238 "configure"
16625 +#line 106542 "configure"
16626  #include "confdefs.h"
16627  
16628  #include <stdio.h>
16629 @@ -106270,7 +106574,7 @@
16630  }
16631  
16632  EOF
16633 -if { (eval echo configure:106274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16634 +if { (eval echo configure:106578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16635  then
16636    
16637    LIBZEND_MM_ALIGN=`cat conftest.zend | cut -d ' ' -f 1`
16638 @@ -106295,7 +106599,7 @@
16639  echo "$ac_t""done" 1>&6
16640  
16641  echo $ac_n "checking for memory allocation using mmap(MAP_ANON)""... $ac_c" 1>&6
16642 -echo "configure:106299: checking for memory allocation using mmap(MAP_ANON)" >&5
16643 +echo "configure:106603: checking for memory allocation using mmap(MAP_ANON)" >&5
16644  
16645  if test "$cross_compiling" = yes; then
16646    
16647 @@ -106303,7 +106607,7 @@
16648  
16649  else
16650    cat > conftest.$ac_ext <<EOF
16651 -#line 106307 "configure"
16652 +#line 106611 "configure"
16653  #include "confdefs.h"
16654  
16655  #include <sys/types.h>
16656 @@ -106339,7 +106643,7 @@
16657  }
16658  
16659  EOF
16660 -if { (eval echo configure:106343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16661 +if { (eval echo configure:106647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16662  then
16663    
16664    cat >> confdefs.h <<\EOF
16665 @@ -106361,7 +106665,7 @@
16666  
16667  
16668  echo $ac_n "checking for memory allocation using mmap("/dev/zero")""... $ac_c" 1>&6
16669 -echo "configure:106365: checking for memory allocation using mmap("/dev/zero")" >&5
16670 +echo "configure:106669: checking for memory allocation using mmap("/dev/zero")" >&5
16671  
16672  if test "$cross_compiling" = yes; then
16673    
16674 @@ -106369,7 +106673,7 @@
16675  
16676  else
16677    cat > conftest.$ac_ext <<EOF
16678 -#line 106373 "configure"
16679 +#line 106677 "configure"
16680  #include "confdefs.h"
16681  
16682  #include <sys/types.h>
16683 @@ -106415,7 +106719,7 @@
16684  }
16685  
16686  EOF
16687 -if { (eval echo configure:106419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16688 +if { (eval echo configure:106723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16689  then
16690    
16691    cat >> confdefs.h <<\EOF
16692 @@ -106439,12 +106743,12 @@
16693  for ac_func in mremap
16694  do
16695  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16696 -echo "configure:106443: checking for $ac_func" >&5
16697 +echo "configure:106747: checking for $ac_func" >&5
16698  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
16699    echo $ac_n "(cached) $ac_c" 1>&6
16700  else
16701    cat > conftest.$ac_ext <<EOF
16702 -#line 106448 "configure"
16703 +#line 106752 "configure"
16704  #include "confdefs.h"
16705  /* System header to define __stub macros and hopefully few prototypes,
16706      which can conflict with char $ac_func(); below.  */
16707 @@ -106467,7 +106771,7 @@
16708  
16709  ; return 0; }
16710  EOF
16711 -if { (eval echo configure:106471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16712 +if { (eval echo configure:106775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16713    rm -rf conftest*
16714    eval "ac_cv_func_$ac_func=yes"
16715  else
16716 @@ -106534,17 +106838,17 @@
16717  do
16718  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16719  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16720 -echo "configure:106538: checking for $ac_hdr" >&5
16721 +echo "configure:106842: checking for $ac_hdr" >&5
16722  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
16723    echo $ac_n "(cached) $ac_c" 1>&6
16724  else
16725    cat > conftest.$ac_ext <<EOF
16726 -#line 106543 "configure"
16727 +#line 106847 "configure"
16728  #include "confdefs.h"
16729  #include <$ac_hdr>
16730  EOF
16731  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16732 -{ (eval echo configure:106548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16733 +{ (eval echo configure:106852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16734  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16735  if test -z "$ac_err"; then
16736    rm -rf conftest*
16737 @@ -106621,7 +106925,7 @@
16738    
16739  
16740  echo $ac_n "checking for GNU Pth""... $ac_c" 1>&6
16741 -echo "configure:106625: checking for GNU Pth" >&5
16742 +echo "configure:106929: checking for GNU Pth" >&5
16743  PTH_PREFIX="`$TSRM_PTH --prefix`"
16744  if test -z "$PTH_PREFIX"; then
16745    echo "$ac_t""Please check your Pth installation" 1>&6
16746 @@ -106651,17 +106955,17 @@
16747  do
16748  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16749  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16750 -echo "configure:106655: checking for $ac_hdr" >&5
16751 +echo "configure:106959: checking for $ac_hdr" >&5
16752  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
16753    echo $ac_n "(cached) $ac_c" 1>&6
16754  else
16755    cat > conftest.$ac_ext <<EOF
16756 -#line 106660 "configure"
16757 +#line 106964 "configure"
16758  #include "confdefs.h"
16759  #include <$ac_hdr>
16760  EOF
16761  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16762 -{ (eval echo configure:106665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16763 +{ (eval echo configure:106969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16764  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16765  if test -z "$ac_err"; then
16766    rm -rf conftest*
16767 @@ -106691,7 +106995,7 @@
16768  
16769    LIBS="$LIBS -lst"
16770    echo $ac_n "checking for SGI's State Threads""... $ac_c" 1>&6
16771 -echo "configure:106695: checking for SGI's State Threads" >&5
16772 +echo "configure:106999: checking for SGI's State Threads" >&5
16773    echo "$ac_t""yes" 1>&6
16774    cat >> confdefs.h <<\EOF
16775  #define TSRM_ST 1
16776 @@ -106730,7 +107034,7 @@
16777  
16778  else
16779    cat > conftest.$ac_ext <<EOF
16780 -#line 106734 "configure"
16781 +#line 107038 "configure"
16782  #include "confdefs.h"
16783  
16784  #include <pthread.h>
16785 @@ -106748,7 +107052,7 @@
16786      return pthread_create(&thd, NULL, thread_routine, &data);
16787  } 
16788  EOF
16789 -if { (eval echo configure:106752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16790 +if { (eval echo configure:107056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16791  then
16792    
16793    pthreads_working=yes
16794 @@ -106768,7 +107072,7 @@
16795    CFLAGS=$save_CFLAGS
16796  
16797    echo $ac_n "checking for pthreads_cflags""... $ac_c" 1>&6
16798 -echo "configure:106772: checking for pthreads_cflags" >&5
16799 +echo "configure:107076: checking for pthreads_cflags" >&5
16800  if eval "test \"`echo '$''{'ac_cv_pthreads_cflags'+set}'`\" = set"; then
16801    echo $ac_n "(cached) $ac_c" 1>&6
16802  else
16803 @@ -106790,7 +107094,7 @@
16804  
16805  else
16806    cat > conftest.$ac_ext <<EOF
16807 -#line 106794 "configure"
16808 +#line 107098 "configure"
16809  #include "confdefs.h"
16810  
16811  #include <pthread.h>
16812 @@ -106808,7 +107112,7 @@
16813      return pthread_create(&thd, NULL, thread_routine, &data);
16814  } 
16815  EOF
16816 -if { (eval echo configure:106812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16817 +if { (eval echo configure:107116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16818  then
16819    
16820    pthreads_working=yes
16821 @@ -106838,7 +107142,7 @@
16822  echo "$ac_t""$ac_cv_pthreads_cflags" 1>&6
16823  
16824  echo $ac_n "checking for pthreads_lib""... $ac_c" 1>&6
16825 -echo "configure:106842: checking for pthreads_lib" >&5
16826 +echo "configure:107146: checking for pthreads_lib" >&5
16827  if eval "test \"`echo '$''{'ac_cv_pthreads_lib'+set}'`\" = set"; then
16828    echo $ac_n "(cached) $ac_c" 1>&6
16829  else
16830 @@ -106860,7 +107164,7 @@
16831  
16832  else
16833    cat > conftest.$ac_ext <<EOF
16834 -#line 106864 "configure"
16835 +#line 107168 "configure"
16836  #include "confdefs.h"
16837  
16838  #include <pthread.h>
16839 @@ -106878,7 +107182,7 @@
16840      return pthread_create(&thd, NULL, thread_routine, &data);
16841  } 
16842  EOF
16843 -if { (eval echo configure:106882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16844 +if { (eval echo configure:107186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16845  then
16846    
16847    pthreads_working=yes
16848 @@ -106929,7 +107233,7 @@
16849  
16850  
16851    echo $ac_n "checking for POSIX threads""... $ac_c" 1>&6
16852 -echo "configure:106933: checking for POSIX threads" >&5
16853 +echo "configure:107237: checking for POSIX threads" >&5
16854    echo "$ac_t""yes" 1>&6
16855  fi
16856  
16857 @@ -107327,6 +107631,18 @@
16858  
16859  
16860    
16861 +  PHP_VAR_SUBST="$PHP_VAR_SUBST SAPI_EXTRA_LIBS"
16862 +
16863 +  
16864 +
16865 +
16866 +  
16867 +  PHP_VAR_SUBST="$PHP_VAR_SUBST SAPI_EXTRA_DEPS"
16868 +
16869 +  
16870 +
16871 +
16872 +  
16873    PHP_VAR_SUBST="$PHP_VAR_SUBST ZEND_EXTRA_LIBS"
16874  
16875    
16876 @@ -107542,7 +107858,7 @@
16877  
16878  
16879  echo $ac_n "checking build system type""... $ac_c" 1>&6
16880 -echo "configure:107546: checking build system type" >&5
16881 +echo "configure:107862: checking build system type" >&5
16882  
16883  build_alias=$build
16884  case "$build_alias" in
16885 @@ -107571,7 +107887,7 @@
16886  if test "$GCC" = yes; then
16887    # Check if gcc -print-prog-name=ld gives a path.
16888    echo $ac_n "checking for ld used by $CC""... $ac_c" 1>&6
16889 -echo "configure:107575: checking for ld used by $CC" >&5
16890 +echo "configure:107891: checking for ld used by $CC" >&5
16891    case $host in
16892    *-*-mingw*)
16893      # gcc leaves a trailing carriage return which upsets mingw
16894 @@ -107601,10 +107917,10 @@
16895    esac
16896  elif test "$with_gnu_ld" = yes; then
16897    echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
16898 -echo "configure:107605: checking for GNU ld" >&5
16899 +echo "configure:107921: checking for GNU ld" >&5
16900  else
16901    echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
16902 -echo "configure:107608: checking for non-GNU ld" >&5
16903 +echo "configure:107924: checking for non-GNU ld" >&5
16904  fi
16905  if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
16906    echo $ac_n "(cached) $ac_c" 1>&6
16907 @@ -107643,7 +107959,7 @@
16908  fi
16909  test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
16910  echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
16911 -echo "configure:107647: checking if the linker ($LD) is GNU ld" >&5
16912 +echo "configure:107963: checking if the linker ($LD) is GNU ld" >&5
16913  if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
16914    echo $ac_n "(cached) $ac_c" 1>&6
16915  else
16916 @@ -107663,7 +107979,7 @@
16917  
16918  
16919  echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
16920 -echo "configure:107667: checking for $LD option to reload object files" >&5
16921 +echo "configure:107983: checking for $LD option to reload object files" >&5
16922  if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
16923    echo $ac_n "(cached) $ac_c" 1>&6
16924  else
16925 @@ -107688,7 +108004,7 @@
16926  esac
16927  
16928  echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
16929 -echo "configure:107692: checking for BSD-compatible nm" >&5
16930 +echo "configure:108008: checking for BSD-compatible nm" >&5
16931  if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
16932    echo $ac_n "(cached) $ac_c" 1>&6
16933  else
16934 @@ -107734,7 +108050,7 @@
16935  NM="$lt_cv_path_NM"
16936  
16937  echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
16938 -echo "configure:107738: checking how to recognise dependent libraries" >&5
16939 +echo "configure:108054: checking how to recognise dependent libraries" >&5
16940  if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
16941    echo $ac_n "(cached) $ac_c" 1>&6
16942  else
16943 @@ -107912,13 +108228,13 @@
16944  test -z "$deplibs_check_method" && deplibs_check_method=unknown
16945  
16946  echo $ac_n "checking for object suffix""... $ac_c" 1>&6
16947 -echo "configure:107916: checking for object suffix" >&5
16948 +echo "configure:108232: checking for object suffix" >&5
16949  if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
16950    echo $ac_n "(cached) $ac_c" 1>&6
16951  else
16952    rm -f conftest*
16953  echo 'int i = 1;' > conftest.$ac_ext
16954 -if { (eval echo configure:107922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16955 +if { (eval echo configure:108238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16956    for ac_file in conftest.*; do
16957      case $ac_file in
16958      *.c) ;;
16959 @@ -107938,7 +108254,7 @@
16960  
16961  
16962  echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
16963 -echo "configure:107942: checking for executable suffix" >&5
16964 +echo "configure:108258: checking for executable suffix" >&5
16965  if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
16966    echo $ac_n "(cached) $ac_c" 1>&6
16967  else
16968 @@ -107948,7 +108264,7 @@
16969    rm -f conftest*
16970    echo 'int main () { return 0; }' > conftest.$ac_ext
16971    ac_cv_exeext=
16972 -  if { (eval echo configure:107952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
16973 +  if { (eval echo configure:108268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
16974      for file in conftest.*; do
16975        case $file in
16976        *.c | *.o | *.obj) ;;
16977 @@ -107991,7 +108307,7 @@
16978  ia64-*-hpux*)
16979    # Find out which ABI we are using.
16980    echo 'int i;' > conftest.$ac_ext
16981 -  if { (eval echo configure:107995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16982 +  if { (eval echo configure:108311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16983      case `/usr/bin/file conftest.$ac_objext` in
16984      *ELF-32*)
16985        HPUX_IA64_MODE="32"
16986 @@ -108005,8 +108321,8 @@
16987    ;;
16988  *-*-irix6*)
16989    # Find out which ABI we are using.
16990 -  echo '#line 108009 "configure"' > conftest.$ac_ext
16991 -  if { (eval echo configure:108010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16992 +  echo '#line 108325 "configure"' > conftest.$ac_ext
16993 +  if { (eval echo configure:108326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16994     if test "$lt_cv_prog_gnu_ld" = yes; then
16995      case `/usr/bin/file conftest.$ac_objext` in
16996      *32-bit*)
16997 @@ -108039,7 +108355,7 @@
16998  x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
16999    # Find out which ABI we are using.
17000    echo 'int i;' > conftest.$ac_ext
17001 -  if { (eval echo configure:108043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17002 +  if { (eval echo configure:108359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17003      case `/usr/bin/file conftest.o` in
17004      *32-bit*)
17005        case $host in
17006 @@ -108083,7 +108399,7 @@
17007    SAVE_CFLAGS="$CFLAGS"
17008    CFLAGS="$CFLAGS -belf"
17009    echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
17010 -echo "configure:108087: checking whether the C compiler needs -belf" >&5
17011 +echo "configure:108403: checking whether the C compiler needs -belf" >&5
17012  if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
17013    echo $ac_n "(cached) $ac_c" 1>&6
17014  else
17015 @@ -108096,14 +108412,14 @@
17016  cross_compiling=$ac_cv_prog_cc_cross
17017  
17018       cat > conftest.$ac_ext <<EOF
17019 -#line 108100 "configure"
17020 +#line 108416 "configure"
17021  #include "confdefs.h"
17022  
17023  int main() {
17024  
17025  ; return 0; }
17026  EOF
17027 -if { (eval echo configure:108107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17028 +if { (eval echo configure:108423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17029    rm -rf conftest*
17030    lt_cv_cc_needs_belf=yes
17031  else
17032 @@ -108141,7 +108457,7 @@
17033      ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
17034      (test "X$CXX" != "Xg++"))) ; then
17035    echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
17036 -echo "configure:108145: checking how to run the C++ preprocessor" >&5
17037 +echo "configure:108461: checking how to run the C++ preprocessor" >&5
17038  if test -z "$CXXCPP"; then
17039  if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
17040    echo $ac_n "(cached) $ac_c" 1>&6
17041 @@ -108154,12 +108470,12 @@
17042  cross_compiling=$ac_cv_prog_cxx_cross
17043    CXXCPP="${CXX-g++} -E"
17044    cat > conftest.$ac_ext <<EOF
17045 -#line 108158 "configure"
17046 +#line 108474 "configure"
17047  #include "confdefs.h"
17048  #include <stdlib.h>
17049  EOF
17050  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17051 -{ (eval echo configure:108163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17052 +{ (eval echo configure:108479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17053  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17054  if test -z "$ac_err"; then
17055    :
17056 @@ -108190,7 +108506,7 @@
17057  
17058  # find the maximum length of command line arguments
17059  echo $ac_n "checking the maximum length of command line arguments""... $ac_c" 1>&6
17060 -echo "configure:108194: checking the maximum length of command line arguments" >&5
17061 +echo "configure:108510: checking the maximum length of command line arguments" >&5
17062  if eval "test \"`echo '$''{'lt_cv_sys_max_cmd_len'+set}'`\" = set"; then
17063    echo $ac_n "(cached) $ac_c" 1>&6
17064  else
17065 @@ -108291,7 +108607,7 @@
17066  
17067  # Check for command to grab the raw symbol name followed by C symbol from nm.
17068  echo $ac_n "checking command to parse $NM output from $compiler object""... $ac_c" 1>&6
17069 -echo "configure:108295: checking command to parse $NM output from $compiler object" >&5
17070 +echo "configure:108611: checking command to parse $NM output from $compiler object" >&5
17071  if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
17072    echo $ac_n "(cached) $ac_c" 1>&6
17073  else
17074 @@ -108386,10 +108702,10 @@
17075  int main(){nm_test_var='a';nm_test_func();return(0);}
17076  EOF
17077  
17078 -  if { (eval echo configure:108390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17079 +  if { (eval echo configure:108706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17080      # Now try to grab the symbols.
17081      nlist=conftest.nm
17082 -    if { (eval echo configure:108393: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
17083 +    if { (eval echo configure:108709: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
17084        # Try sorting and uniquifying the output.
17085        if sort "$nlist" | uniq > "$nlist"T; then
17086         mv -f "$nlist"T "$nlist"
17087 @@ -108440,7 +108756,7 @@
17088           lt_save_CFLAGS="$CFLAGS"
17089           LIBS="conftstm.$ac_objext"
17090           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
17091 -         if { (eval echo configure:108444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17092 +         if { (eval echo configure:108760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17093             pipe_works=yes
17094           fi
17095           LIBS="$lt_save_LIBS"
17096 @@ -108480,7 +108796,7 @@
17097  fi
17098  
17099  echo $ac_n "checking for objdir""... $ac_c" 1>&6
17100 -echo "configure:108484: checking for objdir" >&5
17101 +echo "configure:108800: checking for objdir" >&5
17102  if eval "test \"`echo '$''{'lt_cv_objdir'+set}'`\" = set"; then
17103    echo $ac_n "(cached) $ac_c" 1>&6
17104  else
17105 @@ -108546,7 +108862,7 @@
17106  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
17107  set dummy ${ac_tool_prefix}ar; ac_word=$2
17108  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
17109 -echo "configure:108550: checking for $ac_word" >&5
17110 +echo "configure:108866: checking for $ac_word" >&5
17111  if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
17112    echo $ac_n "(cached) $ac_c" 1>&6
17113  else
17114 @@ -108578,7 +108894,7 @@
17115    # Extract the first word of "ar", so it can be a program name with args.
17116  set dummy ar; ac_word=$2
17117  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
17118 -echo "configure:108582: checking for $ac_word" >&5
17119 +echo "configure:108898: checking for $ac_word" >&5
17120  if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
17121    echo $ac_n "(cached) $ac_c" 1>&6
17122  else
17123 @@ -108613,7 +108929,7 @@
17124  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
17125  set dummy ${ac_tool_prefix}ranlib; ac_word=$2
17126  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
17127 -echo "configure:108617: checking for $ac_word" >&5
17128 +echo "configure:108933: checking for $ac_word" >&5
17129  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
17130    echo $ac_n "(cached) $ac_c" 1>&6
17131  else
17132 @@ -108645,7 +108961,7 @@
17133    # Extract the first word of "ranlib", so it can be a program name with args.
17134  set dummy ranlib; ac_word=$2
17135  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
17136 -echo "configure:108649: checking for $ac_word" >&5
17137 +echo "configure:108965: checking for $ac_word" >&5
17138  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
17139    echo $ac_n "(cached) $ac_c" 1>&6
17140  else
17141 @@ -108680,7 +108996,7 @@
17142  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
17143  set dummy ${ac_tool_prefix}strip; ac_word=$2
17144  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
17145 -echo "configure:108684: checking for $ac_word" >&5
17146 +echo "configure:109000: checking for $ac_word" >&5
17147  if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
17148    echo $ac_n "(cached) $ac_c" 1>&6
17149  else
17150 @@ -108712,7 +109028,7 @@
17151    # Extract the first word of "strip", so it can be a program name with args.
17152  set dummy strip; ac_word=$2
17153  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
17154 -echo "configure:108716: checking for $ac_word" >&5
17155 +echo "configure:109032: checking for $ac_word" >&5
17156  if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
17157    echo $ac_n "(cached) $ac_c" 1>&6
17158  else
17159 @@ -108798,7 +109114,7 @@
17160  file_magic*)
17161    if test "$file_magic_cmd" = '$MAGIC_CMD'; then
17162      echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
17163 -echo "configure:108802: checking for ${ac_tool_prefix}file" >&5
17164 +echo "configure:109118: checking for ${ac_tool_prefix}file" >&5
17165  if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
17166    echo $ac_n "(cached) $ac_c" 1>&6
17167  else
17168 @@ -108858,7 +109174,7 @@
17169  if test -z "$lt_cv_path_MAGIC_CMD"; then
17170    if test -n "$ac_tool_prefix"; then
17171      echo $ac_n "checking for file""... $ac_c" 1>&6
17172 -echo "configure:108862: checking for file" >&5
17173 +echo "configure:109178: checking for file" >&5
17174  if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
17175    echo $ac_n "(cached) $ac_c" 1>&6
17176  else
17177 @@ -109017,7 +109333,7 @@
17178  # Check to make sure the static flag actually works.
17179  #
17180  echo $ac_n "checking if $compiler static flag $lt_prog_compiler_static works""... $ac_c" 1>&6
17181 -echo "configure:109021: checking if $compiler static flag $lt_prog_compiler_static works" >&5
17182 +echo "configure:109337: checking if $compiler static flag $lt_prog_compiler_static works" >&5
17183  if eval "test \"`echo '$''{'lt_prog_compiler_static_works'+set}'`\" = set"; then
17184    echo $ac_n "(cached) $ac_c" 1>&6
17185  else
17186 @@ -109067,7 +109383,7 @@
17187  
17188    
17189  echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
17190 -echo "configure:109071: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
17191 +echo "configure:109387: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
17192  if eval "test \"`echo '$''{'lt_cv_prog_compiler_rtti_exceptions'+set}'`\" = set"; then
17193    echo $ac_n "(cached) $ac_c" 1>&6
17194  else
17195 @@ -109084,11 +109400,11 @@
17196     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17197     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17198     -e 's:$: $lt_compiler_flag:'`
17199 -   (eval echo "\"configure:109088: $lt_compile\"" >&5)
17200 +   (eval echo "\"configure:109404: $lt_compile\"" >&5)
17201     (eval "$lt_compile" 2>conftest.err)
17202     ac_status=$?
17203     cat conftest.err >&5
17204 -   echo "configure:109092: \$? = $ac_status" >&5
17205 +   echo "configure:109408: \$? = $ac_status" >&5
17206     if (exit $ac_status) && test -s "$ac_outfile"; then
17207       # The compiler can only warn and ignore the option if not recognized
17208       # So say no if there are warnings other than the usual output.
17209 @@ -109117,7 +109433,7 @@
17210  lt_prog_compiler_static=
17211  
17212  echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
17213 -echo "configure:109121: checking for $compiler option to produce PIC" >&5
17214 +echo "configure:109437: checking for $compiler option to produce PIC" >&5
17215   
17216    if test "$GCC" = yes; then
17217      lt_prog_compiler_wl='-Wl,'
17218 @@ -109328,7 +109644,7 @@
17219  if test -n "$lt_prog_compiler_pic"; then
17220    
17221  echo $ac_n "checking if $compiler PIC flag $lt_prog_compiler_pic works""... $ac_c" 1>&6
17222 -echo "configure:109332: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
17223 +echo "configure:109648: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
17224  if eval "test \"`echo '$''{'lt_prog_compiler_pic_works'+set}'`\" = set"; then
17225    echo $ac_n "(cached) $ac_c" 1>&6
17226  else
17227 @@ -109345,11 +109661,11 @@
17228     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17229     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17230     -e 's:$: $lt_compiler_flag:'`
17231 -   (eval echo "\"configure:109349: $lt_compile\"" >&5)
17232 +   (eval echo "\"configure:109665: $lt_compile\"" >&5)
17233     (eval "$lt_compile" 2>conftest.err)
17234     ac_status=$?
17235     cat conftest.err >&5
17236 -   echo "configure:109353: \$? = $ac_status" >&5
17237 +   echo "configure:109669: \$? = $ac_status" >&5
17238     if (exit $ac_status) && test -s "$ac_outfile"; then
17239       # The compiler can only warn and ignore the option if not recognized
17240       # So say no if there are warnings other than the usual output.
17241 @@ -109387,7 +109703,7 @@
17242  esac
17243  
17244  echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
17245 -echo "configure:109391: checking if $compiler supports -c -o file.$ac_objext" >&5
17246 +echo "configure:109707: checking if $compiler supports -c -o file.$ac_objext" >&5
17247  if eval "test \"`echo '$''{'lt_cv_prog_compiler_c_o'+set}'`\" = set"; then
17248    echo $ac_n "(cached) $ac_c" 1>&6
17249  else
17250 @@ -109407,11 +109723,11 @@
17251     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17252     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17253     -e 's:$: $lt_compiler_flag:'`
17254 -   (eval echo "\"configure:109411: $lt_compile\"" >&5)
17255 +   (eval echo "\"configure:109727: $lt_compile\"" >&5)
17256     (eval "$lt_compile" 2>out/conftest.err)
17257     ac_status=$?
17258     cat out/conftest.err >&5
17259 -   echo "configure:109415: \$? = $ac_status" >&5
17260 +   echo "configure:109731: \$? = $ac_status" >&5
17261     if (exit $ac_status) && test -s out/conftest2.$ac_objext
17262     then
17263       # The compiler can only warn and ignore the option if not recognized
17264 @@ -109441,7 +109757,7 @@
17265  if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
17266    # do not overwrite the value of need_locks provided by the user
17267    echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
17268 -echo "configure:109445: checking if we can lock with hard links" >&5
17269 +echo "configure:109761: checking if we can lock with hard links" >&5
17270    hard_links=yes
17271    $rm conftest*
17272    ln conftest.a conftest.b 2>/dev/null && hard_links=no
17273 @@ -109458,7 +109774,7 @@
17274  fi
17275  
17276  echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6
17277 -echo "configure:109462: checking whether the $compiler linker ($LD) supports shared libraries" >&5
17278 +echo "configure:109778: checking whether the $compiler linker ($LD) supports shared libraries" >&5
17279  
17280    runpath_var=
17281    allow_undefined_flag=
17282 @@ -109811,12 +110127,12 @@
17283         # Determine the default libpath from the value encoded in an empty executable.
17284         
17285  cat > conftest.$ac_ext <<EOF
17286 -#line 109815 "configure"
17287 +#line 110131 "configure"
17288  #include "confdefs.h"
17289  int main() {
17290  ; return 0; }
17291  EOF
17292 -if { (eval echo configure:109820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17293 +if { (eval echo configure:110136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17294    
17295  aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
17296  }'`
17297 @@ -109842,12 +110158,12 @@
17298          # Determine the default libpath from the value encoded in an empty executable.
17299          
17300  cat > conftest.$ac_ext <<EOF
17301 -#line 109846 "configure"
17302 +#line 110162 "configure"
17303  #include "confdefs.h"
17304  int main() {
17305  ; return 0; }
17306  EOF
17307 -if { (eval echo configure:109851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17308 +if { (eval echo configure:110167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17309    
17310  aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
17311  }'`
17312 @@ -110319,11 +110635,11 @@
17313        # systems, -lgcc has to come before -lc. If gcc already passes -lc
17314        # to ld, don't add -lc before -lgcc.
17315        echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
17316 -echo "configure:110323: checking whether -lc should be explicitly linked in" >&5
17317 +echo "configure:110639: checking whether -lc should be explicitly linked in" >&5
17318        $rm conftest*
17319        printf "$lt_simple_compile_test_code" > conftest.$ac_ext
17320  
17321 -      if { (eval echo configure:110327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then
17322 +      if { (eval echo configure:110643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then
17323          soname=conftest
17324          lib=conftest
17325          libobjs=conftest.$ac_objext
17326 @@ -110336,7 +110652,7 @@
17327          libname=conftest
17328          lt_save_allow_undefined_flag=$allow_undefined_flag
17329          allow_undefined_flag=
17330 -        if { (eval echo configure:110340: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
17331 +        if { (eval echo configure:110656: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
17332          then
17333           archive_cmds_need_lc=no
17334          else
17335 @@ -110355,7 +110671,7 @@
17336  esac
17337  
17338  echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
17339 -echo "configure:110359: checking dynamic linker characteristics" >&5
17340 +echo "configure:110675: checking dynamic linker characteristics" >&5
17341  library_names_spec=
17342  libname_spec='lib$name'
17343  soname_spec=
17344 @@ -110729,8 +111045,8 @@
17345    libsuff=
17346    case $host_cpu in
17347    x86_64*|s390x*|powerpc64*)
17348 -    echo '#line 110733 "configure"' > conftest.$ac_ext
17349 -    if { (eval echo configure:110734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17350 +    echo '#line 111049 "configure"' > conftest.$ac_ext
17351 +    if { (eval echo configure:111050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17352        case `/usr/bin/file conftest.$ac_objext` in
17353        *64-bit*)
17354          libsuff=64
17355 @@ -110929,7 +111245,7 @@
17356  test "$dynamic_linker" = no && can_build_shared=no
17357  
17358  echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
17359 -echo "configure:110933: checking how to hardcode library paths into programs" >&5
17360 +echo "configure:111249: checking how to hardcode library paths into programs" >&5
17361  hardcode_action=
17362  if test -n "$hardcode_libdir_flag_spec" || \
17363     test -n "$runpath_var" || \
17364 @@ -110967,7 +111283,7 @@
17365  striplib=
17366  old_striplib=
17367  echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
17368 -echo "configure:110971: checking whether stripping libraries is possible" >&5
17369 +echo "configure:111287: checking whether stripping libraries is possible" >&5
17370  if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
17371    test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
17372    test -z "$striplib" && striplib="$STRIP --strip-unneeded"
17373 @@ -111017,7 +111333,7 @@
17374    darwin*)
17375    # if libdl is installed we need to link against it
17376      echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
17377 -echo "configure:111021: checking for dlopen in -ldl" >&5
17378 +echo "configure:111337: checking for dlopen in -ldl" >&5
17379  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
17380  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
17381    echo $ac_n "(cached) $ac_c" 1>&6
17382 @@ -111025,7 +111341,7 @@
17383    ac_save_LIBS="$LIBS"
17384  LIBS="-ldl  $LIBS"
17385  cat > conftest.$ac_ext <<EOF
17386 -#line 111029 "configure"
17387 +#line 111345 "configure"
17388  #include "confdefs.h"
17389  /* Override any gcc2 internal prototype to avoid an error.  */
17390  /* We use char because int might match the return type of a gcc2
17391 @@ -111036,7 +111352,7 @@
17392  dlopen()
17393  ; return 0; }
17394  EOF
17395 -if { (eval echo configure:111040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17396 +if { (eval echo configure:111356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17397    rm -rf conftest*
17398    eval "ac_cv_lib_$ac_lib_var=yes"
17399  else
17400 @@ -111065,12 +111381,12 @@
17401  
17402    *)
17403      echo $ac_n "checking for shl_load""... $ac_c" 1>&6
17404 -echo "configure:111069: checking for shl_load" >&5
17405 +echo "configure:111385: checking for shl_load" >&5
17406  if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
17407    echo $ac_n "(cached) $ac_c" 1>&6
17408  else
17409    cat > conftest.$ac_ext <<EOF
17410 -#line 111074 "configure"
17411 +#line 111390 "configure"
17412  #include "confdefs.h"
17413  /* System header to define __stub macros and hopefully few prototypes,
17414      which can conflict with char shl_load(); below.  */
17415 @@ -111093,7 +111409,7 @@
17416  
17417  ; return 0; }
17418  EOF
17419 -if { (eval echo configure:111097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17420 +if { (eval echo configure:111413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17421    rm -rf conftest*
17422    eval "ac_cv_func_shl_load=yes"
17423  else
17424 @@ -111111,7 +111427,7 @@
17425  else
17426    echo "$ac_t""no" 1>&6
17427  echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
17428 -echo "configure:111115: checking for shl_load in -ldld" >&5
17429 +echo "configure:111431: checking for shl_load in -ldld" >&5
17430  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
17431  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
17432    echo $ac_n "(cached) $ac_c" 1>&6
17433 @@ -111119,7 +111435,7 @@
17434    ac_save_LIBS="$LIBS"
17435  LIBS="-ldld  $LIBS"
17436  cat > conftest.$ac_ext <<EOF
17437 -#line 111123 "configure"
17438 +#line 111439 "configure"
17439  #include "confdefs.h"
17440  /* Override any gcc2 internal prototype to avoid an error.  */
17441  /* We use char because int might match the return type of a gcc2
17442 @@ -111130,7 +111446,7 @@
17443  shl_load()
17444  ; return 0; }
17445  EOF
17446 -if { (eval echo configure:111134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17447 +if { (eval echo configure:111450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17448    rm -rf conftest*
17449    eval "ac_cv_lib_$ac_lib_var=yes"
17450  else
17451 @@ -111149,12 +111465,12 @@
17452  else
17453    echo "$ac_t""no" 1>&6
17454  echo $ac_n "checking for dlopen""... $ac_c" 1>&6
17455 -echo "configure:111153: checking for dlopen" >&5
17456 +echo "configure:111469: checking for dlopen" >&5
17457  if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
17458    echo $ac_n "(cached) $ac_c" 1>&6
17459  else
17460    cat > conftest.$ac_ext <<EOF
17461 -#line 111158 "configure"
17462 +#line 111474 "configure"
17463  #include "confdefs.h"
17464  /* System header to define __stub macros and hopefully few prototypes,
17465      which can conflict with char dlopen(); below.  */
17466 @@ -111177,7 +111493,7 @@
17467  
17468  ; return 0; }
17469  EOF
17470 -if { (eval echo configure:111181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17471 +if { (eval echo configure:111497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17472    rm -rf conftest*
17473    eval "ac_cv_func_dlopen=yes"
17474  else
17475 @@ -111195,7 +111511,7 @@
17476  else
17477    echo "$ac_t""no" 1>&6
17478  echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
17479 -echo "configure:111199: checking for dlopen in -ldl" >&5
17480 +echo "configure:111515: checking for dlopen in -ldl" >&5
17481  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
17482  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
17483    echo $ac_n "(cached) $ac_c" 1>&6
17484 @@ -111203,7 +111519,7 @@
17485    ac_save_LIBS="$LIBS"
17486  LIBS="-ldl  $LIBS"
17487  cat > conftest.$ac_ext <<EOF
17488 -#line 111207 "configure"
17489 +#line 111523 "configure"
17490  #include "confdefs.h"
17491  /* Override any gcc2 internal prototype to avoid an error.  */
17492  /* We use char because int might match the return type of a gcc2
17493 @@ -111214,7 +111530,7 @@
17494  dlopen()
17495  ; return 0; }
17496  EOF
17497 -if { (eval echo configure:111218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17498 +if { (eval echo configure:111534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17499    rm -rf conftest*
17500    eval "ac_cv_lib_$ac_lib_var=yes"
17501  else
17502 @@ -111233,7 +111549,7 @@
17503  else
17504    echo "$ac_t""no" 1>&6
17505  echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
17506 -echo "configure:111237: checking for dlopen in -lsvld" >&5
17507 +echo "configure:111553: checking for dlopen in -lsvld" >&5
17508  ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'`
17509  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
17510    echo $ac_n "(cached) $ac_c" 1>&6
17511 @@ -111241,7 +111557,7 @@
17512    ac_save_LIBS="$LIBS"
17513  LIBS="-lsvld  $LIBS"
17514  cat > conftest.$ac_ext <<EOF
17515 -#line 111245 "configure"
17516 +#line 111561 "configure"
17517  #include "confdefs.h"
17518  /* Override any gcc2 internal prototype to avoid an error.  */
17519  /* We use char because int might match the return type of a gcc2
17520 @@ -111252,7 +111568,7 @@
17521  dlopen()
17522  ; return 0; }
17523  EOF
17524 -if { (eval echo configure:111256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17525 +if { (eval echo configure:111572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17526    rm -rf conftest*
17527    eval "ac_cv_lib_$ac_lib_var=yes"
17528  else
17529 @@ -111271,7 +111587,7 @@
17530  else
17531    echo "$ac_t""no" 1>&6
17532  echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
17533 -echo "configure:111275: checking for dld_link in -ldld" >&5
17534 +echo "configure:111591: checking for dld_link in -ldld" >&5
17535  ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
17536  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
17537    echo $ac_n "(cached) $ac_c" 1>&6
17538 @@ -111279,7 +111595,7 @@
17539    ac_save_LIBS="$LIBS"
17540  LIBS="-ldld  $LIBS"
17541  cat > conftest.$ac_ext <<EOF
17542 -#line 111283 "configure"
17543 +#line 111599 "configure"
17544  #include "confdefs.h"
17545  /* Override any gcc2 internal prototype to avoid an error.  */
17546  /* We use char because int might match the return type of a gcc2
17547 @@ -111290,7 +111606,7 @@
17548  dld_link()
17549  ; return 0; }
17550  EOF
17551 -if { (eval echo configure:111294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17552 +if { (eval echo configure:111610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17553    rm -rf conftest*
17554    eval "ac_cv_lib_$ac_lib_var=yes"
17555  else
17556 @@ -111346,7 +111662,7 @@
17557      LIBS="$lt_cv_dlopen_libs $LIBS"
17558  
17559      echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
17560 -echo "configure:111350: checking whether a program can dlopen itself" >&5
17561 +echo "configure:111666: checking whether a program can dlopen itself" >&5
17562  if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then
17563    echo $ac_n "(cached) $ac_c" 1>&6
17564  else
17565 @@ -111356,7 +111672,7 @@
17566    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17567    lt_status=$lt_dlunknown
17568    cat > conftest.$ac_ext <<EOF
17569 -#line 111360 "configure"
17570 +#line 111676 "configure"
17571  #include "confdefs.h"
17572  
17573  #if HAVE_DLFCN_H
17574 @@ -111417,7 +111733,7 @@
17575      exit (status);
17576  }
17577  EOF
17578 -  if { (eval echo configure:111421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
17579 +  if { (eval echo configure:111737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
17580      (./conftest; exit; ) >&5 2>/dev/null
17581      lt_status=$?
17582      case x$lt_status in
17583 @@ -111440,7 +111756,7 @@
17584      if test "x$lt_cv_dlopen_self" = xyes; then
17585        LDFLAGS="$LDFLAGS $link_static_flag"
17586        echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
17587 -echo "configure:111444: checking whether a statically linked program can dlopen itself" >&5
17588 +echo "configure:111760: checking whether a statically linked program can dlopen itself" >&5
17589  if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then
17590    echo $ac_n "(cached) $ac_c" 1>&6
17591  else
17592 @@ -111450,7 +111766,7 @@
17593    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17594    lt_status=$lt_dlunknown
17595    cat > conftest.$ac_ext <<EOF
17596 -#line 111454 "configure"
17597 +#line 111770 "configure"
17598  #include "confdefs.h"
17599  
17600  #if HAVE_DLFCN_H
17601 @@ -111511,7 +111827,7 @@
17602      exit (status);
17603  }
17604  EOF
17605 -  if { (eval echo configure:111515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
17606 +  if { (eval echo configure:111831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
17607      (./conftest; exit; ) >&5 2>/dev/null
17608      lt_status=$?
17609      case x$lt_status in
17610 @@ -111552,11 +111868,11 @@
17611  
17612  # Report which librarie types wil actually be built
17613  echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
17614 -echo "configure:111556: checking if libtool supports shared libraries" >&5
17615 +echo "configure:111872: checking if libtool supports shared libraries" >&5
17616  echo "$ac_t""$can_build_shared" 1>&6
17617  
17618  echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
17619 -echo "configure:111560: checking whether to build shared libraries" >&5
17620 +echo "configure:111876: checking whether to build shared libraries" >&5
17621  test "$can_build_shared" = "no" && enable_shared=no
17622  
17623  # On AIX, shared libraries and static libraries use the same namespace, and
17624 @@ -111579,7 +111895,7 @@
17625  echo "$ac_t""$enable_shared" 1>&6
17626  
17627  echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
17628 -echo "configure:111583: checking whether to build static libraries" >&5
17629 +echo "configure:111899: checking whether to build static libraries" >&5
17630  # Make sure either enable_shared or enable_static is yes.
17631  test "$enable_shared" = yes || enable_static=yes
17632  echo "$ac_t""$enable_static" 1>&6
17633 @@ -112248,7 +112564,7 @@
17634  if test "$GCC" = yes; then
17635    # Check if gcc -print-prog-name=ld gives a path.
17636    echo $ac_n "checking for ld used by $CC""... $ac_c" 1>&6
17637 -echo "configure:112252: checking for ld used by $CC" >&5
17638 +echo "configure:112568: checking for ld used by $CC" >&5
17639    case $host in
17640    *-*-mingw*)
17641      # gcc leaves a trailing carriage return which upsets mingw
17642 @@ -112278,10 +112594,10 @@
17643    esac
17644  elif test "$with_gnu_ld" = yes; then
17645    echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
17646 -echo "configure:112282: checking for GNU ld" >&5
17647 +echo "configure:112598: checking for GNU ld" >&5
17648  else
17649    echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
17650 -echo "configure:112285: checking for non-GNU ld" >&5
17651 +echo "configure:112601: checking for non-GNU ld" >&5
17652  fi
17653  if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
17654    echo $ac_n "(cached) $ac_c" 1>&6
17655 @@ -112320,7 +112636,7 @@
17656  fi
17657  test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
17658  echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
17659 -echo "configure:112324: checking if the linker ($LD) is GNU ld" >&5
17660 +echo "configure:112640: checking if the linker ($LD) is GNU ld" >&5
17661  if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
17662    echo $ac_n "(cached) $ac_c" 1>&6
17663  else
17664 @@ -112386,7 +112702,7 @@
17665  
17666  # PORTME: fill in a description of your system's C++ link characteristics
17667  echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6
17668 -echo "configure:112390: checking whether the $compiler linker ($LD) supports shared libraries" >&5
17669 +echo "configure:112706: checking whether the $compiler linker ($LD) supports shared libraries" >&5
17670  ld_shlibs_CXX=yes
17671  case $host_os in
17672    aix3*)
17673 @@ -112482,12 +112798,12 @@
17674        # Determine the default libpath from the value encoded in an empty executable.
17675        
17676  cat > conftest.$ac_ext <<EOF
17677 -#line 112486 "configure"
17678 +#line 112802 "configure"
17679  #include "confdefs.h"
17680  int main() {
17681  ; return 0; }
17682  EOF
17683 -if { (eval echo configure:112491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17684 +if { (eval echo configure:112807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17685    
17686  aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
17687  }'`
17688 @@ -112514,12 +112830,12 @@
17689         # Determine the default libpath from the value encoded in an empty executable.
17690         
17691  cat > conftest.$ac_ext <<EOF
17692 -#line 112518 "configure"
17693 +#line 112834 "configure"
17694  #include "confdefs.h"
17695  int main() {
17696  ; return 0; }
17697  EOF
17698 -if { (eval echo configure:112523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17699 +if { (eval echo configure:112839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17700    
17701  aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
17702  }'`
17703 @@ -113226,7 +113542,7 @@
17704  };
17705  EOF
17706  
17707 -if { (eval echo configure:113230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17708 +if { (eval echo configure:113546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17709    # Parse the compiler output and extract the necessary
17710    # objects, libraries and library flags.
17711  
17712 @@ -113336,7 +113652,7 @@
17713  lt_prog_compiler_static_CXX=
17714  
17715  echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
17716 -echo "configure:113340: checking for $compiler option to produce PIC" >&5
17717 +echo "configure:113656: checking for $compiler option to produce PIC" >&5
17718   
17719    # C++ specific cases for pic, static, wl, etc.
17720    if test "$GXX" = yes; then
17721 @@ -113611,7 +113927,7 @@
17722  if test -n "$lt_prog_compiler_pic_CXX"; then
17723    
17724  echo $ac_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works""... $ac_c" 1>&6
17725 -echo "configure:113615: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
17726 +echo "configure:113931: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
17727  if eval "test \"`echo '$''{'lt_prog_compiler_pic_works_CXX'+set}'`\" = set"; then
17728    echo $ac_n "(cached) $ac_c" 1>&6
17729  else
17730 @@ -113628,11 +113944,11 @@
17731     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17732     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17733     -e 's:$: $lt_compiler_flag:'`
17734 -   (eval echo "\"configure:113632: $lt_compile\"" >&5)
17735 +   (eval echo "\"configure:113948: $lt_compile\"" >&5)
17736     (eval "$lt_compile" 2>conftest.err)
17737     ac_status=$?
17738     cat conftest.err >&5
17739 -   echo "configure:113636: \$? = $ac_status" >&5
17740 +   echo "configure:113952: \$? = $ac_status" >&5
17741     if (exit $ac_status) && test -s "$ac_outfile"; then
17742       # The compiler can only warn and ignore the option if not recognized
17743       # So say no if there are warnings other than the usual output.
17744 @@ -113670,7 +113986,7 @@
17745  esac
17746  
17747  echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
17748 -echo "configure:113674: checking if $compiler supports -c -o file.$ac_objext" >&5
17749 +echo "configure:113990: checking if $compiler supports -c -o file.$ac_objext" >&5
17750  if eval "test \"`echo '$''{'lt_cv_prog_compiler_c_o_CXX'+set}'`\" = set"; then
17751    echo $ac_n "(cached) $ac_c" 1>&6
17752  else
17753 @@ -113690,11 +114006,11 @@
17754     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17755     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17756     -e 's:$: $lt_compiler_flag:'`
17757 -   (eval echo "\"configure:113694: $lt_compile\"" >&5)
17758 +   (eval echo "\"configure:114010: $lt_compile\"" >&5)
17759     (eval "$lt_compile" 2>out/conftest.err)
17760     ac_status=$?
17761     cat out/conftest.err >&5
17762 -   echo "configure:113698: \$? = $ac_status" >&5
17763 +   echo "configure:114014: \$? = $ac_status" >&5
17764     if (exit $ac_status) && test -s out/conftest2.$ac_objext
17765     then
17766       # The compiler can only warn and ignore the option if not recognized
17767 @@ -113724,7 +114040,7 @@
17768  if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
17769    # do not overwrite the value of need_locks provided by the user
17770    echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
17771 -echo "configure:113728: checking if we can lock with hard links" >&5
17772 +echo "configure:114044: checking if we can lock with hard links" >&5
17773    hard_links=yes
17774    $rm conftest*
17775    ln conftest.a conftest.b 2>/dev/null && hard_links=no
17776 @@ -113741,7 +114057,7 @@
17777  fi
17778  
17779  echo $ac_n "checking whether the $compiler linker ($LD) supports shared libraries""... $ac_c" 1>&6
17780 -echo "configure:113745: checking whether the $compiler linker ($LD) supports shared libraries" >&5
17781 +echo "configure:114061: checking whether the $compiler linker ($LD) supports shared libraries" >&5
17782  
17783    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
17784    case $host_os in
17785 @@ -113791,11 +114107,11 @@
17786        # systems, -lgcc has to come before -lc. If gcc already passes -lc
17787        # to ld, don't add -lc before -lgcc.
17788        echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
17789 -echo "configure:113795: checking whether -lc should be explicitly linked in" >&5
17790 +echo "configure:114111: checking whether -lc should be explicitly linked in" >&5
17791        $rm conftest*
17792        printf "$lt_simple_compile_test_code" > conftest.$ac_ext
17793  
17794 -      if { (eval echo configure:113799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then
17795 +      if { (eval echo configure:114115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } 2>conftest.err; then
17796          soname=conftest
17797          lib=conftest
17798          libobjs=conftest.$ac_objext
17799 @@ -113808,7 +114124,7 @@
17800          libname=conftest
17801          lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
17802          allow_undefined_flag_CXX=
17803 -        if { (eval echo configure:113812: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
17804 +        if { (eval echo configure:114128: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
17805          then
17806           archive_cmds_need_lc_CXX=no
17807          else
17808 @@ -113827,7 +114143,7 @@
17809  esac
17810  
17811  echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
17812 -echo "configure:113831: checking dynamic linker characteristics" >&5
17813 +echo "configure:114147: checking dynamic linker characteristics" >&5
17814  library_names_spec=
17815  libname_spec='lib$name'
17816  soname_spec=
17817 @@ -114201,8 +114517,8 @@
17818    libsuff=
17819    case $host_cpu in
17820    x86_64*|s390x*|powerpc64*)
17821 -    echo '#line 114205 "configure"' > conftest.$ac_ext
17822 -    if { (eval echo configure:114206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17823 +    echo '#line 114521 "configure"' > conftest.$ac_ext
17824 +    if { (eval echo configure:114522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
17825        case `/usr/bin/file conftest.$ac_objext` in
17826        *64-bit*)
17827          libsuff=64
17828 @@ -114401,7 +114717,7 @@
17829  test "$dynamic_linker" = no && can_build_shared=no
17830  
17831  echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
17832 -echo "configure:114405: checking how to hardcode library paths into programs" >&5
17833 +echo "configure:114721: checking how to hardcode library paths into programs" >&5
17834  hardcode_action_CXX=
17835  if test -n "$hardcode_libdir_flag_spec_CXX" || \
17836     test -n "$runpath_var_CXX" || \
17837 @@ -114439,7 +114755,7 @@
17838  striplib=
17839  old_striplib=
17840  echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
17841 -echo "configure:114443: checking whether stripping libraries is possible" >&5
17842 +echo "configure:114759: checking whether stripping libraries is possible" >&5
17843  if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
17844    test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
17845    test -z "$striplib" && striplib="$STRIP --strip-unneeded"
17846 @@ -114489,7 +114805,7 @@
17847    darwin*)
17848    # if libdl is installed we need to link against it
17849      echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
17850 -echo "configure:114493: checking for dlopen in -ldl" >&5
17851 +echo "configure:114809: checking for dlopen in -ldl" >&5
17852  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
17853  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
17854    echo $ac_n "(cached) $ac_c" 1>&6
17855 @@ -114497,7 +114813,7 @@
17856    ac_save_LIBS="$LIBS"
17857  LIBS="-ldl  $LIBS"
17858  cat > conftest.$ac_ext <<EOF
17859 -#line 114501 "configure"
17860 +#line 114817 "configure"
17861  #include "confdefs.h"
17862  /* Override any gcc2 internal prototype to avoid an error.  */
17863  #ifdef __cplusplus
17864 @@ -114511,7 +114827,7 @@
17865  dlopen()
17866  ; return 0; }
17867  EOF
17868 -if { (eval echo configure:114515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17869 +if { (eval echo configure:114831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17870    rm -rf conftest*
17871    eval "ac_cv_lib_$ac_lib_var=yes"
17872  else
17873 @@ -114540,12 +114856,12 @@
17874  
17875    *)
17876      echo $ac_n "checking for shl_load""... $ac_c" 1>&6
17877 -echo "configure:114544: checking for shl_load" >&5
17878 +echo "configure:114860: checking for shl_load" >&5
17879  if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
17880    echo $ac_n "(cached) $ac_c" 1>&6
17881  else
17882    cat > conftest.$ac_ext <<EOF
17883 -#line 114549 "configure"
17884 +#line 114865 "configure"
17885  #include "confdefs.h"
17886  /* System header to define __stub macros and hopefully few prototypes,
17887      which can conflict with char shl_load(); below.  */
17888 @@ -114571,7 +114887,7 @@
17889  
17890  ; return 0; }
17891  EOF
17892 -if { (eval echo configure:114575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17893 +if { (eval echo configure:114891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17894    rm -rf conftest*
17895    eval "ac_cv_func_shl_load=yes"
17896  else
17897 @@ -114589,7 +114905,7 @@
17898  else
17899    echo "$ac_t""no" 1>&6
17900  echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
17901 -echo "configure:114593: checking for shl_load in -ldld" >&5
17902 +echo "configure:114909: checking for shl_load in -ldld" >&5
17903  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
17904  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
17905    echo $ac_n "(cached) $ac_c" 1>&6
17906 @@ -114597,7 +114913,7 @@
17907    ac_save_LIBS="$LIBS"
17908  LIBS="-ldld  $LIBS"
17909  cat > conftest.$ac_ext <<EOF
17910 -#line 114601 "configure"
17911 +#line 114917 "configure"
17912  #include "confdefs.h"
17913  /* Override any gcc2 internal prototype to avoid an error.  */
17914  #ifdef __cplusplus
17915 @@ -114611,7 +114927,7 @@
17916  shl_load()
17917  ; return 0; }
17918  EOF
17919 -if { (eval echo configure:114615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17920 +if { (eval echo configure:114931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17921    rm -rf conftest*
17922    eval "ac_cv_lib_$ac_lib_var=yes"
17923  else
17924 @@ -114630,12 +114946,12 @@
17925  else
17926    echo "$ac_t""no" 1>&6
17927  echo $ac_n "checking for dlopen""... $ac_c" 1>&6
17928 -echo "configure:114634: checking for dlopen" >&5
17929 +echo "configure:114950: checking for dlopen" >&5
17930  if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
17931    echo $ac_n "(cached) $ac_c" 1>&6
17932  else
17933    cat > conftest.$ac_ext <<EOF
17934 -#line 114639 "configure"
17935 +#line 114955 "configure"
17936  #include "confdefs.h"
17937  /* System header to define __stub macros and hopefully few prototypes,
17938      which can conflict with char dlopen(); below.  */
17939 @@ -114661,7 +114977,7 @@
17940  
17941  ; return 0; }
17942  EOF
17943 -if { (eval echo configure:114665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17944 +if { (eval echo configure:114981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17945    rm -rf conftest*
17946    eval "ac_cv_func_dlopen=yes"
17947  else
17948 @@ -114679,7 +114995,7 @@
17949  else
17950    echo "$ac_t""no" 1>&6
17951  echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
17952 -echo "configure:114683: checking for dlopen in -ldl" >&5
17953 +echo "configure:114999: checking for dlopen in -ldl" >&5
17954  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
17955  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
17956    echo $ac_n "(cached) $ac_c" 1>&6
17957 @@ -114687,7 +115003,7 @@
17958    ac_save_LIBS="$LIBS"
17959  LIBS="-ldl  $LIBS"
17960  cat > conftest.$ac_ext <<EOF
17961 -#line 114691 "configure"
17962 +#line 115007 "configure"
17963  #include "confdefs.h"
17964  /* Override any gcc2 internal prototype to avoid an error.  */
17965  #ifdef __cplusplus
17966 @@ -114701,7 +115017,7 @@
17967  dlopen()
17968  ; return 0; }
17969  EOF
17970 -if { (eval echo configure:114705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17971 +if { (eval echo configure:115021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17972    rm -rf conftest*
17973    eval "ac_cv_lib_$ac_lib_var=yes"
17974  else
17975 @@ -114720,7 +115036,7 @@
17976  else
17977    echo "$ac_t""no" 1>&6
17978  echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
17979 -echo "configure:114724: checking for dlopen in -lsvld" >&5
17980 +echo "configure:115040: checking for dlopen in -lsvld" >&5
17981  ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'`
17982  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
17983    echo $ac_n "(cached) $ac_c" 1>&6
17984 @@ -114728,7 +115044,7 @@
17985    ac_save_LIBS="$LIBS"
17986  LIBS="-lsvld  $LIBS"
17987  cat > conftest.$ac_ext <<EOF
17988 -#line 114732 "configure"
17989 +#line 115048 "configure"
17990  #include "confdefs.h"
17991  /* Override any gcc2 internal prototype to avoid an error.  */
17992  #ifdef __cplusplus
17993 @@ -114742,7 +115058,7 @@
17994  dlopen()
17995  ; return 0; }
17996  EOF
17997 -if { (eval echo configure:114746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17998 +if { (eval echo configure:115062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17999    rm -rf conftest*
18000    eval "ac_cv_lib_$ac_lib_var=yes"
18001  else
18002 @@ -114761,7 +115077,7 @@
18003  else
18004    echo "$ac_t""no" 1>&6
18005  echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
18006 -echo "configure:114765: checking for dld_link in -ldld" >&5
18007 +echo "configure:115081: checking for dld_link in -ldld" >&5
18008  ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
18009  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
18010    echo $ac_n "(cached) $ac_c" 1>&6
18011 @@ -114769,7 +115085,7 @@
18012    ac_save_LIBS="$LIBS"
18013  LIBS="-ldld  $LIBS"
18014  cat > conftest.$ac_ext <<EOF
18015 -#line 114773 "configure"
18016 +#line 115089 "configure"
18017  #include "confdefs.h"
18018  /* Override any gcc2 internal prototype to avoid an error.  */
18019  #ifdef __cplusplus
18020 @@ -114783,7 +115099,7 @@
18021  dld_link()
18022  ; return 0; }
18023  EOF
18024 -if { (eval echo configure:114787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18025 +if { (eval echo configure:115103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18026    rm -rf conftest*
18027    eval "ac_cv_lib_$ac_lib_var=yes"
18028  else
18029 @@ -114839,7 +115155,7 @@
18030      LIBS="$lt_cv_dlopen_libs $LIBS"
18031  
18032      echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
18033 -echo "configure:114843: checking whether a program can dlopen itself" >&5
18034 +echo "configure:115159: checking whether a program can dlopen itself" >&5
18035  if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then
18036    echo $ac_n "(cached) $ac_c" 1>&6
18037  else
18038 @@ -114849,7 +115165,7 @@
18039    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18040    lt_status=$lt_dlunknown
18041    cat > conftest.$ac_ext <<EOF
18042 -#line 114853 "configure"
18043 +#line 115169 "configure"
18044  #include "confdefs.h"
18045  
18046  #if HAVE_DLFCN_H
18047 @@ -114910,7 +115226,7 @@
18048      exit (status);
18049  }
18050  EOF
18051 -  if { (eval echo configure:114914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
18052 +  if { (eval echo configure:115230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
18053      (./conftest; exit; ) >&5 2>/dev/null
18054      lt_status=$?
18055      case x$lt_status in
18056 @@ -114933,7 +115249,7 @@
18057      if test "x$lt_cv_dlopen_self" = xyes; then
18058        LDFLAGS="$LDFLAGS $link_static_flag"
18059        echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
18060 -echo "configure:114937: checking whether a statically linked program can dlopen itself" >&5
18061 +echo "configure:115253: checking whether a statically linked program can dlopen itself" >&5
18062  if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then
18063    echo $ac_n "(cached) $ac_c" 1>&6
18064  else
18065 @@ -114943,7 +115259,7 @@
18066    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18067    lt_status=$lt_dlunknown
18068    cat > conftest.$ac_ext <<EOF
18069 -#line 114947 "configure"
18070 +#line 115263 "configure"
18071  #include "confdefs.h"
18072  
18073  #if HAVE_DLFCN_H
18074 @@ -115004,7 +115320,7 @@
18075      exit (status);
18076  }
18077  EOF
18078 -  if { (eval echo configure:115008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
18079 +  if { (eval echo configure:115324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
18080      (./conftest; exit; ) >&5 2>/dev/null
18081      lt_status=$?
18082      case x$lt_status in
18083 @@ -115579,7 +115895,7 @@
18084      install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
18085      ;;
18086    *)
18087 -    install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets"
18088 +    install_targets="install-sapi $install_fpm $PHP_INSTALL_CLI_TARGET $install_targets"
18089      ;;
18090  esac
18091  
18092 @@ -116283,6 +116599,7 @@
18093  s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
18094  s%@SHLIB_SUFFIX_NAME@%$SHLIB_SUFFIX_NAME%g
18095  s%@SHLIB_DL_SUFFIX_NAME@%$SHLIB_DL_SUFFIX_NAME%g
18096 +s%@XMLCONFIG@%$XMLCONFIG%g
18097  s%@PROG_SENDMAIL@%$PROG_SENDMAIL%g
18098  s%@LIBOBJS@%$LIBOBJS%g
18099  s%@ALLOCA@%$ALLOCA%g
18100 @@ -116331,6 +116648,8 @@
18101  s%@EXTRA_LDFLAGS@%$EXTRA_LDFLAGS%g
18102  s%@EXTRA_LDFLAGS_PROGRAM@%$EXTRA_LDFLAGS_PROGRAM%g
18103  s%@EXTRA_LIBS@%$EXTRA_LIBS%g
18104 +s%@SAPI_EXTRA_LIBS@%$SAPI_EXTRA_LIBS%g
18105 +s%@SAPI_EXTRA_DEPS@%$SAPI_EXTRA_DEPS%g
18106  s%@ZEND_EXTRA_LIBS@%$ZEND_EXTRA_LIBS%g
18107  s%@INCLUDES@%$INCLUDES%g
18108  s%@EXTRA_INCLUDES@%$EXTRA_INCLUDES%g
18109 diff -Nru php-5.2.4.vanilla/configure.in php-5.2.4.fpm/configure.in
18110 --- php-5.2.4.vanilla/configure.in      2007-08-30 03:36:11.000000000 +0400
18111 +++ php-5.2.4.fpm/configure.in  2007-08-31 15:47:19.000000000 +0400
18112 @@ -267,6 +267,12 @@
18113    PTHREADS_FLAGS
18114  fi
18115  
18116 +if test "$PHP_FASTCGI" = "yes" -a "$PHP_FPM" = "yes"; then
18117 +  PHP_CONFIGURE_PART(Running FastCGI Process Manager checks)
18118 +  sinclude(sapi/cgi/fpm/acinclude.m4)
18119 +  sinclude(sapi/cgi/fpm/config.m4)
18120 +fi
18121 +
18122  divert(3)
18123  
18124  dnl ## In diversion 3 we check for compile-time options to the PHP
18125 @@ -476,6 +482,7 @@
18126  alphasort \
18127  asctime_r \
18128  chroot \
18129 +clearenv \
18130  ctime_r \
18131  cuserid \
18132  crypt \
18133 @@ -1197,6 +1204,8 @@
18134  PHP_SUBST_OLD(EXTRA_LDFLAGS)
18135  PHP_SUBST_OLD(EXTRA_LDFLAGS_PROGRAM)
18136  PHP_SUBST_OLD(EXTRA_LIBS)
18137 +PHP_SUBST_OLD(SAPI_EXTRA_LIBS)
18138 +PHP_SUBST_OLD(SAPI_EXTRA_DEPS)
18139  PHP_SUBST_OLD(ZEND_EXTRA_LIBS)
18140  PHP_SUBST_OLD(INCLUDES)
18141  PHP_SUBST_OLD(EXTRA_INCLUDES)
18142 @@ -1285,7 +1294,7 @@
18143      install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
18144      ;;
18145    *)
18146 -    install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets"
18147 +    install_targets="install-sapi $install_fpm $PHP_INSTALL_CLI_TARGET $install_targets"
18148      ;;
18149  esac
18150  
18151 diff -Nru php-5.2.4.vanilla/libevent/acconfig.h php-5.2.4.fpm/libevent/acconfig.h
18152 --- php-5.2.4.vanilla/libevent/acconfig.h       1970-01-01 03:00:00.000000000 +0300
18153 +++ php-5.2.4.fpm/libevent/acconfig.h   2007-08-31 15:47:19.000000000 +0400
18154 @@ -0,0 +1,67 @@
18155 +/* Define if kqueue works correctly with pipes */
18156 +#undef HAVE_WORKING_KQUEUE
18157 +
18158 +/* Define if timeradd is defined in <sys/time.h> */
18159 +#undef HAVE_TIMERADD
18160 +#ifndef HAVE_TIMERADD
18161 +#undef timersub
18162 +#define timeradd(tvp, uvp, vvp)                                                \
18163 +       do {                                                            \
18164 +               (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec;          \
18165 +               (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec;       \
18166 +               if ((vvp)->tv_usec >= 1000000) {                        \
18167 +                       (vvp)->tv_sec++;                                \
18168 +                       (vvp)->tv_usec -= 1000000;                      \
18169 +               }                                                       \
18170 +       } while (0)
18171 +#define        timersub(tvp, uvp, vvp)                                         \
18172 +       do {                                                            \
18173 +               (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec;          \
18174 +               (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec;       \
18175 +               if ((vvp)->tv_usec < 0) {                               \
18176 +                       (vvp)->tv_sec--;                                \
18177 +                       (vvp)->tv_usec += 1000000;                      \
18178 +               }                                                       \
18179 +       } while (0)
18180 +#endif /* !HAVE_TIMERADD */
18181 +
18182 +#undef HAVE_TIMERCLEAR
18183 +#ifndef HAVE_TIMERCLEAR
18184 +#define        timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
18185 +#endif
18186 +
18187 +#undef HAVE_TIMERCMP
18188 +#ifndef HAVE_TIMERCMP
18189 +#undef timercmp
18190 +#define        timercmp(tvp, uvp, cmp)                                         \
18191 +       (((tvp)->tv_sec == (uvp)->tv_sec) ?                             \
18192 +        ((tvp)->tv_usec cmp (uvp)->tv_usec) :                          \
18193 +        ((tvp)->tv_sec cmp (uvp)->tv_sec))
18194 +#endif
18195 +
18196 +#undef HAVE_TIMERISSET
18197 +#ifndef HAVE_TIMERISSET
18198 +#undef timerisset
18199 +#define        timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
18200 +#endif
18201 +
18202 +/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
18203 +#undef HAVE_TAILQFOREACH
18204 +#ifndef HAVE_TAILQFOREACH
18205 +#define        TAILQ_FIRST(head)               ((head)->tqh_first)
18206 +#define        TAILQ_END(head)                 NULL
18207 +#define        TAILQ_NEXT(elm, field)          ((elm)->field.tqe_next)
18208 +#define TAILQ_FOREACH(var, head, field)                                        \
18209 +       for((var) = TAILQ_FIRST(head);                                  \
18210 +           (var) != TAILQ_END(head);                                   \
18211 +           (var) = TAILQ_NEXT(var, field))
18212 +#define        TAILQ_INSERT_BEFORE(listelm, elm, field) do {                   \
18213 +       (elm)->field.tqe_prev = (listelm)->field.tqe_prev;              \
18214 +       (elm)->field.tqe_next = (listelm);                              \
18215 +       *(listelm)->field.tqe_prev = (elm);                             \
18216 +       (listelm)->field.tqe_prev = &(elm)->field.tqe_next;             \
18217 +} while (0)
18218 +#endif /* TAILQ_FOREACH */
18219 +
18220 +/* Define to __FUNCTION__ or __file__ if your compiler doesn't have __func__ */
18221 +#undef __func__
18222 diff -Nru php-5.2.4.vanilla/libevent/aclocal.m4 php-5.2.4.fpm/libevent/aclocal.m4
18223 --- php-5.2.4.vanilla/libevent/aclocal.m4       1970-01-01 03:00:00.000000000 +0300
18224 +++ php-5.2.4.fpm/libevent/aclocal.m4   2007-08-31 15:47:19.000000000 +0400
18225 @@ -0,0 +1,6922 @@
18226 +# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
18227 +
18228 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
18229 +# 2005  Free Software Foundation, Inc.
18230 +# This file is free software; the Free Software Foundation
18231 +# gives unlimited permission to copy and/or distribute it,
18232 +# with or without modifications, as long as this notice is preserved.
18233 +
18234 +# This program is distributed in the hope that it will be useful,
18235 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
18236 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
18237 +# PARTICULAR PURPOSE.
18238 +
18239 +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
18240 +
18241 +# serial 47 AC_PROG_LIBTOOL
18242 +
18243 +
18244 +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
18245 +# -----------------------------------------------------------
18246 +# If this macro is not defined by Autoconf, define it here.
18247 +m4_ifdef([AC_PROVIDE_IFELSE],
18248 +         [],
18249 +         [m4_define([AC_PROVIDE_IFELSE],
18250 +                [m4_ifdef([AC_PROVIDE_$1],
18251 +                          [$2], [$3])])])
18252 +
18253 +
18254 +# AC_PROG_LIBTOOL
18255 +# ---------------
18256 +AC_DEFUN([AC_PROG_LIBTOOL],
18257 +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
18258 +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
18259 +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
18260 +  AC_PROVIDE_IFELSE([AC_PROG_CXX],
18261 +    [AC_LIBTOOL_CXX],
18262 +    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
18263 +  ])])
18264 +dnl And a similar setup for Fortran 77 support
18265 +  AC_PROVIDE_IFELSE([AC_PROG_F77],
18266 +    [AC_LIBTOOL_F77],
18267 +    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
18268 +])])
18269 +
18270 +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
18271 +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
18272 +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
18273 +  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
18274 +    [AC_LIBTOOL_GCJ],
18275 +    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
18276 +      [AC_LIBTOOL_GCJ],
18277 +      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
18278 +       [AC_LIBTOOL_GCJ],
18279 +      [ifdef([AC_PROG_GCJ],
18280 +            [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
18281 +       ifdef([A][M_PROG_GCJ],
18282 +            [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
18283 +       ifdef([LT_AC_PROG_GCJ],
18284 +            [define([LT_AC_PROG_GCJ],
18285 +               defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
18286 +])])# AC_PROG_LIBTOOL
18287 +
18288 +
18289 +# _AC_PROG_LIBTOOL
18290 +# ----------------
18291 +AC_DEFUN([_AC_PROG_LIBTOOL],
18292 +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
18293 +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
18294 +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
18295 +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
18296 +
18297 +# This can be used to rebuild libtool when needed
18298 +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
18299 +
18300 +# Always use our own libtool.
18301 +LIBTOOL='$(SHELL) $(top_builddir)/libtool'
18302 +AC_SUBST(LIBTOOL)dnl
18303 +
18304 +# Prevent multiple expansion
18305 +define([AC_PROG_LIBTOOL], [])
18306 +])# _AC_PROG_LIBTOOL
18307 +
18308 +
18309 +# AC_LIBTOOL_SETUP
18310 +# ----------------
18311 +AC_DEFUN([AC_LIBTOOL_SETUP],
18312 +[AC_PREREQ(2.50)dnl
18313 +AC_REQUIRE([AC_ENABLE_SHARED])dnl
18314 +AC_REQUIRE([AC_ENABLE_STATIC])dnl
18315 +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
18316 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
18317 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
18318 +AC_REQUIRE([AC_PROG_CC])dnl
18319 +AC_REQUIRE([AC_PROG_LD])dnl
18320 +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
18321 +AC_REQUIRE([AC_PROG_NM])dnl
18322 +
18323 +AC_REQUIRE([AC_PROG_LN_S])dnl
18324 +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
18325 +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
18326 +AC_REQUIRE([AC_OBJEXT])dnl
18327 +AC_REQUIRE([AC_EXEEXT])dnl
18328 +dnl
18329 +
18330 +AC_LIBTOOL_SYS_MAX_CMD_LEN
18331 +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
18332 +AC_LIBTOOL_OBJDIR
18333 +
18334 +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
18335 +_LT_AC_PROG_ECHO_BACKSLASH
18336 +
18337 +case $host_os in
18338 +aix3*)
18339 +  # AIX sometimes has problems with the GCC collect2 program.  For some
18340 +  # reason, if we set the COLLECT_NAMES environment variable, the problems
18341 +  # vanish in a puff of smoke.
18342 +  if test "X${COLLECT_NAMES+set}" != Xset; then
18343 +    COLLECT_NAMES=
18344 +    export COLLECT_NAMES
18345 +  fi
18346 +  ;;
18347 +esac
18348 +
18349 +# Sed substitution that helps us do robust quoting.  It backslashifies
18350 +# metacharacters that are still active within double-quoted strings.
18351 +Xsed='sed -e s/^X//'
18352 +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
18353 +
18354 +# Same as above, but do not quote variable references.
18355 +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
18356 +
18357 +# Sed substitution to delay expansion of an escaped shell variable in a
18358 +# double_quote_subst'ed string.
18359 +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
18360 +
18361 +# Sed substitution to avoid accidental globbing in evaled expressions
18362 +no_glob_subst='s/\*/\\\*/g'
18363 +
18364 +# Constants:
18365 +rm="rm -f"
18366 +
18367 +# Global variables:
18368 +default_ofile=libtool
18369 +can_build_shared=yes
18370 +
18371 +# All known linkers require a `.a' archive for static linking (except M$VC,
18372 +# which needs '.lib').
18373 +libext=a
18374 +ltmain="$ac_aux_dir/ltmain.sh"
18375 +ofile="$default_ofile"
18376 +with_gnu_ld="$lt_cv_prog_gnu_ld"
18377 +
18378 +AC_CHECK_TOOL(AR, ar, false)
18379 +AC_CHECK_TOOL(RANLIB, ranlib, :)
18380 +AC_CHECK_TOOL(STRIP, strip, :)
18381 +
18382 +old_CC="$CC"
18383 +old_CFLAGS="$CFLAGS"
18384 +
18385 +# Set sane defaults for various variables
18386 +test -z "$AR" && AR=ar
18387 +test -z "$AR_FLAGS" && AR_FLAGS=cru
18388 +test -z "$AS" && AS=as
18389 +test -z "$CC" && CC=cc
18390 +test -z "$LTCC" && LTCC=$CC
18391 +test -z "$DLLTOOL" && DLLTOOL=dlltool
18392 +test -z "$LD" && LD=ld
18393 +test -z "$LN_S" && LN_S="ln -s"
18394 +test -z "$MAGIC_CMD" && MAGIC_CMD=file
18395 +test -z "$NM" && NM=nm
18396 +test -z "$SED" && SED=sed
18397 +test -z "$OBJDUMP" && OBJDUMP=objdump
18398 +test -z "$RANLIB" && RANLIB=:
18399 +test -z "$STRIP" && STRIP=:
18400 +test -z "$ac_objext" && ac_objext=o
18401 +
18402 +# Determine commands to create old-style static archives.
18403 +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
18404 +old_postinstall_cmds='chmod 644 $oldlib'
18405 +old_postuninstall_cmds=
18406 +
18407 +if test -n "$RANLIB"; then
18408 +  case $host_os in
18409 +  openbsd*)
18410 +    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
18411 +    ;;
18412 +  *)
18413 +    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
18414 +    ;;
18415 +  esac
18416 +  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
18417 +fi
18418 +
18419 +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
18420 +
18421 +# Only perform the check for file, if the check method requires it
18422 +case $deplibs_check_method in
18423 +file_magic*)
18424 +  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
18425 +    AC_PATH_MAGIC
18426 +  fi
18427 +  ;;
18428 +esac
18429 +
18430 +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
18431 +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
18432 +enable_win32_dll=yes, enable_win32_dll=no)
18433 +
18434 +AC_ARG_ENABLE([libtool-lock],
18435 +    [AC_HELP_STRING([--disable-libtool-lock],
18436 +       [avoid locking (might break parallel builds)])])
18437 +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
18438 +
18439 +AC_ARG_WITH([pic],
18440 +    [AC_HELP_STRING([--with-pic],
18441 +       [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
18442 +    [pic_mode="$withval"],
18443 +    [pic_mode=default])
18444 +test -z "$pic_mode" && pic_mode=default
18445 +
18446 +# Use C for the default configuration in the libtool script
18447 +tagname=
18448 +AC_LIBTOOL_LANG_C_CONFIG
18449 +_LT_AC_TAGCONFIG
18450 +])# AC_LIBTOOL_SETUP
18451 +
18452 +
18453 +# _LT_AC_SYS_COMPILER
18454 +# -------------------
18455 +AC_DEFUN([_LT_AC_SYS_COMPILER],
18456 +[AC_REQUIRE([AC_PROG_CC])dnl
18457 +
18458 +# If no C compiler was specified, use CC.
18459 +LTCC=${LTCC-"$CC"}
18460 +
18461 +# Allow CC to be a program name with arguments.
18462 +compiler=$CC
18463 +])# _LT_AC_SYS_COMPILER
18464 +
18465 +
18466 +# _LT_AC_SYS_LIBPATH_AIX
18467 +# ----------------------
18468 +# Links a minimal program and checks the executable
18469 +# for the system default hardcoded library path. In most cases,
18470 +# this is /usr/lib:/lib, but when the MPI compilers are used
18471 +# the location of the communication and MPI libs are included too.
18472 +# If we don't find anything, use the default library path according
18473 +# to the aix ld manual.
18474 +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
18475 +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
18476 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
18477 +}'`
18478 +# Check for a 64-bit object if we didn't find anything.
18479 +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
18480 +}'`; fi],[])
18481 +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
18482 +])# _LT_AC_SYS_LIBPATH_AIX
18483 +
18484 +
18485 +# _LT_AC_SHELL_INIT(ARG)
18486 +# ----------------------
18487 +AC_DEFUN([_LT_AC_SHELL_INIT],
18488 +[ifdef([AC_DIVERSION_NOTICE],
18489 +            [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
18490 +        [AC_DIVERT_PUSH(NOTICE)])
18491 +$1
18492 +AC_DIVERT_POP
18493 +])# _LT_AC_SHELL_INIT
18494 +
18495 +
18496 +# _LT_AC_PROG_ECHO_BACKSLASH
18497 +# --------------------------
18498 +# Add some code to the start of the generated configure script which
18499 +# will find an echo command which doesn't interpret backslashes.
18500 +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
18501 +[_LT_AC_SHELL_INIT([
18502 +# Check that we are running under the correct shell.
18503 +SHELL=${CONFIG_SHELL-/bin/sh}
18504 +
18505 +case X$ECHO in
18506 +X*--fallback-echo)
18507 +  # Remove one level of quotation (which was required for Make).
18508 +  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
18509 +  ;;
18510 +esac
18511 +
18512 +echo=${ECHO-echo}
18513 +if test "X[$]1" = X--no-reexec; then
18514 +  # Discard the --no-reexec flag, and continue.
18515 +  shift
18516 +elif test "X[$]1" = X--fallback-echo; then
18517 +  # Avoid inline document here, it may be left over
18518 +  :
18519 +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
18520 +  # Yippee, $echo works!
18521 +  :
18522 +else
18523 +  # Restart under the correct shell.
18524 +  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
18525 +fi
18526 +
18527 +if test "X[$]1" = X--fallback-echo; then
18528 +  # used as fallback echo
18529 +  shift
18530 +  cat <<EOF
18531 +[$]*
18532 +EOF
18533 +  exit 0
18534 +fi
18535 +
18536 +# The HP-UX ksh and POSIX shell print the target directory to stdout
18537 +# if CDPATH is set.
18538 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18539 +
18540 +if test -z "$ECHO"; then
18541 +if test "X${echo_test_string+set}" != Xset; then
18542 +# find a string as large as possible, as long as the shell can cope with it
18543 +  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
18544 +    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
18545 +    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
18546 +       echo_test_string="`eval $cmd`" &&
18547 +       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
18548 +    then
18549 +      break
18550 +    fi
18551 +  done
18552 +fi
18553 +
18554 +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
18555 +   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
18556 +   test "X$echo_testing_string" = "X$echo_test_string"; then
18557 +  :
18558 +else
18559 +  # The Solaris, AIX, and Digital Unix default echo programs unquote
18560 +  # backslashes.  This makes it impossible to quote backslashes using
18561 +  #   echo "$something" | sed 's/\\/\\\\/g'
18562 +  #
18563 +  # So, first we look for a working echo in the user's PATH.
18564 +
18565 +  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
18566 +  for dir in $PATH /usr/ucb; do
18567 +    IFS="$lt_save_ifs"
18568 +    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
18569 +       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
18570 +       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
18571 +       test "X$echo_testing_string" = "X$echo_test_string"; then
18572 +      echo="$dir/echo"
18573 +      break
18574 +    fi
18575 +  done
18576 +  IFS="$lt_save_ifs"
18577 +
18578 +  if test "X$echo" = Xecho; then
18579 +    # We didn't find a better echo, so look for alternatives.
18580 +    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
18581 +       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
18582 +       test "X$echo_testing_string" = "X$echo_test_string"; then
18583 +      # This shell has a builtin print -r that does the trick.
18584 +      echo='print -r'
18585 +    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
18586 +        test "X$CONFIG_SHELL" != X/bin/ksh; then
18587 +      # If we have ksh, try running configure again with it.
18588 +      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
18589 +      export ORIGINAL_CONFIG_SHELL
18590 +      CONFIG_SHELL=/bin/ksh
18591 +      export CONFIG_SHELL
18592 +      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
18593 +    else
18594 +      # Try using printf.
18595 +      echo='printf %s\n'
18596 +      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
18597 +        echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
18598 +        test "X$echo_testing_string" = "X$echo_test_string"; then
18599 +       # Cool, printf works
18600 +       :
18601 +      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
18602 +          test "X$echo_testing_string" = 'X\t' &&
18603 +          echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
18604 +          test "X$echo_testing_string" = "X$echo_test_string"; then
18605 +       CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
18606 +       export CONFIG_SHELL
18607 +       SHELL="$CONFIG_SHELL"
18608 +       export SHELL
18609 +       echo="$CONFIG_SHELL [$]0 --fallback-echo"
18610 +      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
18611 +          test "X$echo_testing_string" = 'X\t' &&
18612 +          echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
18613 +          test "X$echo_testing_string" = "X$echo_test_string"; then
18614 +       echo="$CONFIG_SHELL [$]0 --fallback-echo"
18615 +      else
18616 +       # maybe with a smaller string...
18617 +       prev=:
18618 +
18619 +       for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
18620 +         if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
18621 +         then
18622 +           break
18623 +         fi
18624 +         prev="$cmd"
18625 +       done
18626 +
18627 +       if test "$prev" != 'sed 50q "[$]0"'; then
18628 +         echo_test_string=`eval $prev`
18629 +         export echo_test_string
18630 +         exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
18631 +       else
18632 +         # Oops.  We lost completely, so just stick with echo.
18633 +         echo=echo
18634 +       fi
18635 +      fi
18636 +    fi
18637 +  fi
18638 +fi
18639 +fi
18640 +
18641 +# Copy echo and quote the copy suitably for passing to libtool from
18642 +# the Makefile, instead of quoting the original, which is used later.
18643 +ECHO=$echo
18644 +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
18645 +   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
18646 +fi
18647 +
18648 +AC_SUBST(ECHO)
18649 +])])# _LT_AC_PROG_ECHO_BACKSLASH
18650 +
18651 +
18652 +# _LT_AC_LOCK
18653 +# -----------
18654 +AC_DEFUN([_LT_AC_LOCK],
18655 +[AC_ARG_ENABLE([libtool-lock],
18656 +    [AC_HELP_STRING([--disable-libtool-lock],
18657 +       [avoid locking (might break parallel builds)])])
18658 +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
18659 +
18660 +# Some flags need to be propagated to the compiler or linker for good
18661 +# libtool support.
18662 +case $host in
18663 +ia64-*-hpux*)
18664 +  # Find out which ABI we are using.
18665 +  echo 'int i;' > conftest.$ac_ext
18666 +  if AC_TRY_EVAL(ac_compile); then
18667 +    case `/usr/bin/file conftest.$ac_objext` in
18668 +    *ELF-32*)
18669 +      HPUX_IA64_MODE="32"
18670 +      ;;
18671 +    *ELF-64*)
18672 +      HPUX_IA64_MODE="64"
18673 +      ;;
18674 +    esac
18675 +  fi
18676 +  rm -rf conftest*
18677 +  ;;
18678 +*-*-irix6*)
18679 +  # Find out which ABI we are using.
18680 +  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
18681 +  if AC_TRY_EVAL(ac_compile); then
18682 +   if test "$lt_cv_prog_gnu_ld" = yes; then
18683 +    case `/usr/bin/file conftest.$ac_objext` in
18684 +    *32-bit*)
18685 +      LD="${LD-ld} -melf32bsmip"
18686 +      ;;
18687 +    *N32*)
18688 +      LD="${LD-ld} -melf32bmipn32"
18689 +      ;;
18690 +    *64-bit*)
18691 +      LD="${LD-ld} -melf64bmip"
18692 +      ;;
18693 +    esac
18694 +   else
18695 +    case `/usr/bin/file conftest.$ac_objext` in
18696 +    *32-bit*)
18697 +      LD="${LD-ld} -32"
18698 +      ;;
18699 +    *N32*)
18700 +      LD="${LD-ld} -n32"
18701 +      ;;
18702 +    *64-bit*)
18703 +      LD="${LD-ld} -64"
18704 +      ;;
18705 +    esac
18706 +   fi
18707 +  fi
18708 +  rm -rf conftest*
18709 +  ;;
18710 +
18711 +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
18712 +  # Find out which ABI we are using.
18713 +  echo 'int i;' > conftest.$ac_ext
18714 +  if AC_TRY_EVAL(ac_compile); then
18715 +    case "`/usr/bin/file conftest.o`" in
18716 +    *32-bit*)
18717 +      case $host in
18718 +        x86_64-*linux*)
18719 +          LD="${LD-ld} -m elf_i386"
18720 +          ;;
18721 +        ppc64-*linux*|powerpc64-*linux*)
18722 +          LD="${LD-ld} -m elf32ppclinux"
18723 +          ;;
18724 +        s390x-*linux*)
18725 +          LD="${LD-ld} -m elf_s390"
18726 +          ;;
18727 +        sparc64-*linux*)
18728 +          LD="${LD-ld} -m elf32_sparc"
18729 +          ;;
18730 +      esac
18731 +      ;;
18732 +    *64-bit*)
18733 +      case $host in
18734 +        x86_64-*linux*)
18735 +          LD="${LD-ld} -m elf_x86_64"
18736 +          ;;
18737 +        ppc*-*linux*|powerpc*-*linux*)
18738 +          LD="${LD-ld} -m elf64ppc"
18739 +          ;;
18740 +        s390*-*linux*)
18741 +          LD="${LD-ld} -m elf64_s390"
18742 +          ;;
18743 +        sparc*-*linux*)
18744 +          LD="${LD-ld} -m elf64_sparc"
18745 +          ;;
18746 +      esac
18747 +      ;;
18748 +    esac
18749 +  fi
18750 +  rm -rf conftest*
18751 +  ;;
18752 +
18753 +*-*-sco3.2v5*)
18754 +  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
18755 +  SAVE_CFLAGS="$CFLAGS"
18756 +  CFLAGS="$CFLAGS -belf"
18757 +  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
18758 +    [AC_LANG_PUSH(C)
18759 +     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
18760 +     AC_LANG_POP])
18761 +  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
18762 +    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
18763 +    CFLAGS="$SAVE_CFLAGS"
18764 +  fi
18765 +  ;;
18766 +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
18767 +[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
18768 +  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
18769 +  AC_CHECK_TOOL(AS, as, false)
18770 +  AC_CHECK_TOOL(OBJDUMP, objdump, false)
18771 +  ;;
18772 +  ])
18773 +esac
18774 +
18775 +need_locks="$enable_libtool_lock"
18776 +
18777 +])# _LT_AC_LOCK
18778 +
18779 +
18780 +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
18781 +#              [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
18782 +# ----------------------------------------------------------------
18783 +# Check whether the given compiler option works
18784 +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
18785 +[AC_REQUIRE([LT_AC_PROG_SED])
18786 +AC_CACHE_CHECK([$1], [$2],
18787 +  [$2=no
18788 +  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
18789 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
18790 +   lt_compiler_flag="$3"
18791 +   # Insert the option either (1) after the last *FLAGS variable, or
18792 +   # (2) before a word containing "conftest.", or (3) at the end.
18793 +   # Note that $ac_compile itself does not contain backslashes and begins
18794 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
18795 +   # The option is referenced via a variable to avoid confusing sed.
18796 +   lt_compile=`echo "$ac_compile" | $SED \
18797 +   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
18798 +   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
18799 +   -e 's:$: $lt_compiler_flag:'`
18800 +   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
18801 +   (eval "$lt_compile" 2>conftest.err)
18802 +   ac_status=$?
18803 +   cat conftest.err >&AS_MESSAGE_LOG_FD
18804 +   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
18805 +   if (exit $ac_status) && test -s "$ac_outfile"; then
18806 +     # The compiler can only warn and ignore the option if not recognized
18807 +     # So say no if there are warnings
18808 +     if test ! -s conftest.err; then
18809 +       $2=yes
18810 +     fi
18811 +   fi
18812 +   $rm conftest*
18813 +])
18814 +
18815 +if test x"[$]$2" = xyes; then
18816 +    ifelse([$5], , :, [$5])
18817 +else
18818 +    ifelse([$6], , :, [$6])
18819 +fi
18820 +])# AC_LIBTOOL_COMPILER_OPTION
18821 +
18822 +
18823 +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
18824 +#                          [ACTION-SUCCESS], [ACTION-FAILURE])
18825 +# ------------------------------------------------------------
18826 +# Check whether the given compiler option works
18827 +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
18828 +[AC_CACHE_CHECK([$1], [$2],
18829 +  [$2=no
18830 +   save_LDFLAGS="$LDFLAGS"
18831 +   LDFLAGS="$LDFLAGS $3"
18832 +   printf "$lt_simple_link_test_code" > conftest.$ac_ext
18833 +   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
18834 +     # The compiler can only warn and ignore the option if not recognized
18835 +     # So say no if there are warnings
18836 +     if test -s conftest.err; then
18837 +       # Append any errors to the config.log.
18838 +       cat conftest.err 1>&AS_MESSAGE_LOG_FD
18839 +     else
18840 +       $2=yes
18841 +     fi
18842 +   fi
18843 +   $rm conftest*
18844 +   LDFLAGS="$save_LDFLAGS"
18845 +])
18846 +
18847 +if test x"[$]$2" = xyes; then
18848 +    ifelse([$4], , :, [$4])
18849 +else
18850 +    ifelse([$5], , :, [$5])
18851 +fi
18852 +])# AC_LIBTOOL_LINKER_OPTION
18853 +
18854 +
18855 +# AC_LIBTOOL_SYS_MAX_CMD_LEN
18856 +# --------------------------
18857 +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
18858 +[# find the maximum length of command line arguments
18859 +AC_MSG_CHECKING([the maximum length of command line arguments])
18860 +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
18861 +  i=0
18862 +  teststring="ABCD"
18863 +
18864 +  case $build_os in
18865 +  msdosdjgpp*)
18866 +    # On DJGPP, this test can blow up pretty badly due to problems in libc
18867 +    # (any single argument exceeding 2000 bytes causes a buffer overrun
18868 +    # during glob expansion).  Even if it were fixed, the result of this
18869 +    # check would be larger than it should be.
18870 +    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
18871 +    ;;
18872 +
18873 +  gnu*)
18874 +    # Under GNU Hurd, this test is not required because there is
18875 +    # no limit to the length of command line arguments.
18876 +    # Libtool will interpret -1 as no limit whatsoever
18877 +    lt_cv_sys_max_cmd_len=-1;
18878 +    ;;
18879 +
18880 +  cygwin* | mingw*)
18881 +    # On Win9x/ME, this test blows up -- it succeeds, but takes
18882 +    # about 5 minutes as the teststring grows exponentially.
18883 +    # Worse, since 9x/ME are not pre-emptively multitasking,
18884 +    # you end up with a "frozen" computer, even though with patience
18885 +    # the test eventually succeeds (with a max line length of 256k).
18886 +    # Instead, let's just punt: use the minimum linelength reported by
18887 +    # all of the supported platforms: 8192 (on NT/2K/XP).
18888 +    lt_cv_sys_max_cmd_len=8192;
18889 +    ;;
18890 +
18891 +  amigaos*)
18892 +    # On AmigaOS with pdksh, this test takes hours, literally.
18893 +    # So we just punt and use a minimum line length of 8192.
18894 +    lt_cv_sys_max_cmd_len=8192;
18895 +    ;;
18896 +
18897 +  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
18898 +    # This has been around since 386BSD, at least.  Likely further.
18899 +    if test -x /sbin/sysctl; then
18900 +      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
18901 +    elif test -x /usr/sbin/sysctl; then
18902 +      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
18903 +    else
18904 +      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
18905 +    fi
18906 +    # And add a safety zone
18907 +    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
18908 +    ;;
18909 +  osf*)
18910 +    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
18911 +    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
18912 +    # nice to cause kernel panics so lets avoid the loop below.
18913 +    # First set a reasonable default.
18914 +    lt_cv_sys_max_cmd_len=16384
18915 +    # 
18916 +    if test -x /sbin/sysconfig; then
18917 +      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
18918 +        *1*) lt_cv_sys_max_cmd_len=-1 ;;
18919 +      esac
18920 +    fi
18921 +    ;;
18922 +  *)
18923 +    # If test is not a shell built-in, we'll probably end up computing a
18924 +    # maximum length that is only half of the actual maximum length, but
18925 +    # we can't tell.
18926 +    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
18927 +    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
18928 +              = "XX$teststring") >/dev/null 2>&1 &&
18929 +           new_result=`expr "X$teststring" : ".*" 2>&1` &&
18930 +           lt_cv_sys_max_cmd_len=$new_result &&
18931 +           test $i != 17 # 1/2 MB should be enough
18932 +    do
18933 +      i=`expr $i + 1`
18934 +      teststring=$teststring$teststring
18935 +    done
18936 +    teststring=
18937 +    # Add a significant safety factor because C++ compilers can tack on massive
18938 +    # amounts of additional arguments before passing them to the linker.
18939 +    # It appears as though 1/2 is a usable value.
18940 +    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
18941 +    ;;
18942 +  esac
18943 +])
18944 +if test -n $lt_cv_sys_max_cmd_len ; then
18945 +  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
18946 +else
18947 +  AC_MSG_RESULT(none)
18948 +fi
18949 +])# AC_LIBTOOL_SYS_MAX_CMD_LEN
18950 +
18951 +
18952 +# _LT_AC_CHECK_DLFCN
18953 +# --------------------
18954 +AC_DEFUN([_LT_AC_CHECK_DLFCN],
18955 +[AC_CHECK_HEADERS(dlfcn.h)dnl
18956 +])# _LT_AC_CHECK_DLFCN
18957 +
18958 +
18959 +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
18960 +#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
18961 +# ------------------------------------------------------------------
18962 +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
18963 +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
18964 +if test "$cross_compiling" = yes; then :
18965 +  [$4]
18966 +else
18967 +  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18968 +  lt_status=$lt_dlunknown
18969 +  cat > conftest.$ac_ext <<EOF
18970 +[#line __oline__ "configure"
18971 +#include "confdefs.h"
18972 +
18973 +#if HAVE_DLFCN_H
18974 +#include <dlfcn.h>
18975 +#endif
18976 +
18977 +#include <stdio.h>
18978 +
18979 +#ifdef RTLD_GLOBAL
18980 +#  define LT_DLGLOBAL          RTLD_GLOBAL
18981 +#else
18982 +#  ifdef DL_GLOBAL
18983 +#    define LT_DLGLOBAL                DL_GLOBAL
18984 +#  else
18985 +#    define LT_DLGLOBAL                0
18986 +#  endif
18987 +#endif
18988 +
18989 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
18990 +   find out it does not work in some platform. */
18991 +#ifndef LT_DLLAZY_OR_NOW
18992 +#  ifdef RTLD_LAZY
18993 +#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
18994 +#  else
18995 +#    ifdef DL_LAZY
18996 +#      define LT_DLLAZY_OR_NOW         DL_LAZY
18997 +#    else
18998 +#      ifdef RTLD_NOW
18999 +#        define LT_DLLAZY_OR_NOW       RTLD_NOW
19000 +#      else
19001 +#        ifdef DL_NOW
19002 +#          define LT_DLLAZY_OR_NOW     DL_NOW
19003 +#        else
19004 +#          define LT_DLLAZY_OR_NOW     0
19005 +#        endif
19006 +#      endif
19007 +#    endif
19008 +#  endif
19009 +#endif
19010 +
19011 +#ifdef __cplusplus
19012 +extern "C" void exit (int);
19013 +#endif
19014 +
19015 +void fnord() { int i=42;}
19016 +int main ()
19017 +{
19018 +  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19019 +  int status = $lt_dlunknown;
19020 +
19021 +  if (self)
19022 +    {
19023 +      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
19024 +      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19025 +      /* dlclose (self); */
19026 +    }
19027 +
19028 +    exit (status);
19029 +}]
19030 +EOF
19031 +  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
19032 +    (./conftest; exit; ) 2>/dev/null
19033 +    lt_status=$?
19034 +    case x$lt_status in
19035 +      x$lt_dlno_uscore) $1 ;;
19036 +      x$lt_dlneed_uscore) $2 ;;
19037 +      x$lt_unknown|x*) $3 ;;
19038 +    esac
19039 +  else :
19040 +    # compilation failed
19041 +    $3
19042 +  fi
19043 +fi
19044 +rm -fr conftest*
19045 +])# _LT_AC_TRY_DLOPEN_SELF
19046 +
19047 +
19048 +# AC_LIBTOOL_DLOPEN_SELF
19049 +# -------------------
19050 +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
19051 +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
19052 +if test "x$enable_dlopen" != xyes; then
19053 +  enable_dlopen=unknown
19054 +  enable_dlopen_self=unknown
19055 +  enable_dlopen_self_static=unknown
19056 +else
19057 +  lt_cv_dlopen=no
19058 +  lt_cv_dlopen_libs=
19059 +
19060 +  case $host_os in
19061 +  beos*)
19062 +    lt_cv_dlopen="load_add_on"
19063 +    lt_cv_dlopen_libs=
19064 +    lt_cv_dlopen_self=yes
19065 +    ;;
19066 +
19067 +  mingw* | pw32*)
19068 +    lt_cv_dlopen="LoadLibrary"
19069 +    lt_cv_dlopen_libs=
19070 +   ;;
19071 +
19072 +  cygwin*)
19073 +    lt_cv_dlopen="dlopen"
19074 +    lt_cv_dlopen_libs=
19075 +   ;;
19076 +
19077 +  darwin*)
19078 +  # if libdl is installed we need to link against it
19079 +    AC_CHECK_LIB([dl], [dlopen],
19080 +               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
19081 +    lt_cv_dlopen="dyld"
19082 +    lt_cv_dlopen_libs=
19083 +    lt_cv_dlopen_self=yes
19084 +    ])
19085 +   ;;
19086 +
19087 +  *)
19088 +    AC_CHECK_FUNC([shl_load],
19089 +         [lt_cv_dlopen="shl_load"],
19090 +      [AC_CHECK_LIB([dld], [shl_load],
19091 +           [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
19092 +       [AC_CHECK_FUNC([dlopen],
19093 +             [lt_cv_dlopen="dlopen"],
19094 +         [AC_CHECK_LIB([dl], [dlopen],
19095 +               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
19096 +           [AC_CHECK_LIB([svld], [dlopen],
19097 +                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
19098 +             [AC_CHECK_LIB([dld], [dld_link],
19099 +                   [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
19100 +             ])
19101 +           ])
19102 +         ])
19103 +       ])
19104 +      ])
19105 +    ;;
19106 +  esac
19107 +
19108 +  if test "x$lt_cv_dlopen" != xno; then
19109 +    enable_dlopen=yes
19110 +  else
19111 +    enable_dlopen=no
19112 +  fi
19113 +
19114 +  case $lt_cv_dlopen in
19115 +  dlopen)
19116 +    save_CPPFLAGS="$CPPFLAGS"
19117 +    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
19118 +
19119 +    save_LDFLAGS="$LDFLAGS"
19120 +    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
19121 +
19122 +    save_LIBS="$LIBS"
19123 +    LIBS="$lt_cv_dlopen_libs $LIBS"
19124 +
19125 +    AC_CACHE_CHECK([whether a program can dlopen itself],
19126 +         lt_cv_dlopen_self, [dnl
19127 +         _LT_AC_TRY_DLOPEN_SELF(
19128 +           lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
19129 +           lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
19130 +    ])
19131 +
19132 +    if test "x$lt_cv_dlopen_self" = xyes; then
19133 +      LDFLAGS="$LDFLAGS $link_static_flag"
19134 +      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
19135 +         lt_cv_dlopen_self_static, [dnl
19136 +         _LT_AC_TRY_DLOPEN_SELF(
19137 +           lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
19138 +           lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
19139 +      ])
19140 +    fi
19141 +
19142 +    CPPFLAGS="$save_CPPFLAGS"
19143 +    LDFLAGS="$save_LDFLAGS"
19144 +    LIBS="$save_LIBS"
19145 +    ;;
19146 +  esac
19147 +
19148 +  case $lt_cv_dlopen_self in
19149 +  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
19150 +  *) enable_dlopen_self=unknown ;;
19151 +  esac
19152 +
19153 +  case $lt_cv_dlopen_self_static in
19154 +  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
19155 +  *) enable_dlopen_self_static=unknown ;;
19156 +  esac
19157 +fi
19158 +])# AC_LIBTOOL_DLOPEN_SELF
19159 +
19160 +
19161 +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
19162 +# ---------------------------------
19163 +# Check to see if options -c and -o are simultaneously supported by compiler
19164 +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
19165 +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
19166 +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
19167 +  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
19168 +  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
19169 +   $rm -r conftest 2>/dev/null
19170 +   mkdir conftest
19171 +   cd conftest
19172 +   mkdir out
19173 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
19174 +
19175 +   lt_compiler_flag="-o out/conftest2.$ac_objext"
19176 +   # Insert the option either (1) after the last *FLAGS variable, or
19177 +   # (2) before a word containing "conftest.", or (3) at the end.
19178 +   # Note that $ac_compile itself does not contain backslashes and begins
19179 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
19180 +   lt_compile=`echo "$ac_compile" | $SED \
19181 +   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
19182 +   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
19183 +   -e 's:$: $lt_compiler_flag:'`
19184 +   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
19185 +   (eval "$lt_compile" 2>out/conftest.err)
19186 +   ac_status=$?
19187 +   cat out/conftest.err >&AS_MESSAGE_LOG_FD
19188 +   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
19189 +   if (exit $ac_status) && test -s out/conftest2.$ac_objext
19190 +   then
19191 +     # The compiler can only warn and ignore the option if not recognized
19192 +     # So say no if there are warnings
19193 +     if test ! -s out/conftest.err; then
19194 +       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
19195 +     fi
19196 +   fi
19197 +   chmod u+w .
19198 +   $rm conftest*
19199 +   # SGI C++ compiler will create directory out/ii_files/ for
19200 +   # template instantiation
19201 +   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
19202 +   $rm out/* && rmdir out
19203 +   cd ..
19204 +   rmdir conftest
19205 +   $rm conftest*
19206 +])
19207 +])# AC_LIBTOOL_PROG_CC_C_O
19208 +
19209 +
19210 +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
19211 +# -----------------------------------------
19212 +# Check to see if we can do hard links to lock some files if needed
19213 +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
19214 +[AC_REQUIRE([_LT_AC_LOCK])dnl
19215 +
19216 +hard_links="nottested"
19217 +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
19218 +  # do not overwrite the value of need_locks provided by the user
19219 +  AC_MSG_CHECKING([if we can lock with hard links])
19220 +  hard_links=yes
19221 +  $rm conftest*
19222 +  ln conftest.a conftest.b 2>/dev/null && hard_links=no
19223 +  touch conftest.a
19224 +  ln conftest.a conftest.b 2>&5 || hard_links=no
19225 +  ln conftest.a conftest.b 2>/dev/null && hard_links=no
19226 +  AC_MSG_RESULT([$hard_links])
19227 +  if test "$hard_links" = no; then
19228 +    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
19229 +    need_locks=warn
19230 +  fi
19231 +else
19232 +  need_locks=no
19233 +fi
19234 +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
19235 +
19236 +
19237 +# AC_LIBTOOL_OBJDIR
19238 +# -----------------
19239 +AC_DEFUN([AC_LIBTOOL_OBJDIR],
19240 +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
19241 +[rm -f .libs 2>/dev/null
19242 +mkdir .libs 2>/dev/null
19243 +if test -d .libs; then
19244 +  lt_cv_objdir=.libs
19245 +else
19246 +  # MS-DOS does not allow filenames that begin with a dot.
19247 +  lt_cv_objdir=_libs
19248 +fi
19249 +rmdir .libs 2>/dev/null])
19250 +objdir=$lt_cv_objdir
19251 +])# AC_LIBTOOL_OBJDIR
19252 +
19253 +
19254 +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
19255 +# ----------------------------------------------
19256 +# Check hardcoding attributes.
19257 +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
19258 +[AC_MSG_CHECKING([how to hardcode library paths into programs])
19259 +_LT_AC_TAGVAR(hardcode_action, $1)=
19260 +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
19261 +   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
19262 +   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
19263 +
19264 +  # We can hardcode non-existant directories.
19265 +  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
19266 +     # If the only mechanism to avoid hardcoding is shlibpath_var, we
19267 +     # have to relink, otherwise we might link with an installed library
19268 +     # when we should be linking with a yet-to-be-installed one
19269 +     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
19270 +     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
19271 +    # Linking always hardcodes the temporary library directory.
19272 +    _LT_AC_TAGVAR(hardcode_action, $1)=relink
19273 +  else
19274 +    # We can link without hardcoding, and we can hardcode nonexisting dirs.
19275 +    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
19276 +  fi
19277 +else
19278 +  # We cannot hardcode anything, or else we can only hardcode existing
19279 +  # directories.
19280 +  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
19281 +fi
19282 +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
19283 +
19284 +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
19285 +  # Fast installation is not supported
19286 +  enable_fast_install=no
19287 +elif test "$shlibpath_overrides_runpath" = yes ||
19288 +     test "$enable_shared" = no; then
19289 +  # Fast installation is not necessary
19290 +  enable_fast_install=needless
19291 +fi
19292 +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
19293 +
19294 +
19295 +# AC_LIBTOOL_SYS_LIB_STRIP
19296 +# ------------------------
19297 +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
19298 +[striplib=
19299 +old_striplib=
19300 +AC_MSG_CHECKING([whether stripping libraries is possible])
19301 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
19302 +  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
19303 +  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
19304 +  AC_MSG_RESULT([yes])
19305 +else
19306 +# FIXME - insert some real tests, host_os isn't really good enough
19307 +  case $host_os in
19308 +   darwin*)
19309 +       if test -n "$STRIP" ; then
19310 +         striplib="$STRIP -x"
19311 +         AC_MSG_RESULT([yes])
19312 +       else
19313 +  AC_MSG_RESULT([no])
19314 +fi
19315 +       ;;
19316 +   *)
19317 +  AC_MSG_RESULT([no])
19318 +    ;;
19319 +  esac
19320 +fi
19321 +])# AC_LIBTOOL_SYS_LIB_STRIP
19322 +
19323 +
19324 +# AC_LIBTOOL_SYS_DYNAMIC_LINKER
19325 +# -----------------------------
19326 +# PORTME Fill in your ld.so characteristics
19327 +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
19328 +[AC_MSG_CHECKING([dynamic linker characteristics])
19329 +library_names_spec=
19330 +libname_spec='lib$name'
19331 +soname_spec=
19332 +shrext_cmds=".so"
19333 +postinstall_cmds=
19334 +postuninstall_cmds=
19335 +finish_cmds=
19336 +finish_eval=
19337 +shlibpath_var=
19338 +shlibpath_overrides_runpath=unknown
19339 +version_type=none
19340 +dynamic_linker="$host_os ld.so"
19341 +sys_lib_dlsearch_path_spec="/lib /usr/lib"
19342 +if test "$GCC" = yes; then
19343 +  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
19344 +  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
19345 +    # if the path contains ";" then we assume it to be the separator
19346 +    # otherwise default to the standard path separator (i.e. ":") - it is
19347 +    # assumed that no part of a normal pathname contains ";" but that should
19348 +    # okay in the real world where ";" in dirpaths is itself problematic.
19349 +    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
19350 +  else
19351 +    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
19352 +  fi
19353 +else
19354 +  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
19355 +fi
19356 +need_lib_prefix=unknown
19357 +hardcode_into_libs=no
19358 +
19359 +# when you set need_version to no, make sure it does not cause -set_version
19360 +# flags to be left without arguments
19361 +need_version=unknown
19362 +
19363 +case $host_os in
19364 +aix3*)
19365 +  version_type=linux
19366 +  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
19367 +  shlibpath_var=LIBPATH
19368 +
19369 +  # AIX 3 has no versioning support, so we append a major version to the name.
19370 +  soname_spec='${libname}${release}${shared_ext}$major'
19371 +  ;;
19372 +
19373 +aix4* | aix5*)
19374 +  version_type=linux
19375 +  need_lib_prefix=no
19376 +  need_version=no
19377 +  hardcode_into_libs=yes
19378 +  if test "$host_cpu" = ia64; then
19379 +    # AIX 5 supports IA64
19380 +    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
19381 +    shlibpath_var=LD_LIBRARY_PATH
19382 +  else
19383 +    # With GCC up to 2.95.x, collect2 would create an import file
19384 +    # for dependence libraries.  The import file would start with
19385 +    # the line `#! .'.  This would cause the generated library to
19386 +    # depend on `.', always an invalid library.  This was fixed in
19387 +    # development snapshots of GCC prior to 3.0.
19388 +    case $host_os in
19389 +      aix4 | aix4.[[01]] | aix4.[[01]].*)
19390 +      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
19391 +          echo ' yes '
19392 +          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
19393 +       :
19394 +      else
19395 +       can_build_shared=no
19396 +      fi
19397 +      ;;
19398 +    esac
19399 +    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
19400 +    # soname into executable. Probably we can add versioning support to
19401 +    # collect2, so additional links can be useful in future.
19402 +    if test "$aix_use_runtimelinking" = yes; then
19403 +      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
19404 +      # instead of lib<name>.a to let people know that these are not
19405 +      # typical AIX shared libraries.
19406 +      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19407 +    else
19408 +      # We preserve .a as extension for shared libraries through AIX4.2
19409 +      # and later when we are not doing run time linking.
19410 +      library_names_spec='${libname}${release}.a $libname.a'
19411 +      soname_spec='${libname}${release}${shared_ext}$major'
19412 +    fi
19413 +    shlibpath_var=LIBPATH
19414 +  fi
19415 +  ;;
19416 +
19417 +amigaos*)
19418 +  library_names_spec='$libname.ixlibrary $libname.a'
19419 +  # Create ${libname}_ixlibrary.a entries in /sys/libs.
19420 +  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
19421 +  ;;
19422 +
19423 +beos*)
19424 +  library_names_spec='${libname}${shared_ext}'
19425 +  dynamic_linker="$host_os ld.so"
19426 +  shlibpath_var=LIBRARY_PATH
19427 +  ;;
19428 +
19429 +bsdi[[45]]*)
19430 +  version_type=linux
19431 +  need_version=no
19432 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19433 +  soname_spec='${libname}${release}${shared_ext}$major'
19434 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
19435 +  shlibpath_var=LD_LIBRARY_PATH
19436 +  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
19437 +  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
19438 +  # the default ld.so.conf also contains /usr/contrib/lib and
19439 +  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
19440 +  # libtool to hard-code these into programs
19441 +  ;;
19442 +
19443 +cygwin* | mingw* | pw32*)
19444 +  version_type=windows
19445 +  shrext_cmds=".dll"
19446 +  need_version=no
19447 +  need_lib_prefix=no
19448 +
19449 +  case $GCC,$host_os in
19450 +  yes,cygwin* | yes,mingw* | yes,pw32*)
19451 +    library_names_spec='$libname.dll.a'
19452 +    # DLL is installed to $(libdir)/../bin by postinstall_cmds
19453 +    postinstall_cmds='base_file=`basename \${file}`~
19454 +      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
19455 +      dldir=$destdir/`dirname \$dlpath`~
19456 +      test -d \$dldir || mkdir -p \$dldir~
19457 +      $install_prog $dir/$dlname \$dldir/$dlname'
19458 +    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
19459 +      dlpath=$dir/\$dldll~
19460 +       $rm \$dlpath'
19461 +    shlibpath_overrides_runpath=yes
19462 +
19463 +    case $host_os in
19464 +    cygwin*)
19465 +      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
19466 +      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
19467 +      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
19468 +      ;;
19469 +    mingw*)
19470 +      # MinGW DLLs use traditional 'lib' prefix
19471 +      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
19472 +      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
19473 +      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
19474 +        # It is most probably a Windows format PATH printed by
19475 +        # mingw gcc, but we are running on Cygwin. Gcc prints its search
19476 +        # path with ; separators, and with drive letters. We can handle the
19477 +        # drive letters (cygwin fileutils understands them), so leave them,
19478 +        # especially as we might pass files found there to a mingw objdump,
19479 +        # which wouldn't understand a cygwinified path. Ahh.
19480 +        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
19481 +      else
19482 +        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
19483 +      fi
19484 +      ;;
19485 +    pw32*)
19486 +      # pw32 DLLs use 'pw' prefix rather than 'lib'
19487 +      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
19488 +      ;;
19489 +    esac
19490 +    ;;
19491 +
19492 +  *)
19493 +    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
19494 +    ;;
19495 +  esac
19496 +  dynamic_linker='Win32 ld.exe'
19497 +  # FIXME: first we should search . and the directory the executable is in
19498 +  shlibpath_var=PATH
19499 +  ;;
19500 +
19501 +darwin* | rhapsody*)
19502 +  dynamic_linker="$host_os dyld"
19503 +  version_type=darwin
19504 +  need_lib_prefix=no
19505 +  need_version=no
19506 +  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
19507 +  soname_spec='${libname}${release}${major}$shared_ext'
19508 +  shlibpath_overrides_runpath=yes
19509 +  shlibpath_var=DYLD_LIBRARY_PATH
19510 +  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
19511 +  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
19512 +  if test "$GCC" = yes; then
19513 +    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
19514 +  else
19515 +    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
19516 +  fi
19517 +  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
19518 +  ;;
19519 +
19520 +dgux*)
19521 +  version_type=linux
19522 +  need_lib_prefix=no
19523 +  need_version=no
19524 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
19525 +  soname_spec='${libname}${release}${shared_ext}$major'
19526 +  shlibpath_var=LD_LIBRARY_PATH
19527 +  ;;
19528 +
19529 +freebsd1*)
19530 +  dynamic_linker=no
19531 +  ;;
19532 +
19533 +kfreebsd*-gnu)
19534 +  version_type=linux
19535 +  need_lib_prefix=no
19536 +  need_version=no
19537 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
19538 +  soname_spec='${libname}${release}${shared_ext}$major'
19539 +  shlibpath_var=LD_LIBRARY_PATH
19540 +  shlibpath_overrides_runpath=no
19541 +  hardcode_into_libs=yes
19542 +  dynamic_linker='GNU ld.so'
19543 +  ;;
19544 +
19545 +freebsd* | dragonfly*)
19546 +  # DragonFly does not have aout.  When/if they implement a new
19547 +  # versioning mechanism, adjust this.
19548 +  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
19549 +  version_type=freebsd-$objformat
19550 +  case $version_type in
19551 +    freebsd-elf*)
19552 +      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
19553 +      need_version=no
19554 +      need_lib_prefix=no
19555 +      ;;
19556 +    freebsd-*)
19557 +      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
19558 +      need_version=yes
19559 +      ;;
19560 +  esac
19561 +  shlibpath_var=LD_LIBRARY_PATH
19562 +  case $host_os in
19563 +  freebsd2*)
19564 +    shlibpath_overrides_runpath=yes
19565 +    ;;
19566 +  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
19567 +    shlibpath_overrides_runpath=yes
19568 +    hardcode_into_libs=yes
19569 +    ;;
19570 +  *) # from 3.2 on
19571 +    shlibpath_overrides_runpath=no
19572 +    hardcode_into_libs=yes
19573 +    ;;
19574 +  esac
19575 +  ;;
19576 +
19577 +gnu*)
19578 +  version_type=linux
19579 +  need_lib_prefix=no
19580 +  need_version=no
19581 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
19582 +  soname_spec='${libname}${release}${shared_ext}$major'
19583 +  shlibpath_var=LD_LIBRARY_PATH
19584 +  hardcode_into_libs=yes
19585 +  ;;
19586 +
19587 +hpux9* | hpux10* | hpux11*)
19588 +  # Give a soname corresponding to the major version so that dld.sl refuses to
19589 +  # link against other versions.
19590 +  version_type=sunos
19591 +  need_lib_prefix=no
19592 +  need_version=no
19593 +  case "$host_cpu" in
19594 +  ia64*)
19595 +    shrext_cmds='.so'
19596 +    hardcode_into_libs=yes
19597 +    dynamic_linker="$host_os dld.so"
19598 +    shlibpath_var=LD_LIBRARY_PATH
19599 +    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
19600 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19601 +    soname_spec='${libname}${release}${shared_ext}$major'
19602 +    if test "X$HPUX_IA64_MODE" = X32; then
19603 +      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
19604 +    else
19605 +      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
19606 +    fi
19607 +    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
19608 +    ;;
19609 +   hppa*64*)
19610 +     shrext_cmds='.sl'
19611 +     hardcode_into_libs=yes
19612 +     dynamic_linker="$host_os dld.sl"
19613 +     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
19614 +     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
19615 +     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19616 +     soname_spec='${libname}${release}${shared_ext}$major'
19617 +     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
19618 +     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
19619 +     ;;
19620 +   *)
19621 +    shrext_cmds='.sl'
19622 +    dynamic_linker="$host_os dld.sl"
19623 +    shlibpath_var=SHLIB_PATH
19624 +    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
19625 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19626 +    soname_spec='${libname}${release}${shared_ext}$major'
19627 +    ;;
19628 +  esac
19629 +  # HP-UX runs *really* slowly unless shared libraries are mode 555.
19630 +  postinstall_cmds='chmod 555 $lib'
19631 +  ;;
19632 +
19633 +irix5* | irix6* | nonstopux*)
19634 +  case $host_os in
19635 +    nonstopux*) version_type=nonstopux ;;
19636 +    *)
19637 +       if test "$lt_cv_prog_gnu_ld" = yes; then
19638 +               version_type=linux
19639 +       else
19640 +               version_type=irix
19641 +       fi ;;
19642 +  esac
19643 +  need_lib_prefix=no
19644 +  need_version=no
19645 +  soname_spec='${libname}${release}${shared_ext}$major'
19646 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
19647 +  case $host_os in
19648 +  irix5* | nonstopux*)
19649 +    libsuff= shlibsuff=
19650 +    ;;
19651 +  *)
19652 +    case $LD in # libtool.m4 will add one of these switches to LD
19653 +    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
19654 +      libsuff= shlibsuff= libmagic=32-bit;;
19655 +    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
19656 +      libsuff=32 shlibsuff=N32 libmagic=N32;;
19657 +    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
19658 +      libsuff=64 shlibsuff=64 libmagic=64-bit;;
19659 +    *) libsuff= shlibsuff= libmagic=never-match;;
19660 +    esac
19661 +    ;;
19662 +  esac
19663 +  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
19664 +  shlibpath_overrides_runpath=no
19665 +  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
19666 +  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
19667 +  hardcode_into_libs=yes
19668 +  ;;
19669 +
19670 +# No shared lib support for Linux oldld, aout, or coff.
19671 +linux*oldld* | linux*aout* | linux*coff*)
19672 +  dynamic_linker=no
19673 +  ;;
19674 +
19675 +# This must be Linux ELF.
19676 +linux*)
19677 +  version_type=linux
19678 +  need_lib_prefix=no
19679 +  need_version=no
19680 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19681 +  soname_spec='${libname}${release}${shared_ext}$major'
19682 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
19683 +  shlibpath_var=LD_LIBRARY_PATH
19684 +  shlibpath_overrides_runpath=no
19685 +  # This implies no fast_install, which is unacceptable.
19686 +  # Some rework will be needed to allow for fast_install
19687 +  # before this can be enabled.
19688 +  hardcode_into_libs=yes
19689 +
19690 +  # Append ld.so.conf contents to the search path
19691 +  if test -f /etc/ld.so.conf; then
19692 +    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
19693 +    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
19694 +  fi
19695 +
19696 +  # We used to test for /lib/ld.so.1 and disable shared libraries on
19697 +  # powerpc, because MkLinux only supported shared libraries with the
19698 +  # GNU dynamic linker.  Since this was broken with cross compilers,
19699 +  # most powerpc-linux boxes support dynamic linking these days and
19700 +  # people can always --disable-shared, the test was removed, and we
19701 +  # assume the GNU/Linux dynamic linker is in use.
19702 +  dynamic_linker='GNU/Linux ld.so'
19703 +  ;;
19704 +
19705 +knetbsd*-gnu)
19706 +  version_type=linux
19707 +  need_lib_prefix=no
19708 +  need_version=no
19709 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
19710 +  soname_spec='${libname}${release}${shared_ext}$major'
19711 +  shlibpath_var=LD_LIBRARY_PATH
19712 +  shlibpath_overrides_runpath=no
19713 +  hardcode_into_libs=yes
19714 +  dynamic_linker='GNU ld.so'
19715 +  ;;
19716 +
19717 +netbsd*)
19718 +  version_type=sunos
19719 +  need_lib_prefix=no
19720 +  need_version=no
19721 +  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
19722 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
19723 +    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
19724 +    dynamic_linker='NetBSD (a.out) ld.so'
19725 +  else
19726 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
19727 +    soname_spec='${libname}${release}${shared_ext}$major'
19728 +    dynamic_linker='NetBSD ld.elf_so'
19729 +  fi
19730 +  shlibpath_var=LD_LIBRARY_PATH
19731 +  shlibpath_overrides_runpath=yes
19732 +  hardcode_into_libs=yes
19733 +  ;;
19734 +
19735 +newsos6)
19736 +  version_type=linux
19737 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19738 +  shlibpath_var=LD_LIBRARY_PATH
19739 +  shlibpath_overrides_runpath=yes
19740 +  ;;
19741 +
19742 +nto-qnx*)
19743 +  version_type=linux
19744 +  need_lib_prefix=no
19745 +  need_version=no
19746 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19747 +  soname_spec='${libname}${release}${shared_ext}$major'
19748 +  shlibpath_var=LD_LIBRARY_PATH
19749 +  shlibpath_overrides_runpath=yes
19750 +  ;;
19751 +
19752 +openbsd*)
19753 +  version_type=sunos
19754 +  need_lib_prefix=no
19755 +  need_version=no
19756 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
19757 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
19758 +  shlibpath_var=LD_LIBRARY_PATH
19759 +  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
19760 +    case $host_os in
19761 +      openbsd2.[[89]] | openbsd2.[[89]].*)
19762 +       shlibpath_overrides_runpath=no
19763 +       ;;
19764 +      *)
19765 +       shlibpath_overrides_runpath=yes
19766 +       ;;
19767 +      esac
19768 +  else
19769 +    shlibpath_overrides_runpath=yes
19770 +  fi
19771 +  ;;
19772 +
19773 +os2*)
19774 +  libname_spec='$name'
19775 +  shrext_cmds=".dll"
19776 +  need_lib_prefix=no
19777 +  library_names_spec='$libname${shared_ext} $libname.a'
19778 +  dynamic_linker='OS/2 ld.exe'
19779 +  shlibpath_var=LIBPATH
19780 +  ;;
19781 +
19782 +osf3* | osf4* | osf5*)
19783 +  version_type=osf
19784 +  need_lib_prefix=no
19785 +  need_version=no
19786 +  soname_spec='${libname}${release}${shared_ext}$major'
19787 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19788 +  shlibpath_var=LD_LIBRARY_PATH
19789 +  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
19790 +  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
19791 +  ;;
19792 +
19793 +sco3.2v5*)
19794 +  version_type=osf
19795 +  soname_spec='${libname}${release}${shared_ext}$major'
19796 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19797 +  shlibpath_var=LD_LIBRARY_PATH
19798 +  ;;
19799 +
19800 +solaris*)
19801 +  version_type=linux
19802 +  need_lib_prefix=no
19803 +  need_version=no
19804 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19805 +  soname_spec='${libname}${release}${shared_ext}$major'
19806 +  shlibpath_var=LD_LIBRARY_PATH
19807 +  shlibpath_overrides_runpath=yes
19808 +  hardcode_into_libs=yes
19809 +  # ldd complains unless libraries are executable
19810 +  postinstall_cmds='chmod +x $lib'
19811 +  ;;
19812 +
19813 +sunos4*)
19814 +  version_type=sunos
19815 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
19816 +  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
19817 +  shlibpath_var=LD_LIBRARY_PATH
19818 +  shlibpath_overrides_runpath=yes
19819 +  if test "$with_gnu_ld" = yes; then
19820 +    need_lib_prefix=no
19821 +  fi
19822 +  need_version=yes
19823 +  ;;
19824 +
19825 +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
19826 +  version_type=linux
19827 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19828 +  soname_spec='${libname}${release}${shared_ext}$major'
19829 +  shlibpath_var=LD_LIBRARY_PATH
19830 +  case $host_vendor in
19831 +    sni)
19832 +      shlibpath_overrides_runpath=no
19833 +      need_lib_prefix=no
19834 +      export_dynamic_flag_spec='${wl}-Blargedynsym'
19835 +      runpath_var=LD_RUN_PATH
19836 +      ;;
19837 +    siemens)
19838 +      need_lib_prefix=no
19839 +      ;;
19840 +    motorola)
19841 +      need_lib_prefix=no
19842 +      need_version=no
19843 +      shlibpath_overrides_runpath=no
19844 +      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
19845 +      ;;
19846 +  esac
19847 +  ;;
19848 +
19849 +sysv4*MP*)
19850 +  if test -d /usr/nec ;then
19851 +    version_type=linux
19852 +    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
19853 +    soname_spec='$libname${shared_ext}.$major'
19854 +    shlibpath_var=LD_LIBRARY_PATH
19855 +  fi
19856 +  ;;
19857 +
19858 +uts4*)
19859 +  version_type=linux
19860 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
19861 +  soname_spec='${libname}${release}${shared_ext}$major'
19862 +  shlibpath_var=LD_LIBRARY_PATH
19863 +  ;;
19864 +
19865 +*)
19866 +  dynamic_linker=no
19867 +  ;;
19868 +esac
19869 +AC_MSG_RESULT([$dynamic_linker])
19870 +test "$dynamic_linker" = no && can_build_shared=no
19871 +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
19872 +
19873 +
19874 +# _LT_AC_TAGCONFIG
19875 +# ----------------
19876 +AC_DEFUN([_LT_AC_TAGCONFIG],
19877 +[AC_ARG_WITH([tags],
19878 +    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
19879 +        [include additional configurations @<:@automatic@:>@])],
19880 +    [tagnames="$withval"])
19881 +
19882 +if test -f "$ltmain" && test -n "$tagnames"; then
19883 +  if test ! -f "${ofile}"; then
19884 +    AC_MSG_WARN([output file `$ofile' does not exist])
19885 +  fi
19886 +
19887 +  if test -z "$LTCC"; then
19888 +    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
19889 +    if test -z "$LTCC"; then
19890 +      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
19891 +    else
19892 +      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
19893 +    fi
19894 +  fi
19895 +
19896 +  # Extract list of available tagged configurations in $ofile.
19897 +  # Note that this assumes the entire list is on one line.
19898 +  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
19899 +
19900 +  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19901 +  for tagname in $tagnames; do
19902 +    IFS="$lt_save_ifs"
19903 +    # Check whether tagname contains only valid characters
19904 +    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
19905 +    "") ;;
19906 +    *)  AC_MSG_ERROR([invalid tag name: $tagname])
19907 +       ;;
19908 +    esac
19909 +
19910 +    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
19911 +    then
19912 +      AC_MSG_ERROR([tag name \"$tagname\" already exists])
19913 +    fi
19914 +
19915 +    # Update the list of available tags.
19916 +    if test -n "$tagname"; then
19917 +      echo appending configuration tag \"$tagname\" to $ofile
19918 +
19919 +      case $tagname in
19920 +      CXX)
19921 +       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
19922 +           ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
19923 +           (test "X$CXX" != "Xg++"))) ; then
19924 +         AC_LIBTOOL_LANG_CXX_CONFIG
19925 +       else
19926 +         tagname=""
19927 +       fi
19928 +       ;;
19929 +
19930 +      F77)
19931 +       if test -n "$F77" && test "X$F77" != "Xno"; then
19932 +         AC_LIBTOOL_LANG_F77_CONFIG
19933 +       else
19934 +         tagname=""
19935 +       fi
19936 +       ;;
19937 +
19938 +      GCJ)
19939 +       if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
19940 +         AC_LIBTOOL_LANG_GCJ_CONFIG
19941 +       else
19942 +         tagname=""
19943 +       fi
19944 +       ;;
19945 +
19946 +      RC)
19947 +       AC_LIBTOOL_LANG_RC_CONFIG
19948 +       ;;
19949 +
19950 +      *)
19951 +       AC_MSG_ERROR([Unsupported tag name: $tagname])
19952 +       ;;
19953 +      esac
19954 +
19955 +      # Append the new tag name to the list of available tags.
19956 +      if test -n "$tagname" ; then
19957 +      available_tags="$available_tags $tagname"
19958 +    fi
19959 +    fi
19960 +  done
19961 +  IFS="$lt_save_ifs"
19962 +
19963 +  # Now substitute the updated list of available tags.
19964 +  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
19965 +    mv "${ofile}T" "$ofile"
19966 +    chmod +x "$ofile"
19967 +  else
19968 +    rm -f "${ofile}T"
19969 +    AC_MSG_ERROR([unable to update list of available tagged configurations.])
19970 +  fi
19971 +fi
19972 +])# _LT_AC_TAGCONFIG
19973 +
19974 +
19975 +# AC_LIBTOOL_DLOPEN
19976 +# -----------------
19977 +# enable checks for dlopen support
19978 +AC_DEFUN([AC_LIBTOOL_DLOPEN],
19979 + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
19980 +])# AC_LIBTOOL_DLOPEN
19981 +
19982 +
19983 +# AC_LIBTOOL_WIN32_DLL
19984 +# --------------------
19985 +# declare package support for building win32 dll's
19986 +AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
19987 +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
19988 +])# AC_LIBTOOL_WIN32_DLL
19989 +
19990 +
19991 +# AC_ENABLE_SHARED([DEFAULT])
19992 +# ---------------------------
19993 +# implement the --enable-shared flag
19994 +# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
19995 +AC_DEFUN([AC_ENABLE_SHARED],
19996 +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
19997 +AC_ARG_ENABLE([shared],
19998 +    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
19999 +       [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
20000 +    [p=${PACKAGE-default}
20001 +    case $enableval in
20002 +    yes) enable_shared=yes ;;
20003 +    no) enable_shared=no ;;
20004 +    *)
20005 +      enable_shared=no
20006 +      # Look at the argument we got.  We use all the common list separators.
20007 +      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
20008 +      for pkg in $enableval; do
20009 +       IFS="$lt_save_ifs"
20010 +       if test "X$pkg" = "X$p"; then
20011 +         enable_shared=yes
20012 +       fi
20013 +      done
20014 +      IFS="$lt_save_ifs"
20015 +      ;;
20016 +    esac],
20017 +    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
20018 +])# AC_ENABLE_SHARED
20019 +
20020 +
20021 +# AC_DISABLE_SHARED
20022 +# -----------------
20023 +#- set the default shared flag to --disable-shared
20024 +AC_DEFUN([AC_DISABLE_SHARED],
20025 +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
20026 +AC_ENABLE_SHARED(no)
20027 +])# AC_DISABLE_SHARED
20028 +
20029 +
20030 +# AC_ENABLE_STATIC([DEFAULT])
20031 +# ---------------------------
20032 +# implement the --enable-static flag
20033 +# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
20034 +AC_DEFUN([AC_ENABLE_STATIC],
20035 +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
20036 +AC_ARG_ENABLE([static],
20037 +    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
20038 +       [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
20039 +    [p=${PACKAGE-default}
20040 +    case $enableval in
20041 +    yes) enable_static=yes ;;
20042 +    no) enable_static=no ;;
20043 +    *)
20044 +     enable_static=no
20045 +      # Look at the argument we got.  We use all the common list separators.
20046 +      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
20047 +      for pkg in $enableval; do
20048 +       IFS="$lt_save_ifs"
20049 +       if test "X$pkg" = "X$p"; then
20050 +         enable_static=yes
20051 +       fi
20052 +      done
20053 +      IFS="$lt_save_ifs"
20054 +      ;;
20055 +    esac],
20056 +    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
20057 +])# AC_ENABLE_STATIC
20058 +
20059 +
20060 +# AC_DISABLE_STATIC
20061 +# -----------------
20062 +# set the default static flag to --disable-static
20063 +AC_DEFUN([AC_DISABLE_STATIC],
20064 +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
20065 +AC_ENABLE_STATIC(no)
20066 +])# AC_DISABLE_STATIC
20067 +
20068 +
20069 +# AC_ENABLE_FAST_INSTALL([DEFAULT])
20070 +# ---------------------------------
20071 +# implement the --enable-fast-install flag
20072 +# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
20073 +AC_DEFUN([AC_ENABLE_FAST_INSTALL],
20074 +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
20075 +AC_ARG_ENABLE([fast-install],
20076 +    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
20077 +    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
20078 +    [p=${PACKAGE-default}
20079 +    case $enableval in
20080 +    yes) enable_fast_install=yes ;;
20081 +    no) enable_fast_install=no ;;
20082 +    *)
20083 +      enable_fast_install=no
20084 +      # Look at the argument we got.  We use all the common list separators.
20085 +      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
20086 +      for pkg in $enableval; do
20087 +       IFS="$lt_save_ifs"
20088 +       if test "X$pkg" = "X$p"; then
20089 +         enable_fast_install=yes
20090 +       fi
20091 +      done
20092 +      IFS="$lt_save_ifs"
20093 +      ;;
20094 +    esac],
20095 +    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
20096 +])# AC_ENABLE_FAST_INSTALL
20097 +
20098 +
20099 +# AC_DISABLE_FAST_INSTALL
20100 +# -----------------------
20101 +# set the default to --disable-fast-install
20102 +AC_DEFUN([AC_DISABLE_FAST_INSTALL],
20103 +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
20104 +AC_ENABLE_FAST_INSTALL(no)
20105 +])# AC_DISABLE_FAST_INSTALL
20106 +
20107 +
20108 +# AC_LIBTOOL_PICMODE([MODE])
20109 +# --------------------------
20110 +# implement the --with-pic flag
20111 +# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
20112 +AC_DEFUN([AC_LIBTOOL_PICMODE],
20113 +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
20114 +pic_mode=ifelse($#,1,$1,default)
20115 +])# AC_LIBTOOL_PICMODE
20116 +
20117 +
20118 +# AC_PROG_EGREP
20119 +# -------------
20120 +# This is predefined starting with Autoconf 2.54, so this conditional
20121 +# definition can be removed once we require Autoconf 2.54 or later.
20122 +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
20123 +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
20124 +   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
20125 +    then ac_cv_prog_egrep='grep -E'
20126 +    else ac_cv_prog_egrep='egrep'
20127 +    fi])
20128 + EGREP=$ac_cv_prog_egrep
20129 + AC_SUBST([EGREP])
20130 +])])
20131 +
20132 +
20133 +# AC_PATH_TOOL_PREFIX
20134 +# -------------------
20135 +# find a file program which can recognise shared library
20136 +AC_DEFUN([AC_PATH_TOOL_PREFIX],
20137 +[AC_REQUIRE([AC_PROG_EGREP])dnl
20138 +AC_MSG_CHECKING([for $1])
20139 +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
20140 +[case $MAGIC_CMD in
20141 +[[\\/*] |  ?:[\\/]*])
20142 +  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
20143 +  ;;
20144 +*)
20145 +  lt_save_MAGIC_CMD="$MAGIC_CMD"
20146 +  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
20147 +dnl $ac_dummy forces splitting on constant user-supplied paths.
20148 +dnl POSIX.2 word splitting is done only on the output of word expansions,
20149 +dnl not every word.  This closes a longstanding sh security hole.
20150 +  ac_dummy="ifelse([$2], , $PATH, [$2])"
20151 +  for ac_dir in $ac_dummy; do
20152 +    IFS="$lt_save_ifs"
20153 +    test -z "$ac_dir" && ac_dir=.
20154 +    if test -f $ac_dir/$1; then
20155 +      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
20156 +      if test -n "$file_magic_test_file"; then
20157 +       case $deplibs_check_method in
20158 +       "file_magic "*)
20159 +         file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
20160 +         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
20161 +         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
20162 +           $EGREP "$file_magic_regex" > /dev/null; then
20163 +           :
20164 +         else
20165 +           cat <<EOF 1>&2
20166 +
20167 +*** Warning: the command libtool uses to detect shared libraries,
20168 +*** $file_magic_cmd, produces output that libtool cannot recognize.
20169 +*** The result is that libtool may fail to recognize shared libraries
20170 +*** as such.  This will affect the creation of libtool libraries that
20171 +*** depend on shared libraries, but programs linked with such libtool
20172 +*** libraries will work regardless of this problem.  Nevertheless, you
20173 +*** may want to report the problem to your system manager and/or to
20174 +*** bug-libtool@gnu.org
20175 +
20176 +EOF
20177 +         fi ;;
20178 +       esac
20179 +      fi
20180 +      break
20181 +    fi
20182 +  done
20183 +  IFS="$lt_save_ifs"
20184 +  MAGIC_CMD="$lt_save_MAGIC_CMD"
20185 +  ;;
20186 +esac])
20187 +MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
20188 +if test -n "$MAGIC_CMD"; then
20189 +  AC_MSG_RESULT($MAGIC_CMD)
20190 +else
20191 +  AC_MSG_RESULT(no)
20192 +fi
20193 +])# AC_PATH_TOOL_PREFIX
20194 +
20195 +
20196 +# AC_PATH_MAGIC
20197 +# -------------
20198 +# find a file program which can recognise a shared library
20199 +AC_DEFUN([AC_PATH_MAGIC],
20200 +[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
20201 +if test -z "$lt_cv_path_MAGIC_CMD"; then
20202 +  if test -n "$ac_tool_prefix"; then
20203 +    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
20204 +  else
20205 +    MAGIC_CMD=:
20206 +  fi
20207 +fi
20208 +])# AC_PATH_MAGIC
20209 +
20210 +
20211 +# AC_PROG_LD
20212 +# ----------
20213 +# find the pathname to the GNU or non-GNU linker
20214 +AC_DEFUN([AC_PROG_LD],
20215 +[AC_ARG_WITH([gnu-ld],
20216 +    [AC_HELP_STRING([--with-gnu-ld],
20217 +       [assume the C compiler uses GNU ld @<:@default=no@:>@])],
20218 +    [test "$withval" = no || with_gnu_ld=yes],
20219 +    [with_gnu_ld=no])
20220 +AC_REQUIRE([LT_AC_PROG_SED])dnl
20221 +AC_REQUIRE([AC_PROG_CC])dnl
20222 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
20223 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
20224 +ac_prog=ld
20225 +if test "$GCC" = yes; then
20226 +  # Check if gcc -print-prog-name=ld gives a path.
20227 +  AC_MSG_CHECKING([for ld used by $CC])
20228 +  case $host in
20229 +  *-*-mingw*)
20230 +    # gcc leaves a trailing carriage return which upsets mingw
20231 +    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
20232 +  *)
20233 +    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
20234 +  esac
20235 +  case $ac_prog in
20236 +    # Accept absolute paths.
20237 +    [[\\/]]* | ?:[[\\/]]*)
20238 +      re_direlt='/[[^/]][[^/]]*/\.\./'
20239 +      # Canonicalize the pathname of ld
20240 +      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
20241 +      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
20242 +       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
20243 +      done
20244 +      test -z "$LD" && LD="$ac_prog"
20245 +      ;;
20246 +  "")
20247 +    # If it fails, then pretend we aren't using GCC.
20248 +    ac_prog=ld
20249 +    ;;
20250 +  *)
20251 +    # If it is relative, then search for the first ld in PATH.
20252 +    with_gnu_ld=unknown
20253 +    ;;
20254 +  esac
20255 +elif test "$with_gnu_ld" = yes; then
20256 +  AC_MSG_CHECKING([for GNU ld])
20257 +else
20258 +  AC_MSG_CHECKING([for non-GNU ld])
20259 +fi
20260 +AC_CACHE_VAL(lt_cv_path_LD,
20261 +[if test -z "$LD"; then
20262 +  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
20263 +  for ac_dir in $PATH; do
20264 +    IFS="$lt_save_ifs"
20265 +    test -z "$ac_dir" && ac_dir=.
20266 +    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
20267 +      lt_cv_path_LD="$ac_dir/$ac_prog"
20268 +      # Check to see if the program is GNU ld.  I'd rather use --version,
20269 +      # but apparently some GNU ld's only accept -v.
20270 +      # Break only if it was the GNU/non-GNU ld that we prefer.
20271 +      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
20272 +      *GNU* | *'with BFD'*)
20273 +       test "$with_gnu_ld" != no && break
20274 +       ;;
20275 +      *)
20276 +       test "$with_gnu_ld" != yes && break
20277 +       ;;
20278 +      esac
20279 +    fi
20280 +  done
20281 +  IFS="$lt_save_ifs"
20282 +else
20283 +  lt_cv_path_LD="$LD" # Let the user override the test with a path.
20284 +fi])
20285 +LD="$lt_cv_path_LD"
20286 +if test -n "$LD"; then
20287 +  AC_MSG_RESULT($LD)
20288 +else
20289 +  AC_MSG_RESULT(no)
20290 +fi
20291 +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
20292 +AC_PROG_LD_GNU
20293 +])# AC_PROG_LD
20294 +
20295 +
20296 +# AC_PROG_LD_GNU
20297 +# --------------
20298 +AC_DEFUN([AC_PROG_LD_GNU],
20299 +[AC_REQUIRE([AC_PROG_EGREP])dnl
20300 +AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
20301 +[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
20302 +case `$LD -v 2>&1 </dev/null` in
20303 +*GNU* | *'with BFD'*)
20304 +  lt_cv_prog_gnu_ld=yes
20305 +  ;;
20306 +*)
20307 +  lt_cv_prog_gnu_ld=no
20308 +  ;;
20309 +esac])
20310 +with_gnu_ld=$lt_cv_prog_gnu_ld
20311 +])# AC_PROG_LD_GNU
20312 +
20313 +
20314 +# AC_PROG_LD_RELOAD_FLAG
20315 +# ----------------------
20316 +# find reload flag for linker
20317 +#   -- PORTME Some linkers may need a different reload flag.
20318 +AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
20319 +[AC_CACHE_CHECK([for $LD option to reload object files],
20320 +  lt_cv_ld_reload_flag,
20321 +  [lt_cv_ld_reload_flag='-r'])
20322 +reload_flag=$lt_cv_ld_reload_flag
20323 +case $reload_flag in
20324 +"" | " "*) ;;
20325 +*) reload_flag=" $reload_flag" ;;
20326 +esac
20327 +reload_cmds='$LD$reload_flag -o $output$reload_objs'
20328 +case $host_os in
20329 +  darwin*)
20330 +    if test "$GCC" = yes; then
20331 +      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
20332 +    else
20333 +      reload_cmds='$LD$reload_flag -o $output$reload_objs'
20334 +    fi
20335 +    ;;
20336 +esac
20337 +])# AC_PROG_LD_RELOAD_FLAG
20338 +
20339 +
20340 +# AC_DEPLIBS_CHECK_METHOD
20341 +# -----------------------
20342 +# how to check for library dependencies
20343 +#  -- PORTME fill in with the dynamic library characteristics
20344 +AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
20345 +[AC_CACHE_CHECK([how to recognise dependent libraries],
20346 +lt_cv_deplibs_check_method,
20347 +[lt_cv_file_magic_cmd='$MAGIC_CMD'
20348 +lt_cv_file_magic_test_file=
20349 +lt_cv_deplibs_check_method='unknown'
20350 +# Need to set the preceding variable on all platforms that support
20351 +# interlibrary dependencies.
20352 +# 'none' -- dependencies not supported.
20353 +# `unknown' -- same as none, but documents that we really don't know.
20354 +# 'pass_all' -- all dependencies passed with no checks.
20355 +# 'test_compile' -- check by making test program.
20356 +# 'file_magic [[regex]]' -- check by looking for files in library path
20357 +# which responds to the $file_magic_cmd with a given extended regex.
20358 +# If you have `file' or equivalent on your system and you're not sure
20359 +# whether `pass_all' will *always* work, you probably want this one.
20360 +
20361 +case $host_os in
20362 +aix4* | aix5*)
20363 +  lt_cv_deplibs_check_method=pass_all
20364 +  ;;
20365 +
20366 +beos*)
20367 +  lt_cv_deplibs_check_method=pass_all
20368 +  ;;
20369 +
20370 +bsdi[[45]]*)
20371 +  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
20372 +  lt_cv_file_magic_cmd='/usr/bin/file -L'
20373 +  lt_cv_file_magic_test_file=/shlib/libc.so
20374 +  ;;
20375 +
20376 +cygwin*)
20377 +  # func_win32_libid is a shell function defined in ltmain.sh
20378 +  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
20379 +  lt_cv_file_magic_cmd='func_win32_libid'
20380 +  ;;
20381 +
20382 +mingw* | pw32*)
20383 +  # Base MSYS/MinGW do not provide the 'file' command needed by
20384 +  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
20385 +  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
20386 +  lt_cv_file_magic_cmd='$OBJDUMP -f'
20387 +  ;;
20388 +
20389 +darwin* | rhapsody*)
20390 +  lt_cv_deplibs_check_method=pass_all
20391 +  ;;
20392 +
20393 +freebsd* | kfreebsd*-gnu | dragonfly*)
20394 +  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
20395 +    case $host_cpu in
20396 +    i*86 )
20397 +      # Not sure whether the presence of OpenBSD here was a mistake.
20398 +      # Let's accept both of them until this is cleared up.
20399 +      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
20400 +      lt_cv_file_magic_cmd=/usr/bin/file
20401 +      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
20402 +      ;;
20403 +    esac
20404 +  else
20405 +    lt_cv_deplibs_check_method=pass_all
20406 +  fi
20407 +  ;;
20408 +
20409 +gnu*)
20410 +  lt_cv_deplibs_check_method=pass_all
20411 +  ;;
20412 +
20413 +hpux10.20* | hpux11*)
20414 +  lt_cv_file_magic_cmd=/usr/bin/file
20415 +  case "$host_cpu" in
20416 +  ia64*)
20417 +    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
20418 +    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
20419 +    ;;
20420 +  hppa*64*)
20421 +    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
20422 +    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
20423 +    ;;
20424 +  *)
20425 +    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
20426 +    lt_cv_file_magic_test_file=/usr/lib/libc.sl
20427 +    ;;
20428 +  esac
20429 +  ;;
20430 +
20431 +irix5* | irix6* | nonstopux*)
20432 +  case $LD in
20433 +  *-32|*"-32 ") libmagic=32-bit;;
20434 +  *-n32|*"-n32 ") libmagic=N32;;
20435 +  *-64|*"-64 ") libmagic=64-bit;;
20436 +  *) libmagic=never-match;;
20437 +  esac
20438 +  lt_cv_deplibs_check_method=pass_all
20439 +  ;;
20440 +
20441 +# This must be Linux ELF.
20442 +linux*)
20443 +  lt_cv_deplibs_check_method=pass_all
20444 +  ;;
20445 +
20446 +netbsd*)
20447 +  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
20448 +    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
20449 +  else
20450 +    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
20451 +  fi
20452 +  ;;
20453 +
20454 +newos6*)
20455 +  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
20456 +  lt_cv_file_magic_cmd=/usr/bin/file
20457 +  lt_cv_file_magic_test_file=/usr/lib/libnls.so
20458 +  ;;
20459 +
20460 +nto-qnx*)
20461 +  lt_cv_deplibs_check_method=unknown
20462 +  ;;
20463 +
20464 +openbsd*)
20465 +  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
20466 +    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
20467 +  else
20468 +    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
20469 +  fi
20470 +  ;;
20471 +
20472 +osf3* | osf4* | osf5*)
20473 +  lt_cv_deplibs_check_method=pass_all
20474 +  ;;
20475 +
20476 +sco3.2v5*)
20477 +  lt_cv_deplibs_check_method=pass_all
20478 +  ;;
20479 +
20480 +solaris*)
20481 +  lt_cv_deplibs_check_method=pass_all
20482 +  ;;
20483 +
20484 +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
20485 +  case $host_vendor in
20486 +  motorola)
20487 +    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
20488 +    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
20489 +    ;;
20490 +  ncr)
20491 +    lt_cv_deplibs_check_method=pass_all
20492 +    ;;
20493 +  sequent)
20494 +    lt_cv_file_magic_cmd='/bin/file'
20495 +    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
20496 +    ;;
20497 +  sni)
20498 +    lt_cv_file_magic_cmd='/bin/file'
20499 +    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
20500 +    lt_cv_file_magic_test_file=/lib/libc.so
20501 +    ;;
20502 +  siemens)
20503 +    lt_cv_deplibs_check_method=pass_all
20504 +    ;;
20505 +  esac
20506 +  ;;
20507 +
20508 +sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
20509 +  lt_cv_deplibs_check_method=pass_all
20510 +  ;;
20511 +esac
20512 +])
20513 +file_magic_cmd=$lt_cv_file_magic_cmd
20514 +deplibs_check_method=$lt_cv_deplibs_check_method
20515 +test -z "$deplibs_check_method" && deplibs_check_method=unknown
20516 +])# AC_DEPLIBS_CHECK_METHOD
20517 +
20518 +
20519 +# AC_PROG_NM
20520 +# ----------
20521 +# find the pathname to a BSD-compatible name lister
20522 +AC_DEFUN([AC_PROG_NM],
20523 +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
20524 +[if test -n "$NM"; then
20525 +  # Let the user override the test.
20526 +  lt_cv_path_NM="$NM"
20527 +else
20528 +  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
20529 +  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
20530 +    IFS="$lt_save_ifs"
20531 +    test -z "$ac_dir" && ac_dir=.
20532 +    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
20533 +    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
20534 +      # Check to see if the nm accepts a BSD-compat flag.
20535 +      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
20536 +      #   nm: unknown option "B" ignored
20537 +      # Tru64's nm complains that /dev/null is an invalid object file
20538 +      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
20539 +      */dev/null* | *'Invalid file or object type'*)
20540 +       lt_cv_path_NM="$tmp_nm -B"
20541 +       break
20542 +        ;;
20543 +      *)
20544 +       case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
20545 +       */dev/null*)
20546 +         lt_cv_path_NM="$tmp_nm -p"
20547 +         break
20548 +         ;;
20549 +       *)
20550 +         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
20551 +         continue # so that we can try to find one that supports BSD flags
20552 +         ;;
20553 +       esac
20554 +      esac
20555 +    fi
20556 +  done
20557 +  IFS="$lt_save_ifs"
20558 +  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
20559 +fi])
20560 +NM="$lt_cv_path_NM"
20561 +])# AC_PROG_NM
20562 +
20563 +
20564 +# AC_CHECK_LIBM
20565 +# -------------
20566 +# check for math library
20567 +AC_DEFUN([AC_CHECK_LIBM],
20568 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
20569 +LIBM=
20570 +case $host in
20571 +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
20572 +  # These system don't have libm, or don't need it
20573 +  ;;
20574 +*-ncr-sysv4.3*)
20575 +  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
20576 +  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
20577 +  ;;
20578 +*)
20579 +  AC_CHECK_LIB(m, cos, LIBM="-lm")
20580 +  ;;
20581 +esac
20582 +])# AC_CHECK_LIBM
20583 +
20584 +
20585 +# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
20586 +# -----------------------------------
20587 +# sets LIBLTDL to the link flags for the libltdl convenience library and
20588 +# LTDLINCL to the include flags for the libltdl header and adds
20589 +# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
20590 +# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
20591 +# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
20592 +# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
20593 +# '${top_srcdir}/' (note the single quotes!).  If your package is not
20594 +# flat and you're not using automake, define top_builddir and
20595 +# top_srcdir appropriately in the Makefiles.
20596 +AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
20597 +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
20598 +  case $enable_ltdl_convenience in
20599 +  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
20600 +  "") enable_ltdl_convenience=yes
20601 +      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
20602 +  esac
20603 +  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
20604 +  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
20605 +  # For backwards non-gettext consistent compatibility...
20606 +  INCLTDL="$LTDLINCL"
20607 +])# AC_LIBLTDL_CONVENIENCE
20608 +
20609 +
20610 +# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
20611 +# -----------------------------------
20612 +# sets LIBLTDL to the link flags for the libltdl installable library and
20613 +# LTDLINCL to the include flags for the libltdl header and adds
20614 +# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
20615 +# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
20616 +# DIRECTORY is not provided and an installed libltdl is not found, it is
20617 +# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
20618 +# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
20619 +# quotes!).  If your package is not flat and you're not using automake,
20620 +# define top_builddir and top_srcdir appropriately in the Makefiles.
20621 +# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
20622 +AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
20623 +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
20624 +  AC_CHECK_LIB(ltdl, lt_dlinit,
20625 +  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
20626 +  [if test x"$enable_ltdl_install" = xno; then
20627 +     AC_MSG_WARN([libltdl not installed, but installation disabled])
20628 +   else
20629 +     enable_ltdl_install=yes
20630 +   fi
20631 +  ])
20632 +  if test x"$enable_ltdl_install" = x"yes"; then
20633 +    ac_configure_args="$ac_configure_args --enable-ltdl-install"
20634 +    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
20635 +    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
20636 +  else
20637 +    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
20638 +    LIBLTDL="-lltdl"
20639 +    LTDLINCL=
20640 +  fi
20641 +  # For backwards non-gettext consistent compatibility...
20642 +  INCLTDL="$LTDLINCL"
20643 +])# AC_LIBLTDL_INSTALLABLE
20644 +
20645 +
20646 +# AC_LIBTOOL_CXX
20647 +# --------------
20648 +# enable support for C++ libraries
20649 +AC_DEFUN([AC_LIBTOOL_CXX],
20650 +[AC_REQUIRE([_LT_AC_LANG_CXX])
20651 +])# AC_LIBTOOL_CXX
20652 +
20653 +
20654 +# _LT_AC_LANG_CXX
20655 +# ---------------
20656 +AC_DEFUN([_LT_AC_LANG_CXX],
20657 +[AC_REQUIRE([AC_PROG_CXX])
20658 +AC_REQUIRE([_LT_AC_PROG_CXXCPP])
20659 +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
20660 +])# _LT_AC_LANG_CXX
20661 +
20662 +# _LT_AC_PROG_CXXCPP
20663 +# ---------------
20664 +AC_DEFUN([_LT_AC_PROG_CXXCPP],
20665 +[
20666 +AC_REQUIRE([AC_PROG_CXX])
20667 +if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
20668 +    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
20669 +    (test "X$CXX" != "Xg++"))) ; then
20670 +  AC_PROG_CXXCPP
20671 +fi
20672 +])# _LT_AC_PROG_CXXCPP
20673 +
20674 +# AC_LIBTOOL_F77
20675 +# --------------
20676 +# enable support for Fortran 77 libraries
20677 +AC_DEFUN([AC_LIBTOOL_F77],
20678 +[AC_REQUIRE([_LT_AC_LANG_F77])
20679 +])# AC_LIBTOOL_F77
20680 +
20681 +
20682 +# _LT_AC_LANG_F77
20683 +# ---------------
20684 +AC_DEFUN([_LT_AC_LANG_F77],
20685 +[AC_REQUIRE([AC_PROG_F77])
20686 +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
20687 +])# _LT_AC_LANG_F77
20688 +
20689 +
20690 +# AC_LIBTOOL_GCJ
20691 +# --------------
20692 +# enable support for GCJ libraries
20693 +AC_DEFUN([AC_LIBTOOL_GCJ],
20694 +[AC_REQUIRE([_LT_AC_LANG_GCJ])
20695 +])# AC_LIBTOOL_GCJ
20696 +
20697 +
20698 +# _LT_AC_LANG_GCJ
20699 +# ---------------
20700 +AC_DEFUN([_LT_AC_LANG_GCJ],
20701 +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
20702 +  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
20703 +    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
20704 +      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
20705 +        [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
20706 +          [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
20707 +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
20708 +])# _LT_AC_LANG_GCJ
20709 +
20710 +
20711 +# AC_LIBTOOL_RC
20712 +# --------------
20713 +# enable support for Windows resource files
20714 +AC_DEFUN([AC_LIBTOOL_RC],
20715 +[AC_REQUIRE([LT_AC_PROG_RC])
20716 +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
20717 +])# AC_LIBTOOL_RC
20718 +
20719 +
20720 +# AC_LIBTOOL_LANG_C_CONFIG
20721 +# ------------------------
20722 +# Ensure that the configuration vars for the C compiler are
20723 +# suitably defined.  Those variables are subsequently used by
20724 +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
20725 +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
20726 +AC_DEFUN([_LT_AC_LANG_C_CONFIG],
20727 +[lt_save_CC="$CC"
20728 +AC_LANG_PUSH(C)
20729 +
20730 +# Source file extension for C test sources.
20731 +ac_ext=c
20732 +
20733 +# Object file extension for compiled C test sources.
20734 +objext=o
20735 +_LT_AC_TAGVAR(objext, $1)=$objext
20736 +
20737 +# Code to be used in simple compile tests
20738 +lt_simple_compile_test_code="int some_variable = 0;\n"
20739 +
20740 +# Code to be used in simple link tests
20741 +lt_simple_link_test_code='int main(){return(0);}\n'
20742 +
20743 +_LT_AC_SYS_COMPILER
20744 +
20745 +#
20746 +# Check for any special shared library compilation flags.
20747 +#
20748 +_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
20749 +if test "$GCC" = no; then
20750 +  case $host_os in
20751 +  sco3.2v5*)
20752 +    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
20753 +    ;;
20754 +  esac
20755 +fi
20756 +if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
20757 +  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
20758 +  if echo "$old_CC $old_CFLAGS " | grep "[[    ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]]" >/dev/null; then :
20759 +  else
20760 +    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
20761 +    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
20762 +  fi
20763 +fi
20764 +
20765 +
20766 +#
20767 +# Check to make sure the static flag actually works.
20768 +#
20769 +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
20770 +  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
20771 +  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
20772 +  [],
20773 +  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
20774 +
20775 +
20776 +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
20777 +AC_LIBTOOL_PROG_COMPILER_PIC($1)
20778 +AC_LIBTOOL_PROG_CC_C_O($1)
20779 +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
20780 +AC_LIBTOOL_PROG_LD_SHLIBS($1)
20781 +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
20782 +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
20783 +AC_LIBTOOL_SYS_LIB_STRIP
20784 +AC_LIBTOOL_DLOPEN_SELF($1)
20785 +
20786 +# Report which librarie types wil actually be built
20787 +AC_MSG_CHECKING([if libtool supports shared libraries])
20788 +AC_MSG_RESULT([$can_build_shared])
20789 +
20790 +AC_MSG_CHECKING([whether to build shared libraries])
20791 +test "$can_build_shared" = "no" && enable_shared=no
20792 +
20793 +# On AIX, shared libraries and static libraries use the same namespace, and
20794 +# are all built from PIC.
20795 +case "$host_os" in
20796 +aix3*)
20797 +  test "$enable_shared" = yes && enable_static=no
20798 +  if test -n "$RANLIB"; then
20799 +    archive_cmds="$archive_cmds~\$RANLIB \$lib"
20800 +    postinstall_cmds='$RANLIB $lib'
20801 +  fi
20802 +  ;;
20803 +
20804 +aix4* | aix5*)
20805 +  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
20806 +    test "$enable_shared" = yes && enable_static=no
20807 +  fi
20808 +    ;;
20809 +esac
20810 +AC_MSG_RESULT([$enable_shared])
20811 +
20812 +AC_MSG_CHECKING([whether to build static libraries])
20813 +# Make sure either enable_shared or enable_static is yes.
20814 +test "$enable_shared" = yes || enable_static=yes
20815 +AC_MSG_RESULT([$enable_static])
20816 +
20817 +AC_LIBTOOL_CONFIG($1)
20818 +
20819 +AC_LANG_POP
20820 +CC="$lt_save_CC"
20821 +])# AC_LIBTOOL_LANG_C_CONFIG
20822 +
20823 +
20824 +# AC_LIBTOOL_LANG_CXX_CONFIG
20825 +# --------------------------
20826 +# Ensure that the configuration vars for the C compiler are
20827 +# suitably defined.  Those variables are subsequently used by
20828 +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
20829 +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
20830 +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
20831 +[AC_LANG_PUSH(C++)
20832 +AC_REQUIRE([AC_PROG_CXX])
20833 +AC_REQUIRE([_LT_AC_PROG_CXXCPP])
20834 +
20835 +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
20836 +_LT_AC_TAGVAR(allow_undefined_flag, $1)=
20837 +_LT_AC_TAGVAR(always_export_symbols, $1)=no
20838 +_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
20839 +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
20840 +_LT_AC_TAGVAR(hardcode_direct, $1)=no
20841 +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
20842 +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
20843 +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
20844 +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
20845 +_LT_AC_TAGVAR(hardcode_automatic, $1)=no
20846 +_LT_AC_TAGVAR(module_cmds, $1)=
20847 +_LT_AC_TAGVAR(module_expsym_cmds, $1)=
20848 +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
20849 +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
20850 +_LT_AC_TAGVAR(no_undefined_flag, $1)=
20851 +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
20852 +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
20853 +
20854 +# Dependencies to place before and after the object being linked:
20855 +_LT_AC_TAGVAR(predep_objects, $1)=
20856 +_LT_AC_TAGVAR(postdep_objects, $1)=
20857 +_LT_AC_TAGVAR(predeps, $1)=
20858 +_LT_AC_TAGVAR(postdeps, $1)=
20859 +_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
20860 +
20861 +# Source file extension for C++ test sources.
20862 +ac_ext=cc
20863 +
20864 +# Object file extension for compiled C++ test sources.
20865 +objext=o
20866 +_LT_AC_TAGVAR(objext, $1)=$objext
20867 +
20868 +# Code to be used in simple compile tests
20869 +lt_simple_compile_test_code="int some_variable = 0;\n"
20870 +
20871 +# Code to be used in simple link tests
20872 +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
20873 +
20874 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
20875 +_LT_AC_SYS_COMPILER
20876 +
20877 +# Allow CC to be a program name with arguments.
20878 +lt_save_CC=$CC
20879 +lt_save_LD=$LD
20880 +lt_save_GCC=$GCC
20881 +GCC=$GXX
20882 +lt_save_with_gnu_ld=$with_gnu_ld
20883 +lt_save_path_LD=$lt_cv_path_LD
20884 +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
20885 +  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
20886 +else
20887 +  unset lt_cv_prog_gnu_ld
20888 +fi
20889 +if test -n "${lt_cv_path_LDCXX+set}"; then
20890 +  lt_cv_path_LD=$lt_cv_path_LDCXX
20891 +else
20892 +  unset lt_cv_path_LD
20893 +fi
20894 +test -z "${LDCXX+set}" || LD=$LDCXX
20895 +CC=${CXX-"c++"}
20896 +compiler=$CC
20897 +_LT_AC_TAGVAR(compiler, $1)=$CC
20898 +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
20899 +
20900 +# We don't want -fno-exception wen compiling C++ code, so set the
20901 +# no_builtin_flag separately
20902 +if test "$GXX" = yes; then
20903 +  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
20904 +else
20905 +  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
20906 +fi
20907 +
20908 +if test "$GXX" = yes; then
20909 +  # Set up default GNU C++ configuration
20910 +
20911 +  AC_PROG_LD
20912 +
20913 +  # Check if GNU C++ uses GNU ld as the underlying linker, since the
20914 +  # archiving commands below assume that GNU ld is being used.
20915 +  if test "$with_gnu_ld" = yes; then
20916 +    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
20917 +    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20918 +
20919 +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
20920 +    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
20921 +
20922 +    # If archive_cmds runs LD, not CC, wlarc should be empty
20923 +    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
20924 +    #     investigate it a little bit more. (MM)
20925 +    wlarc='${wl}'
20926 +
20927 +    # ancient GNU ld didn't support --whole-archive et. al.
20928 +    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
20929 +       grep 'no-whole-archive' > /dev/null; then
20930 +      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
20931 +    else
20932 +      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
20933 +    fi
20934 +  else
20935 +    with_gnu_ld=no
20936 +    wlarc=
20937 +
20938 +    # A generic and very simple default shared library creation
20939 +    # command for GNU C++ for the case where it uses the native
20940 +    # linker, instead of GNU ld.  If possible, this setting should
20941 +    # overridden to take advantage of the native linker features on
20942 +    # the platform it is being used on.
20943 +    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
20944 +  fi
20945 +
20946 +  # Commands to make compiler produce verbose output that lists
20947 +  # what "hidden" libraries, object files and flags are used when
20948 +  # linking a shared library.
20949 +  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
20950 +
20951 +else
20952 +  GXX=no
20953 +  with_gnu_ld=no
20954 +  wlarc=
20955 +fi
20956 +
20957 +# PORTME: fill in a description of your system's C++ link characteristics
20958 +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
20959 +_LT_AC_TAGVAR(ld_shlibs, $1)=yes
20960 +case $host_os in
20961 +  aix3*)
20962 +    # FIXME: insert proper C++ library support
20963 +    _LT_AC_TAGVAR(ld_shlibs, $1)=no
20964 +    ;;
20965 +  aix4* | aix5*)
20966 +    if test "$host_cpu" = ia64; then
20967 +      # On IA64, the linker does run time linking by default, so we don't
20968 +      # have to do anything special.
20969 +      aix_use_runtimelinking=no
20970 +      exp_sym_flag='-Bexport'
20971 +      no_entry_flag=""
20972 +    else
20973 +      aix_use_runtimelinking=no
20974 +
20975 +      # Test if we are trying to use run time linking or normal
20976 +      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
20977 +      # need to do runtime linking.
20978 +      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
20979 +       for ld_flag in $LDFLAGS; do
20980 +         case $ld_flag in
20981 +         *-brtl*)
20982 +           aix_use_runtimelinking=yes
20983 +           break
20984 +           ;;
20985 +         esac
20986 +       done
20987 +      esac
20988 +
20989 +      exp_sym_flag='-bexport'
20990 +      no_entry_flag='-bnoentry'
20991 +    fi
20992 +
20993 +    # When large executables or shared objects are built, AIX ld can
20994 +    # have problems creating the table of contents.  If linking a library
20995 +    # or program results in "error TOC overflow" add -mminimal-toc to
20996 +    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
20997 +    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
20998 +
20999 +    _LT_AC_TAGVAR(archive_cmds, $1)=''
21000 +    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
21001 +    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
21002 +    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
21003 +
21004 +    if test "$GXX" = yes; then
21005 +      case $host_os in aix4.[[012]]|aix4.[[012]].*)
21006 +      # We only want to do this on AIX 4.2 and lower, the check
21007 +      # below for broken collect2 doesn't work under 4.3+
21008 +       collect2name=`${CC} -print-prog-name=collect2`
21009 +       if test -f "$collect2name" && \
21010 +          strings "$collect2name" | grep resolve_lib_name >/dev/null
21011 +       then
21012 +         # We have reworked collect2
21013 +         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
21014 +       else
21015 +         # We have old collect2
21016 +         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
21017 +         # It fails to find uninstalled libraries when the uninstalled
21018 +         # path is not listed in the libpath.  Setting hardcode_minus_L
21019 +         # to unsupported forces relinking
21020 +         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
21021 +         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
21022 +         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
21023 +       fi
21024 +      esac
21025 +      shared_flag='-shared'
21026 +      if test "$aix_use_runtimelinking" = yes; then
21027 +       shared_flag="$shared_flag "'${wl}-G'
21028 +      fi
21029 +    else
21030 +      # not using gcc
21031 +      if test "$host_cpu" = ia64; then
21032 +       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
21033 +       # chokes on -Wl,-G. The following line is correct:
21034 +       shared_flag='-G'
21035 +      else
21036 +       if test "$aix_use_runtimelinking" = yes; then
21037 +         shared_flag='${wl}-G'
21038 +       else
21039 +         shared_flag='${wl}-bM:SRE'
21040 +       fi
21041 +      fi
21042 +    fi
21043 +
21044 +    # It seems that -bexpall does not export symbols beginning with
21045 +    # underscore (_), so it is better to generate a list of symbols to export.
21046 +    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
21047 +    if test "$aix_use_runtimelinking" = yes; then
21048 +      # Warning - without using the other runtime loading flags (-brtl),
21049 +      # -berok will link without error, but may produce a broken library.
21050 +      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
21051 +      # Determine the default libpath from the value encoded in an empty executable.
21052 +      _LT_AC_SYS_LIBPATH_AIX
21053 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
21054 +
21055 +      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
21056 +     else
21057 +      if test "$host_cpu" = ia64; then
21058 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
21059 +       _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
21060 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
21061 +      else
21062 +       # Determine the default libpath from the value encoded in an empty executable.
21063 +       _LT_AC_SYS_LIBPATH_AIX
21064 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
21065 +       # Warning - without using the other run time loading flags,
21066 +       # -berok will link without error, but may produce a broken library.
21067 +       _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
21068 +       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
21069 +       # -bexpall does not export symbols beginning with underscore (_)
21070 +       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
21071 +       # Exported symbols can be pulled into shared objects from archives
21072 +       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
21073 +       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
21074 +       # This is similar to how AIX traditionally builds it's shared libraries.
21075 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
21076 +      fi
21077 +    fi
21078 +    ;;
21079 +  chorus*)
21080 +    case $cc_basename in
21081 +      *)
21082 +       # FIXME: insert proper C++ library support
21083 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21084 +       ;;
21085 +    esac
21086 +    ;;
21087 +
21088 +
21089 +  cygwin* | mingw* | pw32*)
21090 +    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
21091 +    # as there is no search path for DLLs.
21092 +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
21093 +    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
21094 +    _LT_AC_TAGVAR(always_export_symbols, $1)=no
21095 +    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
21096 +
21097 +    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
21098 +      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
21099 +      # If the export-symbols file already is a .def file (1st line
21100 +      # is EXPORTS), use it as is; otherwise, prepend...
21101 +      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
21102 +       cp $export_symbols $output_objdir/$soname.def;
21103 +      else
21104 +       echo EXPORTS > $output_objdir/$soname.def;
21105 +       cat $export_symbols >> $output_objdir/$soname.def;
21106 +      fi~
21107 +      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
21108 +    else
21109 +      _LT_AC_TAGVAR(ld_shlibs, $1)=no
21110 +    fi
21111 +  ;;
21112 +      darwin* | rhapsody*)
21113 +        case "$host_os" in
21114 +        rhapsody* | darwin1.[[012]])
21115 +         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
21116 +         ;;
21117 +       *) # Darwin 1.3 on
21118 +         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
21119 +           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
21120 +         else
21121 +           case ${MACOSX_DEPLOYMENT_TARGET} in
21122 +             10.[[012]])
21123 +               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
21124 +               ;;
21125 +             10.*)
21126 +               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
21127 +               ;;
21128 +           esac
21129 +         fi
21130 +         ;;
21131 +        esac
21132 +      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
21133 +      _LT_AC_TAGVAR(hardcode_direct, $1)=no
21134 +      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
21135 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
21136 +      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
21137 +      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
21138 +
21139 +    if test "$GXX" = yes ; then
21140 +      lt_int_apple_cc_single_mod=no
21141 +      output_verbose_link_cmd='echo'
21142 +      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
21143 +       lt_int_apple_cc_single_mod=yes
21144 +      fi
21145 +      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
21146 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
21147 +      else
21148 +          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
21149 +        fi
21150 +        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
21151 +        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
21152 +          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
21153 +            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
21154 +          else
21155 +            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
21156 +          fi
21157 +            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
21158 +      else
21159 +      case "$cc_basename" in
21160 +        xlc*)
21161 +         output_verbose_link_cmd='echo'
21162 +          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
21163 +          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
21164 +          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
21165 +          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
21166 +          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
21167 +          ;;
21168 +       *)
21169 +         _LT_AC_TAGVAR(ld_shlibs, $1)=no
21170 +          ;;
21171 +      esac
21172 +      fi
21173 +        ;;
21174 +
21175 +  dgux*)
21176 +    case $cc_basename in
21177 +      ec++)
21178 +       # FIXME: insert proper C++ library support
21179 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21180 +       ;;
21181 +      ghcx)
21182 +       # Green Hills C++ Compiler
21183 +       # FIXME: insert proper C++ library support
21184 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21185 +       ;;
21186 +      *)
21187 +       # FIXME: insert proper C++ library support
21188 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21189 +       ;;
21190 +    esac
21191 +    ;;
21192 +  freebsd[[12]]*)
21193 +    # C++ shared libraries reported to be fairly broken before switch to ELF
21194 +    _LT_AC_TAGVAR(ld_shlibs, $1)=no
21195 +    ;;
21196 +  freebsd-elf*)
21197 +    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
21198 +    ;;
21199 +  freebsd* | kfreebsd*-gnu | dragonfly*)
21200 +    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
21201 +    # conventions
21202 +    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
21203 +    ;;
21204 +  gnu*)
21205 +    ;;
21206 +  hpux9*)
21207 +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
21208 +    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
21209 +    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
21210 +    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
21211 +    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
21212 +                               # but as the default
21213 +                               # location of the library.
21214 +
21215 +    case $cc_basename in
21216 +    CC)
21217 +      # FIXME: insert proper C++ library support
21218 +      _LT_AC_TAGVAR(ld_shlibs, $1)=no
21219 +      ;;
21220 +    aCC)
21221 +      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
21222 +      # Commands to make compiler produce verbose output that lists
21223 +      # what "hidden" libraries, object files and flags are used when
21224 +      # linking a shared library.
21225 +      #
21226 +      # There doesn't appear to be a way to prevent this compiler from
21227 +      # explicitly linking system object files so we need to strip them
21228 +      # from the output so that they don't get included in the library
21229 +      # dependencies.
21230 +      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
21231 +      ;;
21232 +    *)
21233 +      if test "$GXX" = yes; then
21234 +        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
21235 +      else
21236 +        # FIXME: insert proper C++ library support
21237 +        _LT_AC_TAGVAR(ld_shlibs, $1)=no
21238 +      fi
21239 +      ;;
21240 +    esac
21241 +    ;;
21242 +  hpux10*|hpux11*)
21243 +    if test $with_gnu_ld = no; then
21244 +      case "$host_cpu" in
21245 +      hppa*64*)
21246 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
21247 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
21248 +       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
21249 +        ;;
21250 +      ia64*)
21251 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
21252 +        ;;
21253 +      *)
21254 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
21255 +       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
21256 +       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
21257 +        ;;
21258 +      esac
21259 +    fi
21260 +    case "$host_cpu" in
21261 +    hppa*64*)
21262 +      _LT_AC_TAGVAR(hardcode_direct, $1)=no
21263 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
21264 +      ;;
21265 +    ia64*)
21266 +      _LT_AC_TAGVAR(hardcode_direct, $1)=no
21267 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
21268 +      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
21269 +                                             # but as the default
21270 +                                             # location of the library.
21271 +      ;;
21272 +    *)
21273 +      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
21274 +      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
21275 +                                             # but as the default
21276 +                                             # location of the library.
21277 +      ;;
21278 +    esac
21279 +
21280 +    case $cc_basename in
21281 +      CC)
21282 +       # FIXME: insert proper C++ library support
21283 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21284 +       ;;
21285 +      aCC)
21286 +       case "$host_cpu" in
21287 +       hppa*64*|ia64*)
21288 +         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
21289 +         ;;
21290 +       *)
21291 +         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
21292 +         ;;
21293 +       esac
21294 +       # Commands to make compiler produce verbose output that lists
21295 +       # what "hidden" libraries, object files and flags are used when
21296 +       # linking a shared library.
21297 +       #
21298 +       # There doesn't appear to be a way to prevent this compiler from
21299 +       # explicitly linking system object files so we need to strip them
21300 +       # from the output so that they don't get included in the library
21301 +       # dependencies.
21302 +       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
21303 +       ;;
21304 +      *)
21305 +       if test "$GXX" = yes; then
21306 +         if test $with_gnu_ld = no; then
21307 +           case "$host_cpu" in
21308 +           ia64*|hppa*64*)
21309 +             _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
21310 +             ;;
21311 +           *)
21312 +             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
21313 +             ;;
21314 +           esac
21315 +         fi
21316 +       else
21317 +         # FIXME: insert proper C++ library support
21318 +         _LT_AC_TAGVAR(ld_shlibs, $1)=no
21319 +       fi
21320 +       ;;
21321 +    esac
21322 +    ;;
21323 +  irix5* | irix6*)
21324 +    case $cc_basename in
21325 +      CC)
21326 +       # SGI C++
21327 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
21328 +
21329 +       # Archives containing C++ object files must be created using
21330 +       # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
21331 +       # necessary to make sure instantiated templates are included
21332 +       # in the archive.
21333 +       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
21334 +       ;;
21335 +      *)
21336 +       if test "$GXX" = yes; then
21337 +         if test "$with_gnu_ld" = no; then
21338 +           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
21339 +         else
21340 +           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
21341 +         fi
21342 +       fi
21343 +       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
21344 +       ;;
21345 +    esac
21346 +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
21347 +    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
21348 +    ;;
21349 +  linux*)
21350 +    case $cc_basename in
21351 +      KCC)
21352 +       # Kuck and Associates, Inc. (KAI) C++ Compiler
21353 +
21354 +       # KCC will only create a shared library if the output file
21355 +       # ends with ".so" (or ".sl" for HP-UX), so rename the library
21356 +       # to its proper name (with version) after linking.
21357 +       _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
21358 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
21359 +       # Commands to make compiler produce verbose output that lists
21360 +       # what "hidden" libraries, object files and flags are used when
21361 +       # linking a shared library.
21362 +       #
21363 +       # There doesn't appear to be a way to prevent this compiler from
21364 +       # explicitly linking system object files so we need to strip them
21365 +       # from the output so that they don't get included in the library
21366 +       # dependencies.
21367 +       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
21368 +
21369 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
21370 +       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
21371 +
21372 +       # Archives containing C++ object files must be created using
21373 +       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
21374 +       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
21375 +       ;;
21376 +      icpc)
21377 +       # Intel C++
21378 +       with_gnu_ld=yes
21379 +       # version 8.0 and above of icpc choke on multiply defined symbols
21380 +       # if we add $predep_objects and $postdep_objects, however 7.1 and
21381 +       # earlier do not add the objects themselves.
21382 +       case `$CC -V 2>&1` in
21383 +       *"Version 7."*)
21384 +         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
21385 +         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
21386 +         ;;
21387 +       *)  # Version 8.0 or newer
21388 +         tmp_idyn=
21389 +         case $host_cpu in
21390 +           ia64*) tmp_idyn=' -i_dynamic';;
21391 +         esac
21392 +         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
21393 +         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
21394 +         ;;
21395 +       esac
21396 +       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
21397 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
21398 +       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
21399 +       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
21400 +       ;;
21401 +      pgCC)
21402 +        # Portland Group C++ compiler
21403 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
21404 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
21405 +
21406 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
21407 +       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
21408 +        ;;
21409 +      cxx)
21410 +       # Compaq C++
21411 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
21412 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
21413 +
21414 +       runpath_var=LD_RUN_PATH
21415 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
21416 +       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
21417 +
21418 +       # Commands to make compiler produce verbose output that lists
21419 +       # what "hidden" libraries, object files and flags are used when
21420 +       # linking a shared library.
21421 +       #
21422 +       # There doesn't appear to be a way to prevent this compiler from
21423 +       # explicitly linking system object files so we need to strip them
21424 +       # from the output so that they don't get included in the library
21425 +       # dependencies.
21426 +       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
21427 +       ;;
21428 +    esac
21429 +    ;;
21430 +  lynxos*)
21431 +    # FIXME: insert proper C++ library support
21432 +    _LT_AC_TAGVAR(ld_shlibs, $1)=no
21433 +    ;;
21434 +  m88k*)
21435 +    # FIXME: insert proper C++ library support
21436 +    _LT_AC_TAGVAR(ld_shlibs, $1)=no
21437 +    ;;
21438 +  mvs*)
21439 +    case $cc_basename in
21440 +      cxx)
21441 +       # FIXME: insert proper C++ library support
21442 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21443 +       ;;
21444 +      *)
21445 +       # FIXME: insert proper C++ library support
21446 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21447 +       ;;
21448 +    esac
21449 +    ;;
21450 +  netbsd*)
21451 +    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
21452 +      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
21453 +      wlarc=
21454 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
21455 +      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
21456 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
21457 +    fi
21458 +    # Workaround some broken pre-1.5 toolchains
21459 +    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
21460 +    ;;
21461 +  openbsd2*)
21462 +    # C++ shared libraries are fairly broken
21463 +    _LT_AC_TAGVAR(ld_shlibs, $1)=no
21464 +    ;;
21465 +  openbsd*)
21466 +    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
21467 +    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
21468 +    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
21469 +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
21470 +    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
21471 +      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
21472 +      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
21473 +      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
21474 +    fi
21475 +    output_verbose_link_cmd='echo'
21476 +    ;;
21477 +  osf3*)
21478 +    case $cc_basename in
21479 +      KCC)
21480 +       # Kuck and Associates, Inc. (KAI) C++ Compiler
21481 +
21482 +       # KCC will only create a shared library if the output file
21483 +       # ends with ".so" (or ".sl" for HP-UX), so rename the library
21484 +       # to its proper name (with version) after linking.
21485 +       _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
21486 +
21487 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
21488 +       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
21489 +
21490 +       # Archives containing C++ object files must be created using
21491 +       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
21492 +       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
21493 +
21494 +       ;;
21495 +      RCC)
21496 +       # Rational C++ 2.4.1
21497 +       # FIXME: insert proper C++ library support
21498 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21499 +       ;;
21500 +      cxx)
21501 +       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
21502 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
21503 +
21504 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
21505 +       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
21506 +
21507 +       # Commands to make compiler produce verbose output that lists
21508 +       # what "hidden" libraries, object files and flags are used when
21509 +       # linking a shared library.
21510 +       #
21511 +       # There doesn't appear to be a way to prevent this compiler from
21512 +       # explicitly linking system object files so we need to strip them
21513 +       # from the output so that they don't get included in the library
21514 +       # dependencies.
21515 +       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
21516 +       ;;
21517 +      *)
21518 +       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
21519 +         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
21520 +         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
21521 +
21522 +         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
21523 +         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
21524 +
21525 +         # Commands to make compiler produce verbose output that lists
21526 +         # what "hidden" libraries, object files and flags are used when
21527 +         # linking a shared library.
21528 +         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
21529 +
21530 +       else
21531 +         # FIXME: insert proper C++ library support
21532 +         _LT_AC_TAGVAR(ld_shlibs, $1)=no
21533 +       fi
21534 +       ;;
21535 +    esac
21536 +    ;;
21537 +  osf4* | osf5*)
21538 +    case $cc_basename in
21539 +      KCC)
21540 +       # Kuck and Associates, Inc. (KAI) C++ Compiler
21541 +
21542 +       # KCC will only create a shared library if the output file
21543 +       # ends with ".so" (or ".sl" for HP-UX), so rename the library
21544 +       # to its proper name (with version) after linking.
21545 +       _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
21546 +
21547 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
21548 +       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
21549 +
21550 +       # Archives containing C++ object files must be created using
21551 +       # the KAI C++ compiler.
21552 +       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
21553 +       ;;
21554 +      RCC)
21555 +       # Rational C++ 2.4.1
21556 +       # FIXME: insert proper C++ library support
21557 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21558 +       ;;
21559 +      cxx)
21560 +       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
21561 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
21562 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
21563 +         echo "-hidden">> $lib.exp~
21564 +         $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
21565 +         $rm $lib.exp'
21566 +
21567 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
21568 +       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
21569 +
21570 +       # Commands to make compiler produce verbose output that lists
21571 +       # what "hidden" libraries, object files and flags are used when
21572 +       # linking a shared library.
21573 +       #
21574 +       # There doesn't appear to be a way to prevent this compiler from
21575 +       # explicitly linking system object files so we need to strip them
21576 +       # from the output so that they don't get included in the library
21577 +       # dependencies.
21578 +       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
21579 +       ;;
21580 +      *)
21581 +       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
21582 +         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
21583 +        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
21584 +
21585 +         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
21586 +         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
21587 +
21588 +         # Commands to make compiler produce verbose output that lists
21589 +         # what "hidden" libraries, object files and flags are used when
21590 +         # linking a shared library.
21591 +         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
21592 +
21593 +       else
21594 +         # FIXME: insert proper C++ library support
21595 +         _LT_AC_TAGVAR(ld_shlibs, $1)=no
21596 +       fi
21597 +       ;;
21598 +    esac
21599 +    ;;
21600 +  psos*)
21601 +    # FIXME: insert proper C++ library support
21602 +    _LT_AC_TAGVAR(ld_shlibs, $1)=no
21603 +    ;;
21604 +  sco*)
21605 +    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
21606 +    case $cc_basename in
21607 +      CC)
21608 +       # FIXME: insert proper C++ library support
21609 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21610 +       ;;
21611 +      *)
21612 +       # FIXME: insert proper C++ library support
21613 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21614 +       ;;
21615 +    esac
21616 +    ;;
21617 +  sunos4*)
21618 +    case $cc_basename in
21619 +      CC)
21620 +       # Sun C++ 4.x
21621 +       # FIXME: insert proper C++ library support
21622 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21623 +       ;;
21624 +      lcc)
21625 +       # Lucid
21626 +       # FIXME: insert proper C++ library support
21627 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21628 +       ;;
21629 +      *)
21630 +       # FIXME: insert proper C++ library support
21631 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21632 +       ;;
21633 +    esac
21634 +    ;;
21635 +  solaris*)
21636 +    case $cc_basename in
21637 +      CC)
21638 +       # Sun C++ 4.2, 5.x and Centerline C++
21639 +       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
21640 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
21641 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
21642 +       $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
21643 +
21644 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
21645 +       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
21646 +       case $host_os in
21647 +         solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
21648 +         *)
21649 +           # The C++ compiler is used as linker so we must use $wl
21650 +           # flag to pass the commands to the underlying system
21651 +           # linker.
21652 +           # Supported since Solaris 2.6 (maybe 2.5.1?)
21653 +           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
21654 +           ;;
21655 +       esac
21656 +       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
21657 +
21658 +       # Commands to make compiler produce verbose output that lists
21659 +       # what "hidden" libraries, object files and flags are used when
21660 +       # linking a shared library.
21661 +       #
21662 +       # There doesn't appear to be a way to prevent this compiler from
21663 +       # explicitly linking system object files so we need to strip them
21664 +       # from the output so that they don't get included in the library
21665 +       # dependencies.
21666 +       output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
21667 +
21668 +       # Archives containing C++ object files must be created using
21669 +       # "CC -xar", where "CC" is the Sun C++ compiler.  This is
21670 +       # necessary to make sure instantiated templates are included
21671 +       # in the archive.
21672 +       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
21673 +       ;;
21674 +      gcx)
21675 +       # Green Hills C++ Compiler
21676 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
21677 +
21678 +       # The C++ compiler must be used to create the archive.
21679 +       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
21680 +       ;;
21681 +      *)
21682 +       # GNU C++ compiler with Solaris linker
21683 +       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
21684 +         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
21685 +         if $CC --version | grep -v '^2\.7' > /dev/null; then
21686 +           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
21687 +           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
21688 +               $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
21689 +
21690 +           # Commands to make compiler produce verbose output that lists
21691 +           # what "hidden" libraries, object files and flags are used when
21692 +           # linking a shared library.
21693 +           output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
21694 +         else
21695 +           # g++ 2.7 appears to require `-G' NOT `-shared' on this
21696 +           # platform.
21697 +           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
21698 +           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
21699 +               $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
21700 +
21701 +           # Commands to make compiler produce verbose output that lists
21702 +           # what "hidden" libraries, object files and flags are used when
21703 +           # linking a shared library.
21704 +           output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
21705 +         fi
21706 +
21707 +         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
21708 +       fi
21709 +       ;;
21710 +    esac
21711 +    ;;
21712 +  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
21713 +    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
21714 +    ;;
21715 +  tandem*)
21716 +    case $cc_basename in
21717 +      NCC)
21718 +       # NonStop-UX NCC 3.20
21719 +       # FIXME: insert proper C++ library support
21720 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21721 +       ;;
21722 +      *)
21723 +       # FIXME: insert proper C++ library support
21724 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
21725 +       ;;
21726 +    esac
21727 +    ;;
21728 +  vxworks*)
21729 +    # FIXME: insert proper C++ library support
21730 +    _LT_AC_TAGVAR(ld_shlibs, $1)=no
21731 +    ;;
21732 +  *)
21733 +    # FIXME: insert proper C++ library support
21734 +    _LT_AC_TAGVAR(ld_shlibs, $1)=no
21735 +    ;;
21736 +esac
21737 +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
21738 +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
21739 +
21740 +_LT_AC_TAGVAR(GCC, $1)="$GXX"
21741 +_LT_AC_TAGVAR(LD, $1)="$LD"
21742 +
21743 +AC_LIBTOOL_POSTDEP_PREDEP($1)
21744 +AC_LIBTOOL_PROG_COMPILER_PIC($1)
21745 +AC_LIBTOOL_PROG_CC_C_O($1)
21746 +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
21747 +AC_LIBTOOL_PROG_LD_SHLIBS($1)
21748 +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
21749 +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
21750 +AC_LIBTOOL_SYS_LIB_STRIP
21751 +AC_LIBTOOL_DLOPEN_SELF($1)
21752 +
21753 +AC_LIBTOOL_CONFIG($1)
21754 +
21755 +AC_LANG_POP
21756 +CC=$lt_save_CC
21757 +LDCXX=$LD
21758 +LD=$lt_save_LD
21759 +GCC=$lt_save_GCC
21760 +with_gnu_ldcxx=$with_gnu_ld
21761 +with_gnu_ld=$lt_save_with_gnu_ld
21762 +lt_cv_path_LDCXX=$lt_cv_path_LD
21763 +lt_cv_path_LD=$lt_save_path_LD
21764 +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
21765 +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
21766 +])# AC_LIBTOOL_LANG_CXX_CONFIG
21767 +
21768 +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
21769 +# ------------------------
21770 +# Figure out "hidden" library dependencies from verbose
21771 +# compiler output when linking a shared library.
21772 +# Parse the compiler output and extract the necessary
21773 +# objects, libraries and library flags.
21774 +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
21775 +dnl we can't use the lt_simple_compile_test_code here,
21776 +dnl because it contains code intended for an executable,
21777 +dnl not a library.  It's possible we should let each
21778 +dnl tag define a new lt_????_link_test_code variable,
21779 +dnl but it's only used here...
21780 +ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
21781 +int a;
21782 +void foo (void) { a = 0; }
21783 +EOF
21784 +],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
21785 +class Foo
21786 +{
21787 +public:
21788 +  Foo (void) { a = 0; }
21789 +private:
21790 +  int a;
21791 +};
21792 +EOF
21793 +],[$1],[F77],[cat > conftest.$ac_ext <<EOF
21794 +      subroutine foo
21795 +      implicit none
21796 +      integer*4 a
21797 +      a=0
21798 +      return
21799 +      end
21800 +EOF
21801 +],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
21802 +public class foo {
21803 +  private int a;
21804 +  public void bar (void) {
21805 +    a = 0;
21806 +  }
21807 +};
21808 +EOF
21809 +])
21810 +dnl Parse the compiler output and extract the necessary
21811 +dnl objects, libraries and library flags.
21812 +if AC_TRY_EVAL(ac_compile); then
21813 +  # Parse the compiler output and extract the necessary
21814 +  # objects, libraries and library flags.
21815 +
21816 +  # Sentinel used to keep track of whether or not we are before
21817 +  # the conftest object file.
21818 +  pre_test_object_deps_done=no
21819 +
21820 +  # The `*' in the case matches for architectures that use `case' in
21821 +  # $output_verbose_cmd can trigger glob expansion during the loop
21822 +  # eval without this substitution.
21823 +  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
21824 +
21825 +  for p in `eval $output_verbose_link_cmd`; do
21826 +    case $p in
21827 +
21828 +    -L* | -R* | -l*)
21829 +       # Some compilers place space between "-{L,R}" and the path.
21830 +       # Remove the space.
21831 +       if test $p = "-L" \
21832 +         || test $p = "-R"; then
21833 +        prev=$p
21834 +        continue
21835 +       else
21836 +        prev=
21837 +       fi
21838 +
21839 +       if test "$pre_test_object_deps_done" = no; then
21840 +        case $p in
21841 +        -L* | -R*)
21842 +          # Internal compiler library paths should come after those
21843 +          # provided the user.  The postdeps already come after the
21844 +          # user supplied libs so there is no need to process them.
21845 +          if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
21846 +            _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
21847 +          else
21848 +            _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
21849 +          fi
21850 +          ;;
21851 +        # The "-l" case would never come before the object being
21852 +        # linked, so don't bother handling this case.
21853 +        esac
21854 +       else
21855 +        if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
21856 +          _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
21857 +        else
21858 +          _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
21859 +        fi
21860 +       fi
21861 +       ;;
21862 +
21863 +    *.$objext)
21864 +       # This assumes that the test object file only shows up
21865 +       # once in the compiler output.
21866 +       if test "$p" = "conftest.$objext"; then
21867 +        pre_test_object_deps_done=yes
21868 +        continue
21869 +       fi
21870 +
21871 +       if test "$pre_test_object_deps_done" = no; then
21872 +        if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
21873 +          _LT_AC_TAGVAR(predep_objects, $1)="$p"
21874 +        else
21875 +          _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
21876 +        fi
21877 +       else
21878 +        if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
21879 +          _LT_AC_TAGVAR(postdep_objects, $1)="$p"
21880 +        else
21881 +          _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
21882 +        fi
21883 +       fi
21884 +       ;;
21885 +
21886 +    *) ;; # Ignore the rest.
21887 +
21888 +    esac
21889 +  done
21890 +
21891 +  # Clean up.
21892 +  rm -f a.out a.exe
21893 +else
21894 +  echo "libtool.m4: error: problem compiling $1 test program"
21895 +fi
21896 +
21897 +$rm -f confest.$objext
21898 +
21899 +case " $_LT_AC_TAGVAR(postdeps, $1) " in
21900 +*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
21901 +esac
21902 +])# AC_LIBTOOL_POSTDEP_PREDEP
21903 +
21904 +# AC_LIBTOOL_LANG_F77_CONFIG
21905 +# ------------------------
21906 +# Ensure that the configuration vars for the C compiler are
21907 +# suitably defined.  Those variables are subsequently used by
21908 +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
21909 +AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
21910 +AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
21911 +[AC_REQUIRE([AC_PROG_F77])
21912 +AC_LANG_PUSH(Fortran 77)
21913 +
21914 +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
21915 +_LT_AC_TAGVAR(allow_undefined_flag, $1)=
21916 +_LT_AC_TAGVAR(always_export_symbols, $1)=no
21917 +_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
21918 +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
21919 +_LT_AC_TAGVAR(hardcode_direct, $1)=no
21920 +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
21921 +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
21922 +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
21923 +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
21924 +_LT_AC_TAGVAR(hardcode_automatic, $1)=no
21925 +_LT_AC_TAGVAR(module_cmds, $1)=
21926 +_LT_AC_TAGVAR(module_expsym_cmds, $1)=
21927 +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
21928 +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
21929 +_LT_AC_TAGVAR(no_undefined_flag, $1)=
21930 +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
21931 +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
21932 +
21933 +# Source file extension for f77 test sources.
21934 +ac_ext=f
21935 +
21936 +# Object file extension for compiled f77 test sources.
21937 +objext=o
21938 +_LT_AC_TAGVAR(objext, $1)=$objext
21939 +
21940 +# Code to be used in simple compile tests
21941 +lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
21942 +
21943 +# Code to be used in simple link tests
21944 +lt_simple_link_test_code="      program t\n      end\n"
21945 +
21946 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
21947 +_LT_AC_SYS_COMPILER
21948 +
21949 +# Allow CC to be a program name with arguments.
21950 +lt_save_CC="$CC"
21951 +CC=${F77-"f77"}
21952 +compiler=$CC
21953 +_LT_AC_TAGVAR(compiler, $1)=$CC
21954 +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
21955 +
21956 +AC_MSG_CHECKING([if libtool supports shared libraries])
21957 +AC_MSG_RESULT([$can_build_shared])
21958 +
21959 +AC_MSG_CHECKING([whether to build shared libraries])
21960 +test "$can_build_shared" = "no" && enable_shared=no
21961 +
21962 +# On AIX, shared libraries and static libraries use the same namespace, and
21963 +# are all built from PIC.
21964 +case "$host_os" in
21965 +aix3*)
21966 +  test "$enable_shared" = yes && enable_static=no
21967 +  if test -n "$RANLIB"; then
21968 +    archive_cmds="$archive_cmds~\$RANLIB \$lib"
21969 +    postinstall_cmds='$RANLIB $lib'
21970 +  fi
21971 +  ;;
21972 +aix4* | aix5*)
21973 +  test "$enable_shared" = yes && enable_static=no
21974 +  ;;
21975 +esac
21976 +AC_MSG_RESULT([$enable_shared])
21977 +
21978 +AC_MSG_CHECKING([whether to build static libraries])
21979 +# Make sure either enable_shared or enable_static is yes.
21980 +test "$enable_shared" = yes || enable_static=yes
21981 +AC_MSG_RESULT([$enable_static])
21982 +
21983 +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
21984 +
21985 +_LT_AC_TAGVAR(GCC, $1)="$G77"
21986 +_LT_AC_TAGVAR(LD, $1)="$LD"
21987 +
21988 +AC_LIBTOOL_PROG_COMPILER_PIC($1)
21989 +AC_LIBTOOL_PROG_CC_C_O($1)
21990 +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
21991 +AC_LIBTOOL_PROG_LD_SHLIBS($1)
21992 +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
21993 +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
21994 +AC_LIBTOOL_SYS_LIB_STRIP
21995 +
21996 +
21997 +AC_LIBTOOL_CONFIG($1)
21998 +
21999 +AC_LANG_POP
22000 +CC="$lt_save_CC"
22001 +])# AC_LIBTOOL_LANG_F77_CONFIG
22002 +
22003 +
22004 +# AC_LIBTOOL_LANG_GCJ_CONFIG
22005 +# --------------------------
22006 +# Ensure that the configuration vars for the C compiler are
22007 +# suitably defined.  Those variables are subsequently used by
22008 +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
22009 +AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
22010 +AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
22011 +[AC_LANG_SAVE
22012 +
22013 +# Source file extension for Java test sources.
22014 +ac_ext=java
22015 +
22016 +# Object file extension for compiled Java test sources.
22017 +objext=o
22018 +_LT_AC_TAGVAR(objext, $1)=$objext
22019 +
22020 +# Code to be used in simple compile tests
22021 +lt_simple_compile_test_code="class foo {}\n"
22022 +
22023 +# Code to be used in simple link tests
22024 +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
22025 +
22026 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
22027 +_LT_AC_SYS_COMPILER
22028 +
22029 +# Allow CC to be a program name with arguments.
22030 +lt_save_CC="$CC"
22031 +CC=${GCJ-"gcj"}
22032 +compiler=$CC
22033 +_LT_AC_TAGVAR(compiler, $1)=$CC
22034 +
22035 +# GCJ did not exist at the time GCC didn't implicitly link libc in.
22036 +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
22037 +
22038 +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
22039 +AC_LIBTOOL_PROG_COMPILER_PIC($1)
22040 +AC_LIBTOOL_PROG_CC_C_O($1)
22041 +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
22042 +AC_LIBTOOL_PROG_LD_SHLIBS($1)
22043 +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
22044 +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
22045 +AC_LIBTOOL_SYS_LIB_STRIP
22046 +AC_LIBTOOL_DLOPEN_SELF($1)
22047 +
22048 +AC_LIBTOOL_CONFIG($1)
22049 +
22050 +AC_LANG_RESTORE
22051 +CC="$lt_save_CC"
22052 +])# AC_LIBTOOL_LANG_GCJ_CONFIG
22053 +
22054 +
22055 +# AC_LIBTOOL_LANG_RC_CONFIG
22056 +# --------------------------
22057 +# Ensure that the configuration vars for the Windows resource compiler are
22058 +# suitably defined.  Those variables are subsequently used by
22059 +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
22060 +AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
22061 +AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
22062 +[AC_LANG_SAVE
22063 +
22064 +# Source file extension for RC test sources.
22065 +ac_ext=rc
22066 +
22067 +# Object file extension for compiled RC test sources.
22068 +objext=o
22069 +_LT_AC_TAGVAR(objext, $1)=$objext
22070 +
22071 +# Code to be used in simple compile tests
22072 +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
22073 +
22074 +# Code to be used in simple link tests
22075 +lt_simple_link_test_code="$lt_simple_compile_test_code"
22076 +
22077 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
22078 +_LT_AC_SYS_COMPILER
22079 +
22080 +# Allow CC to be a program name with arguments.
22081 +lt_save_CC="$CC"
22082 +CC=${RC-"windres"}
22083 +compiler=$CC
22084 +_LT_AC_TAGVAR(compiler, $1)=$CC
22085 +_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
22086 +
22087 +AC_LIBTOOL_CONFIG($1)
22088 +
22089 +AC_LANG_RESTORE
22090 +CC="$lt_save_CC"
22091 +])# AC_LIBTOOL_LANG_RC_CONFIG
22092 +
22093 +
22094 +# AC_LIBTOOL_CONFIG([TAGNAME])
22095 +# ----------------------------
22096 +# If TAGNAME is not passed, then create an initial libtool script
22097 +# with a default configuration from the untagged config vars.  Otherwise
22098 +# add code to config.status for appending the configuration named by
22099 +# TAGNAME from the matching tagged config vars.
22100 +AC_DEFUN([AC_LIBTOOL_CONFIG],
22101 +[# The else clause should only fire when bootstrapping the
22102 +# libtool distribution, otherwise you forgot to ship ltmain.sh
22103 +# with your package, and you will get complaints that there are
22104 +# no rules to generate ltmain.sh.
22105 +if test -f "$ltmain"; then
22106 +  # See if we are running on zsh, and set the options which allow our commands through
22107 +  # without removal of \ escapes.
22108 +  if test -n "${ZSH_VERSION+set}" ; then
22109 +    setopt NO_GLOB_SUBST
22110 +  fi
22111 +  # Now quote all the things that may contain metacharacters while being
22112 +  # careful not to overquote the AC_SUBSTed values.  We take copies of the
22113 +  # variables and quote the copies for generation of the libtool script.
22114 +  for var in echo old_CC old_CFLAGS AR AR_FLAGS AS EGREP RANLIB LN_S LTCC NM \
22115 +    SED SHELL STRIP \
22116 +    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
22117 +    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
22118 +    deplibs_check_method reload_flag reload_cmds need_locks \
22119 +    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
22120 +    lt_cv_sys_global_symbol_to_c_name_address \
22121 +    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
22122 +    old_postinstall_cmds old_postuninstall_cmds \
22123 +    _LT_AC_TAGVAR(compiler, $1) \
22124 +    _LT_AC_TAGVAR(CC, $1) \
22125 +    _LT_AC_TAGVAR(LD, $1) \
22126 +    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
22127 +    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
22128 +    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
22129 +    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
22130 +    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
22131 +    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
22132 +    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
22133 +    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
22134 +    _LT_AC_TAGVAR(old_archive_cmds, $1) \
22135 +    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
22136 +    _LT_AC_TAGVAR(predep_objects, $1) \
22137 +    _LT_AC_TAGVAR(postdep_objects, $1) \
22138 +    _LT_AC_TAGVAR(predeps, $1) \
22139 +    _LT_AC_TAGVAR(postdeps, $1) \
22140 +    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
22141 +    _LT_AC_TAGVAR(archive_cmds, $1) \
22142 +    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
22143 +    _LT_AC_TAGVAR(postinstall_cmds, $1) \
22144 +    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
22145 +    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
22146 +    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
22147 +    _LT_AC_TAGVAR(no_undefined_flag, $1) \
22148 +    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
22149 +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
22150 +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
22151 +    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
22152 +    _LT_AC_TAGVAR(hardcode_automatic, $1) \
22153 +    _LT_AC_TAGVAR(module_cmds, $1) \
22154 +    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
22155 +    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
22156 +    _LT_AC_TAGVAR(exclude_expsyms, $1) \
22157 +    _LT_AC_TAGVAR(include_expsyms, $1); do
22158 +
22159 +    case $var in
22160 +    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
22161 +    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
22162 +    _LT_AC_TAGVAR(archive_cmds, $1) | \
22163 +    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
22164 +    _LT_AC_TAGVAR(module_cmds, $1) | \
22165 +    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
22166 +    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
22167 +    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
22168 +    extract_expsyms_cmds | reload_cmds | finish_cmds | \
22169 +    postinstall_cmds | postuninstall_cmds | \
22170 +    old_postinstall_cmds | old_postuninstall_cmds | \
22171 +    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
22172 +      # Double-quote double-evaled strings.
22173 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
22174 +      ;;
22175 +    *)
22176 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
22177 +      ;;
22178 +    esac
22179 +  done
22180 +
22181 +  case $lt_echo in
22182 +  *'\[$]0 --fallback-echo"')
22183 +    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
22184 +    ;;
22185 +  esac
22186 +
22187 +ifelse([$1], [],
22188 +  [cfgfile="${ofile}T"
22189 +  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
22190 +  $rm -f "$cfgfile"
22191 +  AC_MSG_NOTICE([creating $ofile])],
22192 +  [cfgfile="$ofile"])
22193 +
22194 +  cat <<__EOF__ >> "$cfgfile"
22195 +ifelse([$1], [],
22196 +[#! $SHELL
22197 +
22198 +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
22199 +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
22200 +# NOTE: Changes made to this file will be lost: look at ltmain.sh.
22201 +#
22202 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
22203 +# Free Software Foundation, Inc.
22204 +#
22205 +# This file is part of GNU Libtool:
22206 +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
22207 +#
22208 +# This program is free software; you can redistribute it and/or modify
22209 +# it under the terms of the GNU General Public License as published by
22210 +# the Free Software Foundation; either version 2 of the License, or
22211 +# (at your option) any later version.
22212 +#
22213 +# This program is distributed in the hope that it will be useful, but
22214 +# WITHOUT ANY WARRANTY; without even the implied warranty of
22215 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22216 +# General Public License for more details.
22217 +#
22218 +# You should have received a copy of the GNU General Public License
22219 +# along with this program; if not, write to the Free Software
22220 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22221 +#
22222 +# As a special exception to the GNU General Public License, if you
22223 +# distribute this file as part of a program that contains a
22224 +# configuration script generated by Autoconf, you may include it under
22225 +# the same distribution terms that you use for the rest of that program.
22226 +
22227 +# A sed program that does not truncate output.
22228 +SED=$lt_SED
22229 +
22230 +# Sed that helps us avoid accidentally triggering echo(1) options like -n.
22231 +Xsed="$SED -e s/^X//"
22232 +
22233 +# The HP-UX ksh and POSIX shell print the target directory to stdout
22234 +# if CDPATH is set.
22235 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
22236 +
22237 +# The names of the tagged configurations supported by this script.
22238 +available_tags=
22239 +
22240 +# ### BEGIN LIBTOOL CONFIG],
22241 +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
22242 +
22243 +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22244 +
22245 +# Shell to use when invoking shell scripts.
22246 +SHELL=$lt_SHELL
22247 +
22248 +# Whether or not to build shared libraries.
22249 +build_libtool_libs=$enable_shared
22250 +
22251 +# Whether or not to build static libraries.
22252 +build_old_libs=$enable_static
22253 +
22254 +# Whether or not to add -lc for building shared libraries.
22255 +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
22256 +
22257 +# Whether or not to disallow shared libs when runtime libs are static
22258 +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
22259 +
22260 +# Whether or not to optimize for fast installation.
22261 +fast_install=$enable_fast_install
22262 +
22263 +# The host system.
22264 +host_alias=$host_alias
22265 +host=$host
22266 +host_os=$host_os
22267 +
22268 +# The build system.
22269 +build_alias=$build_alias
22270 +build=$build
22271 +build_os=$build_os
22272 +
22273 +# An echo program that does not interpret backslashes.
22274 +echo=$lt_echo
22275 +
22276 +# The archiver.
22277 +AR=$lt_AR
22278 +AR_FLAGS=$lt_AR_FLAGS
22279 +
22280 +# A C compiler.
22281 +LTCC=$lt_LTCC
22282 +
22283 +# A language-specific compiler.
22284 +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
22285 +
22286 +# Is the compiler the GNU C compiler?
22287 +with_gcc=$_LT_AC_TAGVAR(GCC, $1)
22288 +
22289 +# An ERE matcher.
22290 +EGREP=$lt_EGREP
22291 +
22292 +# The linker used to build libraries.
22293 +LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
22294 +
22295 +# Whether we need hard or soft links.
22296 +LN_S=$lt_LN_S
22297 +
22298 +# A BSD-compatible nm program.
22299 +NM=$lt_NM
22300 +
22301 +# A symbol stripping program
22302 +STRIP=$lt_STRIP
22303 +
22304 +# Used to examine libraries when file_magic_cmd begins "file"
22305 +MAGIC_CMD=$MAGIC_CMD
22306 +
22307 +# Used on cygwin: DLL creation program.
22308 +DLLTOOL="$DLLTOOL"
22309 +
22310 +# Used on cygwin: object dumper.
22311 +OBJDUMP="$OBJDUMP"
22312 +
22313 +# Used on cygwin: assembler.
22314 +AS=$lt_AS
22315 +
22316 +# The name of the directory that contains temporary libtool files.
22317 +objdir=$objdir
22318 +
22319 +# How to create reloadable object files.
22320 +reload_flag=$lt_reload_flag
22321 +reload_cmds=$lt_reload_cmds
22322 +
22323 +# How to pass a linker flag through the compiler.
22324 +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
22325 +
22326 +# Object file suffix (normally "o").
22327 +objext="$ac_objext"
22328 +
22329 +# Old archive suffix (normally "a").
22330 +libext="$libext"
22331 +
22332 +# Shared library suffix (normally ".so").
22333 +shrext_cmds='$shrext_cmds'
22334 +
22335 +# Executable file suffix (normally "").
22336 +exeext="$exeext"
22337 +
22338 +# Additional compiler flags for building library objects.
22339 +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
22340 +pic_mode=$pic_mode
22341 +
22342 +# What is the maximum length of a command?
22343 +max_cmd_len=$lt_cv_sys_max_cmd_len
22344 +
22345 +# Does compiler simultaneously support -c and -o options?
22346 +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
22347 +
22348 +# Must we lock files when doing compilation ?
22349 +need_locks=$lt_need_locks
22350 +
22351 +# Do we need the lib prefix for modules?
22352 +need_lib_prefix=$need_lib_prefix
22353 +
22354 +# Do we need a version for libraries?
22355 +need_version=$need_version
22356 +
22357 +# Whether dlopen is supported.
22358 +dlopen_support=$enable_dlopen
22359 +
22360 +# Whether dlopen of programs is supported.
22361 +dlopen_self=$enable_dlopen_self
22362 +
22363 +# Whether dlopen of statically linked programs is supported.
22364 +dlopen_self_static=$enable_dlopen_self_static
22365 +
22366 +# Compiler flag to prevent dynamic linking.
22367 +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
22368 +
22369 +# Compiler flag to turn off builtin functions.
22370 +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
22371 +
22372 +# Compiler flag to allow reflexive dlopens.
22373 +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
22374 +
22375 +# Compiler flag to generate shared objects directly from archives.
22376 +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
22377 +
22378 +# Compiler flag to generate thread-safe objects.
22379 +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
22380 +
22381 +# Library versioning type.
22382 +version_type=$version_type
22383 +
22384 +# Format of library name prefix.
22385 +libname_spec=$lt_libname_spec
22386 +
22387 +# List of archive names.  First name is the real one, the rest are links.
22388 +# The last name is the one that the linker finds with -lNAME.
22389 +library_names_spec=$lt_library_names_spec
22390 +
22391 +# The coded name of the library, if different from the real name.
22392 +soname_spec=$lt_soname_spec
22393 +
22394 +# Commands used to build and install an old-style archive.
22395 +RANLIB=$lt_RANLIB
22396 +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
22397 +old_postinstall_cmds=$lt_old_postinstall_cmds
22398 +old_postuninstall_cmds=$lt_old_postuninstall_cmds
22399 +
22400 +# Create an old-style archive from a shared archive.
22401 +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
22402 +
22403 +# Create a temporary old-style archive to link instead of a shared archive.
22404 +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
22405 +
22406 +# Commands used to build and install a shared archive.
22407 +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
22408 +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
22409 +postinstall_cmds=$lt_postinstall_cmds
22410 +postuninstall_cmds=$lt_postuninstall_cmds
22411 +
22412 +# Commands used to build a loadable module (assumed same as above if empty)
22413 +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
22414 +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
22415 +
22416 +# Commands to strip libraries.
22417 +old_striplib=$lt_old_striplib
22418 +striplib=$lt_striplib
22419 +
22420 +# Dependencies to place before the objects being linked to create a
22421 +# shared library.
22422 +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
22423 +
22424 +# Dependencies to place after the objects being linked to create a
22425 +# shared library.
22426 +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
22427 +
22428 +# Dependencies to place before the objects being linked to create a
22429 +# shared library.
22430 +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
22431 +
22432 +# Dependencies to place after the objects being linked to create a
22433 +# shared library.
22434 +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
22435 +
22436 +# The library search path used internally by the compiler when linking
22437 +# a shared library.
22438 +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
22439 +
22440 +# Method to check whether dependent libraries are shared objects.
22441 +deplibs_check_method=$lt_deplibs_check_method
22442 +
22443 +# Command to use when deplibs_check_method == file_magic.
22444 +file_magic_cmd=$lt_file_magic_cmd
22445 +
22446 +# Flag that allows shared libraries with undefined symbols to be built.
22447 +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
22448 +
22449 +# Flag that forces no undefined symbols.
22450 +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
22451 +
22452 +# Commands used to finish a libtool library installation in a directory.
22453 +finish_cmds=$lt_finish_cmds
22454 +
22455 +# Same as above, but a single script fragment to be evaled but not shown.
22456 +finish_eval=$lt_finish_eval
22457 +
22458 +# Take the output of nm and produce a listing of raw symbols and C names.
22459 +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
22460 +
22461 +# Transform the output of nm in a proper C declaration
22462 +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
22463 +
22464 +# Transform the output of nm in a C name address pair
22465 +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
22466 +
22467 +# This is the shared library runtime path variable.
22468 +runpath_var=$runpath_var
22469 +
22470 +# This is the shared library path variable.
22471 +shlibpath_var=$shlibpath_var
22472 +
22473 +# Is shlibpath searched before the hard-coded library search path?
22474 +shlibpath_overrides_runpath=$shlibpath_overrides_runpath
22475 +
22476 +# How to hardcode a shared library path into an executable.
22477 +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
22478 +
22479 +# Whether we should hardcode library paths into libraries.
22480 +hardcode_into_libs=$hardcode_into_libs
22481 +
22482 +# Flag to hardcode \$libdir into a binary during linking.
22483 +# This must work even if \$libdir does not exist.
22484 +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
22485 +
22486 +# If ld is used when linking, flag to hardcode \$libdir into
22487 +# a binary during linking. This must work even if \$libdir does
22488 +# not exist.
22489 +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
22490 +
22491 +# Whether we need a single -rpath flag with a separated argument.
22492 +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
22493 +
22494 +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
22495 +# resulting binary.
22496 +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
22497 +
22498 +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
22499 +# resulting binary.
22500 +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
22501 +
22502 +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
22503 +# the resulting binary.
22504 +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
22505 +
22506 +# Set to yes if building a shared library automatically hardcodes DIR into the library
22507 +# and all subsequent libraries and executables linked against it.
22508 +hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
22509 +
22510 +# Variables whose values should be saved in libtool wrapper scripts and
22511 +# restored at relink time.
22512 +variables_saved_for_relink="$variables_saved_for_relink"
22513 +
22514 +# Whether libtool must link a program against all its dependency libraries.
22515 +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
22516 +
22517 +# Compile-time system search path for libraries
22518 +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
22519 +
22520 +# Run-time system search path for libraries
22521 +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
22522 +
22523 +# Fix the shell variable \$srcfile for the compiler.
22524 +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
22525 +
22526 +# Set to yes if exported symbols are required.
22527 +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
22528 +
22529 +# The commands to list exported symbols.
22530 +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
22531 +
22532 +# The commands to extract the exported symbol list from a shared archive.
22533 +extract_expsyms_cmds=$lt_extract_expsyms_cmds
22534 +
22535 +# Symbols that should not be listed in the preloaded symbols.
22536 +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
22537 +
22538 +# Symbols that must always be exported.
22539 +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
22540 +
22541 +ifelse([$1],[],
22542 +[# ### END LIBTOOL CONFIG],
22543 +[# ### END LIBTOOL TAG CONFIG: $tagname])
22544 +
22545 +__EOF__
22546 +
22547 +ifelse([$1],[], [
22548 +  case $host_os in
22549 +  aix3*)
22550 +    cat <<\EOF >> "$cfgfile"
22551 +
22552 +# AIX sometimes has problems with the GCC collect2 program.  For some
22553 +# reason, if we set the COLLECT_NAMES environment variable, the problems
22554 +# vanish in a puff of smoke.
22555 +if test "X${COLLECT_NAMES+set}" != Xset; then
22556 +  COLLECT_NAMES=
22557 +  export COLLECT_NAMES
22558 +fi
22559 +EOF
22560 +    ;;
22561 +  esac
22562 +
22563 +  # We use sed instead of cat because bash on DJGPP gets confused if
22564 +  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
22565 +  # text mode, it properly converts lines to CR/LF.  This bash problem
22566 +  # is reportedly fixed, but why not run on old versions too?
22567 +  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
22568 +
22569 +  mv -f "$cfgfile" "$ofile" || \
22570 +    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
22571 +  chmod +x "$ofile"
22572 +])
22573 +else
22574 +  # If there is no Makefile yet, we rely on a make rule to execute
22575 +  # `config.status --recheck' to rerun these tests and create the
22576 +  # libtool script then.
22577 +  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
22578 +  if test -f "$ltmain_in"; then
22579 +    test -f Makefile && make "$ltmain"
22580 +  fi
22581 +fi
22582 +])# AC_LIBTOOL_CONFIG
22583 +
22584 +
22585 +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
22586 +# -------------------------------------------
22587 +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
22588 +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
22589 +
22590 +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
22591 +
22592 +if test "$GCC" = yes; then
22593 +  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
22594 +
22595 +  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
22596 +    lt_cv_prog_compiler_rtti_exceptions,
22597 +    [-fno-rtti -fno-exceptions], [],
22598 +    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
22599 +fi
22600 +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
22601 +
22602 +
22603 +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
22604 +# ---------------------------------
22605 +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
22606 +[AC_REQUIRE([AC_CANONICAL_HOST])
22607 +AC_REQUIRE([AC_PROG_NM])
22608 +AC_REQUIRE([AC_OBJEXT])
22609 +# Check for command to grab the raw symbol name followed by C symbol from nm.
22610 +AC_MSG_CHECKING([command to parse $NM output from $compiler object])
22611 +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
22612 +[
22613 +# These are sane defaults that work on at least a few old systems.
22614 +# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
22615 +
22616 +# Character class describing NM global symbol codes.
22617 +symcode='[[BCDEGRST]]'
22618 +
22619 +# Regexp to match symbols that can be accessed directly from C.
22620 +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
22621 +
22622 +# Transform an extracted symbol line into a proper C declaration
22623 +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
22624 +
22625 +# Transform an extracted symbol line into symbol name and symbol address
22626 +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
22627 +
22628 +# Define system-specific variables.
22629 +case $host_os in
22630 +aix*)
22631 +  symcode='[[BCDT]]'
22632 +  ;;
22633 +cygwin* | mingw* | pw32*)
22634 +  symcode='[[ABCDGISTW]]'
22635 +  ;;
22636 +hpux*) # Its linker distinguishes data from code symbols
22637 +  if test "$host_cpu" = ia64; then
22638 +    symcode='[[ABCDEGRST]]'
22639 +  fi
22640 +  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
22641 +  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
22642 +  ;;
22643 +linux*)
22644 +  if test "$host_cpu" = ia64; then
22645 +    symcode='[[ABCDGIRSTW]]'
22646 +    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
22647 +    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
22648 +  fi
22649 +  ;;
22650 +irix* | nonstopux*)
22651 +  symcode='[[BCDEGRST]]'
22652 +  ;;
22653 +osf*)
22654 +  symcode='[[BCDEGQRST]]'
22655 +  ;;
22656 +solaris* | sysv5*)
22657 +  symcode='[[BDRT]]'
22658 +  ;;
22659 +sysv4)
22660 +  symcode='[[DFNSTU]]'
22661 +  ;;
22662 +esac
22663 +
22664 +# Handle CRLF in mingw tool chain
22665 +opt_cr=
22666 +case $build_os in
22667 +mingw*)
22668 +  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
22669 +  ;;
22670 +esac
22671 +
22672 +# If we're using GNU nm, then use its standard symbol codes.
22673 +case `$NM -V 2>&1` in
22674 +*GNU* | *'with BFD'*)
22675 +  symcode='[[ABCDGIRSTW]]' ;;
22676 +esac
22677 +
22678 +# Try without a prefix undercore, then with it.
22679 +for ac_symprfx in "" "_"; do
22680 +
22681 +  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
22682 +  symxfrm="\\1 $ac_symprfx\\2 \\2"
22683 +
22684 +  # Write the raw and C identifiers.
22685 +  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
22686 +
22687 +  # Check to see that the pipe works correctly.
22688 +  pipe_works=no
22689 +
22690 +  rm -f conftest*
22691 +  cat > conftest.$ac_ext <<EOF
22692 +#ifdef __cplusplus
22693 +extern "C" {
22694 +#endif
22695 +char nm_test_var;
22696 +void nm_test_func(){}
22697 +#ifdef __cplusplus
22698 +}
22699 +#endif
22700 +int main(){nm_test_var='a';nm_test_func();return(0);}
22701 +EOF
22702 +
22703 +  if AC_TRY_EVAL(ac_compile); then
22704 +    # Now try to grab the symbols.
22705 +    nlist=conftest.nm
22706 +    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
22707 +      # Try sorting and uniquifying the output.
22708 +      if sort "$nlist" | uniq > "$nlist"T; then
22709 +       mv -f "$nlist"T "$nlist"
22710 +      else
22711 +       rm -f "$nlist"T
22712 +      fi
22713 +
22714 +      # Make sure that we snagged all the symbols we need.
22715 +      if grep ' nm_test_var$' "$nlist" >/dev/null; then
22716 +       if grep ' nm_test_func$' "$nlist" >/dev/null; then
22717 +         cat <<EOF > conftest.$ac_ext
22718 +#ifdef __cplusplus
22719 +extern "C" {
22720 +#endif
22721 +
22722 +EOF
22723 +         # Now generate the symbol file.
22724 +         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
22725 +
22726 +         cat <<EOF >> conftest.$ac_ext
22727 +#if defined (__STDC__) && __STDC__
22728 +# define lt_ptr_t void *
22729 +#else
22730 +# define lt_ptr_t char *
22731 +# define const
22732 +#endif
22733 +
22734 +/* The mapping between symbol names and symbols. */
22735 +const struct {
22736 +  const char *name;
22737 +  lt_ptr_t address;
22738 +}
22739 +lt_preloaded_symbols[[]] =
22740 +{
22741 +EOF
22742 +         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
22743 +         cat <<\EOF >> conftest.$ac_ext
22744 +  {0, (lt_ptr_t) 0}
22745 +};
22746 +
22747 +#ifdef __cplusplus
22748 +}
22749 +#endif
22750 +EOF
22751 +         # Now try linking the two files.
22752 +         mv conftest.$ac_objext conftstm.$ac_objext
22753 +         lt_save_LIBS="$LIBS"
22754 +         lt_save_CFLAGS="$CFLAGS"
22755 +         LIBS="conftstm.$ac_objext"
22756 +         CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
22757 +         if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
22758 +           pipe_works=yes
22759 +         fi
22760 +         LIBS="$lt_save_LIBS"
22761 +         CFLAGS="$lt_save_CFLAGS"
22762 +       else
22763 +         echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
22764 +       fi
22765 +      else
22766 +       echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
22767 +      fi
22768 +    else
22769 +      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
22770 +    fi
22771 +  else
22772 +    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
22773 +    cat conftest.$ac_ext >&5
22774 +  fi
22775 +  rm -f conftest* conftst*
22776 +
22777 +  # Do not use the global_symbol_pipe unless it works.
22778 +  if test "$pipe_works" = yes; then
22779 +    break
22780 +  else
22781 +    lt_cv_sys_global_symbol_pipe=
22782 +  fi
22783 +done
22784 +])
22785 +if test -z "$lt_cv_sys_global_symbol_pipe"; then
22786 +  lt_cv_sys_global_symbol_to_cdecl=
22787 +fi
22788 +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
22789 +  AC_MSG_RESULT(failed)
22790 +else
22791 +  AC_MSG_RESULT(ok)
22792 +fi
22793 +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
22794 +
22795 +
22796 +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
22797 +# ---------------------------------------
22798 +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
22799 +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
22800 +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
22801 +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
22802 +
22803 +AC_MSG_CHECKING([for $compiler option to produce PIC])
22804 + ifelse([$1],[CXX],[
22805 +  # C++ specific cases for pic, static, wl, etc.
22806 +  if test "$GXX" = yes; then
22807 +    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
22808 +    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
22809 +
22810 +    case $host_os in
22811 +    aix*)
22812 +      # All AIX code is PIC.
22813 +      if test "$host_cpu" = ia64; then
22814 +       # AIX 5 now supports IA64 processor
22815 +       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
22816 +      fi
22817 +      ;;
22818 +    amigaos*)
22819 +      # FIXME: we need at least 68020 code to build shared libraries, but
22820 +      # adding the `-m68020' flag to GCC prevents building anything better,
22821 +      # like `-m68040'.
22822 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
22823 +      ;;
22824 +    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
22825 +      # PIC is the default for these OSes.
22826 +      ;;
22827 +    mingw* | os2* | pw32*)
22828 +      # This hack is so that the source file can tell whether it is being
22829 +      # built for inclusion in a dll (and should export symbols for example).
22830 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
22831 +      ;;
22832 +    darwin* | rhapsody*)
22833 +      # PIC is the default on this platform
22834 +      # Common symbols not allowed in MH_DYLIB files
22835 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
22836 +      ;;
22837 +    *djgpp*)
22838 +      # DJGPP does not support shared libraries at all
22839 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
22840 +      ;;
22841 +    sysv4*MP*)
22842 +      if test -d /usr/nec; then
22843 +       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
22844 +      fi
22845 +      ;;
22846 +    hpux*)
22847 +      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
22848 +      # not for PA HP-UX.
22849 +      case "$host_cpu" in
22850 +      hppa*64*|ia64*)
22851 +       ;;
22852 +      *)
22853 +       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
22854 +       ;;
22855 +      esac
22856 +      ;;
22857 +    *)
22858 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
22859 +      ;;
22860 +    esac
22861 +  else
22862 +    case $host_os in
22863 +      aix4* | aix5*)
22864 +       # All AIX code is PIC.
22865 +       if test "$host_cpu" = ia64; then
22866 +         # AIX 5 now supports IA64 processor
22867 +         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
22868 +       else
22869 +         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
22870 +       fi
22871 +       ;;
22872 +      chorus*)
22873 +       case $cc_basename in
22874 +       cxch68)
22875 +         # Green Hills C++ Compiler
22876 +         # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
22877 +         ;;
22878 +       esac
22879 +       ;;
22880 +       darwin*)
22881 +         # PIC is the default on this platform
22882 +         # Common symbols not allowed in MH_DYLIB files
22883 +         case "$cc_basename" in
22884 +           xlc*)
22885 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
22886 +           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
22887 +           ;;
22888 +         esac
22889 +       ;;
22890 +      dgux*)
22891 +       case $cc_basename in
22892 +         ec++)
22893 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
22894 +           ;;
22895 +         ghcx)
22896 +           # Green Hills C++ Compiler
22897 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
22898 +           ;;
22899 +         *)
22900 +           ;;
22901 +       esac
22902 +       ;;
22903 +      freebsd* | kfreebsd*-gnu | dragonfly*)
22904 +       # FreeBSD uses GNU C++
22905 +       ;;
22906 +      hpux9* | hpux10* | hpux11*)
22907 +       case $cc_basename in
22908 +         CC)
22909 +           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
22910 +           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
22911 +           if test "$host_cpu" != ia64; then
22912 +             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
22913 +           fi
22914 +           ;;
22915 +         aCC)
22916 +           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
22917 +           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
22918 +           case "$host_cpu" in
22919 +           hppa*64*|ia64*)
22920 +             # +Z the default
22921 +             ;;
22922 +           *)
22923 +             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
22924 +             ;;
22925 +           esac
22926 +           ;;
22927 +         *)
22928 +           ;;
22929 +       esac
22930 +       ;;
22931 +      irix5* | irix6* | nonstopux*)
22932 +       case $cc_basename in
22933 +         CC)
22934 +           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
22935 +           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
22936 +           # CC pic flag -KPIC is the default.
22937 +           ;;
22938 +         *)
22939 +           ;;
22940 +       esac
22941 +       ;;
22942 +      linux*)
22943 +       case $cc_basename in
22944 +         KCC)
22945 +           # KAI C++ Compiler
22946 +           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
22947 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
22948 +           ;;
22949 +         icpc* | ecpc*)
22950 +           # Intel C++
22951 +           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
22952 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
22953 +           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
22954 +           ;;
22955 +         pgCC)
22956 +           # Portland Group C++ compiler.
22957 +           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
22958 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
22959 +           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
22960 +           ;;
22961 +         cxx)
22962 +           # Compaq C++
22963 +           # Make sure the PIC flag is empty.  It appears that all Alpha
22964 +           # Linux and Compaq Tru64 Unix objects are PIC.
22965 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
22966 +           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
22967 +           ;;
22968 +         *)
22969 +           ;;
22970 +       esac
22971 +       ;;
22972 +      lynxos*)
22973 +       ;;
22974 +      m88k*)
22975 +       ;;
22976 +      mvs*)
22977 +       case $cc_basename in
22978 +         cxx)
22979 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
22980 +           ;;
22981 +         *)
22982 +           ;;
22983 +       esac
22984 +       ;;
22985 +      netbsd*)
22986 +       ;;
22987 +      osf3* | osf4* | osf5*)
22988 +       case $cc_basename in
22989 +         KCC)
22990 +           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
22991 +           ;;
22992 +         RCC)
22993 +           # Rational C++ 2.4.1
22994 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
22995 +           ;;
22996 +         cxx)
22997 +           # Digital/Compaq C++
22998 +           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
22999 +           # Make sure the PIC flag is empty.  It appears that all Alpha
23000 +           # Linux and Compaq Tru64 Unix objects are PIC.
23001 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
23002 +           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
23003 +           ;;
23004 +         *)
23005 +           ;;
23006 +       esac
23007 +       ;;
23008 +      psos*)
23009 +       ;;
23010 +      sco*)
23011 +       case $cc_basename in
23012 +         CC)
23013 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
23014 +           ;;
23015 +         *)
23016 +           ;;
23017 +       esac
23018 +       ;;
23019 +      solaris*)
23020 +       case $cc_basename in
23021 +         CC)
23022 +           # Sun C++ 4.2, 5.x and Centerline C++
23023 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
23024 +           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
23025 +           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
23026 +           ;;
23027 +         gcx)
23028 +           # Green Hills C++ Compiler
23029 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
23030 +           ;;
23031 +         *)
23032 +           ;;
23033 +       esac
23034 +       ;;
23035 +      sunos4*)
23036 +       case $cc_basename in
23037 +         CC)
23038 +           # Sun C++ 4.x
23039 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
23040 +           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
23041 +           ;;
23042 +         lcc)
23043 +           # Lucid
23044 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
23045 +           ;;
23046 +         *)
23047 +           ;;
23048 +       esac
23049 +       ;;
23050 +      tandem*)
23051 +       case $cc_basename in
23052 +         NCC)
23053 +           # NonStop-UX NCC 3.20
23054 +           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
23055 +           ;;
23056 +         *)
23057 +           ;;
23058 +       esac
23059 +       ;;
23060 +      unixware*)
23061 +       ;;
23062 +      vxworks*)
23063 +       ;;
23064 +      *)
23065 +       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
23066 +       ;;
23067 +    esac
23068 +  fi
23069 +],
23070 +[
23071 +  if test "$GCC" = yes; then
23072 +    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
23073 +    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
23074 +
23075 +    case $host_os in
23076 +      aix*)
23077 +      # All AIX code is PIC.
23078 +      if test "$host_cpu" = ia64; then
23079 +       # AIX 5 now supports IA64 processor
23080 +       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
23081 +      fi
23082 +      ;;
23083 +
23084 +    amigaos*)
23085 +      # FIXME: we need at least 68020 code to build shared libraries, but
23086 +      # adding the `-m68020' flag to GCC prevents building anything better,
23087 +      # like `-m68040'.
23088 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
23089 +      ;;
23090 +
23091 +    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
23092 +      # PIC is the default for these OSes.
23093 +      ;;
23094 +
23095 +    mingw* | pw32* | os2*)
23096 +      # This hack is so that the source file can tell whether it is being
23097 +      # built for inclusion in a dll (and should export symbols for example).
23098 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
23099 +      ;;
23100 +
23101 +    darwin* | rhapsody*)
23102 +      # PIC is the default on this platform
23103 +      # Common symbols not allowed in MH_DYLIB files
23104 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
23105 +      ;;
23106 +
23107 +    msdosdjgpp*)
23108 +      # Just because we use GCC doesn't mean we suddenly get shared libraries
23109 +      # on systems that don't support them.
23110 +      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
23111 +      enable_shared=no
23112 +      ;;
23113 +
23114 +    sysv4*MP*)
23115 +      if test -d /usr/nec; then
23116 +       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
23117 +      fi
23118 +      ;;
23119 +
23120 +    hpux*)
23121 +      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
23122 +      # not for PA HP-UX.
23123 +      case "$host_cpu" in
23124 +      hppa*64*|ia64*)
23125 +       # +Z the default
23126 +       ;;
23127 +      *)
23128 +       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
23129 +       ;;
23130 +      esac
23131 +      ;;
23132 +
23133 +    *)
23134 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
23135 +      ;;
23136 +    esac
23137 +  else
23138 +    # PORTME Check for flag to pass linker flags through the system compiler.
23139 +    case $host_os in
23140 +    aix*)
23141 +      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
23142 +      if test "$host_cpu" = ia64; then
23143 +       # AIX 5 now supports IA64 processor
23144 +       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
23145 +      else
23146 +       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
23147 +      fi
23148 +      ;;
23149 +      darwin*)
23150 +        # PIC is the default on this platform
23151 +        # Common symbols not allowed in MH_DYLIB files
23152 +       case "$cc_basename" in
23153 +         xlc*)
23154 +         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
23155 +         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
23156 +         ;;
23157 +       esac
23158 +       ;;
23159 +
23160 +    mingw* | pw32* | os2*)
23161 +      # This hack is so that the source file can tell whether it is being
23162 +      # built for inclusion in a dll (and should export symbols for example).
23163 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
23164 +      ;;
23165 +
23166 +    hpux9* | hpux10* | hpux11*)
23167 +      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
23168 +      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
23169 +      # not for PA HP-UX.
23170 +      case "$host_cpu" in
23171 +      hppa*64*|ia64*)
23172 +       # +Z the default
23173 +       ;;
23174 +      *)
23175 +       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
23176 +       ;;
23177 +      esac
23178 +      # Is there a better lt_prog_compiler_static that works with the bundled CC?
23179 +      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
23180 +      ;;
23181 +
23182 +    irix5* | irix6* | nonstopux*)
23183 +      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
23184 +      # PIC (with -KPIC) is the default.
23185 +      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
23186 +      ;;
23187 +
23188 +    newsos6)
23189 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
23190 +      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
23191 +      ;;
23192 +
23193 +    linux*)
23194 +      case $cc_basename in
23195 +      icc* | ecc*)
23196 +       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
23197 +       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
23198 +       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
23199 +        ;;
23200 +      pgcc | pgf77 | pgf90)
23201 +        # Portland Group compilers (*not* the Pentium gcc compiler,
23202 +       # which looks to be a dead project)
23203 +       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
23204 +       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
23205 +       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
23206 +        ;;
23207 +      ccc*)
23208 +        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
23209 +        # All Alpha code is PIC.
23210 +        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
23211 +        ;;
23212 +      esac
23213 +      ;;
23214 +
23215 +    osf3* | osf4* | osf5*)
23216 +      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
23217 +      # All OSF/1 code is PIC.
23218 +      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
23219 +      ;;
23220 +
23221 +    sco3.2v5*)
23222 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
23223 +      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
23224 +      ;;
23225 +
23226 +    solaris*)
23227 +      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
23228 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
23229 +      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
23230 +      ;;
23231 +
23232 +    sunos4*)
23233 +      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
23234 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
23235 +      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
23236 +      ;;
23237 +
23238 +    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
23239 +      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
23240 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
23241 +      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
23242 +      ;;
23243 +
23244 +    sysv4*MP*)
23245 +      if test -d /usr/nec ;then
23246 +       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
23247 +       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
23248 +      fi
23249 +      ;;
23250 +
23251 +    unicos*)
23252 +      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
23253 +      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
23254 +      ;;
23255 +
23256 +    uts4*)
23257 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
23258 +      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
23259 +      ;;
23260 +
23261 +    *)
23262 +      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
23263 +      ;;
23264 +    esac
23265 +  fi
23266 +])
23267 +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
23268 +
23269 +#
23270 +# Check to make sure the PIC flag actually works.
23271 +#
23272 +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
23273 +  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
23274 +    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
23275 +    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
23276 +    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
23277 +     "" | " "*) ;;
23278 +     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
23279 +     esac],
23280 +    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
23281 +     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
23282 +fi
23283 +case "$host_os" in
23284 +  # For platforms which do not support PIC, -DPIC is meaningless:
23285 +  *djgpp*)
23286 +    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
23287 +    ;;
23288 +  *)
23289 +    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
23290 +    ;;
23291 +esac
23292 +])
23293 +
23294 +
23295 +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
23296 +# ------------------------------------
23297 +# See if the linker supports building shared libraries.
23298 +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
23299 +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
23300 +ifelse([$1],[CXX],[
23301 +  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
23302 +  case $host_os in
23303 +  aix4* | aix5*)
23304 +    # If we're using GNU nm, then we don't want the "-C" option.
23305 +    # -C means demangle to AIX nm, but means don't demangle with GNU nm
23306 +    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
23307 +      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
23308 +    else
23309 +      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
23310 +    fi
23311 +    ;;
23312 +  pw32*)
23313 +    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
23314 +  ;;
23315 +  cygwin* | mingw*)
23316 +    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
23317 +  ;;
23318 +  *)
23319 +    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
23320 +  ;;
23321 +  esac
23322 +],[
23323 +  runpath_var=
23324 +  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
23325 +  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
23326 +  _LT_AC_TAGVAR(archive_cmds, $1)=
23327 +  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
23328 +  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
23329 +  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
23330 +  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
23331 +  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
23332 +  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
23333 +  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
23334 +  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
23335 +  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
23336 +  _LT_AC_TAGVAR(hardcode_direct, $1)=no
23337 +  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
23338 +  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
23339 +  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
23340 +  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
23341 +  _LT_AC_TAGVAR(module_cmds, $1)=
23342 +  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
23343 +  _LT_AC_TAGVAR(always_export_symbols, $1)=no
23344 +  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
23345 +  # include_expsyms should be a list of space-separated symbols to be *always*
23346 +  # included in the symbol list
23347 +  _LT_AC_TAGVAR(include_expsyms, $1)=
23348 +  # exclude_expsyms can be an extended regexp of symbols to exclude
23349 +  # it will be wrapped by ` (' and `)$', so one must not match beginning or
23350 +  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
23351 +  # as well as any symbol that contains `d'.
23352 +  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
23353 +  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
23354 +  # platforms (ab)use it in PIC code, but their linkers get confused if
23355 +  # the symbol is explicitly referenced.  Since portable code cannot
23356 +  # rely on this symbol name, it's probably fine to never include it in
23357 +  # preloaded symbol tables.
23358 +  extract_expsyms_cmds=
23359 +
23360 +  case $host_os in
23361 +  cygwin* | mingw* | pw32*)
23362 +    # FIXME: the MSVC++ port hasn't been tested in a loooong time
23363 +    # When not using gcc, we currently assume that we are using
23364 +    # Microsoft Visual C++.
23365 +    if test "$GCC" != yes; then
23366 +      with_gnu_ld=no
23367 +    fi
23368 +    ;;
23369 +  openbsd*)
23370 +    with_gnu_ld=no
23371 +    ;;
23372 +  esac
23373 +
23374 +  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
23375 +  if test "$with_gnu_ld" = yes; then
23376 +    # If archive_cmds runs LD, not CC, wlarc should be empty
23377 +    wlarc='${wl}'
23378 +
23379 +    # See if GNU ld supports shared libraries.
23380 +    case $host_os in
23381 +    aix3* | aix4* | aix5*)
23382 +      # On AIX/PPC, the GNU linker is very broken
23383 +      if test "$host_cpu" != ia64; then
23384 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
23385 +       cat <<EOF 1>&2
23386 +
23387 +*** Warning: the GNU linker, at least up to release 2.9.1, is reported
23388 +*** to be unable to reliably create shared libraries on AIX.
23389 +*** Therefore, libtool is disabling shared libraries support.  If you
23390 +*** really care for shared libraries, you may want to modify your PATH
23391 +*** so that a non-GNU linker is found, and then restart.
23392 +
23393 +EOF
23394 +      fi
23395 +      ;;
23396 +
23397 +    amigaos*)
23398 +      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
23399 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
23400 +      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
23401 +
23402 +      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
23403 +      # that the semantics of dynamic libraries on AmigaOS, at least up
23404 +      # to version 4, is to share data among multiple programs linked
23405 +      # with the same dynamic library.  Since this doesn't match the
23406 +      # behavior of shared libraries on other platforms, we can't use
23407 +      # them.
23408 +      _LT_AC_TAGVAR(ld_shlibs, $1)=no
23409 +      ;;
23410 +
23411 +    beos*)
23412 +      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
23413 +       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
23414 +       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
23415 +       # support --undefined.  This deserves some investigation.  FIXME
23416 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
23417 +      else
23418 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
23419 +      fi
23420 +      ;;
23421 +
23422 +    cygwin* | mingw* | pw32*)
23423 +      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
23424 +      # as there is no search path for DLLs.
23425 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
23426 +      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
23427 +      _LT_AC_TAGVAR(always_export_symbols, $1)=no
23428 +      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
23429 +      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
23430 +
23431 +      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
23432 +        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
23433 +       # If the export-symbols file already is a .def file (1st line
23434 +       # is EXPORTS), use it as is; otherwise, prepend...
23435 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
23436 +         cp $export_symbols $output_objdir/$soname.def;
23437 +       else
23438 +         echo EXPORTS > $output_objdir/$soname.def;
23439 +         cat $export_symbols >> $output_objdir/$soname.def;
23440 +       fi~
23441 +       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
23442 +      else
23443 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
23444 +      fi
23445 +      ;;
23446 +
23447 +    netbsd*)
23448 +      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
23449 +       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
23450 +       wlarc=
23451 +      else
23452 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
23453 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
23454 +      fi
23455 +      ;;
23456 +
23457 +    solaris* | sysv5*)
23458 +      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
23459 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
23460 +       cat <<EOF 1>&2
23461 +
23462 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably
23463 +*** create shared libraries on Solaris systems.  Therefore, libtool
23464 +*** is disabling shared libraries support.  We urge you to upgrade GNU
23465 +*** binutils to release 2.9.1 or newer.  Another option is to modify
23466 +*** your PATH or compiler configuration so that the native linker is
23467 +*** used, and then restart.
23468 +
23469 +EOF
23470 +      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
23471 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
23472 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
23473 +      else
23474 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
23475 +      fi
23476 +      ;;
23477 +
23478 +    sunos4*)
23479 +      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
23480 +      wlarc=
23481 +      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
23482 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
23483 +      ;;
23484 +
23485 +  linux*)
23486 +    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
23487 +      tmp_addflag=
23488 +      case $CC,$host_cpu in
23489 +      pgf77* | pgf90* )                        # Portland Group f77 and f90 compilers
23490 +        tmp_addflag=' -fpic' ;;
23491 +      ecc*,ia64* | icc*,ia64*)         # Intel C compiler on ia64
23492 +        tmp_addflag=' -i_dynamic' ;;
23493 +      efc*,ia64* | ifort*,ia64*)       # Intel Fortran compiler on ia64
23494 +        tmp_addflag=' -i_dynamic -nofor_main' ;;
23495 +      ifc* | ifort*)                   # Intel Fortran compiler
23496 +       tmp_addflag=' -nofor_main' ;;
23497 +      esac
23498 +      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
23499 +      supports_anon_versioning=no
23500 +      case `$LD -v 2>/dev/null` in
23501 +        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
23502 +        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
23503 +        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
23504 +        *\ 2.11.*) ;; # other 2.11 versions
23505 +        *) supports_anon_versioning=yes ;;
23506 +      esac
23507 +      if test $supports_anon_versioning = yes; then
23508 +        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
23509 +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
23510 +$echo "local: *; };" >> $output_objdir/$libname.ver~
23511 +        $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
23512 +      else
23513 +        _LT_AC_TAGVAR(archive_expsym_cmds, $1)=$_LT_AC_TAGVAR(archive_cmds, $1)
23514 +      fi
23515 +    else
23516 +      _LT_AC_TAGVAR(ld_shlibs, $1)=no
23517 +    fi
23518 +    ;;
23519 +
23520 +    *)
23521 +      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
23522 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
23523 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
23524 +      else
23525 +       _LT_AC_TAGVAR(ld_shlibs, $1)=no
23526 +      fi
23527 +      ;;
23528 +    esac
23529 +
23530 +    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
23531 +      runpath_var=LD_RUN_PATH
23532 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
23533 +      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
23534 +      # ancient GNU ld didn't support --whole-archive et. al.
23535 +      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
23536 +       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
23537 +      else
23538 +       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
23539 +      fi
23540 +    fi
23541 +  else
23542 +    # PORTME fill in a description of your system's linker (not GNU ld)
23543 +    case $host_os in
23544 +    aix3*)
23545 +      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
23546 +      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
23547 +      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
23548 +      # Note: this linker hardcodes the directories in LIBPATH if there
23549 +      # are no directories specified by -L.
23550 +      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
23551 +      if test "$GCC" = yes && test -z "$link_static_flag"; then
23552 +       # Neither direct hardcoding nor static linking is supported with a
23553 +       # broken collect2.
23554 +       _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
23555 +      fi
23556 +      ;;
23557 +
23558 +    aix4* | aix5*)
23559 +      if test "$host_cpu" = ia64; then
23560 +       # On IA64, the linker does run time linking by default, so we don't
23561 +       # have to do anything special.
23562 +       aix_use_runtimelinking=no
23563 +       exp_sym_flag='-Bexport'
23564 +       no_entry_flag=""
23565 +      else
23566 +       # If we're using GNU nm, then we don't want the "-C" option.
23567 +       # -C means demangle to AIX nm, but means don't demangle with GNU nm
23568 +       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
23569 +         _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
23570 +       else
23571 +         _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
23572 +       fi
23573 +       aix_use_runtimelinking=no
23574 +
23575 +       # Test if we are trying to use run time linking or normal
23576 +       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
23577 +       # need to do runtime linking.
23578 +       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
23579 +         for ld_flag in $LDFLAGS; do
23580 +         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
23581 +           aix_use_runtimelinking=yes
23582 +           break
23583 +         fi
23584 +         done
23585 +       esac
23586 +
23587 +       exp_sym_flag='-bexport'
23588 +       no_entry_flag='-bnoentry'
23589 +      fi
23590 +
23591 +      # When large executables or shared objects are built, AIX ld can
23592 +      # have problems creating the table of contents.  If linking a library
23593 +      # or program results in "error TOC overflow" add -mminimal-toc to
23594 +      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
23595 +      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
23596 +
23597 +      _LT_AC_TAGVAR(archive_cmds, $1)=''
23598 +      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
23599 +      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
23600 +      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
23601 +
23602 +      if test "$GCC" = yes; then
23603 +       case $host_os in aix4.[[012]]|aix4.[[012]].*)
23604 +       # We only want to do this on AIX 4.2 and lower, the check
23605 +       # below for broken collect2 doesn't work under 4.3+
23606 +         collect2name=`${CC} -print-prog-name=collect2`
23607 +         if test -f "$collect2name" && \
23608 +          strings "$collect2name" | grep resolve_lib_name >/dev/null
23609 +         then
23610 +         # We have reworked collect2
23611 +         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
23612 +         else
23613 +         # We have old collect2
23614 +         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
23615 +         # It fails to find uninstalled libraries when the uninstalled
23616 +         # path is not listed in the libpath.  Setting hardcode_minus_L
23617 +         # to unsupported forces relinking
23618 +         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
23619 +         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
23620 +         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
23621 +         fi
23622 +       esac
23623 +       shared_flag='-shared'
23624 +       if test "$aix_use_runtimelinking" = yes; then
23625 +         shared_flag="$shared_flag "'${wl}-G'
23626 +       fi
23627 +      else
23628 +       # not using gcc
23629 +       if test "$host_cpu" = ia64; then
23630 +       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
23631 +       # chokes on -Wl,-G. The following line is correct:
23632 +         shared_flag='-G'
23633 +       else
23634 +       if test "$aix_use_runtimelinking" = yes; then
23635 +           shared_flag='${wl}-G'
23636 +         else
23637 +           shared_flag='${wl}-bM:SRE'
23638 +       fi
23639 +       fi
23640 +      fi
23641 +
23642 +      # It seems that -bexpall does not export symbols beginning with
23643 +      # underscore (_), so it is better to generate a list of symbols to export.
23644 +      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
23645 +      if test "$aix_use_runtimelinking" = yes; then
23646 +       # Warning - without using the other runtime loading flags (-brtl),
23647 +       # -berok will link without error, but may produce a broken library.
23648 +       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
23649 +       # Determine the default libpath from the value encoded in an empty executable.
23650 +       _LT_AC_SYS_LIBPATH_AIX
23651 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
23652 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
23653 +       else
23654 +       if test "$host_cpu" = ia64; then
23655 +         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
23656 +         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
23657 +         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
23658 +       else
23659 +        # Determine the default libpath from the value encoded in an empty executable.
23660 +        _LT_AC_SYS_LIBPATH_AIX
23661 +        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
23662 +         # Warning - without using the other run time loading flags,
23663 +         # -berok will link without error, but may produce a broken library.
23664 +         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
23665 +         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
23666 +         # -bexpall does not export symbols beginning with underscore (_)
23667 +         _LT_AC_TAGVAR(always_export_symbols, $1)=yes
23668 +         # Exported symbols can be pulled into shared objects from archives
23669 +         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
23670 +         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
23671 +         # This is similar to how AIX traditionally builds it's shared libraries.
23672 +         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
23673 +       fi
23674 +      fi
23675 +      ;;
23676 +
23677 +    amigaos*)
23678 +      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
23679 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
23680 +      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
23681 +      # see comment about different semantics on the GNU ld section
23682 +      _LT_AC_TAGVAR(ld_shlibs, $1)=no
23683 +      ;;
23684 +
23685 +    bsdi[[45]]*)
23686 +      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
23687 +      ;;
23688 +
23689 +    cygwin* | mingw* | pw32*)
23690 +      # When not using gcc, we currently assume that we are using
23691 +      # Microsoft Visual C++.
23692 +      # hardcode_libdir_flag_spec is actually meaningless, as there is
23693 +      # no search path for DLLs.
23694 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
23695 +      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
23696 +      # Tell ltmain to make .lib files, not .a files.
23697 +      libext=lib
23698 +      # Tell ltmain to make .dll files, not .so files.
23699 +      shrext_cmds=".dll"
23700 +      # FIXME: Setting linknames here is a bad hack.
23701 +      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
23702 +      # The linker will automatically build a .lib file if we build a DLL.
23703 +      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
23704 +      # FIXME: Should let the user specify the lib program.
23705 +      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
23706 +      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
23707 +      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
23708 +      ;;
23709 +
23710 +    darwin* | rhapsody*)
23711 +      case "$host_os" in
23712 +        rhapsody* | darwin1.[[012]])
23713 +         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
23714 +         ;;
23715 +       *) # Darwin 1.3 on
23716 +         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
23717 +           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
23718 +         else
23719 +           case ${MACOSX_DEPLOYMENT_TARGET} in
23720 +             10.[[012]])
23721 +               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
23722 +               ;;
23723 +             10.*)
23724 +               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
23725 +               ;;
23726 +           esac
23727 +         fi
23728 +         ;;
23729 +      esac
23730 +      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
23731 +      _LT_AC_TAGVAR(hardcode_direct, $1)=no
23732 +      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
23733 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
23734 +      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
23735 +      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
23736 +    if test "$GCC" = yes ; then
23737 +       output_verbose_link_cmd='echo'
23738 +        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
23739 +      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
23740 +      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
23741 +      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
23742 +      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
23743 +    else
23744 +      case "$cc_basename" in
23745 +        xlc*)
23746 +         output_verbose_link_cmd='echo'
23747 +         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
23748 +         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
23749 +          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
23750 +         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
23751 +          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
23752 +          ;;
23753 +       *)
23754 +         _LT_AC_TAGVAR(ld_shlibs, $1)=no
23755 +          ;;
23756 +      esac
23757 +    fi
23758 +      ;;
23759 +
23760 +    dgux*)
23761 +      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
23762 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
23763 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
23764 +      ;;
23765 +
23766 +    freebsd1*)
23767 +      _LT_AC_TAGVAR(ld_shlibs, $1)=no
23768 +      ;;
23769 +
23770 +    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
23771 +    # support.  Future versions do this automatically, but an explicit c++rt0.o
23772 +    # does not break anything, and helps significantly (at the cost of a little
23773 +    # extra space).
23774 +    freebsd2.2*)
23775 +      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
23776 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
23777 +      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
23778 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
23779 +      ;;
23780 +
23781 +    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
23782 +    freebsd2*)
23783 +      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
23784 +      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
23785 +      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
23786 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
23787 +      ;;
23788 +
23789 +    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
23790 +    freebsd* | kfreebsd*-gnu | dragonfly*)
23791 +      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
23792 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
23793 +      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
23794 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
23795 +      ;;
23796 +
23797 +    hpux9*)
23798 +      if test "$GCC" = yes; then
23799 +       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
23800 +      else
23801 +       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
23802 +      fi
23803 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
23804 +      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
23805 +      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
23806 +
23807 +      # hardcode_minus_L: Not really in the search PATH,
23808 +      # but as the default location of the library.
23809 +      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
23810 +      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
23811 +      ;;
23812 +
23813 +    hpux10* | hpux11*)
23814 +      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
23815 +       case "$host_cpu" in
23816 +       hppa*64*|ia64*)
23817 +         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
23818 +         ;;
23819 +       *)
23820 +         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
23821 +         ;;
23822 +       esac
23823 +      else
23824 +       case "$host_cpu" in
23825 +       hppa*64*|ia64*)
23826 +         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
23827 +         ;;
23828 +       *)
23829 +         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
23830 +         ;;
23831 +       esac
23832 +      fi
23833 +      if test "$with_gnu_ld" = no; then
23834 +       case "$host_cpu" in
23835 +       hppa*64*)
23836 +         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
23837 +         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
23838 +         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
23839 +         _LT_AC_TAGVAR(hardcode_direct, $1)=no
23840 +         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
23841 +         ;;
23842 +       ia64*)
23843 +         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
23844 +         _LT_AC_TAGVAR(hardcode_direct, $1)=no
23845 +         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
23846 +
23847 +         # hardcode_minus_L: Not really in the search PATH,
23848 +         # but as the default location of the library.
23849 +         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
23850 +         ;;
23851 +       *)
23852 +         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
23853 +         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
23854 +         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
23855 +         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
23856 +
23857 +         # hardcode_minus_L: Not really in the search PATH,
23858 +         # but as the default location of the library.
23859 +         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
23860 +         ;;
23861 +       esac
23862 +      fi
23863 +      ;;
23864 +
23865 +    irix5* | irix6* | nonstopux*)
23866 +      if test "$GCC" = yes; then
23867 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
23868 +      else
23869 +       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
23870 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
23871 +      fi
23872 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
23873 +      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
23874 +      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
23875 +      ;;
23876 +
23877 +    netbsd*)
23878 +      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
23879 +       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
23880 +      else
23881 +       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
23882 +      fi
23883 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
23884 +      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
23885 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
23886 +      ;;
23887 +
23888 +    newsos6)
23889 +      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
23890 +      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
23891 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
23892 +      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
23893 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
23894 +      ;;
23895 +
23896 +    openbsd*)
23897 +      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
23898 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
23899 +      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
23900 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
23901 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
23902 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
23903 +       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
23904 +      else
23905 +       case $host_os in
23906 +        openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
23907 +          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
23908 +          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
23909 +          ;;
23910 +        *)
23911 +          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
23912 +          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
23913 +          ;;
23914 +       esac
23915 +      fi
23916 +      ;;
23917 +
23918 +    os2*)
23919 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
23920 +      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
23921 +      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
23922 +      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
23923 +      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
23924 +      ;;
23925 +
23926 +    osf3*)
23927 +      if test "$GCC" = yes; then
23928 +       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
23929 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
23930 +      else
23931 +       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
23932 +       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
23933 +      fi
23934 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
23935 +      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
23936 +      ;;
23937 +
23938 +    osf4* | osf5*)     # as osf3* with the addition of -msym flag
23939 +      if test "$GCC" = yes; then
23940 +       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
23941 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
23942 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
23943 +      else
23944 +       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
23945 +       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
23946 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
23947 +       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
23948 +
23949 +       # Both c and cxx compiler support -rpath directly
23950 +       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
23951 +      fi
23952 +      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
23953 +      ;;
23954 +
23955 +    sco3.2v5*)
23956 +      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
23957 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
23958 +      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
23959 +      runpath_var=LD_RUN_PATH
23960 +      hardcode_runpath_var=yes
23961 +      ;;
23962 +
23963 +    solaris*)
23964 +      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
23965 +      if test "$GCC" = yes; then
23966 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
23967 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
23968 +         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
23969 +      else
23970 +       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
23971 +       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
23972 +       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
23973 +      fi
23974 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
23975 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
23976 +      case $host_os in
23977 +      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
23978 +      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
23979 +       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
23980 +      esac
23981 +      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
23982 +      ;;
23983 +
23984 +    sunos4*)
23985 +      if test "x$host_vendor" = xsequent; then
23986 +       # Use $CC to link under sequent, because it throws in some extra .o
23987 +       # files that make .init and .fini sections work.
23988 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
23989 +      else
23990 +       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
23991 +      fi
23992 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
23993 +      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
23994 +      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
23995 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
23996 +      ;;
23997 +
23998 +    sysv4)
23999 +      case $host_vendor in
24000 +       sni)
24001 +         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
24002 +         _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
24003 +       ;;
24004 +       siemens)
24005 +         ## LD is ld it makes a PLAMLIB
24006 +         ## CC just makes a GrossModule.
24007 +         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
24008 +         _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
24009 +         _LT_AC_TAGVAR(hardcode_direct, $1)=no
24010 +        ;;
24011 +       motorola)
24012 +         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
24013 +         _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
24014 +       ;;
24015 +      esac
24016 +      runpath_var='LD_RUN_PATH'
24017 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
24018 +      ;;
24019 +
24020 +    sysv4.3*)
24021 +      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
24022 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
24023 +      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
24024 +      ;;
24025 +
24026 +    sysv4*MP*)
24027 +      if test -d /usr/nec; then
24028 +       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
24029 +       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
24030 +       runpath_var=LD_RUN_PATH
24031 +       hardcode_runpath_var=yes
24032 +       _LT_AC_TAGVAR(ld_shlibs, $1)=yes
24033 +      fi
24034 +      ;;
24035 +
24036 +    sysv4.2uw2*)
24037 +      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
24038 +      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
24039 +      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
24040 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
24041 +      hardcode_runpath_var=yes
24042 +      runpath_var=LD_RUN_PATH
24043 +      ;;
24044 +
24045 +   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
24046 +      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
24047 +      if test "$GCC" = yes; then
24048 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
24049 +      else
24050 +       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
24051 +      fi
24052 +      runpath_var='LD_RUN_PATH'
24053 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
24054 +      ;;
24055 +
24056 +    sysv5*)
24057 +      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
24058 +      # $CC -shared without GNU ld will not create a library from C++
24059 +      # object files and a static libstdc++, better avoid it by now
24060 +      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
24061 +      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
24062 +               $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
24063 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
24064 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
24065 +      runpath_var='LD_RUN_PATH'
24066 +      ;;
24067 +
24068 +    uts4*)
24069 +      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
24070 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
24071 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
24072 +      ;;
24073 +
24074 +    *)
24075 +      _LT_AC_TAGVAR(ld_shlibs, $1)=no
24076 +      ;;
24077 +    esac
24078 +  fi
24079 +])
24080 +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
24081 +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
24082 +
24083 +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
24084 +if test "$GCC" = yes; then
24085 +  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
24086 +fi
24087 +
24088 +#
24089 +# Do we need to explicitly link libc?
24090 +#
24091 +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
24092 +x|xyes)
24093 +  # Assume -lc should be added
24094 +  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
24095 +
24096 +  if test "$enable_shared" = yes && test "$GCC" = yes; then
24097 +    case $_LT_AC_TAGVAR(archive_cmds, $1) in
24098 +    *'~'*)
24099 +      # FIXME: we may have to deal with multi-command sequences.
24100 +      ;;
24101 +    '$CC '*)
24102 +      # Test whether the compiler implicitly links with -lc since on some
24103 +      # systems, -lgcc has to come before -lc. If gcc already passes -lc
24104 +      # to ld, don't add -lc before -lgcc.
24105 +      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
24106 +      $rm conftest*
24107 +      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
24108 +
24109 +      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
24110 +        soname=conftest
24111 +        lib=conftest
24112 +        libobjs=conftest.$ac_objext
24113 +        deplibs=
24114 +        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
24115 +        compiler_flags=-v
24116 +        linker_flags=-v
24117 +        verstring=
24118 +        output_objdir=.
24119 +        libname=conftest
24120 +        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
24121 +        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
24122 +        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
24123 +        then
24124 +         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
24125 +        else
24126 +         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
24127 +        fi
24128 +        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
24129 +      else
24130 +        cat conftest.err 1>&5
24131 +      fi
24132 +      $rm conftest*
24133 +      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
24134 +      ;;
24135 +    esac
24136 +  fi
24137 +  ;;
24138 +esac
24139 +])# AC_LIBTOOL_PROG_LD_SHLIBS
24140 +
24141 +
24142 +# _LT_AC_FILE_LTDLL_C
24143 +# -------------------
24144 +# Be careful that the start marker always follows a newline.
24145 +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
24146 +# /* ltdll.c starts here */
24147 +# #define WIN32_LEAN_AND_MEAN
24148 +# #include <windows.h>
24149 +# #undef WIN32_LEAN_AND_MEAN
24150 +# #include <stdio.h>
24151 +#
24152 +# #ifndef __CYGWIN__
24153 +# #  ifdef __CYGWIN32__
24154 +# #    define __CYGWIN__ __CYGWIN32__
24155 +# #  endif
24156 +# #endif
24157 +#
24158 +# #ifdef __cplusplus
24159 +# extern "C" {
24160 +# #endif
24161 +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
24162 +# #ifdef __cplusplus
24163 +# }
24164 +# #endif
24165 +#
24166 +# #ifdef __CYGWIN__
24167 +# #include <cygwin/cygwin_dll.h>
24168 +# DECLARE_CYGWIN_DLL( DllMain );
24169 +# #endif
24170 +# HINSTANCE __hDllInstance_base;
24171 +#
24172 +# BOOL APIENTRY
24173 +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
24174 +# {
24175 +#   __hDllInstance_base = hInst;
24176 +#   return TRUE;
24177 +# }
24178 +# /* ltdll.c ends here */
24179 +])# _LT_AC_FILE_LTDLL_C
24180 +
24181 +
24182 +# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
24183 +# ---------------------------------
24184 +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
24185 +
24186 +
24187 +# old names
24188 +AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
24189 +AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
24190 +AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
24191 +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
24192 +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
24193 +AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
24194 +AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
24195 +
24196 +# This is just to silence aclocal about the macro not being used
24197 +ifelse([AC_DISABLE_FAST_INSTALL])
24198 +
24199 +AC_DEFUN([LT_AC_PROG_GCJ],
24200 +[AC_CHECK_TOOL(GCJ, gcj, no)
24201 +  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
24202 +  AC_SUBST(GCJFLAGS)
24203 +])
24204 +
24205 +AC_DEFUN([LT_AC_PROG_RC],
24206 +[AC_CHECK_TOOL(RC, windres, no)
24207 +])
24208 +
24209 +# NOTE: This macro has been submitted for inclusion into   #
24210 +#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
24211 +#  a released version of Autoconf we should remove this    #
24212 +#  macro and use it instead.                               #
24213 +# LT_AC_PROG_SED
24214 +# --------------
24215 +# Check for a fully-functional sed program, that truncates
24216 +# as few characters as possible.  Prefer GNU sed if found.
24217 +AC_DEFUN([LT_AC_PROG_SED],
24218 +[AC_MSG_CHECKING([for a sed that does not truncate output])
24219 +AC_CACHE_VAL(lt_cv_path_SED,
24220 +[# Loop through the user's path and test for sed and gsed.
24221 +# Then use that list of sed's as ones to test for truncation.
24222 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24223 +for as_dir in $PATH
24224 +do
24225 +  IFS=$as_save_IFS
24226 +  test -z "$as_dir" && as_dir=.
24227 +  for lt_ac_prog in sed gsed; do
24228 +    for ac_exec_ext in '' $ac_executable_extensions; do
24229 +      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
24230 +        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
24231 +      fi
24232 +    done
24233 +  done
24234 +done
24235 +lt_ac_max=0
24236 +lt_ac_count=0
24237 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris
24238 +# along with /bin/sed that truncates output.
24239 +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
24240 +  test ! -f $lt_ac_sed && continue
24241 +  cat /dev/null > conftest.in
24242 +  lt_ac_count=0
24243 +  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
24244 +  # Check for GNU sed and select it if it is found.
24245 +  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
24246 +    lt_cv_path_SED=$lt_ac_sed
24247 +    break
24248 +  fi
24249 +  while true; do
24250 +    cat conftest.in conftest.in >conftest.tmp
24251 +    mv conftest.tmp conftest.in
24252 +    cp conftest.in conftest.nl
24253 +    echo >>conftest.nl
24254 +    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
24255 +    cmp -s conftest.out conftest.nl || break
24256 +    # 10000 chars as input seems more than enough
24257 +    test $lt_ac_count -gt 10 && break
24258 +    lt_ac_count=`expr $lt_ac_count + 1`
24259 +    if test $lt_ac_count -gt $lt_ac_max; then
24260 +      lt_ac_max=$lt_ac_count
24261 +      lt_cv_path_SED=$lt_ac_sed
24262 +    fi
24263 +  done
24264 +done
24265 +])
24266 +SED=$lt_cv_path_SED
24267 +AC_MSG_RESULT([$SED])
24268 +])
24269 +
24270 +# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
24271 +#
24272 +# This file is free software; the Free Software Foundation
24273 +# gives unlimited permission to copy and/or distribute it,
24274 +# with or without modifications, as long as this notice is preserved.
24275 +
24276 +# AM_AUTOMAKE_VERSION(VERSION)
24277 +# ----------------------------
24278 +# Automake X.Y traces this macro to ensure aclocal.m4 has been
24279 +# generated from the m4 files accompanying Automake X.Y.
24280 +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
24281 +
24282 +# AM_SET_CURRENT_AUTOMAKE_VERSION
24283 +# -------------------------------
24284 +# Call AM_AUTOMAKE_VERSION so it can be traced.
24285 +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
24286 +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
24287 +        [AM_AUTOMAKE_VERSION([1.9.5])])
24288 +
24289 +# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
24290 +
24291 +# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
24292 +#
24293 +# This file is free software; the Free Software Foundation
24294 +# gives unlimited permission to copy and/or distribute it,
24295 +# with or without modifications, as long as this notice is preserved.
24296 +
24297 +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
24298 +# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
24299 +# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
24300 +#
24301 +# Of course, Automake must honor this variable whenever it calls a
24302 +# tool from the auxiliary directory.  The problem is that $srcdir (and
24303 +# therefore $ac_aux_dir as well) can be either absolute or relative,
24304 +# depending on how configure is run.  This is pretty annoying, since
24305 +# it makes $ac_aux_dir quite unusable in subdirectories: in the top
24306 +# source directory, any form will work fine, but in subdirectories a
24307 +# relative path needs to be adjusted first.
24308 +#
24309 +# $ac_aux_dir/missing
24310 +#    fails when called from a subdirectory if $ac_aux_dir is relative
24311 +# $top_srcdir/$ac_aux_dir/missing
24312 +#    fails if $ac_aux_dir is absolute,
24313 +#    fails when called from a subdirectory in a VPATH build with
24314 +#          a relative $ac_aux_dir
24315 +#
24316 +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
24317 +# are both prefixed by $srcdir.  In an in-source build this is usually
24318 +# harmless because $srcdir is `.', but things will broke when you
24319 +# start a VPATH build or use an absolute $srcdir.
24320 +#
24321 +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
24322 +# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
24323 +#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
24324 +# and then we would define $MISSING as
24325 +#   MISSING="\${SHELL} $am_aux_dir/missing"
24326 +# This will work as long as MISSING is not called from configure, because
24327 +# unfortunately $(top_srcdir) has no meaning in configure.
24328 +# However there are other variables, like CC, which are often used in
24329 +# configure, and could therefore not use this "fixed" $ac_aux_dir.
24330 +#
24331 +# Another solution, used here, is to always expand $ac_aux_dir to an
24332 +# absolute PATH.  The drawback is that using absolute paths prevent a
24333 +# configured tree to be moved without reconfiguration.
24334 +
24335 +AC_DEFUN([AM_AUX_DIR_EXPAND],
24336 +[dnl Rely on autoconf to set up CDPATH properly.
24337 +AC_PREREQ([2.50])dnl
24338 +# expand $ac_aux_dir to an absolute path
24339 +am_aux_dir=`cd $ac_aux_dir && pwd`
24340 +])
24341 +
24342 +# AM_CONDITIONAL                                            -*- Autoconf -*-
24343 +
24344 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
24345 +# Free Software Foundation, Inc.
24346 +#
24347 +# This file is free software; the Free Software Foundation
24348 +# gives unlimited permission to copy and/or distribute it,
24349 +# with or without modifications, as long as this notice is preserved.
24350 +
24351 +# serial 7
24352 +
24353 +# AM_CONDITIONAL(NAME, SHELL-CONDITION)
24354 +# -------------------------------------
24355 +# Define a conditional.
24356 +AC_DEFUN([AM_CONDITIONAL],
24357 +[AC_PREREQ(2.52)dnl
24358 + ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
24359 +       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
24360 +AC_SUBST([$1_TRUE])
24361 +AC_SUBST([$1_FALSE])
24362 +if $2; then
24363 +  $1_TRUE=
24364 +  $1_FALSE='#'
24365 +else
24366 +  $1_TRUE='#'
24367 +  $1_FALSE=
24368 +fi
24369 +AC_CONFIG_COMMANDS_PRE(
24370 +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
24371 +  AC_MSG_ERROR([[conditional "$1" was never defined.
24372 +Usually this means the macro was only invoked conditionally.]])
24373 +fi])])
24374 +
24375 +
24376 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
24377 +# Free Software Foundation, Inc.
24378 +#
24379 +# This file is free software; the Free Software Foundation
24380 +# gives unlimited permission to copy and/or distribute it,
24381 +# with or without modifications, as long as this notice is preserved.
24382 +
24383 +# serial 8
24384 +
24385 +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
24386 +# written in clear, in which case automake, when reading aclocal.m4,
24387 +# will think it sees a *use*, and therefore will trigger all it's
24388 +# C support machinery.  Also note that it means that autoscan, seeing
24389 +# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
24390 +
24391 +
24392 +# _AM_DEPENDENCIES(NAME)
24393 +# ----------------------
24394 +# See how the compiler implements dependency checking.
24395 +# NAME is "CC", "CXX", "GCJ", or "OBJC".
24396 +# We try a few techniques and use that to set a single cache variable.
24397 +#
24398 +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
24399 +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
24400 +# dependency, and given that the user is not expected to run this macro,
24401 +# just rely on AC_PROG_CC.
24402 +AC_DEFUN([_AM_DEPENDENCIES],
24403 +[AC_REQUIRE([AM_SET_DEPDIR])dnl
24404 +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
24405 +AC_REQUIRE([AM_MAKE_INCLUDE])dnl
24406 +AC_REQUIRE([AM_DEP_TRACK])dnl
24407 +
24408 +ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
24409 +       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
24410 +       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
24411 +       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
24412 +                   [depcc="$$1"   am_compiler_list=])
24413 +
24414 +AC_CACHE_CHECK([dependency style of $depcc],
24415 +               [am_cv_$1_dependencies_compiler_type],
24416 +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
24417 +  # We make a subdir and do the tests there.  Otherwise we can end up
24418 +  # making bogus files that we don't know about and never remove.  For
24419 +  # instance it was reported that on HP-UX the gcc test will end up
24420 +  # making a dummy file named `D' -- because `-MD' means `put the output
24421 +  # in D'.
24422 +  mkdir conftest.dir
24423 +  # Copy depcomp to subdir because otherwise we won't find it if we're
24424 +  # using a relative directory.
24425 +  cp "$am_depcomp" conftest.dir
24426 +  cd conftest.dir
24427 +  # We will build objects and dependencies in a subdirectory because
24428 +  # it helps to detect inapplicable dependency modes.  For instance
24429 +  # both Tru64's cc and ICC support -MD to output dependencies as a
24430 +  # side effect of compilation, but ICC will put the dependencies in
24431 +  # the current directory while Tru64 will put them in the object
24432 +  # directory.
24433 +  mkdir sub
24434 +
24435 +  am_cv_$1_dependencies_compiler_type=none
24436 +  if test "$am_compiler_list" = ""; then
24437 +     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
24438 +  fi
24439 +  for depmode in $am_compiler_list; do
24440 +    # Setup a source with many dependencies, because some compilers
24441 +    # like to wrap large dependency lists on column 80 (with \), and
24442 +    # we should not choose a depcomp mode which is confused by this.
24443 +    #
24444 +    # We need to recreate these files for each test, as the compiler may
24445 +    # overwrite some of them when testing with obscure command lines.
24446 +    # This happens at least with the AIX C compiler.
24447 +    : > sub/conftest.c
24448 +    for i in 1 2 3 4 5 6; do
24449 +      echo '#include "conftst'$i'.h"' >> sub/conftest.c
24450 +      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
24451 +      # Solaris 8's {/usr,}/bin/sh.
24452 +      touch sub/conftst$i.h
24453 +    done
24454 +    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
24455 +
24456 +    case $depmode in
24457 +    nosideeffect)
24458 +      # after this tag, mechanisms are not by side-effect, so they'll
24459 +      # only be used when explicitly requested
24460 +      if test "x$enable_dependency_tracking" = xyes; then
24461 +       continue
24462 +      else
24463 +       break
24464 +      fi
24465 +      ;;
24466 +    none) break ;;
24467 +    esac
24468 +    # We check with `-c' and `-o' for the sake of the "dashmstdout"
24469 +    # mode.  It turns out that the SunPro C++ compiler does not properly
24470 +    # handle `-M -o', and we need to detect this.
24471 +    if depmode=$depmode \
24472 +       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
24473 +       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
24474 +       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
24475 +         >/dev/null 2>conftest.err &&
24476 +       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
24477 +       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
24478 +       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
24479 +      # icc doesn't choke on unknown options, it will just issue warnings
24480 +      # or remarks (even with -Werror).  So we grep stderr for any message
24481 +      # that says an option was ignored or not supported.
24482 +      # When given -MP, icc 7.0 and 7.1 complain thusly:
24483 +      #   icc: Command line warning: ignoring option '-M'; no argument required
24484 +      # The diagnosis changed in icc 8.0:
24485 +      #   icc: Command line remark: option '-MP' not supported
24486 +      if (grep 'ignoring option' conftest.err ||
24487 +          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
24488 +        am_cv_$1_dependencies_compiler_type=$depmode
24489 +        break
24490 +      fi
24491 +    fi
24492 +  done
24493 +
24494 +  cd ..
24495 +  rm -rf conftest.dir
24496 +else
24497 +  am_cv_$1_dependencies_compiler_type=none
24498 +fi
24499 +])
24500 +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
24501 +AM_CONDITIONAL([am__fastdep$1], [
24502 +  test "x$enable_dependency_tracking" != xno \
24503 +  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
24504 +])
24505 +
24506 +
24507 +# AM_SET_DEPDIR
24508 +# -------------
24509 +# Choose a directory name for dependency files.
24510 +# This macro is AC_REQUIREd in _AM_DEPENDENCIES
24511 +AC_DEFUN([AM_SET_DEPDIR],
24512 +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
24513 +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
24514 +])
24515 +
24516 +
24517 +# AM_DEP_TRACK
24518 +# ------------
24519 +AC_DEFUN([AM_DEP_TRACK],
24520 +[AC_ARG_ENABLE(dependency-tracking,
24521 +[  --disable-dependency-tracking  speeds up one-time build
24522 +  --enable-dependency-tracking   do not reject slow dependency extractors])
24523 +if test "x$enable_dependency_tracking" != xno; then
24524 +  am_depcomp="$ac_aux_dir/depcomp"
24525 +  AMDEPBACKSLASH='\'
24526 +fi
24527 +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
24528 +AC_SUBST([AMDEPBACKSLASH])
24529 +])
24530 +
24531 +# Generate code to set up dependency tracking.              -*- Autoconf -*-
24532 +
24533 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
24534 +# Free Software Foundation, Inc.
24535 +#
24536 +# This file is free software; the Free Software Foundation
24537 +# gives unlimited permission to copy and/or distribute it,
24538 +# with or without modifications, as long as this notice is preserved.
24539 +
24540 +#serial 3
24541 +
24542 +# _AM_OUTPUT_DEPENDENCY_COMMANDS
24543 +# ------------------------------
24544 +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
24545 +[for mf in $CONFIG_FILES; do
24546 +  # Strip MF so we end up with the name of the file.
24547 +  mf=`echo "$mf" | sed -e 's/:.*$//'`
24548 +  # Check whether this is an Automake generated Makefile or not.
24549 +  # We used to match only the files named `Makefile.in', but
24550 +  # some people rename them; so instead we look at the file content.
24551 +  # Grep'ing the first line is not enough: some people post-process
24552 +  # each Makefile.in and add a new line on top of each file to say so.
24553 +  # So let's grep whole file.
24554 +  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
24555 +    dirpart=`AS_DIRNAME("$mf")`
24556 +  else
24557 +    continue
24558 +  fi
24559 +  # Extract the definition of DEPDIR, am__include, and am__quote
24560 +  # from the Makefile without running `make'.
24561 +  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
24562 +  test -z "$DEPDIR" && continue
24563 +  am__include=`sed -n 's/^am__include = //p' < "$mf"`
24564 +  test -z "am__include" && continue
24565 +  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
24566 +  # When using ansi2knr, U may be empty or an underscore; expand it
24567 +  U=`sed -n 's/^U = //p' < "$mf"`
24568 +  # Find all dependency output files, they are included files with
24569 +  # $(DEPDIR) in their names.  We invoke sed twice because it is the
24570 +  # simplest approach to changing $(DEPDIR) to its actual value in the
24571 +  # expansion.
24572 +  for file in `sed -n "
24573 +    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
24574 +       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
24575 +    # Make sure the directory exists.
24576 +    test -f "$dirpart/$file" && continue
24577 +    fdir=`AS_DIRNAME(["$file"])`
24578 +    AS_MKDIR_P([$dirpart/$fdir])
24579 +    # echo "creating $dirpart/$file"
24580 +    echo '# dummy' > "$dirpart/$file"
24581 +  done
24582 +done
24583 +])# _AM_OUTPUT_DEPENDENCY_COMMANDS
24584 +
24585 +
24586 +# AM_OUTPUT_DEPENDENCY_COMMANDS
24587 +# -----------------------------
24588 +# This macro should only be invoked once -- use via AC_REQUIRE.
24589 +#
24590 +# This code is only required when automatic dependency tracking
24591 +# is enabled.  FIXME.  This creates each `.P' file that we will
24592 +# need in order to bootstrap the dependency handling code.
24593 +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
24594 +[AC_CONFIG_COMMANDS([depfiles],
24595 +     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
24596 +     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
24597 +])
24598 +
24599 +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
24600 +# Free Software Foundation, Inc.
24601 +#
24602 +# This file is free software; the Free Software Foundation
24603 +# gives unlimited permission to copy and/or distribute it,
24604 +# with or without modifications, as long as this notice is preserved.
24605 +
24606 +# serial 8
24607 +
24608 +# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
24609 +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
24610 +
24611 +# Do all the work for Automake.                             -*- Autoconf -*-
24612 +
24613 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
24614 +# Free Software Foundation, Inc.
24615 +#
24616 +# This file is free software; the Free Software Foundation
24617 +# gives unlimited permission to copy and/or distribute it,
24618 +# with or without modifications, as long as this notice is preserved.
24619 +
24620 +# serial 12
24621 +
24622 +# This macro actually does too much.  Some checks are only needed if
24623 +# your package does certain things.  But this isn't really a big deal.
24624 +
24625 +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
24626 +# AM_INIT_AUTOMAKE([OPTIONS])
24627 +# -----------------------------------------------
24628 +# The call with PACKAGE and VERSION arguments is the old style
24629 +# call (pre autoconf-2.50), which is being phased out.  PACKAGE
24630 +# and VERSION should now be passed to AC_INIT and removed from
24631 +# the call to AM_INIT_AUTOMAKE.
24632 +# We support both call styles for the transition.  After
24633 +# the next Automake release, Autoconf can make the AC_INIT
24634 +# arguments mandatory, and then we can depend on a new Autoconf
24635 +# release and drop the old call support.
24636 +AC_DEFUN([AM_INIT_AUTOMAKE],
24637 +[AC_PREREQ([2.58])dnl
24638 +dnl Autoconf wants to disallow AM_ names.  We explicitly allow
24639 +dnl the ones we care about.
24640 +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
24641 +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
24642 +AC_REQUIRE([AC_PROG_INSTALL])dnl
24643 +# test to see if srcdir already configured
24644 +if test "`cd $srcdir && pwd`" != "`pwd`" &&
24645 +   test -f $srcdir/config.status; then
24646 +  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
24647 +fi
24648 +
24649 +# test whether we have cygpath
24650 +if test -z "$CYGPATH_W"; then
24651 +  if (cygpath --version) >/dev/null 2>/dev/null; then
24652 +    CYGPATH_W='cygpath -w'
24653 +  else
24654 +    CYGPATH_W=echo
24655 +  fi
24656 +fi
24657 +AC_SUBST([CYGPATH_W])
24658 +
24659 +# Define the identity of the package.
24660 +dnl Distinguish between old-style and new-style calls.
24661 +m4_ifval([$2],
24662 +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
24663 + AC_SUBST([PACKAGE], [$1])dnl
24664 + AC_SUBST([VERSION], [$2])],
24665 +[_AM_SET_OPTIONS([$1])dnl
24666 + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
24667 + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
24668 +
24669 +_AM_IF_OPTION([no-define],,
24670 +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
24671 + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
24672 +
24673 +# Some tools Automake needs.
24674 +AC_REQUIRE([AM_SANITY_CHECK])dnl
24675 +AC_REQUIRE([AC_ARG_PROGRAM])dnl
24676 +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
24677 +AM_MISSING_PROG(AUTOCONF, autoconf)
24678 +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
24679 +AM_MISSING_PROG(AUTOHEADER, autoheader)
24680 +AM_MISSING_PROG(MAKEINFO, makeinfo)
24681 +AM_PROG_INSTALL_SH
24682 +AM_PROG_INSTALL_STRIP
24683 +AC_REQUIRE([AM_PROG_MKDIR_P])dnl
24684 +# We need awk for the "check" target.  The system "awk" is bad on
24685 +# some platforms.
24686 +AC_REQUIRE([AC_PROG_AWK])dnl
24687 +AC_REQUIRE([AC_PROG_MAKE_SET])dnl
24688 +AC_REQUIRE([AM_SET_LEADING_DOT])dnl
24689 +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
24690 +              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
24691 +                            [_AM_PROG_TAR([v7])])])
24692 +_AM_IF_OPTION([no-dependencies],,
24693 +[AC_PROVIDE_IFELSE([AC_PROG_CC],
24694 +                  [_AM_DEPENDENCIES(CC)],
24695 +                  [define([AC_PROG_CC],
24696 +                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
24697 +AC_PROVIDE_IFELSE([AC_PROG_CXX],
24698 +                  [_AM_DEPENDENCIES(CXX)],
24699 +                  [define([AC_PROG_CXX],
24700 +                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
24701 +])
24702 +])
24703 +
24704 +
24705 +# When config.status generates a header, we must update the stamp-h file.
24706 +# This file resides in the same directory as the config header
24707 +# that is generated.  The stamp files are numbered to have different names.
24708 +
24709 +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
24710 +# loop where config.status creates the headers, so we can generate
24711 +# our stamp files there.
24712 +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
24713 +[# Compute $1's index in $config_headers.
24714 +_am_stamp_count=1
24715 +for _am_header in $config_headers :; do
24716 +  case $_am_header in
24717 +    $1 | $1:* )
24718 +      break ;;
24719 +    * )
24720 +      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
24721 +  esac
24722 +done
24723 +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
24724 +
24725 +# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
24726 +#
24727 +# This file is free software; the Free Software Foundation
24728 +# gives unlimited permission to copy and/or distribute it,
24729 +# with or without modifications, as long as this notice is preserved.
24730 +
24731 +# AM_PROG_INSTALL_SH
24732 +# ------------------
24733 +# Define $install_sh.
24734 +AC_DEFUN([AM_PROG_INSTALL_SH],
24735 +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
24736 +install_sh=${install_sh-"$am_aux_dir/install-sh"}
24737 +AC_SUBST(install_sh)])
24738 +
24739 +# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
24740 +#
24741 +# This file is free software; the Free Software Foundation
24742 +# gives unlimited permission to copy and/or distribute it,
24743 +# with or without modifications, as long as this notice is preserved.
24744 +
24745 +# serial 2
24746 +
24747 +# Check whether the underlying file-system supports filenames
24748 +# with a leading dot.  For instance MS-DOS doesn't.
24749 +AC_DEFUN([AM_SET_LEADING_DOT],
24750 +[rm -rf .tst 2>/dev/null
24751 +mkdir .tst 2>/dev/null
24752 +if test -d .tst; then
24753 +  am__leading_dot=.
24754 +else
24755 +  am__leading_dot=_
24756 +fi
24757 +rmdir .tst 2>/dev/null
24758 +AC_SUBST([am__leading_dot])])
24759 +
24760 +# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
24761 +# From Jim Meyering
24762 +
24763 +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
24764 +# Free Software Foundation, Inc.
24765 +#
24766 +# This file is free software; the Free Software Foundation
24767 +# gives unlimited permission to copy and/or distribute it,
24768 +# with or without modifications, as long as this notice is preserved.
24769 +
24770 +# serial 4
24771 +
24772 +AC_DEFUN([AM_MAINTAINER_MODE],
24773 +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
24774 +  dnl maintainer-mode is disabled by default
24775 +  AC_ARG_ENABLE(maintainer-mode,
24776 +[  --enable-maintainer-mode  enable make rules and dependencies not useful
24777 +                         (and sometimes confusing) to the casual installer],
24778 +      USE_MAINTAINER_MODE=$enableval,
24779 +      USE_MAINTAINER_MODE=no)
24780 +  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
24781 +  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
24782 +  MAINT=$MAINTAINER_MODE_TRUE
24783 +  AC_SUBST(MAINT)dnl
24784 +]
24785 +)
24786 +
24787 +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
24788 +
24789 +# Check to see how 'make' treats includes.                 -*- Autoconf -*-
24790 +
24791 +# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
24792 +#
24793 +# This file is free software; the Free Software Foundation
24794 +# gives unlimited permission to copy and/or distribute it,
24795 +# with or without modifications, as long as this notice is preserved.
24796 +
24797 +# serial 3
24798 +
24799 +# AM_MAKE_INCLUDE()
24800 +# -----------------
24801 +# Check to see how make treats includes.
24802 +AC_DEFUN([AM_MAKE_INCLUDE],
24803 +[am_make=${MAKE-make}
24804 +cat > confinc << 'END'
24805 +am__doit:
24806 +       @echo done
24807 +.PHONY: am__doit
24808 +END
24809 +# If we don't find an include directive, just comment out the code.
24810 +AC_MSG_CHECKING([for style of include used by $am_make])
24811 +am__include="#"
24812 +am__quote=
24813 +_am_result=none
24814 +# First try GNU make style include.
24815 +echo "include confinc" > confmf
24816 +# We grep out `Entering directory' and `Leaving directory'
24817 +# messages which can occur if `w' ends up in MAKEFLAGS.
24818 +# In particular we don't look at `^make:' because GNU make might
24819 +# be invoked under some other name (usually "gmake"), in which
24820 +# case it prints its new name instead of `make'.
24821 +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
24822 +   am__include=include
24823 +   am__quote=
24824 +   _am_result=GNU
24825 +fi
24826 +# Now try BSD make style include.
24827 +if test "$am__include" = "#"; then
24828 +   echo '.include "confinc"' > confmf
24829 +   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
24830 +      am__include=.include
24831 +      am__quote="\""
24832 +      _am_result=BSD
24833 +   fi
24834 +fi
24835 +AC_SUBST([am__include])
24836 +AC_SUBST([am__quote])
24837 +AC_MSG_RESULT([$_am_result])
24838 +rm -f confinc confmf
24839 +])
24840 +
24841 +# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
24842 +
24843 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
24844 +# Free Software Foundation, Inc.
24845 +#
24846 +# This file is free software; the Free Software Foundation
24847 +# gives unlimited permission to copy and/or distribute it,
24848 +# with or without modifications, as long as this notice is preserved.
24849 +
24850 +# serial 4
24851 +
24852 +# AM_MISSING_PROG(NAME, PROGRAM)
24853 +# ------------------------------
24854 +AC_DEFUN([AM_MISSING_PROG],
24855 +[AC_REQUIRE([AM_MISSING_HAS_RUN])
24856 +$1=${$1-"${am_missing_run}$2"}
24857 +AC_SUBST($1)])
24858 +
24859 +
24860 +# AM_MISSING_HAS_RUN
24861 +# ------------------
24862 +# Define MISSING if not defined so far and test if it supports --run.
24863 +# If it does, set am_missing_run to use it, otherwise, to nothing.
24864 +AC_DEFUN([AM_MISSING_HAS_RUN],
24865 +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
24866 +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
24867 +# Use eval to expand $SHELL
24868 +if eval "$MISSING --run true"; then
24869 +  am_missing_run="$MISSING --run "
24870 +else
24871 +  am_missing_run=
24872 +  AC_MSG_WARN([`missing' script is too old or missing])
24873 +fi
24874 +])
24875 +
24876 +# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
24877 +#
24878 +# This file is free software; the Free Software Foundation
24879 +# gives unlimited permission to copy and/or distribute it,
24880 +# with or without modifications, as long as this notice is preserved.
24881 +
24882 +# AM_PROG_MKDIR_P
24883 +# ---------------
24884 +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
24885 +#
24886 +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
24887 +# created by `make install' are always world readable, even if the
24888 +# installer happens to have an overly restrictive umask (e.g. 077).
24889 +# This was a mistake.  There are at least two reasons why we must not
24890 +# use `-m 0755':
24891 +#   - it causes special bits like SGID to be ignored,
24892 +#   - it may be too restrictive (some setups expect 775 directories).
24893 +#
24894 +# Do not use -m 0755 and let people choose whatever they expect by
24895 +# setting umask.
24896 +#
24897 +# We cannot accept any implementation of `mkdir' that recognizes `-p'.
24898 +# Some implementations (such as Solaris 8's) are not thread-safe: if a
24899 +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
24900 +# concurrently, both version can detect that a/ is missing, but only
24901 +# one can create it and the other will error out.  Consequently we
24902 +# restrict ourselves to GNU make (using the --version option ensures
24903 +# this.)
24904 +AC_DEFUN([AM_PROG_MKDIR_P],
24905 +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
24906 +  # We used to keeping the `.' as first argument, in order to
24907 +  # allow $(mkdir_p) to be used without argument.  As in
24908 +  #   $(mkdir_p) $(somedir)
24909 +  # where $(somedir) is conditionally defined.  However this is wrong
24910 +  # for two reasons:
24911 +  #  1. if the package is installed by a user who cannot write `.'
24912 +  #     make install will fail,
24913 +  #  2. the above comment should most certainly read
24914 +  #     $(mkdir_p) $(DESTDIR)$(somedir)
24915 +  #     so it does not work when $(somedir) is undefined and
24916 +  #     $(DESTDIR) is not.
24917 +  #  To support the latter case, we have to write
24918 +  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
24919 +  #  so the `.' trick is pointless.
24920 +  mkdir_p='mkdir -p --'
24921 +else
24922 +  # On NextStep and OpenStep, the `mkdir' command does not
24923 +  # recognize any option.  It will interpret all options as
24924 +  # directories to create, and then abort because `.' already
24925 +  # exists.
24926 +  for d in ./-p ./--version;
24927 +  do
24928 +    test -d $d && rmdir $d
24929 +  done
24930 +  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
24931 +  if test -f "$ac_aux_dir/mkinstalldirs"; then
24932 +    mkdir_p='$(mkinstalldirs)'
24933 +  else
24934 +    mkdir_p='$(install_sh) -d'
24935 +  fi
24936 +fi
24937 +AC_SUBST([mkdir_p])])
24938 +
24939 +# Helper functions for option handling.                     -*- Autoconf -*-
24940 +
24941 +# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
24942 +#
24943 +# This file is free software; the Free Software Foundation
24944 +# gives unlimited permission to copy and/or distribute it,
24945 +# with or without modifications, as long as this notice is preserved.
24946 +
24947 +# serial 3
24948 +
24949 +# _AM_MANGLE_OPTION(NAME)
24950 +# -----------------------
24951 +AC_DEFUN([_AM_MANGLE_OPTION],
24952 +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
24953 +
24954 +# _AM_SET_OPTION(NAME)
24955 +# ------------------------------
24956 +# Set option NAME.  Presently that only means defining a flag for this option.
24957 +AC_DEFUN([_AM_SET_OPTION],
24958 +[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
24959 +
24960 +# _AM_SET_OPTIONS(OPTIONS)
24961 +# ----------------------------------
24962 +# OPTIONS is a space-separated list of Automake options.
24963 +AC_DEFUN([_AM_SET_OPTIONS],
24964 +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
24965 +
24966 +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
24967 +# -------------------------------------------
24968 +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
24969 +AC_DEFUN([_AM_IF_OPTION],
24970 +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
24971 +
24972 +# Check to make sure that the build environment is sane.    -*- Autoconf -*-
24973 +
24974 +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
24975 +# Free Software Foundation, Inc.
24976 +#
24977 +# This file is free software; the Free Software Foundation
24978 +# gives unlimited permission to copy and/or distribute it,
24979 +# with or without modifications, as long as this notice is preserved.
24980 +
24981 +# serial 4
24982 +
24983 +# AM_SANITY_CHECK
24984 +# ---------------
24985 +AC_DEFUN([AM_SANITY_CHECK],
24986 +[AC_MSG_CHECKING([whether build environment is sane])
24987 +# Just in case
24988 +sleep 1
24989 +echo timestamp > conftest.file
24990 +# Do `set' in a subshell so we don't clobber the current shell's
24991 +# arguments.  Must try -L first in case configure is actually a
24992 +# symlink; some systems play weird games with the mod time of symlinks
24993 +# (eg FreeBSD returns the mod time of the symlink's containing
24994 +# directory).
24995 +if (
24996 +   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
24997 +   if test "$[*]" = "X"; then
24998 +      # -L didn't work.
24999 +      set X `ls -t $srcdir/configure conftest.file`
25000 +   fi
25001 +   rm -f conftest.file
25002 +   if test "$[*]" != "X $srcdir/configure conftest.file" \
25003 +      && test "$[*]" != "X conftest.file $srcdir/configure"; then
25004 +
25005 +      # If neither matched, then we have a broken ls.  This can happen
25006 +      # if, for instance, CONFIG_SHELL is bash and it inherits a
25007 +      # broken ls alias from the environment.  This has actually
25008 +      # happened.  Such a system could not be considered "sane".
25009 +      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
25010 +alias in your environment])
25011 +   fi
25012 +
25013 +   test "$[2]" = conftest.file
25014 +   )
25015 +then
25016 +   # Ok.
25017 +   :
25018 +else
25019 +   AC_MSG_ERROR([newly created file is older than distributed files!
25020 +Check your system clock])
25021 +fi
25022 +AC_MSG_RESULT(yes)])
25023 +
25024 +# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
25025 +#
25026 +# This file is free software; the Free Software Foundation
25027 +# gives unlimited permission to copy and/or distribute it,
25028 +# with or without modifications, as long as this notice is preserved.
25029 +
25030 +# AM_PROG_INSTALL_STRIP
25031 +# ---------------------
25032 +# One issue with vendor `install' (even GNU) is that you can't
25033 +# specify the program used to strip binaries.  This is especially
25034 +# annoying in cross-compiling environments, where the build's strip
25035 +# is unlikely to handle the host's binaries.
25036 +# Fortunately install-sh will honor a STRIPPROG variable, so we
25037 +# always use install-sh in `make install-strip', and initialize
25038 +# STRIPPROG with the value of the STRIP variable (set by the user).
25039 +AC_DEFUN([AM_PROG_INSTALL_STRIP],
25040 +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
25041 +# Installed binaries are usually stripped using `strip' when the user
25042 +# run `make install-strip'.  However `strip' might not be the right
25043 +# tool to use in cross-compilation environments, therefore Automake
25044 +# will honor the `STRIP' environment variable to overrule this program.
25045 +dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
25046 +if test "$cross_compiling" != no; then
25047 +  AC_CHECK_TOOL([STRIP], [strip], :)
25048 +fi
25049 +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
25050 +AC_SUBST([INSTALL_STRIP_PROGRAM])])
25051 +
25052 +# Check how to create a tarball.                            -*- Autoconf -*-
25053 +
25054 +# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
25055 +#
25056 +# This file is free software; the Free Software Foundation
25057 +# gives unlimited permission to copy and/or distribute it,
25058 +# with or without modifications, as long as this notice is preserved.
25059 +
25060 +# serial 2
25061 +
25062 +# _AM_PROG_TAR(FORMAT)
25063 +# --------------------
25064 +# Check how to create a tarball in format FORMAT.
25065 +# FORMAT should be one of `v7', `ustar', or `pax'.
25066 +#
25067 +# Substitute a variable $(am__tar) that is a command
25068 +# writing to stdout a FORMAT-tarball containing the directory
25069 +# $tardir.
25070 +#     tardir=directory && $(am__tar) > result.tar
25071 +#
25072 +# Substitute a variable $(am__untar) that extract such
25073 +# a tarball read from stdin.
25074 +#     $(am__untar) < result.tar
25075 +AC_DEFUN([_AM_PROG_TAR],
25076 +[# Always define AMTAR for backward compatibility.
25077 +AM_MISSING_PROG([AMTAR], [tar])
25078 +m4_if([$1], [v7],
25079 +     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
25080 +     [m4_case([$1], [ustar],, [pax],,
25081 +              [m4_fatal([Unknown tar format])])
25082 +AC_MSG_CHECKING([how to create a $1 tar archive])
25083 +# Loop over all known methods to create a tar archive until one works.
25084 +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
25085 +_am_tools=${am_cv_prog_tar_$1-$_am_tools}
25086 +# Do not fold the above two line into one, because Tru64 sh and
25087 +# Solaris sh will not grok spaces in the rhs of `-'.
25088 +for _am_tool in $_am_tools
25089 +do
25090 +  case $_am_tool in
25091 +  gnutar)
25092 +    for _am_tar in tar gnutar gtar;
25093 +    do
25094 +      AM_RUN_LOG([$_am_tar --version]) && break
25095 +    done
25096 +    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
25097 +    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
25098 +    am__untar="$_am_tar -xf -"
25099 +    ;;
25100 +  plaintar)
25101 +    # Must skip GNU tar: if it does not support --format= it doesn't create
25102 +    # ustar tarball either.
25103 +    (tar --version) >/dev/null 2>&1 && continue
25104 +    am__tar='tar chf - "$$tardir"'
25105 +    am__tar_='tar chf - "$tardir"'
25106 +    am__untar='tar xf -'
25107 +    ;;
25108 +  pax)
25109 +    am__tar='pax -L -x $1 -w "$$tardir"'
25110 +    am__tar_='pax -L -x $1 -w "$tardir"'
25111 +    am__untar='pax -r'
25112 +    ;;
25113 +  cpio)
25114 +    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
25115 +    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
25116 +    am__untar='cpio -i -H $1 -d'
25117 +    ;;
25118 +  none)
25119 +    am__tar=false
25120 +    am__tar_=false
25121 +    am__untar=false
25122 +    ;;
25123 +  esac
25124 +
25125 +  # If the value was cached, stop now.  We just wanted to have am__tar
25126 +  # and am__untar set.
25127 +  test -n "${am_cv_prog_tar_$1}" && break
25128 +
25129 +  # tar/untar a dummy directory, and stop if the command works
25130 +  rm -rf conftest.dir
25131 +  mkdir conftest.dir
25132 +  echo GrepMe > conftest.dir/file
25133 +  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
25134 +  rm -rf conftest.dir
25135 +  if test -s conftest.tar; then
25136 +    AM_RUN_LOG([$am__untar <conftest.tar])
25137 +    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
25138 +  fi
25139 +done
25140 +rm -rf conftest.dir
25141 +
25142 +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
25143 +AC_MSG_RESULT([$am_cv_prog_tar_$1])])
25144 +AC_SUBST([am__tar])
25145 +AC_SUBST([am__untar])
25146 +]) # _AM_PROG_TAR
25147 +
25148 diff -Nru php-5.2.4.vanilla/libevent/autogen.sh php-5.2.4.fpm/libevent/autogen.sh
25149 --- php-5.2.4.vanilla/libevent/autogen.sh       1970-01-01 03:00:00.000000000 +0300
25150 +++ php-5.2.4.fpm/libevent/autogen.sh   2007-08-31 15:47:19.000000000 +0400
25151 @@ -0,0 +1,10 @@
25152 +#!/bin/sh
25153 +LIBTOOLIZE=libtoolize
25154 +if [ "$(uname)" == "Darwin" ] ; then
25155 +  LIBTOOLIZE=glibtoolize
25156 +fi
25157 +aclocal && \
25158 +       autoheader && \
25159 +       $LIBTOOLIZE --copy --force && \
25160 +       autoconf && \
25161 +       automake --add-missing --copy
25162 diff -Nru php-5.2.4.vanilla/libevent/buffer.c php-5.2.4.fpm/libevent/buffer.c
25163 --- php-5.2.4.vanilla/libevent/buffer.c 1970-01-01 03:00:00.000000000 +0300
25164 +++ php-5.2.4.fpm/libevent/buffer.c     2007-08-31 15:47:19.000000000 +0400
25165 @@ -0,0 +1,460 @@
25166 +/*
25167 + * Copyright (c) 2002, 2003 Niels Provos <provos@citi.umich.edu>
25168 + * All rights reserved.
25169 + *
25170 + * Redistribution and use in source and binary forms, with or without
25171 + * modification, are permitted provided that the following conditions
25172 + * are met:
25173 + * 1. Redistributions of source code must retain the above copyright
25174 + *    notice, this list of conditions and the following disclaimer.
25175 + * 2. Redistributions in binary form must reproduce the above copyright
25176 + *    notice, this list of conditions and the following disclaimer in the
25177 + *    documentation and/or other materials provided with the distribution.
25178 + * 3. The name of the author may not be used to endorse or promote products
25179 + *    derived from this software without specific prior written permission.
25180 + *
25181 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
25182 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25183 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25184 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25185 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25186 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25187 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25188 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25189 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25190 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25191 + */
25192 +
25193 +#ifdef HAVE_CONFIG_H
25194 +#include "config.h"
25195 +#endif
25196 +
25197 +#ifdef HAVE_VASPRINTF
25198 +/* If we have vasprintf, we need to define this before we include stdio.h. */
25199 +#define _GNU_SOURCE
25200 +#endif
25201 +
25202 +#include <sys/types.h>
25203 +
25204 +#ifdef HAVE_SYS_TIME_H
25205 +#include <sys/time.h>
25206 +#endif
25207 +
25208 +#ifdef HAVE_SYS_IOCTL_H
25209 +#include <sys/ioctl.h>
25210 +#endif
25211 +
25212 +#include <assert.h>
25213 +#include <errno.h>
25214 +#include <stdio.h>
25215 +#include <stdlib.h>
25216 +#include <string.h>
25217 +#ifdef HAVE_STDARG_H
25218 +#include <stdarg.h>
25219 +#endif
25220 +#ifdef HAVE_UNISTD_H
25221 +#include <unistd.h>
25222 +#endif
25223 +
25224 +#include "event.h"
25225 +
25226 +struct evbuffer *
25227 +evbuffer_new(void)
25228 +{
25229 +       struct evbuffer *buffer;
25230 +       
25231 +       buffer = calloc(1, sizeof(struct evbuffer));
25232 +
25233 +       return (buffer);
25234 +}
25235 +
25236 +void
25237 +evbuffer_free(struct evbuffer *buffer)
25238 +{
25239 +       if (buffer->orig_buffer != NULL)
25240 +               free(buffer->orig_buffer);
25241 +       free(buffer);
25242 +}
25243 +
25244 +/* 
25245 + * This is a destructive add.  The data from one buffer moves into
25246 + * the other buffer.
25247 + */
25248 +
25249 +#define SWAP(x,y) do { \
25250 +       (x)->buffer = (y)->buffer; \
25251 +       (x)->orig_buffer = (y)->orig_buffer; \
25252 +       (x)->misalign = (y)->misalign; \
25253 +       (x)->totallen = (y)->totallen; \
25254 +       (x)->off = (y)->off; \
25255 +} while (0)
25256 +
25257 +int
25258 +evbuffer_add_buffer(struct evbuffer *outbuf, struct evbuffer *inbuf)
25259 +{
25260 +       int res;
25261 +
25262 +       /* Short cut for better performance */
25263 +       if (outbuf->off == 0) {
25264 +               struct evbuffer tmp;
25265 +               size_t oldoff = inbuf->off;
25266 +
25267 +               /* Swap them directly */
25268 +               SWAP(&tmp, outbuf);
25269 +               SWAP(outbuf, inbuf);
25270 +               SWAP(inbuf, &tmp);
25271 +
25272 +               /* 
25273 +                * Optimization comes with a price; we need to notify the
25274 +                * buffer if necessary of the changes. oldoff is the amount
25275 +                * of data that we tranfered from inbuf to outbuf
25276 +                */
25277 +               if (inbuf->off != oldoff && inbuf->cb != NULL)
25278 +                       (*inbuf->cb)(inbuf, oldoff, inbuf->off, inbuf->cbarg);
25279 +               if (oldoff && outbuf->cb != NULL)
25280 +                       (*outbuf->cb)(outbuf, 0, oldoff, outbuf->cbarg);
25281 +               
25282 +               return (0);
25283 +       }
25284 +
25285 +       res = evbuffer_add(outbuf, inbuf->buffer, inbuf->off);
25286 +       if (res == 0) {
25287 +               /* We drain the input buffer on success */
25288 +               evbuffer_drain(inbuf, inbuf->off);
25289 +       }
25290 +
25291 +       return (res);
25292 +}
25293 +
25294 +int
25295 +evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap)
25296 +{
25297 +       char *buffer;
25298 +       size_t space;
25299 +       size_t oldoff = buf->off;
25300 +       int sz;
25301 +       va_list aq;
25302 +
25303 +       /* make sure that at least some space is available */
25304 +       evbuffer_expand(buf, 64);
25305 +       for (;;) {
25306 +               size_t used = buf->misalign + buf->off;
25307 +               buffer = (char *)buf->buffer + buf->off;
25308 +               assert(buf->totallen >= used);
25309 +               space = buf->totallen - used;
25310 +
25311 +#ifndef va_copy
25312 +#define        va_copy(dst, src)       memcpy(&(dst), &(src), sizeof(va_list))
25313 +#endif
25314 +               va_copy(aq, ap);
25315 +
25316 +#ifdef WIN32
25317 +               sz = vsnprintf(buffer, space - 1, fmt, aq);
25318 +               buffer[space - 1] = '\0';
25319 +#else
25320 +               sz = vsnprintf(buffer, space, fmt, aq);
25321 +#endif
25322 +
25323 +               va_end(aq);
25324 +
25325 +               if (sz < 0)
25326 +                       return (-1);
25327 +               if (sz < space) {
25328 +                       buf->off += sz;
25329 +                       if (buf->cb != NULL)
25330 +                               (*buf->cb)(buf, oldoff, buf->off, buf->cbarg);
25331 +                       return (sz);
25332 +               }
25333 +               if (evbuffer_expand(buf, sz + 1) == -1)
25334 +                       return (-1);
25335 +
25336 +       }
25337 +       /* NOTREACHED */
25338 +}
25339 +
25340 +int
25341 +evbuffer_add_printf(struct evbuffer *buf, const char *fmt, ...)
25342 +{
25343 +       int res = -1;
25344 +       va_list ap;
25345 +
25346 +       va_start(ap, fmt);
25347 +       res = evbuffer_add_vprintf(buf, fmt, ap);
25348 +       va_end(ap);
25349 +
25350 +       return (res);
25351 +}
25352 +
25353 +/* Reads data from an event buffer and drains the bytes read */
25354 +
25355 +int
25356 +evbuffer_remove(struct evbuffer *buf, void *data, size_t datlen)
25357 +{
25358 +       size_t nread = datlen;
25359 +       if (nread >= buf->off)
25360 +               nread = buf->off;
25361 +
25362 +       memcpy(data, buf->buffer, nread);
25363 +       evbuffer_drain(buf, nread);
25364 +       
25365 +       return (nread);
25366 +}
25367 +
25368 +/*
25369 + * Reads a line terminated by either '\r\n', '\n\r' or '\r' or '\n'.
25370 + * The returned buffer needs to be freed by the called.
25371 + */
25372 +
25373 +char *
25374 +evbuffer_readline(struct evbuffer *buffer)
25375 +{
25376 +       u_char *data = EVBUFFER_DATA(buffer);
25377 +       size_t len = EVBUFFER_LENGTH(buffer);
25378 +       char *line;
25379 +       unsigned int i;
25380 +
25381 +       for (i = 0; i < len; i++) {
25382 +               if (data[i] == '\r' || data[i] == '\n')
25383 +                       break;
25384 +       }
25385 +
25386 +       if (i == len)
25387 +               return (NULL);
25388 +
25389 +       if ((line = malloc(i + 1)) == NULL) {
25390 +               fprintf(stderr, "%s: out of memory\n", __func__);
25391 +               evbuffer_drain(buffer, i);
25392 +               return (NULL);
25393 +       }
25394 +
25395 +       memcpy(line, data, i);
25396 +       line[i] = '\0';
25397 +
25398 +       /*
25399 +        * Some protocols terminate a line with '\r\n', so check for
25400 +        * that, too.
25401 +        */
25402 +       if ( i < len - 1 ) {
25403 +               char fch = data[i], sch = data[i+1];
25404 +
25405 +               /* Drain one more character if needed */
25406 +               if ( (sch == '\r' || sch == '\n') && sch != fch )
25407 +                       i += 1;
25408 +       }
25409 +
25410 +       evbuffer_drain(buffer, i + 1);
25411 +
25412 +       return (line);
25413 +}
25414 +
25415 +/* Adds data to an event buffer */
25416 +
25417 +static inline void
25418 +evbuffer_align(struct evbuffer *buf)
25419 +{
25420 +       memmove(buf->orig_buffer, buf->buffer, buf->off);
25421 +       buf->buffer = buf->orig_buffer;
25422 +       buf->misalign = 0;
25423 +}
25424 +
25425 +/* Expands the available space in the event buffer to at least datlen */
25426 +
25427 +int
25428 +evbuffer_expand(struct evbuffer *buf, size_t datlen)
25429 +{
25430 +       size_t need = buf->misalign + buf->off + datlen;
25431 +
25432 +       /* If we can fit all the data, then we don't have to do anything */
25433 +       if (buf->totallen >= need)
25434 +               return (0);
25435 +
25436 +       /*
25437 +        * If the misalignment fulfills our data needs, we just force an
25438 +        * alignment to happen.  Afterwards, we have enough space.
25439 +        */
25440 +       if (buf->misalign >= datlen) {
25441 +               evbuffer_align(buf);
25442 +       } else {
25443 +               void *newbuf;
25444 +               size_t length = buf->totallen;
25445 +
25446 +               if (length < 256)
25447 +                       length = 256;
25448 +               while (length < need)
25449 +                       length <<= 1;
25450 +
25451 +               if (buf->orig_buffer != buf->buffer)
25452 +                       evbuffer_align(buf);
25453 +               if ((newbuf = realloc(buf->buffer, length)) == NULL)
25454 +                       return (-1);
25455 +
25456 +               buf->orig_buffer = buf->buffer = newbuf;
25457 +               buf->totallen = length;
25458 +       }
25459 +
25460 +       return (0);
25461 +}
25462 +
25463 +int
25464 +evbuffer_add(struct evbuffer *buf, const void *data, size_t datlen)
25465 +{
25466 +       size_t need = buf->misalign + buf->off + datlen;
25467 +       size_t oldoff = buf->off;
25468 +
25469 +       if (buf->totallen < need) {
25470 +               if (evbuffer_expand(buf, datlen) == -1)
25471 +                       return (-1);
25472 +       }
25473 +
25474 +       memcpy(buf->buffer + buf->off, data, datlen);
25475 +       buf->off += datlen;
25476 +
25477 +       if (datlen && buf->cb != NULL)
25478 +               (*buf->cb)(buf, oldoff, buf->off, buf->cbarg);
25479 +
25480 +       return (0);
25481 +}
25482 +
25483 +void
25484 +evbuffer_drain(struct evbuffer *buf, size_t len)
25485 +{
25486 +       size_t oldoff = buf->off;
25487 +
25488 +       if (len >= buf->off) {
25489 +               buf->off = 0;
25490 +               buf->buffer = buf->orig_buffer;
25491 +               buf->misalign = 0;
25492 +               goto done;
25493 +       }
25494 +
25495 +       buf->buffer += len;
25496 +       buf->misalign += len;
25497 +
25498 +       buf->off -= len;
25499 +
25500 + done:
25501 +       /* Tell someone about changes in this buffer */
25502 +       if (buf->off != oldoff && buf->cb != NULL)
25503 +               (*buf->cb)(buf, oldoff, buf->off, buf->cbarg);
25504 +
25505 +}
25506 +
25507 +/*
25508 + * Reads data from a file descriptor into a buffer.
25509 + */
25510 +
25511 +#define EVBUFFER_MAX_READ      4096
25512 +
25513 +int
25514 +evbuffer_read(struct evbuffer *buf, int fd, int howmuch)
25515 +{
25516 +       u_char *p;
25517 +       size_t oldoff = buf->off;
25518 +       int n = EVBUFFER_MAX_READ;
25519 +#ifdef WIN32
25520 +       DWORD dwBytesRead;
25521 +#endif
25522 +
25523 +#ifdef FIONREAD
25524 +       if (ioctl(fd, FIONREAD, &n) == -1 || n == 0) {
25525 +               n = EVBUFFER_MAX_READ;
25526 +       } else if (n > EVBUFFER_MAX_READ && n > howmuch) {
25527 +               /*
25528 +                * It's possible that a lot of data is available for
25529 +                * reading.  We do not want to exhaust resources
25530 +                * before the reader has a chance to do something
25531 +                * about it.  If the reader does not tell us how much
25532 +                * data we should read, we artifically limit it.
25533 +                */
25534 +               if (n > buf->totallen << 2)
25535 +                       n = buf->totallen << 2;
25536 +               if (n < EVBUFFER_MAX_READ)
25537 +                       n = EVBUFFER_MAX_READ;
25538 +       }
25539 +#endif 
25540 +       if (howmuch < 0 || howmuch > n)
25541 +               howmuch = n;
25542 +
25543 +       /* If we don't have FIONREAD, we might waste some space here */
25544 +       if (evbuffer_expand(buf, howmuch) == -1)
25545 +               return (-1);
25546 +
25547 +       /* We can append new data at this point */
25548 +       p = buf->buffer + buf->off;
25549 +
25550 +#ifndef WIN32
25551 +       n = read(fd, p, howmuch);
25552 +       if (n == -1)
25553 +               return (-1);
25554 +       if (n == 0)
25555 +               return (0);
25556 +#else
25557 +       n = ReadFile((HANDLE)fd, p, howmuch, &dwBytesRead, NULL);
25558 +       if (n == 0)
25559 +               return (-1);
25560 +       if (dwBytesRead == 0)
25561 +               return (0);
25562 +       n = dwBytesRead;
25563 +#endif
25564 +
25565 +       buf->off += n;
25566 +
25567 +       /* Tell someone about changes in this buffer */
25568 +       if (buf->off != oldoff && buf->cb != NULL)
25569 +               (*buf->cb)(buf, oldoff, buf->off, buf->cbarg);
25570 +
25571 +       return (n);
25572 +}
25573 +
25574 +int
25575 +evbuffer_write(struct evbuffer *buffer, int fd)
25576 +{
25577 +       int n;
25578 +#ifdef WIN32
25579 +       DWORD dwBytesWritten;
25580 +#endif
25581 +
25582 +#ifndef WIN32
25583 +       n = write(fd, buffer->buffer, buffer->off);
25584 +       if (n == -1)
25585 +               return (-1);
25586 +       if (n == 0)
25587 +               return (0);
25588 +#else
25589 +       n = WriteFile((HANDLE)fd, buffer->buffer, buffer->off, &dwBytesWritten, NULL);
25590 +       if (n == 0)
25591 +               return (-1);
25592 +       if (dwBytesWritten == 0)
25593 +               return (0);
25594 +       n = dwBytesWritten;
25595 +#endif
25596 +       evbuffer_drain(buffer, n);
25597 +
25598 +       return (n);
25599 +}
25600 +
25601 +u_char *
25602 +evbuffer_find(struct evbuffer *buffer, const u_char *what, size_t len)
25603 +{
25604 +       u_char *search = buffer->buffer, *end = search + buffer->off;
25605 +       u_char *p;
25606 +
25607 +       while (search < end &&
25608 +           (p = memchr(search, *what, end - search)) != NULL) {
25609 +               if (p + len > end)
25610 +                       break;
25611 +               if (memcmp(p, what, len) == 0)
25612 +                       return (p);
25613 +               search = p + 1;
25614 +       }
25615 +
25616 +       return (NULL);
25617 +}
25618 +
25619 +void evbuffer_setcb(struct evbuffer *buffer,
25620 +    void (*cb)(struct evbuffer *, size_t, size_t, void *),
25621 +    void *cbarg)
25622 +{
25623 +       buffer->cb = cb;
25624 +       buffer->cbarg = cbarg;
25625 +}
25626 diff -Nru php-5.2.4.vanilla/libevent/compat/sys/queue.h php-5.2.4.fpm/libevent/compat/sys/queue.h
25627 --- php-5.2.4.vanilla/libevent/compat/sys/queue.h       1970-01-01 03:00:00.000000000 +0300
25628 +++ php-5.2.4.fpm/libevent/compat/sys/queue.h   2007-08-31 15:47:19.000000000 +0400
25629 @@ -0,0 +1,488 @@
25630 +/*     $OpenBSD: queue.h,v 1.16 2000/09/07 19:47:59 art Exp $  */
25631 +/*     $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $       */
25632 +
25633 +/*
25634 + * Copyright (c) 1991, 1993
25635 + *     The Regents of the University of California.  All rights reserved.
25636 + *
25637 + * Redistribution and use in source and binary forms, with or without
25638 + * modification, are permitted provided that the following conditions
25639 + * are met:
25640 + * 1. Redistributions of source code must retain the above copyright
25641 + *    notice, this list of conditions and the following disclaimer.
25642 + * 2. Redistributions in binary form must reproduce the above copyright
25643 + *    notice, this list of conditions and the following disclaimer in the
25644 + *    documentation and/or other materials provided with the distribution.
25645 + * 3. Neither the name of the University nor the names of its contributors
25646 + *    may be used to endorse or promote products derived from this software
25647 + *    without specific prior written permission.
25648 + *
25649 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25650 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25651 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25652 + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25653 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25654 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25655 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25656 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25657 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25658 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25659 + * SUCH DAMAGE.
25660 + *
25661 + *     @(#)queue.h     8.5 (Berkeley) 8/20/94
25662 + */
25663 +
25664 +#ifndef        _SYS_QUEUE_H_
25665 +#define        _SYS_QUEUE_H_
25666 +
25667 +/*
25668 + * This file defines five types of data structures: singly-linked lists, 
25669 + * lists, simple queues, tail queues, and circular queues.
25670 + *
25671 + *
25672 + * A singly-linked list is headed by a single forward pointer. The elements
25673 + * are singly linked for minimum space and pointer manipulation overhead at
25674 + * the expense of O(n) removal for arbitrary elements. New elements can be
25675 + * added to the list after an existing element or at the head of the list.
25676 + * Elements being removed from the head of the list should use the explicit
25677 + * macro for this purpose for optimum efficiency. A singly-linked list may
25678 + * only be traversed in the forward direction.  Singly-linked lists are ideal
25679 + * for applications with large datasets and few or no removals or for
25680 + * implementing a LIFO queue.
25681 + *
25682 + * A list is headed by a single forward pointer (or an array of forward
25683 + * pointers for a hash table header). The elements are doubly linked
25684 + * so that an arbitrary element can be removed without a need to
25685 + * traverse the list. New elements can be added to the list before
25686 + * or after an existing element or at the head of the list. A list
25687 + * may only be traversed in the forward direction.
25688 + *
25689 + * A simple queue is headed by a pair of pointers, one the head of the
25690 + * list and the other to the tail of the list. The elements are singly
25691 + * linked to save space, so elements can only be removed from the
25692 + * head of the list. New elements can be added to the list before or after
25693 + * an existing element, at the head of the list, or at the end of the
25694 + * list. A simple queue may only be traversed in the forward direction.
25695 + *
25696 + * A tail queue is headed by a pair of pointers, one to the head of the
25697 + * list and the other to the tail of the list. The elements are doubly
25698 + * linked so that an arbitrary element can be removed without a need to
25699 + * traverse the list. New elements can be added to the list before or
25700 + * after an existing element, at the head of the list, or at the end of
25701 + * the list. A tail queue may be traversed in either direction.
25702 + *
25703 + * A circle queue is headed by a pair of pointers, one to the head of the
25704 + * list and the other to the tail of the list. The elements are doubly
25705 + * linked so that an arbitrary element can be removed without a need to
25706 + * traverse the list. New elements can be added to the list before or after
25707 + * an existing element, at the head of the list, or at the end of the list.
25708 + * A circle queue may be traversed in either direction, but has a more
25709 + * complex end of list detection.
25710 + *
25711 + * For details on the use of these macros, see the queue(3) manual page.
25712 + */
25713 +
25714 +/*
25715 + * Singly-linked List definitions.
25716 + */
25717 +#define SLIST_HEAD(name, type)                                         \
25718 +struct name {                                                          \
25719 +       struct type *slh_first; /* first element */                     \
25720 +}
25721
25722 +#define        SLIST_HEAD_INITIALIZER(head)                                    \
25723 +       { NULL }
25724 +
25725 +#ifndef WIN32
25726 +#define SLIST_ENTRY(type)                                              \
25727 +struct {                                                               \
25728 +       struct type *sle_next;  /* next element */                      \
25729 +}
25730 +#endif
25731 +
25732 +/*
25733 + * Singly-linked List access methods.
25734 + */
25735 +#define        SLIST_FIRST(head)       ((head)->slh_first)
25736 +#define        SLIST_END(head)         NULL
25737 +#define        SLIST_EMPTY(head)       (SLIST_FIRST(head) == SLIST_END(head))
25738 +#define        SLIST_NEXT(elm, field)  ((elm)->field.sle_next)
25739 +
25740 +#define        SLIST_FOREACH(var, head, field)                                 \
25741 +       for((var) = SLIST_FIRST(head);                                  \
25742 +           (var) != SLIST_END(head);                                   \
25743 +           (var) = SLIST_NEXT(var, field))
25744 +
25745 +/*
25746 + * Singly-linked List functions.
25747 + */
25748 +#define        SLIST_INIT(head) {                                              \
25749 +       SLIST_FIRST(head) = SLIST_END(head);                            \
25750 +}
25751 +
25752 +#define        SLIST_INSERT_AFTER(slistelm, elm, field) do {                   \
25753 +       (elm)->field.sle_next = (slistelm)->field.sle_next;             \
25754 +       (slistelm)->field.sle_next = (elm);                             \
25755 +} while (0)
25756 +
25757 +#define        SLIST_INSERT_HEAD(head, elm, field) do {                        \
25758 +       (elm)->field.sle_next = (head)->slh_first;                      \
25759 +       (head)->slh_first = (elm);                                      \
25760 +} while (0)
25761 +
25762 +#define        SLIST_REMOVE_HEAD(head, field) do {                             \
25763 +       (head)->slh_first = (head)->slh_first->field.sle_next;          \
25764 +} while (0)
25765 +
25766 +/*
25767 + * List definitions.
25768 + */
25769 +#define LIST_HEAD(name, type)                                          \
25770 +struct name {                                                          \
25771 +       struct type *lh_first;  /* first element */                     \
25772 +}
25773 +
25774 +#define LIST_HEAD_INITIALIZER(head)                                    \
25775 +       { NULL }
25776 +
25777 +#define LIST_ENTRY(type)                                               \
25778 +struct {                                                               \
25779 +       struct type *le_next;   /* next element */                      \
25780 +       struct type **le_prev;  /* address of previous next element */  \
25781 +}
25782 +
25783 +/*
25784 + * List access methods
25785 + */
25786 +#define        LIST_FIRST(head)                ((head)->lh_first)
25787 +#define        LIST_END(head)                  NULL
25788 +#define        LIST_EMPTY(head)                (LIST_FIRST(head) == LIST_END(head))
25789 +#define        LIST_NEXT(elm, field)           ((elm)->field.le_next)
25790 +
25791 +#define LIST_FOREACH(var, head, field)                                 \
25792 +       for((var) = LIST_FIRST(head);                                   \
25793 +           (var)!= LIST_END(head);                                     \
25794 +           (var) = LIST_NEXT(var, field))
25795 +
25796 +/*
25797 + * List functions.
25798 + */
25799 +#define        LIST_INIT(head) do {                                            \
25800 +       LIST_FIRST(head) = LIST_END(head);                              \
25801 +} while (0)
25802 +
25803 +#define LIST_INSERT_AFTER(listelm, elm, field) do {                    \
25804 +       if (((elm)->field.le_next = (listelm)->field.le_next) != NULL)  \
25805 +               (listelm)->field.le_next->field.le_prev =               \
25806 +                   &(elm)->field.le_next;                              \
25807 +       (listelm)->field.le_next = (elm);                               \
25808 +       (elm)->field.le_prev = &(listelm)->field.le_next;               \
25809 +} while (0)
25810 +
25811 +#define        LIST_INSERT_BEFORE(listelm, elm, field) do {                    \
25812 +       (elm)->field.le_prev = (listelm)->field.le_prev;                \
25813 +       (elm)->field.le_next = (listelm);                               \
25814 +       *(listelm)->field.le_prev = (elm);                              \
25815 +       (listelm)->field.le_prev = &(elm)->field.le_next;               \
25816 +} while (0)
25817 +
25818 +#define LIST_INSERT_HEAD(head, elm, field) do {                                \
25819 +       if (((elm)->field.le_next = (head)->lh_first) != NULL)          \
25820 +               (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
25821 +       (head)->lh_first = (elm);                                       \
25822 +       (elm)->field.le_prev = &(head)->lh_first;                       \
25823 +} while (0)
25824 +
25825 +#define LIST_REMOVE(elm, field) do {                                   \
25826 +       if ((elm)->field.le_next != NULL)                               \
25827 +               (elm)->field.le_next->field.le_prev =                   \
25828 +                   (elm)->field.le_prev;                               \
25829 +       *(elm)->field.le_prev = (elm)->field.le_next;                   \
25830 +} while (0)
25831 +
25832 +#define LIST_REPLACE(elm, elm2, field) do {                            \
25833 +       if (((elm2)->field.le_next = (elm)->field.le_next) != NULL)     \
25834 +               (elm2)->field.le_next->field.le_prev =                  \
25835 +                   &(elm2)->field.le_next;                             \
25836 +       (elm2)->field.le_prev = (elm)->field.le_prev;                   \
25837 +       *(elm2)->field.le_prev = (elm2);                                \
25838 +} while (0)
25839 +
25840 +/*
25841 + * Simple queue definitions.
25842 + */
25843 +#define SIMPLEQ_HEAD(name, type)                                       \
25844 +struct name {                                                          \
25845 +       struct type *sqh_first; /* first element */                     \
25846 +       struct type **sqh_last; /* addr of last next element */         \
25847 +}
25848 +
25849 +#define SIMPLEQ_HEAD_INITIALIZER(head)                                 \
25850 +       { NULL, &(head).sqh_first }
25851 +
25852 +#define SIMPLEQ_ENTRY(type)                                            \
25853 +struct {                                                               \
25854 +       struct type *sqe_next;  /* next element */                      \
25855 +}
25856 +
25857 +/*
25858 + * Simple queue access methods.
25859 + */
25860 +#define        SIMPLEQ_FIRST(head)         ((head)->sqh_first)
25861 +#define        SIMPLEQ_END(head)           NULL
25862 +#define        SIMPLEQ_EMPTY(head)         (SIMPLEQ_FIRST(head) == SIMPLEQ_END(head))
25863 +#define        SIMPLEQ_NEXT(elm, field)    ((elm)->field.sqe_next)
25864 +
25865 +#define SIMPLEQ_FOREACH(var, head, field)                              \
25866 +       for((var) = SIMPLEQ_FIRST(head);                                \
25867 +           (var) != SIMPLEQ_END(head);                                 \
25868 +           (var) = SIMPLEQ_NEXT(var, field))
25869 +
25870 +/*
25871 + * Simple queue functions.
25872 + */
25873 +#define        SIMPLEQ_INIT(head) do {                                         \
25874 +       (head)->sqh_first = NULL;                                       \
25875 +       (head)->sqh_last = &(head)->sqh_first;                          \
25876 +} while (0)
25877 +
25878 +#define SIMPLEQ_INSERT_HEAD(head, elm, field) do {                     \
25879 +       if (((elm)->field.sqe_next = (head)->sqh_first) == NULL)        \
25880 +               (head)->sqh_last = &(elm)->field.sqe_next;              \
25881 +       (head)->sqh_first = (elm);                                      \
25882 +} while (0)
25883 +
25884 +#define SIMPLEQ_INSERT_TAIL(head, elm, field) do {                     \
25885 +       (elm)->field.sqe_next = NULL;                                   \
25886 +       *(head)->sqh_last = (elm);                                      \
25887 +       (head)->sqh_last = &(elm)->field.sqe_next;                      \
25888 +} while (0)
25889 +
25890 +#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do {           \
25891 +       if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
25892 +               (head)->sqh_last = &(elm)->field.sqe_next;              \
25893 +       (listelm)->field.sqe_next = (elm);                              \
25894 +} while (0)
25895 +
25896 +#define SIMPLEQ_REMOVE_HEAD(head, elm, field) do {                     \
25897 +       if (((head)->sqh_first = (elm)->field.sqe_next) == NULL)        \
25898 +               (head)->sqh_last = &(head)->sqh_first;                  \
25899 +} while (0)
25900 +
25901 +/*
25902 + * Tail queue definitions.
25903 + */
25904 +#define TAILQ_HEAD(name, type)                                         \
25905 +struct name {                                                          \
25906 +       struct type *tqh_first; /* first element */                     \
25907 +       struct type **tqh_last; /* addr of last next element */         \
25908 +}
25909 +
25910 +#define TAILQ_HEAD_INITIALIZER(head)                                   \
25911 +       { NULL, &(head).tqh_first }
25912 +
25913 +#define TAILQ_ENTRY(type)                                              \
25914 +struct {                                                               \
25915 +       struct type *tqe_next;  /* next element */                      \
25916 +       struct type **tqe_prev; /* address of previous next element */  \
25917 +}
25918 +
25919 +/* 
25920 + * tail queue access methods 
25921 + */
25922 +#define        TAILQ_FIRST(head)               ((head)->tqh_first)
25923 +#define        TAILQ_END(head)                 NULL
25924 +#define        TAILQ_NEXT(elm, field)          ((elm)->field.tqe_next)
25925 +#define TAILQ_LAST(head, headname)                                     \
25926 +       (*(((struct headname *)((head)->tqh_last))->tqh_last))
25927 +/* XXX */
25928 +#define TAILQ_PREV(elm, headname, field)                               \
25929 +       (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
25930 +#define        TAILQ_EMPTY(head)                                               \
25931 +       (TAILQ_FIRST(head) == TAILQ_END(head))
25932 +
25933 +#define TAILQ_FOREACH(var, head, field)                                        \
25934 +       for((var) = TAILQ_FIRST(head);                                  \
25935 +           (var) != TAILQ_END(head);                                   \
25936 +           (var) = TAILQ_NEXT(var, field))
25937 +
25938 +#define TAILQ_FOREACH_REVERSE(var, head, field, headname)              \
25939 +       for((var) = TAILQ_LAST(head, headname);                         \
25940 +           (var) != TAILQ_END(head);                                   \
25941 +           (var) = TAILQ_PREV(var, headname, field))
25942 +
25943 +/*
25944 + * Tail queue functions.
25945 + */
25946 +#define        TAILQ_INIT(head) do {                                           \
25947 +       (head)->tqh_first = NULL;                                       \
25948 +       (head)->tqh_last = &(head)->tqh_first;                          \
25949 +} while (0)
25950 +
25951 +#define TAILQ_INSERT_HEAD(head, elm, field) do {                       \
25952 +       if (((elm)->field.tqe_next = (head)->tqh_first) != NULL)        \
25953 +               (head)->tqh_first->field.tqe_prev =                     \
25954 +                   &(elm)->field.tqe_next;                             \
25955 +       else                                                            \
25956 +               (head)->tqh_last = &(elm)->field.tqe_next;              \
25957 +       (head)->tqh_first = (elm);                                      \
25958 +       (elm)->field.tqe_prev = &(head)->tqh_first;                     \
25959 +} while (0)
25960 +
25961 +#define TAILQ_INSERT_TAIL(head, elm, field) do {                       \
25962 +       (elm)->field.tqe_next = NULL;                                   \
25963 +       (elm)->field.tqe_prev = (head)->tqh_last;                       \
25964 +       *(head)->tqh_last = (elm);                                      \
25965 +       (head)->tqh_last = &(elm)->field.tqe_next;                      \
25966 +} while (0)
25967 +
25968 +#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do {             \
25969 +       if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
25970 +               (elm)->field.tqe_next->field.tqe_prev =                 \
25971 +                   &(elm)->field.tqe_next;                             \
25972 +       else                                                            \
25973 +               (head)->tqh_last = &(elm)->field.tqe_next;              \
25974 +       (listelm)->field.tqe_next = (elm);                              \
25975 +       (elm)->field.tqe_prev = &(listelm)->field.tqe_next;             \
25976 +} while (0)
25977 +
25978 +#define        TAILQ_INSERT_BEFORE(listelm, elm, field) do {                   \
25979 +       (elm)->field.tqe_prev = (listelm)->field.tqe_prev;              \
25980 +       (elm)->field.tqe_next = (listelm);                              \
25981 +       *(listelm)->field.tqe_prev = (elm);                             \
25982 +       (listelm)->field.tqe_prev = &(elm)->field.tqe_next;             \
25983 +} while (0)
25984 +
25985 +#define TAILQ_REMOVE(head, elm, field) do {                            \
25986 +       if (((elm)->field.tqe_next) != NULL)                            \
25987 +               (elm)->field.tqe_next->field.tqe_prev =                 \
25988 +                   (elm)->field.tqe_prev;                              \
25989 +       else                                                            \
25990 +               (head)->tqh_last = (elm)->field.tqe_prev;               \
25991 +       *(elm)->field.tqe_prev = (elm)->field.tqe_next;                 \
25992 +} while (0)
25993 +
25994 +#define TAILQ_REPLACE(head, elm, elm2, field) do {                     \
25995 +       if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL)   \
25996 +               (elm2)->field.tqe_next->field.tqe_prev =                \
25997 +                   &(elm2)->field.tqe_next;                            \
25998 +       else                                                            \
25999 +               (head)->tqh_last = &(elm2)->field.tqe_next;             \
26000 +       (elm2)->field.tqe_prev = (elm)->field.tqe_prev;                 \
26001 +       *(elm2)->field.tqe_prev = (elm2);                               \
26002 +} while (0)
26003 +
26004 +/*
26005 + * Circular queue definitions.
26006 + */
26007 +#define CIRCLEQ_HEAD(name, type)                                       \
26008 +struct name {                                                          \
26009 +       struct type *cqh_first;         /* first element */             \
26010 +       struct type *cqh_last;          /* last element */              \
26011 +}
26012 +
26013 +#define CIRCLEQ_HEAD_INITIALIZER(head)                                 \
26014 +       { CIRCLEQ_END(&head), CIRCLEQ_END(&head) }
26015 +
26016 +#define CIRCLEQ_ENTRY(type)                                            \
26017 +struct {                                                               \
26018 +       struct type *cqe_next;          /* next element */              \
26019 +       struct type *cqe_prev;          /* previous element */          \
26020 +}
26021 +
26022 +/*
26023 + * Circular queue access methods 
26024 + */
26025 +#define        CIRCLEQ_FIRST(head)             ((head)->cqh_first)
26026 +#define        CIRCLEQ_LAST(head)              ((head)->cqh_last)
26027 +#define        CIRCLEQ_END(head)               ((void *)(head))
26028 +#define        CIRCLEQ_NEXT(elm, field)        ((elm)->field.cqe_next)
26029 +#define        CIRCLEQ_PREV(elm, field)        ((elm)->field.cqe_prev)
26030 +#define        CIRCLEQ_EMPTY(head)                                             \
26031 +       (CIRCLEQ_FIRST(head) == CIRCLEQ_END(head))
26032 +
26033 +#define CIRCLEQ_FOREACH(var, head, field)                              \
26034 +       for((var) = CIRCLEQ_FIRST(head);                                \
26035 +           (var) != CIRCLEQ_END(head);                                 \
26036 +           (var) = CIRCLEQ_NEXT(var, field))
26037 +
26038 +#define CIRCLEQ_FOREACH_REVERSE(var, head, field)                      \
26039 +       for((var) = CIRCLEQ_LAST(head);                                 \
26040 +           (var) != CIRCLEQ_END(head);                                 \
26041 +           (var) = CIRCLEQ_PREV(var, field))
26042 +
26043 +/*
26044 + * Circular queue functions.
26045 + */
26046 +#define        CIRCLEQ_INIT(head) do {                                         \
26047 +       (head)->cqh_first = CIRCLEQ_END(head);                          \
26048 +       (head)->cqh_last = CIRCLEQ_END(head);                           \
26049 +} while (0)
26050 +
26051 +#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do {           \
26052 +       (elm)->field.cqe_next = (listelm)->field.cqe_next;              \
26053 +       (elm)->field.cqe_prev = (listelm);                              \
26054 +       if ((listelm)->field.cqe_next == CIRCLEQ_END(head))             \
26055 +               (head)->cqh_last = (elm);                               \
26056 +       else                                                            \
26057 +               (listelm)->field.cqe_next->field.cqe_prev = (elm);      \
26058 +       (listelm)->field.cqe_next = (elm);                              \
26059 +} while (0)
26060 +
26061 +#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do {          \
26062 +       (elm)->field.cqe_next = (listelm);                              \
26063 +       (elm)->field.cqe_prev = (listelm)->field.cqe_prev;              \
26064 +       if ((listelm)->field.cqe_prev == CIRCLEQ_END(head))             \
26065 +               (head)->cqh_first = (elm);                              \
26066 +       else                                                            \
26067 +               (listelm)->field.cqe_prev->field.cqe_next = (elm);      \
26068 +       (listelm)->field.cqe_prev = (elm);                              \
26069 +} while (0)
26070 +
26071 +#define CIRCLEQ_INSERT_HEAD(head, elm, field) do {                     \
26072 +       (elm)->field.cqe_next = (head)->cqh_first;                      \
26073 +       (elm)->field.cqe_prev = CIRCLEQ_END(head);                      \
26074 +       if ((head)->cqh_last == CIRCLEQ_END(head))                      \
26075 +               (head)->cqh_last = (elm);                               \
26076 +       else                                                            \
26077 +               (head)->cqh_first->field.cqe_prev = (elm);              \
26078 +       (head)->cqh_first = (elm);                                      \
26079 +} while (0)
26080 +
26081 +#define CIRCLEQ_INSERT_TAIL(head, elm, field) do {                     \
26082 +       (elm)->field.cqe_next = CIRCLEQ_END(head);                      \
26083 +       (elm)->field.cqe_prev = (head)->cqh_last;                       \
26084 +       if ((head)->cqh_first == CIRCLEQ_END(head))                     \
26085 +               (head)->cqh_first = (elm);                              \
26086 +       else                                                            \
26087 +               (head)->cqh_last->field.cqe_next = (elm);               \
26088 +       (head)->cqh_last = (elm);                                       \
26089 +} while (0)
26090 +
26091 +#define        CIRCLEQ_REMOVE(head, elm, field) do {                           \
26092 +       if ((elm)->field.cqe_next == CIRCLEQ_END(head))                 \
26093 +               (head)->cqh_last = (elm)->field.cqe_prev;               \
26094 +       else                                                            \
26095 +               (elm)->field.cqe_next->field.cqe_prev =                 \
26096 +                   (elm)->field.cqe_prev;                              \
26097 +       if ((elm)->field.cqe_prev == CIRCLEQ_END(head))                 \
26098 +               (head)->cqh_first = (elm)->field.cqe_next;              \
26099 +       else                                                            \
26100 +               (elm)->field.cqe_prev->field.cqe_next =                 \
26101 +                   (elm)->field.cqe_next;                              \
26102 +} while (0)
26103 +
26104 +#define CIRCLEQ_REPLACE(head, elm, elm2, field) do {                   \
26105 +       if (((elm2)->field.cqe_next = (elm)->field.cqe_next) ==         \
26106 +           CIRCLEQ_END(head))                                          \
26107 +               (head).cqh_last = (elm2);                               \
26108 +       else                                                            \
26109 +               (elm2)->field.cqe_next->field.cqe_prev = (elm2);        \
26110 +       if (((elm2)->field.cqe_prev = (elm)->field.cqe_prev) ==         \
26111 +           CIRCLEQ_END(head))                                          \
26112 +               (head).cqh_first = (elm2);                              \
26113 +       else                                                            \
26114 +               (elm2)->field.cqe_prev->field.cqe_next = (elm2);        \
26115 +} while (0)
26116 +
26117 +#endif /* !_SYS_QUEUE_H_ */
26118 diff -Nru php-5.2.4.vanilla/libevent/compat/sys/_time.h php-5.2.4.fpm/libevent/compat/sys/_time.h
26119 --- php-5.2.4.vanilla/libevent/compat/sys/_time.h       1970-01-01 03:00:00.000000000 +0300
26120 +++ php-5.2.4.fpm/libevent/compat/sys/_time.h   2007-08-31 15:47:19.000000000 +0400
26121 @@ -0,0 +1,163 @@
26122 +/*     $OpenBSD: time.h,v 1.11 2000/10/10 13:36:48 itojun Exp $        */
26123 +/*     $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $        */
26124 +
26125 +/*
26126 + * Copyright (c) 1982, 1986, 1993
26127 + *     The Regents of the University of California.  All rights reserved.
26128 + *
26129 + * Redistribution and use in source and binary forms, with or without
26130 + * modification, are permitted provided that the following conditions
26131 + * are met:
26132 + * 1. Redistributions of source code must retain the above copyright
26133 + *    notice, this list of conditions and the following disclaimer.
26134 + * 2. Redistributions in binary form must reproduce the above copyright
26135 + *    notice, this list of conditions and the following disclaimer in the
26136 + *    documentation and/or other materials provided with the distribution.
26137 + * 3. Neither the name of the University nor the names of its contributors
26138 + *    may be used to endorse or promote products derived from this software
26139 + *    without specific prior written permission.
26140 + *
26141 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26142 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26143 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26144 + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26145 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26146 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26147 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26148 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26149 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26150 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26151 + * SUCH DAMAGE.
26152 + *
26153 + *     @(#)time.h      8.2 (Berkeley) 7/10/94
26154 + */
26155 +
26156 +#ifndef _SYS_TIME_H_
26157 +#define _SYS_TIME_H_
26158 +
26159 +#include <sys/types.h>
26160 +
26161 +/*
26162 + * Structure returned by gettimeofday(2) system call,
26163 + * and used in other calls.
26164 + */
26165 +struct timeval {
26166 +       long    tv_sec;         /* seconds */
26167 +       long    tv_usec;        /* and microseconds */
26168 +};
26169 +
26170 +/*
26171 + * Structure defined by POSIX.1b to be like a timeval.
26172 + */
26173 +struct timespec {
26174 +       time_t  tv_sec;         /* seconds */
26175 +       long    tv_nsec;        /* and nanoseconds */
26176 +};
26177 +
26178 +#define        TIMEVAL_TO_TIMESPEC(tv, ts) {                                   \
26179 +       (ts)->tv_sec = (tv)->tv_sec;                                    \
26180 +       (ts)->tv_nsec = (tv)->tv_usec * 1000;                           \
26181 +}
26182 +#define        TIMESPEC_TO_TIMEVAL(tv, ts) {                                   \
26183 +       (tv)->tv_sec = (ts)->tv_sec;                                    \
26184 +       (tv)->tv_usec = (ts)->tv_nsec / 1000;                           \
26185 +}
26186 +
26187 +struct timezone {
26188 +       int     tz_minuteswest; /* minutes west of Greenwich */
26189 +       int     tz_dsttime;     /* type of dst correction */
26190 +};
26191 +#define        DST_NONE        0       /* not on dst */
26192 +#define        DST_USA         1       /* USA style dst */
26193 +#define        DST_AUST        2       /* Australian style dst */
26194 +#define        DST_WET         3       /* Western European dst */
26195 +#define        DST_MET         4       /* Middle European dst */
26196 +#define        DST_EET         5       /* Eastern European dst */
26197 +#define        DST_CAN         6       /* Canada */
26198 +
26199 +/* Operations on timevals. */
26200 +#define        timerclear(tvp)         (tvp)->tv_sec = (tvp)->tv_usec = 0
26201 +#define        timerisset(tvp)         ((tvp)->tv_sec || (tvp)->tv_usec)
26202 +#define        timercmp(tvp, uvp, cmp)                                         \
26203 +       (((tvp)->tv_sec == (uvp)->tv_sec) ?                             \
26204 +           ((tvp)->tv_usec cmp (uvp)->tv_usec) :                       \
26205 +           ((tvp)->tv_sec cmp (uvp)->tv_sec))
26206 +#define        timeradd(tvp, uvp, vvp)                                         \
26207 +       do {                                                            \
26208 +               (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec;          \
26209 +               (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec;       \
26210 +               if ((vvp)->tv_usec >= 1000000) {                        \
26211 +                       (vvp)->tv_sec++;                                \
26212 +                       (vvp)->tv_usec -= 1000000;                      \
26213 +               }                                                       \
26214 +       } while (0)
26215 +#define        timersub(tvp, uvp, vvp)                                         \
26216 +       do {                                                            \
26217 +               (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec;          \
26218 +               (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec;       \
26219 +               if ((vvp)->tv_usec < 0) {                               \
26220 +                       (vvp)->tv_sec--;                                \
26221 +                       (vvp)->tv_usec += 1000000;                      \
26222 +               }                                                       \
26223 +       } while (0)
26224 +
26225 +/* Operations on timespecs. */
26226 +#define        timespecclear(tsp)              (tsp)->tv_sec = (tsp)->tv_nsec = 0
26227 +#define        timespecisset(tsp)              ((tsp)->tv_sec || (tsp)->tv_nsec)
26228 +#define        timespeccmp(tsp, usp, cmp)                                      \
26229 +       (((tsp)->tv_sec == (usp)->tv_sec) ?                             \
26230 +           ((tsp)->tv_nsec cmp (usp)->tv_nsec) :                       \
26231 +           ((tsp)->tv_sec cmp (usp)->tv_sec))
26232 +#define        timespecadd(tsp, usp, vsp)                                      \
26233 +       do {                                                            \
26234 +               (vsp)->tv_sec = (tsp)->tv_sec + (usp)->tv_sec;          \
26235 +               (vsp)->tv_nsec = (tsp)->tv_nsec + (usp)->tv_nsec;       \
26236 +               if ((vsp)->tv_nsec >= 1000000000L) {                    \
26237 +                       (vsp)->tv_sec++;                                \
26238 +                       (vsp)->tv_nsec -= 1000000000L;                  \
26239 +               }                                                       \
26240 +       } while (0)
26241 +#define        timespecsub(tsp, usp, vsp)                                      \
26242 +       do {                                                            \
26243 +               (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec;          \
26244 +               (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec;       \
26245 +               if ((vsp)->tv_nsec < 0) {                               \
26246 +                       (vsp)->tv_sec--;                                \
26247 +                       (vsp)->tv_nsec += 1000000000L;                  \
26248 +               }                                                       \
26249 +       } while (0)
26250 +
26251 +/*
26252 + * Names of the interval timers, and structure
26253 + * defining a timer setting.
26254 + */
26255 +#define        ITIMER_REAL     0
26256 +#define        ITIMER_VIRTUAL  1
26257 +#define        ITIMER_PROF     2
26258 +
26259 +struct itimerval {
26260 +       struct  timeval it_interval;    /* timer interval */
26261 +       struct  timeval it_value;       /* current value */
26262 +};
26263 +
26264 +/*
26265 + * Getkerninfo clock information structure
26266 + */
26267 +struct clockinfo {
26268 +       int     hz;             /* clock frequency */
26269 +       int     tick;           /* micro-seconds per hz tick */
26270 +       int     tickadj;        /* clock skew rate for adjtime() */
26271 +       int     stathz;         /* statistics clock frequency */
26272 +       int     profhz;         /* profiling clock frequency */
26273 +};
26274 +
26275 +#define CLOCK_REALTIME 0
26276 +#define CLOCK_VIRTUAL  1
26277 +#define CLOCK_PROF     2
26278 +
26279 +#define TIMER_RELTIME  0x0     /* relative timer */
26280 +#define TIMER_ABSTIME  0x1     /* absolute timer */
26281 +
26282 +/* --- stuff got cut here - niels --- */
26283 +
26284 +#endif /* !_SYS_TIME_H_ */
26285 diff -Nru php-5.2.4.vanilla/libevent/compat/sys/tree.h php-5.2.4.fpm/libevent/compat/sys/tree.h
26286 --- php-5.2.4.vanilla/libevent/compat/sys/tree.h        1970-01-01 03:00:00.000000000 +0300
26287 +++ php-5.2.4.fpm/libevent/compat/sys/tree.h    2007-08-31 15:47:19.000000000 +0400
26288 @@ -0,0 +1,677 @@
26289 +/*     $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $    */
26290 +/*
26291 + * Copyright 2002 Niels Provos <provos@citi.umich.edu>
26292 + * All rights reserved.
26293 + *
26294 + * Redistribution and use in source and binary forms, with or without
26295 + * modification, are permitted provided that the following conditions
26296 + * are met:
26297 + * 1. Redistributions of source code must retain the above copyright
26298 + *    notice, this list of conditions and the following disclaimer.
26299 + * 2. Redistributions in binary form must reproduce the above copyright
26300 + *    notice, this list of conditions and the following disclaimer in the
26301 + *    documentation and/or other materials provided with the distribution.
26302 + *
26303 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26304 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26305 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26306 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26307 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26308 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26309 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26310 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26311 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26312 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26313 + */
26314 +
26315 +#ifndef        _SYS_TREE_H_
26316 +#define        _SYS_TREE_H_
26317 +
26318 +/*
26319 + * This file defines data structures for different types of trees:
26320 + * splay trees and red-black trees.
26321 + *
26322 + * A splay tree is a self-organizing data structure.  Every operation
26323 + * on the tree causes a splay to happen.  The splay moves the requested
26324 + * node to the root of the tree and partly rebalances it.
26325 + *
26326 + * This has the benefit that request locality causes faster lookups as
26327 + * the requested nodes move to the top of the tree.  On the other hand,
26328 + * every lookup causes memory writes.
26329 + *
26330 + * The Balance Theorem bounds the total access time for m operations
26331 + * and n inserts on an initially empty tree as O((m + n)lg n).  The
26332 + * amortized cost for a sequence of m accesses to a splay tree is O(lg n);
26333 + *
26334 + * A red-black tree is a binary search tree with the node color as an
26335 + * extra attribute.  It fulfills a set of conditions:
26336 + *     - every search path from the root to a leaf consists of the
26337 + *       same number of black nodes,
26338 + *     - each red node (except for the root) has a black parent,
26339 + *     - each leaf node is black.
26340 + *
26341 + * Every operation on a red-black tree is bounded as O(lg n).
26342 + * The maximum height of a red-black tree is 2lg (n+1).
26343 + */
26344 +
26345 +#define SPLAY_HEAD(name, type)                                         \
26346 +struct name {                                                          \
26347 +       struct type *sph_root; /* root of the tree */                   \
26348 +}
26349 +
26350 +#define SPLAY_INITIALIZER(root)                                                \
26351 +       { NULL }
26352 +
26353 +#define SPLAY_INIT(root) do {                                          \
26354 +       (root)->sph_root = NULL;                                        \
26355 +} while (0)
26356 +
26357 +#define SPLAY_ENTRY(type)                                              \
26358 +struct {                                                               \
26359 +       struct type *spe_left; /* left element */                       \
26360 +       struct type *spe_right; /* right element */                     \
26361 +}
26362 +
26363 +#define SPLAY_LEFT(elm, field)         (elm)->field.spe_left
26364 +#define SPLAY_RIGHT(elm, field)                (elm)->field.spe_right
26365 +#define SPLAY_ROOT(head)               (head)->sph_root
26366 +#define SPLAY_EMPTY(head)              (SPLAY_ROOT(head) == NULL)
26367 +
26368 +/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */
26369 +#define SPLAY_ROTATE_RIGHT(head, tmp, field) do {                      \
26370 +       SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field);  \
26371 +       SPLAY_RIGHT(tmp, field) = (head)->sph_root;                     \
26372 +       (head)->sph_root = tmp;                                         \
26373 +} while (0)
26374 +       
26375 +#define SPLAY_ROTATE_LEFT(head, tmp, field) do {                       \
26376 +       SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field);  \
26377 +       SPLAY_LEFT(tmp, field) = (head)->sph_root;                      \
26378 +       (head)->sph_root = tmp;                                         \
26379 +} while (0)
26380 +
26381 +#define SPLAY_LINKLEFT(head, tmp, field) do {                          \
26382 +       SPLAY_LEFT(tmp, field) = (head)->sph_root;                      \
26383 +       tmp = (head)->sph_root;                                         \
26384 +       (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);         \
26385 +} while (0)
26386 +
26387 +#define SPLAY_LINKRIGHT(head, tmp, field) do {                         \
26388 +       SPLAY_RIGHT(tmp, field) = (head)->sph_root;                     \
26389 +       tmp = (head)->sph_root;                                         \
26390 +       (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);        \
26391 +} while (0)
26392 +
26393 +#define SPLAY_ASSEMBLE(head, node, left, right, field) do {            \
26394 +       SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \
26395 +       SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\
26396 +       SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \
26397 +       SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \
26398 +} while (0)
26399 +
26400 +/* Generates prototypes and inline functions */
26401 +
26402 +#define SPLAY_PROTOTYPE(name, type, field, cmp)                                \
26403 +void name##_SPLAY(struct name *, struct type *);                       \
26404 +void name##_SPLAY_MINMAX(struct name *, int);                          \
26405 +struct type *name##_SPLAY_INSERT(struct name *, struct type *);                \
26406 +struct type *name##_SPLAY_REMOVE(struct name *, struct type *);                \
26407 +                                                                       \
26408 +/* Finds the node with the same key as elm */                          \
26409 +static __inline struct type *                                          \
26410 +name##_SPLAY_FIND(struct name *head, struct type *elm)                 \
26411 +{                                                                      \
26412 +       if (SPLAY_EMPTY(head))                                          \
26413 +               return(NULL);                                           \
26414 +       name##_SPLAY(head, elm);                                        \
26415 +       if ((cmp)(elm, (head)->sph_root) == 0)                          \
26416 +               return (head->sph_root);                                \
26417 +       return (NULL);                                                  \
26418 +}                                                                      \
26419 +                                                                       \
26420 +static __inline struct type *                                          \
26421 +name##_SPLAY_NEXT(struct name *head, struct type *elm)                 \
26422 +{                                                                      \
26423 +       name##_SPLAY(head, elm);                                        \
26424 +       if (SPLAY_RIGHT(elm, field) != NULL) {                          \
26425 +               elm = SPLAY_RIGHT(elm, field);                          \
26426 +               while (SPLAY_LEFT(elm, field) != NULL) {                \
26427 +                       elm = SPLAY_LEFT(elm, field);                   \
26428 +               }                                                       \
26429 +       } else                                                          \
26430 +               elm = NULL;                                             \
26431 +       return (elm);                                                   \
26432 +}                                                                      \
26433 +                                                                       \
26434 +static __inline struct type *                                          \
26435 +name##_SPLAY_MIN_MAX(struct name *head, int val)                       \
26436 +{                                                                      \
26437 +       name##_SPLAY_MINMAX(head, val);                                 \
26438 +        return (SPLAY_ROOT(head));                                     \
26439 +}
26440 +
26441 +/* Main splay operation.
26442 + * Moves node close to the key of elm to top
26443 + */
26444 +#define SPLAY_GENERATE(name, type, field, cmp)                         \
26445 +struct type *                                                          \
26446 +name##_SPLAY_INSERT(struct name *head, struct type *elm)               \
26447 +{                                                                      \
26448 +    if (SPLAY_EMPTY(head)) {                                           \
26449 +           SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL;    \
26450 +    } else {                                                           \
26451 +           int __comp;                                                 \
26452 +           name##_SPLAY(head, elm);                                    \
26453 +           __comp = (cmp)(elm, (head)->sph_root);                      \
26454 +           if(__comp < 0) {                                            \
26455 +                   SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\
26456 +                   SPLAY_RIGHT(elm, field) = (head)->sph_root;         \
26457 +                   SPLAY_LEFT((head)->sph_root, field) = NULL;         \
26458 +           } else if (__comp > 0) {                                    \
26459 +                   SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\
26460 +                   SPLAY_LEFT(elm, field) = (head)->sph_root;          \
26461 +                   SPLAY_RIGHT((head)->sph_root, field) = NULL;        \
26462 +           } else                                                      \
26463 +                   return ((head)->sph_root);                          \
26464 +    }                                                                  \
26465 +    (head)->sph_root = (elm);                                          \
26466 +    return (NULL);                                                     \
26467 +}                                                                      \
26468 +                                                                       \
26469 +struct type *                                                          \
26470 +name##_SPLAY_REMOVE(struct name *head, struct type *elm)               \
26471 +{                                                                      \
26472 +       struct type *__tmp;                                             \
26473 +       if (SPLAY_EMPTY(head))                                          \
26474 +               return (NULL);                                          \
26475 +       name##_SPLAY(head, elm);                                        \
26476 +       if ((cmp)(elm, (head)->sph_root) == 0) {                        \
26477 +               if (SPLAY_LEFT((head)->sph_root, field) == NULL) {      \
26478 +                       (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\
26479 +               } else {                                                \
26480 +                       __tmp = SPLAY_RIGHT((head)->sph_root, field);   \
26481 +                       (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\
26482 +                       name##_SPLAY(head, elm);                        \
26483 +                       SPLAY_RIGHT((head)->sph_root, field) = __tmp;   \
26484 +               }                                                       \
26485 +               return (elm);                                           \
26486 +       }                                                               \
26487 +       return (NULL);                                                  \
26488 +}                                                                      \
26489 +                                                                       \
26490 +void                                                                   \
26491 +name##_SPLAY(struct name *head, struct type *elm)                      \
26492 +{                                                                      \
26493 +       struct type __node, *__left, *__right, *__tmp;                  \
26494 +       int __comp;                                                     \
26495 +\
26496 +       SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
26497 +       __left = __right = &__node;                                     \
26498 +\
26499 +       while ((__comp = (cmp)(elm, (head)->sph_root))) {               \
26500 +               if (__comp < 0) {                                       \
26501 +                       __tmp = SPLAY_LEFT((head)->sph_root, field);    \
26502 +                       if (__tmp == NULL)                              \
26503 +                               break;                                  \
26504 +                       if ((cmp)(elm, __tmp) < 0){                     \
26505 +                               SPLAY_ROTATE_RIGHT(head, __tmp, field); \
26506 +                               if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
26507 +                                       break;                          \
26508 +                       }                                               \
26509 +                       SPLAY_LINKLEFT(head, __right, field);           \
26510 +               } else if (__comp > 0) {                                \
26511 +                       __tmp = SPLAY_RIGHT((head)->sph_root, field);   \
26512 +                       if (__tmp == NULL)                              \
26513 +                               break;                                  \
26514 +                       if ((cmp)(elm, __tmp) > 0){                     \
26515 +                               SPLAY_ROTATE_LEFT(head, __tmp, field);  \
26516 +                               if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
26517 +                                       break;                          \
26518 +                       }                                               \
26519 +                       SPLAY_LINKRIGHT(head, __left, field);           \
26520 +               }                                                       \
26521 +       }                                                               \
26522 +       SPLAY_ASSEMBLE(head, &__node, __left, __right, field);          \
26523 +}                                                                      \
26524 +                                                                       \
26525 +/* Splay with either the minimum or the maximum element                        \
26526 + * Used to find minimum or maximum element in tree.                    \
26527 + */                                                                    \
26528 +void name##_SPLAY_MINMAX(struct name *head, int __comp) \
26529 +{                                                                      \
26530 +       struct type __node, *__left, *__right, *__tmp;                  \
26531 +\
26532 +       SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
26533 +       __left = __right = &__node;                                     \
26534 +\
26535 +       while (1) {                                                     \
26536 +               if (__comp < 0) {                                       \
26537 +                       __tmp = SPLAY_LEFT((head)->sph_root, field);    \
26538 +                       if (__tmp == NULL)                              \
26539 +                               break;                                  \
26540 +                       if (__comp < 0){                                \
26541 +                               SPLAY_ROTATE_RIGHT(head, __tmp, field); \
26542 +                               if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
26543 +                                       break;                          \
26544 +                       }                                               \
26545 +                       SPLAY_LINKLEFT(head, __right, field);           \
26546 +               } else if (__comp > 0) {                                \
26547 +                       __tmp = SPLAY_RIGHT((head)->sph_root, field);   \
26548 +                       if (__tmp == NULL)                              \
26549 +                               break;                                  \
26550 +                       if (__comp > 0) {                               \
26551 +                               SPLAY_ROTATE_LEFT(head, __tmp, field);  \
26552 +                               if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
26553 +                                       break;                          \
26554 +                       }                                               \
26555 +                       SPLAY_LINKRIGHT(head, __left, field);           \
26556 +               }                                                       \
26557 +       }                                                               \
26558 +       SPLAY_ASSEMBLE(head, &__node, __left, __right, field);          \
26559 +}
26560 +
26561 +#define SPLAY_NEGINF   -1
26562 +#define SPLAY_INF      1
26563 +
26564 +#define SPLAY_INSERT(name, x, y)       name##_SPLAY_INSERT(x, y)
26565 +#define SPLAY_REMOVE(name, x, y)       name##_SPLAY_REMOVE(x, y)
26566 +#define SPLAY_FIND(name, x, y)         name##_SPLAY_FIND(x, y)
26567 +#define SPLAY_NEXT(name, x, y)         name##_SPLAY_NEXT(x, y)
26568 +#define SPLAY_MIN(name, x)             (SPLAY_EMPTY(x) ? NULL  \
26569 +                                       : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
26570 +#define SPLAY_MAX(name, x)             (SPLAY_EMPTY(x) ? NULL  \
26571 +                                       : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
26572 +
26573 +#define SPLAY_FOREACH(x, name, head)                                   \
26574 +       for ((x) = SPLAY_MIN(name, head);                               \
26575 +            (x) != NULL;                                               \
26576 +            (x) = SPLAY_NEXT(name, head, x))
26577 +
26578 +/* Macros that define a red-back tree */
26579 +#define RB_HEAD(name, type)                                            \
26580 +struct name {                                                          \
26581 +       struct type *rbh_root; /* root of the tree */                   \
26582 +}
26583 +
26584 +#define RB_INITIALIZER(root)                                           \
26585 +       { NULL }
26586 +
26587 +#define RB_INIT(root) do {                                             \
26588 +       (root)->rbh_root = NULL;                                        \
26589 +} while (0)
26590 +
26591 +#define RB_BLACK       0
26592 +#define RB_RED         1
26593 +#define RB_ENTRY(type)                                                 \
26594 +struct {                                                               \
26595 +       struct type *rbe_left;          /* left element */              \
26596 +       struct type *rbe_right;         /* right element */             \
26597 +       struct type *rbe_parent;        /* parent element */            \
26598 +       int rbe_color;                  /* node color */                \
26599 +}
26600 +
26601 +#define RB_LEFT(elm, field)            (elm)->field.rbe_left
26602 +#define RB_RIGHT(elm, field)           (elm)->field.rbe_right
26603 +#define RB_PARENT(elm, field)          (elm)->field.rbe_parent
26604 +#define RB_COLOR(elm, field)           (elm)->field.rbe_color
26605 +#define RB_ROOT(head)                  (head)->rbh_root
26606 +#define RB_EMPTY(head)                 (RB_ROOT(head) == NULL)
26607 +
26608 +#define RB_SET(elm, parent, field) do {                                        \
26609 +       RB_PARENT(elm, field) = parent;                                 \
26610 +       RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL;              \
26611 +       RB_COLOR(elm, field) = RB_RED;                                  \
26612 +} while (0)
26613 +
26614 +#define RB_SET_BLACKRED(black, red, field) do {                                \
26615 +       RB_COLOR(black, field) = RB_BLACK;                              \
26616 +       RB_COLOR(red, field) = RB_RED;                                  \
26617 +} while (0)
26618 +
26619 +#ifndef RB_AUGMENT
26620 +#define RB_AUGMENT(x)
26621 +#endif
26622 +
26623 +#define RB_ROTATE_LEFT(head, elm, tmp, field) do {                     \
26624 +       (tmp) = RB_RIGHT(elm, field);                                   \
26625 +       if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field))) {             \
26626 +               RB_PARENT(RB_LEFT(tmp, field), field) = (elm);          \
26627 +       }                                                               \
26628 +       RB_AUGMENT(elm);                                                \
26629 +       if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) {          \
26630 +               if ((elm) == RB_LEFT(RB_PARENT(elm, field), field))     \
26631 +                       RB_LEFT(RB_PARENT(elm, field), field) = (tmp);  \
26632 +               else                                                    \
26633 +                       RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
26634 +       } else                                                          \
26635 +               (head)->rbh_root = (tmp);                               \
26636 +       RB_LEFT(tmp, field) = (elm);                                    \
26637 +       RB_PARENT(elm, field) = (tmp);                                  \
26638 +       RB_AUGMENT(tmp);                                                \
26639 +       if ((RB_PARENT(tmp, field)))                                    \
26640 +               RB_AUGMENT(RB_PARENT(tmp, field));                      \
26641 +} while (0)
26642 +
26643 +#define RB_ROTATE_RIGHT(head, elm, tmp, field) do {                    \
26644 +       (tmp) = RB_LEFT(elm, field);                                    \
26645 +       if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field))) {             \
26646 +               RB_PARENT(RB_RIGHT(tmp, field), field) = (elm);         \
26647 +       }                                                               \
26648 +       RB_AUGMENT(elm);                                                \
26649 +       if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) {          \
26650 +               if ((elm) == RB_LEFT(RB_PARENT(elm, field), field))     \
26651 +                       RB_LEFT(RB_PARENT(elm, field), field) = (tmp);  \
26652 +               else                                                    \
26653 +                       RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
26654 +       } else                                                          \
26655 +               (head)->rbh_root = (tmp);                               \
26656 +       RB_RIGHT(tmp, field) = (elm);                                   \
26657 +       RB_PARENT(elm, field) = (tmp);                                  \
26658 +       RB_AUGMENT(tmp);                                                \
26659 +       if ((RB_PARENT(tmp, field)))                                    \
26660 +               RB_AUGMENT(RB_PARENT(tmp, field));                      \
26661 +} while (0)
26662 +
26663 +/* Generates prototypes and inline functions */
26664 +#define RB_PROTOTYPE(name, type, field, cmp)                           \
26665 +void name##_RB_INSERT_COLOR(struct name *, struct type *);     \
26666 +void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
26667 +struct type *name##_RB_REMOVE(struct name *, struct type *);           \
26668 +struct type *name##_RB_INSERT(struct name *, struct type *);           \
26669 +struct type *name##_RB_FIND(struct name *, struct type *);             \
26670 +struct type *name##_RB_NEXT(struct type *);                            \
26671 +struct type *name##_RB_MINMAX(struct name *, int);                     \
26672 +                                                                       \
26673 +
26674 +/* Main rb operation.
26675 + * Moves node close to the key of elm to top
26676 + */
26677 +#define RB_GENERATE(name, type, field, cmp)                            \
26678 +void                                                                   \
26679 +name##_RB_INSERT_COLOR(struct name *head, struct type *elm)            \
26680 +{                                                                      \
26681 +       struct type *parent, *gparent, *tmp;                            \
26682 +       while ((parent = RB_PARENT(elm, field)) &&                      \
26683 +           RB_COLOR(parent, field) == RB_RED) {                        \
26684 +               gparent = RB_PARENT(parent, field);                     \
26685 +               if (parent == RB_LEFT(gparent, field)) {                \
26686 +                       tmp = RB_RIGHT(gparent, field);                 \
26687 +                       if (tmp && RB_COLOR(tmp, field) == RB_RED) {    \
26688 +                               RB_COLOR(tmp, field) = RB_BLACK;        \
26689 +                               RB_SET_BLACKRED(parent, gparent, field);\
26690 +                               elm = gparent;                          \
26691 +                               continue;                               \
26692 +                       }                                               \
26693 +                       if (RB_RIGHT(parent, field) == elm) {           \
26694 +                               RB_ROTATE_LEFT(head, parent, tmp, field);\
26695 +                               tmp = parent;                           \
26696 +                               parent = elm;                           \
26697 +                               elm = tmp;                              \
26698 +                       }                                               \
26699 +                       RB_SET_BLACKRED(parent, gparent, field);        \
26700 +                       RB_ROTATE_RIGHT(head, gparent, tmp, field);     \
26701 +               } else {                                                \
26702 +                       tmp = RB_LEFT(gparent, field);                  \
26703 +                       if (tmp && RB_COLOR(tmp, field) == RB_RED) {    \
26704 +                               RB_COLOR(tmp, field) = RB_BLACK;        \
26705 +                               RB_SET_BLACKRED(parent, gparent, field);\
26706 +                               elm = gparent;                          \
26707 +                               continue;                               \
26708 +                       }                                               \
26709 +                       if (RB_LEFT(parent, field) == elm) {            \
26710 +                               RB_ROTATE_RIGHT(head, parent, tmp, field);\
26711 +                               tmp = parent;                           \
26712 +                               parent = elm;                           \
26713 +                               elm = tmp;                              \
26714 +                       }                                               \
26715 +                       RB_SET_BLACKRED(parent, gparent, field);        \
26716 +                       RB_ROTATE_LEFT(head, gparent, tmp, field);      \
26717 +               }                                                       \
26718 +       }                                                               \
26719 +       RB_COLOR(head->rbh_root, field) = RB_BLACK;                     \
26720 +}                                                                      \
26721 +                                                                       \
26722 +void                                                                   \
26723 +name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \
26724 +{                                                                      \
26725 +       struct type *tmp;                                               \
26726 +       while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) &&     \
26727 +           elm != RB_ROOT(head)) {                                     \
26728 +               if (RB_LEFT(parent, field) == elm) {                    \
26729 +                       tmp = RB_RIGHT(parent, field);                  \
26730 +                       if (RB_COLOR(tmp, field) == RB_RED) {           \
26731 +                               RB_SET_BLACKRED(tmp, parent, field);    \
26732 +                               RB_ROTATE_LEFT(head, parent, tmp, field);\
26733 +                               tmp = RB_RIGHT(parent, field);          \
26734 +                       }                                               \
26735 +                       if ((RB_LEFT(tmp, field) == NULL ||             \
26736 +                           RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
26737 +                           (RB_RIGHT(tmp, field) == NULL ||            \
26738 +                           RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
26739 +                               RB_COLOR(tmp, field) = RB_RED;          \
26740 +                               elm = parent;                           \
26741 +                               parent = RB_PARENT(elm, field);         \
26742 +                       } else {                                        \
26743 +                               if (RB_RIGHT(tmp, field) == NULL ||     \
26744 +                                   RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\
26745 +                                       struct type *oleft;             \
26746 +                                       if ((oleft = RB_LEFT(tmp, field)))\
26747 +                                               RB_COLOR(oleft, field) = RB_BLACK;\
26748 +                                       RB_COLOR(tmp, field) = RB_RED;  \
26749 +                                       RB_ROTATE_RIGHT(head, tmp, oleft, field);\
26750 +                                       tmp = RB_RIGHT(parent, field);  \
26751 +                               }                                       \
26752 +                               RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
26753 +                               RB_COLOR(parent, field) = RB_BLACK;     \
26754 +                               if (RB_RIGHT(tmp, field))               \
26755 +                                       RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\
26756 +                               RB_ROTATE_LEFT(head, parent, tmp, field);\
26757 +                               elm = RB_ROOT(head);                    \
26758 +                               break;                                  \
26759 +                       }                                               \
26760 +               } else {                                                \
26761 +                       tmp = RB_LEFT(parent, field);                   \
26762 +                       if (RB_COLOR(tmp, field) == RB_RED) {           \
26763 +                               RB_SET_BLACKRED(tmp, parent, field);    \
26764 +                               RB_ROTATE_RIGHT(head, parent, tmp, field);\
26765 +                               tmp = RB_LEFT(parent, field);           \
26766 +                       }                                               \
26767 +                       if ((RB_LEFT(tmp, field) == NULL ||             \
26768 +                           RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
26769 +                           (RB_RIGHT(tmp, field) == NULL ||            \
26770 +                           RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
26771 +                               RB_COLOR(tmp, field) = RB_RED;          \
26772 +                               elm = parent;                           \
26773 +                               parent = RB_PARENT(elm, field);         \
26774 +                       } else {                                        \
26775 +                               if (RB_LEFT(tmp, field) == NULL ||      \
26776 +                                   RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\
26777 +                                       struct type *oright;            \
26778 +                                       if ((oright = RB_RIGHT(tmp, field)))\
26779 +                                               RB_COLOR(oright, field) = RB_BLACK;\
26780 +                                       RB_COLOR(tmp, field) = RB_RED;  \
26781 +                                       RB_ROTATE_LEFT(head, tmp, oright, field);\
26782 +                                       tmp = RB_LEFT(parent, field);   \
26783 +                               }                                       \
26784 +                               RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
26785 +                               RB_COLOR(parent, field) = RB_BLACK;     \
26786 +                               if (RB_LEFT(tmp, field))                \
26787 +                                       RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\
26788 +                               RB_ROTATE_RIGHT(head, parent, tmp, field);\
26789 +                               elm = RB_ROOT(head);                    \
26790 +                               break;                                  \
26791 +                       }                                               \
26792 +               }                                                       \
26793 +       }                                                               \
26794 +       if (elm)                                                        \
26795 +               RB_COLOR(elm, field) = RB_BLACK;                        \
26796 +}                                                                      \
26797 +                                                                       \
26798 +struct type *                                                          \
26799 +name##_RB_REMOVE(struct name *head, struct type *elm)                  \
26800 +{                                                                      \
26801 +       struct type *child, *parent, *old = elm;                        \
26802 +       int color;                                                      \
26803 +       if (RB_LEFT(elm, field) == NULL)                                \
26804 +               child = RB_RIGHT(elm, field);                           \
26805 +       else if (RB_RIGHT(elm, field) == NULL)                          \
26806 +               child = RB_LEFT(elm, field);                            \
26807 +       else {                                                          \
26808 +               struct type *left;                                      \
26809 +               elm = RB_RIGHT(elm, field);                             \
26810 +               while ((left = RB_LEFT(elm, field)))                    \
26811 +                       elm = left;                                     \
26812 +               child = RB_RIGHT(elm, field);                           \
26813 +               parent = RB_PARENT(elm, field);                         \
26814 +               color = RB_COLOR(elm, field);                           \
26815 +               if (child)                                              \
26816 +                       RB_PARENT(child, field) = parent;               \
26817 +               if (parent) {                                           \
26818 +                       if (RB_LEFT(parent, field) == elm)              \
26819 +                               RB_LEFT(parent, field) = child;         \
26820 +                       else                                            \
26821 +                               RB_RIGHT(parent, field) = child;        \
26822 +                       RB_AUGMENT(parent);                             \
26823 +               } else                                                  \
26824 +                       RB_ROOT(head) = child;                          \
26825 +               if (RB_PARENT(elm, field) == old)                       \
26826 +                       parent = elm;                                   \
26827 +               (elm)->field = (old)->field;                            \
26828 +               if (RB_PARENT(old, field)) {                            \
26829 +                       if (RB_LEFT(RB_PARENT(old, field), field) == old)\
26830 +                               RB_LEFT(RB_PARENT(old, field), field) = elm;\
26831 +                       else                                            \
26832 +                               RB_RIGHT(RB_PARENT(old, field), field) = elm;\
26833 +                       RB_AUGMENT(RB_PARENT(old, field));              \
26834 +               } else                                                  \
26835 +                       RB_ROOT(head) = elm;                            \
26836 +               RB_PARENT(RB_LEFT(old, field), field) = elm;            \
26837 +               if (RB_RIGHT(old, field))                               \
26838 +                       RB_PARENT(RB_RIGHT(old, field), field) = elm;   \
26839 +               if (parent) {                                           \
26840 +                       left = parent;                                  \
26841 +                       do {                                            \
26842 +                               RB_AUGMENT(left);                       \
26843 +                       } while ((left = RB_PARENT(left, field)));      \
26844 +               }                                                       \
26845 +               goto color;                                             \
26846 +       }                                                               \
26847 +       parent = RB_PARENT(elm, field);                                 \
26848 +       color = RB_COLOR(elm, field);                                   \
26849 +       if (child)                                                      \
26850 +               RB_PARENT(child, field) = parent;                       \
26851 +       if (parent) {                                                   \
26852 +               if (RB_LEFT(parent, field) == elm)                      \
26853 +                       RB_LEFT(parent, field) = child;                 \
26854 +               else                                                    \
26855 +                       RB_RIGHT(parent, field) = child;                \
26856 +               RB_AUGMENT(parent);                                     \
26857 +       } else                                                          \
26858 +               RB_ROOT(head) = child;                                  \
26859 +color:                                                                 \
26860 +       if (color == RB_BLACK)                                          \
26861 +               name##_RB_REMOVE_COLOR(head, parent, child);            \
26862 +       return (old);                                                   \
26863 +}                                                                      \
26864 +                                                                       \
26865 +/* Inserts a node into the RB tree */                                  \
26866 +struct type *                                                          \
26867 +name##_RB_INSERT(struct name *head, struct type *elm)                  \
26868 +{                                                                      \
26869 +       struct type *tmp;                                               \
26870 +       struct type *parent = NULL;                                     \
26871 +       int comp = 0;                                                   \
26872 +       tmp = RB_ROOT(head);                                            \
26873 +       while (tmp) {                                                   \
26874 +               parent = tmp;                                           \
26875 +               comp = (cmp)(elm, parent);                              \
26876 +               if (comp < 0)                                           \
26877 +                       tmp = RB_LEFT(tmp, field);                      \
26878 +               else if (comp > 0)                                      \
26879 +                       tmp = RB_RIGHT(tmp, field);                     \
26880 +               else                                                    \
26881 +                       return (tmp);                                   \
26882 +       }                                                               \
26883 +       RB_SET(elm, parent, field);                                     \
26884 +       if (parent != NULL) {                                           \
26885 +               if (comp < 0)                                           \
26886 +                       RB_LEFT(parent, field) = elm;                   \
26887 +               else                                                    \
26888 +                       RB_RIGHT(parent, field) = elm;                  \
26889 +               RB_AUGMENT(parent);                                     \
26890 +       } else                                                          \
26891 +               RB_ROOT(head) = elm;                                    \
26892 +       name##_RB_INSERT_COLOR(head, elm);                              \
26893 +       return (NULL);                                                  \
26894 +}                                                                      \
26895 +                                                                       \
26896 +/* Finds the node with the same key as elm */                          \
26897 +struct type *                                                          \
26898 +name##_RB_FIND(struct name *head, struct type *elm)                    \
26899 +{                                                                      \
26900 +       struct type *tmp = RB_ROOT(head);                               \
26901 +       int comp;                                                       \
26902 +       while (tmp) {                                                   \
26903 +               comp = cmp(elm, tmp);                                   \
26904 +               if (comp < 0)                                           \
26905 +                       tmp = RB_LEFT(tmp, field);                      \
26906 +               else if (comp > 0)                                      \
26907 +                       tmp = RB_RIGHT(tmp, field);                     \
26908 +               else                                                    \
26909 +                       return (tmp);                                   \
26910 +       }                                                               \
26911 +       return (NULL);                                                  \
26912 +}                                                                      \
26913 +                                                                       \
26914 +struct type *                                                          \
26915 +name##_RB_NEXT(struct type *elm)                                       \
26916 +{                                                                      \
26917 +       if (RB_RIGHT(elm, field)) {                                     \
26918 +               elm = RB_RIGHT(elm, field);                             \
26919 +               while (RB_LEFT(elm, field))                             \
26920 +                       elm = RB_LEFT(elm, field);                      \
26921 +       } else {                                                        \
26922 +               if (RB_PARENT(elm, field) &&                            \
26923 +                   (elm == RB_LEFT(RB_PARENT(elm, field), field)))     \
26924 +                       elm = RB_PARENT(elm, field);                    \
26925 +               else {                                                  \
26926 +                       while (RB_PARENT(elm, field) &&                 \
26927 +                           (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\
26928 +                               elm = RB_PARENT(elm, field);            \
26929 +                       elm = RB_PARENT(elm, field);                    \
26930 +               }                                                       \
26931 +       }                                                               \
26932 +       return (elm);                                                   \
26933 +}                                                                      \
26934 +                                                                       \
26935 +struct type *                                                          \
26936 +name##_RB_MINMAX(struct name *head, int val)                           \
26937 +{                                                                      \
26938 +       struct type *tmp = RB_ROOT(head);                               \
26939 +       struct type *parent = NULL;                                     \
26940 +       while (tmp) {                                                   \
26941 +               parent = tmp;                                           \
26942 +               if (val < 0)                                            \
26943 +                       tmp = RB_LEFT(tmp, field);                      \
26944 +               else                                                    \
26945 +                       tmp = RB_RIGHT(tmp, field);                     \
26946 +       }                                                               \
26947 +       return (parent);                                                \
26948 +}
26949 +
26950 +#define RB_NEGINF      -1
26951 +#define RB_INF 1
26952 +
26953 +#define RB_INSERT(name, x, y)  name##_RB_INSERT(x, y)
26954 +#define RB_REMOVE(name, x, y)  name##_RB_REMOVE(x, y)
26955 +#define RB_FIND(name, x, y)    name##_RB_FIND(x, y)
26956 +#define RB_NEXT(name, x, y)    name##_RB_NEXT(y)
26957 +#define RB_MIN(name, x)                name##_RB_MINMAX(x, RB_NEGINF)
26958 +#define RB_MAX(name, x)                name##_RB_MINMAX(x, RB_INF)
26959 +
26960 +#define RB_FOREACH(x, name, head)                                      \
26961 +       for ((x) = RB_MIN(name, head);                                  \
26962 +            (x) != NULL;                                               \
26963 +            (x) = name##_RB_NEXT(x))
26964 +
26965 +#endif /* _SYS_TREE_H_ */
26966 diff -Nru php-5.2.4.vanilla/libevent/config.guess php-5.2.4.fpm/libevent/config.guess
26967 --- php-5.2.4.vanilla/libevent/config.guess     1970-01-01 03:00:00.000000000 +0300
26968 +++ php-5.2.4.fpm/libevent/config.guess 2007-08-31 15:47:19.000000000 +0400
26969 @@ -0,0 +1,1469 @@
26970 +#! /bin/sh
26971 +# Attempt to guess a canonical system name.
26972 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
26973 +#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
26974 +
26975 +timestamp='2005-02-10'
26976 +
26977 +# This file is free software; you can redistribute it and/or modify it
26978 +# under the terms of the GNU General Public License as published by
26979 +# the Free Software Foundation; either version 2 of the License, or
26980 +# (at your option) any later version.
26981 +#
26982 +# This program is distributed in the hope that it will be useful, but
26983 +# WITHOUT ANY WARRANTY; without even the implied warranty of
26984 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26985 +# General Public License for more details.
26986 +#
26987 +# You should have received a copy of the GNU General Public License
26988 +# along with this program; if not, write to the Free Software
26989 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26990 +#
26991 +# As a special exception to the GNU General Public License, if you
26992 +# distribute this file as part of a program that contains a
26993 +# configuration script generated by Autoconf, you may include it under
26994 +# the same distribution terms that you use for the rest of that program.
26995 +
26996 +# Originally written by Per Bothner <per@bothner.com>.
26997 +# Please send patches to <config-patches@gnu.org>.  Submit a context
26998 +# diff and a properly formatted ChangeLog entry.
26999 +#
27000 +# This script attempts to guess a canonical system name similar to
27001 +# config.sub.  If it succeeds, it prints the system name on stdout, and
27002 +# exits with 0.  Otherwise, it exits with 1.
27003 +#
27004 +# The plan is that this can be called by configure scripts if you
27005 +# don't specify an explicit build system type.
27006 +
27007 +me=`echo "$0" | sed -e 's,.*/,,'`
27008 +
27009 +usage="\
27010 +Usage: $0 [OPTION]
27011 +
27012 +Output the configuration name of the system \`$me' is run on.
27013 +
27014 +Operation modes:
27015 +  -h, --help         print this help, then exit
27016 +  -t, --time-stamp   print date of last modification, then exit
27017 +  -v, --version      print version number, then exit
27018 +
27019 +Report bugs and patches to <config-patches@gnu.org>."
27020 +
27021 +version="\
27022 +GNU config.guess ($timestamp)
27023 +
27024 +Originally written by Per Bothner.
27025 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
27026 +Free Software Foundation, Inc.
27027 +
27028 +This is free software; see the source for copying conditions.  There is NO
27029 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
27030 +
27031 +help="
27032 +Try \`$me --help' for more information."
27033 +
27034 +# Parse command line
27035 +while test $# -gt 0 ; do
27036 +  case $1 in
27037 +    --time-stamp | --time* | -t )
27038 +       echo "$timestamp" ; exit 0 ;;
27039 +    --version | -v )
27040 +       echo "$version" ; exit 0 ;;
27041 +    --help | --h* | -h )
27042 +       echo "$usage"; exit 0 ;;
27043 +    -- )     # Stop option processing
27044 +       shift; break ;;
27045 +    - )        # Use stdin as input.
27046 +       break ;;
27047 +    -* )
27048 +       echo "$me: invalid option $1$help" >&2
27049 +       exit 1 ;;
27050 +    * )
27051 +       break ;;
27052 +  esac
27053 +done
27054 +
27055 +if test $# != 0; then
27056 +  echo "$me: too many arguments$help" >&2
27057 +  exit 1
27058 +fi
27059 +
27060 +trap 'exit 1' 1 2 15
27061 +
27062 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
27063 +# compiler to aid in system detection is discouraged as it requires
27064 +# temporary files to be created and, as you can see below, it is a
27065 +# headache to deal with in a portable fashion.
27066 +
27067 +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
27068 +# use `HOST_CC' if defined, but it is deprecated.
27069 +
27070 +# Portable tmp directory creation inspired by the Autoconf team.
27071 +
27072 +set_cc_for_build='
27073 +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
27074 +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
27075 +: ${TMPDIR=/tmp} ;
27076 + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
27077 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
27078 + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
27079 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
27080 +dummy=$tmp/dummy ;
27081 +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
27082 +case $CC_FOR_BUILD,$HOST_CC,$CC in
27083 + ,,)    echo "int x;" > $dummy.c ;
27084 +       for c in cc gcc c89 c99 ; do
27085 +         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
27086 +            CC_FOR_BUILD="$c"; break ;
27087 +         fi ;
27088 +       done ;
27089 +       if test x"$CC_FOR_BUILD" = x ; then
27090 +         CC_FOR_BUILD=no_compiler_found ;
27091 +       fi
27092 +       ;;
27093 + ,,*)   CC_FOR_BUILD=$CC ;;
27094 + ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
27095 +esac ;'
27096 +
27097 +# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
27098 +# (ghazi@noc.rutgers.edu 1994-08-24)
27099 +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
27100 +       PATH=$PATH:/.attbin ; export PATH
27101 +fi
27102 +
27103 +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
27104 +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
27105 +UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
27106 +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
27107 +
27108 +case "${UNAME_MACHINE}" in
27109 +    i?86)
27110 +       test -z "$VENDOR" && VENDOR=pc
27111 +       ;;
27112 +    *)
27113 +       test -z "$VENDOR" && VENDOR=unknown
27114 +       ;;
27115 +esac
27116 +test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
27117 +
27118 +# Note: order is significant - the case branches are not exclusive.
27119 +
27120 +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
27121 +    *:NetBSD:*:*)
27122 +       # NetBSD (nbsd) targets should (where applicable) match one or
27123 +       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
27124 +       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
27125 +       # switched to ELF, *-*-netbsd* would select the old
27126 +       # object file format.  This provides both forward
27127 +       # compatibility and a consistent mechanism for selecting the
27128 +       # object file format.
27129 +       #
27130 +       # Note: NetBSD doesn't particularly care about the vendor
27131 +       # portion of the name.  We always set it to "unknown".
27132 +       sysctl="sysctl -n hw.machine_arch"
27133 +       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
27134 +           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
27135 +       case "${UNAME_MACHINE_ARCH}" in
27136 +           armeb) machine=armeb-unknown ;;
27137 +           arm*) machine=arm-unknown ;;
27138 +           sh3el) machine=shl-unknown ;;
27139 +           sh3eb) machine=sh-unknown ;;
27140 +           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
27141 +       esac
27142 +       # The Operating System including object format, if it has switched
27143 +       # to ELF recently, or will in the future.
27144 +       case "${UNAME_MACHINE_ARCH}" in
27145 +           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
27146 +               eval $set_cc_for_build
27147 +               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
27148 +                       | grep __ELF__ >/dev/null
27149 +               then
27150 +                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
27151 +                   # Return netbsd for either.  FIX?
27152 +                   os=netbsd
27153 +               else
27154 +                   os=netbsdelf
27155 +               fi
27156 +               ;;
27157 +           *)
27158 +               os=netbsd
27159 +               ;;
27160 +       esac
27161 +       # The OS release
27162 +       # Debian GNU/NetBSD machines have a different userland, and
27163 +       # thus, need a distinct triplet. However, they do not need
27164 +       # kernel version information, so it can be replaced with a
27165 +       # suitable tag, in the style of linux-gnu.
27166 +       case "${UNAME_VERSION}" in
27167 +           Debian*)
27168 +               release='-gnu'
27169 +               ;;
27170 +           *)
27171 +               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
27172 +               ;;
27173 +       esac
27174 +       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
27175 +       # contains redundant information, the shorter form:
27176 +       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
27177 +       echo "${machine}-${os}${release}"
27178 +       exit 0 ;;
27179 +    amd64:OpenBSD:*:*)
27180 +       echo x86_64-unknown-openbsd${UNAME_RELEASE}
27181 +       exit 0 ;;
27182 +    amiga:OpenBSD:*:*)
27183 +       echo m68k-unknown-openbsd${UNAME_RELEASE}
27184 +       exit 0 ;;
27185 +    cats:OpenBSD:*:*)
27186 +       echo arm-unknown-openbsd${UNAME_RELEASE}
27187 +       exit 0 ;;
27188 +    hp300:OpenBSD:*:*)
27189 +       echo m68k-unknown-openbsd${UNAME_RELEASE}
27190 +       exit 0 ;;
27191 +    luna88k:OpenBSD:*:*)
27192 +       echo m88k-unknown-openbsd${UNAME_RELEASE}
27193 +       exit 0 ;;
27194 +    mac68k:OpenBSD:*:*)
27195 +       echo m68k-unknown-openbsd${UNAME_RELEASE}
27196 +       exit 0 ;;
27197 +    macppc:OpenBSD:*:*)
27198 +       echo powerpc-unknown-openbsd${UNAME_RELEASE}
27199 +       exit 0 ;;
27200 +    mvme68k:OpenBSD:*:*)
27201 +       echo m68k-unknown-openbsd${UNAME_RELEASE}
27202 +       exit 0 ;;
27203 +    mvme88k:OpenBSD:*:*)
27204 +       echo m88k-unknown-openbsd${UNAME_RELEASE}
27205 +       exit 0 ;;
27206 +    mvmeppc:OpenBSD:*:*)
27207 +       echo powerpc-unknown-openbsd${UNAME_RELEASE}
27208 +       exit 0 ;;
27209 +    sgi:OpenBSD:*:*)
27210 +       echo mips64-unknown-openbsd${UNAME_RELEASE}
27211 +       exit 0 ;;
27212 +    sun3:OpenBSD:*:*)
27213 +       echo m68k-unknown-openbsd${UNAME_RELEASE}
27214 +       exit 0 ;;
27215 +    *:OpenBSD:*:*)
27216 +       echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
27217 +       exit 0 ;;
27218 +    *:ekkoBSD:*:*)
27219 +       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
27220 +       exit 0 ;;
27221 +    macppc:MirBSD:*:*)
27222 +       echo powerppc-unknown-mirbsd${UNAME_RELEASE}
27223 +       exit 0 ;;
27224 +    *:MirBSD:*:*)
27225 +       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
27226 +       exit 0 ;;
27227 +    alpha:OSF1:*:*)
27228 +       case $UNAME_RELEASE in
27229 +       *4.0)
27230 +               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
27231 +               ;;
27232 +       *5.*)
27233 +               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
27234 +               ;;
27235 +       esac
27236 +       # According to Compaq, /usr/sbin/psrinfo has been available on
27237 +       # OSF/1 and Tru64 systems produced since 1995.  I hope that
27238 +       # covers most systems running today.  This code pipes the CPU
27239 +       # types through head -n 1, so we only detect the type of CPU 0.
27240 +       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
27241 +       case "$ALPHA_CPU_TYPE" in
27242 +           "EV4 (21064)")
27243 +               UNAME_MACHINE="alpha" ;;
27244 +           "EV4.5 (21064)")
27245 +               UNAME_MACHINE="alpha" ;;
27246 +           "LCA4 (21066/21068)")
27247 +               UNAME_MACHINE="alpha" ;;
27248 +           "EV5 (21164)")
27249 +               UNAME_MACHINE="alphaev5" ;;
27250 +           "EV5.6 (21164A)")
27251 +               UNAME_MACHINE="alphaev56" ;;
27252 +           "EV5.6 (21164PC)")
27253 +               UNAME_MACHINE="alphapca56" ;;
27254 +           "EV5.7 (21164PC)")
27255 +               UNAME_MACHINE="alphapca57" ;;
27256 +           "EV6 (21264)")
27257 +               UNAME_MACHINE="alphaev6" ;;
27258 +           "EV6.7 (21264A)")
27259 +               UNAME_MACHINE="alphaev67" ;;
27260 +           "EV6.8CB (21264C)")
27261 +               UNAME_MACHINE="alphaev68" ;;
27262 +           "EV6.8AL (21264B)")
27263 +               UNAME_MACHINE="alphaev68" ;;
27264 +           "EV6.8CX (21264D)")
27265 +               UNAME_MACHINE="alphaev68" ;;
27266 +           "EV6.9A (21264/EV69A)")
27267 +               UNAME_MACHINE="alphaev69" ;;
27268 +           "EV7 (21364)")
27269 +               UNAME_MACHINE="alphaev7" ;;
27270 +           "EV7.9 (21364A)")
27271 +               UNAME_MACHINE="alphaev79" ;;
27272 +       esac
27273 +       # A Pn.n version is a patched version.
27274 +       # A Vn.n version is a released version.
27275 +       # A Tn.n version is a released field test version.
27276 +       # A Xn.n version is an unreleased experimental baselevel.
27277 +       # 1.2 uses "1.2" for uname -r.
27278 +       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27279 +       exit 0 ;;
27280 +    Alpha\ *:Windows_NT*:*)
27281 +       # How do we know it's Interix rather than the generic POSIX subsystem?
27282 +       # Should we change UNAME_MACHINE based on the output of uname instead
27283 +       # of the specific Alpha model?
27284 +       echo alpha-pc-interix
27285 +       exit 0 ;;
27286 +    21064:Windows_NT:50:3)
27287 +       echo alpha-dec-winnt3.5
27288 +       exit 0 ;;
27289 +    Amiga*:UNIX_System_V:4.0:*)
27290 +       echo m68k-unknown-sysv4
27291 +       exit 0;;
27292 +    *:[Aa]miga[Oo][Ss]:*:*)
27293 +       echo ${UNAME_MACHINE}-unknown-amigaos
27294 +       exit 0 ;;
27295 +    *:[Mm]orph[Oo][Ss]:*:*)
27296 +       echo ${UNAME_MACHINE}-unknown-morphos
27297 +       exit 0 ;;
27298 +    *:OS/390:*:*)
27299 +       echo i370-ibm-openedition
27300 +       exit 0 ;;
27301 +    *:z/VM:*:*)
27302 +       echo s390-ibm-zvmoe
27303 +       exit 0 ;;
27304 +    *:OS400:*:*)
27305 +        echo powerpc-ibm-os400
27306 +       exit 0 ;;
27307 +    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
27308 +       echo arm-acorn-riscix${UNAME_RELEASE}
27309 +       exit 0;;
27310 +    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
27311 +       echo hppa1.1-hitachi-hiuxmpp
27312 +       exit 0;;
27313 +    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
27314 +       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
27315 +       if test "`(/bin/universe) 2>/dev/null`" = att ; then
27316 +               echo pyramid-pyramid-sysv3
27317 +       else
27318 +               echo pyramid-pyramid-bsd
27319 +       fi
27320 +       exit 0 ;;
27321 +    NILE*:*:*:dcosx)
27322 +       echo pyramid-pyramid-svr4
27323 +       exit 0 ;;
27324 +    DRS?6000:unix:4.0:6*)
27325 +       echo sparc-icl-nx6
27326 +       exit 0 ;;
27327 +    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
27328 +       case `/usr/bin/uname -p` in
27329 +           sparc) echo sparc-icl-nx7 && exit 0 ;;
27330 +       esac ;;
27331 +    sun4H:SunOS:5.*:*)
27332 +       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
27333 +       exit 0 ;;
27334 +    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
27335 +       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
27336 +       exit 0 ;;
27337 +    i86pc:SunOS:5.*:*)
27338 +       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
27339 +       exit 0 ;;
27340 +    sun4*:SunOS:6*:*)
27341 +       # According to config.sub, this is the proper way to canonicalize
27342 +       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
27343 +       # it's likely to be more like Solaris than SunOS4.
27344 +       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
27345 +       exit 0 ;;
27346 +    sun4*:SunOS:*:*)
27347 +       case "`/usr/bin/arch -k`" in
27348 +           Series*|S4*)
27349 +               UNAME_RELEASE=`uname -v`
27350 +               ;;
27351 +       esac
27352 +       # Japanese Language versions have a version number like `4.1.3-JL'.
27353 +       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
27354 +       exit 0 ;;
27355 +    sun3*:SunOS:*:*)
27356 +       echo m68k-sun-sunos${UNAME_RELEASE}
27357 +       exit 0 ;;
27358 +    sun*:*:4.2BSD:*)
27359 +       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
27360 +       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
27361 +       case "`/bin/arch`" in
27362 +           sun3)
27363 +               echo m68k-sun-sunos${UNAME_RELEASE}
27364 +               ;;
27365 +           sun4)
27366 +               echo sparc-sun-sunos${UNAME_RELEASE}
27367 +               ;;
27368 +       esac
27369 +       exit 0 ;;
27370 +    aushp:SunOS:*:*)
27371 +       echo sparc-auspex-sunos${UNAME_RELEASE}
27372 +       exit 0 ;;
27373 +    # The situation for MiNT is a little confusing.  The machine name
27374 +    # can be virtually everything (everything which is not
27375 +    # "atarist" or "atariste" at least should have a processor
27376 +    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
27377 +    # to the lowercase version "mint" (or "freemint").  Finally
27378 +    # the system name "TOS" denotes a system which is actually not
27379 +    # MiNT.  But MiNT is downward compatible to TOS, so this should
27380 +    # be no problem.
27381 +    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
27382 +        echo m68k-atari-mint${UNAME_RELEASE}
27383 +       exit 0 ;;
27384 +    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
27385 +       echo m68k-atari-mint${UNAME_RELEASE}
27386 +        exit 0 ;;
27387 +    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
27388 +        echo m68k-atari-mint${UNAME_RELEASE}
27389 +       exit 0 ;;
27390 +    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
27391 +        echo m68k-milan-mint${UNAME_RELEASE}
27392 +        exit 0 ;;
27393 +    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
27394 +        echo m68k-hades-mint${UNAME_RELEASE}
27395 +        exit 0 ;;
27396 +    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
27397 +        echo m68k-unknown-mint${UNAME_RELEASE}
27398 +        exit 0 ;;
27399 +    m68k:machten:*:*)
27400 +       echo m68k-apple-machten${UNAME_RELEASE}
27401 +       exit 0 ;;
27402 +    powerpc:machten:*:*)
27403 +       echo powerpc-apple-machten${UNAME_RELEASE}
27404 +       exit 0 ;;
27405 +    RISC*:Mach:*:*)
27406 +       echo mips-dec-mach_bsd4.3
27407 +       exit 0 ;;
27408 +    RISC*:ULTRIX:*:*)
27409 +       echo mips-dec-ultrix${UNAME_RELEASE}
27410 +       exit 0 ;;
27411 +    VAX*:ULTRIX*:*:*)
27412 +       echo vax-dec-ultrix${UNAME_RELEASE}
27413 +       exit 0 ;;
27414 +    2020:CLIX:*:* | 2430:CLIX:*:*)
27415 +       echo clipper-intergraph-clix${UNAME_RELEASE}
27416 +       exit 0 ;;
27417 +    mips:*:*:UMIPS | mips:*:*:RISCos)
27418 +       eval $set_cc_for_build
27419 +       sed 's/^        //' << EOF >$dummy.c
27420 +#ifdef __cplusplus
27421 +#include <stdio.h>  /* for printf() prototype */
27422 +       int main (int argc, char *argv[]) {
27423 +#else
27424 +       int main (argc, argv) int argc; char *argv[]; {
27425 +#endif
27426 +       #if defined (host_mips) && defined (MIPSEB)
27427 +       #if defined (SYSTYPE_SYSV)
27428 +         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
27429 +       #endif
27430 +       #if defined (SYSTYPE_SVR4)
27431 +         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
27432 +       #endif
27433 +       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
27434 +         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
27435 +       #endif
27436 +       #endif
27437 +         exit (-1);
27438 +       }
27439 +EOF
27440 +       $CC_FOR_BUILD -o $dummy $dummy.c \
27441 +         && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
27442 +         && exit 0
27443 +       echo mips-mips-riscos${UNAME_RELEASE}
27444 +       exit 0 ;;
27445 +    Motorola:PowerMAX_OS:*:*)
27446 +       echo powerpc-motorola-powermax
27447 +       exit 0 ;;
27448 +    Motorola:*:4.3:PL8-*)
27449 +       echo powerpc-harris-powermax
27450 +       exit 0 ;;
27451 +    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
27452 +       echo powerpc-harris-powermax
27453 +       exit 0 ;;
27454 +    Night_Hawk:Power_UNIX:*:*)
27455 +       echo powerpc-harris-powerunix
27456 +       exit 0 ;;
27457 +    m88k:CX/UX:7*:*)
27458 +       echo m88k-harris-cxux7
27459 +       exit 0 ;;
27460 +    m88k:*:4*:R4*)
27461 +       echo m88k-motorola-sysv4
27462 +       exit 0 ;;
27463 +    m88k:*:3*:R3*)
27464 +       echo m88k-motorola-sysv3
27465 +       exit 0 ;;
27466 +    AViiON:dgux:*:*)
27467 +        # DG/UX returns AViiON for all architectures
27468 +        UNAME_PROCESSOR=`/usr/bin/uname -p`
27469 +       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
27470 +       then
27471 +           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
27472 +              [ ${TARGET_BINARY_INTERFACE}x = x ]
27473 +           then
27474 +               echo m88k-dg-dgux${UNAME_RELEASE}
27475 +           else
27476 +               echo m88k-dg-dguxbcs${UNAME_RELEASE}
27477 +           fi
27478 +       else
27479 +           echo i586-dg-dgux${UNAME_RELEASE}
27480 +       fi
27481 +       exit 0 ;;
27482 +    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
27483 +       echo m88k-dolphin-sysv3
27484 +       exit 0 ;;
27485 +    M88*:*:R3*:*)
27486 +       # Delta 88k system running SVR3
27487 +       echo m88k-motorola-sysv3
27488 +       exit 0 ;;
27489 +    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
27490 +       echo m88k-tektronix-sysv3
27491 +       exit 0 ;;
27492 +    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
27493 +       echo m68k-tektronix-bsd
27494 +       exit 0 ;;
27495 +    *:IRIX*:*:*)
27496 +       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
27497 +       exit 0 ;;
27498 +    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
27499 +       echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
27500 +       exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
27501 +    i*86:AIX:*:*)
27502 +       echo i386-ibm-aix
27503 +       exit 0 ;;
27504 +    ia64:AIX:*:*)
27505 +       if [ -x /usr/bin/oslevel ] ; then
27506 +               IBM_REV=`/usr/bin/oslevel`
27507 +       else
27508 +               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
27509 +       fi
27510 +       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
27511 +       exit 0 ;;
27512 +    *:AIX:2:3)
27513 +       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
27514 +               eval $set_cc_for_build
27515 +               sed 's/^                //' << EOF >$dummy.c
27516 +               #include <sys/systemcfg.h>
27517 +
27518 +               main()
27519 +                       {
27520 +                       if (!__power_pc())
27521 +                               exit(1);
27522 +                       puts("powerpc-ibm-aix3.2.5");
27523 +                       exit(0);
27524 +                       }
27525 +EOF
27526 +               $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
27527 +               echo rs6000-ibm-aix3.2.5
27528 +       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
27529 +               echo rs6000-ibm-aix3.2.4
27530 +       else
27531 +               echo rs6000-ibm-aix3.2
27532 +       fi
27533 +       exit 0 ;;
27534 +    *:AIX:*:[45])
27535 +       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
27536 +       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
27537 +               IBM_ARCH=rs6000
27538 +       else
27539 +               IBM_ARCH=powerpc
27540 +       fi
27541 +       if [ -x /usr/bin/oslevel ] ; then
27542 +               IBM_REV=`/usr/bin/oslevel`
27543 +       else
27544 +               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
27545 +       fi
27546 +       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
27547 +       exit 0 ;;
27548 +    *:AIX:*:*)
27549 +       echo rs6000-ibm-aix
27550 +       exit 0 ;;
27551 +    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
27552 +       echo romp-ibm-bsd4.4
27553 +       exit 0 ;;
27554 +    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
27555 +       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
27556 +       exit 0 ;;                           # report: romp-ibm BSD 4.3
27557 +    *:BOSX:*:*)
27558 +       echo rs6000-bull-bosx
27559 +       exit 0 ;;
27560 +    DPX/2?00:B.O.S.:*:*)
27561 +       echo m68k-bull-sysv3
27562 +       exit 0 ;;
27563 +    9000/[34]??:4.3bsd:1.*:*)
27564 +       echo m68k-hp-bsd
27565 +       exit 0 ;;
27566 +    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
27567 +       echo m68k-hp-bsd4.4
27568 +       exit 0 ;;
27569 +    9000/[34678]??:HP-UX:*:*)
27570 +       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
27571 +       case "${UNAME_MACHINE}" in
27572 +           9000/31? )            HP_ARCH=m68000 ;;
27573 +           9000/[34]?? )         HP_ARCH=m68k ;;
27574 +           9000/[678][0-9][0-9])
27575 +               if [ -x /usr/bin/getconf ]; then
27576 +                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
27577 +                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
27578 +                    case "${sc_cpu_version}" in
27579 +                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
27580 +                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
27581 +                      532)                      # CPU_PA_RISC2_0
27582 +                        case "${sc_kernel_bits}" in
27583 +                          32) HP_ARCH="hppa2.0n" ;;
27584 +                          64) HP_ARCH="hppa2.0w" ;;
27585 +                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
27586 +                        esac ;;
27587 +                    esac
27588 +               fi
27589 +               if [ "${HP_ARCH}" = "" ]; then
27590 +                   eval $set_cc_for_build
27591 +                   sed 's/^              //' << EOF >$dummy.c
27592 +
27593 +              #define _HPUX_SOURCE
27594 +              #include <stdlib.h>
27595 +              #include <unistd.h>
27596 +
27597 +              int main ()
27598 +              {
27599 +              #if defined(_SC_KERNEL_BITS)
27600 +                  long bits = sysconf(_SC_KERNEL_BITS);
27601 +              #endif
27602 +                  long cpu  = sysconf (_SC_CPU_VERSION);
27603 +
27604 +                  switch (cpu)
27605 +               {
27606 +               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
27607 +               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
27608 +               case CPU_PA_RISC2_0:
27609 +              #if defined(_SC_KERNEL_BITS)
27610 +                   switch (bits)
27611 +                       {
27612 +                       case 64: puts ("hppa2.0w"); break;
27613 +                       case 32: puts ("hppa2.0n"); break;
27614 +                       default: puts ("hppa2.0"); break;
27615 +                       } break;
27616 +              #else  /* !defined(_SC_KERNEL_BITS) */
27617 +                   puts ("hppa2.0"); break;
27618 +              #endif
27619 +               default: puts ("hppa1.0"); break;
27620 +               }
27621 +                  exit (0);
27622 +              }
27623 +EOF
27624 +                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
27625 +                   test -z "$HP_ARCH" && HP_ARCH=hppa
27626 +               fi ;;
27627 +       esac
27628 +       if [ ${HP_ARCH} = "hppa2.0w" ]
27629 +       then
27630 +           # avoid double evaluation of $set_cc_for_build
27631 +           test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
27632 +           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
27633 +           then
27634 +               HP_ARCH="hppa2.0w"
27635 +           else
27636 +               HP_ARCH="hppa64"
27637 +           fi
27638 +       fi
27639 +       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
27640 +       exit 0 ;;
27641 +    ia64:HP-UX:*:*)
27642 +       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
27643 +       echo ia64-hp-hpux${HPUX_REV}
27644 +       exit 0 ;;
27645 +    3050*:HI-UX:*:*)
27646 +       eval $set_cc_for_build
27647 +       sed 's/^        //' << EOF >$dummy.c
27648 +       #include <unistd.h>
27649 +       int
27650 +       main ()
27651 +       {
27652 +         long cpu = sysconf (_SC_CPU_VERSION);
27653 +         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
27654 +            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
27655 +            results, however.  */
27656 +         if (CPU_IS_PA_RISC (cpu))
27657 +           {
27658 +             switch (cpu)
27659 +               {
27660 +                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
27661 +                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
27662 +                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
27663 +                 default: puts ("hppa-hitachi-hiuxwe2"); break;
27664 +               }
27665 +           }
27666 +         else if (CPU_IS_HP_MC68K (cpu))
27667 +           puts ("m68k-hitachi-hiuxwe2");
27668 +         else puts ("unknown-hitachi-hiuxwe2");
27669 +         exit (0);
27670 +       }
27671 +EOF
27672 +       $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
27673 +       echo unknown-hitachi-hiuxwe2
27674 +       exit 0 ;;
27675 +    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
27676 +       echo hppa1.1-hp-bsd
27677 +       exit 0 ;;
27678 +    9000/8??:4.3bsd:*:*)
27679 +       echo hppa1.0-hp-bsd
27680 +       exit 0 ;;
27681 +    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
27682 +       echo hppa1.0-hp-mpeix
27683 +       exit 0 ;;
27684 +    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
27685 +       echo hppa1.1-hp-osf
27686 +       exit 0 ;;
27687 +    hp8??:OSF1:*:*)
27688 +       echo hppa1.0-hp-osf
27689 +       exit 0 ;;
27690 +    i*86:OSF1:*:*)
27691 +       if [ -x /usr/sbin/sysversion ] ; then
27692 +           echo ${UNAME_MACHINE}-unknown-osf1mk
27693 +       else
27694 +           echo ${UNAME_MACHINE}-unknown-osf1
27695 +       fi
27696 +       exit 0 ;;
27697 +    parisc*:Lites*:*:*)
27698 +       echo hppa1.1-hp-lites
27699 +       exit 0 ;;
27700 +    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
27701 +       echo c1-convex-bsd
27702 +        exit 0 ;;
27703 +    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
27704 +       if getsysinfo -f scalar_acc
27705 +       then echo c32-convex-bsd
27706 +       else echo c2-convex-bsd
27707 +       fi
27708 +        exit 0 ;;
27709 +    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
27710 +       echo c34-convex-bsd
27711 +        exit 0 ;;
27712 +    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
27713 +       echo c38-convex-bsd
27714 +        exit 0 ;;
27715 +    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
27716 +       echo c4-convex-bsd
27717 +        exit 0 ;;
27718 +    CRAY*Y-MP:*:*:*)
27719 +       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
27720 +       exit 0 ;;
27721 +    CRAY*[A-Z]90:*:*:*)
27722 +       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
27723 +       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
27724 +             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
27725 +             -e 's/\.[^.]*$/.X/'
27726 +       exit 0 ;;
27727 +    CRAY*TS:*:*:*)
27728 +       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
27729 +       exit 0 ;;
27730 +    CRAY*T3E:*:*:*)
27731 +       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
27732 +       exit 0 ;;
27733 +    CRAY*SV1:*:*:*)
27734 +       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
27735 +       exit 0 ;;
27736 +    *:UNICOS/mp:*:*)
27737 +       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
27738 +       exit 0 ;;
27739 +    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
27740 +       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27741 +        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
27742 +        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
27743 +        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
27744 +        exit 0 ;;
27745 +    5000:UNIX_System_V:4.*:*)
27746 +        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
27747 +        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
27748 +        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
27749 +       exit 0 ;;
27750 +    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
27751 +       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
27752 +       exit 0 ;;
27753 +    sparc*:BSD/OS:*:*)
27754 +       echo sparc-unknown-bsdi${UNAME_RELEASE}
27755 +       exit 0 ;;
27756 +    *:BSD/OS:*:*)
27757 +       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
27758 +       exit 0 ;;
27759 +    *:FreeBSD:*:*)
27760 +       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
27761 +       exit 0 ;;
27762 +    i*:CYGWIN*:*)
27763 +       echo ${UNAME_MACHINE}-pc-cygwin
27764 +       exit 0 ;;
27765 +    i*:MINGW*:*)
27766 +       echo ${UNAME_MACHINE}-pc-mingw32
27767 +       exit 0 ;;
27768 +    i*:PW*:*)
27769 +       echo ${UNAME_MACHINE}-pc-pw32
27770 +       exit 0 ;;
27771 +    x86:Interix*:[34]*)
27772 +       echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
27773 +       exit 0 ;;
27774 +    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
27775 +       echo i${UNAME_MACHINE}-pc-mks
27776 +       exit 0 ;;
27777 +    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
27778 +       # How do we know it's Interix rather than the generic POSIX subsystem?
27779 +       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
27780 +       # UNAME_MACHINE based on the output of uname instead of i386?
27781 +       echo i586-pc-interix
27782 +       exit 0 ;;
27783 +    i*:UWIN*:*)
27784 +       echo ${UNAME_MACHINE}-pc-uwin
27785 +       exit 0 ;;
27786 +    amd64:CYGWIN*:*:*)
27787 +       echo x86_64-unknown-cygwin
27788 +       exit 0 ;;
27789 +    p*:CYGWIN*:*)
27790 +       echo powerpcle-unknown-cygwin
27791 +       exit 0 ;;
27792 +    prep*:SunOS:5.*:*)
27793 +       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
27794 +       exit 0 ;;
27795 +    *:GNU:*:*)
27796 +       # the GNU system
27797 +       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
27798 +       exit 0 ;;
27799 +    *:GNU/*:*:*)
27800 +       # other systems with GNU libc and userland
27801 +       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
27802 +       exit 0 ;;
27803 +    i*86:Minix:*:*)
27804 +       echo ${UNAME_MACHINE}-pc-minix
27805 +       exit 0 ;;
27806 +    arm*:Linux:*:*)
27807 +       echo ${UNAME_MACHINE}-${VENDOR}-linux
27808 +       exit 0 ;;
27809 +    cris:Linux:*:*)
27810 +       echo cris-axis-linux
27811 +       exit 0 ;;
27812 +    crisv32:Linux:*:*)
27813 +       echo crisv32-axis-linux
27814 +       exit 0 ;;
27815 +    frv:Linux:*:*)
27816 +       echo frv-${VENDOR}-linux
27817 +       exit 0 ;;
27818 +    ia64:Linux:*:*)
27819 +       echo ${UNAME_MACHINE}-${VENDOR}-linux
27820 +       exit 0 ;;
27821 +    m32r*:Linux:*:*)
27822 +       echo ${UNAME_MACHINE}-${VENDOR}-linux
27823 +       exit 0 ;;
27824 +    m68*:Linux:*:*)
27825 +       echo ${UNAME_MACHINE}-${VENDOR}-linux
27826 +       exit 0 ;;
27827 +    mips:Linux:*:*)
27828 +       eval $set_cc_for_build
27829 +       sed 's/^        //' << EOF >$dummy.c
27830 +       #undef CPU
27831 +       #undef mips
27832 +       #undef mipsel
27833 +       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
27834 +       CPU=mipsel
27835 +       #else
27836 +       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
27837 +       CPU=mips
27838 +       #else
27839 +       CPU=
27840 +       #endif
27841 +       #endif
27842 +EOF
27843 +       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
27844 +       test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
27845 +       ;;
27846 +    mips64:Linux:*:*)
27847 +       eval $set_cc_for_build
27848 +       sed 's/^        //' << EOF >$dummy.c
27849 +       #undef CPU
27850 +       #undef mips64
27851 +       #undef mips64el
27852 +       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
27853 +       CPU=mips64el
27854 +       #else
27855 +       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
27856 +       CPU=mips64
27857 +       #else
27858 +       CPU=
27859 +       #endif
27860 +       #endif
27861 +EOF
27862 +       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
27863 +       test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
27864 +       ;;
27865 +    ppc:Linux:*:*)
27866 +       echo powerpc-${VENDOR}-linux
27867 +       exit 0 ;;
27868 +    ppc64:Linux:*:*)
27869 +       echo powerpc64-${VENDOR}-linux
27870 +       exit 0 ;;
27871 +    alpha:Linux:*:*)
27872 +       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
27873 +         EV5)   UNAME_MACHINE=alphaev5 ;;
27874 +         EV56)  UNAME_MACHINE=alphaev56 ;;
27875 +         PCA56) UNAME_MACHINE=alphapca56 ;;
27876 +         PCA57) UNAME_MACHINE=alphapca56 ;;
27877 +         EV6)   UNAME_MACHINE=alphaev6 ;;
27878 +         EV67)  UNAME_MACHINE=alphaev67 ;;
27879 +         EV68*) UNAME_MACHINE=alphaev68 ;;
27880 +        esac
27881 +       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
27882 +       if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi
27883 +       echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC}
27884 +       exit 0 ;;
27885 +    parisc:Linux:*:* | hppa:Linux:*:*)
27886 +       # Look for CPU level
27887 +       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
27888 +         PA7*) echo hppa1.1-${VENDOR}-linux ;;
27889 +         PA8*) echo hppa2.0-${VENDOR}-linux ;;
27890 +         *)    echo hppa-${VENDOR}-linux ;;
27891 +       esac
27892 +       exit 0 ;;
27893 +    parisc64:Linux:*:* | hppa64:Linux:*:*)
27894 +       echo hppa64-${VENDOR}-linux
27895 +       exit 0 ;;
27896 +    s390:Linux:*:* | s390x:Linux:*:*)
27897 +       echo ${UNAME_MACHINE}-ibm-linux
27898 +       exit 0 ;;
27899 +    sh64*:Linux:*:*)
27900 +       echo ${UNAME_MACHINE}-${VENDOR}-linux
27901 +       exit 0 ;;
27902 +    sh*:Linux:*:*)
27903 +       echo ${UNAME_MACHINE}-${VENDOR}-linux
27904 +       exit 0 ;;
27905 +    sparc:Linux:*:* | sparc64:Linux:*:*)
27906 +       echo ${UNAME_MACHINE}-${VENDOR}-linux
27907 +       exit 0 ;;
27908 +    x86_64:Linux:*:*)
27909 +       echo x86_64-${VENDOR}-linux
27910 +       exit 0 ;;
27911 +    i*86:Linux:*:*)
27912 +       # The BFD linker knows what the default object file format is, so
27913 +       # first see if it will tell us. cd to the root directory to prevent
27914 +       # problems with other programs or directories called `ld' in the path.
27915 +       # Set LC_ALL=C to ensure ld outputs messages in English.
27916 +       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
27917 +                        | sed -ne '/supported targets:/!d
27918 +                                   s/[         ][      ]*/ /g
27919 +                                   s/.*supported targets: *//
27920 +                                   s/ .*//
27921 +                                   p'`
27922 +        case "$ld_supported_targets" in
27923 +         elf32-i386)
27924 +               TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux"
27925 +               ;;
27926 +         a.out-i386-linux)
27927 +               echo "${UNAME_MACHINE}-${VENDOR}-linuxaout"
27928 +               exit 0 ;;
27929 +         coff-i386)
27930 +               echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff"
27931 +               exit 0 ;;
27932 +         "")
27933 +               # Either a pre-BFD a.out linker (linuxoldld) or
27934 +               # one that does not give us useful --help.
27935 +               echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld"
27936 +               exit 0 ;;
27937 +       esac
27938 +       # Determine whether the default compiler is a.out or elf
27939 +       eval $set_cc_for_build
27940 +       sed 's/^        //' << EOF >$dummy.c
27941 +       #include <features.h>
27942 +       #ifdef __ELF__
27943 +       # ifdef __GLIBC__
27944 +       #  if __GLIBC__ >= 2
27945 +       LIBC=gnu
27946 +       #  else
27947 +       LIBC=gnulibc1
27948 +       #  endif
27949 +       # else
27950 +       LIBC=gnulibc1
27951 +       # endif
27952 +       #else
27953 +       #ifdef __INTEL_COMPILER
27954 +       LIBC=gnu
27955 +       #else
27956 +       LIBC=gnuaout
27957 +       #endif
27958 +       #endif
27959 +       #ifdef __dietlibc__
27960 +       LIBC=dietlibc
27961 +       #endif
27962 +EOF
27963 +       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
27964 +       test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" | sed 's/linux-gnu/linux/' && exit 0
27965 +       test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
27966 +       ;;
27967 +    i*86:DYNIX/ptx:4*:*)
27968 +       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
27969 +       # earlier versions are messed up and put the nodename in both
27970 +       # sysname and nodename.
27971 +       echo i386-sequent-sysv4
27972 +       exit 0 ;;
27973 +    i*86:UNIX_SV:4.2MP:2.*)
27974 +        # Unixware is an offshoot of SVR4, but it has its own version
27975 +        # number series starting with 2...
27976 +        # I am not positive that other SVR4 systems won't match this,
27977 +       # I just have to hope.  -- rms.
27978 +        # Use sysv4.2uw... so that sysv4* matches it.
27979 +       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
27980 +       exit 0 ;;
27981 +    i*86:OS/2:*:*)
27982 +       # If we were able to find `uname', then EMX Unix compatibility
27983 +       # is probably installed.
27984 +       echo ${UNAME_MACHINE}-pc-os2-emx
27985 +       exit 0 ;;
27986 +    i*86:XTS-300:*:STOP)
27987 +       echo ${UNAME_MACHINE}-unknown-stop
27988 +       exit 0 ;;
27989 +    i*86:atheos:*:*)
27990 +       echo ${UNAME_MACHINE}-unknown-atheos
27991 +       exit 0 ;;
27992 +       i*86:syllable:*:*)
27993 +       echo ${UNAME_MACHINE}-pc-syllable
27994 +       exit 0 ;;
27995 +    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
27996 +       echo i386-unknown-lynxos${UNAME_RELEASE}
27997 +       exit 0 ;;
27998 +    i*86:*DOS:*:*)
27999 +       echo ${UNAME_MACHINE}-pc-msdosdjgpp
28000 +       exit 0 ;;
28001 +    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
28002 +       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
28003 +       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
28004 +               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
28005 +       else
28006 +               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
28007 +       fi
28008 +       exit 0 ;;
28009 +    i*86:*:5:[78]*)
28010 +       case `/bin/uname -X | grep "^Machine"` in
28011 +           *486*)           UNAME_MACHINE=i486 ;;
28012 +           *Pentium)        UNAME_MACHINE=i586 ;;
28013 +           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
28014 +       esac
28015 +       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
28016 +       exit 0 ;;
28017 +    i*86:*:3.2:*)
28018 +       if test -f /usr/options/cb.name; then
28019 +               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
28020 +               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
28021 +       elif /bin/uname -X 2>/dev/null >/dev/null ; then
28022 +               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
28023 +               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
28024 +               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
28025 +                       && UNAME_MACHINE=i586
28026 +               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
28027 +                       && UNAME_MACHINE=i686
28028 +               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
28029 +                       && UNAME_MACHINE=i686
28030 +               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
28031 +       else
28032 +               echo ${UNAME_MACHINE}-pc-sysv32
28033 +       fi
28034 +       exit 0 ;;
28035 +    pc:*:*:*)
28036 +       # Left here for compatibility:
28037 +        # uname -m prints for DJGPP always 'pc', but it prints nothing about
28038 +        # the processor, so we play safe by assuming i386.
28039 +       echo i386-pc-msdosdjgpp
28040 +        exit 0 ;;
28041 +    Intel:Mach:3*:*)
28042 +       echo i386-pc-mach3
28043 +       exit 0 ;;
28044 +    paragon:*:*:*)
28045 +       echo i860-intel-osf1
28046 +       exit 0 ;;
28047 +    i860:*:4.*:*) # i860-SVR4
28048 +       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
28049 +         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
28050 +       else # Add other i860-SVR4 vendors below as they are discovered.
28051 +         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
28052 +       fi
28053 +       exit 0 ;;
28054 +    mini*:CTIX:SYS*5:*)
28055 +       # "miniframe"
28056 +       echo m68010-convergent-sysv
28057 +       exit 0 ;;
28058 +    mc68k:UNIX:SYSTEM5:3.51m)
28059 +       echo m68k-convergent-sysv
28060 +       exit 0 ;;
28061 +    M680?0:D-NIX:5.3:*)
28062 +       echo m68k-diab-dnix
28063 +       exit 0 ;;
28064 +    M68*:*:R3V[5678]*:*)
28065 +       test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
28066 +    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
28067 +       OS_REL=''
28068 +       test -r /etc/.relid \
28069 +       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
28070 +       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
28071 +         && echo i486-ncr-sysv4.3${OS_REL} && exit 0
28072 +       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
28073 +         && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
28074 +    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
28075 +        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
28076 +          && echo i486-ncr-sysv4 && exit 0 ;;
28077 +    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
28078 +       echo m68k-unknown-lynxos${UNAME_RELEASE}
28079 +       exit 0 ;;
28080 +    mc68030:UNIX_System_V:4.*:*)
28081 +       echo m68k-atari-sysv4
28082 +       exit 0 ;;
28083 +    TSUNAMI:LynxOS:2.*:*)
28084 +       echo sparc-unknown-lynxos${UNAME_RELEASE}
28085 +       exit 0 ;;
28086 +    rs6000:LynxOS:2.*:*)
28087 +       echo rs6000-unknown-lynxos${UNAME_RELEASE}
28088 +       exit 0 ;;
28089 +    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
28090 +       echo powerpc-unknown-lynxos${UNAME_RELEASE}
28091 +       exit 0 ;;
28092 +    SM[BE]S:UNIX_SV:*:*)
28093 +       echo mips-dde-sysv${UNAME_RELEASE}
28094 +       exit 0 ;;
28095 +    RM*:ReliantUNIX-*:*:*)
28096 +       echo mips-sni-sysv4
28097 +       exit 0 ;;
28098 +    RM*:SINIX-*:*:*)
28099 +       echo mips-sni-sysv4
28100 +       exit 0 ;;
28101 +    *:SINIX-*:*:*)
28102 +       if uname -p 2>/dev/null >/dev/null ; then
28103 +               UNAME_MACHINE=`(uname -p) 2>/dev/null`
28104 +               echo ${UNAME_MACHINE}-sni-sysv4
28105 +       else
28106 +               echo ns32k-sni-sysv
28107 +       fi
28108 +       exit 0 ;;
28109 +    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
28110 +                      # says <Richard.M.Bartel@ccMail.Census.GOV>
28111 +        echo i586-unisys-sysv4
28112 +        exit 0 ;;
28113 +    *:UNIX_System_V:4*:FTX*)
28114 +       # From Gerald Hewes <hewes@openmarket.com>.
28115 +       # How about differentiating between stratus architectures? -djm
28116 +       echo hppa1.1-stratus-sysv4
28117 +       exit 0 ;;
28118 +    *:*:*:FTX*)
28119 +       # From seanf@swdc.stratus.com.
28120 +       echo i860-stratus-sysv4
28121 +       exit 0 ;;
28122 +    *:VOS:*:*)
28123 +       # From Paul.Green@stratus.com.
28124 +       echo hppa1.1-stratus-vos
28125 +       exit 0 ;;
28126 +    mc68*:A/UX:*:*)
28127 +       echo m68k-apple-aux${UNAME_RELEASE}
28128 +       exit 0 ;;
28129 +    news*:NEWS-OS:6*:*)
28130 +       echo mips-sony-newsos6
28131 +       exit 0 ;;
28132 +    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
28133 +       if [ -d /usr/nec ]; then
28134 +               echo mips-nec-sysv${UNAME_RELEASE}
28135 +       else
28136 +               echo mips-unknown-sysv${UNAME_RELEASE}
28137 +       fi
28138 +        exit 0 ;;
28139 +    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
28140 +       echo powerpc-be-beos
28141 +       exit 0 ;;
28142 +    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
28143 +       echo powerpc-apple-beos
28144 +       exit 0 ;;
28145 +    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
28146 +       echo i586-pc-beos
28147 +       exit 0 ;;
28148 +    SX-4:SUPER-UX:*:*)
28149 +       echo sx4-nec-superux${UNAME_RELEASE}
28150 +       exit 0 ;;
28151 +    SX-5:SUPER-UX:*:*)
28152 +       echo sx5-nec-superux${UNAME_RELEASE}
28153 +       exit 0 ;;
28154 +    SX-6:SUPER-UX:*:*)
28155 +       echo sx6-nec-superux${UNAME_RELEASE}
28156 +       exit 0 ;;
28157 +    Power*:Rhapsody:*:*)
28158 +       echo powerpc-apple-rhapsody${UNAME_RELEASE}
28159 +       exit 0 ;;
28160 +    *:Rhapsody:*:*)
28161 +       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
28162 +       exit 0 ;;
28163 +    *:Darwin:*:*)
28164 +       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
28165 +       case $UNAME_PROCESSOR in
28166 +           *86) UNAME_PROCESSOR=i686 ;;
28167 +           unknown) UNAME_PROCESSOR=powerpc ;;
28168 +       esac
28169 +       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
28170 +       exit 0 ;;
28171 +    *:procnto*:*:* | *:QNX:[0123456789]*:*)
28172 +       UNAME_PROCESSOR=`uname -p`
28173 +       if test "$UNAME_PROCESSOR" = "x86"; then
28174 +               UNAME_PROCESSOR=i386
28175 +               UNAME_MACHINE=pc
28176 +       fi
28177 +       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
28178 +       exit 0 ;;
28179 +    *:QNX:*:4*)
28180 +       echo i386-pc-qnx
28181 +       exit 0 ;;
28182 +    NSE-?:NONSTOP_KERNEL:*:*)
28183 +       echo nse-tandem-nsk${UNAME_RELEASE}
28184 +       exit 0 ;;
28185 +    NSR-?:NONSTOP_KERNEL:*:*)
28186 +       echo nsr-tandem-nsk${UNAME_RELEASE}
28187 +       exit 0 ;;
28188 +    *:NonStop-UX:*:*)
28189 +       echo mips-compaq-nonstopux
28190 +       exit 0 ;;
28191 +    BS2000:POSIX*:*:*)
28192 +       echo bs2000-siemens-sysv
28193 +       exit 0 ;;
28194 +    DS/*:UNIX_System_V:*:*)
28195 +       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
28196 +       exit 0 ;;
28197 +    *:Plan9:*:*)
28198 +       # "uname -m" is not consistent, so use $cputype instead. 386
28199 +       # is converted to i386 for consistency with other x86
28200 +       # operating systems.
28201 +       if test "$cputype" = "386"; then
28202 +           UNAME_MACHINE=i386
28203 +       else
28204 +           UNAME_MACHINE="$cputype"
28205 +       fi
28206 +       echo ${UNAME_MACHINE}-unknown-plan9
28207 +       exit 0 ;;
28208 +    *:TOPS-10:*:*)
28209 +       echo pdp10-unknown-tops10
28210 +       exit 0 ;;
28211 +    *:TENEX:*:*)
28212 +       echo pdp10-unknown-tenex
28213 +       exit 0 ;;
28214 +    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
28215 +       echo pdp10-dec-tops20
28216 +       exit 0 ;;
28217 +    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
28218 +       echo pdp10-xkl-tops20
28219 +       exit 0 ;;
28220 +    *:TOPS-20:*:*)
28221 +       echo pdp10-unknown-tops20
28222 +       exit 0 ;;
28223 +    *:ITS:*:*)
28224 +       echo pdp10-unknown-its
28225 +       exit 0 ;;
28226 +    SEI:*:*:SEIUX)
28227 +        echo mips-sei-seiux${UNAME_RELEASE}
28228 +       exit 0 ;;
28229 +    *:DragonFly:*:*)
28230 +       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
28231 +       exit 0 ;;
28232 +    *:*VMS:*:*)
28233 +       UNAME_MACHINE=`(uname -p) 2>/dev/null`
28234 +       case "${UNAME_MACHINE}" in
28235 +           A*) echo alpha-dec-vms && exit 0 ;;
28236 +           I*) echo ia64-dec-vms && exit 0 ;;
28237 +           V*) echo vax-dec-vms && exit 0 ;;
28238 +       esac ;;
28239 +    *:XENIX:*:SysV)
28240 +       echo i386-pc-xenix
28241 +       exit 0 ;;
28242 +esac
28243 +
28244 +#echo '(No uname command or uname output not recognized.)' 1>&2
28245 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
28246 +
28247 +eval $set_cc_for_build
28248 +cat >$dummy.c <<EOF
28249 +#ifdef _SEQUENT_
28250 +# include <sys/types.h>
28251 +# include <sys/utsname.h>
28252 +#endif
28253 +main ()
28254 +{
28255 +#if defined (sony)
28256 +#if defined (MIPSEB)
28257 +  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
28258 +     I don't know....  */
28259 +  printf ("mips-sony-bsd\n"); exit (0);
28260 +#else
28261 +#include <sys/param.h>
28262 +  printf ("m68k-sony-newsos%s\n",
28263 +#ifdef NEWSOS4
28264 +          "4"
28265 +#else
28266 +         ""
28267 +#endif
28268 +         ); exit (0);
28269 +#endif
28270 +#endif
28271 +
28272 +#if defined (__arm) && defined (__acorn) && defined (__unix)
28273 +  printf ("arm-acorn-riscix"); exit (0);
28274 +#endif
28275 +
28276 +#if defined (hp300) && !defined (hpux)
28277 +  printf ("m68k-hp-bsd\n"); exit (0);
28278 +#endif
28279 +
28280 +#if defined (NeXT)
28281 +#if !defined (__ARCHITECTURE__)
28282 +#define __ARCHITECTURE__ "m68k"
28283 +#endif
28284 +  int version;
28285 +  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
28286 +  if (version < 4)
28287 +    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
28288 +  else
28289 +    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
28290 +  exit (0);
28291 +#endif
28292 +
28293 +#if defined (MULTIMAX) || defined (n16)
28294 +#if defined (UMAXV)
28295 +  printf ("ns32k-encore-sysv\n"); exit (0);
28296 +#else
28297 +#if defined (CMU)
28298 +  printf ("ns32k-encore-mach\n"); exit (0);
28299 +#else
28300 +  printf ("ns32k-encore-bsd\n"); exit (0);
28301 +#endif
28302 +#endif
28303 +#endif
28304 +
28305 +#if defined (__386BSD__)
28306 +  printf ("i386-pc-bsd\n"); exit (0);
28307 +#endif
28308 +
28309 +#if defined (sequent)
28310 +#if defined (i386)
28311 +  printf ("i386-sequent-dynix\n"); exit (0);
28312 +#endif
28313 +#if defined (ns32000)
28314 +  printf ("ns32k-sequent-dynix\n"); exit (0);
28315 +#endif
28316 +#endif
28317 +
28318 +#if defined (_SEQUENT_)
28319 +    struct utsname un;
28320 +
28321 +    uname(&un);
28322 +
28323 +    if (strncmp(un.version, "V2", 2) == 0) {
28324 +       printf ("i386-sequent-ptx2\n"); exit (0);
28325 +    }
28326 +    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
28327 +       printf ("i386-sequent-ptx1\n"); exit (0);
28328 +    }
28329 +    printf ("i386-sequent-ptx\n"); exit (0);
28330 +
28331 +#endif
28332 +
28333 +#if defined (vax)
28334 +# if !defined (ultrix)
28335 +#  include <sys/param.h>
28336 +#  if defined (BSD)
28337 +#   if BSD == 43
28338 +      printf ("vax-dec-bsd4.3\n"); exit (0);
28339 +#   else
28340 +#    if BSD == 199006
28341 +      printf ("vax-dec-bsd4.3reno\n"); exit (0);
28342 +#    else
28343 +      printf ("vax-dec-bsd\n"); exit (0);
28344 +#    endif
28345 +#   endif
28346 +#  else
28347 +    printf ("vax-dec-bsd\n"); exit (0);
28348 +#  endif
28349 +# else
28350 +    printf ("vax-dec-ultrix\n"); exit (0);
28351 +# endif
28352 +#endif
28353 +
28354 +#if defined (alliant) && defined (i860)
28355 +  printf ("i860-alliant-bsd\n"); exit (0);
28356 +#endif
28357 +
28358 +  exit (1);
28359 +}
28360 +EOF
28361 +
28362 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
28363 +
28364 +# Apollos put the system type in the environment.
28365 +
28366 +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
28367 +
28368 +# Convex versions that predate uname can use getsysinfo(1)
28369 +
28370 +if [ -x /usr/convex/getsysinfo ]
28371 +then
28372 +    case `getsysinfo -f cpu_type` in
28373 +    c1*)
28374 +       echo c1-convex-bsd
28375 +       exit 0 ;;
28376 +    c2*)
28377 +       if getsysinfo -f scalar_acc
28378 +       then echo c32-convex-bsd
28379 +       else echo c2-convex-bsd
28380 +       fi
28381 +       exit 0 ;;
28382 +    c34*)
28383 +       echo c34-convex-bsd
28384 +       exit 0 ;;
28385 +    c38*)
28386 +       echo c38-convex-bsd
28387 +       exit 0 ;;
28388 +    c4*)
28389 +       echo c4-convex-bsd
28390 +       exit 0 ;;
28391 +    esac
28392 +fi
28393 +
28394 +cat >&2 <<EOF
28395 +$0: unable to guess system type
28396 +
28397 +This script, last modified $timestamp, has failed to recognize
28398 +the operating system you are using. It is advised that you
28399 +download the most up to date version of the config scripts from
28400 +
28401 +    ftp://ftp.gnu.org/pub/gnu/config/
28402 +
28403 +If the version you run ($0) is already up to date, please
28404 +send the following data and any information you think might be
28405 +pertinent to <config-patches@gnu.org> in order to provide the needed
28406 +information to handle your system.
28407 +
28408 +config.guess timestamp = $timestamp
28409 +
28410 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
28411 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
28412 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
28413 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
28414 +
28415 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
28416 +/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
28417 +
28418 +hostinfo               = `(hostinfo) 2>/dev/null`
28419 +/bin/universe          = `(/bin/universe) 2>/dev/null`
28420 +/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
28421 +/bin/arch              = `(/bin/arch) 2>/dev/null`
28422 +/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
28423 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
28424 +
28425 +UNAME_MACHINE = ${UNAME_MACHINE}
28426 +UNAME_RELEASE = ${UNAME_RELEASE}
28427 +UNAME_SYSTEM  = ${UNAME_SYSTEM}
28428 +UNAME_VERSION = ${UNAME_VERSION}
28429 +EOF
28430 +
28431 +exit 1
28432 +
28433 +# Local variables:
28434 +# eval: (add-hook 'write-file-hooks 'time-stamp)
28435 +# time-stamp-start: "timestamp='"
28436 +# time-stamp-format: "%:y-%02m-%02d"
28437 +# time-stamp-end: "'"
28438 +# End:
28439 diff -Nru php-5.2.4.vanilla/libevent/config.h.in php-5.2.4.fpm/libevent/config.h.in
28440 --- php-5.2.4.vanilla/libevent/config.h.in      1970-01-01 03:00:00.000000000 +0300
28441 +++ php-5.2.4.fpm/libevent/config.h.in  2007-08-31 15:47:19.000000000 +0400
28442 @@ -0,0 +1,281 @@
28443 +/* config.h.in.  Generated from configure.in by autoheader.  */
28444 +/* Define if kqueue works correctly with pipes */
28445 +#undef HAVE_WORKING_KQUEUE
28446 +
28447 +/* Define if timeradd is defined in <sys/time.h> */
28448 +#undef HAVE_TIMERADD
28449 +#ifndef HAVE_TIMERADD
28450 +#undef timersub
28451 +#define timeradd(tvp, uvp, vvp)                                                \
28452 +       do {                                                            \
28453 +               (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec;          \
28454 +               (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec;       \
28455 +               if ((vvp)->tv_usec >= 1000000) {                        \
28456 +                       (vvp)->tv_sec++;                                \
28457 +                       (vvp)->tv_usec -= 1000000;                      \
28458 +               }                                                       \
28459 +       } while (0)
28460 +#define        timersub(tvp, uvp, vvp)                                         \
28461 +       do {                                                            \
28462 +               (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec;          \
28463 +               (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec;       \
28464 +               if ((vvp)->tv_usec < 0) {                               \
28465 +                       (vvp)->tv_sec--;                                \
28466 +                       (vvp)->tv_usec += 1000000;                      \
28467 +               }                                                       \
28468 +       } while (0)
28469 +#endif /* !HAVE_TIMERADD */
28470 +
28471 +#undef HAVE_TIMERCLEAR
28472 +#ifndef HAVE_TIMERCLEAR
28473 +#define        timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
28474 +#endif
28475 +
28476 +#undef HAVE_TIMERCMP
28477 +#ifndef HAVE_TIMERCMP
28478 +#undef timercmp
28479 +#define        timercmp(tvp, uvp, cmp)                                         \
28480 +       (((tvp)->tv_sec == (uvp)->tv_sec) ?                             \
28481 +        ((tvp)->tv_usec cmp (uvp)->tv_usec) :                          \
28482 +        ((tvp)->tv_sec cmp (uvp)->tv_sec))
28483 +#endif
28484 +
28485 +#undef HAVE_TIMERISSET
28486 +#ifndef HAVE_TIMERISSET
28487 +#undef timerisset
28488 +#define        timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
28489 +#endif
28490 +
28491 +/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
28492 +#undef HAVE_TAILQFOREACH
28493 +#ifndef HAVE_TAILQFOREACH
28494 +#define        TAILQ_FIRST(head)               ((head)->tqh_first)
28495 +#define        TAILQ_END(head)                 NULL
28496 +#define        TAILQ_NEXT(elm, field)          ((elm)->field.tqe_next)
28497 +#define TAILQ_FOREACH(var, head, field)                                        \
28498 +       for((var) = TAILQ_FIRST(head);                                  \
28499 +           (var) != TAILQ_END(head);                                   \
28500 +           (var) = TAILQ_NEXT(var, field))
28501 +#define        TAILQ_INSERT_BEFORE(listelm, elm, field) do {                   \
28502 +       (elm)->field.tqe_prev = (listelm)->field.tqe_prev;              \
28503 +       (elm)->field.tqe_next = (listelm);                              \
28504 +       *(listelm)->field.tqe_prev = (elm);                             \
28505 +       (listelm)->field.tqe_prev = &(elm)->field.tqe_next;             \
28506 +} while (0)
28507 +#endif /* TAILQ_FOREACH */
28508 +
28509 +/* Define to __FUNCTION__ or __file__ if your compiler doesn't have __func__ */
28510 +#undef __func__
28511 +
28512 +/* Define if clock_gettime is available in libc */
28513 +#undef DNS_USE_CPU_CLOCK_FOR_ID
28514 +
28515 +/* Define is no secure id variant is available */
28516 +#undef DNS_USE_GETTIMEOFDAY_FOR_ID
28517 +
28518 +/* Define to 1 if you have the `clock_gettime' function. */
28519 +#undef HAVE_CLOCK_GETTIME
28520 +
28521 +/* Define if /dev/poll is available */
28522 +#undef HAVE_DEVPOLL
28523 +
28524 +/* Define to 1 if you have the <dlfcn.h> header file. */
28525 +#undef HAVE_DLFCN_H
28526 +
28527 +/* Define if your system supports the epoll system calls */
28528 +#undef HAVE_EPOLL
28529 +
28530 +/* Define to 1 if you have the `epoll_ctl' function. */
28531 +#undef HAVE_EPOLL_CTL
28532 +
28533 +/* Define if your system supports event ports */
28534 +#undef HAVE_EVENT_PORTS
28535 +
28536 +/* Define to 1 if you have the `fcntl' function. */
28537 +#undef HAVE_FCNTL
28538 +
28539 +/* Define to 1 if you have the <fcntl.h> header file. */
28540 +#undef HAVE_FCNTL_H
28541 +
28542 +/* Define to 1 if you have the `getaddrinfo' function. */
28543 +#undef HAVE_GETADDRINFO
28544 +
28545 +/* Define to 1 if you have the `getnameinfo' function. */
28546 +#undef HAVE_GETNAMEINFO
28547 +
28548 +/* Define to 1 if you have the `gettimeofday' function. */
28549 +#undef HAVE_GETTIMEOFDAY
28550 +
28551 +/* Define to 1 if you have the `inet_ntop' function. */
28552 +#undef HAVE_INET_NTOP
28553 +
28554 +/* Define to 1 if you have the <inttypes.h> header file. */
28555 +#undef HAVE_INTTYPES_H
28556 +
28557 +/* Define to 1 if you have the `kqueue' function. */
28558 +#undef HAVE_KQUEUE
28559 +
28560 +/* Define to 1 if you have the `resolv' library (-lresolv). */
28561 +#undef HAVE_LIBRESOLV
28562 +
28563 +/* Define to 1 if you have the `socket' library (-lsocket). */
28564 +#undef HAVE_LIBSOCKET
28565 +
28566 +/* Define to 1 if you have the <memory.h> header file. */
28567 +#undef HAVE_MEMORY_H
28568 +
28569 +/* Define to 1 if you have the <netinet/in6.h> header file. */
28570 +#undef HAVE_NETINET_IN6_H
28571 +
28572 +/* Define to 1 if you have the `poll' function. */
28573 +#undef HAVE_POLL
28574 +
28575 +/* Define to 1 if you have the <poll.h> header file. */
28576 +#undef HAVE_POLL_H
28577 +
28578 +/* Define to 1 if you have the `port_create' function. */
28579 +#undef HAVE_PORT_CREATE
28580 +
28581 +/* Define to 1 if you have the <port.h> header file. */
28582 +#undef HAVE_PORT_H
28583 +
28584 +/* Define if your system supports POSIX realtime signals */
28585 +#undef HAVE_RTSIG
28586 +
28587 +/* Define to 1 if you have the `select' function. */
28588 +#undef HAVE_SELECT
28589 +
28590 +/* Define if F_SETFD is defined in <fcntl.h> */
28591 +#undef HAVE_SETFD
28592 +
28593 +/* Define to 1 if you have the <signal.h> header file. */
28594 +#undef HAVE_SIGNAL_H
28595 +
28596 +/* Define to 1 if you have the `sigtimedwait' function. */
28597 +#undef HAVE_SIGTIMEDWAIT
28598 +
28599 +/* Define to 1 if you have the <stdarg.h> header file. */
28600 +#undef HAVE_STDARG_H
28601 +
28602 +/* Define to 1 if you have the <stdint.h> header file. */
28603 +#undef HAVE_STDINT_H
28604 +
28605 +/* Define to 1 if you have the <stdlib.h> header file. */
28606 +#undef HAVE_STDLIB_H
28607 +
28608 +/* Define to 1 if you have the <strings.h> header file. */
28609 +#undef HAVE_STRINGS_H
28610 +
28611 +/* Define to 1 if you have the <string.h> header file. */
28612 +#undef HAVE_STRING_H
28613 +
28614 +/* Define to 1 if you have the `strlcpy' function. */
28615 +#undef HAVE_STRLCPY
28616 +
28617 +/* Define to 1 if you have the `strsep' function. */
28618 +#undef HAVE_STRSEP
28619 +
28620 +/* Define to 1 if you have the `strtok_r' function. */
28621 +#undef HAVE_STRTOK_R
28622 +
28623 +/* Define to 1 if the system has the type `struct in6_addr'. */
28624 +#undef HAVE_STRUCT_IN6_ADDR
28625 +
28626 +/* Define to 1 if you have the <sys/devpoll.h> header file. */
28627 +#undef HAVE_SYS_DEVPOLL_H
28628 +
28629 +/* Define to 1 if you have the <sys/epoll.h> header file. */
28630 +#undef HAVE_SYS_EPOLL_H
28631 +
28632 +/* Define to 1 if you have the <sys/event.h> header file. */
28633 +#undef HAVE_SYS_EVENT_H
28634 +
28635 +/* Define to 1 if you have the <sys/ioctl.h> header file. */
28636 +#undef HAVE_SYS_IOCTL_H
28637 +
28638 +/* Define to 1 if you have the <sys/queue.h> header file. */
28639 +#undef HAVE_SYS_QUEUE_H
28640 +
28641 +/* Define to 1 if you have the <sys/stat.h> header file. */
28642 +#undef HAVE_SYS_STAT_H
28643 +
28644 +/* Define to 1 if you have the <sys/time.h> header file. */
28645 +#undef HAVE_SYS_TIME_H
28646 +
28647 +/* Define to 1 if you have the <sys/types.h> header file. */
28648 +#undef HAVE_SYS_TYPES_H
28649 +
28650 +/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
28651 +#undef HAVE_TAILQFOREACH
28652 +
28653 +/* Define if timeradd is defined in <sys/time.h> */
28654 +#undef HAVE_TIMERADD
28655 +
28656 +/* Define if timerclear is defined in <sys/time.h> */
28657 +#undef HAVE_TIMERCLEAR
28658 +
28659 +/* Define if timercmp is defined in <sys/time.h> */
28660 +#undef HAVE_TIMERCMP
28661 +
28662 +/* Define if timerisset is defined in <sys/time.h> */
28663 +#undef HAVE_TIMERISSET
28664 +
28665 +/* Define to 1 if you have the <unistd.h> header file. */
28666 +#undef HAVE_UNISTD_H
28667 +
28668 +/* Define to 1 if you have the `vasprintf' function. */
28669 +#undef HAVE_VASPRINTF
28670 +
28671 +/* Define if kqueue works correctly with pipes */
28672 +#undef HAVE_WORKING_KQUEUE
28673 +
28674 +/* Define if realtime signals work on pipes */
28675 +#undef HAVE_WORKING_RTSIG
28676 +
28677 +/* Name of package */
28678 +#undef PACKAGE
28679 +
28680 +/* Define to the address where bug reports for this package should be sent. */
28681 +#undef PACKAGE_BUGREPORT
28682 +
28683 +/* Define to the full name of this package. */
28684 +#undef PACKAGE_NAME
28685 +
28686 +/* Define to the full name and version of this package. */
28687 +#undef PACKAGE_STRING
28688 +
28689 +/* Define to the one symbol short name of this package. */
28690 +#undef PACKAGE_TARNAME
28691 +
28692 +/* Define to the version of this package. */
28693 +#undef PACKAGE_VERSION
28694 +
28695 +/* Define to 1 if you have the ANSI C header files. */
28696 +#undef STDC_HEADERS
28697 +
28698 +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
28699 +#undef TIME_WITH_SYS_TIME
28700 +
28701 +/* Version number of package */
28702 +#undef VERSION
28703 +
28704 +/* Define to appropriate substitue if compiler doesnt have __func__ */
28705 +#undef __func__
28706 +
28707 +/* Define to empty if `const' does not conform to ANSI C. */
28708 +#undef const
28709 +
28710 +/* Define to `__inline__' or `__inline' if that's what the C compiler
28711 +   calls it, or to nothing if 'inline' is not supported under any name.  */
28712 +#ifndef __cplusplus
28713 +#undef inline
28714 +#endif
28715 +
28716 +/* Define to `int' if <sys/types.h> does not define. */
28717 +#undef pid_t
28718 +
28719 +/* Define to `unsigned' if <sys/types.h> does not define. */
28720 +#undef size_t
28721 +
28722 +/* Define to unsigned int if you dont have it */
28723 +#undef socklen_t
28724 diff -Nru php-5.2.4.vanilla/libevent/config.sub php-5.2.4.fpm/libevent/config.sub
28725 --- php-5.2.4.vanilla/libevent/config.sub       1970-01-01 03:00:00.000000000 +0300
28726 +++ php-5.2.4.fpm/libevent/config.sub   2007-08-31 15:47:19.000000000 +0400
28727 @@ -0,0 +1,1563 @@
28728 +#! /bin/sh
28729 +# Configuration validation subroutine script.
28730 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
28731 +#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
28732 +
28733 +timestamp='2005-02-10'
28734 +
28735 +# This file is (in principle) common to ALL GNU software.
28736 +# The presence of a machine in this file suggests that SOME GNU software
28737 +# can handle that machine.  It does not imply ALL GNU software can.
28738 +#
28739 +# This file is free software; you can redistribute it and/or modify
28740 +# it under the terms of the GNU General Public License as published by
28741 +# the Free Software Foundation; either version 2 of the License, or
28742 +# (at your option) any later version.
28743 +#
28744 +# This program is distributed in the hope that it will be useful,
28745 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
28746 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28747 +# GNU General Public License for more details.
28748 +#
28749 +# You should have received a copy of the GNU General Public License
28750 +# along with this program; if not, write to the Free Software
28751 +# Foundation, Inc., 59 Temple Place - Suite 330,
28752 +# Boston, MA 02111-1307, USA.
28753 +
28754 +# As a special exception to the GNU General Public License, if you
28755 +# distribute this file as part of a program that contains a
28756 +# configuration script generated by Autoconf, you may include it under
28757 +# the same distribution terms that you use for the rest of that program.
28758 +
28759 +# Please send patches to <config-patches@gnu.org>.  Submit a context
28760 +# diff and a properly formatted ChangeLog entry.
28761 +#
28762 +# Configuration subroutine to validate and canonicalize a configuration type.
28763 +# Supply the specified configuration type as an argument.
28764 +# If it is invalid, we print an error message on stderr and exit with code 1.
28765 +# Otherwise, we print the canonical config type on stdout and succeed.
28766 +
28767 +# This file is supposed to be the same for all GNU packages
28768 +# and recognize all the CPU types, system types and aliases
28769 +# that are meaningful with *any* GNU software.
28770 +# Each package is responsible for reporting which valid configurations
28771 +# it does not support.  The user should be able to distinguish
28772 +# a failure to support a valid configuration from a meaningless
28773 +# configuration.
28774 +
28775 +# The goal of this file is to map all the various variations of a given
28776 +# machine specification into a single specification in the form:
28777 +#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
28778 +# or in some cases, the newer four-part form:
28779 +#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
28780 +# It is wrong to echo any other type of specification.
28781 +
28782 +me=`echo "$0" | sed -e 's,.*/,,'`
28783 +
28784 +usage="\
28785 +Usage: $0 [OPTION] CPU-MFR-OPSYS
28786 +       $0 [OPTION] ALIAS
28787 +
28788 +Canonicalize a configuration name.
28789 +
28790 +Operation modes:
28791 +  -h, --help         print this help, then exit
28792 +  -t, --time-stamp   print date of last modification, then exit
28793 +  -v, --version      print version number, then exit
28794 +
28795 +Report bugs and patches to <config-patches@gnu.org>."
28796 +
28797 +version="\
28798 +GNU config.sub ($timestamp)
28799 +
28800 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
28801 +Free Software Foundation, Inc.
28802 +
28803 +This is free software; see the source for copying conditions.  There is NO
28804 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
28805 +
28806 +help="
28807 +Try \`$me --help' for more information."
28808 +
28809 +# Parse command line
28810 +while test $# -gt 0 ; do
28811 +  case $1 in
28812 +    --time-stamp | --time* | -t )
28813 +       echo "$timestamp" ; exit 0 ;;
28814 +    --version | -v )
28815 +       echo "$version" ; exit 0 ;;
28816 +    --help | --h* | -h )
28817 +       echo "$usage"; exit 0 ;;
28818 +    -- )     # Stop option processing
28819 +       shift; break ;;
28820 +    - )        # Use stdin as input.
28821 +       break ;;
28822 +    -* )
28823 +       echo "$me: invalid option $1$help"
28824 +       exit 1 ;;
28825 +
28826 +    *local*)
28827 +       # First pass through any local machine types.
28828 +       echo $1
28829 +       exit 0;;
28830 +
28831 +    * )
28832 +       break ;;
28833 +  esac
28834 +done
28835 +
28836 +case $# in
28837 + 0) echo "$me: missing argument$help" >&2
28838 +    exit 1;;
28839 + 1) ;;
28840 + *) echo "$me: too many arguments$help" >&2
28841 +    exit 1;;
28842 +esac
28843 +
28844 +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
28845 +# Here we must recognize all the valid KERNEL-OS combinations.
28846 +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
28847 +case $maybe_os in
28848 +  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
28849 +  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
28850 +    os=-$maybe_os
28851 +    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
28852 +    ;;
28853 +  *)
28854 +    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
28855 +    if [ $basic_machine != $1 ]
28856 +    then os=`echo $1 | sed 's/.*-/-/'`
28857 +    else os=; fi
28858 +    ;;
28859 +esac
28860 +
28861 +### Let's recognize common machines as not being operating systems so
28862 +### that things like config.sub decstation-3100 work.  We also
28863 +### recognize some manufacturers as not being operating systems, so we
28864 +### can provide default operating systems below.
28865 +case $os in
28866 +       -sun*os*)
28867 +               # Prevent following clause from handling this invalid input.
28868 +               ;;
28869 +       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
28870 +       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
28871 +       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
28872 +       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
28873 +       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
28874 +       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
28875 +       -apple | -axis | -knuth | -cray)
28876 +               os=
28877 +               basic_machine=$1
28878 +               ;;
28879 +       -sim | -cisco | -oki | -wec | -winbond)
28880 +               os=
28881 +               basic_machine=$1
28882 +               ;;
28883 +       -scout)
28884 +               ;;
28885 +       -wrs)
28886 +               os=-vxworks
28887 +               basic_machine=$1
28888 +               ;;
28889 +       -chorusos*)
28890 +               os=-chorusos
28891 +               basic_machine=$1
28892 +               ;;
28893 +       -chorusrdb)
28894 +               os=-chorusrdb
28895 +               basic_machine=$1
28896 +               ;;
28897 +       -hiux*)
28898 +               os=-hiuxwe2
28899 +               ;;
28900 +       -sco5)
28901 +               os=-sco3.2v5
28902 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
28903 +               ;;
28904 +       -sco4)
28905 +               os=-sco3.2v4
28906 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
28907 +               ;;
28908 +       -sco3.2.[4-9]*)
28909 +               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
28910 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
28911 +               ;;
28912 +       -sco3.2v[4-9]*)
28913 +               # Don't forget version if it is 3.2v4 or newer.
28914 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
28915 +               ;;
28916 +       -sco*)
28917 +               os=-sco3.2v2
28918 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
28919 +               ;;
28920 +       -udk*)
28921 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
28922 +               ;;
28923 +       -isc)
28924 +               os=-isc2.2
28925 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
28926 +               ;;
28927 +       -clix*)
28928 +               basic_machine=clipper-intergraph
28929 +               ;;
28930 +       -isc*)
28931 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
28932 +               ;;
28933 +       -lynx*)
28934 +               os=-lynxos
28935 +               ;;
28936 +       -ptx*)
28937 +               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
28938 +               ;;
28939 +       -windowsnt*)
28940 +               os=`echo $os | sed -e 's/windowsnt/winnt/'`
28941 +               ;;
28942 +       -psos*)
28943 +               os=-psos
28944 +               ;;
28945 +       -mint | -mint[0-9]*)
28946 +               basic_machine=m68k-atari
28947 +               os=-mint
28948 +               ;;
28949 +esac
28950 +
28951 +# Decode aliases for certain CPU-COMPANY combinations.
28952 +case $basic_machine in
28953 +       # Recognize the basic CPU types without company name.
28954 +       # Some are omitted here because they have special meanings below.
28955 +       1750a | 580 \
28956 +       | a29k \
28957 +       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
28958 +       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
28959 +       | am33_2.0 \
28960 +       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
28961 +       | c4x | clipper \
28962 +       | d10v | d30v | dlx | dsp16xx \
28963 +       | fr30 | frv \
28964 +       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
28965 +       | i370 | i860 | i960 | ia64 \
28966 +       | ip2k | iq2000 \
28967 +       | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
28968 +       | mips | mipsbe | mipseb | mipsel | mipsle \
28969 +       | mips16 \
28970 +       | mips64 | mips64el \
28971 +       | mips64vr | mips64vrel \
28972 +       | mips64orion | mips64orionel \
28973 +       | mips64vr4100 | mips64vr4100el \
28974 +       | mips64vr4300 | mips64vr4300el \
28975 +       | mips64vr5000 | mips64vr5000el \
28976 +       | mipsisa32 | mipsisa32el \
28977 +       | mipsisa32r2 | mipsisa32r2el \
28978 +       | mipsisa64 | mipsisa64el \
28979 +       | mipsisa64r2 | mipsisa64r2el \
28980 +       | mipsisa64sb1 | mipsisa64sb1el \
28981 +       | mipsisa64sr71k | mipsisa64sr71kel \
28982 +       | mipstx39 | mipstx39el \
28983 +       | mn10200 | mn10300 \
28984 +       | msp430 \
28985 +       | ns16k | ns32k \
28986 +       | openrisc | or32 \
28987 +       | pdp10 | pdp11 | pj | pjl \
28988 +       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
28989 +       | pyramid \
28990 +       | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
28991 +       | sh64 | sh64le \
28992 +       | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
28993 +       | strongarm \
28994 +       | tahoe | thumb | tic4x | tic80 | tron \
28995 +       | v850 | v850e \
28996 +       | we32k \
28997 +       | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
28998 +       | z8k)
28999 +               basic_machine=$basic_machine-unknown
29000 +               ;;
29001 +       m6811 | m68hc11 | m6812 | m68hc12)
29002 +               # Motorola 68HC11/12.
29003 +               basic_machine=$basic_machine-unknown
29004 +               os=-none
29005 +               ;;
29006 +       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
29007 +               ;;
29008 +
29009 +       # We use `pc' rather than `unknown'
29010 +       # because (1) that's what they normally are, and
29011 +       # (2) the word "unknown" tends to confuse beginning users.
29012 +       i*86 | x86_64)
29013 +         basic_machine=$basic_machine-pc
29014 +         ;;
29015 +       # Object if more than one company name word.
29016 +       *-*-*)
29017 +               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
29018 +               exit 1
29019 +               ;;
29020 +       # Recognize the basic CPU types with company name.
29021 +       580-* \
29022 +       | a29k-* \
29023 +       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
29024 +       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
29025 +       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
29026 +       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
29027 +       | avr-* \
29028 +       | bs2000-* \
29029 +       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
29030 +       | clipper-* | craynv-* | cydra-* \
29031 +       | d10v-* | d30v-* | dlx-* \
29032 +       | elxsi-* \
29033 +       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
29034 +       | h8300-* | h8500-* \
29035 +       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
29036 +       | i*86-* | i860-* | i960-* | ia64-* \
29037 +       | ip2k-* | iq2000-* \
29038 +       | m32r-* | m32rle-* \
29039 +       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
29040 +       | m88110-* | m88k-* | maxq-* | mcore-* \
29041 +       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
29042 +       | mips16-* \
29043 +       | mips64-* | mips64el-* \
29044 +       | mips64vr-* | mips64vrel-* \
29045 +       | mips64orion-* | mips64orionel-* \
29046 +       | mips64vr4100-* | mips64vr4100el-* \
29047 +       | mips64vr4300-* | mips64vr4300el-* \
29048 +       | mips64vr5000-* | mips64vr5000el-* \
29049 +       | mipsisa32-* | mipsisa32el-* \
29050 +       | mipsisa32r2-* | mipsisa32r2el-* \
29051 +       | mipsisa64-* | mipsisa64el-* \
29052 +       | mipsisa64r2-* | mipsisa64r2el-* \
29053 +       | mipsisa64sb1-* | mipsisa64sb1el-* \
29054 +       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
29055 +       | mipstx39-* | mipstx39el-* \
29056 +       | mmix-* \
29057 +       | msp430-* \
29058 +       | none-* | np1-* | ns16k-* | ns32k-* \
29059 +       | orion-* \
29060 +       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
29061 +       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
29062 +       | pyramid-* \
29063 +       | romp-* | rs6000-* \
29064 +       | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
29065 +       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
29066 +       | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
29067 +       | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
29068 +       | tahoe-* | thumb-* \
29069 +       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
29070 +       | tron-* \
29071 +       | v850-* | v850e-* | vax-* \
29072 +       | we32k-* \
29073 +       | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
29074 +       | xstormy16-* | xtensa-* \
29075 +       | ymp-* \
29076 +       | z8k-*)
29077 +               ;;
29078 +       # Recognize the various machine names and aliases which stand
29079 +       # for a CPU type and a company and sometimes even an OS.
29080 +       386bsd)
29081 +               basic_machine=i386-unknown
29082 +               os=-bsd
29083 +               ;;
29084 +       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
29085 +               basic_machine=m68000-att
29086 +               ;;
29087 +       3b*)
29088 +               basic_machine=we32k-att
29089 +               ;;
29090 +       a29khif)
29091 +               basic_machine=a29k-amd
29092 +               os=-udi
29093 +               ;;
29094 +       abacus)
29095 +               basic_machine=abacus-unknown
29096 +               ;;
29097 +       adobe68k)
29098 +               basic_machine=m68010-adobe
29099 +               os=-scout
29100 +               ;;
29101 +       alliant | fx80)
29102 +               basic_machine=fx80-alliant
29103 +               ;;
29104 +       altos | altos3068)
29105 +               basic_machine=m68k-altos
29106 +               ;;
29107 +       am29k)
29108 +               basic_machine=a29k-none
29109 +               os=-bsd
29110 +               ;;
29111 +       amd64)
29112 +               basic_machine=x86_64-pc
29113 +               ;;
29114 +       amd64-*)
29115 +               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
29116 +               ;;
29117 +       amdahl)
29118 +               basic_machine=580-amdahl
29119 +               os=-sysv
29120 +               ;;
29121 +       amiga | amiga-*)
29122 +               basic_machine=m68k-unknown
29123 +               ;;
29124 +       amigaos | amigados)
29125 +               basic_machine=m68k-unknown
29126 +               os=-amigaos
29127 +               ;;
29128 +       amigaunix | amix)
29129 +               basic_machine=m68k-unknown
29130 +               os=-sysv4
29131 +               ;;
29132 +       apollo68)
29133 +               basic_machine=m68k-apollo
29134 +               os=-sysv
29135 +               ;;
29136 +       apollo68bsd)
29137 +               basic_machine=m68k-apollo
29138 +               os=-bsd
29139 +               ;;
29140 +       aux)
29141 +               basic_machine=m68k-apple
29142 +               os=-aux
29143 +               ;;
29144 +       balance)
29145 +               basic_machine=ns32k-sequent
29146 +               os=-dynix
29147 +               ;;
29148 +       c90)
29149 +               basic_machine=c90-cray
29150 +               os=-unicos
29151 +               ;;
29152 +       convex-c1)
29153 +               basic_machine=c1-convex
29154 +               os=-bsd
29155 +               ;;
29156 +       convex-c2)
29157 +               basic_machine=c2-convex
29158 +               os=-bsd
29159 +               ;;
29160 +       convex-c32)
29161 +               basic_machine=c32-convex
29162 +               os=-bsd
29163 +               ;;
29164 +       convex-c34)
29165 +               basic_machine=c34-convex
29166 +               os=-bsd
29167 +               ;;
29168 +       convex-c38)
29169 +               basic_machine=c38-convex
29170 +               os=-bsd
29171 +               ;;
29172 +       cray | j90)
29173 +               basic_machine=j90-cray
29174 +               os=-unicos
29175 +               ;;
29176 +       craynv)
29177 +               basic_machine=craynv-cray
29178 +               os=-unicosmp
29179 +               ;;
29180 +       cr16c)
29181 +               basic_machine=cr16c-unknown
29182 +               os=-elf
29183 +               ;;
29184 +       crds | unos)
29185 +               basic_machine=m68k-crds
29186 +               ;;
29187 +       crisv32 | crisv32-* | etraxfs*)
29188 +               basic_machine=crisv32-axis
29189 +               ;;
29190 +       cris | cris-* | etrax*)
29191 +               basic_machine=cris-axis
29192 +               ;;
29193 +       crx)
29194 +               basic_machine=crx-unknown
29195 +               os=-elf
29196 +               ;;
29197 +       da30 | da30-*)
29198 +               basic_machine=m68k-da30
29199 +               ;;
29200 +       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
29201 +               basic_machine=mips-dec
29202 +               ;;
29203 +       decsystem10* | dec10*)
29204 +               basic_machine=pdp10-dec
29205 +               os=-tops10
29206 +               ;;
29207 +       decsystem20* | dec20*)
29208 +               basic_machine=pdp10-dec
29209 +               os=-tops20
29210 +               ;;
29211 +       delta | 3300 | motorola-3300 | motorola-delta \
29212 +             | 3300-motorola | delta-motorola)
29213 +               basic_machine=m68k-motorola
29214 +               ;;
29215 +       delta88)
29216 +               basic_machine=m88k-motorola
29217 +               os=-sysv3
29218 +               ;;
29219 +       djgpp)
29220 +               basic_machine=i586-pc
29221 +               os=-msdosdjgpp
29222 +               ;;
29223 +       dpx20 | dpx20-*)
29224 +               basic_machine=rs6000-bull
29225 +               os=-bosx
29226 +               ;;
29227 +       dpx2* | dpx2*-bull)
29228 +               basic_machine=m68k-bull
29229 +               os=-sysv3
29230 +               ;;
29231 +       ebmon29k)
29232 +               basic_machine=a29k-amd
29233 +               os=-ebmon
29234 +               ;;
29235 +       elxsi)
29236 +               basic_machine=elxsi-elxsi
29237 +               os=-bsd
29238 +               ;;
29239 +       encore | umax | mmax)
29240 +               basic_machine=ns32k-encore
29241 +               ;;
29242 +       es1800 | OSE68k | ose68k | ose | OSE)
29243 +               basic_machine=m68k-ericsson
29244 +               os=-ose
29245 +               ;;
29246 +       fx2800)
29247 +               basic_machine=i860-alliant
29248 +               ;;
29249 +       genix)
29250 +               basic_machine=ns32k-ns
29251 +               ;;
29252 +       gmicro)
29253 +               basic_machine=tron-gmicro
29254 +               os=-sysv
29255 +               ;;
29256 +       go32)
29257 +               basic_machine=i386-pc
29258 +               os=-go32
29259 +               ;;
29260 +       h3050r* | hiux*)
29261 +               basic_machine=hppa1.1-hitachi
29262 +               os=-hiuxwe2
29263 +               ;;
29264 +       h8300hms)
29265 +               basic_machine=h8300-hitachi
29266 +               os=-hms
29267 +               ;;
29268 +       h8300xray)
29269 +               basic_machine=h8300-hitachi
29270 +               os=-xray
29271 +               ;;
29272 +       h8500hms)
29273 +               basic_machine=h8500-hitachi
29274 +               os=-hms
29275 +               ;;
29276 +       harris)
29277 +               basic_machine=m88k-harris
29278 +               os=-sysv3
29279 +               ;;
29280 +       hp300-*)
29281 +               basic_machine=m68k-hp
29282 +               ;;
29283 +       hp300bsd)
29284 +               basic_machine=m68k-hp
29285 +               os=-bsd
29286 +               ;;
29287 +       hp300hpux)
29288 +               basic_machine=m68k-hp
29289 +               os=-hpux
29290 +               ;;
29291 +       hp3k9[0-9][0-9] | hp9[0-9][0-9])
29292 +               basic_machine=hppa1.0-hp
29293 +               ;;
29294 +       hp9k2[0-9][0-9] | hp9k31[0-9])
29295 +               basic_machine=m68000-hp
29296 +               ;;
29297 +       hp9k3[2-9][0-9])
29298 +               basic_machine=m68k-hp
29299 +               ;;
29300 +       hp9k6[0-9][0-9] | hp6[0-9][0-9])
29301 +               basic_machine=hppa1.0-hp
29302 +               ;;
29303 +       hp9k7[0-79][0-9] | hp7[0-79][0-9])
29304 +               basic_machine=hppa1.1-hp
29305 +               ;;
29306 +       hp9k78[0-9] | hp78[0-9])
29307 +               # FIXME: really hppa2.0-hp
29308 +               basic_machine=hppa1.1-hp
29309 +               ;;
29310 +       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
29311 +               # FIXME: really hppa2.0-hp
29312 +               basic_machine=hppa1.1-hp
29313 +               ;;
29314 +       hp9k8[0-9][13679] | hp8[0-9][13679])
29315 +               basic_machine=hppa1.1-hp
29316 +               ;;
29317 +       hp9k8[0-9][0-9] | hp8[0-9][0-9])
29318 +               basic_machine=hppa1.0-hp
29319 +               ;;
29320 +       hppa-next)
29321 +               os=-nextstep3
29322 +               ;;
29323 +       hppaosf)
29324 +               basic_machine=hppa1.1-hp
29325 +               os=-osf
29326 +               ;;
29327 +       hppro)
29328 +               basic_machine=hppa1.1-hp
29329 +               os=-proelf
29330 +               ;;
29331 +       i370-ibm* | ibm*)
29332 +               basic_machine=i370-ibm
29333 +               ;;
29334 +# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
29335 +       i*86v32)
29336 +               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
29337 +               os=-sysv32
29338 +               ;;
29339 +       i*86v4*)
29340 +               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
29341 +               os=-sysv4
29342 +               ;;
29343 +       i*86v)
29344 +               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
29345 +               os=-sysv
29346 +               ;;
29347 +       i*86sol2)
29348 +               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
29349 +               os=-solaris2
29350 +               ;;
29351 +       i386mach)
29352 +               basic_machine=i386-mach
29353 +               os=-mach
29354 +               ;;
29355 +       i386-vsta | vsta)
29356 +               basic_machine=i386-unknown
29357 +               os=-vsta
29358 +               ;;
29359 +       iris | iris4d)
29360 +               basic_machine=mips-sgi
29361 +               case $os in
29362 +                   -irix*)
29363 +                       ;;
29364 +                   *)
29365 +                       os=-irix4
29366 +                       ;;
29367 +               esac
29368 +               ;;
29369 +       isi68 | isi)
29370 +               basic_machine=m68k-isi
29371 +               os=-sysv
29372 +               ;;
29373 +       m88k-omron*)
29374 +               basic_machine=m88k-omron
29375 +               ;;
29376 +       magnum | m3230)
29377 +               basic_machine=mips-mips
29378 +               os=-sysv
29379 +               ;;
29380 +       merlin)
29381 +               basic_machine=ns32k-utek
29382 +               os=-sysv
29383 +               ;;
29384 +       mingw32)
29385 +               basic_machine=i386-pc
29386 +               os=-mingw32
29387 +               ;;
29388 +       miniframe)
29389 +               basic_machine=m68000-convergent
29390 +               ;;
29391 +       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
29392 +               basic_machine=m68k-atari
29393 +               os=-mint
29394 +               ;;
29395 +       mips3*-*)
29396 +               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
29397 +               ;;
29398 +       mips3*)
29399 +               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
29400 +               ;;
29401 +       monitor)
29402 +               basic_machine=m68k-rom68k
29403 +               os=-coff
29404 +               ;;
29405 +       morphos)
29406 +               basic_machine=powerpc-unknown
29407 +               os=-morphos
29408 +               ;;
29409 +       msdos)
29410 +               basic_machine=i386-pc
29411 +               os=-msdos
29412 +               ;;
29413 +       mvs)
29414 +               basic_machine=i370-ibm
29415 +               os=-mvs
29416 +               ;;
29417 +       ncr3000)
29418 +               basic_machine=i486-ncr
29419 +               os=-sysv4
29420 +               ;;
29421 +       netbsd386)
29422 +               basic_machine=i386-unknown
29423 +               os=-netbsd
29424 +               ;;
29425 +       netwinder)
29426 +               basic_machine=armv4l-rebel
29427 +               os=-linux
29428 +               ;;
29429 +       news | news700 | news800 | news900)
29430 +               basic_machine=m68k-sony
29431 +               os=-newsos
29432 +               ;;
29433 +       news1000)
29434 +               basic_machine=m68030-sony
29435 +               os=-newsos
29436 +               ;;
29437 +       news-3600 | risc-news)
29438 +               basic_machine=mips-sony
29439 +               os=-newsos
29440 +               ;;
29441 +       necv70)
29442 +               basic_machine=v70-nec
29443 +               os=-sysv
29444 +               ;;
29445 +       next | m*-next )
29446 +               basic_machine=m68k-next
29447 +               case $os in
29448 +                   -nextstep* )
29449 +                       ;;
29450 +                   -ns2*)
29451 +                     os=-nextstep2
29452 +                       ;;
29453 +                   *)
29454 +                     os=-nextstep3
29455 +                       ;;
29456 +               esac
29457 +               ;;
29458 +       nh3000)
29459 +               basic_machine=m68k-harris
29460 +               os=-cxux
29461 +               ;;
29462 +       nh[45]000)
29463 +               basic_machine=m88k-harris
29464 +               os=-cxux
29465 +               ;;
29466 +       nindy960)
29467 +               basic_machine=i960-intel
29468 +               os=-nindy
29469 +               ;;
29470 +       mon960)
29471 +               basic_machine=i960-intel
29472 +               os=-mon960
29473 +               ;;
29474 +       nonstopux)
29475 +               basic_machine=mips-compaq
29476 +               os=-nonstopux
29477 +               ;;
29478 +       np1)
29479 +               basic_machine=np1-gould
29480 +               ;;
29481 +       nsr-tandem)
29482 +               basic_machine=nsr-tandem
29483 +               ;;
29484 +       op50n-* | op60c-*)
29485 +               basic_machine=hppa1.1-oki
29486 +               os=-proelf
29487 +               ;;
29488 +       or32 | or32-*)
29489 +               basic_machine=or32-unknown
29490 +               os=-coff
29491 +               ;;
29492 +       os400)
29493 +               basic_machine=powerpc-ibm
29494 +               os=-os400
29495 +               ;;
29496 +       OSE68000 | ose68000)
29497 +               basic_machine=m68000-ericsson
29498 +               os=-ose
29499 +               ;;
29500 +       os68k)
29501 +               basic_machine=m68k-none
29502 +               os=-os68k
29503 +               ;;
29504 +       pa-hitachi)
29505 +               basic_machine=hppa1.1-hitachi
29506 +               os=-hiuxwe2
29507 +               ;;
29508 +       paragon)
29509 +               basic_machine=i860-intel
29510 +               os=-osf
29511 +               ;;
29512 +       pbd)
29513 +               basic_machine=sparc-tti
29514 +               ;;
29515 +       pbb)
29516 +               basic_machine=m68k-tti
29517 +               ;;
29518 +       pc532 | pc532-*)
29519 +               basic_machine=ns32k-pc532
29520 +               ;;
29521 +       pentium | p5 | k5 | k6 | nexgen | viac3)
29522 +               basic_machine=i586-pc
29523 +               ;;
29524 +       pentiumpro | p6 | 6x86 | athlon | athlon_*)
29525 +               basic_machine=i686-pc
29526 +               ;;
29527 +       pentiumii | pentium2 | pentiumiii | pentium3)
29528 +               basic_machine=i686-pc
29529 +               ;;
29530 +       pentium4)
29531 +               basic_machine=i786-pc
29532 +               ;;
29533 +       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
29534 +               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
29535 +               ;;
29536 +       pentiumpro-* | p6-* | 6x86-* | athlon-*)
29537 +               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
29538 +               ;;
29539 +       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
29540 +               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
29541 +               ;;
29542 +       pentium4-*)
29543 +               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
29544 +               ;;
29545 +       pn)
29546 +               basic_machine=pn-gould
29547 +               ;;
29548 +       power)  basic_machine=power-ibm
29549 +               ;;
29550 +       ppc)    basic_machine=powerpc-unknown
29551 +               ;;
29552 +       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
29553 +               ;;
29554 +       ppcle | powerpclittle | ppc-le | powerpc-little)
29555 +               basic_machine=powerpcle-unknown
29556 +               ;;
29557 +       ppcle-* | powerpclittle-*)
29558 +               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
29559 +               ;;
29560 +       ppc64)  basic_machine=powerpc64-unknown
29561 +               ;;
29562 +       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
29563 +               ;;
29564 +       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
29565 +               basic_machine=powerpc64le-unknown
29566 +               ;;
29567 +       ppc64le-* | powerpc64little-*)
29568 +               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
29569 +               ;;
29570 +       ps2)
29571 +               basic_machine=i386-ibm
29572 +               ;;
29573 +       pw32)
29574 +               basic_machine=i586-unknown
29575 +               os=-pw32
29576 +               ;;
29577 +       rom68k)
29578 +               basic_machine=m68k-rom68k
29579 +               os=-coff
29580 +               ;;
29581 +       rm[46]00)
29582 +               basic_machine=mips-siemens
29583 +               ;;
29584 +       rtpc | rtpc-*)
29585 +               basic_machine=romp-ibm
29586 +               ;;
29587 +       s390 | s390-*)
29588 +               basic_machine=s390-ibm
29589 +               ;;
29590 +       s390x | s390x-*)
29591 +               basic_machine=s390x-ibm
29592 +               ;;
29593 +       sa29200)
29594 +               basic_machine=a29k-amd
29595 +               os=-udi
29596 +               ;;
29597 +       sb1)
29598 +               basic_machine=mipsisa64sb1-unknown
29599 +               ;;
29600 +       sb1el)
29601 +               basic_machine=mipsisa64sb1el-unknown
29602 +               ;;
29603 +       sei)
29604 +               basic_machine=mips-sei
29605 +               os=-seiux
29606 +               ;;
29607 +       sequent)
29608 +               basic_machine=i386-sequent
29609 +               ;;
29610 +       sh)
29611 +               basic_machine=sh-hitachi
29612 +               os=-hms
29613 +               ;;
29614 +       sh64)
29615 +               basic_machine=sh64-unknown
29616 +               ;;
29617 +       sparclite-wrs | simso-wrs)
29618 +               basic_machine=sparclite-wrs
29619 +               os=-vxworks
29620 +               ;;
29621 +       sps7)
29622 +               basic_machine=m68k-bull
29623 +               os=-sysv2
29624 +               ;;
29625 +       spur)
29626 +               basic_machine=spur-unknown
29627 +               ;;
29628 +       st2000)
29629 +               basic_machine=m68k-tandem
29630 +               ;;
29631 +       stratus)
29632 +               basic_machine=i860-stratus
29633 +               os=-sysv4
29634 +               ;;
29635 +       sun2)
29636 +               basic_machine=m68000-sun
29637 +               ;;
29638 +       sun2os3)
29639 +               basic_machine=m68000-sun
29640 +               os=-sunos3
29641 +               ;;
29642 +       sun2os4)
29643 +               basic_machine=m68000-sun
29644 +               os=-sunos4
29645 +               ;;
29646 +       sun3os3)
29647 +               basic_machine=m68k-sun
29648 +               os=-sunos3
29649 +               ;;
29650 +       sun3os4)
29651 +               basic_machine=m68k-sun
29652 +               os=-sunos4
29653 +               ;;
29654 +       sun4os3)
29655 +               basic_machine=sparc-sun
29656 +               os=-sunos3
29657 +               ;;
29658 +       sun4os4)
29659 +               basic_machine=sparc-sun
29660 +               os=-sunos4
29661 +               ;;
29662 +       sun4sol2)
29663 +               basic_machine=sparc-sun
29664 +               os=-solaris2
29665 +               ;;
29666 +       sun3 | sun3-*)
29667 +               basic_machine=m68k-sun
29668 +               ;;
29669 +       sun4)
29670 +               basic_machine=sparc-sun
29671 +               ;;
29672 +       sun386 | sun386i | roadrunner)
29673 +               basic_machine=i386-sun
29674 +               ;;
29675 +       sv1)
29676 +               basic_machine=sv1-cray
29677 +               os=-unicos
29678 +               ;;
29679 +       symmetry)
29680 +               basic_machine=i386-sequent
29681 +               os=-dynix
29682 +               ;;
29683 +       t3e)
29684 +               basic_machine=alphaev5-cray
29685 +               os=-unicos
29686 +               ;;
29687 +       t90)
29688 +               basic_machine=t90-cray
29689 +               os=-unicos
29690 +               ;;
29691 +       tic54x | c54x*)
29692 +               basic_machine=tic54x-unknown
29693 +               os=-coff
29694 +               ;;
29695 +       tic55x | c55x*)
29696 +               basic_machine=tic55x-unknown
29697 +               os=-coff
29698 +               ;;
29699 +       tic6x | c6x*)
29700 +               basic_machine=tic6x-unknown
29701 +               os=-coff
29702 +               ;;
29703 +       tx39)
29704 +               basic_machine=mipstx39-unknown
29705 +               ;;
29706 +       tx39el)
29707 +               basic_machine=mipstx39el-unknown
29708 +               ;;
29709 +       toad1)
29710 +               basic_machine=pdp10-xkl
29711 +               os=-tops20
29712 +               ;;
29713 +       tower | tower-32)
29714 +               basic_machine=m68k-ncr
29715 +               ;;
29716 +       tpf)
29717 +               basic_machine=s390x-ibm
29718 +               os=-tpf
29719 +               ;;
29720 +       udi29k)
29721 +               basic_machine=a29k-amd
29722 +               os=-udi
29723 +               ;;
29724 +       ultra3)
29725 +               basic_machine=a29k-nyu
29726 +               os=-sym1
29727 +               ;;
29728 +       v810 | necv810)
29729 +               basic_machine=v810-nec
29730 +               os=-none
29731 +               ;;
29732 +       vaxv)
29733 +               basic_machine=vax-dec
29734 +               os=-sysv
29735 +               ;;
29736 +       vms)
29737 +               basic_machine=vax-dec
29738 +               os=-vms
29739 +               ;;
29740 +       vpp*|vx|vx-*)
29741 +               basic_machine=f301-fujitsu
29742 +               ;;
29743 +       vxworks960)
29744 +               basic_machine=i960-wrs
29745 +               os=-vxworks
29746 +               ;;
29747 +       vxworks68)
29748 +               basic_machine=m68k-wrs
29749 +               os=-vxworks
29750 +               ;;
29751 +       vxworks29k)
29752 +               basic_machine=a29k-wrs
29753 +               os=-vxworks
29754 +               ;;
29755 +       w65*)
29756 +               basic_machine=w65-wdc
29757 +               os=-none
29758 +               ;;
29759 +       w89k-*)
29760 +               basic_machine=hppa1.1-winbond
29761 +               os=-proelf
29762 +               ;;
29763 +       xbox)
29764 +               basic_machine=i686-pc
29765 +               os=-mingw32
29766 +               ;;
29767 +       xps | xps100)
29768 +               basic_machine=xps100-honeywell
29769 +               ;;
29770 +       ymp)
29771 +               basic_machine=ymp-cray
29772 +               os=-unicos
29773 +               ;;
29774 +       z8k-*-coff)
29775 +               basic_machine=z8k-unknown
29776 +               os=-sim
29777 +               ;;
29778 +       none)
29779 +               basic_machine=none-none
29780 +               os=-none
29781 +               ;;
29782 +
29783 +# Here we handle the default manufacturer of certain CPU types.  It is in
29784 +# some cases the only manufacturer, in others, it is the most popular.
29785 +       w89k)
29786 +               basic_machine=hppa1.1-winbond
29787 +               ;;
29788 +       op50n)
29789 +               basic_machine=hppa1.1-oki
29790 +               ;;
29791 +       op60c)
29792 +               basic_machine=hppa1.1-oki
29793 +               ;;
29794 +       romp)
29795 +               basic_machine=romp-ibm
29796 +               ;;
29797 +       mmix)
29798 +               basic_machine=mmix-knuth
29799 +               ;;
29800 +       rs6000)
29801 +               basic_machine=rs6000-ibm
29802 +               ;;
29803 +       vax)
29804 +               basic_machine=vax-dec
29805 +               ;;
29806 +       pdp10)
29807 +               # there are many clones, so DEC is not a safe bet
29808 +               basic_machine=pdp10-unknown
29809 +               ;;
29810 +       pdp11)
29811 +               basic_machine=pdp11-dec
29812 +               ;;
29813 +       we32k)
29814 +               basic_machine=we32k-att
29815 +               ;;
29816 +       sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
29817 +               basic_machine=sh-unknown
29818 +               ;;
29819 +       sh64)
29820 +               basic_machine=sh64-unknown
29821 +               ;;
29822 +       sparc | sparcv8 | sparcv9 | sparcv9b)
29823 +               basic_machine=sparc-sun
29824 +               ;;
29825 +       cydra)
29826 +               basic_machine=cydra-cydrome
29827 +               ;;
29828 +       orion)
29829 +               basic_machine=orion-highlevel
29830 +               ;;
29831 +       orion105)
29832 +               basic_machine=clipper-highlevel
29833 +               ;;
29834 +       mac | mpw | mac-mpw)
29835 +               basic_machine=m68k-apple
29836 +               ;;
29837 +       pmac | pmac-mpw)
29838 +               basic_machine=powerpc-apple
29839 +               ;;
29840 +       *-unknown)
29841 +               # Make sure to match an already-canonicalized machine name.
29842 +               ;;
29843 +       *)
29844 +               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
29845 +               exit 1
29846 +               ;;
29847 +esac
29848 +
29849 +# Here we canonicalize certain aliases for manufacturers.
29850 +case $basic_machine in
29851 +       *-digital*)
29852 +               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
29853 +               ;;
29854 +       *-commodore*)
29855 +               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
29856 +               ;;
29857 +       *)
29858 +               ;;
29859 +esac
29860 +
29861 +# Decode manufacturer-specific aliases for certain operating systems.
29862 +
29863 +if [ x"$os" != x"" ]
29864 +then
29865 +case $os in
29866 +        # First match some system type aliases
29867 +        # that might get confused with valid system types.
29868 +       # -solaris* is a basic system type, with this one exception.
29869 +       -solaris1 | -solaris1.*)
29870 +               os=`echo $os | sed -e 's|solaris1|sunos4|'`
29871 +               ;;
29872 +       -solaris)
29873 +               os=-solaris2
29874 +               ;;
29875 +       -svr4*)
29876 +               os=-sysv4
29877 +               ;;
29878 +       -unixware*)
29879 +               os=-sysv4.2uw
29880 +               ;;
29881 +       -gnu/linux*)
29882 +               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
29883 +               ;;
29884 +       # First accept the basic system types.
29885 +       # The portable systems comes first.
29886 +       # Each alternative MUST END IN A *, to match a version number.
29887 +       # -sysv* is not here because it comes later, after sysvr4.
29888 +       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
29889 +             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
29890 +             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
29891 +             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
29892 +             | -aos* \
29893 +             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
29894 +             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
29895 +             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
29896 +             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
29897 +             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
29898 +             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
29899 +             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
29900 +             | -chorusos* | -chorusrdb* \
29901 +             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
29902 +             | -mingw32* | -linux* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
29903 +             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
29904 +             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
29905 +             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
29906 +             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
29907 +             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
29908 +             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
29909 +       # Remember, each alternative MUST END IN *, to match a version number.
29910 +               ;;
29911 +       -qnx*)
29912 +               case $basic_machine in
29913 +                   x86-* | i*86-*)
29914 +                       ;;
29915 +                   *)
29916 +                       os=-nto$os
29917 +                       ;;
29918 +               esac
29919 +               ;;
29920 +       -nto-qnx*)
29921 +               ;;
29922 +       -nto*)
29923 +               os=`echo $os | sed -e 's|nto|nto-qnx|'`
29924 +               ;;
29925 +       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
29926 +             | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
29927 +             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
29928 +               ;;
29929 +       -mac*)
29930 +               os=`echo $os | sed -e 's|mac|macos|'`
29931 +               ;;
29932 +       -linux-dietlibc)
29933 +               os=-linux-dietlibc
29934 +               ;;
29935 +       -sunos5*)
29936 +               os=`echo $os | sed -e 's|sunos5|solaris2|'`
29937 +               ;;
29938 +       -sunos6*)
29939 +               os=`echo $os | sed -e 's|sunos6|solaris3|'`
29940 +               ;;
29941 +       -opened*)
29942 +               os=-openedition
29943 +               ;;
29944 +        -os400*)
29945 +               os=-os400
29946 +               ;;
29947 +       -wince*)
29948 +               os=-wince
29949 +               ;;
29950 +       -osfrose*)
29951 +               os=-osfrose
29952 +               ;;
29953 +       -osf*)
29954 +               os=-osf
29955 +               ;;
29956 +       -utek*)
29957 +               os=-bsd
29958 +               ;;
29959 +       -dynix*)
29960 +               os=-bsd
29961 +               ;;
29962 +       -acis*)
29963 +               os=-aos
29964 +               ;;
29965 +       -atheos*)
29966 +               os=-atheos
29967 +               ;;
29968 +       -syllable*)
29969 +               os=-syllable
29970 +               ;;
29971 +       -386bsd)
29972 +               os=-bsd
29973 +               ;;
29974 +       -ctix* | -uts*)
29975 +               os=-sysv
29976 +               ;;
29977 +       -nova*)
29978 +               os=-rtmk-nova
29979 +               ;;
29980 +       -ns2 )
29981 +               os=-nextstep2
29982 +               ;;
29983 +       -nsk*)
29984 +               os=-nsk
29985 +               ;;
29986 +       # Preserve the version number of sinix5.
29987 +       -sinix5.*)
29988 +               os=`echo $os | sed -e 's|sinix|sysv|'`
29989 +               ;;
29990 +       -sinix*)
29991 +               os=-sysv4
29992 +               ;;
29993 +        -tpf*)
29994 +               os=-tpf
29995 +               ;;
29996 +       -triton*)
29997 +               os=-sysv3
29998 +               ;;
29999 +       -oss*)
30000 +               os=-sysv3
30001 +               ;;
30002 +       -svr4)
30003 +               os=-sysv4
30004 +               ;;
30005 +       -svr3)
30006 +               os=-sysv3
30007 +               ;;
30008 +       -sysvr4)
30009 +               os=-sysv4
30010 +               ;;
30011 +       # This must come after -sysvr4.
30012 +       -sysv*)
30013 +               ;;
30014 +       -ose*)
30015 +               os=-ose
30016 +               ;;
30017 +       -es1800*)
30018 +               os=-ose
30019 +               ;;
30020 +       -xenix)
30021 +               os=-xenix
30022 +               ;;
30023 +       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
30024 +               os=-mint
30025 +               ;;
30026 +       -aros*)
30027 +               os=-aros
30028 +               ;;
30029 +       -kaos*)
30030 +               os=-kaos
30031 +               ;;
30032 +       -zvmoe)
30033 +               os=-zvmoe
30034 +               ;;
30035 +       -none)
30036 +               ;;
30037 +       *)
30038 +               # Get rid of the `-' at the beginning of $os.
30039 +               os=`echo $os | sed 's/[^-]*-//'`
30040 +               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
30041 +               exit 1
30042 +               ;;
30043 +esac
30044 +else
30045 +
30046 +# Here we handle the default operating systems that come with various machines.
30047 +# The value should be what the vendor currently ships out the door with their
30048 +# machine or put another way, the most popular os provided with the machine.
30049 +
30050 +# Note that if you're going to try to match "-MANUFACTURER" here (say,
30051 +# "-sun"), then you have to tell the case statement up towards the top
30052 +# that MANUFACTURER isn't an operating system.  Otherwise, code above
30053 +# will signal an error saying that MANUFACTURER isn't an operating
30054 +# system, and we'll never get to this point.
30055 +
30056 +case $basic_machine in
30057 +       *-acorn)
30058 +               os=-riscix1.2
30059 +               ;;
30060 +       arm*-rebel)
30061 +               os=-linux
30062 +               ;;
30063 +       arm*-semi)
30064 +               os=-aout
30065 +               ;;
30066 +    c4x-* | tic4x-*)
30067 +        os=-coff
30068 +        ;;
30069 +       # This must come before the *-dec entry.
30070 +       pdp10-*)
30071 +               os=-tops20
30072 +               ;;
30073 +       pdp11-*)
30074 +               os=-none
30075 +               ;;
30076 +       *-dec | vax-*)
30077 +               os=-ultrix4.2
30078 +               ;;
30079 +       m68*-apollo)
30080 +               os=-domain
30081 +               ;;
30082 +       i386-sun)
30083 +               os=-sunos4.0.2
30084 +               ;;
30085 +       m68000-sun)
30086 +               os=-sunos3
30087 +               # This also exists in the configure program, but was not the
30088 +               # default.
30089 +               # os=-sunos4
30090 +               ;;
30091 +       m68*-cisco)
30092 +               os=-aout
30093 +               ;;
30094 +       mips*-cisco)
30095 +               os=-elf
30096 +               ;;
30097 +       mips*-*)
30098 +               os=-elf
30099 +               ;;
30100 +       or32-*)
30101 +               os=-coff
30102 +               ;;
30103 +       *-tti)  # must be before sparc entry or we get the wrong os.
30104 +               os=-sysv3
30105 +               ;;
30106 +       sparc-* | *-sun)
30107 +               os=-sunos4.1.1
30108 +               ;;
30109 +       *-be)
30110 +               os=-beos
30111 +               ;;
30112 +       *-ibm)
30113 +               os=-aix
30114 +               ;;
30115 +       *-knuth)
30116 +               os=-mmixware
30117 +               ;;
30118 +       *-wec)
30119 +               os=-proelf
30120 +               ;;
30121 +       *-winbond)
30122 +               os=-proelf
30123 +               ;;
30124 +       *-oki)
30125 +               os=-proelf
30126 +               ;;
30127 +       *-hp)
30128 +               os=-hpux
30129 +               ;;
30130 +       *-hitachi)
30131 +               os=-hiux
30132 +               ;;
30133 +       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
30134 +               os=-sysv
30135 +               ;;
30136 +       *-cbm)
30137 +               os=-amigaos
30138 +               ;;
30139 +       *-dg)
30140 +               os=-dgux
30141 +               ;;
30142 +       *-dolphin)
30143 +               os=-sysv3
30144 +               ;;
30145 +       m68k-ccur)
30146 +               os=-rtu
30147 +               ;;
30148 +       m88k-omron*)
30149 +               os=-luna
30150 +               ;;
30151 +       *-next )
30152 +               os=-nextstep
30153 +               ;;
30154 +       *-sequent)
30155 +               os=-ptx
30156 +               ;;
30157 +       *-crds)
30158 +               os=-unos
30159 +               ;;
30160 +       *-ns)
30161 +               os=-genix
30162 +               ;;
30163 +       i370-*)
30164 +               os=-mvs
30165 +               ;;
30166 +       *-next)
30167 +               os=-nextstep3
30168 +               ;;
30169 +       *-gould)
30170 +               os=-sysv
30171 +               ;;
30172 +       *-highlevel)
30173 +               os=-bsd
30174 +               ;;
30175 +       *-encore)
30176 +               os=-bsd
30177 +               ;;
30178 +       *-sgi)
30179 +               os=-irix
30180 +               ;;
30181 +       *-siemens)
30182 +               os=-sysv4
30183 +               ;;
30184 +       *-masscomp)
30185 +               os=-rtu
30186 +               ;;
30187 +       f30[01]-fujitsu | f700-fujitsu)
30188 +               os=-uxpv
30189 +               ;;
30190 +       *-rom68k)
30191 +               os=-coff
30192 +               ;;
30193 +       *-*bug)
30194 +               os=-coff
30195 +               ;;
30196 +       *-apple)
30197 +               os=-macos
30198 +               ;;
30199 +       *-atari*)
30200 +               os=-mint
30201 +               ;;
30202 +       *)
30203 +               os=-none
30204 +               ;;
30205 +esac
30206 +fi
30207 +
30208 +# Here we handle the case where we know the os, and the CPU type, but not the
30209 +# manufacturer.  We pick the logical manufacturer.
30210 +vendor=unknown
30211 +case $basic_machine in
30212 +       *-unknown)
30213 +               case $os in
30214 +                       -riscix*)
30215 +                               vendor=acorn
30216 +                               ;;
30217 +                       -sunos*)
30218 +                               vendor=sun
30219 +                               ;;
30220 +                       -aix*)
30221 +                               vendor=ibm
30222 +                               ;;
30223 +                       -beos*)
30224 +                               vendor=be
30225 +                               ;;
30226 +                       -hpux*)
30227 +                               vendor=hp
30228 +                               ;;
30229 +                       -mpeix*)
30230 +                               vendor=hp
30231 +                               ;;
30232 +                       -hiux*)
30233 +                               vendor=hitachi
30234 +                               ;;
30235 +                       -unos*)
30236 +                               vendor=crds
30237 +                               ;;
30238 +                       -dgux*)
30239 +                               vendor=dg
30240 +                               ;;
30241 +                       -luna*)
30242 +                               vendor=omron
30243 +                               ;;
30244 +                       -genix*)
30245 +                               vendor=ns
30246 +                               ;;
30247 +                       -mvs* | -opened*)
30248 +                               vendor=ibm
30249 +                               ;;
30250 +                       -os400*)
30251 +                               vendor=ibm
30252 +                               ;;
30253 +                       -ptx*)
30254 +                               vendor=sequent
30255 +                               ;;
30256 +                       -tpf*)
30257 +                               vendor=ibm
30258 +                               ;;
30259 +                       -vxsim* | -vxworks* | -windiss*)
30260 +                               vendor=wrs
30261 +                               ;;
30262 +                       -aux*)
30263 +                               vendor=apple
30264 +                               ;;
30265 +                       -hms*)
30266 +                               vendor=hitachi
30267 +                               ;;
30268 +                       -mpw* | -macos*)
30269 +                               vendor=apple
30270 +                               ;;
30271 +                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
30272 +                               vendor=atari
30273 +                               ;;
30274 +                       -vos*)
30275 +                               vendor=stratus
30276 +                               ;;
30277 +               esac
30278 +               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
30279 +               ;;
30280 +esac
30281 +
30282 +echo $basic_machine$os
30283 +exit 0
30284 +
30285 +# Local variables:
30286 +# eval: (add-hook 'write-file-hooks 'time-stamp)
30287 +# time-stamp-start: "timestamp='"
30288 +# time-stamp-format: "%:y-%02m-%02d"
30289 +# time-stamp-end: "'"
30290 +# End:
30291 diff -Nru php-5.2.4.vanilla/libevent/configure php-5.2.4.fpm/libevent/configure
30292 --- php-5.2.4.vanilla/libevent/configure        1970-01-01 03:00:00.000000000 +0300
30293 +++ php-5.2.4.fpm/libevent/configure    2007-08-31 15:47:19.000000000 +0400
30294 @@ -0,0 +1,23380 @@
30295 +#! /bin/sh
30296 +# Guess values for system-dependent variables and create Makefiles.
30297 +# Generated by GNU Autoconf 2.59.
30298 +#
30299 +# Copyright (C) 2003 Free Software Foundation, Inc.
30300 +# This configure script is free software; the Free Software Foundation
30301 +# gives unlimited permission to copy, distribute and modify it.
30302 +## --------------------- ##
30303 +## M4sh Initialization.  ##
30304 +## --------------------- ##
30305 +
30306 +# Be Bourne compatible
30307 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
30308 +  emulate sh
30309 +  NULLCMD=:
30310 +  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
30311 +  # is contrary to our usage.  Disable this feature.
30312 +  alias -g '${1+"$@"}'='"$@"'
30313 +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30314 +  set -o posix
30315 +fi
30316 +DUALCASE=1; export DUALCASE # for MKS sh
30317 +
30318 +# Support unset when possible.
30319 +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30320 +  as_unset=unset
30321 +else
30322 +  as_unset=false
30323 +fi
30324 +
30325 +
30326 +# Work around bugs in pre-3.0 UWIN ksh.
30327 +$as_unset ENV MAIL MAILPATH
30328 +PS1='$ '
30329 +PS2='> '
30330 +PS4='+ '
30331 +
30332 +# NLS nuisances.
30333 +for as_var in \
30334 +  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
30335 +  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
30336 +  LC_TELEPHONE LC_TIME
30337 +do
30338 +  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
30339 +    eval $as_var=C; export $as_var
30340 +  else
30341 +    $as_unset $as_var
30342 +  fi
30343 +done
30344 +
30345 +# Required to use basename.
30346 +if expr a : '\(a\)' >/dev/null 2>&1; then
30347 +  as_expr=expr
30348 +else
30349 +  as_expr=false
30350 +fi
30351 +
30352 +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
30353 +  as_basename=basename
30354 +else
30355 +  as_basename=false
30356 +fi
30357 +
30358 +
30359 +# Name of the executable.
30360 +as_me=`$as_basename "$0" ||
30361 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30362 +        X"$0" : 'X\(//\)$' \| \
30363 +        X"$0" : 'X\(/\)$' \| \
30364 +        .     : '\(.\)' 2>/dev/null ||
30365 +echo X/"$0" |
30366 +    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
30367 +         /^X\/\(\/\/\)$/{ s//\1/; q; }
30368 +         /^X\/\(\/\).*/{ s//\1/; q; }
30369 +         s/.*/./; q'`
30370 +
30371 +
30372 +# PATH needs CR, and LINENO needs CR and PATH.
30373 +# Avoid depending upon Character Ranges.
30374 +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30375 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30376 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30377 +as_cr_digits='0123456789'
30378 +as_cr_alnum=$as_cr_Letters$as_cr_digits
30379 +
30380 +# The user is always right.
30381 +if test "${PATH_SEPARATOR+set}" != set; then
30382 +  echo "#! /bin/sh" >conf$$.sh
30383 +  echo  "exit 0"   >>conf$$.sh
30384 +  chmod +x conf$$.sh
30385 +  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
30386 +    PATH_SEPARATOR=';'
30387 +  else
30388 +    PATH_SEPARATOR=:
30389 +  fi
30390 +  rm -f conf$$.sh
30391 +fi
30392 +
30393 +
30394 +  as_lineno_1=$LINENO
30395 +  as_lineno_2=$LINENO
30396 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
30397 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
30398 +  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
30399 +  # Find who we are.  Look in the path if we contain no path at all
30400 +  # relative or not.
30401 +  case $0 in
30402 +    *[\\/]* ) as_myself=$0 ;;
30403 +    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30404 +for as_dir in $PATH
30405 +do
30406 +  IFS=$as_save_IFS
30407 +  test -z "$as_dir" && as_dir=.
30408 +  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
30409 +done
30410 +
30411 +       ;;
30412 +  esac
30413 +  # We did not find ourselves, most probably we were run as `sh COMMAND'
30414 +  # in which case we are not to be found in the path.
30415 +  if test "x$as_myself" = x; then
30416 +    as_myself=$0
30417 +  fi
30418 +  if test ! -f "$as_myself"; then
30419 +    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
30420 +   { (exit 1); exit 1; }; }
30421 +  fi
30422 +  case $CONFIG_SHELL in
30423 +  '')
30424 +    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30425 +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
30426 +do
30427 +  IFS=$as_save_IFS
30428 +  test -z "$as_dir" && as_dir=.
30429 +  for as_base in sh bash ksh sh5; do
30430 +        case $as_dir in
30431 +        /*)
30432 +          if ("$as_dir/$as_base" -c '
30433 +  as_lineno_1=$LINENO
30434 +  as_lineno_2=$LINENO
30435 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
30436 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
30437 +  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
30438 +            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
30439 +            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
30440 +            CONFIG_SHELL=$as_dir/$as_base
30441 +            export CONFIG_SHELL
30442 +            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
30443 +          fi;;
30444 +        esac
30445 +       done
30446 +done
30447 +;;
30448 +  esac
30449 +
30450 +  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
30451 +  # uniformly replaced by the line number.  The first 'sed' inserts a
30452 +  # line-number line before each line; the second 'sed' does the real
30453 +  # work.  The second script uses 'N' to pair each line-number line
30454 +  # with the numbered line, and appends trailing '-' during
30455 +  # substitution so that $LINENO is not a special case at line end.
30456 +  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
30457 +  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
30458 +  sed '=' <$as_myself |
30459 +    sed '
30460 +      N
30461 +      s,$,-,
30462 +      : loop
30463 +      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
30464 +      t loop
30465 +      s,-$,,
30466 +      s,^['$as_cr_digits']*\n,,
30467 +    ' >$as_me.lineno &&
30468 +  chmod +x $as_me.lineno ||
30469 +    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
30470 +   { (exit 1); exit 1; }; }
30471 +
30472 +  # Don't try to exec as it changes $[0], causing all sort of problems
30473 +  # (the dirname of $[0] is not the place where we might find the
30474 +  # original and so on.  Autoconf is especially sensible to this).
30475 +  . ./$as_me.lineno
30476 +  # Exit status is that of the last command.
30477 +  exit
30478 +}
30479 +
30480 +
30481 +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
30482 +  *c*,-n*) ECHO_N= ECHO_C='
30483 +' ECHO_T='     ' ;;
30484 +  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
30485 +  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
30486 +esac
30487 +
30488 +if expr a : '\(a\)' >/dev/null 2>&1; then
30489 +  as_expr=expr
30490 +else
30491 +  as_expr=false
30492 +fi
30493 +
30494 +rm -f conf$$ conf$$.exe conf$$.file
30495 +echo >conf$$.file
30496 +if ln -s conf$$.file conf$$ 2>/dev/null; then
30497 +  # We could just check for DJGPP; but this test a) works b) is more generic
30498 +  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
30499 +  if test -f conf$$.exe; then
30500 +    # Don't use ln at all; we don't have any links
30501 +    as_ln_s='cp -p'
30502 +  else
30503 +    as_ln_s='ln -s'
30504 +  fi
30505 +elif ln conf$$.file conf$$ 2>/dev/null; then
30506 +  as_ln_s=ln
30507 +else
30508 +  as_ln_s='cp -p'
30509 +fi
30510 +rm -f conf$$ conf$$.exe conf$$.file
30511 +
30512 +if mkdir -p . 2>/dev/null; then
30513 +  as_mkdir_p=:
30514 +else
30515 +  test -d ./-p && rmdir ./-p
30516 +  as_mkdir_p=false
30517 +fi
30518 +
30519 +as_executable_p="test -f"
30520 +
30521 +# Sed expression to map a string onto a valid CPP name.
30522 +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
30523 +
30524 +# Sed expression to map a string onto a valid variable name.
30525 +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
30526 +
30527 +
30528 +# IFS
30529 +# We need space, tab and new line, in precisely that order.
30530 +as_nl='
30531 +'
30532 +IFS="  $as_nl"
30533 +
30534 +# CDPATH.
30535 +$as_unset CDPATH
30536 +
30537 +
30538 +
30539 +# Check that we are running under the correct shell.
30540 +SHELL=${CONFIG_SHELL-/bin/sh}
30541 +
30542 +case X$ECHO in
30543 +X*--fallback-echo)
30544 +  # Remove one level of quotation (which was required for Make).
30545 +  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
30546 +  ;;
30547 +esac
30548 +
30549 +echo=${ECHO-echo}
30550 +if test "X$1" = X--no-reexec; then
30551 +  # Discard the --no-reexec flag, and continue.
30552 +  shift
30553 +elif test "X$1" = X--fallback-echo; then
30554 +  # Avoid inline document here, it may be left over
30555 +  :
30556 +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
30557 +  # Yippee, $echo works!
30558 +  :
30559 +else
30560 +  # Restart under the correct shell.
30561 +  exec $SHELL "$0" --no-reexec ${1+"$@"}
30562 +fi
30563 +
30564 +if test "X$1" = X--fallback-echo; then
30565 +  # used as fallback echo
30566 +  shift
30567 +  cat <<EOF
30568 +$*
30569 +EOF
30570 +  exit 0
30571 +fi
30572 +
30573 +# The HP-UX ksh and POSIX shell print the target directory to stdout
30574 +# if CDPATH is set.
30575 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
30576 +
30577 +if test -z "$ECHO"; then
30578 +if test "X${echo_test_string+set}" != Xset; then
30579 +# find a string as large as possible, as long as the shell can cope with it
30580 +  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
30581 +    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
30582 +    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
30583 +       echo_test_string="`eval $cmd`" &&
30584 +       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
30585 +    then
30586 +      break
30587 +    fi
30588 +  done
30589 +fi
30590 +
30591 +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
30592 +   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
30593 +   test "X$echo_testing_string" = "X$echo_test_string"; then
30594 +  :
30595 +else
30596 +  # The Solaris, AIX, and Digital Unix default echo programs unquote
30597 +  # backslashes.  This makes it impossible to quote backslashes using
30598 +  #   echo "$something" | sed 's/\\/\\\\/g'
30599 +  #
30600 +  # So, first we look for a working echo in the user's PATH.
30601 +
30602 +  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
30603 +  for dir in $PATH /usr/ucb; do
30604 +    IFS="$lt_save_ifs"
30605 +    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
30606 +       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
30607 +       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
30608 +       test "X$echo_testing_string" = "X$echo_test_string"; then
30609 +      echo="$dir/echo"
30610 +      break
30611 +    fi
30612 +  done
30613 +  IFS="$lt_save_ifs"
30614 +
30615 +  if test "X$echo" = Xecho; then
30616 +    # We didn't find a better echo, so look for alternatives.
30617 +    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
30618 +       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
30619 +       test "X$echo_testing_string" = "X$echo_test_string"; then
30620 +      # This shell has a builtin print -r that does the trick.
30621 +      echo='print -r'
30622 +    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
30623 +        test "X$CONFIG_SHELL" != X/bin/ksh; then
30624 +      # If we have ksh, try running configure again with it.
30625 +      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
30626 +      export ORIGINAL_CONFIG_SHELL
30627 +      CONFIG_SHELL=/bin/ksh
30628 +      export CONFIG_SHELL
30629 +      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
30630 +    else
30631 +      # Try using printf.
30632 +      echo='printf %s\n'
30633 +      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
30634 +        echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
30635 +        test "X$echo_testing_string" = "X$echo_test_string"; then
30636 +       # Cool, printf works
30637 +       :
30638 +      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
30639 +          test "X$echo_testing_string" = 'X\t' &&
30640 +          echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
30641 +          test "X$echo_testing_string" = "X$echo_test_string"; then
30642 +       CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
30643 +       export CONFIG_SHELL
30644 +       SHELL="$CONFIG_SHELL"
30645 +       export SHELL
30646 +       echo="$CONFIG_SHELL $0 --fallback-echo"
30647 +      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
30648 +          test "X$echo_testing_string" = 'X\t' &&
30649 +          echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
30650 +          test "X$echo_testing_string" = "X$echo_test_string"; then
30651 +       echo="$CONFIG_SHELL $0 --fallback-echo"
30652 +      else
30653 +       # maybe with a smaller string...
30654 +       prev=:
30655 +
30656 +       for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
30657 +         if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
30658 +         then
30659 +           break
30660 +         fi
30661 +         prev="$cmd"
30662 +       done
30663 +
30664 +       if test "$prev" != 'sed 50q "$0"'; then
30665 +         echo_test_string=`eval $prev`
30666 +         export echo_test_string
30667 +         exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
30668 +       else
30669 +         # Oops.  We lost completely, so just stick with echo.
30670 +         echo=echo
30671 +       fi
30672 +      fi
30673 +    fi
30674 +  fi
30675 +fi
30676 +fi
30677 +
30678 +# Copy echo and quote the copy suitably for passing to libtool from
30679 +# the Makefile, instead of quoting the original, which is used later.
30680 +ECHO=$echo
30681 +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
30682 +   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
30683 +fi
30684 +
30685 +
30686 +
30687 +
30688 +tagnames=${tagnames+${tagnames},}CXX
30689 +
30690 +tagnames=${tagnames+${tagnames},}F77
30691 +
30692 +# Name of the host.
30693 +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
30694 +# so uname gets run too.
30695 +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
30696 +
30697 +exec 6>&1
30698 +
30699 +#
30700 +# Initializations.
30701 +#
30702 +ac_default_prefix=/usr/local
30703 +ac_config_libobj_dir=.
30704 +cross_compiling=no
30705 +subdirs=
30706 +MFLAGS=
30707 +MAKEFLAGS=
30708 +SHELL=${CONFIG_SHELL-/bin/sh}
30709 +
30710 +# Maximum number of lines to put in a shell here document.
30711 +# This variable seems obsolete.  It should probably be removed, and
30712 +# only ac_max_sed_lines should be used.
30713 +: ${ac_max_here_lines=38}
30714 +
30715 +# Identity of this package.
30716 +PACKAGE_NAME=
30717 +PACKAGE_TARNAME=
30718 +PACKAGE_VERSION=
30719 +PACKAGE_STRING=
30720 +PACKAGE_BUGREPORT=
30721 +
30722 +ac_unique_file="event.c"
30723 +# Factoring default headers for most tests.
30724 +ac_includes_default="\
30725 +#include <stdio.h>
30726 +#if HAVE_SYS_TYPES_H
30727 +# include <sys/types.h>
30728 +#endif
30729 +#if HAVE_SYS_STAT_H
30730 +# include <sys/stat.h>
30731 +#endif
30732 +#if STDC_HEADERS
30733 +# include <stdlib.h>
30734 +# include <stddef.h>
30735 +#else
30736 +# if HAVE_STDLIB_H
30737 +#  include <stdlib.h>
30738 +# endif
30739 +#endif
30740 +#if HAVE_STRING_H
30741 +# if !STDC_HEADERS && HAVE_MEMORY_H
30742 +#  include <memory.h>
30743 +# endif
30744 +# include <string.h>
30745 +#endif
30746 +#if HAVE_STRINGS_H
30747 +# include <strings.h>
30748 +#endif
30749 +#if HAVE_INTTYPES_H
30750 +# include <inttypes.h>
30751 +#else
30752 +# if HAVE_STDINT_H
30753 +#  include <stdint.h>
30754 +# endif
30755 +#endif
30756 +#if HAVE_UNISTD_H
30757 +# include <unistd.h>
30758 +#endif"
30759 +
30760 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBTOOL_DEPS BUILD_WIN32_TRUE BUILD_WIN32_FALSE LIBOBJS LTLIBOBJS'
30761 +ac_subst_files=''
30762 +
30763 +# Initialize some variables set by options.
30764 +ac_init_help=
30765 +ac_init_version=false
30766 +# The variables have the same names as the options, with
30767 +# dashes changed to underlines.
30768 +cache_file=/dev/null
30769 +exec_prefix=NONE
30770 +no_create=
30771 +no_recursion=
30772 +prefix=NONE
30773 +program_prefix=NONE
30774 +program_suffix=NONE
30775 +program_transform_name=s,x,x,
30776 +silent=
30777 +site=
30778 +srcdir=
30779 +verbose=
30780 +x_includes=NONE
30781 +x_libraries=NONE
30782 +
30783 +# Installation directory options.
30784 +# These are left unexpanded so users can "make install exec_prefix=/foo"
30785 +# and all the variables that are supposed to be based on exec_prefix
30786 +# by default will actually change.
30787 +# Use braces instead of parens because sh, perl, etc. also accept them.
30788 +bindir='${exec_prefix}/bin'
30789 +sbindir='${exec_prefix}/sbin'
30790 +libexecdir='${exec_prefix}/libexec'
30791 +datadir='${prefix}/share'
30792 +sysconfdir='${prefix}/etc'
30793 +sharedstatedir='${prefix}/com'
30794 +localstatedir='${prefix}/var'
30795 +libdir='${exec_prefix}/lib'
30796 +includedir='${prefix}/include'
30797 +oldincludedir='/usr/include'
30798 +infodir='${prefix}/info'
30799 +mandir='${prefix}/man'
30800 +
30801 +ac_prev=
30802 +for ac_option
30803 +do
30804 +  # If the previous option needs an argument, assign it.
30805 +  if test -n "$ac_prev"; then
30806 +    eval "$ac_prev=\$ac_option"
30807 +    ac_prev=
30808 +    continue
30809 +  fi
30810 +
30811 +  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
30812 +
30813 +  # Accept the important Cygnus configure options, so we can diagnose typos.
30814 +
30815 +  case $ac_option in
30816 +
30817 +  -bindir | --bindir | --bindi | --bind | --bin | --bi)
30818 +    ac_prev=bindir ;;
30819 +  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
30820 +    bindir=$ac_optarg ;;
30821 +
30822 +  -build | --build | --buil | --bui | --bu)
30823 +    ac_prev=build_alias ;;
30824 +  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
30825 +    build_alias=$ac_optarg ;;
30826 +
30827 +  -cache-file | --cache-file | --cache-fil | --cache-fi \
30828 +  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
30829 +    ac_prev=cache_file ;;
30830 +  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
30831 +  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
30832 +    cache_file=$ac_optarg ;;
30833 +
30834 +  --config-cache | -C)
30835 +    cache_file=config.cache ;;
30836 +
30837 +  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
30838 +    ac_prev=datadir ;;
30839 +  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
30840 +  | --da=*)
30841 +    datadir=$ac_optarg ;;
30842 +
30843 +  -disable-* | --disable-*)
30844 +    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
30845 +    # Reject names that are not valid shell variable names.
30846 +    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
30847 +      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
30848 +   { (exit 1); exit 1; }; }
30849 +    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
30850 +    eval "enable_$ac_feature=no" ;;
30851 +
30852 +  -enable-* | --enable-*)
30853 +    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
30854 +    # Reject names that are not valid shell variable names.
30855 +    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
30856 +      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
30857 +   { (exit 1); exit 1; }; }
30858 +    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
30859 +    case $ac_option in
30860 +      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
30861 +      *) ac_optarg=yes ;;
30862 +    esac
30863 +    eval "enable_$ac_feature='$ac_optarg'" ;;
30864 +
30865 +  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
30866 +  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
30867 +  | --exec | --exe | --ex)
30868 +    ac_prev=exec_prefix ;;
30869 +  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
30870 +  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
30871 +  | --exec=* | --exe=* | --ex=*)
30872 +    exec_prefix=$ac_optarg ;;
30873 +
30874 +  -gas | --gas | --ga | --g)
30875 +    # Obsolete; use --with-gas.
30876 +    with_gas=yes ;;
30877 +
30878 +  -help | --help | --hel | --he | -h)
30879 +    ac_init_help=long ;;
30880 +  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
30881 +    ac_init_help=recursive ;;
30882 +  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
30883 +    ac_init_help=short ;;
30884 +
30885 +  -host | --host | --hos | --ho)
30886 +    ac_prev=host_alias ;;
30887 +  -host=* | --host=* | --hos=* | --ho=*)
30888 +    host_alias=$ac_optarg ;;
30889 +
30890 +  -includedir | --includedir | --includedi | --included | --include \
30891 +  | --includ | --inclu | --incl | --inc)
30892 +    ac_prev=includedir ;;
30893 +  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
30894 +  | --includ=* | --inclu=* | --incl=* | --inc=*)
30895 +    includedir=$ac_optarg ;;
30896 +
30897 +  -infodir | --infodir | --infodi | --infod | --info | --inf)
30898 +    ac_prev=infodir ;;
30899 +  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
30900 +    infodir=$ac_optarg ;;
30901 +
30902 +  -libdir | --libdir | --libdi | --libd)
30903 +    ac_prev=libdir ;;
30904 +  -libdir=* | --libdir=* | --libdi=* | --libd=*)
30905 +    libdir=$ac_optarg ;;
30906 +
30907 +  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
30908 +  | --libexe | --libex | --libe)
30909 +    ac_prev=libexecdir ;;
30910 +  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
30911 +  | --libexe=* | --libex=* | --libe=*)
30912 +    libexecdir=$ac_optarg ;;
30913 +
30914 +  -localstatedir | --localstatedir | --localstatedi | --localstated \
30915 +  | --localstate | --localstat | --localsta | --localst \
30916 +  | --locals | --local | --loca | --loc | --lo)
30917 +    ac_prev=localstatedir ;;
30918 +  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
30919 +  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
30920 +  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
30921 +    localstatedir=$ac_optarg ;;
30922 +
30923 +  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
30924 +    ac_prev=mandir ;;
30925 +  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
30926 +    mandir=$ac_optarg ;;
30927 +
30928 +  -nfp | --nfp | --nf)
30929 +    # Obsolete; use --without-fp.
30930 +    with_fp=no ;;
30931 +
30932 +  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
30933 +  | --no-cr | --no-c | -n)
30934 +    no_create=yes ;;
30935 +
30936 +  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
30937 +  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
30938 +    no_recursion=yes ;;
30939 +
30940 +  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
30941 +  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
30942 +  | --oldin | --oldi | --old | --ol | --o)
30943 +    ac_prev=oldincludedir ;;
30944 +  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
30945 +  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
30946 +  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
30947 +    oldincludedir=$ac_optarg ;;
30948 +
30949 +  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
30950 +    ac_prev=prefix ;;
30951 +  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
30952 +    prefix=$ac_optarg ;;
30953 +
30954 +  -program-prefix | --program-prefix | --program-prefi | --program-pref \
30955 +  | --program-pre | --program-pr | --program-p)
30956 +    ac_prev=program_prefix ;;
30957 +  -program-prefix=* | --program-prefix=* | --program-prefi=* \
30958 +  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
30959 +    program_prefix=$ac_optarg ;;
30960 +
30961 +  -program-suffix | --program-suffix | --program-suffi | --program-suff \
30962 +  | --program-suf | --program-su | --program-s)
30963 +    ac_prev=program_suffix ;;
30964 +  -program-suffix=* | --program-suffix=* | --program-suffi=* \
30965 +  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
30966 +    program_suffix=$ac_optarg ;;
30967 +
30968 +  -program-transform-name | --program-transform-name \
30969 +  | --program-transform-nam | --program-transform-na \
30970 +  | --program-transform-n | --program-transform- \
30971 +  | --program-transform | --program-transfor \
30972 +  | --program-transfo | --program-transf \
30973 +  | --program-trans | --program-tran \
30974 +  | --progr-tra | --program-tr | --program-t)
30975 +    ac_prev=program_transform_name ;;
30976 +  -program-transform-name=* | --program-transform-name=* \
30977 +  | --program-transform-nam=* | --program-transform-na=* \
30978 +  | --program-transform-n=* | --program-transform-=* \
30979 +  | --program-transform=* | --program-transfor=* \
30980 +  | --program-transfo=* | --program-transf=* \
30981 +  | --program-trans=* | --program-tran=* \
30982 +  | --progr-tra=* | --program-tr=* | --program-t=*)
30983 +    program_transform_name=$ac_optarg ;;
30984 +
30985 +  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
30986 +  | -silent | --silent | --silen | --sile | --sil)
30987 +    silent=yes ;;
30988 +
30989 +  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
30990 +    ac_prev=sbindir ;;
30991 +  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
30992 +  | --sbi=* | --sb=*)
30993 +    sbindir=$ac_optarg ;;
30994 +
30995 +  -sharedstatedir | --sharedstatedir | --sharedstatedi \
30996 +  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
30997 +  | --sharedst | --shareds | --shared | --share | --shar \
30998 +  | --sha | --sh)
30999 +    ac_prev=sharedstatedir ;;
31000 +  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
31001 +  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
31002 +  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
31003 +  | --sha=* | --sh=*)
31004 +    sharedstatedir=$ac_optarg ;;
31005 +
31006 +  -site | --site | --sit)
31007 +    ac_prev=site ;;
31008 +  -site=* | --site=* | --sit=*)
31009 +    site=$ac_optarg ;;
31010 +
31011 +  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
31012 +    ac_prev=srcdir ;;
31013 +  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
31014 +    srcdir=$ac_optarg ;;
31015 +
31016 +  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
31017 +  | --syscon | --sysco | --sysc | --sys | --sy)
31018 +    ac_prev=sysconfdir ;;
31019 +  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
31020 +  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
31021 +    sysconfdir=$ac_optarg ;;
31022 +
31023 +  -target | --target | --targe | --targ | --tar | --ta | --t)
31024 +    ac_prev=target_alias ;;
31025 +  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
31026 +    target_alias=$ac_optarg ;;
31027 +
31028 +  -v | -verbose | --verbose | --verbos | --verbo | --verb)
31029 +    verbose=yes ;;
31030 +
31031 +  -version | --version | --versio | --versi | --vers | -V)
31032 +    ac_init_version=: ;;
31033 +
31034 +  -with-* | --with-*)
31035 +    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
31036 +    # Reject names that are not valid shell variable names.
31037 +    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
31038 +      { echo "$as_me: error: invalid package name: $ac_package" >&2
31039 +   { (exit 1); exit 1; }; }
31040 +    ac_package=`echo $ac_package| sed 's/-/_/g'`
31041 +    case $ac_option in
31042 +      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
31043 +      *) ac_optarg=yes ;;
31044 +    esac
31045 +    eval "with_$ac_package='$ac_optarg'" ;;
31046 +
31047 +  -without-* | --without-*)
31048 +    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
31049 +    # Reject names that are not valid shell variable names.
31050 +    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
31051 +      { echo "$as_me: error: invalid package name: $ac_package" >&2
31052 +   { (exit 1); exit 1; }; }
31053 +    ac_package=`echo $ac_package | sed 's/-/_/g'`
31054 +    eval "with_$ac_package=no" ;;
31055 +
31056 +  --x)
31057 +    # Obsolete; use --with-x.
31058 +    with_x=yes ;;
31059 +
31060 +  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
31061 +  | --x-incl | --x-inc | --x-in | --x-i)
31062 +    ac_prev=x_includes ;;
31063 +  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
31064 +  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
31065 +    x_includes=$ac_optarg ;;
31066 +
31067 +  -x-libraries | --x-libraries | --x-librarie | --x-librari \
31068 +  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
31069 +    ac_prev=x_libraries ;;
31070 +  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
31071 +  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
31072 +    x_libraries=$ac_optarg ;;
31073 +
31074 +  -*) { echo "$as_me: error: unrecognized option: $ac_option
31075 +Try \`$0 --help' for more information." >&2
31076 +   { (exit 1); exit 1; }; }
31077 +    ;;
31078 +
31079 +  *=*)
31080 +    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
31081 +    # Reject names that are not valid shell variable names.
31082 +    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
31083 +      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
31084 +   { (exit 1); exit 1; }; }
31085 +    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
31086 +    eval "$ac_envvar='$ac_optarg'"
31087 +    export $ac_envvar ;;
31088 +
31089 +  *)
31090 +    # FIXME: should be removed in autoconf 3.0.
31091 +    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
31092 +    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
31093 +      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
31094 +    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
31095 +    ;;
31096 +
31097 +  esac
31098 +done
31099 +
31100 +if test -n "$ac_prev"; then
31101 +  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
31102 +  { echo "$as_me: error: missing argument to $ac_option" >&2
31103 +   { (exit 1); exit 1; }; }
31104 +fi
31105 +
31106 +# Be sure to have absolute paths.
31107 +for ac_var in exec_prefix prefix
31108 +do
31109 +  eval ac_val=$`echo $ac_var`
31110 +  case $ac_val in
31111 +    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
31112 +    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
31113 +   { (exit 1); exit 1; }; };;
31114 +  esac
31115 +done
31116 +
31117 +# Be sure to have absolute paths.
31118 +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
31119 +             localstatedir libdir includedir oldincludedir infodir mandir
31120 +do
31121 +  eval ac_val=$`echo $ac_var`
31122 +  case $ac_val in
31123 +    [\\/$]* | ?:[\\/]* ) ;;
31124 +    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
31125 +   { (exit 1); exit 1; }; };;
31126 +  esac
31127 +done
31128 +
31129 +# There might be people who depend on the old broken behavior: `$host'
31130 +# used to hold the argument of --host etc.
31131 +# FIXME: To remove some day.
31132 +build=$build_alias
31133 +host=$host_alias
31134 +target=$target_alias
31135 +
31136 +# FIXME: To remove some day.
31137 +if test "x$host_alias" != x; then
31138 +  if test "x$build_alias" = x; then
31139 +    cross_compiling=maybe
31140 +    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
31141 +    If a cross compiler is detected then cross compile mode will be used." >&2
31142 +  elif test "x$build_alias" != "x$host_alias"; then
31143 +    cross_compiling=yes
31144 +  fi
31145 +fi
31146 +
31147 +ac_tool_prefix=
31148 +test -n "$host_alias" && ac_tool_prefix=$host_alias-
31149 +
31150 +test "$silent" = yes && exec 6>/dev/null
31151 +
31152 +
31153 +# Find the source files, if location was not specified.
31154 +if test -z "$srcdir"; then
31155 +  ac_srcdir_defaulted=yes
31156 +  # Try the directory containing this script, then its parent.
31157 +  ac_confdir=`(dirname "$0") 2>/dev/null ||
31158 +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31159 +        X"$0" : 'X\(//\)[^/]' \| \
31160 +        X"$0" : 'X\(//\)$' \| \
31161 +        X"$0" : 'X\(/\)' \| \
31162 +        .     : '\(.\)' 2>/dev/null ||
31163 +echo X"$0" |
31164 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
31165 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
31166 +         /^X\(\/\/\)$/{ s//\1/; q; }
31167 +         /^X\(\/\).*/{ s//\1/; q; }
31168 +         s/.*/./; q'`
31169 +  srcdir=$ac_confdir
31170 +  if test ! -r $srcdir/$ac_unique_file; then
31171 +    srcdir=..
31172 +  fi
31173 +else
31174 +  ac_srcdir_defaulted=no
31175 +fi
31176 +if test ! -r $srcdir/$ac_unique_file; then
31177 +  if test "$ac_srcdir_defaulted" = yes; then
31178 +    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
31179 +   { (exit 1); exit 1; }; }
31180 +  else
31181 +    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
31182 +   { (exit 1); exit 1; }; }
31183 +  fi
31184 +fi
31185 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
31186 +  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
31187 +   { (exit 1); exit 1; }; }
31188 +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
31189 +ac_env_build_alias_set=${build_alias+set}
31190 +ac_env_build_alias_value=$build_alias
31191 +ac_cv_env_build_alias_set=${build_alias+set}
31192 +ac_cv_env_build_alias_value=$build_alias
31193 +ac_env_host_alias_set=${host_alias+set}
31194 +ac_env_host_alias_value=$host_alias
31195 +ac_cv_env_host_alias_set=${host_alias+set}
31196 +ac_cv_env_host_alias_value=$host_alias
31197 +ac_env_target_alias_set=${target_alias+set}
31198 +ac_env_target_alias_value=$target_alias
31199 +ac_cv_env_target_alias_set=${target_alias+set}
31200 +ac_cv_env_target_alias_value=$target_alias
31201 +ac_env_CC_set=${CC+set}
31202 +ac_env_CC_value=$CC
31203 +ac_cv_env_CC_set=${CC+set}
31204 +ac_cv_env_CC_value=$CC
31205 +ac_env_CFLAGS_set=${CFLAGS+set}
31206 +ac_env_CFLAGS_value=$CFLAGS
31207 +ac_cv_env_CFLAGS_set=${CFLAGS+set}
31208 +ac_cv_env_CFLAGS_value=$CFLAGS
31209 +ac_env_LDFLAGS_set=${LDFLAGS+set}
31210 +ac_env_LDFLAGS_value=$LDFLAGS
31211 +ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
31212 +ac_cv_env_LDFLAGS_value=$LDFLAGS
31213 +ac_env_CPPFLAGS_set=${CPPFLAGS+set}
31214 +ac_env_CPPFLAGS_value=$CPPFLAGS
31215 +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
31216 +ac_cv_env_CPPFLAGS_value=$CPPFLAGS
31217 +ac_env_CPP_set=${CPP+set}
31218 +ac_env_CPP_value=$CPP
31219 +ac_cv_env_CPP_set=${CPP+set}
31220 +ac_cv_env_CPP_value=$CPP
31221 +ac_env_CXX_set=${CXX+set}
31222 +ac_env_CXX_value=$CXX
31223 +ac_cv_env_CXX_set=${CXX+set}
31224 +ac_cv_env_CXX_value=$CXX
31225 +ac_env_CXXFLAGS_set=${CXXFLAGS+set}
31226 +ac_env_CXXFLAGS_value=$CXXFLAGS
31227 +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
31228 +ac_cv_env_CXXFLAGS_value=$CXXFLAGS
31229 +ac_env_CXXCPP_set=${CXXCPP+set}
31230 +ac_env_CXXCPP_value=$CXXCPP
31231 +ac_cv_env_CXXCPP_set=${CXXCPP+set}
31232 +ac_cv_env_CXXCPP_value=$CXXCPP
31233 +ac_env_F77_set=${F77+set}
31234 +ac_env_F77_value=$F77
31235 +ac_cv_env_F77_set=${F77+set}
31236 +ac_cv_env_F77_value=$F77
31237 +ac_env_FFLAGS_set=${FFLAGS+set}
31238 +ac_env_FFLAGS_value=$FFLAGS
31239 +ac_cv_env_FFLAGS_set=${FFLAGS+set}
31240 +ac_cv_env_FFLAGS_value=$FFLAGS
31241 +
31242 +#
31243 +# Report the --help message.
31244 +#
31245 +if test "$ac_init_help" = "long"; then
31246 +  # Omit some internal or obsolete options to make the list less imposing.
31247 +  # This message is too long to be a string in the A/UX 3.1 sh.
31248 +  cat <<_ACEOF
31249 +\`configure' configures this package to adapt to many kinds of systems.
31250 +
31251 +Usage: $0 [OPTION]... [VAR=VALUE]...
31252 +
31253 +To assign environment variables (e.g., CC, CFLAGS...), specify them as
31254 +VAR=VALUE.  See below for descriptions of some of the useful variables.
31255 +
31256 +Defaults for the options are specified in brackets.
31257 +
31258 +Configuration:
31259 +  -h, --help              display this help and exit
31260 +      --help=short        display options specific to this package
31261 +      --help=recursive    display the short help of all the included packages
31262 +  -V, --version           display version information and exit
31263 +  -q, --quiet, --silent   do not print \`checking...' messages
31264 +      --cache-file=FILE   cache test results in FILE [disabled]
31265 +  -C, --config-cache      alias for \`--cache-file=config.cache'
31266 +  -n, --no-create         do not create output files
31267 +      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
31268 +
31269 +_ACEOF
31270 +
31271 +  cat <<_ACEOF
31272 +Installation directories:
31273 +  --prefix=PREFIX         install architecture-independent files in PREFIX
31274 +                         [$ac_default_prefix]
31275 +  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
31276 +                         [PREFIX]
31277 +
31278 +By default, \`make install' will install all the files in
31279 +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
31280 +an installation prefix other than \`$ac_default_prefix' using \`--prefix',
31281 +for instance \`--prefix=\$HOME'.
31282 +
31283 +For better control, use the options below.
31284 +
31285 +Fine tuning of the installation directories:
31286 +  --bindir=DIR           user executables [EPREFIX/bin]
31287 +  --sbindir=DIR          system admin executables [EPREFIX/sbin]
31288 +  --libexecdir=DIR       program executables [EPREFIX/libexec]
31289 +  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
31290 +  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
31291 +  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
31292 +  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
31293 +  --libdir=DIR           object code libraries [EPREFIX/lib]
31294 +  --includedir=DIR       C header files [PREFIX/include]
31295 +  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
31296 +  --infodir=DIR          info documentation [PREFIX/info]
31297 +  --mandir=DIR           man documentation [PREFIX/man]
31298 +_ACEOF
31299 +
31300 +  cat <<\_ACEOF
31301 +
31302 +Program names:
31303 +  --program-prefix=PREFIX            prepend PREFIX to installed program names
31304 +  --program-suffix=SUFFIX            append SUFFIX to installed program names
31305 +  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
31306 +
31307 +System types:
31308 +  --build=BUILD     configure for building on BUILD [guessed]
31309 +  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
31310 +_ACEOF
31311 +fi
31312 +
31313 +if test -n "$ac_init_help"; then
31314 +
31315 +  cat <<\_ACEOF
31316 +
31317 +Optional Features:
31318 +  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
31319 +  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
31320 +  --enable-maintainer-mode  enable make rules and dependencies not useful
31321 +                         (and sometimes confusing) to the casual installer
31322 +  --disable-dependency-tracking  speeds up one-time build
31323 +  --enable-dependency-tracking   do not reject slow dependency extractors
31324 +  --enable-shared[=PKGS]
31325 +                          build shared libraries [default=yes]
31326 +  --enable-static[=PKGS]
31327 +                          build static libraries [default=yes]
31328 +  --enable-fast-install[=PKGS]
31329 +                          optimize for fast installation [default=yes]
31330 +  --disable-libtool-lock  avoid locking (might break parallel builds)
31331 +
31332 +Optional Packages:
31333 +  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
31334 +  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
31335 +  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
31336 +  --with-pic              try to use only PIC/non-PIC objects [default=use
31337 +                          both]
31338 +  --with-tags[=TAGS]
31339 +                          include additional configurations [automatic]
31340 +  --with-rtsig         compile with support for real time signals (experimental)
31341 +
31342 +Some influential environment variables:
31343 +  CC          C compiler command
31344 +  CFLAGS      C compiler flags
31345 +  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
31346 +              nonstandard directory <lib dir>
31347 +  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
31348 +              headers in a nonstandard directory <include dir>
31349 +  CPP         C preprocessor
31350 +  CXX         C++ compiler command
31351 +  CXXFLAGS    C++ compiler flags
31352 +  CXXCPP      C++ preprocessor
31353 +  F77         Fortran 77 compiler command
31354 +  FFLAGS      Fortran 77 compiler flags
31355 +
31356 +Use these variables to override the choices made by `configure' or to help
31357 +it to find libraries and programs with nonstandard names/locations.
31358 +
31359 +_ACEOF
31360 +fi
31361 +
31362 +if test "$ac_init_help" = "recursive"; then
31363 +  # If there are subdirs, report their specific --help.
31364 +  ac_popdir=`pwd`
31365 +  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
31366 +    test -d $ac_dir || continue
31367 +    ac_builddir=.
31368 +
31369 +if test "$ac_dir" != .; then
31370 +  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
31371 +  # A "../" for each directory in $ac_dir_suffix.
31372 +  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
31373 +else
31374 +  ac_dir_suffix= ac_top_builddir=
31375 +fi
31376 +
31377 +case $srcdir in
31378 +  .)  # No --srcdir option.  We are building in place.
31379 +    ac_srcdir=.
31380 +    if test -z "$ac_top_builddir"; then
31381 +       ac_top_srcdir=.
31382 +    else
31383 +       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
31384 +    fi ;;
31385 +  [\\/]* | ?:[\\/]* )  # Absolute path.
31386 +    ac_srcdir=$srcdir$ac_dir_suffix;
31387 +    ac_top_srcdir=$srcdir ;;
31388 +  *) # Relative path.
31389 +    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
31390 +    ac_top_srcdir=$ac_top_builddir$srcdir ;;
31391 +esac
31392 +
31393 +# Do not use `cd foo && pwd` to compute absolute paths, because
31394 +# the directories may not exist.
31395 +case `pwd` in
31396 +.) ac_abs_builddir="$ac_dir";;
31397 +*)
31398 +  case "$ac_dir" in
31399 +  .) ac_abs_builddir=`pwd`;;
31400 +  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
31401 +  *) ac_abs_builddir=`pwd`/"$ac_dir";;
31402 +  esac;;
31403 +esac
31404 +case $ac_abs_builddir in
31405 +.) ac_abs_top_builddir=${ac_top_builddir}.;;
31406 +*)
31407 +  case ${ac_top_builddir}. in
31408 +  .) ac_abs_top_builddir=$ac_abs_builddir;;
31409 +  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
31410 +  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
31411 +  esac;;
31412 +esac
31413 +case $ac_abs_builddir in
31414 +.) ac_abs_srcdir=$ac_srcdir;;
31415 +*)
31416 +  case $ac_srcdir in
31417 +  .) ac_abs_srcdir=$ac_abs_builddir;;
31418 +  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
31419 +  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
31420 +  esac;;
31421 +esac
31422 +case $ac_abs_builddir in
31423 +.) ac_abs_top_srcdir=$ac_top_srcdir;;
31424 +*)
31425 +  case $ac_top_srcdir in
31426 +  .) ac_abs_top_srcdir=$ac_abs_builddir;;
31427 +  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
31428 +  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
31429 +  esac;;
31430 +esac
31431 +
31432 +    cd $ac_dir
31433 +    # Check for guested configure; otherwise get Cygnus style configure.
31434 +    if test -f $ac_srcdir/configure.gnu; then
31435 +      echo
31436 +      $SHELL $ac_srcdir/configure.gnu  --help=recursive
31437 +    elif test -f $ac_srcdir/configure; then
31438 +      echo
31439 +      $SHELL $ac_srcdir/configure  --help=recursive
31440 +    elif test -f $ac_srcdir/configure.ac ||
31441 +          test -f $ac_srcdir/configure.in; then
31442 +      echo
31443 +      $ac_configure --help
31444 +    else
31445 +      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
31446 +    fi
31447 +    cd $ac_popdir
31448 +  done
31449 +fi
31450 +
31451 +test -n "$ac_init_help" && exit 0
31452 +if $ac_init_version; then
31453 +  cat <<\_ACEOF
31454 +
31455 +Copyright (C) 2003 Free Software Foundation, Inc.
31456 +This configure script is free software; the Free Software Foundation
31457 +gives unlimited permission to copy, distribute and modify it.
31458 +_ACEOF
31459 +  exit 0
31460 +fi
31461 +exec 5>config.log
31462 +cat >&5 <<_ACEOF
31463 +This file contains any messages produced by compilers while
31464 +running configure, to aid debugging if configure makes a mistake.
31465 +
31466 +It was created by $as_me, which was
31467 +generated by GNU Autoconf 2.59.  Invocation command line was
31468 +
31469 +  $ $0 $@
31470 +
31471 +_ACEOF
31472 +{
31473 +cat <<_ASUNAME
31474 +## --------- ##
31475 +## Platform. ##
31476 +## --------- ##
31477 +
31478 +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
31479 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
31480 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
31481 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
31482 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
31483 +
31484 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
31485 +/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
31486 +
31487 +/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
31488 +/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
31489 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
31490 +hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
31491 +/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
31492 +/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
31493 +/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
31494 +
31495 +_ASUNAME
31496 +
31497 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31498 +for as_dir in $PATH
31499 +do
31500 +  IFS=$as_save_IFS
31501 +  test -z "$as_dir" && as_dir=.
31502 +  echo "PATH: $as_dir"
31503 +done
31504 +
31505 +} >&5
31506 +
31507 +cat >&5 <<_ACEOF
31508 +
31509 +
31510 +## ----------- ##
31511 +## Core tests. ##
31512 +## ----------- ##
31513 +
31514 +_ACEOF
31515 +
31516 +
31517 +# Keep a trace of the command line.
31518 +# Strip out --no-create and --no-recursion so they do not pile up.
31519 +# Strip out --silent because we don't want to record it for future runs.
31520 +# Also quote any args containing shell meta-characters.
31521 +# Make two passes to allow for proper duplicate-argument suppression.
31522 +ac_configure_args=
31523 +ac_configure_args0=
31524 +ac_configure_args1=
31525 +ac_sep=
31526 +ac_must_keep_next=false
31527 +for ac_pass in 1 2
31528 +do
31529 +  for ac_arg
31530 +  do
31531 +    case $ac_arg in
31532 +    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
31533 +    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31534 +    | -silent | --silent | --silen | --sile | --sil)
31535 +      continue ;;
31536 +    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
31537 +      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
31538 +    esac
31539 +    case $ac_pass in
31540 +    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
31541 +    2)
31542 +      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
31543 +      if test $ac_must_keep_next = true; then
31544 +       ac_must_keep_next=false # Got value, back to normal.
31545 +      else
31546 +       case $ac_arg in
31547 +         *=* | --config-cache | -C | -disable-* | --disable-* \
31548 +         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
31549 +         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
31550 +         | -with-* | --with-* | -without-* | --without-* | --x)
31551 +           case "$ac_configure_args0 " in
31552 +             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
31553 +           esac
31554 +           ;;
31555 +         -* ) ac_must_keep_next=true ;;
31556 +       esac
31557 +      fi
31558 +      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
31559 +      # Get rid of the leading space.
31560 +      ac_sep=" "
31561 +      ;;
31562 +    esac
31563 +  done
31564 +done
31565 +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
31566 +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
31567 +
31568 +# When interrupted or exit'd, cleanup temporary files, and complete
31569 +# config.log.  We remove comments because anyway the quotes in there
31570 +# would cause problems or look ugly.
31571 +# WARNING: Be sure not to use single quotes in there, as some shells,
31572 +# such as our DU 5.0 friend, will then `close' the trap.
31573 +trap 'exit_status=$?
31574 +  # Save into config.log some information that might help in debugging.
31575 +  {
31576 +    echo
31577 +
31578 +    cat <<\_ASBOX
31579 +## ---------------- ##
31580 +## Cache variables. ##
31581 +## ---------------- ##
31582 +_ASBOX
31583 +    echo
31584 +    # The following way of writing the cache mishandles newlines in values,
31585 +{
31586 +  (set) 2>&1 |
31587 +    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
31588 +    *ac_space=\ *)
31589 +      sed -n \
31590 +       "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
31591 +         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
31592 +      ;;
31593 +    *)
31594 +      sed -n \
31595 +       "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
31596 +      ;;
31597 +    esac;
31598 +}
31599 +    echo
31600 +
31601 +    cat <<\_ASBOX
31602 +## ----------------- ##
31603 +## Output variables. ##
31604 +## ----------------- ##
31605 +_ASBOX
31606 +    echo
31607 +    for ac_var in $ac_subst_vars
31608 +    do
31609 +      eval ac_val=$`echo $ac_var`
31610 +      echo "$ac_var='"'"'$ac_val'"'"'"
31611 +    done | sort
31612 +    echo
31613 +
31614 +    if test -n "$ac_subst_files"; then
31615 +      cat <<\_ASBOX
31616 +## ------------- ##
31617 +## Output files. ##
31618 +## ------------- ##
31619 +_ASBOX
31620 +      echo
31621 +      for ac_var in $ac_subst_files
31622 +      do
31623 +       eval ac_val=$`echo $ac_var`
31624 +       echo "$ac_var='"'"'$ac_val'"'"'"
31625 +      done | sort
31626 +      echo
31627 +    fi
31628 +
31629 +    if test -s confdefs.h; then
31630 +      cat <<\_ASBOX
31631 +## ----------- ##
31632 +## confdefs.h. ##
31633 +## ----------- ##
31634 +_ASBOX
31635 +      echo
31636 +      sed "/^$/d" confdefs.h | sort
31637 +      echo
31638 +    fi
31639 +    test "$ac_signal" != 0 &&
31640 +      echo "$as_me: caught signal $ac_signal"
31641 +    echo "$as_me: exit $exit_status"
31642 +  } >&5
31643 +  rm -f core *.core &&
31644 +  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
31645 +    exit $exit_status
31646 +     ' 0
31647 +for ac_signal in 1 2 13 15; do
31648 +  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
31649 +done
31650 +ac_signal=0
31651 +
31652 +# confdefs.h avoids OS command line length limits that DEFS can exceed.
31653 +rm -rf conftest* confdefs.h
31654 +# AIX cpp loses on an empty file, so make sure it contains at least a newline.
31655 +echo >confdefs.h
31656 +
31657 +# Predefined preprocessor variables.
31658 +
31659 +cat >>confdefs.h <<_ACEOF
31660 +#define PACKAGE_NAME "$PACKAGE_NAME"
31661 +_ACEOF
31662 +
31663 +
31664 +cat >>confdefs.h <<_ACEOF
31665 +#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
31666 +_ACEOF
31667 +
31668 +
31669 +cat >>confdefs.h <<_ACEOF
31670 +#define PACKAGE_VERSION "$PACKAGE_VERSION"
31671 +_ACEOF
31672 +
31673 +
31674 +cat >>confdefs.h <<_ACEOF
31675 +#define PACKAGE_STRING "$PACKAGE_STRING"
31676 +_ACEOF
31677 +
31678 +
31679 +cat >>confdefs.h <<_ACEOF
31680 +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
31681 +_ACEOF
31682 +
31683 +
31684 +# Let the site file select an alternate cache file if it wants to.
31685 +# Prefer explicitly selected file to automatically selected ones.
31686 +if test -z "$CONFIG_SITE"; then
31687 +  if test "x$prefix" != xNONE; then
31688 +    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
31689 +  else
31690 +    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
31691 +  fi
31692 +fi
31693 +for ac_site_file in $CONFIG_SITE; do
31694 +  if test -r "$ac_site_file"; then
31695 +    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
31696 +echo "$as_me: loading site script $ac_site_file" >&6;}
31697 +    sed 's/^/| /' "$ac_site_file" >&5
31698 +    . "$ac_site_file"
31699 +  fi
31700 +done
31701 +
31702 +if test -r "$cache_file"; then
31703 +  # Some versions of bash will fail to source /dev/null (special
31704 +  # files actually), so we avoid doing that.
31705 +  if test -f "$cache_file"; then
31706 +    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
31707 +echo "$as_me: loading cache $cache_file" >&6;}
31708 +    case $cache_file in
31709 +      [\\/]* | ?:[\\/]* ) . $cache_file;;
31710 +      *)                      . ./$cache_file;;
31711 +    esac
31712 +  fi
31713 +else
31714 +  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
31715 +echo "$as_me: creating cache $cache_file" >&6;}
31716 +  >$cache_file
31717 +fi
31718 +
31719 +# Check that the precious variables saved in the cache have kept the same
31720 +# value.
31721 +ac_cache_corrupted=false
31722 +for ac_var in `(set) 2>&1 |
31723 +              sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
31724 +  eval ac_old_set=\$ac_cv_env_${ac_var}_set
31725 +  eval ac_new_set=\$ac_env_${ac_var}_set
31726 +  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
31727 +  eval ac_new_val="\$ac_env_${ac_var}_value"
31728 +  case $ac_old_set,$ac_new_set in
31729 +    set,)
31730 +      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
31731 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
31732 +      ac_cache_corrupted=: ;;
31733 +    ,set)
31734 +      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
31735 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
31736 +      ac_cache_corrupted=: ;;
31737 +    ,);;
31738 +    *)
31739 +      if test "x$ac_old_val" != "x$ac_new_val"; then
31740 +       { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
31741 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
31742 +       { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
31743 +echo "$as_me:   former value:  $ac_old_val" >&2;}
31744 +       { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
31745 +echo "$as_me:   current value: $ac_new_val" >&2;}
31746 +       ac_cache_corrupted=:
31747 +      fi;;
31748 +  esac
31749 +  # Pass precious variables to config.status.
31750 +  if test "$ac_new_set" = set; then
31751 +    case $ac_new_val in
31752 +    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
31753 +      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
31754 +    *) ac_arg=$ac_var=$ac_new_val ;;
31755 +    esac
31756 +    case " $ac_configure_args " in
31757 +      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
31758 +      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
31759 +    esac
31760 +  fi
31761 +done
31762 +if $ac_cache_corrupted; then
31763 +  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
31764 +echo "$as_me: error: changes in the environment can compromise the build" >&2;}
31765 +  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
31766 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
31767 +   { (exit 1); exit 1; }; }
31768 +fi
31769 +
31770 +ac_ext=c
31771 +ac_cpp='$CPP $CPPFLAGS'
31772 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31773 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31774 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
31775 +
31776 +
31777 +
31778 +
31779 +
31780 +
31781 +
31782 +
31783 +
31784 +
31785 +
31786 +
31787 +
31788 +
31789 +
31790 +
31791 +
31792 +
31793 +
31794 +
31795 +am__api_version="1.9"
31796 +ac_aux_dir=
31797 +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
31798 +  if test -f $ac_dir/install-sh; then
31799 +    ac_aux_dir=$ac_dir
31800 +    ac_install_sh="$ac_aux_dir/install-sh -c"
31801 +    break
31802 +  elif test -f $ac_dir/install.sh; then
31803 +    ac_aux_dir=$ac_dir
31804 +    ac_install_sh="$ac_aux_dir/install.sh -c"
31805 +    break
31806 +  elif test -f $ac_dir/shtool; then
31807 +    ac_aux_dir=$ac_dir
31808 +    ac_install_sh="$ac_aux_dir/shtool install -c"
31809 +    break
31810 +  fi
31811 +done
31812 +if test -z "$ac_aux_dir"; then
31813 +  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
31814 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
31815 +   { (exit 1); exit 1; }; }
31816 +fi
31817 +ac_config_guess="$SHELL $ac_aux_dir/config.guess"
31818 +ac_config_sub="$SHELL $ac_aux_dir/config.sub"
31819 +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
31820 +
31821 +# Find a good install program.  We prefer a C program (faster),
31822 +# so one script is as good as another.  But avoid the broken or
31823 +# incompatible versions:
31824 +# SysV /etc/install, /usr/sbin/install
31825 +# SunOS /usr/etc/install
31826 +# IRIX /sbin/install
31827 +# AIX /bin/install
31828 +# AmigaOS /C/install, which installs bootblocks on floppy discs
31829 +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
31830 +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
31831 +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
31832 +# OS/2's system install, which has a completely different semantic
31833 +# ./install, which can be erroneously created by make from ./install.sh.
31834 +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
31835 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
31836 +if test -z "$INSTALL"; then
31837 +if test "${ac_cv_path_install+set}" = set; then
31838 +  echo $ECHO_N "(cached) $ECHO_C" >&6
31839 +else
31840 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31841 +for as_dir in $PATH
31842 +do
31843 +  IFS=$as_save_IFS
31844 +  test -z "$as_dir" && as_dir=.
31845 +  # Account for people who put trailing slashes in PATH elements.
31846 +case $as_dir/ in
31847 +  ./ | .// | /cC/* | \
31848 +  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
31849 +  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
31850 +  /usr/ucb/* ) ;;
31851 +  *)
31852 +    # OSF1 and SCO ODT 3.0 have their own names for install.
31853 +    # Don't use installbsd from OSF since it installs stuff as root
31854 +    # by default.
31855 +    for ac_prog in ginstall scoinst install; do
31856 +      for ac_exec_ext in '' $ac_executable_extensions; do
31857 +       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
31858 +         if test $ac_prog = install &&
31859 +           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
31860 +           # AIX install.  It has an incompatible calling convention.
31861 +           :
31862 +         elif test $ac_prog = install &&
31863 +           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
31864 +           # program-specific install script used by HP pwplus--don't use.
31865 +           :
31866 +         else
31867 +           ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
31868 +           break 3
31869 +         fi
31870 +       fi
31871 +      done
31872 +    done
31873 +    ;;
31874 +esac
31875 +done
31876 +
31877 +
31878 +fi
31879 +  if test "${ac_cv_path_install+set}" = set; then
31880 +    INSTALL=$ac_cv_path_install
31881 +  else
31882 +    # As a last resort, use the slow shell script.  We don't cache a
31883 +    # path for INSTALL within a source directory, because that will
31884 +    # break other packages using the cache if that directory is
31885 +    # removed, or if the path is relative.
31886 +    INSTALL=$ac_install_sh
31887 +  fi
31888 +fi
31889 +echo "$as_me:$LINENO: result: $INSTALL" >&5
31890 +echo "${ECHO_T}$INSTALL" >&6
31891 +
31892 +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
31893 +# It thinks the first close brace ends the variable substitution.
31894 +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
31895 +
31896 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
31897 +
31898 +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
31899 +
31900 +echo "$as_me:$LINENO: checking whether build environment is sane" >&5
31901 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
31902 +# Just in case
31903 +sleep 1
31904 +echo timestamp > conftest.file
31905 +# Do `set' in a subshell so we don't clobber the current shell's
31906 +# arguments.  Must try -L first in case configure is actually a
31907 +# symlink; some systems play weird games with the mod time of symlinks
31908 +# (eg FreeBSD returns the mod time of the symlink's containing
31909 +# directory).
31910 +if (
31911 +   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
31912 +   if test "$*" = "X"; then
31913 +      # -L didn't work.
31914 +      set X `ls -t $srcdir/configure conftest.file`
31915 +   fi
31916 +   rm -f conftest.file
31917 +   if test "$*" != "X $srcdir/configure conftest.file" \
31918 +      && test "$*" != "X conftest.file $srcdir/configure"; then
31919 +
31920 +      # If neither matched, then we have a broken ls.  This can happen
31921 +      # if, for instance, CONFIG_SHELL is bash and it inherits a
31922 +      # broken ls alias from the environment.  This has actually
31923 +      # happened.  Such a system could not be considered "sane".
31924 +      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
31925 +alias in your environment" >&5
31926 +echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
31927 +alias in your environment" >&2;}
31928 +   { (exit 1); exit 1; }; }
31929 +   fi
31930 +
31931 +   test "$2" = conftest.file
31932 +   )
31933 +then
31934 +   # Ok.
31935 +   :
31936 +else
31937 +   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
31938 +Check your system clock" >&5
31939 +echo "$as_me: error: newly created file is older than distributed files!
31940 +Check your system clock" >&2;}
31941 +   { (exit 1); exit 1; }; }
31942 +fi
31943 +echo "$as_me:$LINENO: result: yes" >&5
31944 +echo "${ECHO_T}yes" >&6
31945 +test "$program_prefix" != NONE &&
31946 +  program_transform_name="s,^,$program_prefix,;$program_transform_name"
31947 +# Use a double $ so make ignores it.
31948 +test "$program_suffix" != NONE &&
31949 +  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
31950 +# Double any \ or $.  echo might interpret backslashes.
31951 +# By default was `s,x,x', remove it if useless.
31952 +cat <<\_ACEOF >conftest.sed
31953 +s/[\\$]/&&/g;s/;s,x,x,$//
31954 +_ACEOF
31955 +program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
31956 +rm conftest.sed
31957 +
31958 +# expand $ac_aux_dir to an absolute path
31959 +am_aux_dir=`cd $ac_aux_dir && pwd`
31960 +
31961 +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
31962 +# Use eval to expand $SHELL
31963 +if eval "$MISSING --run true"; then
31964 +  am_missing_run="$MISSING --run "
31965 +else
31966 +  am_missing_run=
31967 +  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
31968 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
31969 +fi
31970 +
31971 +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
31972 +  # We used to keeping the `.' as first argument, in order to
31973 +  # allow $(mkdir_p) to be used without argument.  As in
31974 +  #   $(mkdir_p) $(somedir)
31975 +  # where $(somedir) is conditionally defined.  However this is wrong
31976 +  # for two reasons:
31977 +  #  1. if the package is installed by a user who cannot write `.'
31978 +  #     make install will fail,
31979 +  #  2. the above comment should most certainly read
31980 +  #     $(mkdir_p) $(DESTDIR)$(somedir)
31981 +  #     so it does not work when $(somedir) is undefined and
31982 +  #     $(DESTDIR) is not.
31983 +  #  To support the latter case, we have to write
31984 +  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
31985 +  #  so the `.' trick is pointless.
31986 +  mkdir_p='mkdir -p --'
31987 +else
31988 +  # On NextStep and OpenStep, the `mkdir' command does not
31989 +  # recognize any option.  It will interpret all options as
31990 +  # directories to create, and then abort because `.' already
31991 +  # exists.
31992 +  for d in ./-p ./--version;
31993 +  do
31994 +    test -d $d && rmdir $d
31995 +  done
31996 +  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
31997 +  if test -f "$ac_aux_dir/mkinstalldirs"; then
31998 +    mkdir_p='$(mkinstalldirs)'
31999 +  else
32000 +    mkdir_p='$(install_sh) -d'
32001 +  fi
32002 +fi
32003 +
32004 +for ac_prog in gawk mawk nawk awk
32005 +do
32006 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
32007 +set dummy $ac_prog; ac_word=$2
32008 +echo "$as_me:$LINENO: checking for $ac_word" >&5
32009 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
32010 +if test "${ac_cv_prog_AWK+set}" = set; then
32011 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32012 +else
32013 +  if test -n "$AWK"; then
32014 +  ac_cv_prog_AWK="$AWK" # Let the user override the test.
32015 +else
32016 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32017 +for as_dir in $PATH
32018 +do
32019 +  IFS=$as_save_IFS
32020 +  test -z "$as_dir" && as_dir=.
32021 +  for ac_exec_ext in '' $ac_executable_extensions; do
32022 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32023 +    ac_cv_prog_AWK="$ac_prog"
32024 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
32025 +    break 2
32026 +  fi
32027 +done
32028 +done
32029 +
32030 +fi
32031 +fi
32032 +AWK=$ac_cv_prog_AWK
32033 +if test -n "$AWK"; then
32034 +  echo "$as_me:$LINENO: result: $AWK" >&5
32035 +echo "${ECHO_T}$AWK" >&6
32036 +else
32037 +  echo "$as_me:$LINENO: result: no" >&5
32038 +echo "${ECHO_T}no" >&6
32039 +fi
32040 +
32041 +  test -n "$AWK" && break
32042 +done
32043 +
32044 +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
32045 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
32046 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
32047 +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
32048 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32049 +else
32050 +  cat >conftest.make <<\_ACEOF
32051 +all:
32052 +       @echo 'ac_maketemp="$(MAKE)"'
32053 +_ACEOF
32054 +# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
32055 +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
32056 +if test -n "$ac_maketemp"; then
32057 +  eval ac_cv_prog_make_${ac_make}_set=yes
32058 +else
32059 +  eval ac_cv_prog_make_${ac_make}_set=no
32060 +fi
32061 +rm -f conftest.make
32062 +fi
32063 +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
32064 +  echo "$as_me:$LINENO: result: yes" >&5
32065 +echo "${ECHO_T}yes" >&6
32066 +  SET_MAKE=
32067 +else
32068 +  echo "$as_me:$LINENO: result: no" >&5
32069 +echo "${ECHO_T}no" >&6
32070 +  SET_MAKE="MAKE=${MAKE-make}"
32071 +fi
32072 +
32073 +rm -rf .tst 2>/dev/null
32074 +mkdir .tst 2>/dev/null
32075 +if test -d .tst; then
32076 +  am__leading_dot=.
32077 +else
32078 +  am__leading_dot=_
32079 +fi
32080 +rmdir .tst 2>/dev/null
32081 +
32082 +# test to see if srcdir already configured
32083 +if test "`cd $srcdir && pwd`" != "`pwd`" &&
32084 +   test -f $srcdir/config.status; then
32085 +  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
32086 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
32087 +   { (exit 1); exit 1; }; }
32088 +fi
32089 +
32090 +# test whether we have cygpath
32091 +if test -z "$CYGPATH_W"; then
32092 +  if (cygpath --version) >/dev/null 2>/dev/null; then
32093 +    CYGPATH_W='cygpath -w'
32094 +  else
32095 +    CYGPATH_W=echo
32096 +  fi
32097 +fi
32098 +
32099 +
32100 +# Define the identity of the package.
32101 + PACKAGE=libevent
32102 + VERSION=1.3b
32103 +
32104 +
32105 +cat >>confdefs.h <<_ACEOF
32106 +#define PACKAGE "$PACKAGE"
32107 +_ACEOF
32108 +
32109 +
32110 +cat >>confdefs.h <<_ACEOF
32111 +#define VERSION "$VERSION"
32112 +_ACEOF
32113 +
32114 +# Some tools Automake needs.
32115 +
32116 +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
32117 +
32118 +
32119 +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
32120 +
32121 +
32122 +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
32123 +
32124 +
32125 +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
32126 +
32127 +
32128 +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
32129 +
32130 +install_sh=${install_sh-"$am_aux_dir/install-sh"}
32131 +
32132 +# Installed binaries are usually stripped using `strip' when the user
32133 +# run `make install-strip'.  However `strip' might not be the right
32134 +# tool to use in cross-compilation environments, therefore Automake
32135 +# will honor the `STRIP' environment variable to overrule this program.
32136 +if test "$cross_compiling" != no; then
32137 +  if test -n "$ac_tool_prefix"; then
32138 +  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
32139 +set dummy ${ac_tool_prefix}strip; ac_word=$2
32140 +echo "$as_me:$LINENO: checking for $ac_word" >&5
32141 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
32142 +if test "${ac_cv_prog_STRIP+set}" = set; then
32143 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32144 +else
32145 +  if test -n "$STRIP"; then
32146 +  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
32147 +else
32148 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32149 +for as_dir in $PATH
32150 +do
32151 +  IFS=$as_save_IFS
32152 +  test -z "$as_dir" && as_dir=.
32153 +  for ac_exec_ext in '' $ac_executable_extensions; do
32154 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32155 +    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
32156 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
32157 +    break 2
32158 +  fi
32159 +done
32160 +done
32161 +
32162 +fi
32163 +fi
32164 +STRIP=$ac_cv_prog_STRIP
32165 +if test -n "$STRIP"; then
32166 +  echo "$as_me:$LINENO: result: $STRIP" >&5
32167 +echo "${ECHO_T}$STRIP" >&6
32168 +else
32169 +  echo "$as_me:$LINENO: result: no" >&5
32170 +echo "${ECHO_T}no" >&6
32171 +fi
32172 +
32173 +fi
32174 +if test -z "$ac_cv_prog_STRIP"; then
32175 +  ac_ct_STRIP=$STRIP
32176 +  # Extract the first word of "strip", so it can be a program name with args.
32177 +set dummy strip; ac_word=$2
32178 +echo "$as_me:$LINENO: checking for $ac_word" >&5
32179 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
32180 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
32181 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32182 +else
32183 +  if test -n "$ac_ct_STRIP"; then
32184 +  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
32185 +else
32186 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32187 +for as_dir in $PATH
32188 +do
32189 +  IFS=$as_save_IFS
32190 +  test -z "$as_dir" && as_dir=.
32191 +  for ac_exec_ext in '' $ac_executable_extensions; do
32192 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32193 +    ac_cv_prog_ac_ct_STRIP="strip"
32194 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
32195 +    break 2
32196 +  fi
32197 +done
32198 +done
32199 +
32200 +  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
32201 +fi
32202 +fi
32203 +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
32204 +if test -n "$ac_ct_STRIP"; then
32205 +  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
32206 +echo "${ECHO_T}$ac_ct_STRIP" >&6
32207 +else
32208 +  echo "$as_me:$LINENO: result: no" >&5
32209 +echo "${ECHO_T}no" >&6
32210 +fi
32211 +
32212 +  STRIP=$ac_ct_STRIP
32213 +else
32214 +  STRIP="$ac_cv_prog_STRIP"
32215 +fi
32216 +
32217 +fi
32218 +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
32219 +
32220 +# We need awk for the "check" target.  The system "awk" is bad on
32221 +# some platforms.
32222 +# Always define AMTAR for backward compatibility.
32223 +
32224 +AMTAR=${AMTAR-"${am_missing_run}tar"}
32225 +
32226 +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
32227 +
32228 +
32229 +
32230 +
32231 +
32232 +          ac_config_headers="$ac_config_headers config.h"
32233 +
32234 +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
32235 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
32236 +    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
32237 +if test "${enable_maintainer_mode+set}" = set; then
32238 +  enableval="$enable_maintainer_mode"
32239 +  USE_MAINTAINER_MODE=$enableval
32240 +else
32241 +  USE_MAINTAINER_MODE=no
32242 +fi;
32243 +  echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
32244 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
32245 +
32246 +
32247 +if test $USE_MAINTAINER_MODE = yes; then
32248 +  MAINTAINER_MODE_TRUE=
32249 +  MAINTAINER_MODE_FALSE='#'
32250 +else
32251 +  MAINTAINER_MODE_TRUE='#'
32252 +  MAINTAINER_MODE_FALSE=
32253 +fi
32254 +
32255 +  MAINT=$MAINTAINER_MODE_TRUE
32256 +
32257 +
32258 +
32259 +if test "$prefix" = "NONE"; then
32260 +   prefix="/usr/local"
32261 +fi
32262 +
32263 +ac_ext=c
32264 +ac_cpp='$CPP $CPPFLAGS'
32265 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32266 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32267 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
32268 +if test -n "$ac_tool_prefix"; then
32269 +  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
32270 +set dummy ${ac_tool_prefix}gcc; ac_word=$2
32271 +echo "$as_me:$LINENO: checking for $ac_word" >&5
32272 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
32273 +if test "${ac_cv_prog_CC+set}" = set; then
32274 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32275 +else
32276 +  if test -n "$CC"; then
32277 +  ac_cv_prog_CC="$CC" # Let the user override the test.
32278 +else
32279 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32280 +for as_dir in $PATH
32281 +do
32282 +  IFS=$as_save_IFS
32283 +  test -z "$as_dir" && as_dir=.
32284 +  for ac_exec_ext in '' $ac_executable_extensions; do
32285 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32286 +    ac_cv_prog_CC="${ac_tool_prefix}gcc"
32287 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
32288 +    break 2
32289 +  fi
32290 +done
32291 +done
32292 +
32293 +fi
32294 +fi
32295 +CC=$ac_cv_prog_CC
32296 +if test -n "$CC"; then
32297 +  echo "$as_me:$LINENO: result: $CC" >&5
32298 +echo "${ECHO_T}$CC" >&6
32299 +else
32300 +  echo "$as_me:$LINENO: result: no" >&5
32301 +echo "${ECHO_T}no" >&6
32302 +fi
32303 +
32304 +fi
32305 +if test -z "$ac_cv_prog_CC"; then
32306 +  ac_ct_CC=$CC
32307 +  # Extract the first word of "gcc", so it can be a program name with args.
32308 +set dummy gcc; ac_word=$2
32309 +echo "$as_me:$LINENO: checking for $ac_word" >&5
32310 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
32311 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
32312 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32313 +else
32314 +  if test -n "$ac_ct_CC"; then
32315 +  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32316 +else
32317 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32318 +for as_dir in $PATH
32319 +do
32320 +  IFS=$as_save_IFS
32321 +  test -z "$as_dir" && as_dir=.
32322 +  for ac_exec_ext in '' $ac_executable_extensions; do
32323 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32324 +    ac_cv_prog_ac_ct_CC="gcc"
32325 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
32326 +    break 2
32327 +  fi
32328 +done
32329 +done
32330 +
32331 +fi
32332 +fi
32333 +ac_ct_CC=$ac_cv_prog_ac_ct_CC
32334 +if test -n "$ac_ct_CC"; then
32335 +  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
32336 +echo "${ECHO_T}$ac_ct_CC" >&6
32337 +else
32338 +  echo "$as_me:$LINENO: result: no" >&5
32339 +echo "${ECHO_T}no" >&6
32340 +fi
32341 +
32342 +  CC=$ac_ct_CC
32343 +else
32344 +  CC="$ac_cv_prog_CC"
32345 +fi
32346 +
32347 +if test -z "$CC"; then
32348 +  if test -n "$ac_tool_prefix"; then
32349 +  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
32350 +set dummy ${ac_tool_prefix}cc; ac_word=$2
32351 +echo "$as_me:$LINENO: checking for $ac_word" >&5
32352 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
32353 +if test "${ac_cv_prog_CC+set}" = set; then
32354 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32355 +else
32356 +  if test -n "$CC"; then
32357 +  ac_cv_prog_CC="$CC" # Let the user override the test.
32358 +else
32359 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32360 +for as_dir in $PATH
32361 +do
32362 +  IFS=$as_save_IFS
32363 +  test -z "$as_dir" && as_dir=.
32364 +  for ac_exec_ext in '' $ac_executable_extensions; do
32365 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32366 +    ac_cv_prog_CC="${ac_tool_prefix}cc"
32367 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
32368 +    break 2
32369 +  fi
32370 +done
32371 +done
32372 +
32373 +fi
32374 +fi
32375 +CC=$ac_cv_prog_CC
32376 +if test -n "$CC"; then
32377 +  echo "$as_me:$LINENO: result: $CC" >&5
32378 +echo "${ECHO_T}$CC" >&6
32379 +else
32380 +  echo "$as_me:$LINENO: result: no" >&5
32381 +echo "${ECHO_T}no" >&6
32382 +fi
32383 +
32384 +fi
32385 +if test -z "$ac_cv_prog_CC"; then
32386 +  ac_ct_CC=$CC
32387 +  # Extract the first word of "cc", so it can be a program name with args.
32388 +set dummy cc; ac_word=$2
32389 +echo "$as_me:$LINENO: checking for $ac_word" >&5
32390 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
32391 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
32392 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32393 +else
32394 +  if test -n "$ac_ct_CC"; then
32395 +  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32396 +else
32397 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32398 +for as_dir in $PATH
32399 +do
32400 +  IFS=$as_save_IFS
32401 +  test -z "$as_dir" && as_dir=.
32402 +  for ac_exec_ext in '' $ac_executable_extensions; do
32403 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32404 +    ac_cv_prog_ac_ct_CC="cc"
32405 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
32406 +    break 2
32407 +  fi
32408 +done
32409 +done
32410 +
32411 +fi
32412 +fi
32413 +ac_ct_CC=$ac_cv_prog_ac_ct_CC
32414 +if test -n "$ac_ct_CC"; then
32415 +  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
32416 +echo "${ECHO_T}$ac_ct_CC" >&6
32417 +else
32418 +  echo "$as_me:$LINENO: result: no" >&5
32419 +echo "${ECHO_T}no" >&6
32420 +fi
32421 +
32422 +  CC=$ac_ct_CC
32423 +else
32424 +  CC="$ac_cv_prog_CC"
32425 +fi
32426 +
32427 +fi
32428 +if test -z "$CC"; then
32429 +  # Extract the first word of "cc", so it can be a program name with args.
32430 +set dummy cc; ac_word=$2
32431 +echo "$as_me:$LINENO: checking for $ac_word" >&5
32432 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
32433 +if test "${ac_cv_prog_CC+set}" = set; then
32434 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32435 +else
32436 +  if test -n "$CC"; then
32437 +  ac_cv_prog_CC="$CC" # Let the user override the test.
32438 +else
32439 +  ac_prog_rejected=no
32440 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32441 +for as_dir in $PATH
32442 +do
32443 +  IFS=$as_save_IFS
32444 +  test -z "$as_dir" && as_dir=.
32445 +  for ac_exec_ext in '' $ac_executable_extensions; do
32446 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32447 +    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
32448 +       ac_prog_rejected=yes
32449 +       continue
32450 +     fi
32451 +    ac_cv_prog_CC="cc"
32452 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
32453 +    break 2
32454 +  fi
32455 +done
32456 +done
32457 +
32458 +if test $ac_prog_rejected = yes; then
32459 +  # We found a bogon in the path, so make sure we never use it.
32460 +  set dummy $ac_cv_prog_CC
32461 +  shift
32462 +  if test $# != 0; then
32463 +    # We chose a different compiler from the bogus one.
32464 +    # However, it has the same basename, so the bogon will be chosen
32465 +    # first if we set CC to just the basename; use the full file name.
32466 +    shift
32467 +    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
32468 +  fi
32469 +fi
32470 +fi
32471 +fi
32472 +CC=$ac_cv_prog_CC
32473 +if test -n "$CC"; then
32474 +  echo "$as_me:$LINENO: result: $CC" >&5
32475 +echo "${ECHO_T}$CC" >&6
32476 +else
32477 +  echo "$as_me:$LINENO: result: no" >&5
32478 +echo "${ECHO_T}no" >&6
32479 +fi
32480 +
32481 +fi
32482 +if test -z "$CC"; then
32483 +  if test -n "$ac_tool_prefix"; then
32484 +  for ac_prog in cl
32485 +  do
32486 +    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32487 +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32488 +echo "$as_me:$LINENO: checking for $ac_word" >&5
32489 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
32490 +if test "${ac_cv_prog_CC+set}" = set; then
32491 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32492 +else
32493 +  if test -n "$CC"; then
32494 +  ac_cv_prog_CC="$CC" # Let the user override the test.
32495 +else
32496 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32497 +for as_dir in $PATH
32498 +do
32499 +  IFS=$as_save_IFS
32500 +  test -z "$as_dir" && as_dir=.
32501 +  for ac_exec_ext in '' $ac_executable_extensions; do
32502 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32503 +    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32504 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
32505 +    break 2
32506 +  fi
32507 +done
32508 +done
32509 +
32510 +fi
32511 +fi
32512 +CC=$ac_cv_prog_CC
32513 +if test -n "$CC"; then
32514 +  echo "$as_me:$LINENO: result: $CC" >&5
32515 +echo "${ECHO_T}$CC" >&6
32516 +else
32517 +  echo "$as_me:$LINENO: result: no" >&5
32518 +echo "${ECHO_T}no" >&6
32519 +fi
32520 +
32521 +    test -n "$CC" && break
32522 +  done
32523 +fi
32524 +if test -z "$CC"; then
32525 +  ac_ct_CC=$CC
32526 +  for ac_prog in cl
32527 +do
32528 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
32529 +set dummy $ac_prog; ac_word=$2
32530 +echo "$as_me:$LINENO: checking for $ac_word" >&5
32531 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
32532 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
32533 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32534 +else
32535 +  if test -n "$ac_ct_CC"; then
32536 +  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32537 +else
32538 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32539 +for as_dir in $PATH
32540 +do
32541 +  IFS=$as_save_IFS
32542 +  test -z "$as_dir" && as_dir=.
32543 +  for ac_exec_ext in '' $ac_executable_extensions; do
32544 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32545 +    ac_cv_prog_ac_ct_CC="$ac_prog"
32546 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
32547 +    break 2
32548 +  fi
32549 +done
32550 +done
32551 +
32552 +fi
32553 +fi
32554 +ac_ct_CC=$ac_cv_prog_ac_ct_CC
32555 +if test -n "$ac_ct_CC"; then
32556 +  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
32557 +echo "${ECHO_T}$ac_ct_CC" >&6
32558 +else
32559 +  echo "$as_me:$LINENO: result: no" >&5
32560 +echo "${ECHO_T}no" >&6
32561 +fi
32562 +
32563 +  test -n "$ac_ct_CC" && break
32564 +done
32565 +
32566 +  CC=$ac_ct_CC
32567 +fi
32568 +
32569 +fi
32570 +
32571 +
32572 +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
32573 +See \`config.log' for more details." >&5
32574 +echo "$as_me: error: no acceptable C compiler found in \$PATH
32575 +See \`config.log' for more details." >&2;}
32576 +   { (exit 1); exit 1; }; }
32577 +
32578 +# Provide some information about the compiler.
32579 +echo "$as_me:$LINENO:" \
32580 +     "checking for C compiler version" >&5
32581 +ac_compiler=`set X $ac_compile; echo $2`
32582 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
32583 +  (eval $ac_compiler --version </dev/null >&5) 2>&5
32584 +  ac_status=$?
32585 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
32586 +  (exit $ac_status); }
32587 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
32588 +  (eval $ac_compiler -v </dev/null >&5) 2>&5
32589 +  ac_status=$?
32590 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
32591 +  (exit $ac_status); }
32592 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
32593 +  (eval $ac_compiler -V </dev/null >&5) 2>&5
32594 +  ac_status=$?
32595 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
32596 +  (exit $ac_status); }
32597 +
32598 +cat >conftest.$ac_ext <<_ACEOF
32599 +/* confdefs.h.  */
32600 +_ACEOF
32601 +cat confdefs.h >>conftest.$ac_ext
32602 +cat >>conftest.$ac_ext <<_ACEOF
32603 +/* end confdefs.h.  */
32604 +
32605 +int
32606 +main ()
32607 +{
32608 +
32609 +  ;
32610 +  return 0;
32611 +}
32612 +_ACEOF
32613 +ac_clean_files_save=$ac_clean_files
32614 +ac_clean_files="$ac_clean_files a.out a.exe b.out"
32615 +# Try to create an executable without -o first, disregard a.out.
32616 +# It will help us diagnose broken compilers, and finding out an intuition
32617 +# of exeext.
32618 +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
32619 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
32620 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32621 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
32622 +  (eval $ac_link_default) 2>&5
32623 +  ac_status=$?
32624 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
32625 +  (exit $ac_status); }; then
32626 +  # Find the output, starting from the most likely.  This scheme is
32627 +# not robust to junk in `.', hence go to wildcards (a.*) only as a last
32628 +# resort.
32629 +
32630 +# Be careful to initialize this variable, since it used to be cached.
32631 +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
32632 +ac_cv_exeext=
32633 +# b.out is created by i960 compilers.
32634 +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
32635 +do
32636 +  test -f "$ac_file" || continue
32637 +  case $ac_file in
32638 +    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
32639 +       ;;
32640 +    conftest.$ac_ext )
32641 +       # This is the source file.
32642 +       ;;
32643 +    [ab].out )
32644 +       # We found the default executable, but exeext='' is most
32645 +       # certainly right.
32646 +       break;;
32647 +    *.* )
32648 +       ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32649 +       # FIXME: I believe we export ac_cv_exeext for Libtool,
32650 +       # but it would be cool to find out if it's true.  Does anybody
32651 +       # maintain Libtool? --akim.
32652 +       export ac_cv_exeext
32653 +       break;;
32654 +    * )
32655 +       break;;
32656 +  esac
32657 +done
32658 +else
32659 +  echo "$as_me: failed program was:" >&5
32660 +sed 's/^/| /' conftest.$ac_ext >&5
32661 +
32662 +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
32663 +See \`config.log' for more details." >&5
32664 +echo "$as_me: error: C compiler cannot create executables
32665 +See \`config.log' for more details." >&2;}
32666 +   { (exit 77); exit 77; }; }
32667 +fi
32668 +
32669 +ac_exeext=$ac_cv_exeext
32670 +echo "$as_me:$LINENO: result: $ac_file" >&5
32671 +echo "${ECHO_T}$ac_file" >&6
32672 +
32673 +# Check the compiler produces executables we can run.  If not, either
32674 +# the compiler is broken, or we cross compile.
32675 +echo "$as_me:$LINENO: checking whether the C compiler works" >&5
32676 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
32677 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
32678 +# If not cross compiling, check that we can run a simple program.
32679 +if test "$cross_compiling" != yes; then
32680 +  if { ac_try='./$ac_file'
32681 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32682 +  (eval $ac_try) 2>&5
32683 +  ac_status=$?
32684 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
32685 +  (exit $ac_status); }; }; then
32686 +    cross_compiling=no
32687 +  else
32688 +    if test "$cross_compiling" = maybe; then
32689 +       cross_compiling=yes
32690 +    else
32691 +       { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
32692 +If you meant to cross compile, use \`--host'.
32693 +See \`config.log' for more details." >&5
32694 +echo "$as_me: error: cannot run C compiled programs.
32695 +If you meant to cross compile, use \`--host'.
32696 +See \`config.log' for more details." >&2;}
32697 +   { (exit 1); exit 1; }; }
32698 +    fi
32699 +  fi
32700 +fi
32701 +echo "$as_me:$LINENO: result: yes" >&5
32702 +echo "${ECHO_T}yes" >&6
32703 +
32704 +rm -f a.out a.exe conftest$ac_cv_exeext b.out
32705 +ac_clean_files=$ac_clean_files_save
32706 +# Check the compiler produces executables we can run.  If not, either
32707 +# the compiler is broken, or we cross compile.
32708 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
32709 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
32710 +echo "$as_me:$LINENO: result: $cross_compiling" >&5
32711 +echo "${ECHO_T}$cross_compiling" >&6
32712 +
32713 +echo "$as_me:$LINENO: checking for suffix of executables" >&5
32714 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
32715 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32716 +  (eval $ac_link) 2>&5
32717 +  ac_status=$?
32718 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
32719 +  (exit $ac_status); }; then
32720 +  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32721 +# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32722 +# work properly (i.e., refer to `conftest.exe'), while it won't with
32723 +# `rm'.
32724 +for ac_file in conftest.exe conftest conftest.*; do
32725 +  test -f "$ac_file" || continue
32726 +  case $ac_file in
32727 +    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
32728 +    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32729 +         export ac_cv_exeext
32730 +         break;;
32731 +    * ) break;;
32732 +  esac
32733 +done
32734 +else
32735 +  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
32736 +See \`config.log' for more details." >&5
32737 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
32738 +See \`config.log' for more details." >&2;}
32739 +   { (exit 1); exit 1; }; }
32740 +fi
32741 +
32742 +rm -f conftest$ac_cv_exeext
32743 +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
32744 +echo "${ECHO_T}$ac_cv_exeext" >&6
32745 +
32746 +rm -f conftest.$ac_ext
32747 +EXEEXT=$ac_cv_exeext
32748 +ac_exeext=$EXEEXT
32749 +echo "$as_me:$LINENO: checking for suffix of object files" >&5
32750 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
32751 +if test "${ac_cv_objext+set}" = set; then
32752 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32753 +else
32754 +  cat >conftest.$ac_ext <<_ACEOF
32755 +/* confdefs.h.  */
32756 +_ACEOF
32757 +cat confdefs.h >>conftest.$ac_ext
32758 +cat >>conftest.$ac_ext <<_ACEOF
32759 +/* end confdefs.h.  */
32760 +
32761 +int
32762 +main ()
32763 +{
32764 +
32765 +  ;
32766 +  return 0;
32767 +}
32768 +_ACEOF
32769 +rm -f conftest.o conftest.obj
32770 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
32771 +  (eval $ac_compile) 2>&5
32772 +  ac_status=$?
32773 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
32774 +  (exit $ac_status); }; then
32775 +  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
32776 +  case $ac_file in
32777 +    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
32778 +    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32779 +       break;;
32780 +  esac
32781 +done
32782 +else
32783 +  echo "$as_me: failed program was:" >&5
32784 +sed 's/^/| /' conftest.$ac_ext >&5
32785 +
32786 +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
32787 +See \`config.log' for more details." >&5
32788 +echo "$as_me: error: cannot compute suffix of object files: cannot compile
32789 +See \`config.log' for more details." >&2;}
32790 +   { (exit 1); exit 1; }; }
32791 +fi
32792 +
32793 +rm -f conftest.$ac_cv_objext conftest.$ac_ext
32794 +fi
32795 +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
32796 +echo "${ECHO_T}$ac_cv_objext" >&6
32797 +OBJEXT=$ac_cv_objext
32798 +ac_objext=$OBJEXT
32799 +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
32800 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
32801 +if test "${ac_cv_c_compiler_gnu+set}" = set; then
32802 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32803 +else
32804 +  cat >conftest.$ac_ext <<_ACEOF
32805 +/* confdefs.h.  */
32806 +_ACEOF
32807 +cat confdefs.h >>conftest.$ac_ext
32808 +cat >>conftest.$ac_ext <<_ACEOF
32809 +/* end confdefs.h.  */
32810 +
32811 +int
32812 +main ()
32813 +{
32814 +#ifndef __GNUC__
32815 +       choke me
32816 +#endif
32817 +
32818 +  ;
32819 +  return 0;
32820 +}
32821 +_ACEOF
32822 +rm -f conftest.$ac_objext
32823 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
32824 +  (eval $ac_compile) 2>conftest.er1
32825 +  ac_status=$?
32826 +  grep -v '^ *+' conftest.er1 >conftest.err
32827 +  rm -f conftest.er1
32828 +  cat conftest.err >&5
32829 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
32830 +  (exit $ac_status); } &&
32831 +        { ac_try='test -z "$ac_c_werror_flag"
32832 +                        || test ! -s conftest.err'
32833 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32834 +  (eval $ac_try) 2>&5
32835 +  ac_status=$?
32836 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
32837 +  (exit $ac_status); }; } &&
32838 +        { ac_try='test -s conftest.$ac_objext'
32839 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32840 +  (eval $ac_try) 2>&5
32841 +  ac_status=$?
32842 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
32843 +  (exit $ac_status); }; }; then
32844 +  ac_compiler_gnu=yes
32845 +else
32846 +  echo "$as_me: failed program was:" >&5
32847 +sed 's/^/| /' conftest.$ac_ext >&5
32848 +
32849 +ac_compiler_gnu=no
32850 +fi
32851 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
32852 +ac_cv_c_compiler_gnu=$ac_compiler_gnu
32853 +
32854 +fi
32855 +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
32856 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
32857 +GCC=`test $ac_compiler_gnu = yes && echo yes`
32858 +ac_test_CFLAGS=${CFLAGS+set}
32859 +ac_save_CFLAGS=$CFLAGS
32860 +CFLAGS="-g"
32861 +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
32862 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
32863 +if test "${ac_cv_prog_cc_g+set}" = set; then
32864 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32865 +else
32866 +  cat >conftest.$ac_ext <<_ACEOF
32867 +/* confdefs.h.  */
32868 +_ACEOF
32869 +cat confdefs.h >>conftest.$ac_ext
32870 +cat >>conftest.$ac_ext <<_ACEOF
32871 +/* end confdefs.h.  */
32872 +
32873 +int
32874 +main ()
32875 +{
32876 +
32877 +  ;
32878 +  return 0;
32879 +}
32880 +_ACEOF
32881 +rm -f conftest.$ac_objext
32882 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
32883 +  (eval $ac_compile) 2>conftest.er1
32884 +  ac_status=$?
32885 +  grep -v '^ *+' conftest.er1 >conftest.err
32886 +  rm -f conftest.er1
32887 +  cat conftest.err >&5
32888 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
32889 +  (exit $ac_status); } &&
32890 +        { ac_try='test -z "$ac_c_werror_flag"
32891 +                        || test ! -s conftest.err'
32892 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32893 +  (eval $ac_try) 2>&5
32894 +  ac_status=$?
32895 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
32896 +  (exit $ac_status); }; } &&
32897 +        { ac_try='test -s conftest.$ac_objext'
32898 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32899 +  (eval $ac_try) 2>&5
32900 +  ac_status=$?
32901 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
32902 +  (exit $ac_status); }; }; then
32903 +  ac_cv_prog_cc_g=yes
32904 +else
32905 +  echo "$as_me: failed program was:" >&5
32906 +sed 's/^/| /' conftest.$ac_ext >&5
32907 +
32908 +ac_cv_prog_cc_g=no
32909 +fi
32910 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
32911 +fi
32912 +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
32913 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
32914 +if test "$ac_test_CFLAGS" = set; then
32915 +  CFLAGS=$ac_save_CFLAGS
32916 +elif test $ac_cv_prog_cc_g = yes; then
32917 +  if test "$GCC" = yes; then
32918 +    CFLAGS="-g -O2"
32919 +  else
32920 +    CFLAGS="-g"
32921 +  fi
32922 +else
32923 +  if test "$GCC" = yes; then
32924 +    CFLAGS="-O2"
32925 +  else
32926 +    CFLAGS=
32927 +  fi
32928 +fi
32929 +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
32930 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
32931 +if test "${ac_cv_prog_cc_stdc+set}" = set; then
32932 +  echo $ECHO_N "(cached) $ECHO_C" >&6
32933 +else
32934 +  ac_cv_prog_cc_stdc=no
32935 +ac_save_CC=$CC
32936 +cat >conftest.$ac_ext <<_ACEOF
32937 +/* confdefs.h.  */
32938 +_ACEOF
32939 +cat confdefs.h >>conftest.$ac_ext
32940 +cat >>conftest.$ac_ext <<_ACEOF
32941 +/* end confdefs.h.  */
32942 +#include <stdarg.h>
32943 +#include <stdio.h>
32944 +#include <sys/types.h>
32945 +#include <sys/stat.h>
32946 +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32947 +struct buf { int x; };
32948 +FILE * (*rcsopen) (struct buf *, struct stat *, int);
32949 +static char *e (p, i)
32950 +     char **p;
32951 +     int i;
32952 +{
32953 +  return p[i];
32954 +}
32955 +static char *f (char * (*g) (char **, int), char **p, ...)
32956 +{
32957 +  char *s;
32958 +  va_list v;
32959 +  va_start (v,p);
32960 +  s = g (p, va_arg (v,int));
32961 +  va_end (v);
32962 +  return s;
32963 +}
32964 +
32965 +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32966 +   function prototypes and stuff, but not '\xHH' hex character constants.
32967 +   These don't provoke an error unfortunately, instead are silently treated
32968 +   as 'x'.  The following induces an error, until -std1 is added to get
32969 +   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32970 +   array size at least.  It's necessary to write '\x00'==0 to get something
32971 +   that's true only with -std1.  */
32972 +int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32973 +
32974 +int test (int i, double x);
32975 +struct s1 {int (*f) (int a);};
32976 +struct s2 {int (*f) (double a);};
32977 +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32978 +int argc;
32979 +char **argv;
32980 +int
32981 +main ()
32982 +{
32983 +return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32984 +  ;
32985 +  return 0;
32986 +}
32987 +_ACEOF
32988 +# Don't try gcc -ansi; that turns off useful extensions and
32989 +# breaks some systems' header files.
32990 +# AIX                  -qlanglvl=ansi
32991 +# Ultrix and OSF/1     -std1
32992 +# HP-UX 10.20 and later        -Ae
32993 +# HP-UX older versions -Aa -D_HPUX_SOURCE
32994 +# SVR4                 -Xc -D__EXTENSIONS__
32995 +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32996 +do
32997 +  CC="$ac_save_CC $ac_arg"
32998 +  rm -f conftest.$ac_objext
32999 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33000 +  (eval $ac_compile) 2>conftest.er1
33001 +  ac_status=$?
33002 +  grep -v '^ *+' conftest.er1 >conftest.err
33003 +  rm -f conftest.er1
33004 +  cat conftest.err >&5
33005 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33006 +  (exit $ac_status); } &&
33007 +        { ac_try='test -z "$ac_c_werror_flag"
33008 +                        || test ! -s conftest.err'
33009 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33010 +  (eval $ac_try) 2>&5
33011 +  ac_status=$?
33012 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33013 +  (exit $ac_status); }; } &&
33014 +        { ac_try='test -s conftest.$ac_objext'
33015 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33016 +  (eval $ac_try) 2>&5
33017 +  ac_status=$?
33018 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33019 +  (exit $ac_status); }; }; then
33020 +  ac_cv_prog_cc_stdc=$ac_arg
33021 +break
33022 +else
33023 +  echo "$as_me: failed program was:" >&5
33024 +sed 's/^/| /' conftest.$ac_ext >&5
33025 +
33026 +fi
33027 +rm -f conftest.err conftest.$ac_objext
33028 +done
33029 +rm -f conftest.$ac_ext conftest.$ac_objext
33030 +CC=$ac_save_CC
33031 +
33032 +fi
33033 +
33034 +case "x$ac_cv_prog_cc_stdc" in
33035 +  x|xno)
33036 +    echo "$as_me:$LINENO: result: none needed" >&5
33037 +echo "${ECHO_T}none needed" >&6 ;;
33038 +  *)
33039 +    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
33040 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
33041 +    CC="$CC $ac_cv_prog_cc_stdc" ;;
33042 +esac
33043 +
33044 +# Some people use a C++ compiler to compile C.  Since we use `exit',
33045 +# in C++ we need to declare it.  In case someone uses the same compiler
33046 +# for both compiling C and C++ we need to have the C++ compiler decide
33047 +# the declaration of exit, since it's the most demanding environment.
33048 +cat >conftest.$ac_ext <<_ACEOF
33049 +#ifndef __cplusplus
33050 +  choke me
33051 +#endif
33052 +_ACEOF
33053 +rm -f conftest.$ac_objext
33054 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33055 +  (eval $ac_compile) 2>conftest.er1
33056 +  ac_status=$?
33057 +  grep -v '^ *+' conftest.er1 >conftest.err
33058 +  rm -f conftest.er1
33059 +  cat conftest.err >&5
33060 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33061 +  (exit $ac_status); } &&
33062 +        { ac_try='test -z "$ac_c_werror_flag"
33063 +                        || test ! -s conftest.err'
33064 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33065 +  (eval $ac_try) 2>&5
33066 +  ac_status=$?
33067 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33068 +  (exit $ac_status); }; } &&
33069 +        { ac_try='test -s conftest.$ac_objext'
33070 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33071 +  (eval $ac_try) 2>&5
33072 +  ac_status=$?
33073 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33074 +  (exit $ac_status); }; }; then
33075 +  for ac_declaration in \
33076 +   '' \
33077 +   'extern "C" void std::exit (int) throw (); using std::exit;' \
33078 +   'extern "C" void std::exit (int); using std::exit;' \
33079 +   'extern "C" void exit (int) throw ();' \
33080 +   'extern "C" void exit (int);' \
33081 +   'void exit (int);'
33082 +do
33083 +  cat >conftest.$ac_ext <<_ACEOF
33084 +/* confdefs.h.  */
33085 +_ACEOF
33086 +cat confdefs.h >>conftest.$ac_ext
33087 +cat >>conftest.$ac_ext <<_ACEOF
33088 +/* end confdefs.h.  */
33089 +$ac_declaration
33090 +#include <stdlib.h>
33091 +int
33092 +main ()
33093 +{
33094 +exit (42);
33095 +  ;
33096 +  return 0;
33097 +}
33098 +_ACEOF
33099 +rm -f conftest.$ac_objext
33100 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33101 +  (eval $ac_compile) 2>conftest.er1
33102 +  ac_status=$?
33103 +  grep -v '^ *+' conftest.er1 >conftest.err
33104 +  rm -f conftest.er1
33105 +  cat conftest.err >&5
33106 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33107 +  (exit $ac_status); } &&
33108 +        { ac_try='test -z "$ac_c_werror_flag"
33109 +                        || test ! -s conftest.err'
33110 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33111 +  (eval $ac_try) 2>&5
33112 +  ac_status=$?
33113 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33114 +  (exit $ac_status); }; } &&
33115 +        { ac_try='test -s conftest.$ac_objext'
33116 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33117 +  (eval $ac_try) 2>&5
33118 +  ac_status=$?
33119 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33120 +  (exit $ac_status); }; }; then
33121 +  :
33122 +else
33123 +  echo "$as_me: failed program was:" >&5
33124 +sed 's/^/| /' conftest.$ac_ext >&5
33125 +
33126 +continue
33127 +fi
33128 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33129 +  cat >conftest.$ac_ext <<_ACEOF
33130 +/* confdefs.h.  */
33131 +_ACEOF
33132 +cat confdefs.h >>conftest.$ac_ext
33133 +cat >>conftest.$ac_ext <<_ACEOF
33134 +/* end confdefs.h.  */
33135 +$ac_declaration
33136 +int
33137 +main ()
33138 +{
33139 +exit (42);
33140 +  ;
33141 +  return 0;
33142 +}
33143 +_ACEOF
33144 +rm -f conftest.$ac_objext
33145 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33146 +  (eval $ac_compile) 2>conftest.er1
33147 +  ac_status=$?
33148 +  grep -v '^ *+' conftest.er1 >conftest.err
33149 +  rm -f conftest.er1
33150 +  cat conftest.err >&5
33151 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33152 +  (exit $ac_status); } &&
33153 +        { ac_try='test -z "$ac_c_werror_flag"
33154 +                        || test ! -s conftest.err'
33155 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33156 +  (eval $ac_try) 2>&5
33157 +  ac_status=$?
33158 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33159 +  (exit $ac_status); }; } &&
33160 +        { ac_try='test -s conftest.$ac_objext'
33161 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33162 +  (eval $ac_try) 2>&5
33163 +  ac_status=$?
33164 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33165 +  (exit $ac_status); }; }; then
33166 +  break
33167 +else
33168 +  echo "$as_me: failed program was:" >&5
33169 +sed 's/^/| /' conftest.$ac_ext >&5
33170 +
33171 +fi
33172 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33173 +done
33174 +rm -f conftest*
33175 +if test -n "$ac_declaration"; then
33176 +  echo '#ifdef __cplusplus' >>confdefs.h
33177 +  echo $ac_declaration      >>confdefs.h
33178 +  echo '#endif'             >>confdefs.h
33179 +fi
33180 +
33181 +else
33182 +  echo "$as_me: failed program was:" >&5
33183 +sed 's/^/| /' conftest.$ac_ext >&5
33184 +
33185 +fi
33186 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33187 +ac_ext=c
33188 +ac_cpp='$CPP $CPPFLAGS'
33189 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33190 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33191 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
33192 +DEPDIR="${am__leading_dot}deps"
33193 +
33194 +          ac_config_commands="$ac_config_commands depfiles"
33195 +
33196 +
33197 +am_make=${MAKE-make}
33198 +cat > confinc << 'END'
33199 +am__doit:
33200 +       @echo done
33201 +.PHONY: am__doit
33202 +END
33203 +# If we don't find an include directive, just comment out the code.
33204 +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
33205 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
33206 +am__include="#"
33207 +am__quote=
33208 +_am_result=none
33209 +# First try GNU make style include.
33210 +echo "include confinc" > confmf
33211 +# We grep out `Entering directory' and `Leaving directory'
33212 +# messages which can occur if `w' ends up in MAKEFLAGS.
33213 +# In particular we don't look at `^make:' because GNU make might
33214 +# be invoked under some other name (usually "gmake"), in which
33215 +# case it prints its new name instead of `make'.
33216 +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
33217 +   am__include=include
33218 +   am__quote=
33219 +   _am_result=GNU
33220 +fi
33221 +# Now try BSD make style include.
33222 +if test "$am__include" = "#"; then
33223 +   echo '.include "confinc"' > confmf
33224 +   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
33225 +      am__include=.include
33226 +      am__quote="\""
33227 +      _am_result=BSD
33228 +   fi
33229 +fi
33230 +
33231 +
33232 +echo "$as_me:$LINENO: result: $_am_result" >&5
33233 +echo "${ECHO_T}$_am_result" >&6
33234 +rm -f confinc confmf
33235 +
33236 +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
33237 +if test "${enable_dependency_tracking+set}" = set; then
33238 +  enableval="$enable_dependency_tracking"
33239 +
33240 +fi;
33241 +if test "x$enable_dependency_tracking" != xno; then
33242 +  am_depcomp="$ac_aux_dir/depcomp"
33243 +  AMDEPBACKSLASH='\'
33244 +fi
33245 +
33246 +
33247 +if test "x$enable_dependency_tracking" != xno; then
33248 +  AMDEP_TRUE=
33249 +  AMDEP_FALSE='#'
33250 +else
33251 +  AMDEP_TRUE='#'
33252 +  AMDEP_FALSE=
33253 +fi
33254 +
33255 +
33256 +
33257 +
33258 +depcc="$CC"   am_compiler_list=
33259 +
33260 +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
33261 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
33262 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
33263 +  echo $ECHO_N "(cached) $ECHO_C" >&6
33264 +else
33265 +  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
33266 +  # We make a subdir and do the tests there.  Otherwise we can end up
33267 +  # making bogus files that we don't know about and never remove.  For
33268 +  # instance it was reported that on HP-UX the gcc test will end up
33269 +  # making a dummy file named `D' -- because `-MD' means `put the output
33270 +  # in D'.
33271 +  mkdir conftest.dir
33272 +  # Copy depcomp to subdir because otherwise we won't find it if we're
33273 +  # using a relative directory.
33274 +  cp "$am_depcomp" conftest.dir
33275 +  cd conftest.dir
33276 +  # We will build objects and dependencies in a subdirectory because
33277 +  # it helps to detect inapplicable dependency modes.  For instance
33278 +  # both Tru64's cc and ICC support -MD to output dependencies as a
33279 +  # side effect of compilation, but ICC will put the dependencies in
33280 +  # the current directory while Tru64 will put them in the object
33281 +  # directory.
33282 +  mkdir sub
33283 +
33284 +  am_cv_CC_dependencies_compiler_type=none
33285 +  if test "$am_compiler_list" = ""; then
33286 +     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
33287 +  fi
33288 +  for depmode in $am_compiler_list; do
33289 +    # Setup a source with many dependencies, because some compilers
33290 +    # like to wrap large dependency lists on column 80 (with \), and
33291 +    # we should not choose a depcomp mode which is confused by this.
33292 +    #
33293 +    # We need to recreate these files for each test, as the compiler may
33294 +    # overwrite some of them when testing with obscure command lines.
33295 +    # This happens at least with the AIX C compiler.
33296 +    : > sub/conftest.c
33297 +    for i in 1 2 3 4 5 6; do
33298 +      echo '#include "conftst'$i'.h"' >> sub/conftest.c
33299 +      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
33300 +      # Solaris 8's {/usr,}/bin/sh.
33301 +      touch sub/conftst$i.h
33302 +    done
33303 +    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
33304 +
33305 +    case $depmode in
33306 +    nosideeffect)
33307 +      # after this tag, mechanisms are not by side-effect, so they'll
33308 +      # only be used when explicitly requested
33309 +      if test "x$enable_dependency_tracking" = xyes; then
33310 +       continue
33311 +      else
33312 +       break
33313 +      fi
33314 +      ;;
33315 +    none) break ;;
33316 +    esac
33317 +    # We check with `-c' and `-o' for the sake of the "dashmstdout"
33318 +    # mode.  It turns out that the SunPro C++ compiler does not properly
33319 +    # handle `-M -o', and we need to detect this.
33320 +    if depmode=$depmode \
33321 +       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
33322 +       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
33323 +       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
33324 +         >/dev/null 2>conftest.err &&
33325 +       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
33326 +       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
33327 +       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
33328 +      # icc doesn't choke on unknown options, it will just issue warnings
33329 +      # or remarks (even with -Werror).  So we grep stderr for any message
33330 +      # that says an option was ignored or not supported.
33331 +      # When given -MP, icc 7.0 and 7.1 complain thusly:
33332 +      #   icc: Command line warning: ignoring option '-M'; no argument required
33333 +      # The diagnosis changed in icc 8.0:
33334 +      #   icc: Command line remark: option '-MP' not supported
33335 +      if (grep 'ignoring option' conftest.err ||
33336 +          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
33337 +        am_cv_CC_dependencies_compiler_type=$depmode
33338 +        break
33339 +      fi
33340 +    fi
33341 +  done
33342 +
33343 +  cd ..
33344 +  rm -rf conftest.dir
33345 +else
33346 +  am_cv_CC_dependencies_compiler_type=none
33347 +fi
33348 +
33349 +fi
33350 +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
33351 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
33352 +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
33353 +
33354 +
33355 +
33356 +if
33357 +  test "x$enable_dependency_tracking" != xno \
33358 +  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
33359 +  am__fastdepCC_TRUE=
33360 +  am__fastdepCC_FALSE='#'
33361 +else
33362 +  am__fastdepCC_TRUE='#'
33363 +  am__fastdepCC_FALSE=
33364 +fi
33365 +
33366 +
33367 +# Find a good install program.  We prefer a C program (faster),
33368 +# so one script is as good as another.  But avoid the broken or
33369 +# incompatible versions:
33370 +# SysV /etc/install, /usr/sbin/install
33371 +# SunOS /usr/etc/install
33372 +# IRIX /sbin/install
33373 +# AIX /bin/install
33374 +# AmigaOS /C/install, which installs bootblocks on floppy discs
33375 +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
33376 +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
33377 +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
33378 +# OS/2's system install, which has a completely different semantic
33379 +# ./install, which can be erroneously created by make from ./install.sh.
33380 +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
33381 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
33382 +if test -z "$INSTALL"; then
33383 +if test "${ac_cv_path_install+set}" = set; then
33384 +  echo $ECHO_N "(cached) $ECHO_C" >&6
33385 +else
33386 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33387 +for as_dir in $PATH
33388 +do
33389 +  IFS=$as_save_IFS
33390 +  test -z "$as_dir" && as_dir=.
33391 +  # Account for people who put trailing slashes in PATH elements.
33392 +case $as_dir/ in
33393 +  ./ | .// | /cC/* | \
33394 +  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
33395 +  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
33396 +  /usr/ucb/* ) ;;
33397 +  *)
33398 +    # OSF1 and SCO ODT 3.0 have their own names for install.
33399 +    # Don't use installbsd from OSF since it installs stuff as root
33400 +    # by default.
33401 +    for ac_prog in ginstall scoinst install; do
33402 +      for ac_exec_ext in '' $ac_executable_extensions; do
33403 +       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
33404 +         if test $ac_prog = install &&
33405 +           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
33406 +           # AIX install.  It has an incompatible calling convention.
33407 +           :
33408 +         elif test $ac_prog = install &&
33409 +           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
33410 +           # program-specific install script used by HP pwplus--don't use.
33411 +           :
33412 +         else
33413 +           ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
33414 +           break 3
33415 +         fi
33416 +       fi
33417 +      done
33418 +    done
33419 +    ;;
33420 +esac
33421 +done
33422 +
33423 +
33424 +fi
33425 +  if test "${ac_cv_path_install+set}" = set; then
33426 +    INSTALL=$ac_cv_path_install
33427 +  else
33428 +    # As a last resort, use the slow shell script.  We don't cache a
33429 +    # path for INSTALL within a source directory, because that will
33430 +    # break other packages using the cache if that directory is
33431 +    # removed, or if the path is relative.
33432 +    INSTALL=$ac_install_sh
33433 +  fi
33434 +fi
33435 +echo "$as_me:$LINENO: result: $INSTALL" >&5
33436 +echo "${ECHO_T}$INSTALL" >&6
33437 +
33438 +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
33439 +# It thinks the first close brace ends the variable substitution.
33440 +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
33441 +
33442 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
33443 +
33444 +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
33445 +
33446 +echo "$as_me:$LINENO: checking whether ln -s works" >&5
33447 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
33448 +LN_S=$as_ln_s
33449 +if test "$LN_S" = "ln -s"; then
33450 +  echo "$as_me:$LINENO: result: yes" >&5
33451 +echo "${ECHO_T}yes" >&6
33452 +else
33453 +  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
33454 +echo "${ECHO_T}no, using $LN_S" >&6
33455 +fi
33456 +
33457 +
33458 +
33459 +ac_ext=c
33460 +ac_cpp='$CPP $CPPFLAGS'
33461 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33462 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33463 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
33464 +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
33465 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
33466 +# On Suns, sometimes $CPP names a directory.
33467 +if test -n "$CPP" && test -d "$CPP"; then
33468 +  CPP=
33469 +fi
33470 +if test -z "$CPP"; then
33471 +  if test "${ac_cv_prog_CPP+set}" = set; then
33472 +  echo $ECHO_N "(cached) $ECHO_C" >&6
33473 +else
33474 +      # Double quotes because CPP needs to be expanded
33475 +    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33476 +    do
33477 +      ac_preproc_ok=false
33478 +for ac_c_preproc_warn_flag in '' yes
33479 +do
33480 +  # Use a header file that comes with gcc, so configuring glibc
33481 +  # with a fresh cross-compiler works.
33482 +  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33483 +  # <limits.h> exists even on freestanding compilers.
33484 +  # On the NeXT, cc -E runs the code through the compiler's parser,
33485 +  # not just through cpp. "Syntax error" is here to catch this case.
33486 +  cat >conftest.$ac_ext <<_ACEOF
33487 +/* confdefs.h.  */
33488 +_ACEOF
33489 +cat confdefs.h >>conftest.$ac_ext
33490 +cat >>conftest.$ac_ext <<_ACEOF
33491 +/* end confdefs.h.  */
33492 +#ifdef __STDC__
33493 +# include <limits.h>
33494 +#else
33495 +# include <assert.h>
33496 +#endif
33497 +                    Syntax error
33498 +_ACEOF
33499 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
33500 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
33501 +  ac_status=$?
33502 +  grep -v '^ *+' conftest.er1 >conftest.err
33503 +  rm -f conftest.er1
33504 +  cat conftest.err >&5
33505 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33506 +  (exit $ac_status); } >/dev/null; then
33507 +  if test -s conftest.err; then
33508 +    ac_cpp_err=$ac_c_preproc_warn_flag
33509 +    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
33510 +  else
33511 +    ac_cpp_err=
33512 +  fi
33513 +else
33514 +  ac_cpp_err=yes
33515 +fi
33516 +if test -z "$ac_cpp_err"; then
33517 +  :
33518 +else
33519 +  echo "$as_me: failed program was:" >&5
33520 +sed 's/^/| /' conftest.$ac_ext >&5
33521 +
33522 +  # Broken: fails on valid input.
33523 +continue
33524 +fi
33525 +rm -f conftest.err conftest.$ac_ext
33526 +
33527 +  # OK, works on sane cases.  Now check whether non-existent headers
33528 +  # can be detected and how.
33529 +  cat >conftest.$ac_ext <<_ACEOF
33530 +/* confdefs.h.  */
33531 +_ACEOF
33532 +cat confdefs.h >>conftest.$ac_ext
33533 +cat >>conftest.$ac_ext <<_ACEOF
33534 +/* end confdefs.h.  */
33535 +#include <ac_nonexistent.h>
33536 +_ACEOF
33537 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
33538 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
33539 +  ac_status=$?
33540 +  grep -v '^ *+' conftest.er1 >conftest.err
33541 +  rm -f conftest.er1
33542 +  cat conftest.err >&5
33543 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33544 +  (exit $ac_status); } >/dev/null; then
33545 +  if test -s conftest.err; then
33546 +    ac_cpp_err=$ac_c_preproc_warn_flag
33547 +    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
33548 +  else
33549 +    ac_cpp_err=
33550 +  fi
33551 +else
33552 +  ac_cpp_err=yes
33553 +fi
33554 +if test -z "$ac_cpp_err"; then
33555 +  # Broken: success on invalid input.
33556 +continue
33557 +else
33558 +  echo "$as_me: failed program was:" >&5
33559 +sed 's/^/| /' conftest.$ac_ext >&5
33560 +
33561 +  # Passes both tests.
33562 +ac_preproc_ok=:
33563 +break
33564 +fi
33565 +rm -f conftest.err conftest.$ac_ext
33566 +
33567 +done
33568 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33569 +rm -f conftest.err conftest.$ac_ext
33570 +if $ac_preproc_ok; then
33571 +  break
33572 +fi
33573 +
33574 +    done
33575 +    ac_cv_prog_CPP=$CPP
33576 +
33577 +fi
33578 +  CPP=$ac_cv_prog_CPP
33579 +else
33580 +  ac_cv_prog_CPP=$CPP
33581 +fi
33582 +echo "$as_me:$LINENO: result: $CPP" >&5
33583 +echo "${ECHO_T}$CPP" >&6
33584 +ac_preproc_ok=false
33585 +for ac_c_preproc_warn_flag in '' yes
33586 +do
33587 +  # Use a header file that comes with gcc, so configuring glibc
33588 +  # with a fresh cross-compiler works.
33589 +  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33590 +  # <limits.h> exists even on freestanding compilers.
33591 +  # On the NeXT, cc -E runs the code through the compiler's parser,
33592 +  # not just through cpp. "Syntax error" is here to catch this case.
33593 +  cat >conftest.$ac_ext <<_ACEOF
33594 +/* confdefs.h.  */
33595 +_ACEOF
33596 +cat confdefs.h >>conftest.$ac_ext
33597 +cat >>conftest.$ac_ext <<_ACEOF
33598 +/* end confdefs.h.  */
33599 +#ifdef __STDC__
33600 +# include <limits.h>
33601 +#else
33602 +# include <assert.h>
33603 +#endif
33604 +                    Syntax error
33605 +_ACEOF
33606 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
33607 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
33608 +  ac_status=$?
33609 +  grep -v '^ *+' conftest.er1 >conftest.err
33610 +  rm -f conftest.er1
33611 +  cat conftest.err >&5
33612 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33613 +  (exit $ac_status); } >/dev/null; then
33614 +  if test -s conftest.err; then
33615 +    ac_cpp_err=$ac_c_preproc_warn_flag
33616 +    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
33617 +  else
33618 +    ac_cpp_err=
33619 +  fi
33620 +else
33621 +  ac_cpp_err=yes
33622 +fi
33623 +if test -z "$ac_cpp_err"; then
33624 +  :
33625 +else
33626 +  echo "$as_me: failed program was:" >&5
33627 +sed 's/^/| /' conftest.$ac_ext >&5
33628 +
33629 +  # Broken: fails on valid input.
33630 +continue
33631 +fi
33632 +rm -f conftest.err conftest.$ac_ext
33633 +
33634 +  # OK, works on sane cases.  Now check whether non-existent headers
33635 +  # can be detected and how.
33636 +  cat >conftest.$ac_ext <<_ACEOF
33637 +/* confdefs.h.  */
33638 +_ACEOF
33639 +cat confdefs.h >>conftest.$ac_ext
33640 +cat >>conftest.$ac_ext <<_ACEOF
33641 +/* end confdefs.h.  */
33642 +#include <ac_nonexistent.h>
33643 +_ACEOF
33644 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
33645 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
33646 +  ac_status=$?
33647 +  grep -v '^ *+' conftest.er1 >conftest.err
33648 +  rm -f conftest.er1
33649 +  cat conftest.err >&5
33650 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
33651 +  (exit $ac_status); } >/dev/null; then
33652 +  if test -s conftest.err; then
33653 +    ac_cpp_err=$ac_c_preproc_warn_flag
33654 +    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
33655 +  else
33656 +    ac_cpp_err=
33657 +  fi
33658 +else
33659 +  ac_cpp_err=yes
33660 +fi
33661 +if test -z "$ac_cpp_err"; then
33662 +  # Broken: success on invalid input.
33663 +continue
33664 +else
33665 +  echo "$as_me: failed program was:" >&5
33666 +sed 's/^/| /' conftest.$ac_ext >&5
33667 +
33668 +  # Passes both tests.
33669 +ac_preproc_ok=:
33670 +break
33671 +fi
33672 +rm -f conftest.err conftest.$ac_ext
33673 +
33674 +done
33675 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33676 +rm -f conftest.err conftest.$ac_ext
33677 +if $ac_preproc_ok; then
33678 +  :
33679 +else
33680 +  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
33681 +See \`config.log' for more details." >&5
33682 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
33683 +See \`config.log' for more details." >&2;}
33684 +   { (exit 1); exit 1; }; }
33685 +fi
33686 +
33687 +ac_ext=c
33688 +ac_cpp='$CPP $CPPFLAGS'
33689 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33690 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33691 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
33692 +
33693 +
33694 +echo "$as_me:$LINENO: checking for egrep" >&5
33695 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6
33696 +if test "${ac_cv_prog_egrep+set}" = set; then
33697 +  echo $ECHO_N "(cached) $ECHO_C" >&6
33698 +else
33699 +  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
33700 +    then ac_cv_prog_egrep='grep -E'
33701 +    else ac_cv_prog_egrep='egrep'
33702 +    fi
33703 +fi
33704 +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
33705 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6
33706 + EGREP=$ac_cv_prog_egrep
33707 +
33708 +
33709 +if test $ac_cv_c_compiler_gnu = yes; then
33710 +    echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
33711 +echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
33712 +if test "${ac_cv_prog_gcc_traditional+set}" = set; then
33713 +  echo $ECHO_N "(cached) $ECHO_C" >&6
33714 +else
33715 +    ac_pattern="Autoconf.*'x'"
33716 +  cat >conftest.$ac_ext <<_ACEOF
33717 +/* confdefs.h.  */
33718 +_ACEOF
33719 +cat confdefs.h >>conftest.$ac_ext
33720 +cat >>conftest.$ac_ext <<_ACEOF
33721 +/* end confdefs.h.  */
33722 +#include <sgtty.h>
33723 +Autoconf TIOCGETP
33724 +_ACEOF
33725 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33726 +  $EGREP "$ac_pattern" >/dev/null 2>&1; then
33727 +  ac_cv_prog_gcc_traditional=yes
33728 +else
33729 +  ac_cv_prog_gcc_traditional=no
33730 +fi
33731 +rm -f conftest*
33732 +
33733 +
33734 +  if test $ac_cv_prog_gcc_traditional = no; then
33735 +    cat >conftest.$ac_ext <<_ACEOF
33736 +/* confdefs.h.  */
33737 +_ACEOF
33738 +cat confdefs.h >>conftest.$ac_ext
33739 +cat >>conftest.$ac_ext <<_ACEOF
33740 +/* end confdefs.h.  */
33741 +#include <termio.h>
33742 +Autoconf TCGETA
33743 +_ACEOF
33744 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33745 +  $EGREP "$ac_pattern" >/dev/null 2>&1; then
33746 +  ac_cv_prog_gcc_traditional=yes
33747 +fi
33748 +rm -f conftest*
33749 +
33750 +  fi
33751 +fi
33752 +echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
33753 +echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
33754 +  if test $ac_cv_prog_gcc_traditional = yes; then
33755 +    CC="$CC -traditional"
33756 +  fi
33757 +fi
33758 +
33759 +if test "$GCC" = yes ; then
33760 +        CFLAGS="$CFLAGS -Wall"
33761 +fi
33762 +
33763 +# Check whether --enable-shared or --disable-shared was given.
33764 +if test "${enable_shared+set}" = set; then
33765 +  enableval="$enable_shared"
33766 +  p=${PACKAGE-default}
33767 +    case $enableval in
33768 +    yes) enable_shared=yes ;;
33769 +    no) enable_shared=no ;;
33770 +    *)
33771 +      enable_shared=no
33772 +      # Look at the argument we got.  We use all the common list separators.
33773 +      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
33774 +      for pkg in $enableval; do
33775 +       IFS="$lt_save_ifs"
33776 +       if test "X$pkg" = "X$p"; then
33777 +         enable_shared=yes
33778 +       fi
33779 +      done
33780 +      IFS="$lt_save_ifs"
33781 +      ;;
33782 +    esac
33783 +else
33784 +  enable_shared=yes
33785 +fi;
33786 +
33787 +# Check whether --enable-static or --disable-static was given.
33788 +if test "${enable_static+set}" = set; then
33789 +  enableval="$enable_static"
33790 +  p=${PACKAGE-default}
33791 +    case $enableval in
33792 +    yes) enable_static=yes ;;
33793 +    no) enable_static=no ;;
33794 +    *)
33795 +     enable_static=no
33796 +      # Look at the argument we got.  We use all the common list separators.
33797 +      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
33798 +      for pkg in $enableval; do
33799 +       IFS="$lt_save_ifs"
33800 +       if test "X$pkg" = "X$p"; then
33801 +         enable_static=yes
33802 +       fi
33803 +      done
33804 +      IFS="$lt_save_ifs"
33805 +      ;;
33806 +    esac
33807 +else
33808 +  enable_static=yes
33809 +fi;
33810 +
33811 +# Check whether --enable-fast-install or --disable-fast-install was given.
33812 +if test "${enable_fast_install+set}" = set; then
33813 +  enableval="$enable_fast_install"
33814 +  p=${PACKAGE-default}
33815 +    case $enableval in
33816 +    yes) enable_fast_install=yes ;;
33817 +    no) enable_fast_install=no ;;
33818 +    *)
33819 +      enable_fast_install=no
33820 +      # Look at the argument we got.  We use all the common list separators.
33821 +      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
33822 +      for pkg in $enableval; do
33823 +       IFS="$lt_save_ifs"
33824 +       if test "X$pkg" = "X$p"; then
33825 +         enable_fast_install=yes
33826 +       fi
33827 +      done
33828 +      IFS="$lt_save_ifs"
33829 +      ;;
33830 +    esac
33831 +else
33832 +  enable_fast_install=yes
33833 +fi;
33834 +
33835 +# Make sure we can run config.sub.
33836 +$ac_config_sub sun4 >/dev/null 2>&1 ||
33837 +  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
33838 +echo "$as_me: error: cannot run $ac_config_sub" >&2;}
33839 +   { (exit 1); exit 1; }; }
33840 +
33841 +echo "$as_me:$LINENO: checking build system type" >&5
33842 +echo $ECHO_N "checking build system type... $ECHO_C" >&6
33843 +if test "${ac_cv_build+set}" = set; then
33844 +  echo $ECHO_N "(cached) $ECHO_C" >&6
33845 +else
33846 +  ac_cv_build_alias=$build_alias
33847 +test -z "$ac_cv_build_alias" &&
33848 +  ac_cv_build_alias=`$ac_config_guess`
33849 +test -z "$ac_cv_build_alias" &&
33850 +  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
33851 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
33852 +   { (exit 1); exit 1; }; }
33853 +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
33854 +  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
33855 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
33856 +   { (exit 1); exit 1; }; }
33857 +
33858 +fi
33859 +echo "$as_me:$LINENO: result: $ac_cv_build" >&5
33860 +echo "${ECHO_T}$ac_cv_build" >&6
33861 +build=$ac_cv_build
33862 +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
33863 +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
33864 +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
33865 +
33866 +
33867 +echo "$as_me:$LINENO: checking host system type" >&5
33868 +echo $ECHO_N "checking host system type... $ECHO_C" >&6
33869 +if test "${ac_cv_host+set}" = set; then
33870 +  echo $ECHO_N "(cached) $ECHO_C" >&6
33871 +else
33872 +  ac_cv_host_alias=$host_alias
33873 +test -z "$ac_cv_host_alias" &&
33874 +  ac_cv_host_alias=$ac_cv_build_alias
33875 +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
33876 +  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
33877 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
33878 +   { (exit 1); exit 1; }; }
33879 +
33880 +fi
33881 +echo "$as_me:$LINENO: result: $ac_cv_host" >&5
33882 +echo "${ECHO_T}$ac_cv_host" >&6
33883 +host=$ac_cv_host
33884 +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
33885 +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
33886 +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
33887 +
33888 +
33889 +echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
33890 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
33891 +if test "${lt_cv_path_SED+set}" = set; then
33892 +  echo $ECHO_N "(cached) $ECHO_C" >&6
33893 +else
33894 +  # Loop through the user's path and test for sed and gsed.
33895 +# Then use that list of sed's as ones to test for truncation.
33896 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33897 +for as_dir in $PATH
33898 +do
33899 +  IFS=$as_save_IFS
33900 +  test -z "$as_dir" && as_dir=.
33901 +  for lt_ac_prog in sed gsed; do
33902 +    for ac_exec_ext in '' $ac_executable_extensions; do
33903 +      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
33904 +        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
33905 +      fi
33906 +    done
33907 +  done
33908 +done
33909 +lt_ac_max=0
33910 +lt_ac_count=0
33911 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris
33912 +# along with /bin/sed that truncates output.
33913 +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
33914 +  test ! -f $lt_ac_sed && continue
33915 +  cat /dev/null > conftest.in
33916 +  lt_ac_count=0
33917 +  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
33918 +  # Check for GNU sed and select it if it is found.
33919 +  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
33920 +    lt_cv_path_SED=$lt_ac_sed
33921 +    break
33922 +  fi
33923 +  while true; do
33924 +    cat conftest.in conftest.in >conftest.tmp
33925 +    mv conftest.tmp conftest.in
33926 +    cp conftest.in conftest.nl
33927 +    echo >>conftest.nl
33928 +    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
33929 +    cmp -s conftest.out conftest.nl || break
33930 +    # 10000 chars as input seems more than enough
33931 +    test $lt_ac_count -gt 10 && break
33932 +    lt_ac_count=`expr $lt_ac_count + 1`
33933 +    if test $lt_ac_count -gt $lt_ac_max; then
33934 +      lt_ac_max=$lt_ac_count
33935 +      lt_cv_path_SED=$lt_ac_sed
33936 +    fi
33937 +  done
33938 +done
33939 +
33940 +fi
33941 +
33942 +SED=$lt_cv_path_SED
33943 +echo "$as_me:$LINENO: result: $SED" >&5
33944 +echo "${ECHO_T}$SED" >&6
33945 +
33946 +
33947 +# Check whether --with-gnu-ld or --without-gnu-ld was given.
33948 +if test "${with_gnu_ld+set}" = set; then
33949 +  withval="$with_gnu_ld"
33950 +  test "$withval" = no || with_gnu_ld=yes
33951 +else
33952 +  with_gnu_ld=no
33953 +fi;
33954 +ac_prog=ld
33955 +if test "$GCC" = yes; then
33956 +  # Check if gcc -print-prog-name=ld gives a path.
33957 +  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
33958 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
33959 +  case $host in
33960 +  *-*-mingw*)
33961 +    # gcc leaves a trailing carriage return which upsets mingw
33962 +    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
33963 +  *)
33964 +    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
33965 +  esac
33966 +  case $ac_prog in
33967 +    # Accept absolute paths.
33968 +    [\\/]* | ?:[\\/]*)
33969 +      re_direlt='/[^/][^/]*/\.\./'
33970 +      # Canonicalize the pathname of ld
33971 +      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
33972 +      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
33973 +       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
33974 +      done
33975 +      test -z "$LD" && LD="$ac_prog"
33976 +      ;;
33977 +  "")
33978 +    # If it fails, then pretend we aren't using GCC.
33979 +    ac_prog=ld
33980 +    ;;
33981 +  *)
33982 +    # If it is relative, then search for the first ld in PATH.
33983 +    with_gnu_ld=unknown
33984 +    ;;
33985 +  esac
33986 +elif test "$with_gnu_ld" = yes; then
33987 +  echo "$as_me:$LINENO: checking for GNU ld" >&5
33988 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
33989 +else
33990 +  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
33991 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
33992 +fi
33993 +if test "${lt_cv_path_LD+set}" = set; then
33994 +  echo $ECHO_N "(cached) $ECHO_C" >&6
33995 +else
33996 +  if test -z "$LD"; then
33997 +  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
33998 +  for ac_dir in $PATH; do
33999 +    IFS="$lt_save_ifs"
34000 +    test -z "$ac_dir" && ac_dir=.
34001 +    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
34002 +      lt_cv_path_LD="$ac_dir/$ac_prog"
34003 +      # Check to see if the program is GNU ld.  I'd rather use --version,
34004 +      # but apparently some GNU ld's only accept -v.
34005 +      # Break only if it was the GNU/non-GNU ld that we prefer.
34006 +      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
34007 +      *GNU* | *'with BFD'*)
34008 +       test "$with_gnu_ld" != no && break
34009 +       ;;
34010 +      *)
34011 +       test "$with_gnu_ld" != yes && break
34012 +       ;;
34013 +      esac
34014 +    fi
34015 +  done
34016 +  IFS="$lt_save_ifs"
34017 +else
34018 +  lt_cv_path_LD="$LD" # Let the user override the test with a path.
34019 +fi
34020 +fi
34021 +
34022 +LD="$lt_cv_path_LD"
34023 +if test -n "$LD"; then
34024 +  echo "$as_me:$LINENO: result: $LD" >&5
34025 +echo "${ECHO_T}$LD" >&6
34026 +else
34027 +  echo "$as_me:$LINENO: result: no" >&5
34028 +echo "${ECHO_T}no" >&6
34029 +fi
34030 +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
34031 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
34032 +   { (exit 1); exit 1; }; }
34033 +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
34034 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
34035 +if test "${lt_cv_prog_gnu_ld+set}" = set; then
34036 +  echo $ECHO_N "(cached) $ECHO_C" >&6
34037 +else
34038 +  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
34039 +case `$LD -v 2>&1 </dev/null` in
34040 +*GNU* | *'with BFD'*)
34041 +  lt_cv_prog_gnu_ld=yes
34042 +  ;;
34043 +*)
34044 +  lt_cv_prog_gnu_ld=no
34045 +  ;;
34046 +esac
34047 +fi
34048 +echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
34049 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
34050 +with_gnu_ld=$lt_cv_prog_gnu_ld
34051 +
34052 +
34053 +echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
34054 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
34055 +if test "${lt_cv_ld_reload_flag+set}" = set; then
34056 +  echo $ECHO_N "(cached) $ECHO_C" >&6
34057 +else
34058 +  lt_cv_ld_reload_flag='-r'
34059 +fi
34060 +echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
34061 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
34062 +reload_flag=$lt_cv_ld_reload_flag
34063 +case $reload_flag in
34064 +"" | " "*) ;;
34065 +*) reload_flag=" $reload_flag" ;;
34066 +esac
34067 +reload_cmds='$LD$reload_flag -o $output$reload_objs'
34068 +case $host_os in
34069 +  darwin*)
34070 +    if test "$GCC" = yes; then
34071 +      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
34072 +    else
34073 +      reload_cmds='$LD$reload_flag -o $output$reload_objs'
34074 +    fi
34075 +    ;;
34076 +esac
34077 +
34078 +echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
34079 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
34080 +if test "${lt_cv_path_NM+set}" = set; then
34081 +  echo $ECHO_N "(cached) $ECHO_C" >&6
34082 +else
34083 +  if test -n "$NM"; then
34084 +  # Let the user override the test.
34085 +  lt_cv_path_NM="$NM"
34086 +else
34087 +  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
34088 +  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
34089 +    IFS="$lt_save_ifs"
34090 +    test -z "$ac_dir" && ac_dir=.
34091 +    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
34092 +    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
34093 +      # Check to see if the nm accepts a BSD-compat flag.
34094 +      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
34095 +      #   nm: unknown option "B" ignored
34096 +      # Tru64's nm complains that /dev/null is an invalid object file
34097 +      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
34098 +      */dev/null* | *'Invalid file or object type'*)
34099 +       lt_cv_path_NM="$tmp_nm -B"
34100 +       break
34101 +        ;;
34102 +      *)
34103 +       case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
34104 +       */dev/null*)
34105 +         lt_cv_path_NM="$tmp_nm -p"
34106 +         break
34107 +         ;;
34108 +       *)
34109 +         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
34110 +         continue # so that we can try to find one that supports BSD flags
34111 +         ;;
34112 +       esac
34113 +      esac
34114 +    fi
34115 +  done
34116 +  IFS="$lt_save_ifs"
34117 +  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
34118 +fi
34119 +fi
34120 +echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
34121 +echo "${ECHO_T}$lt_cv_path_NM" >&6
34122 +NM="$lt_cv_path_NM"
34123 +
34124 +echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
34125 +echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
34126 +if test "${lt_cv_deplibs_check_method+set}" = set; then
34127 +  echo $ECHO_N "(cached) $ECHO_C" >&6
34128 +else
34129 +  lt_cv_file_magic_cmd='$MAGIC_CMD'
34130 +lt_cv_file_magic_test_file=
34131 +lt_cv_deplibs_check_method='unknown'
34132 +# Need to set the preceding variable on all platforms that support
34133 +# interlibrary dependencies.
34134 +# 'none' -- dependencies not supported.
34135 +# `unknown' -- same as none, but documents that we really don't know.
34136 +# 'pass_all' -- all dependencies passed with no checks.
34137 +# 'test_compile' -- check by making test program.
34138 +# 'file_magic [[regex]]' -- check by looking for files in library path
34139 +# which responds to the $file_magic_cmd with a given extended regex.
34140 +# If you have `file' or equivalent on your system and you're not sure
34141 +# whether `pass_all' will *always* work, you probably want this one.
34142 +
34143 +case $host_os in
34144 +aix4* | aix5*)
34145 +  lt_cv_deplibs_check_method=pass_all
34146 +  ;;
34147 +
34148 +beos*)
34149 +  lt_cv_deplibs_check_method=pass_all
34150 +  ;;
34151 +
34152 +bsdi[45]*)
34153 +  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
34154 +  lt_cv_file_magic_cmd='/usr/bin/file -L'
34155 +  lt_cv_file_magic_test_file=/shlib/libc.so
34156 +  ;;
34157 +
34158 +cygwin*)
34159 +  # func_win32_libid is a shell function defined in ltmain.sh
34160 +  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
34161 +  lt_cv_file_magic_cmd='func_win32_libid'
34162 +  ;;
34163 +
34164 +mingw* | pw32*)
34165 +  # Base MSYS/MinGW do not provide the 'file' command needed by
34166 +  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
34167 +  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
34168 +  lt_cv_file_magic_cmd='$OBJDUMP -f'
34169 +  ;;
34170 +
34171 +darwin* | rhapsody*)
34172 +  lt_cv_deplibs_check_method=pass_all
34173 +  ;;
34174 +
34175 +freebsd* | kfreebsd*-gnu | dragonfly*)
34176 +  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
34177 +    case $host_cpu in
34178 +    i*86 )
34179 +      # Not sure whether the presence of OpenBSD here was a mistake.
34180 +      # Let's accept both of them until this is cleared up.
34181 +      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
34182 +      lt_cv_file_magic_cmd=/usr/bin/file
34183 +      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
34184 +      ;;
34185 +    esac
34186 +  else
34187 +    lt_cv_deplibs_check_method=pass_all
34188 +  fi
34189 +  ;;
34190 +
34191 +gnu*)
34192 +  lt_cv_deplibs_check_method=pass_all
34193 +  ;;
34194 +
34195 +hpux10.20* | hpux11*)
34196 +  lt_cv_file_magic_cmd=/usr/bin/file
34197 +  case "$host_cpu" in
34198 +  ia64*)
34199 +    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
34200 +    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
34201 +    ;;
34202 +  hppa*64*)
34203 +    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
34204 +    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
34205 +    ;;
34206 +  *)
34207 +    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
34208 +    lt_cv_file_magic_test_file=/usr/lib/libc.sl
34209 +    ;;
34210 +  esac
34211 +  ;;
34212 +
34213 +irix5* | irix6* | nonstopux*)
34214 +  case $LD in
34215 +  *-32|*"-32 ") libmagic=32-bit;;
34216 +  *-n32|*"-n32 ") libmagic=N32;;
34217 +  *-64|*"-64 ") libmagic=64-bit;;
34218 +  *) libmagic=never-match;;
34219 +  esac
34220 +  lt_cv_deplibs_check_method=pass_all
34221 +  ;;
34222 +
34223 +# This must be Linux ELF.
34224 +linux*)
34225 +  lt_cv_deplibs_check_method=pass_all
34226 +  ;;
34227 +
34228 +netbsd*)
34229 +  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
34230 +    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
34231 +  else
34232 +    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
34233 +  fi
34234 +  ;;
34235 +
34236 +newos6*)
34237 +  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
34238 +  lt_cv_file_magic_cmd=/usr/bin/file
34239 +  lt_cv_file_magic_test_file=/usr/lib/libnls.so
34240 +  ;;
34241 +
34242 +nto-qnx*)
34243 +  lt_cv_deplibs_check_method=unknown
34244 +  ;;
34245 +
34246 +openbsd*)
34247 +  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
34248 +    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
34249 +  else
34250 +    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
34251 +  fi
34252 +  ;;
34253 +
34254 +osf3* | osf4* | osf5*)
34255 +  lt_cv_deplibs_check_method=pass_all
34256 +  ;;
34257 +
34258 +sco3.2v5*)
34259 +  lt_cv_deplibs_check_method=pass_all
34260 +  ;;
34261 +
34262 +solaris*)
34263 +  lt_cv_deplibs_check_method=pass_all
34264 +  ;;
34265 +
34266 +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
34267 +  case $host_vendor in
34268 +  motorola)
34269 +    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
34270 +    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
34271 +    ;;
34272 +  ncr)
34273 +    lt_cv_deplibs_check_method=pass_all
34274 +    ;;
34275 +  sequent)
34276 +    lt_cv_file_magic_cmd='/bin/file'
34277 +    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
34278 +    ;;
34279 +  sni)
34280 +    lt_cv_file_magic_cmd='/bin/file'
34281 +    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
34282 +    lt_cv_file_magic_test_file=/lib/libc.so
34283 +    ;;
34284 +  siemens)
34285 +    lt_cv_deplibs_check_method=pass_all
34286 +    ;;
34287 +  esac
34288 +  ;;
34289 +
34290 +sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
34291 +  lt_cv_deplibs_check_method=pass_all
34292 +  ;;
34293 +esac
34294 +
34295 +fi
34296 +echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
34297 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
34298 +file_magic_cmd=$lt_cv_file_magic_cmd
34299 +deplibs_check_method=$lt_cv_deplibs_check_method
34300 +test -z "$deplibs_check_method" && deplibs_check_method=unknown
34301 +
34302 +
34303 +
34304 +
34305 +# If no C compiler was specified, use CC.
34306 +LTCC=${LTCC-"$CC"}
34307 +
34308 +# Allow CC to be a program name with arguments.
34309 +compiler=$CC
34310 +
34311 +# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
34312 +if test "${enable_libtool_lock+set}" = set; then
34313 +  enableval="$enable_libtool_lock"
34314 +
34315 +fi;
34316 +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
34317 +
34318 +# Some flags need to be propagated to the compiler or linker for good
34319 +# libtool support.
34320 +case $host in
34321 +ia64-*-hpux*)
34322 +  # Find out which ABI we are using.
34323 +  echo 'int i;' > conftest.$ac_ext
34324 +  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34325 +  (eval $ac_compile) 2>&5
34326 +  ac_status=$?
34327 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34328 +  (exit $ac_status); }; then
34329 +    case `/usr/bin/file conftest.$ac_objext` in
34330 +    *ELF-32*)
34331 +      HPUX_IA64_MODE="32"
34332 +      ;;
34333 +    *ELF-64*)
34334 +      HPUX_IA64_MODE="64"
34335 +      ;;
34336 +    esac
34337 +  fi
34338 +  rm -rf conftest*
34339 +  ;;
34340 +*-*-irix6*)
34341 +  # Find out which ABI we are using.
34342 +  echo '#line 4048 "configure"' > conftest.$ac_ext
34343 +  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34344 +  (eval $ac_compile) 2>&5
34345 +  ac_status=$?
34346 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34347 +  (exit $ac_status); }; then
34348 +   if test "$lt_cv_prog_gnu_ld" = yes; then
34349 +    case `/usr/bin/file conftest.$ac_objext` in
34350 +    *32-bit*)
34351 +      LD="${LD-ld} -melf32bsmip"
34352 +      ;;
34353 +    *N32*)
34354 +      LD="${LD-ld} -melf32bmipn32"
34355 +      ;;
34356 +    *64-bit*)
34357 +      LD="${LD-ld} -melf64bmip"
34358 +      ;;
34359 +    esac
34360 +   else
34361 +    case `/usr/bin/file conftest.$ac_objext` in
34362 +    *32-bit*)
34363 +      LD="${LD-ld} -32"
34364 +      ;;
34365 +    *N32*)
34366 +      LD="${LD-ld} -n32"
34367 +      ;;
34368 +    *64-bit*)
34369 +      LD="${LD-ld} -64"
34370 +      ;;
34371 +    esac
34372 +   fi
34373 +  fi
34374 +  rm -rf conftest*
34375 +  ;;
34376 +
34377 +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
34378 +  # Find out which ABI we are using.
34379 +  echo 'int i;' > conftest.$ac_ext
34380 +  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34381 +  (eval $ac_compile) 2>&5
34382 +  ac_status=$?
34383 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34384 +  (exit $ac_status); }; then
34385 +    case "`/usr/bin/file conftest.o`" in
34386 +    *32-bit*)
34387 +      case $host in
34388 +        x86_64-*linux*)
34389 +          LD="${LD-ld} -m elf_i386"
34390 +          ;;
34391 +        ppc64-*linux*|powerpc64-*linux*)
34392 +          LD="${LD-ld} -m elf32ppclinux"
34393 +          ;;
34394 +        s390x-*linux*)
34395 +          LD="${LD-ld} -m elf_s390"
34396 +          ;;
34397 +        sparc64-*linux*)
34398 +          LD="${LD-ld} -m elf32_sparc"
34399 +          ;;
34400 +      esac
34401 +      ;;
34402 +    *64-bit*)
34403 +      case $host in
34404 +        x86_64-*linux*)
34405 +          LD="${LD-ld} -m elf_x86_64"
34406 +          ;;
34407 +        ppc*-*linux*|powerpc*-*linux*)
34408 +          LD="${LD-ld} -m elf64ppc"
34409 +          ;;
34410 +        s390*-*linux*)
34411 +          LD="${LD-ld} -m elf64_s390"
34412 +          ;;
34413 +        sparc*-*linux*)
34414 +          LD="${LD-ld} -m elf64_sparc"
34415 +          ;;
34416 +      esac
34417 +      ;;
34418 +    esac
34419 +  fi
34420 +  rm -rf conftest*
34421 +  ;;
34422 +
34423 +*-*-sco3.2v5*)
34424 +  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
34425 +  SAVE_CFLAGS="$CFLAGS"
34426 +  CFLAGS="$CFLAGS -belf"
34427 +  echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
34428 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
34429 +if test "${lt_cv_cc_needs_belf+set}" = set; then
34430 +  echo $ECHO_N "(cached) $ECHO_C" >&6
34431 +else
34432 +  ac_ext=c
34433 +ac_cpp='$CPP $CPPFLAGS'
34434 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34435 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34436 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
34437 +
34438 +     cat >conftest.$ac_ext <<_ACEOF
34439 +/* confdefs.h.  */
34440 +_ACEOF
34441 +cat confdefs.h >>conftest.$ac_ext
34442 +cat >>conftest.$ac_ext <<_ACEOF
34443 +/* end confdefs.h.  */
34444 +
34445 +int
34446 +main ()
34447 +{
34448 +
34449 +  ;
34450 +  return 0;
34451 +}
34452 +_ACEOF
34453 +rm -f conftest.$ac_objext conftest$ac_exeext
34454 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34455 +  (eval $ac_link) 2>conftest.er1
34456 +  ac_status=$?
34457 +  grep -v '^ *+' conftest.er1 >conftest.err
34458 +  rm -f conftest.er1
34459 +  cat conftest.err >&5
34460 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34461 +  (exit $ac_status); } &&
34462 +        { ac_try='test -z "$ac_c_werror_flag"
34463 +                        || test ! -s conftest.err'
34464 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34465 +  (eval $ac_try) 2>&5
34466 +  ac_status=$?
34467 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34468 +  (exit $ac_status); }; } &&
34469 +        { ac_try='test -s conftest$ac_exeext'
34470 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34471 +  (eval $ac_try) 2>&5
34472 +  ac_status=$?
34473 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34474 +  (exit $ac_status); }; }; then
34475 +  lt_cv_cc_needs_belf=yes
34476 +else
34477 +  echo "$as_me: failed program was:" >&5
34478 +sed 's/^/| /' conftest.$ac_ext >&5
34479 +
34480 +lt_cv_cc_needs_belf=no
34481 +fi
34482 +rm -f conftest.err conftest.$ac_objext \
34483 +      conftest$ac_exeext conftest.$ac_ext
34484 +     ac_ext=c
34485 +ac_cpp='$CPP $CPPFLAGS'
34486 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34487 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34488 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
34489 +
34490 +fi
34491 +echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
34492 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
34493 +  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
34494 +    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
34495 +    CFLAGS="$SAVE_CFLAGS"
34496 +  fi
34497 +  ;;
34498 +
34499 +esac
34500 +
34501 +need_locks="$enable_libtool_lock"
34502 +
34503 +
34504 +echo "$as_me:$LINENO: checking for ANSI C header files" >&5
34505 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
34506 +if test "${ac_cv_header_stdc+set}" = set; then
34507 +  echo $ECHO_N "(cached) $ECHO_C" >&6
34508 +else
34509 +  cat >conftest.$ac_ext <<_ACEOF
34510 +/* confdefs.h.  */
34511 +_ACEOF
34512 +cat confdefs.h >>conftest.$ac_ext
34513 +cat >>conftest.$ac_ext <<_ACEOF
34514 +/* end confdefs.h.  */
34515 +#include <stdlib.h>
34516 +#include <stdarg.h>
34517 +#include <string.h>
34518 +#include <float.h>
34519 +
34520 +int
34521 +main ()
34522 +{
34523 +
34524 +  ;
34525 +  return 0;
34526 +}
34527 +_ACEOF
34528 +rm -f conftest.$ac_objext
34529 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34530 +  (eval $ac_compile) 2>conftest.er1
34531 +  ac_status=$?
34532 +  grep -v '^ *+' conftest.er1 >conftest.err
34533 +  rm -f conftest.er1
34534 +  cat conftest.err >&5
34535 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34536 +  (exit $ac_status); } &&
34537 +        { ac_try='test -z "$ac_c_werror_flag"
34538 +                        || test ! -s conftest.err'
34539 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34540 +  (eval $ac_try) 2>&5
34541 +  ac_status=$?
34542 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34543 +  (exit $ac_status); }; } &&
34544 +        { ac_try='test -s conftest.$ac_objext'
34545 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34546 +  (eval $ac_try) 2>&5
34547 +  ac_status=$?
34548 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34549 +  (exit $ac_status); }; }; then
34550 +  ac_cv_header_stdc=yes
34551 +else
34552 +  echo "$as_me: failed program was:" >&5
34553 +sed 's/^/| /' conftest.$ac_ext >&5
34554 +
34555 +ac_cv_header_stdc=no
34556 +fi
34557 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34558 +
34559 +if test $ac_cv_header_stdc = yes; then
34560 +  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
34561 +  cat >conftest.$ac_ext <<_ACEOF
34562 +/* confdefs.h.  */
34563 +_ACEOF
34564 +cat confdefs.h >>conftest.$ac_ext
34565 +cat >>conftest.$ac_ext <<_ACEOF
34566 +/* end confdefs.h.  */
34567 +#include <string.h>
34568 +
34569 +_ACEOF
34570 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34571 +  $EGREP "memchr" >/dev/null 2>&1; then
34572 +  :
34573 +else
34574 +  ac_cv_header_stdc=no
34575 +fi
34576 +rm -f conftest*
34577 +
34578 +fi
34579 +
34580 +if test $ac_cv_header_stdc = yes; then
34581 +  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
34582 +  cat >conftest.$ac_ext <<_ACEOF
34583 +/* confdefs.h.  */
34584 +_ACEOF
34585 +cat confdefs.h >>conftest.$ac_ext
34586 +cat >>conftest.$ac_ext <<_ACEOF
34587 +/* end confdefs.h.  */
34588 +#include <stdlib.h>
34589 +
34590 +_ACEOF
34591 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34592 +  $EGREP "free" >/dev/null 2>&1; then
34593 +  :
34594 +else
34595 +  ac_cv_header_stdc=no
34596 +fi
34597 +rm -f conftest*
34598 +
34599 +fi
34600 +
34601 +if test $ac_cv_header_stdc = yes; then
34602 +  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
34603 +  if test "$cross_compiling" = yes; then
34604 +  :
34605 +else
34606 +  cat >conftest.$ac_ext <<_ACEOF
34607 +/* confdefs.h.  */
34608 +_ACEOF
34609 +cat confdefs.h >>conftest.$ac_ext
34610 +cat >>conftest.$ac_ext <<_ACEOF
34611 +/* end confdefs.h.  */
34612 +#include <ctype.h>
34613 +#if ((' ' & 0x0FF) == 0x020)
34614 +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
34615 +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
34616 +#else
34617 +# define ISLOWER(c) \
34618 +                  (('a' <= (c) && (c) <= 'i') \
34619 +                    || ('j' <= (c) && (c) <= 'r') \
34620 +                    || ('s' <= (c) && (c) <= 'z'))
34621 +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
34622 +#endif
34623 +
34624 +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
34625 +int
34626 +main ()
34627 +{
34628 +  int i;
34629 +  for (i = 0; i < 256; i++)
34630 +    if (XOR (islower (i), ISLOWER (i))
34631 +       || toupper (i) != TOUPPER (i))
34632 +      exit(2);
34633 +  exit (0);
34634 +}
34635 +_ACEOF
34636 +rm -f conftest$ac_exeext
34637 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34638 +  (eval $ac_link) 2>&5
34639 +  ac_status=$?
34640 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34641 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
34642 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34643 +  (eval $ac_try) 2>&5
34644 +  ac_status=$?
34645 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34646 +  (exit $ac_status); }; }; then
34647 +  :
34648 +else
34649 +  echo "$as_me: program exited with status $ac_status" >&5
34650 +echo "$as_me: failed program was:" >&5
34651 +sed 's/^/| /' conftest.$ac_ext >&5
34652 +
34653 +( exit $ac_status )
34654 +ac_cv_header_stdc=no
34655 +fi
34656 +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
34657 +fi
34658 +fi
34659 +fi
34660 +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
34661 +echo "${ECHO_T}$ac_cv_header_stdc" >&6
34662 +if test $ac_cv_header_stdc = yes; then
34663 +
34664 +cat >>confdefs.h <<\_ACEOF
34665 +#define STDC_HEADERS 1
34666 +_ACEOF
34667 +
34668 +fi
34669 +
34670 +# On IRIX 5.3, sys/types and inttypes.h are conflicting.
34671 +
34672 +
34673 +
34674 +
34675 +
34676 +
34677 +
34678 +
34679 +
34680 +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
34681 +                 inttypes.h stdint.h unistd.h
34682 +do
34683 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
34684 +echo "$as_me:$LINENO: checking for $ac_header" >&5
34685 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
34686 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
34687 +  echo $ECHO_N "(cached) $ECHO_C" >&6
34688 +else
34689 +  cat >conftest.$ac_ext <<_ACEOF
34690 +/* confdefs.h.  */
34691 +_ACEOF
34692 +cat confdefs.h >>conftest.$ac_ext
34693 +cat >>conftest.$ac_ext <<_ACEOF
34694 +/* end confdefs.h.  */
34695 +$ac_includes_default
34696 +
34697 +#include <$ac_header>
34698 +_ACEOF
34699 +rm -f conftest.$ac_objext
34700 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34701 +  (eval $ac_compile) 2>conftest.er1
34702 +  ac_status=$?
34703 +  grep -v '^ *+' conftest.er1 >conftest.err
34704 +  rm -f conftest.er1
34705 +  cat conftest.err >&5
34706 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34707 +  (exit $ac_status); } &&
34708 +        { ac_try='test -z "$ac_c_werror_flag"
34709 +                        || test ! -s conftest.err'
34710 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34711 +  (eval $ac_try) 2>&5
34712 +  ac_status=$?
34713 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34714 +  (exit $ac_status); }; } &&
34715 +        { ac_try='test -s conftest.$ac_objext'
34716 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34717 +  (eval $ac_try) 2>&5
34718 +  ac_status=$?
34719 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34720 +  (exit $ac_status); }; }; then
34721 +  eval "$as_ac_Header=yes"
34722 +else
34723 +  echo "$as_me: failed program was:" >&5
34724 +sed 's/^/| /' conftest.$ac_ext >&5
34725 +
34726 +eval "$as_ac_Header=no"
34727 +fi
34728 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34729 +fi
34730 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
34731 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
34732 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
34733 +  cat >>confdefs.h <<_ACEOF
34734 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
34735 +_ACEOF
34736 +
34737 +fi
34738 +
34739 +done
34740 +
34741 +
34742 +
34743 +for ac_header in dlfcn.h
34744 +do
34745 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
34746 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
34747 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
34748 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
34749 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
34750 +  echo $ECHO_N "(cached) $ECHO_C" >&6
34751 +fi
34752 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
34753 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
34754 +else
34755 +  # Is the header compilable?
34756 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
34757 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
34758 +cat >conftest.$ac_ext <<_ACEOF
34759 +/* confdefs.h.  */
34760 +_ACEOF
34761 +cat confdefs.h >>conftest.$ac_ext
34762 +cat >>conftest.$ac_ext <<_ACEOF
34763 +/* end confdefs.h.  */
34764 +$ac_includes_default
34765 +#include <$ac_header>
34766 +_ACEOF
34767 +rm -f conftest.$ac_objext
34768 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34769 +  (eval $ac_compile) 2>conftest.er1
34770 +  ac_status=$?
34771 +  grep -v '^ *+' conftest.er1 >conftest.err
34772 +  rm -f conftest.er1
34773 +  cat conftest.err >&5
34774 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34775 +  (exit $ac_status); } &&
34776 +        { ac_try='test -z "$ac_c_werror_flag"
34777 +                        || test ! -s conftest.err'
34778 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34779 +  (eval $ac_try) 2>&5
34780 +  ac_status=$?
34781 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34782 +  (exit $ac_status); }; } &&
34783 +        { ac_try='test -s conftest.$ac_objext'
34784 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34785 +  (eval $ac_try) 2>&5
34786 +  ac_status=$?
34787 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34788 +  (exit $ac_status); }; }; then
34789 +  ac_header_compiler=yes
34790 +else
34791 +  echo "$as_me: failed program was:" >&5
34792 +sed 's/^/| /' conftest.$ac_ext >&5
34793 +
34794 +ac_header_compiler=no
34795 +fi
34796 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34797 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
34798 +echo "${ECHO_T}$ac_header_compiler" >&6
34799 +
34800 +# Is the header present?
34801 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
34802 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
34803 +cat >conftest.$ac_ext <<_ACEOF
34804 +/* confdefs.h.  */
34805 +_ACEOF
34806 +cat confdefs.h >>conftest.$ac_ext
34807 +cat >>conftest.$ac_ext <<_ACEOF
34808 +/* end confdefs.h.  */
34809 +#include <$ac_header>
34810 +_ACEOF
34811 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
34812 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
34813 +  ac_status=$?
34814 +  grep -v '^ *+' conftest.er1 >conftest.err
34815 +  rm -f conftest.er1
34816 +  cat conftest.err >&5
34817 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34818 +  (exit $ac_status); } >/dev/null; then
34819 +  if test -s conftest.err; then
34820 +    ac_cpp_err=$ac_c_preproc_warn_flag
34821 +    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
34822 +  else
34823 +    ac_cpp_err=
34824 +  fi
34825 +else
34826 +  ac_cpp_err=yes
34827 +fi
34828 +if test -z "$ac_cpp_err"; then
34829 +  ac_header_preproc=yes
34830 +else
34831 +  echo "$as_me: failed program was:" >&5
34832 +sed 's/^/| /' conftest.$ac_ext >&5
34833 +
34834 +  ac_header_preproc=no
34835 +fi
34836 +rm -f conftest.err conftest.$ac_ext
34837 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
34838 +echo "${ECHO_T}$ac_header_preproc" >&6
34839 +
34840 +# So?  What about this header?
34841 +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
34842 +  yes:no: )
34843 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
34844 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
34845 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
34846 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
34847 +    ac_header_preproc=yes
34848 +    ;;
34849 +  no:yes:* )
34850 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
34851 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
34852 +    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
34853 +echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
34854 +    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
34855 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
34856 +    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
34857 +echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
34858 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
34859 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
34860 +    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
34861 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
34862 +    (
34863 +      cat <<\_ASBOX
34864 +## ------------------------------------------ ##
34865 +## Report this to the AC_PACKAGE_NAME lists.  ##
34866 +## ------------------------------------------ ##
34867 +_ASBOX
34868 +    ) |
34869 +      sed "s/^/$as_me: WARNING:     /" >&2
34870 +    ;;
34871 +esac
34872 +echo "$as_me:$LINENO: checking for $ac_header" >&5
34873 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
34874 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
34875 +  echo $ECHO_N "(cached) $ECHO_C" >&6
34876 +else
34877 +  eval "$as_ac_Header=\$ac_header_preproc"
34878 +fi
34879 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
34880 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
34881 +
34882 +fi
34883 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
34884 +  cat >>confdefs.h <<_ACEOF
34885 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
34886 +_ACEOF
34887 +
34888 +fi
34889 +
34890 +done
34891 +
34892 +ac_ext=cc
34893 +ac_cpp='$CXXCPP $CPPFLAGS'
34894 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34895 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34896 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34897 +if test -n "$ac_tool_prefix"; then
34898 +  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
34899 +  do
34900 +    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34901 +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34902 +echo "$as_me:$LINENO: checking for $ac_word" >&5
34903 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
34904 +if test "${ac_cv_prog_CXX+set}" = set; then
34905 +  echo $ECHO_N "(cached) $ECHO_C" >&6
34906 +else
34907 +  if test -n "$CXX"; then
34908 +  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34909 +else
34910 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34911 +for as_dir in $PATH
34912 +do
34913 +  IFS=$as_save_IFS
34914 +  test -z "$as_dir" && as_dir=.
34915 +  for ac_exec_ext in '' $ac_executable_extensions; do
34916 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34917 +    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34918 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
34919 +    break 2
34920 +  fi
34921 +done
34922 +done
34923 +
34924 +fi
34925 +fi
34926 +CXX=$ac_cv_prog_CXX
34927 +if test -n "$CXX"; then
34928 +  echo "$as_me:$LINENO: result: $CXX" >&5
34929 +echo "${ECHO_T}$CXX" >&6
34930 +else
34931 +  echo "$as_me:$LINENO: result: no" >&5
34932 +echo "${ECHO_T}no" >&6
34933 +fi
34934 +
34935 +    test -n "$CXX" && break
34936 +  done
34937 +fi
34938 +if test -z "$CXX"; then
34939 +  ac_ct_CXX=$CXX
34940 +  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
34941 +do
34942 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
34943 +set dummy $ac_prog; ac_word=$2
34944 +echo "$as_me:$LINENO: checking for $ac_word" >&5
34945 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
34946 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
34947 +  echo $ECHO_N "(cached) $ECHO_C" >&6
34948 +else
34949 +  if test -n "$ac_ct_CXX"; then
34950 +  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34951 +else
34952 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34953 +for as_dir in $PATH
34954 +do
34955 +  IFS=$as_save_IFS
34956 +  test -z "$as_dir" && as_dir=.
34957 +  for ac_exec_ext in '' $ac_executable_extensions; do
34958 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34959 +    ac_cv_prog_ac_ct_CXX="$ac_prog"
34960 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
34961 +    break 2
34962 +  fi
34963 +done
34964 +done
34965 +
34966 +fi
34967 +fi
34968 +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34969 +if test -n "$ac_ct_CXX"; then
34970 +  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
34971 +echo "${ECHO_T}$ac_ct_CXX" >&6
34972 +else
34973 +  echo "$as_me:$LINENO: result: no" >&5
34974 +echo "${ECHO_T}no" >&6
34975 +fi
34976 +
34977 +  test -n "$ac_ct_CXX" && break
34978 +done
34979 +test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
34980 +
34981 +  CXX=$ac_ct_CXX
34982 +fi
34983 +
34984 +
34985 +# Provide some information about the compiler.
34986 +echo "$as_me:$LINENO:" \
34987 +     "checking for C++ compiler version" >&5
34988 +ac_compiler=`set X $ac_compile; echo $2`
34989 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
34990 +  (eval $ac_compiler --version </dev/null >&5) 2>&5
34991 +  ac_status=$?
34992 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34993 +  (exit $ac_status); }
34994 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
34995 +  (eval $ac_compiler -v </dev/null >&5) 2>&5
34996 +  ac_status=$?
34997 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
34998 +  (exit $ac_status); }
34999 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
35000 +  (eval $ac_compiler -V </dev/null >&5) 2>&5
35001 +  ac_status=$?
35002 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35003 +  (exit $ac_status); }
35004 +
35005 +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
35006 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
35007 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
35008 +  echo $ECHO_N "(cached) $ECHO_C" >&6
35009 +else
35010 +  cat >conftest.$ac_ext <<_ACEOF
35011 +/* confdefs.h.  */
35012 +_ACEOF
35013 +cat confdefs.h >>conftest.$ac_ext
35014 +cat >>conftest.$ac_ext <<_ACEOF
35015 +/* end confdefs.h.  */
35016 +
35017 +int
35018 +main ()
35019 +{
35020 +#ifndef __GNUC__
35021 +       choke me
35022 +#endif
35023 +
35024 +  ;
35025 +  return 0;
35026 +}
35027 +_ACEOF
35028 +rm -f conftest.$ac_objext
35029 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35030 +  (eval $ac_compile) 2>conftest.er1
35031 +  ac_status=$?
35032 +  grep -v '^ *+' conftest.er1 >conftest.err
35033 +  rm -f conftest.er1
35034 +  cat conftest.err >&5
35035 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35036 +  (exit $ac_status); } &&
35037 +        { ac_try='test -z "$ac_cxx_werror_flag"
35038 +                        || test ! -s conftest.err'
35039 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35040 +  (eval $ac_try) 2>&5
35041 +  ac_status=$?
35042 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35043 +  (exit $ac_status); }; } &&
35044 +        { ac_try='test -s conftest.$ac_objext'
35045 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35046 +  (eval $ac_try) 2>&5
35047 +  ac_status=$?
35048 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35049 +  (exit $ac_status); }; }; then
35050 +  ac_compiler_gnu=yes
35051 +else
35052 +  echo "$as_me: failed program was:" >&5
35053 +sed 's/^/| /' conftest.$ac_ext >&5
35054 +
35055 +ac_compiler_gnu=no
35056 +fi
35057 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35058 +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35059 +
35060 +fi
35061 +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
35062 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
35063 +GXX=`test $ac_compiler_gnu = yes && echo yes`
35064 +ac_test_CXXFLAGS=${CXXFLAGS+set}
35065 +ac_save_CXXFLAGS=$CXXFLAGS
35066 +CXXFLAGS="-g"
35067 +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
35068 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
35069 +if test "${ac_cv_prog_cxx_g+set}" = set; then
35070 +  echo $ECHO_N "(cached) $ECHO_C" >&6
35071 +else
35072 +  cat >conftest.$ac_ext <<_ACEOF
35073 +/* confdefs.h.  */
35074 +_ACEOF
35075 +cat confdefs.h >>conftest.$ac_ext
35076 +cat >>conftest.$ac_ext <<_ACEOF
35077 +/* end confdefs.h.  */
35078 +
35079 +int
35080 +main ()
35081 +{
35082 +
35083 +  ;
35084 +  return 0;
35085 +}
35086 +_ACEOF
35087 +rm -f conftest.$ac_objext
35088 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35089 +  (eval $ac_compile) 2>conftest.er1
35090 +  ac_status=$?
35091 +  grep -v '^ *+' conftest.er1 >conftest.err
35092 +  rm -f conftest.er1
35093 +  cat conftest.err >&5
35094 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35095 +  (exit $ac_status); } &&
35096 +        { ac_try='test -z "$ac_cxx_werror_flag"
35097 +                        || test ! -s conftest.err'
35098 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35099 +  (eval $ac_try) 2>&5
35100 +  ac_status=$?
35101 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35102 +  (exit $ac_status); }; } &&
35103 +        { ac_try='test -s conftest.$ac_objext'
35104 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35105 +  (eval $ac_try) 2>&5
35106 +  ac_status=$?
35107 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35108 +  (exit $ac_status); }; }; then
35109 +  ac_cv_prog_cxx_g=yes
35110 +else
35111 +  echo "$as_me: failed program was:" >&5
35112 +sed 's/^/| /' conftest.$ac_ext >&5
35113 +
35114 +ac_cv_prog_cxx_g=no
35115 +fi
35116 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35117 +fi
35118 +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
35119 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
35120 +if test "$ac_test_CXXFLAGS" = set; then
35121 +  CXXFLAGS=$ac_save_CXXFLAGS
35122 +elif test $ac_cv_prog_cxx_g = yes; then
35123 +  if test "$GXX" = yes; then
35124 +    CXXFLAGS="-g -O2"
35125 +  else
35126 +    CXXFLAGS="-g"
35127 +  fi
35128 +else
35129 +  if test "$GXX" = yes; then
35130 +    CXXFLAGS="-O2"
35131 +  else
35132 +    CXXFLAGS=
35133 +  fi
35134 +fi
35135 +for ac_declaration in \
35136 +   '' \
35137 +   'extern "C" void std::exit (int) throw (); using std::exit;' \
35138 +   'extern "C" void std::exit (int); using std::exit;' \
35139 +   'extern "C" void exit (int) throw ();' \
35140 +   'extern "C" void exit (int);' \
35141 +   'void exit (int);'
35142 +do
35143 +  cat >conftest.$ac_ext <<_ACEOF
35144 +/* confdefs.h.  */
35145 +_ACEOF
35146 +cat confdefs.h >>conftest.$ac_ext
35147 +cat >>conftest.$ac_ext <<_ACEOF
35148 +/* end confdefs.h.  */
35149 +$ac_declaration
35150 +#include <stdlib.h>
35151 +int
35152 +main ()
35153 +{
35154 +exit (42);
35155 +  ;
35156 +  return 0;
35157 +}
35158 +_ACEOF
35159 +rm -f conftest.$ac_objext
35160 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35161 +  (eval $ac_compile) 2>conftest.er1
35162 +  ac_status=$?
35163 +  grep -v '^ *+' conftest.er1 >conftest.err
35164 +  rm -f conftest.er1
35165 +  cat conftest.err >&5
35166 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35167 +  (exit $ac_status); } &&
35168 +        { ac_try='test -z "$ac_cxx_werror_flag"
35169 +                        || test ! -s conftest.err'
35170 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35171 +  (eval $ac_try) 2>&5
35172 +  ac_status=$?
35173 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35174 +  (exit $ac_status); }; } &&
35175 +        { ac_try='test -s conftest.$ac_objext'
35176 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35177 +  (eval $ac_try) 2>&5
35178 +  ac_status=$?
35179 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35180 +  (exit $ac_status); }; }; then
35181 +  :
35182 +else
35183 +  echo "$as_me: failed program was:" >&5
35184 +sed 's/^/| /' conftest.$ac_ext >&5
35185 +
35186 +continue
35187 +fi
35188 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35189 +  cat >conftest.$ac_ext <<_ACEOF
35190 +/* confdefs.h.  */
35191 +_ACEOF
35192 +cat confdefs.h >>conftest.$ac_ext
35193 +cat >>conftest.$ac_ext <<_ACEOF
35194 +/* end confdefs.h.  */
35195 +$ac_declaration
35196 +int
35197 +main ()
35198 +{
35199 +exit (42);
35200 +  ;
35201 +  return 0;
35202 +}
35203 +_ACEOF
35204 +rm -f conftest.$ac_objext
35205 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35206 +  (eval $ac_compile) 2>conftest.er1
35207 +  ac_status=$?
35208 +  grep -v '^ *+' conftest.er1 >conftest.err
35209 +  rm -f conftest.er1
35210 +  cat conftest.err >&5
35211 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35212 +  (exit $ac_status); } &&
35213 +        { ac_try='test -z "$ac_cxx_werror_flag"
35214 +                        || test ! -s conftest.err'
35215 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35216 +  (eval $ac_try) 2>&5
35217 +  ac_status=$?
35218 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35219 +  (exit $ac_status); }; } &&
35220 +        { ac_try='test -s conftest.$ac_objext'
35221 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35222 +  (eval $ac_try) 2>&5
35223 +  ac_status=$?
35224 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35225 +  (exit $ac_status); }; }; then
35226 +  break
35227 +else
35228 +  echo "$as_me: failed program was:" >&5
35229 +sed 's/^/| /' conftest.$ac_ext >&5
35230 +
35231 +fi
35232 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35233 +done
35234 +rm -f conftest*
35235 +if test -n "$ac_declaration"; then
35236 +  echo '#ifdef __cplusplus' >>confdefs.h
35237 +  echo $ac_declaration      >>confdefs.h
35238 +  echo '#endif'             >>confdefs.h
35239 +fi
35240 +
35241 +ac_ext=cc
35242 +ac_cpp='$CXXCPP $CPPFLAGS'
35243 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35244 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35245 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35246 +
35247 +depcc="$CXX"  am_compiler_list=
35248 +
35249 +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
35250 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
35251 +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
35252 +  echo $ECHO_N "(cached) $ECHO_C" >&6
35253 +else
35254 +  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
35255 +  # We make a subdir and do the tests there.  Otherwise we can end up
35256 +  # making bogus files that we don't know about and never remove.  For
35257 +  # instance it was reported that on HP-UX the gcc test will end up
35258 +  # making a dummy file named `D' -- because `-MD' means `put the output
35259 +  # in D'.
35260 +  mkdir conftest.dir
35261 +  # Copy depcomp to subdir because otherwise we won't find it if we're
35262 +  # using a relative directory.
35263 +  cp "$am_depcomp" conftest.dir
35264 +  cd conftest.dir
35265 +  # We will build objects and dependencies in a subdirectory because
35266 +  # it helps to detect inapplicable dependency modes.  For instance
35267 +  # both Tru64's cc and ICC support -MD to output dependencies as a
35268 +  # side effect of compilation, but ICC will put the dependencies in
35269 +  # the current directory while Tru64 will put them in the object
35270 +  # directory.
35271 +  mkdir sub
35272 +
35273 +  am_cv_CXX_dependencies_compiler_type=none
35274 +  if test "$am_compiler_list" = ""; then
35275 +     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
35276 +  fi
35277 +  for depmode in $am_compiler_list; do
35278 +    # Setup a source with many dependencies, because some compilers
35279 +    # like to wrap large dependency lists on column 80 (with \), and
35280 +    # we should not choose a depcomp mode which is confused by this.
35281 +    #
35282 +    # We need to recreate these files for each test, as the compiler may
35283 +    # overwrite some of them when testing with obscure command lines.
35284 +    # This happens at least with the AIX C compiler.
35285 +    : > sub/conftest.c
35286 +    for i in 1 2 3 4 5 6; do
35287 +      echo '#include "conftst'$i'.h"' >> sub/conftest.c
35288 +      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
35289 +      # Solaris 8's {/usr,}/bin/sh.
35290 +      touch sub/conftst$i.h
35291 +    done
35292 +    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
35293 +
35294 +    case $depmode in
35295 +    nosideeffect)
35296 +      # after this tag, mechanisms are not by side-effect, so they'll
35297 +      # only be used when explicitly requested
35298 +      if test "x$enable_dependency_tracking" = xyes; then
35299 +       continue
35300 +      else
35301 +       break
35302 +      fi
35303 +      ;;
35304 +    none) break ;;
35305 +    esac
35306 +    # We check with `-c' and `-o' for the sake of the "dashmstdout"
35307 +    # mode.  It turns out that the SunPro C++ compiler does not properly
35308 +    # handle `-M -o', and we need to detect this.
35309 +    if depmode=$depmode \
35310 +       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
35311 +       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
35312 +       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
35313 +         >/dev/null 2>conftest.err &&
35314 +       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
35315 +       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
35316 +       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
35317 +      # icc doesn't choke on unknown options, it will just issue warnings
35318 +      # or remarks (even with -Werror).  So we grep stderr for any message
35319 +      # that says an option was ignored or not supported.
35320 +      # When given -MP, icc 7.0 and 7.1 complain thusly:
35321 +      #   icc: Command line warning: ignoring option '-M'; no argument required
35322 +      # The diagnosis changed in icc 8.0:
35323 +      #   icc: Command line remark: option '-MP' not supported
35324 +      if (grep 'ignoring option' conftest.err ||
35325 +          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
35326 +        am_cv_CXX_dependencies_compiler_type=$depmode
35327 +        break
35328 +      fi
35329 +    fi
35330 +  done
35331 +
35332 +  cd ..
35333 +  rm -rf conftest.dir
35334 +else
35335 +  am_cv_CXX_dependencies_compiler_type=none
35336 +fi
35337 +
35338 +fi
35339 +echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
35340 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
35341 +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
35342 +
35343 +
35344 +
35345 +if
35346 +  test "x$enable_dependency_tracking" != xno \
35347 +  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
35348 +  am__fastdepCXX_TRUE=
35349 +  am__fastdepCXX_FALSE='#'
35350 +else
35351 +  am__fastdepCXX_TRUE='#'
35352 +  am__fastdepCXX_FALSE=
35353 +fi
35354 +
35355 +
35356 +
35357 +
35358 +if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
35359 +    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
35360 +    (test "X$CXX" != "Xg++"))) ; then
35361 +  ac_ext=cc
35362 +ac_cpp='$CXXCPP $CPPFLAGS'
35363 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35364 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35365 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35366 +echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
35367 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
35368 +if test -z "$CXXCPP"; then
35369 +  if test "${ac_cv_prog_CXXCPP+set}" = set; then
35370 +  echo $ECHO_N "(cached) $ECHO_C" >&6
35371 +else
35372 +      # Double quotes because CXXCPP needs to be expanded
35373 +    for CXXCPP in "$CXX -E" "/lib/cpp"
35374 +    do
35375 +      ac_preproc_ok=false
35376 +for ac_cxx_preproc_warn_flag in '' yes
35377 +do
35378 +  # Use a header file that comes with gcc, so configuring glibc
35379 +  # with a fresh cross-compiler works.
35380 +  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35381 +  # <limits.h> exists even on freestanding compilers.
35382 +  # On the NeXT, cc -E runs the code through the compiler's parser,
35383 +  # not just through cpp. "Syntax error" is here to catch this case.
35384 +  cat >conftest.$ac_ext <<_ACEOF
35385 +/* confdefs.h.  */
35386 +_ACEOF
35387 +cat confdefs.h >>conftest.$ac_ext
35388 +cat >>conftest.$ac_ext <<_ACEOF
35389 +/* end confdefs.h.  */
35390 +#ifdef __STDC__
35391 +# include <limits.h>
35392 +#else
35393 +# include <assert.h>
35394 +#endif
35395 +                    Syntax error
35396 +_ACEOF
35397 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35398 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35399 +  ac_status=$?
35400 +  grep -v '^ *+' conftest.er1 >conftest.err
35401 +  rm -f conftest.er1
35402 +  cat conftest.err >&5
35403 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35404 +  (exit $ac_status); } >/dev/null; then
35405 +  if test -s conftest.err; then
35406 +    ac_cpp_err=$ac_cxx_preproc_warn_flag
35407 +    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
35408 +  else
35409 +    ac_cpp_err=
35410 +  fi
35411 +else
35412 +  ac_cpp_err=yes
35413 +fi
35414 +if test -z "$ac_cpp_err"; then
35415 +  :
35416 +else
35417 +  echo "$as_me: failed program was:" >&5
35418 +sed 's/^/| /' conftest.$ac_ext >&5
35419 +
35420 +  # Broken: fails on valid input.
35421 +continue
35422 +fi
35423 +rm -f conftest.err conftest.$ac_ext
35424 +
35425 +  # OK, works on sane cases.  Now check whether non-existent headers
35426 +  # can be detected and how.
35427 +  cat >conftest.$ac_ext <<_ACEOF
35428 +/* confdefs.h.  */
35429 +_ACEOF
35430 +cat confdefs.h >>conftest.$ac_ext
35431 +cat >>conftest.$ac_ext <<_ACEOF
35432 +/* end confdefs.h.  */
35433 +#include <ac_nonexistent.h>
35434 +_ACEOF
35435 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35436 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35437 +  ac_status=$?
35438 +  grep -v '^ *+' conftest.er1 >conftest.err
35439 +  rm -f conftest.er1
35440 +  cat conftest.err >&5
35441 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35442 +  (exit $ac_status); } >/dev/null; then
35443 +  if test -s conftest.err; then
35444 +    ac_cpp_err=$ac_cxx_preproc_warn_flag
35445 +    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
35446 +  else
35447 +    ac_cpp_err=
35448 +  fi
35449 +else
35450 +  ac_cpp_err=yes
35451 +fi
35452 +if test -z "$ac_cpp_err"; then
35453 +  # Broken: success on invalid input.
35454 +continue
35455 +else
35456 +  echo "$as_me: failed program was:" >&5
35457 +sed 's/^/| /' conftest.$ac_ext >&5
35458 +
35459 +  # Passes both tests.
35460 +ac_preproc_ok=:
35461 +break
35462 +fi
35463 +rm -f conftest.err conftest.$ac_ext
35464 +
35465 +done
35466 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35467 +rm -f conftest.err conftest.$ac_ext
35468 +if $ac_preproc_ok; then
35469 +  break
35470 +fi
35471 +
35472 +    done
35473 +    ac_cv_prog_CXXCPP=$CXXCPP
35474 +
35475 +fi
35476 +  CXXCPP=$ac_cv_prog_CXXCPP
35477 +else
35478 +  ac_cv_prog_CXXCPP=$CXXCPP
35479 +fi
35480 +echo "$as_me:$LINENO: result: $CXXCPP" >&5
35481 +echo "${ECHO_T}$CXXCPP" >&6
35482 +ac_preproc_ok=false
35483 +for ac_cxx_preproc_warn_flag in '' yes
35484 +do
35485 +  # Use a header file that comes with gcc, so configuring glibc
35486 +  # with a fresh cross-compiler works.
35487 +  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35488 +  # <limits.h> exists even on freestanding compilers.
35489 +  # On the NeXT, cc -E runs the code through the compiler's parser,
35490 +  # not just through cpp. "Syntax error" is here to catch this case.
35491 +  cat >conftest.$ac_ext <<_ACEOF
35492 +/* confdefs.h.  */
35493 +_ACEOF
35494 +cat confdefs.h >>conftest.$ac_ext
35495 +cat >>conftest.$ac_ext <<_ACEOF
35496 +/* end confdefs.h.  */
35497 +#ifdef __STDC__
35498 +# include <limits.h>
35499 +#else
35500 +# include <assert.h>
35501 +#endif
35502 +                    Syntax error
35503 +_ACEOF
35504 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35505 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35506 +  ac_status=$?
35507 +  grep -v '^ *+' conftest.er1 >conftest.err
35508 +  rm -f conftest.er1
35509 +  cat conftest.err >&5
35510 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35511 +  (exit $ac_status); } >/dev/null; then
35512 +  if test -s conftest.err; then
35513 +    ac_cpp_err=$ac_cxx_preproc_warn_flag
35514 +    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
35515 +  else
35516 +    ac_cpp_err=
35517 +  fi
35518 +else
35519 +  ac_cpp_err=yes
35520 +fi
35521 +if test -z "$ac_cpp_err"; then
35522 +  :
35523 +else
35524 +  echo "$as_me: failed program was:" >&5
35525 +sed 's/^/| /' conftest.$ac_ext >&5
35526 +
35527 +  # Broken: fails on valid input.
35528 +continue
35529 +fi
35530 +rm -f conftest.err conftest.$ac_ext
35531 +
35532 +  # OK, works on sane cases.  Now check whether non-existent headers
35533 +  # can be detected and how.
35534 +  cat >conftest.$ac_ext <<_ACEOF
35535 +/* confdefs.h.  */
35536 +_ACEOF
35537 +cat confdefs.h >>conftest.$ac_ext
35538 +cat >>conftest.$ac_ext <<_ACEOF
35539 +/* end confdefs.h.  */
35540 +#include <ac_nonexistent.h>
35541 +_ACEOF
35542 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
35543 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35544 +  ac_status=$?
35545 +  grep -v '^ *+' conftest.er1 >conftest.err
35546 +  rm -f conftest.er1
35547 +  cat conftest.err >&5
35548 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35549 +  (exit $ac_status); } >/dev/null; then
35550 +  if test -s conftest.err; then
35551 +    ac_cpp_err=$ac_cxx_preproc_warn_flag
35552 +    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
35553 +  else
35554 +    ac_cpp_err=
35555 +  fi
35556 +else
35557 +  ac_cpp_err=yes
35558 +fi
35559 +if test -z "$ac_cpp_err"; then
35560 +  # Broken: success on invalid input.
35561 +continue
35562 +else
35563 +  echo "$as_me: failed program was:" >&5
35564 +sed 's/^/| /' conftest.$ac_ext >&5
35565 +
35566 +  # Passes both tests.
35567 +ac_preproc_ok=:
35568 +break
35569 +fi
35570 +rm -f conftest.err conftest.$ac_ext
35571 +
35572 +done
35573 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35574 +rm -f conftest.err conftest.$ac_ext
35575 +if $ac_preproc_ok; then
35576 +  :
35577 +else
35578 +  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
35579 +See \`config.log' for more details." >&5
35580 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
35581 +See \`config.log' for more details." >&2;}
35582 +   { (exit 1); exit 1; }; }
35583 +fi
35584 +
35585 +ac_ext=cc
35586 +ac_cpp='$CXXCPP $CPPFLAGS'
35587 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35588 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35589 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35590 +
35591 +fi
35592 +
35593 +
35594 +ac_ext=f
35595 +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
35596 +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35597 +ac_compiler_gnu=$ac_cv_f77_compiler_gnu
35598 +if test -n "$ac_tool_prefix"; then
35599 +  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
35600 +  do
35601 +    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35602 +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35603 +echo "$as_me:$LINENO: checking for $ac_word" >&5
35604 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
35605 +if test "${ac_cv_prog_F77+set}" = set; then
35606 +  echo $ECHO_N "(cached) $ECHO_C" >&6
35607 +else
35608 +  if test -n "$F77"; then
35609 +  ac_cv_prog_F77="$F77" # Let the user override the test.
35610 +else
35611 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35612 +for as_dir in $PATH
35613 +do
35614 +  IFS=$as_save_IFS
35615 +  test -z "$as_dir" && as_dir=.
35616 +  for ac_exec_ext in '' $ac_executable_extensions; do
35617 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35618 +    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
35619 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
35620 +    break 2
35621 +  fi
35622 +done
35623 +done
35624 +
35625 +fi
35626 +fi
35627 +F77=$ac_cv_prog_F77
35628 +if test -n "$F77"; then
35629 +  echo "$as_me:$LINENO: result: $F77" >&5
35630 +echo "${ECHO_T}$F77" >&6
35631 +else
35632 +  echo "$as_me:$LINENO: result: no" >&5
35633 +echo "${ECHO_T}no" >&6
35634 +fi
35635 +
35636 +    test -n "$F77" && break
35637 +  done
35638 +fi
35639 +if test -z "$F77"; then
35640 +  ac_ct_F77=$F77
35641 +  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
35642 +do
35643 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
35644 +set dummy $ac_prog; ac_word=$2
35645 +echo "$as_me:$LINENO: checking for $ac_word" >&5
35646 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
35647 +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
35648 +  echo $ECHO_N "(cached) $ECHO_C" >&6
35649 +else
35650 +  if test -n "$ac_ct_F77"; then
35651 +  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
35652 +else
35653 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35654 +for as_dir in $PATH
35655 +do
35656 +  IFS=$as_save_IFS
35657 +  test -z "$as_dir" && as_dir=.
35658 +  for ac_exec_ext in '' $ac_executable_extensions; do
35659 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35660 +    ac_cv_prog_ac_ct_F77="$ac_prog"
35661 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
35662 +    break 2
35663 +  fi
35664 +done
35665 +done
35666 +
35667 +fi
35668 +fi
35669 +ac_ct_F77=$ac_cv_prog_ac_ct_F77
35670 +if test -n "$ac_ct_F77"; then
35671 +  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
35672 +echo "${ECHO_T}$ac_ct_F77" >&6
35673 +else
35674 +  echo "$as_me:$LINENO: result: no" >&5
35675 +echo "${ECHO_T}no" >&6
35676 +fi
35677 +
35678 +  test -n "$ac_ct_F77" && break
35679 +done
35680 +
35681 +  F77=$ac_ct_F77
35682 +fi
35683 +
35684 +
35685 +# Provide some information about the compiler.
35686 +echo "$as_me:5392:" \
35687 +     "checking for Fortran 77 compiler version" >&5
35688 +ac_compiler=`set X $ac_compile; echo $2`
35689 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
35690 +  (eval $ac_compiler --version </dev/null >&5) 2>&5
35691 +  ac_status=$?
35692 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35693 +  (exit $ac_status); }
35694 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
35695 +  (eval $ac_compiler -v </dev/null >&5) 2>&5
35696 +  ac_status=$?
35697 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35698 +  (exit $ac_status); }
35699 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
35700 +  (eval $ac_compiler -V </dev/null >&5) 2>&5
35701 +  ac_status=$?
35702 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35703 +  (exit $ac_status); }
35704 +rm -f a.out
35705 +
35706 +# If we don't use `.F' as extension, the preprocessor is not run on the
35707 +# input file.  (Note that this only needs to work for GNU compilers.)
35708 +ac_save_ext=$ac_ext
35709 +ac_ext=F
35710 +echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
35711 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
35712 +if test "${ac_cv_f77_compiler_gnu+set}" = set; then
35713 +  echo $ECHO_N "(cached) $ECHO_C" >&6
35714 +else
35715 +  cat >conftest.$ac_ext <<_ACEOF
35716 +      program main
35717 +#ifndef __GNUC__
35718 +       choke me
35719 +#endif
35720 +
35721 +      end
35722 +_ACEOF
35723 +rm -f conftest.$ac_objext
35724 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35725 +  (eval $ac_compile) 2>conftest.er1
35726 +  ac_status=$?
35727 +  grep -v '^ *+' conftest.er1 >conftest.err
35728 +  rm -f conftest.er1
35729 +  cat conftest.err >&5
35730 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35731 +  (exit $ac_status); } &&
35732 +        { ac_try='test -z "$ac_f77_werror_flag"
35733 +                        || test ! -s conftest.err'
35734 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35735 +  (eval $ac_try) 2>&5
35736 +  ac_status=$?
35737 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35738 +  (exit $ac_status); }; } &&
35739 +        { ac_try='test -s conftest.$ac_objext'
35740 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35741 +  (eval $ac_try) 2>&5
35742 +  ac_status=$?
35743 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35744 +  (exit $ac_status); }; }; then
35745 +  ac_compiler_gnu=yes
35746 +else
35747 +  echo "$as_me: failed program was:" >&5
35748 +sed 's/^/| /' conftest.$ac_ext >&5
35749 +
35750 +ac_compiler_gnu=no
35751 +fi
35752 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35753 +ac_cv_f77_compiler_gnu=$ac_compiler_gnu
35754 +
35755 +fi
35756 +echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
35757 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
35758 +ac_ext=$ac_save_ext
35759 +ac_test_FFLAGS=${FFLAGS+set}
35760 +ac_save_FFLAGS=$FFLAGS
35761 +FFLAGS=
35762 +echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
35763 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
35764 +if test "${ac_cv_prog_f77_g+set}" = set; then
35765 +  echo $ECHO_N "(cached) $ECHO_C" >&6
35766 +else
35767 +  FFLAGS=-g
35768 +cat >conftest.$ac_ext <<_ACEOF
35769 +      program main
35770 +
35771 +      end
35772 +_ACEOF
35773 +rm -f conftest.$ac_objext
35774 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35775 +  (eval $ac_compile) 2>conftest.er1
35776 +  ac_status=$?
35777 +  grep -v '^ *+' conftest.er1 >conftest.err
35778 +  rm -f conftest.er1
35779 +  cat conftest.err >&5
35780 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35781 +  (exit $ac_status); } &&
35782 +        { ac_try='test -z "$ac_f77_werror_flag"
35783 +                        || test ! -s conftest.err'
35784 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35785 +  (eval $ac_try) 2>&5
35786 +  ac_status=$?
35787 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35788 +  (exit $ac_status); }; } &&
35789 +        { ac_try='test -s conftest.$ac_objext'
35790 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35791 +  (eval $ac_try) 2>&5
35792 +  ac_status=$?
35793 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
35794 +  (exit $ac_status); }; }; then
35795 +  ac_cv_prog_f77_g=yes
35796 +else
35797 +  echo "$as_me: failed program was:" >&5
35798 +sed 's/^/| /' conftest.$ac_ext >&5
35799 +
35800 +ac_cv_prog_f77_g=no
35801 +fi
35802 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35803 +
35804 +fi
35805 +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
35806 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
35807 +if test "$ac_test_FFLAGS" = set; then
35808 +  FFLAGS=$ac_save_FFLAGS
35809 +elif test $ac_cv_prog_f77_g = yes; then
35810 +  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
35811 +    FFLAGS="-g -O2"
35812 +  else
35813 +    FFLAGS="-g"
35814 +  fi
35815 +else
35816 +  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
35817 +    FFLAGS="-O2"
35818 +  else
35819 +    FFLAGS=
35820 +  fi
35821 +fi
35822 +
35823 +G77=`test $ac_compiler_gnu = yes && echo yes`
35824 +ac_ext=c
35825 +ac_cpp='$CPP $CPPFLAGS'
35826 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35827 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35828 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
35829 +
35830 +
35831 +
35832 +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
35833 +
35834 +# find the maximum length of command line arguments
35835 +echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
35836 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
35837 +if test "${lt_cv_sys_max_cmd_len+set}" = set; then
35838 +  echo $ECHO_N "(cached) $ECHO_C" >&6
35839 +else
35840 +    i=0
35841 +  teststring="ABCD"
35842 +
35843 +  case $build_os in
35844 +  msdosdjgpp*)
35845 +    # On DJGPP, this test can blow up pretty badly due to problems in libc
35846 +    # (any single argument exceeding 2000 bytes causes a buffer overrun
35847 +    # during glob expansion).  Even if it were fixed, the result of this
35848 +    # check would be larger than it should be.
35849 +    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
35850 +    ;;
35851 +
35852 +  gnu*)
35853 +    # Under GNU Hurd, this test is not required because there is
35854 +    # no limit to the length of command line arguments.
35855 +    # Libtool will interpret -1 as no limit whatsoever
35856 +    lt_cv_sys_max_cmd_len=-1;
35857 +    ;;
35858 +
35859 +  cygwin* | mingw*)
35860 +    # On Win9x/ME, this test blows up -- it succeeds, but takes
35861 +    # about 5 minutes as the teststring grows exponentially.
35862 +    # Worse, since 9x/ME are not pre-emptively multitasking,
35863 +    # you end up with a "frozen" computer, even though with patience
35864 +    # the test eventually succeeds (with a max line length of 256k).
35865 +    # Instead, let's just punt: use the minimum linelength reported by
35866 +    # all of the supported platforms: 8192 (on NT/2K/XP).
35867 +    lt_cv_sys_max_cmd_len=8192;
35868 +    ;;
35869 +
35870 +  amigaos*)
35871 +    # On AmigaOS with pdksh, this test takes hours, literally.
35872 +    # So we just punt and use a minimum line length of 8192.
35873 +    lt_cv_sys_max_cmd_len=8192;
35874 +    ;;
35875 +
35876 +  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
35877 +    # This has been around since 386BSD, at least.  Likely further.
35878 +    if test -x /sbin/sysctl; then
35879 +      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
35880 +    elif test -x /usr/sbin/sysctl; then
35881 +      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
35882 +    else
35883 +      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
35884 +    fi
35885 +    # And add a safety zone
35886 +    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
35887 +    ;;
35888 +  osf*)
35889 +    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
35890 +    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
35891 +    # nice to cause kernel panics so lets avoid the loop below.
35892 +    # First set a reasonable default.
35893 +    lt_cv_sys_max_cmd_len=16384
35894 +    #
35895 +    if test -x /sbin/sysconfig; then
35896 +      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
35897 +        *1*) lt_cv_sys_max_cmd_len=-1 ;;
35898 +      esac
35899 +    fi
35900 +    ;;
35901 +  *)
35902 +    # If test is not a shell built-in, we'll probably end up computing a
35903 +    # maximum length that is only half of the actual maximum length, but
35904 +    # we can't tell.
35905 +    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
35906 +    while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
35907 +              = "XX$teststring") >/dev/null 2>&1 &&
35908 +           new_result=`expr "X$teststring" : ".*" 2>&1` &&
35909 +           lt_cv_sys_max_cmd_len=$new_result &&
35910 +           test $i != 17 # 1/2 MB should be enough
35911 +    do
35912 +      i=`expr $i + 1`
35913 +      teststring=$teststring$teststring
35914 +    done
35915 +    teststring=
35916 +    # Add a significant safety factor because C++ compilers can tack on massive
35917 +    # amounts of additional arguments before passing them to the linker.
35918 +    # It appears as though 1/2 is a usable value.
35919 +    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
35920 +    ;;
35921 +  esac
35922 +
35923 +fi
35924 +
35925 +if test -n $lt_cv_sys_max_cmd_len ; then
35926 +  echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
35927 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
35928 +else
35929 +  echo "$as_me:$LINENO: result: none" >&5
35930 +echo "${ECHO_T}none" >&6
35931 +fi
35932 +
35933 +
35934 +
35935 +
35936 +# Check for command to grab the raw symbol name followed by C symbol from nm.
35937 +echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
35938 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
35939 +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
35940 +  echo $ECHO_N "(cached) $ECHO_C" >&6
35941 +else
35942 +
35943 +# These are sane defaults that work on at least a few old systems.
35944 +# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
35945 +
35946 +# Character class describing NM global symbol codes.
35947 +symcode='[BCDEGRST]'
35948 +
35949 +# Regexp to match symbols that can be accessed directly from C.
35950 +sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
35951 +
35952 +# Transform an extracted symbol line into a proper C declaration
35953 +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
35954 +
35955 +# Transform an extracted symbol line into symbol name and symbol address
35956 +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
35957 +
35958 +# Define system-specific variables.
35959 +case $host_os in
35960 +aix*)
35961 +  symcode='[BCDT]'
35962 +  ;;
35963 +cygwin* | mingw* | pw32*)
35964 +  symcode='[ABCDGISTW]'
35965 +  ;;
35966 +hpux*) # Its linker distinguishes data from code symbols
35967 +  if test "$host_cpu" = ia64; then
35968 +    symcode='[ABCDEGRST]'
35969 +  fi
35970 +  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
35971 +  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
35972 +  ;;
35973 +linux*)
35974 +  if test "$host_cpu" = ia64; then
35975 +    symcode='[ABCDGIRSTW]'
35976 +    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
35977 +    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
35978 +  fi
35979 +  ;;
35980 +irix* | nonstopux*)
35981 +  symcode='[BCDEGRST]'
35982 +  ;;
35983 +osf*)
35984 +  symcode='[BCDEGQRST]'
35985 +  ;;
35986 +solaris* | sysv5*)
35987 +  symcode='[BDRT]'
35988 +  ;;
35989 +sysv4)
35990 +  symcode='[DFNSTU]'
35991 +  ;;
35992 +esac
35993 +
35994 +# Handle CRLF in mingw tool chain
35995 +opt_cr=
35996 +case $build_os in
35997 +mingw*)
35998 +  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
35999 +  ;;
36000 +esac
36001 +
36002 +# If we're using GNU nm, then use its standard symbol codes.
36003 +case `$NM -V 2>&1` in
36004 +*GNU* | *'with BFD'*)
36005 +  symcode='[ABCDGIRSTW]' ;;
36006 +esac
36007 +
36008 +# Try without a prefix undercore, then with it.
36009 +for ac_symprfx in "" "_"; do
36010 +
36011 +  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
36012 +  symxfrm="\\1 $ac_symprfx\\2 \\2"
36013 +
36014 +  # Write the raw and C identifiers.
36015 +  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
36016 +
36017 +  # Check to see that the pipe works correctly.
36018 +  pipe_works=no
36019 +
36020 +  rm -f conftest*
36021 +  cat > conftest.$ac_ext <<EOF
36022 +#ifdef __cplusplus
36023 +extern "C" {
36024 +#endif
36025 +char nm_test_var;
36026 +void nm_test_func(){}
36027 +#ifdef __cplusplus
36028 +}
36029 +#endif
36030 +int main(){nm_test_var='a';nm_test_func();return(0);}
36031 +EOF
36032 +
36033 +  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36034 +  (eval $ac_compile) 2>&5
36035 +  ac_status=$?
36036 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
36037 +  (exit $ac_status); }; then
36038 +    # Now try to grab the symbols.
36039 +    nlist=conftest.nm
36040 +    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
36041 +  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
36042 +  ac_status=$?
36043 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
36044 +  (exit $ac_status); } && test -s "$nlist"; then
36045 +      # Try sorting and uniquifying the output.
36046 +      if sort "$nlist" | uniq > "$nlist"T; then
36047 +       mv -f "$nlist"T "$nlist"
36048 +      else
36049 +       rm -f "$nlist"T
36050 +      fi
36051 +
36052 +      # Make sure that we snagged all the symbols we need.
36053 +      if grep ' nm_test_var$' "$nlist" >/dev/null; then
36054 +       if grep ' nm_test_func$' "$nlist" >/dev/null; then
36055 +         cat <<EOF > conftest.$ac_ext
36056 +#ifdef __cplusplus
36057 +extern "C" {
36058 +#endif
36059 +
36060 +EOF
36061 +         # Now generate the symbol file.
36062 +         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
36063 +
36064 +         cat <<EOF >> conftest.$ac_ext
36065 +#if defined (__STDC__) && __STDC__
36066 +# define lt_ptr_t void *
36067 +#else
36068 +# define lt_ptr_t char *
36069 +# define const
36070 +#endif
36071 +
36072 +/* The mapping between symbol names and symbols. */
36073 +const struct {
36074 +  const char *name;
36075 +  lt_ptr_t address;
36076 +}
36077 +lt_preloaded_symbols[] =
36078 +{
36079 +EOF
36080 +         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
36081 +         cat <<\EOF >> conftest.$ac_ext
36082 +  {0, (lt_ptr_t) 0}
36083 +};
36084 +
36085 +#ifdef __cplusplus
36086 +}
36087 +#endif
36088 +EOF
36089 +         # Now try linking the two files.
36090 +         mv conftest.$ac_objext conftstm.$ac_objext
36091 +         lt_save_LIBS="$LIBS"
36092 +         lt_save_CFLAGS="$CFLAGS"
36093 +         LIBS="conftstm.$ac_objext"
36094 +         CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
36095 +         if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36096 +  (eval $ac_link) 2>&5
36097 +  ac_status=$?
36098 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
36099 +  (exit $ac_status); } && test -s conftest${ac_exeext}; then
36100 +           pipe_works=yes
36101 +         fi
36102 +         LIBS="$lt_save_LIBS"
36103 +         CFLAGS="$lt_save_CFLAGS"
36104 +       else
36105 +         echo "cannot find nm_test_func in $nlist" >&5
36106 +       fi
36107 +      else
36108 +       echo "cannot find nm_test_var in $nlist" >&5
36109 +      fi
36110 +    else
36111 +      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
36112 +    fi
36113 +  else
36114 +    echo "$progname: failed program was:" >&5
36115 +    cat conftest.$ac_ext >&5
36116 +  fi
36117 +  rm -f conftest* conftst*
36118 +
36119 +  # Do not use the global_symbol_pipe unless it works.
36120 +  if test "$pipe_works" = yes; then
36121 +    break
36122 +  else
36123 +    lt_cv_sys_global_symbol_pipe=
36124 +  fi
36125 +done
36126 +
36127 +fi
36128 +
36129 +if test -z "$lt_cv_sys_global_symbol_pipe"; then
36130 +  lt_cv_sys_global_symbol_to_cdecl=
36131 +fi
36132 +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
36133 +  echo "$as_me:$LINENO: result: failed" >&5
36134 +echo "${ECHO_T}failed" >&6
36135 +else
36136 +  echo "$as_me:$LINENO: result: ok" >&5
36137 +echo "${ECHO_T}ok" >&6
36138 +fi
36139 +
36140 +echo "$as_me:$LINENO: checking for objdir" >&5
36141 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6
36142 +if test "${lt_cv_objdir+set}" = set; then
36143 +  echo $ECHO_N "(cached) $ECHO_C" >&6
36144 +else
36145 +  rm -f .libs 2>/dev/null
36146 +mkdir .libs 2>/dev/null
36147 +if test -d .libs; then
36148 +  lt_cv_objdir=.libs
36149 +else
36150 +  # MS-DOS does not allow filenames that begin with a dot.
36151 +  lt_cv_objdir=_libs
36152 +fi
36153 +rmdir .libs 2>/dev/null
36154 +fi
36155 +echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
36156 +echo "${ECHO_T}$lt_cv_objdir" >&6
36157 +objdir=$lt_cv_objdir
36158 +
36159 +
36160 +
36161 +
36162 +
36163 +case $host_os in
36164 +aix3*)
36165 +  # AIX sometimes has problems with the GCC collect2 program.  For some
36166 +  # reason, if we set the COLLECT_NAMES environment variable, the problems
36167 +  # vanish in a puff of smoke.
36168 +  if test "X${COLLECT_NAMES+set}" != Xset; then
36169 +    COLLECT_NAMES=
36170 +    export COLLECT_NAMES
36171 +  fi
36172 +  ;;
36173 +esac
36174 +
36175 +# Sed substitution that helps us do robust quoting.  It backslashifies
36176 +# metacharacters that are still active within double-quoted strings.
36177 +Xsed='sed -e s/^X//'
36178 +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
36179 +
36180 +# Same as above, but do not quote variable references.
36181 +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
36182 +
36183 +# Sed substitution to delay expansion of an escaped shell variable in a
36184 +# double_quote_subst'ed string.
36185 +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
36186 +
36187 +# Sed substitution to avoid accidental globbing in evaled expressions
36188 +no_glob_subst='s/\*/\\\*/g'
36189 +
36190 +# Constants:
36191 +rm="rm -f"
36192 +
36193 +# Global variables:
36194 +default_ofile=libtool
36195 +can_build_shared=yes
36196 +
36197 +# All known linkers require a `.a' archive for static linking (except M$VC,
36198 +# which needs '.lib').
36199 +libext=a
36200 +ltmain="$ac_aux_dir/ltmain.sh"
36201 +ofile="$default_ofile"
36202 +with_gnu_ld="$lt_cv_prog_gnu_ld"
36203 +
36204 +if test -n "$ac_tool_prefix"; then
36205 +  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
36206 +set dummy ${ac_tool_prefix}ar; ac_word=$2
36207 +echo "$as_me:$LINENO: checking for $ac_word" >&5
36208 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
36209 +if test "${ac_cv_prog_AR+set}" = set; then
36210 +  echo $ECHO_N "(cached) $ECHO_C" >&6
36211 +else
36212 +  if test -n "$AR"; then
36213 +  ac_cv_prog_AR="$AR" # Let the user override the test.
36214 +else
36215 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36216 +for as_dir in $PATH
36217 +do
36218 +  IFS=$as_save_IFS
36219 +  test -z "$as_dir" && as_dir=.
36220 +  for ac_exec_ext in '' $ac_executable_extensions; do
36221 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36222 +    ac_cv_prog_AR="${ac_tool_prefix}ar"
36223 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
36224 +    break 2
36225 +  fi
36226 +done
36227 +done
36228 +
36229 +fi
36230 +fi
36231 +AR=$ac_cv_prog_AR
36232 +if test -n "$AR"; then
36233 +  echo "$as_me:$LINENO: result: $AR" >&5
36234 +echo "${ECHO_T}$AR" >&6
36235 +else
36236 +  echo "$as_me:$LINENO: result: no" >&5
36237 +echo "${ECHO_T}no" >&6
36238 +fi
36239 +
36240 +fi
36241 +if test -z "$ac_cv_prog_AR"; then
36242 +  ac_ct_AR=$AR
36243 +  # Extract the first word of "ar", so it can be a program name with args.
36244 +set dummy ar; ac_word=$2
36245 +echo "$as_me:$LINENO: checking for $ac_word" >&5
36246 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
36247 +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
36248 +  echo $ECHO_N "(cached) $ECHO_C" >&6
36249 +else
36250 +  if test -n "$ac_ct_AR"; then
36251 +  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36252 +else
36253 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36254 +for as_dir in $PATH
36255 +do
36256 +  IFS=$as_save_IFS
36257 +  test -z "$as_dir" && as_dir=.
36258 +  for ac_exec_ext in '' $ac_executable_extensions; do
36259 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36260 +    ac_cv_prog_ac_ct_AR="ar"
36261 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
36262 +    break 2
36263 +  fi
36264 +done
36265 +done
36266 +
36267 +  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
36268 +fi
36269 +fi
36270 +ac_ct_AR=$ac_cv_prog_ac_ct_AR
36271 +if test -n "$ac_ct_AR"; then
36272 +  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
36273 +echo "${ECHO_T}$ac_ct_AR" >&6
36274 +else
36275 +  echo "$as_me:$LINENO: result: no" >&5
36276 +echo "${ECHO_T}no" >&6
36277 +fi
36278 +
36279 +  AR=$ac_ct_AR
36280 +else
36281 +  AR="$ac_cv_prog_AR"
36282 +fi
36283 +
36284 +if test -n "$ac_tool_prefix"; then
36285 +  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
36286 +set dummy ${ac_tool_prefix}ranlib; ac_word=$2
36287 +echo "$as_me:$LINENO: checking for $ac_word" >&5
36288 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
36289 +if test "${ac_cv_prog_RANLIB+set}" = set; then
36290 +  echo $ECHO_N "(cached) $ECHO_C" >&6
36291 +else
36292 +  if test -n "$RANLIB"; then
36293 +  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
36294 +else
36295 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36296 +for as_dir in $PATH
36297 +do
36298 +  IFS=$as_save_IFS
36299 +  test -z "$as_dir" && as_dir=.
36300 +  for ac_exec_ext in '' $ac_executable_extensions; do
36301 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36302 +    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
36303 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
36304 +    break 2
36305 +  fi
36306 +done
36307 +done
36308 +
36309 +fi
36310 +fi
36311 +RANLIB=$ac_cv_prog_RANLIB
36312 +if test -n "$RANLIB"; then
36313 +  echo "$as_me:$LINENO: result: $RANLIB" >&5
36314 +echo "${ECHO_T}$RANLIB" >&6
36315 +else
36316 +  echo "$as_me:$LINENO: result: no" >&5
36317 +echo "${ECHO_T}no" >&6
36318 +fi
36319 +
36320 +fi
36321 +if test -z "$ac_cv_prog_RANLIB"; then
36322 +  ac_ct_RANLIB=$RANLIB
36323 +  # Extract the first word of "ranlib", so it can be a program name with args.
36324 +set dummy ranlib; ac_word=$2
36325 +echo "$as_me:$LINENO: checking for $ac_word" >&5
36326 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
36327 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
36328 +  echo $ECHO_N "(cached) $ECHO_C" >&6
36329 +else
36330 +  if test -n "$ac_ct_RANLIB"; then
36331 +  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
36332 +else
36333 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36334 +for as_dir in $PATH
36335 +do
36336 +  IFS=$as_save_IFS
36337 +  test -z "$as_dir" && as_dir=.
36338 +  for ac_exec_ext in '' $ac_executable_extensions; do
36339 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36340 +    ac_cv_prog_ac_ct_RANLIB="ranlib"
36341 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
36342 +    break 2
36343 +  fi
36344 +done
36345 +done
36346 +
36347 +  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
36348 +fi
36349 +fi
36350 +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
36351 +if test -n "$ac_ct_RANLIB"; then
36352 +  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
36353 +echo "${ECHO_T}$ac_ct_RANLIB" >&6
36354 +else
36355 +  echo "$as_me:$LINENO: result: no" >&5
36356 +echo "${ECHO_T}no" >&6
36357 +fi
36358 +
36359 +  RANLIB=$ac_ct_RANLIB
36360 +else
36361 +  RANLIB="$ac_cv_prog_RANLIB"
36362 +fi
36363 +
36364 +if test -n "$ac_tool_prefix"; then
36365 +  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
36366 +set dummy ${ac_tool_prefix}strip; ac_word=$2
36367 +echo "$as_me:$LINENO: checking for $ac_word" >&5
36368 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
36369 +if test "${ac_cv_prog_STRIP+set}" = set; then
36370 +  echo $ECHO_N "(cached) $ECHO_C" >&6
36371 +else
36372 +  if test -n "$STRIP"; then
36373 +  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36374 +else
36375 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36376 +for as_dir in $PATH
36377 +do
36378 +  IFS=$as_save_IFS
36379 +  test -z "$as_dir" && as_dir=.
36380 +  for ac_exec_ext in '' $ac_executable_extensions; do
36381 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36382 +    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
36383 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
36384 +    break 2
36385 +  fi
36386 +done
36387 +done
36388 +
36389 +fi
36390 +fi
36391 +STRIP=$ac_cv_prog_STRIP
36392 +if test -n "$STRIP"; then
36393 +  echo "$as_me:$LINENO: result: $STRIP" >&5
36394 +echo "${ECHO_T}$STRIP" >&6
36395 +else
36396 +  echo "$as_me:$LINENO: result: no" >&5
36397 +echo "${ECHO_T}no" >&6
36398 +fi
36399 +
36400 +fi
36401 +if test -z "$ac_cv_prog_STRIP"; then
36402 +  ac_ct_STRIP=$STRIP
36403 +  # Extract the first word of "strip", so it can be a program name with args.
36404 +set dummy strip; ac_word=$2
36405 +echo "$as_me:$LINENO: checking for $ac_word" >&5
36406 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
36407 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
36408 +  echo $ECHO_N "(cached) $ECHO_C" >&6
36409 +else
36410 +  if test -n "$ac_ct_STRIP"; then
36411 +  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36412 +else
36413 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36414 +for as_dir in $PATH
36415 +do
36416 +  IFS=$as_save_IFS
36417 +  test -z "$as_dir" && as_dir=.
36418 +  for ac_exec_ext in '' $ac_executable_extensions; do
36419 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36420 +    ac_cv_prog_ac_ct_STRIP="strip"
36421 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
36422 +    break 2
36423 +  fi
36424 +done
36425 +done
36426 +
36427 +  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
36428 +fi
36429 +fi
36430 +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36431 +if test -n "$ac_ct_STRIP"; then
36432 +  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
36433 +echo "${ECHO_T}$ac_ct_STRIP" >&6
36434 +else
36435 +  echo "$as_me:$LINENO: result: no" >&5
36436 +echo "${ECHO_T}no" >&6
36437 +fi
36438 +
36439 +  STRIP=$ac_ct_STRIP
36440 +else
36441 +  STRIP="$ac_cv_prog_STRIP"
36442 +fi
36443 +
36444 +
36445 +old_CC="$CC"
36446 +old_CFLAGS="$CFLAGS"
36447 +
36448 +# Set sane defaults for various variables
36449 +test -z "$AR" && AR=ar
36450 +test -z "$AR_FLAGS" && AR_FLAGS=cru
36451 +test -z "$AS" && AS=as
36452 +test -z "$CC" && CC=cc
36453 +test -z "$LTCC" && LTCC=$CC
36454 +test -z "$DLLTOOL" && DLLTOOL=dlltool
36455 +test -z "$LD" && LD=ld
36456 +test -z "$LN_S" && LN_S="ln -s"
36457 +test -z "$MAGIC_CMD" && MAGIC_CMD=file
36458 +test -z "$NM" && NM=nm
36459 +test -z "$SED" && SED=sed
36460 +test -z "$OBJDUMP" && OBJDUMP=objdump
36461 +test -z "$RANLIB" && RANLIB=:
36462 +test -z "$STRIP" && STRIP=:
36463 +test -z "$ac_objext" && ac_objext=o
36464 +
36465 +# Determine commands to create old-style static archives.
36466 +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
36467 +old_postinstall_cmds='chmod 644 $oldlib'
36468 +old_postuninstall_cmds=
36469 +
36470 +if test -n "$RANLIB"; then
36471 +  case $host_os in
36472 +  openbsd*)
36473 +    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
36474 +    ;;
36475 +  *)
36476 +    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
36477 +    ;;
36478 +  esac
36479 +  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
36480 +fi
36481 +
36482 +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
36483 +
36484 +# Only perform the check for file, if the check method requires it
36485 +case $deplibs_check_method in
36486 +file_magic*)
36487 +  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
36488 +    echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
36489 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
36490 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
36491 +  echo $ECHO_N "(cached) $ECHO_C" >&6
36492 +else
36493 +  case $MAGIC_CMD in
36494 +[\\/*] |  ?:[\\/]*)
36495 +  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
36496 +  ;;
36497 +*)
36498 +  lt_save_MAGIC_CMD="$MAGIC_CMD"
36499 +  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
36500 +  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
36501 +  for ac_dir in $ac_dummy; do
36502 +    IFS="$lt_save_ifs"
36503 +    test -z "$ac_dir" && ac_dir=.
36504 +    if test -f $ac_dir/${ac_tool_prefix}file; then
36505 +      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
36506 +      if test -n "$file_magic_test_file"; then
36507 +       case $deplibs_check_method in
36508 +       "file_magic "*)
36509 +         file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
36510 +         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
36511 +         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
36512 +           $EGREP "$file_magic_regex" > /dev/null; then
36513 +           :
36514 +         else
36515 +           cat <<EOF 1>&2
36516 +
36517 +*** Warning: the command libtool uses to detect shared libraries,
36518 +*** $file_magic_cmd, produces output that libtool cannot recognize.
36519 +*** The result is that libtool may fail to recognize shared libraries
36520 +*** as such.  This will affect the creation of libtool libraries that
36521 +*** depend on shared libraries, but programs linked with such libtool
36522 +*** libraries will work regardless of this problem.  Nevertheless, you
36523 +*** may want to report the problem to your system manager and/or to
36524 +*** bug-libtool@gnu.org
36525 +
36526 +EOF
36527 +         fi ;;
36528 +       esac
36529 +      fi
36530 +      break
36531 +    fi
36532 +  done
36533 +  IFS="$lt_save_ifs"
36534 +  MAGIC_CMD="$lt_save_MAGIC_CMD"
36535 +  ;;
36536 +esac
36537 +fi
36538 +
36539 +MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
36540 +if test -n "$MAGIC_CMD"; then
36541 +  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
36542 +echo "${ECHO_T}$MAGIC_CMD" >&6
36543 +else
36544 +  echo "$as_me:$LINENO: result: no" >&5
36545 +echo "${ECHO_T}no" >&6
36546 +fi
36547 +
36548 +if test -z "$lt_cv_path_MAGIC_CMD"; then
36549 +  if test -n "$ac_tool_prefix"; then
36550 +    echo "$as_me:$LINENO: checking for file" >&5
36551 +echo $ECHO_N "checking for file... $ECHO_C" >&6
36552 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
36553 +  echo $ECHO_N "(cached) $ECHO_C" >&6
36554 +else
36555 +  case $MAGIC_CMD in
36556 +[\\/*] |  ?:[\\/]*)
36557 +  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
36558 +  ;;
36559 +*)
36560 +  lt_save_MAGIC_CMD="$MAGIC_CMD"
36561 +  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
36562 +  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
36563 +  for ac_dir in $ac_dummy; do
36564 +    IFS="$lt_save_ifs"
36565 +    test -z "$ac_dir" && ac_dir=.
36566 +    if test -f $ac_dir/file; then
36567 +      lt_cv_path_MAGIC_CMD="$ac_dir/file"
36568 +      if test -n "$file_magic_test_file"; then
36569 +       case $deplibs_check_method in
36570 +       "file_magic "*)
36571 +         file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
36572 +         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
36573 +         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
36574 +           $EGREP "$file_magic_regex" > /dev/null; then
36575 +           :
36576 +         else
36577 +           cat <<EOF 1>&2
36578 +
36579 +*** Warning: the command libtool uses to detect shared libraries,
36580 +*** $file_magic_cmd, produces output that libtool cannot recognize.
36581 +*** The result is that libtool may fail to recognize shared libraries
36582 +*** as such.  This will affect the creation of libtool libraries that
36583 +*** depend on shared libraries, but programs linked with such libtool
36584 +*** libraries will work regardless of this problem.  Nevertheless, you
36585 +*** may want to report the problem to your system manager and/or to
36586 +*** bug-libtool@gnu.org
36587 +
36588 +EOF
36589 +         fi ;;
36590 +       esac
36591 +      fi
36592 +      break
36593 +    fi
36594 +  done
36595 +  IFS="$lt_save_ifs"
36596 +  MAGIC_CMD="$lt_save_MAGIC_CMD"
36597 +  ;;
36598 +esac
36599 +fi
36600 +
36601 +MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
36602 +if test -n "$MAGIC_CMD"; then
36603 +  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
36604 +echo "${ECHO_T}$MAGIC_CMD" >&6
36605 +else
36606 +  echo "$as_me:$LINENO: result: no" >&5
36607 +echo "${ECHO_T}no" >&6
36608 +fi
36609 +
36610 +  else
36611 +    MAGIC_CMD=:
36612 +  fi
36613 +fi
36614 +
36615 +  fi
36616 +  ;;
36617 +esac
36618 +
36619 +enable_dlopen=no
36620 +enable_win32_dll=no
36621 +
36622 +# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
36623 +if test "${enable_libtool_lock+set}" = set; then
36624 +  enableval="$enable_libtool_lock"
36625 +
36626 +fi;
36627 +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
36628 +
36629 +
36630 +# Check whether --with-pic or --without-pic was given.
36631 +if test "${with_pic+set}" = set; then
36632 +  withval="$with_pic"
36633 +  pic_mode="$withval"
36634 +else
36635 +  pic_mode=default
36636 +fi;
36637 +test -z "$pic_mode" && pic_mode=default
36638 +
36639 +# Use C for the default configuration in the libtool script
36640 +tagname=
36641 +lt_save_CC="$CC"
36642 +ac_ext=c
36643 +ac_cpp='$CPP $CPPFLAGS'
36644 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36645 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36646 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
36647 +
36648 +
36649 +# Source file extension for C test sources.
36650 +ac_ext=c
36651 +
36652 +# Object file extension for compiled C test sources.
36653 +objext=o
36654 +objext=$objext
36655 +
36656 +# Code to be used in simple compile tests
36657 +lt_simple_compile_test_code="int some_variable = 0;\n"
36658 +
36659 +# Code to be used in simple link tests
36660 +lt_simple_link_test_code='int main(){return(0);}\n'
36661 +
36662 +
36663 +# If no C compiler was specified, use CC.
36664 +LTCC=${LTCC-"$CC"}
36665 +
36666 +# Allow CC to be a program name with arguments.
36667 +compiler=$CC
36668 +
36669 +
36670 +#
36671 +# Check for any special shared library compilation flags.
36672 +#
36673 +lt_prog_cc_shlib=
36674 +if test "$GCC" = no; then
36675 +  case $host_os in
36676 +  sco3.2v5*)
36677 +    lt_prog_cc_shlib='-belf'
36678 +    ;;
36679 +  esac
36680 +fi
36681 +if test -n "$lt_prog_cc_shlib"; then
36682 +  { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
36683 +echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
36684 +  if echo "$old_CC $old_CFLAGS " | grep "[     ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
36685 +  else
36686 +    { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
36687 +echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
36688 +    lt_cv_prog_cc_can_build_shared=no
36689 +  fi
36690 +fi
36691 +
36692 +
36693 +#
36694 +# Check to make sure the static flag actually works.
36695 +#
36696 +echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
36697 +echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
36698 +if test "${lt_prog_compiler_static_works+set}" = set; then
36699 +  echo $ECHO_N "(cached) $ECHO_C" >&6
36700 +else
36701 +  lt_prog_compiler_static_works=no
36702 +   save_LDFLAGS="$LDFLAGS"
36703 +   LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
36704 +   printf "$lt_simple_link_test_code" > conftest.$ac_ext
36705 +   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
36706 +     # The compiler can only warn and ignore the option if not recognized
36707 +     # So say no if there are warnings
36708 +     if test -s conftest.err; then
36709 +       # Append any errors to the config.log.
36710 +       cat conftest.err 1>&5
36711 +     else
36712 +       lt_prog_compiler_static_works=yes
36713 +     fi
36714 +   fi
36715 +   $rm conftest*
36716 +   LDFLAGS="$save_LDFLAGS"
36717 +
36718 +fi
36719 +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
36720 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
36721 +
36722 +if test x"$lt_prog_compiler_static_works" = xyes; then
36723 +    :
36724 +else
36725 +    lt_prog_compiler_static=
36726 +fi
36727 +
36728 +
36729 +
36730 +
36731 +lt_prog_compiler_no_builtin_flag=
36732 +
36733 +if test "$GCC" = yes; then
36734 +  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
36735 +
36736 +
36737 +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
36738 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
36739 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
36740 +  echo $ECHO_N "(cached) $ECHO_C" >&6
36741 +else
36742 +  lt_cv_prog_compiler_rtti_exceptions=no
36743 +  ac_outfile=conftest.$ac_objext
36744 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
36745 +   lt_compiler_flag="-fno-rtti -fno-exceptions"
36746 +   # Insert the option either (1) after the last *FLAGS variable, or
36747 +   # (2) before a word containing "conftest.", or (3) at the end.
36748 +   # Note that $ac_compile itself does not contain backslashes and begins
36749 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
36750 +   # The option is referenced via a variable to avoid confusing sed.
36751 +   lt_compile=`echo "$ac_compile" | $SED \
36752 +   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
36753 +   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
36754 +   -e 's:$: $lt_compiler_flag:'`
36755 +   (eval echo "\"\$as_me:6461: $lt_compile\"" >&5)
36756 +   (eval "$lt_compile" 2>conftest.err)
36757 +   ac_status=$?
36758 +   cat conftest.err >&5
36759 +   echo "$as_me:6465: \$? = $ac_status" >&5
36760 +   if (exit $ac_status) && test -s "$ac_outfile"; then
36761 +     # The compiler can only warn and ignore the option if not recognized
36762 +     # So say no if there are warnings
36763 +     if test ! -s conftest.err; then
36764 +       lt_cv_prog_compiler_rtti_exceptions=yes
36765 +     fi
36766 +   fi
36767 +   $rm conftest*
36768 +
36769 +fi
36770 +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
36771 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
36772 +
36773 +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
36774 +    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
36775 +else
36776 +    :
36777 +fi
36778 +
36779 +fi
36780 +
36781 +lt_prog_compiler_wl=
36782 +lt_prog_compiler_pic=
36783 +lt_prog_compiler_static=
36784 +
36785 +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
36786 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
36787 +
36788 +  if test "$GCC" = yes; then
36789 +    lt_prog_compiler_wl='-Wl,'
36790 +    lt_prog_compiler_static='-static'
36791 +
36792 +    case $host_os in
36793 +      aix*)
36794 +      # All AIX code is PIC.
36795 +      if test "$host_cpu" = ia64; then
36796 +       # AIX 5 now supports IA64 processor
36797 +       lt_prog_compiler_static='-Bstatic'
36798 +      fi
36799 +      ;;
36800 +
36801 +    amigaos*)
36802 +      # FIXME: we need at least 68020 code to build shared libraries, but
36803 +      # adding the `-m68020' flag to GCC prevents building anything better,
36804 +      # like `-m68040'.
36805 +      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
36806 +      ;;
36807 +
36808 +    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
36809 +      # PIC is the default for these OSes.
36810 +      ;;
36811 +
36812 +    mingw* | pw32* | os2*)
36813 +      # This hack is so that the source file can tell whether it is being
36814 +      # built for inclusion in a dll (and should export symbols for example).
36815 +      lt_prog_compiler_pic='-DDLL_EXPORT'
36816 +      ;;
36817 +
36818 +    darwin* | rhapsody*)
36819 +      # PIC is the default on this platform
36820 +      # Common symbols not allowed in MH_DYLIB files
36821 +      lt_prog_compiler_pic='-fno-common'
36822 +      ;;
36823 +
36824 +    msdosdjgpp*)
36825 +      # Just because we use GCC doesn't mean we suddenly get shared libraries
36826 +      # on systems that don't support them.
36827 +      lt_prog_compiler_can_build_shared=no
36828 +      enable_shared=no
36829 +      ;;
36830 +
36831 +    sysv4*MP*)
36832 +      if test -d /usr/nec; then
36833 +       lt_prog_compiler_pic=-Kconform_pic
36834 +      fi
36835 +      ;;
36836 +
36837 +    hpux*)
36838 +      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
36839 +      # not for PA HP-UX.
36840 +      case "$host_cpu" in
36841 +      hppa*64*|ia64*)
36842 +       # +Z the default
36843 +       ;;
36844 +      *)
36845 +       lt_prog_compiler_pic='-fPIC'
36846 +       ;;
36847 +      esac
36848 +      ;;
36849 +
36850 +    *)
36851 +      lt_prog_compiler_pic='-fPIC'
36852 +      ;;
36853 +    esac
36854 +  else
36855 +    # PORTME Check for flag to pass linker flags through the system compiler.
36856 +    case $host_os in
36857 +    aix*)
36858 +      lt_prog_compiler_wl='-Wl,'
36859 +      if test "$host_cpu" = ia64; then
36860 +       # AIX 5 now supports IA64 processor
36861 +       lt_prog_compiler_static='-Bstatic'
36862 +      else
36863 +       lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
36864 +      fi
36865 +      ;;
36866 +      darwin*)
36867 +        # PIC is the default on this platform
36868 +        # Common symbols not allowed in MH_DYLIB files
36869 +       case "$cc_basename" in
36870 +         xlc*)
36871 +         lt_prog_compiler_pic='-qnocommon'
36872 +         lt_prog_compiler_wl='-Wl,'
36873 +         ;;
36874 +       esac
36875 +       ;;
36876 +
36877 +    mingw* | pw32* | os2*)
36878 +      # This hack is so that the source file can tell whether it is being
36879 +      # built for inclusion in a dll (and should export symbols for example).
36880 +      lt_prog_compiler_pic='-DDLL_EXPORT'
36881 +      ;;
36882 +
36883 +    hpux9* | hpux10* | hpux11*)
36884 +      lt_prog_compiler_wl='-Wl,'
36885 +      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
36886 +      # not for PA HP-UX.
36887 +      case "$host_cpu" in
36888 +      hppa*64*|ia64*)
36889 +       # +Z the default
36890 +       ;;
36891 +      *)
36892 +       lt_prog_compiler_pic='+Z'
36893 +       ;;
36894 +      esac
36895 +      # Is there a better lt_prog_compiler_static that works with the bundled CC?
36896 +      lt_prog_compiler_static='${wl}-a ${wl}archive'
36897 +      ;;
36898 +
36899 +    irix5* | irix6* | nonstopux*)
36900 +      lt_prog_compiler_wl='-Wl,'
36901 +      # PIC (with -KPIC) is the default.
36902 +      lt_prog_compiler_static='-non_shared'
36903 +      ;;
36904 +
36905 +    newsos6)
36906 +      lt_prog_compiler_pic='-KPIC'
36907 +      lt_prog_compiler_static='-Bstatic'
36908 +      ;;
36909 +
36910 +    linux*)
36911 +      case $cc_basename in
36912 +      icc* | ecc*)
36913 +       lt_prog_compiler_wl='-Wl,'
36914 +       lt_prog_compiler_pic='-KPIC'
36915 +       lt_prog_compiler_static='-static'
36916 +        ;;
36917 +      pgcc | pgf77 | pgf90)
36918 +        # Portland Group compilers (*not* the Pentium gcc compiler,
36919 +       # which looks to be a dead project)
36920 +       lt_prog_compiler_wl='-Wl,'
36921 +       lt_prog_compiler_pic='-fpic'
36922 +       lt_prog_compiler_static='-static'
36923 +        ;;
36924 +      ccc*)
36925 +        lt_prog_compiler_wl='-Wl,'
36926 +        # All Alpha code is PIC.
36927 +        lt_prog_compiler_static='-non_shared'
36928 +        ;;
36929 +      esac
36930 +      ;;
36931 +
36932 +    osf3* | osf4* | osf5*)
36933 +      lt_prog_compiler_wl='-Wl,'
36934 +      # All OSF/1 code is PIC.
36935 +      lt_prog_compiler_static='-non_shared'
36936 +      ;;
36937 +
36938 +    sco3.2v5*)
36939 +      lt_prog_compiler_pic='-Kpic'
36940 +      lt_prog_compiler_static='-dn'
36941 +      ;;
36942 +
36943 +    solaris*)
36944 +      lt_prog_compiler_wl='-Wl,'
36945 +      lt_prog_compiler_pic='-KPIC'
36946 +      lt_prog_compiler_static='-Bstatic'
36947 +      ;;
36948 +
36949 +    sunos4*)
36950 +      lt_prog_compiler_wl='-Qoption ld '
36951 +      lt_prog_compiler_pic='-PIC'
36952 +      lt_prog_compiler_static='-Bstatic'
36953 +      ;;
36954 +
36955 +    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
36956 +      lt_prog_compiler_wl='-Wl,'
36957 +      lt_prog_compiler_pic='-KPIC'
36958 +      lt_prog_compiler_static='-Bstatic'
36959 +      ;;
36960 +
36961 +    sysv4*MP*)
36962 +      if test -d /usr/nec ;then
36963 +       lt_prog_compiler_pic='-Kconform_pic'
36964 +       lt_prog_compiler_static='-Bstatic'
36965 +      fi
36966 +      ;;
36967 +
36968 +    unicos*)
36969 +      lt_prog_compiler_wl='-Wl,'
36970 +      lt_prog_compiler_can_build_shared=no
36971 +      ;;
36972 +
36973 +    uts4*)
36974 +      lt_prog_compiler_pic='-pic'
36975 +      lt_prog_compiler_static='-Bstatic'
36976 +      ;;
36977 +
36978 +    *)
36979 +      lt_prog_compiler_can_build_shared=no
36980 +      ;;
36981 +    esac
36982 +  fi
36983 +
36984 +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
36985 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6
36986 +
36987 +#
36988 +# Check to make sure the PIC flag actually works.
36989 +#
36990 +if test -n "$lt_prog_compiler_pic"; then
36991 +
36992 +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
36993 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
36994 +if test "${lt_prog_compiler_pic_works+set}" = set; then
36995 +  echo $ECHO_N "(cached) $ECHO_C" >&6
36996 +else
36997 +  lt_prog_compiler_pic_works=no
36998 +  ac_outfile=conftest.$ac_objext
36999 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
37000 +   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
37001 +   # Insert the option either (1) after the last *FLAGS variable, or
37002 +   # (2) before a word containing "conftest.", or (3) at the end.
37003 +   # Note that $ac_compile itself does not contain backslashes and begins
37004 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
37005 +   # The option is referenced via a variable to avoid confusing sed.
37006 +   lt_compile=`echo "$ac_compile" | $SED \
37007 +   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
37008 +   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
37009 +   -e 's:$: $lt_compiler_flag:'`
37010 +   (eval echo "\"\$as_me:6716: $lt_compile\"" >&5)
37011 +   (eval "$lt_compile" 2>conftest.err)
37012 +   ac_status=$?
37013 +   cat conftest.err >&5
37014 +   echo "$as_me:6720: \$? = $ac_status" >&5
37015 +   if (exit $ac_status) && test -s "$ac_outfile"; then
37016 +     # The compiler can only warn and ignore the option if not recognized
37017 +     # So say no if there are warnings
37018 +     if test ! -s conftest.err; then
37019 +       lt_prog_compiler_pic_works=yes
37020 +     fi
37021 +   fi
37022 +   $rm conftest*
37023 +
37024 +fi
37025 +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
37026 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
37027 +
37028 +if test x"$lt_prog_compiler_pic_works" = xyes; then
37029 +    case $lt_prog_compiler_pic in
37030 +     "" | " "*) ;;
37031 +     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
37032 +     esac
37033 +else
37034 +    lt_prog_compiler_pic=
37035 +     lt_prog_compiler_can_build_shared=no
37036 +fi
37037 +
37038 +fi
37039 +case "$host_os" in
37040 +  # For platforms which do not support PIC, -DPIC is meaningless:
37041 +  *djgpp*)
37042 +    lt_prog_compiler_pic=
37043 +    ;;
37044 +  *)
37045 +    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
37046 +    ;;
37047 +esac
37048 +
37049 +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
37050 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
37051 +if test "${lt_cv_prog_compiler_c_o+set}" = set; then
37052 +  echo $ECHO_N "(cached) $ECHO_C" >&6
37053 +else
37054 +  lt_cv_prog_compiler_c_o=no
37055 +   $rm -r conftest 2>/dev/null
37056 +   mkdir conftest
37057 +   cd conftest
37058 +   mkdir out
37059 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
37060 +
37061 +   lt_compiler_flag="-o out/conftest2.$ac_objext"
37062 +   # Insert the option either (1) after the last *FLAGS variable, or
37063 +   # (2) before a word containing "conftest.", or (3) at the end.
37064 +   # Note that $ac_compile itself does not contain backslashes and begins
37065 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
37066 +   lt_compile=`echo "$ac_compile" | $SED \
37067 +   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
37068 +   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
37069 +   -e 's:$: $lt_compiler_flag:'`
37070 +   (eval echo "\"\$as_me:6776: $lt_compile\"" >&5)
37071 +   (eval "$lt_compile" 2>out/conftest.err)
37072 +   ac_status=$?
37073 +   cat out/conftest.err >&5
37074 +   echo "$as_me:6780: \$? = $ac_status" >&5
37075 +   if (exit $ac_status) && test -s out/conftest2.$ac_objext
37076 +   then
37077 +     # The compiler can only warn and ignore the option if not recognized
37078 +     # So say no if there are warnings
37079 +     if test ! -s out/conftest.err; then
37080 +       lt_cv_prog_compiler_c_o=yes
37081 +     fi
37082 +   fi
37083 +   chmod u+w .
37084 +   $rm conftest*
37085 +   # SGI C++ compiler will create directory out/ii_files/ for
37086 +   # template instantiation
37087 +   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
37088 +   $rm out/* && rmdir out
37089 +   cd ..
37090 +   rmdir conftest
37091 +   $rm conftest*
37092 +
37093 +fi
37094 +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
37095 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
37096 +
37097 +
37098 +hard_links="nottested"
37099 +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
37100 +  # do not overwrite the value of need_locks provided by the user
37101 +  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
37102 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
37103 +  hard_links=yes
37104 +  $rm conftest*
37105 +  ln conftest.a conftest.b 2>/dev/null && hard_links=no
37106 +  touch conftest.a
37107 +  ln conftest.a conftest.b 2>&5 || hard_links=no
37108 +  ln conftest.a conftest.b 2>/dev/null && hard_links=no
37109 +  echo "$as_me:$LINENO: result: $hard_links" >&5
37110 +echo "${ECHO_T}$hard_links" >&6
37111 +  if test "$hard_links" = no; then
37112 +    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
37113 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
37114 +    need_locks=warn
37115 +  fi
37116 +else
37117 +  need_locks=no
37118 +fi
37119 +
37120 +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
37121 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
37122 +
37123 +  runpath_var=
37124 +  allow_undefined_flag=
37125 +  enable_shared_with_static_runtimes=no
37126 +  archive_cmds=
37127 +  archive_expsym_cmds=
37128 +  old_archive_From_new_cmds=
37129 +  old_archive_from_expsyms_cmds=
37130 +  export_dynamic_flag_spec=
37131 +  whole_archive_flag_spec=
37132 +  thread_safe_flag_spec=
37133 +  hardcode_libdir_flag_spec=
37134 +  hardcode_libdir_flag_spec_ld=
37135 +  hardcode_libdir_separator=
37136 +  hardcode_direct=no
37137 +  hardcode_minus_L=no
37138 +  hardcode_shlibpath_var=unsupported
37139 +  link_all_deplibs=unknown
37140 +  hardcode_automatic=no
37141 +  module_cmds=
37142 +  module_expsym_cmds=
37143 +  always_export_symbols=no
37144 +  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
37145 +  # include_expsyms should be a list of space-separated symbols to be *always*
37146 +  # included in the symbol list
37147 +  include_expsyms=
37148 +  # exclude_expsyms can be an extended regexp of symbols to exclude
37149 +  # it will be wrapped by ` (' and `)$', so one must not match beginning or
37150 +  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
37151 +  # as well as any symbol that contains `d'.
37152 +  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
37153 +  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
37154 +  # platforms (ab)use it in PIC code, but their linkers get confused if
37155 +  # the symbol is explicitly referenced.  Since portable code cannot
37156 +  # rely on this symbol name, it's probably fine to never include it in
37157 +  # preloaded symbol tables.
37158 +  extract_expsyms_cmds=
37159 +
37160 +  case $host_os in
37161 +  cygwin* | mingw* | pw32*)
37162 +    # FIXME: the MSVC++ port hasn't been tested in a loooong time
37163 +    # When not using gcc, we currently assume that we are using
37164 +    # Microsoft Visual C++.
37165 +    if test "$GCC" != yes; then
37166 +      with_gnu_ld=no
37167 +    fi
37168 +    ;;
37169 +  openbsd*)
37170 +    with_gnu_ld=no
37171 +    ;;
37172 +  esac
37173 +
37174 +  ld_shlibs=yes
37175 +  if test "$with_gnu_ld" = yes; then
37176 +    # If archive_cmds runs LD, not CC, wlarc should be empty
37177 +    wlarc='${wl}'
37178 +
37179 +    # See if GNU ld supports shared libraries.
37180 +    case $host_os in
37181 +    aix3* | aix4* | aix5*)
37182 +      # On AIX/PPC, the GNU linker is very broken
37183 +      if test "$host_cpu" != ia64; then
37184 +       ld_shlibs=no
37185 +       cat <<EOF 1>&2
37186 +
37187 +*** Warning: the GNU linker, at least up to release 2.9.1, is reported
37188 +*** to be unable to reliably create shared libraries on AIX.
37189 +*** Therefore, libtool is disabling shared libraries support.  If you
37190 +*** really care for shared libraries, you may want to modify your PATH
37191 +*** so that a non-GNU linker is found, and then restart.
37192 +
37193 +EOF
37194 +      fi
37195 +      ;;
37196 +
37197 +    amigaos*)
37198 +      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
37199 +      hardcode_libdir_flag_spec='-L$libdir'
37200 +      hardcode_minus_L=yes
37201 +
37202 +      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
37203 +      # that the semantics of dynamic libraries on AmigaOS, at least up
37204 +      # to version 4, is to share data among multiple programs linked
37205 +      # with the same dynamic library.  Since this doesn't match the
37206 +      # behavior of shared libraries on other platforms, we can't use
37207 +      # them.
37208 +      ld_shlibs=no
37209 +      ;;
37210 +
37211 +    beos*)
37212 +      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
37213 +       allow_undefined_flag=unsupported
37214 +       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
37215 +       # support --undefined.  This deserves some investigation.  FIXME
37216 +       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
37217 +      else
37218 +       ld_shlibs=no
37219 +      fi
37220 +      ;;
37221 +
37222 +    cygwin* | mingw* | pw32*)
37223 +      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
37224 +      # as there is no search path for DLLs.
37225 +      hardcode_libdir_flag_spec='-L$libdir'
37226 +      allow_undefined_flag=unsupported
37227 +      always_export_symbols=no
37228 +      enable_shared_with_static_runtimes=yes
37229 +      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
37230 +
37231 +      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
37232 +        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
37233 +       # If the export-symbols file already is a .def file (1st line
37234 +       # is EXPORTS), use it as is; otherwise, prepend...
37235 +       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
37236 +         cp $export_symbols $output_objdir/$soname.def;
37237 +       else
37238 +         echo EXPORTS > $output_objdir/$soname.def;
37239 +         cat $export_symbols >> $output_objdir/$soname.def;
37240 +       fi~
37241 +       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
37242 +      else
37243 +       ld_shlibs=no
37244 +      fi
37245 +      ;;
37246 +
37247 +    netbsd*)
37248 +      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
37249 +       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
37250 +       wlarc=
37251 +      else
37252 +       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
37253 +       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
37254 +      fi
37255 +      ;;
37256 +
37257 +    solaris* | sysv5*)
37258 +      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
37259 +       ld_shlibs=no
37260 +       cat <<EOF 1>&2
37261 +
37262 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably
37263 +*** create shared libraries on Solaris systems.  Therefore, libtool
37264 +*** is disabling shared libraries support.  We urge you to upgrade GNU
37265 +*** binutils to release 2.9.1 or newer.  Another option is to modify
37266 +*** your PATH or compiler configuration so that the native linker is
37267 +*** used, and then restart.
37268 +
37269 +EOF
37270 +      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
37271 +       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
37272 +       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
37273 +      else
37274 +       ld_shlibs=no
37275 +      fi
37276 +      ;;
37277 +
37278 +    sunos4*)
37279 +      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
37280 +      wlarc=
37281 +      hardcode_direct=yes
37282 +      hardcode_shlibpath_var=no
37283 +      ;;
37284 +
37285 +  linux*)
37286 +    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
37287 +      tmp_addflag=
37288 +      case $CC,$host_cpu in
37289 +      pgf77* | pgf90* )                        # Portland Group f77 and f90 compilers
37290 +        tmp_addflag=' -fpic' ;;
37291 +      ecc*,ia64* | icc*,ia64*)         # Intel C compiler on ia64
37292 +        tmp_addflag=' -i_dynamic' ;;
37293 +      efc*,ia64* | ifort*,ia64*)       # Intel Fortran compiler on ia64
37294 +        tmp_addflag=' -i_dynamic -nofor_main' ;;
37295 +      ifc* | ifort*)                   # Intel Fortran compiler
37296 +       tmp_addflag=' -nofor_main' ;;
37297 +      esac
37298 +      archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
37299 +      supports_anon_versioning=no
37300 +      case `$LD -v 2>/dev/null` in
37301 +        *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
37302 +        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
37303 +        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
37304 +        *\ 2.11.*) ;; # other 2.11 versions
37305 +        *) supports_anon_versioning=yes ;;
37306 +      esac
37307 +      if test $supports_anon_versioning = yes; then
37308 +        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
37309 +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
37310 +$echo "local: *; };" >> $output_objdir/$libname.ver~
37311 +        $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
37312 +      else
37313 +        archive_expsym_cmds=$archive_cmds
37314 +      fi
37315 +    else
37316 +      ld_shlibs=no
37317 +    fi
37318 +    ;;
37319 +
37320 +    *)
37321 +      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
37322 +       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
37323 +       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
37324 +      else
37325 +       ld_shlibs=no
37326 +      fi
37327 +      ;;
37328 +    esac
37329 +
37330 +    if test "$ld_shlibs" = yes; then
37331 +      runpath_var=LD_RUN_PATH
37332 +      hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
37333 +      export_dynamic_flag_spec='${wl}--export-dynamic'
37334 +      # ancient GNU ld didn't support --whole-archive et. al.
37335 +      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
37336 +       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
37337 +      else
37338 +       whole_archive_flag_spec=
37339 +      fi
37340 +    fi
37341 +  else
37342 +    # PORTME fill in a description of your system's linker (not GNU ld)
37343 +    case $host_os in
37344 +    aix3*)
37345 +      allow_undefined_flag=unsupported
37346 +      always_export_symbols=yes
37347 +      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
37348 +      # Note: this linker hardcodes the directories in LIBPATH if there
37349 +      # are no directories specified by -L.
37350 +      hardcode_minus_L=yes
37351 +      if test "$GCC" = yes && test -z "$link_static_flag"; then
37352 +       # Neither direct hardcoding nor static linking is supported with a
37353 +       # broken collect2.
37354 +       hardcode_direct=unsupported
37355 +      fi
37356 +      ;;
37357 +
37358 +    aix4* | aix5*)
37359 +      if test "$host_cpu" = ia64; then
37360 +       # On IA64, the linker does run time linking by default, so we don't
37361 +       # have to do anything special.
37362 +       aix_use_runtimelinking=no
37363 +       exp_sym_flag='-Bexport'
37364 +       no_entry_flag=""
37365 +      else
37366 +       # If we're using GNU nm, then we don't want the "-C" option.
37367 +       # -C means demangle to AIX nm, but means don't demangle with GNU nm
37368 +       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
37369 +         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
37370 +       else
37371 +         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
37372 +       fi
37373 +       aix_use_runtimelinking=no
37374 +
37375 +       # Test if we are trying to use run time linking or normal
37376 +       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
37377 +       # need to do runtime linking.
37378 +       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
37379 +         for ld_flag in $LDFLAGS; do
37380 +         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
37381 +           aix_use_runtimelinking=yes
37382 +           break
37383 +         fi
37384 +         done
37385 +       esac
37386 +
37387 +       exp_sym_flag='-bexport'
37388 +       no_entry_flag='-bnoentry'
37389 +      fi
37390 +
37391 +      # When large executables or shared objects are built, AIX ld can
37392 +      # have problems creating the table of contents.  If linking a library
37393 +      # or program results in "error TOC overflow" add -mminimal-toc to
37394 +      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
37395 +      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
37396 +
37397 +      archive_cmds=''
37398 +      hardcode_direct=yes
37399 +      hardcode_libdir_separator=':'
37400 +      link_all_deplibs=yes
37401 +
37402 +      if test "$GCC" = yes; then
37403 +       case $host_os in aix4.[012]|aix4.[012].*)
37404 +       # We only want to do this on AIX 4.2 and lower, the check
37405 +       # below for broken collect2 doesn't work under 4.3+
37406 +         collect2name=`${CC} -print-prog-name=collect2`
37407 +         if test -f "$collect2name" && \
37408 +          strings "$collect2name" | grep resolve_lib_name >/dev/null
37409 +         then
37410 +         # We have reworked collect2
37411 +         hardcode_direct=yes
37412 +         else
37413 +         # We have old collect2
37414 +         hardcode_direct=unsupported
37415 +         # It fails to find uninstalled libraries when the uninstalled
37416 +         # path is not listed in the libpath.  Setting hardcode_minus_L
37417 +         # to unsupported forces relinking
37418 +         hardcode_minus_L=yes
37419 +         hardcode_libdir_flag_spec='-L$libdir'
37420 +         hardcode_libdir_separator=
37421 +         fi
37422 +       esac
37423 +       shared_flag='-shared'
37424 +       if test "$aix_use_runtimelinking" = yes; then
37425 +         shared_flag="$shared_flag "'${wl}-G'
37426 +       fi
37427 +      else
37428 +       # not using gcc
37429 +       if test "$host_cpu" = ia64; then
37430 +       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
37431 +       # chokes on -Wl,-G. The following line is correct:
37432 +         shared_flag='-G'
37433 +       else
37434 +       if test "$aix_use_runtimelinking" = yes; then
37435 +           shared_flag='${wl}-G'
37436 +         else
37437 +           shared_flag='${wl}-bM:SRE'
37438 +       fi
37439 +       fi
37440 +      fi
37441 +
37442 +      # It seems that -bexpall does not export symbols beginning with
37443 +      # underscore (_), so it is better to generate a list of symbols to export.
37444 +      always_export_symbols=yes
37445 +      if test "$aix_use_runtimelinking" = yes; then
37446 +       # Warning - without using the other runtime loading flags (-brtl),
37447 +       # -berok will link without error, but may produce a broken library.
37448 +       allow_undefined_flag='-berok'
37449 +       # Determine the default libpath from the value encoded in an empty executable.
37450 +       cat >conftest.$ac_ext <<_ACEOF
37451 +/* confdefs.h.  */
37452 +_ACEOF
37453 +cat confdefs.h >>conftest.$ac_ext
37454 +cat >>conftest.$ac_ext <<_ACEOF
37455 +/* end confdefs.h.  */
37456 +
37457 +int
37458 +main ()
37459 +{
37460 +
37461 +  ;
37462 +  return 0;
37463 +}
37464 +_ACEOF
37465 +rm -f conftest.$ac_objext conftest$ac_exeext
37466 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37467 +  (eval $ac_link) 2>conftest.er1
37468 +  ac_status=$?
37469 +  grep -v '^ *+' conftest.er1 >conftest.err
37470 +  rm -f conftest.er1
37471 +  cat conftest.err >&5
37472 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
37473 +  (exit $ac_status); } &&
37474 +        { ac_try='test -z "$ac_c_werror_flag"
37475 +                        || test ! -s conftest.err'
37476 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37477 +  (eval $ac_try) 2>&5
37478 +  ac_status=$?
37479 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
37480 +  (exit $ac_status); }; } &&
37481 +        { ac_try='test -s conftest$ac_exeext'
37482 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37483 +  (eval $ac_try) 2>&5
37484 +  ac_status=$?
37485 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
37486 +  (exit $ac_status); }; }; then
37487 +
37488 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
37489 +}'`
37490 +# Check for a 64-bit object if we didn't find anything.
37491 +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
37492 +}'`; fi
37493 +else
37494 +  echo "$as_me: failed program was:" >&5
37495 +sed 's/^/| /' conftest.$ac_ext >&5
37496 +
37497 +fi
37498 +rm -f conftest.err conftest.$ac_objext \
37499 +      conftest$ac_exeext conftest.$ac_ext
37500 +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
37501 +
37502 +       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
37503 +       archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
37504 +       else
37505 +       if test "$host_cpu" = ia64; then
37506 +         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
37507 +         allow_undefined_flag="-z nodefs"
37508 +         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
37509 +       else
37510 +        # Determine the default libpath from the value encoded in an empty executable.
37511 +        cat >conftest.$ac_ext <<_ACEOF
37512 +/* confdefs.h.  */
37513 +_ACEOF
37514 +cat confdefs.h >>conftest.$ac_ext
37515 +cat >>conftest.$ac_ext <<_ACEOF
37516 +/* end confdefs.h.  */
37517 +
37518 +int
37519 +main ()
37520 +{
37521 +
37522 +  ;
37523 +  return 0;
37524 +}
37525 +_ACEOF
37526 +rm -f conftest.$ac_objext conftest$ac_exeext
37527 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37528 +  (eval $ac_link) 2>conftest.er1
37529 +  ac_status=$?
37530 +  grep -v '^ *+' conftest.er1 >conftest.err
37531 +  rm -f conftest.er1
37532 +  cat conftest.err >&5
37533 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
37534 +  (exit $ac_status); } &&
37535 +        { ac_try='test -z "$ac_c_werror_flag"
37536 +                        || test ! -s conftest.err'
37537 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37538 +  (eval $ac_try) 2>&5
37539 +  ac_status=$?
37540 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
37541 +  (exit $ac_status); }; } &&
37542 +        { ac_try='test -s conftest$ac_exeext'
37543 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37544 +  (eval $ac_try) 2>&5
37545 +  ac_status=$?
37546 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
37547 +  (exit $ac_status); }; }; then
37548 +
37549 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
37550 +}'`
37551 +# Check for a 64-bit object if we didn't find anything.
37552 +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
37553 +}'`; fi
37554 +else
37555 +  echo "$as_me: failed program was:" >&5
37556 +sed 's/^/| /' conftest.$ac_ext >&5
37557 +
37558 +fi
37559 +rm -f conftest.err conftest.$ac_objext \
37560 +      conftest$ac_exeext conftest.$ac_ext
37561 +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
37562 +
37563 +        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
37564 +         # Warning - without using the other run time loading flags,
37565 +         # -berok will link without error, but may produce a broken library.
37566 +         no_undefined_flag=' ${wl}-bernotok'
37567 +         allow_undefined_flag=' ${wl}-berok'
37568 +         # -bexpall does not export symbols beginning with underscore (_)
37569 +         always_export_symbols=yes
37570 +         # Exported symbols can be pulled into shared objects from archives
37571 +         whole_archive_flag_spec=' '
37572 +         archive_cmds_need_lc=yes
37573 +         # This is similar to how AIX traditionally builds it's shared libraries.
37574 +         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
37575 +       fi
37576 +      fi
37577 +      ;;
37578 +
37579 +    amigaos*)
37580 +      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
37581 +      hardcode_libdir_flag_spec='-L$libdir'
37582 +      hardcode_minus_L=yes
37583 +      # see comment about different semantics on the GNU ld section
37584 +      ld_shlibs=no
37585 +      ;;
37586 +
37587 +    bsdi[45]*)
37588 +      export_dynamic_flag_spec=-rdynamic
37589 +      ;;
37590 +
37591 +    cygwin* | mingw* | pw32*)
37592 +      # When not using gcc, we currently assume that we are using
37593 +      # Microsoft Visual C++.
37594 +      # hardcode_libdir_flag_spec is actually meaningless, as there is
37595 +      # no search path for DLLs.
37596 +      hardcode_libdir_flag_spec=' '
37597 +      allow_undefined_flag=unsupported
37598 +      # Tell ltmain to make .lib files, not .a files.
37599 +      libext=lib
37600 +      # Tell ltmain to make .dll files, not .so files.
37601 +      shrext_cmds=".dll"
37602 +      # FIXME: Setting linknames here is a bad hack.
37603 +      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
37604 +      # The linker will automatically build a .lib file if we build a DLL.
37605 +      old_archive_From_new_cmds='true'
37606 +      # FIXME: Should let the user specify the lib program.
37607 +      old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
37608 +      fix_srcfile_path='`cygpath -w "$srcfile"`'
37609 +      enable_shared_with_static_runtimes=yes
37610 +      ;;
37611 +
37612 +    darwin* | rhapsody*)
37613 +      case "$host_os" in
37614 +        rhapsody* | darwin1.[012])
37615 +         allow_undefined_flag='${wl}-undefined ${wl}suppress'
37616 +         ;;
37617 +       *) # Darwin 1.3 on
37618 +         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
37619 +           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
37620 +         else
37621 +           case ${MACOSX_DEPLOYMENT_TARGET} in
37622 +             10.[012])
37623 +               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
37624 +               ;;
37625 +             10.*)
37626 +               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
37627 +               ;;
37628 +           esac
37629 +         fi
37630 +         ;;
37631 +      esac
37632 +      archive_cmds_need_lc=no
37633 +      hardcode_direct=no
37634 +      hardcode_automatic=yes
37635 +      hardcode_shlibpath_var=unsupported
37636 +      whole_archive_flag_spec=''
37637 +      link_all_deplibs=yes
37638 +    if test "$GCC" = yes ; then
37639 +       output_verbose_link_cmd='echo'
37640 +        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
37641 +      module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
37642 +      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
37643 +      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
37644 +      module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
37645 +    else
37646 +      case "$cc_basename" in
37647 +        xlc*)
37648 +         output_verbose_link_cmd='echo'
37649 +         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
37650 +         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
37651 +          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
37652 +         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
37653 +          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
37654 +          ;;
37655 +       *)
37656 +         ld_shlibs=no
37657 +          ;;
37658 +      esac
37659 +    fi
37660 +      ;;
37661 +
37662 +    dgux*)
37663 +      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
37664 +      hardcode_libdir_flag_spec='-L$libdir'
37665 +      hardcode_shlibpath_var=no
37666 +      ;;
37667 +
37668 +    freebsd1*)
37669 +      ld_shlibs=no
37670 +      ;;
37671 +
37672 +    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
37673 +    # support.  Future versions do this automatically, but an explicit c++rt0.o
37674 +    # does not break anything, and helps significantly (at the cost of a little
37675 +    # extra space).
37676 +    freebsd2.2*)
37677 +      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
37678 +      hardcode_libdir_flag_spec='-R$libdir'
37679 +      hardcode_direct=yes
37680 +      hardcode_shlibpath_var=no
37681 +      ;;
37682 +
37683 +    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
37684 +    freebsd2*)
37685 +      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
37686 +      hardcode_direct=yes
37687 +      hardcode_minus_L=yes
37688 +      hardcode_shlibpath_var=no
37689 +      ;;
37690 +
37691 +    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
37692 +    freebsd* | kfreebsd*-gnu | dragonfly*)
37693 +      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
37694 +      hardcode_libdir_flag_spec='-R$libdir'
37695 +      hardcode_direct=yes
37696 +      hardcode_shlibpath_var=no
37697 +      ;;
37698 +
37699 +    hpux9*)
37700 +      if test "$GCC" = yes; then
37701 +       archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
37702 +      else
37703 +       archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
37704 +      fi
37705 +      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
37706 +      hardcode_libdir_separator=:
37707 +      hardcode_direct=yes
37708 +
37709 +      # hardcode_minus_L: Not really in the search PATH,
37710 +      # but as the default location of the library.
37711 +      hardcode_minus_L=yes
37712 +      export_dynamic_flag_spec='${wl}-E'
37713 +      ;;
37714 +
37715 +    hpux10* | hpux11*)
37716 +      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
37717 +       case "$host_cpu" in
37718 +       hppa*64*|ia64*)
37719 +         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
37720 +         ;;
37721 +       *)
37722 +         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
37723 +         ;;
37724 +       esac
37725 +      else
37726 +       case "$host_cpu" in
37727 +       hppa*64*|ia64*)
37728 +         archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
37729 +         ;;
37730 +       *)
37731 +         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
37732 +         ;;
37733 +       esac
37734 +      fi
37735 +      if test "$with_gnu_ld" = no; then
37736 +       case "$host_cpu" in
37737 +       hppa*64*)
37738 +         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
37739 +         hardcode_libdir_flag_spec_ld='+b $libdir'
37740 +         hardcode_libdir_separator=:
37741 +         hardcode_direct=no
37742 +         hardcode_shlibpath_var=no
37743 +         ;;
37744 +       ia64*)
37745 +         hardcode_libdir_flag_spec='-L$libdir'
37746 +         hardcode_direct=no
37747 +         hardcode_shlibpath_var=no
37748 +
37749 +         # hardcode_minus_L: Not really in the search PATH,
37750 +         # but as the default location of the library.
37751 +         hardcode_minus_L=yes
37752 +         ;;
37753 +       *)
37754 +         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
37755 +         hardcode_libdir_separator=:
37756 +         hardcode_direct=yes
37757 +         export_dynamic_flag_spec='${wl}-E'
37758 +
37759 +         # hardcode_minus_L: Not really in the search PATH,
37760 +         # but as the default location of the library.
37761 +         hardcode_minus_L=yes
37762 +         ;;
37763 +       esac
37764 +      fi
37765 +      ;;
37766 +
37767 +    irix5* | irix6* | nonstopux*)
37768 +      if test "$GCC" = yes; then
37769 +       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
37770 +      else
37771 +       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
37772 +       hardcode_libdir_flag_spec_ld='-rpath $libdir'
37773 +      fi
37774 +      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
37775 +      hardcode_libdir_separator=:
37776 +      link_all_deplibs=yes
37777 +      ;;
37778 +
37779 +    netbsd*)
37780 +      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
37781 +       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
37782 +      else
37783 +       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
37784 +      fi
37785 +      hardcode_libdir_flag_spec='-R$libdir'
37786 +      hardcode_direct=yes
37787 +      hardcode_shlibpath_var=no
37788 +      ;;
37789 +
37790 +    newsos6)
37791 +      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
37792 +      hardcode_direct=yes
37793 +      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
37794 +      hardcode_libdir_separator=:
37795 +      hardcode_shlibpath_var=no
37796 +      ;;
37797 +
37798 +    openbsd*)
37799 +      hardcode_direct=yes
37800 +      hardcode_shlibpath_var=no
37801 +      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
37802 +       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
37803 +       archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
37804 +       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
37805 +       export_dynamic_flag_spec='${wl}-E'
37806 +      else
37807 +       case $host_os in
37808 +        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
37809 +          archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
37810 +          hardcode_libdir_flag_spec='-R$libdir'
37811 +          ;;
37812 +        *)
37813 +          archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
37814 +          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
37815 +          ;;
37816 +       esac
37817 +      fi
37818 +      ;;
37819 +
37820 +    os2*)
37821 +      hardcode_libdir_flag_spec='-L$libdir'
37822 +      hardcode_minus_L=yes
37823 +      allow_undefined_flag=unsupported
37824 +      archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
37825 +      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
37826 +      ;;
37827 +
37828 +    osf3*)
37829 +      if test "$GCC" = yes; then
37830 +       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
37831 +       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
37832 +      else
37833 +       allow_undefined_flag=' -expect_unresolved \*'
37834 +       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
37835 +      fi
37836 +      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
37837 +      hardcode_libdir_separator=:
37838 +      ;;
37839 +
37840 +    osf4* | osf5*)     # as osf3* with the addition of -msym flag
37841 +      if test "$GCC" = yes; then
37842 +       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
37843 +       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
37844 +       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
37845 +      else
37846 +       allow_undefined_flag=' -expect_unresolved \*'
37847 +       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
37848 +       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
37849 +       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
37850 +
37851 +       # Both c and cxx compiler support -rpath directly
37852 +       hardcode_libdir_flag_spec='-rpath $libdir'
37853 +      fi
37854 +      hardcode_libdir_separator=:
37855 +      ;;
37856 +
37857 +    sco3.2v5*)
37858 +      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
37859 +      hardcode_shlibpath_var=no
37860 +      export_dynamic_flag_spec='${wl}-Bexport'
37861 +      runpath_var=LD_RUN_PATH
37862 +      hardcode_runpath_var=yes
37863 +      ;;
37864 +
37865 +    solaris*)
37866 +      no_undefined_flag=' -z text'
37867 +      if test "$GCC" = yes; then
37868 +       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
37869 +       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
37870 +         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
37871 +      else
37872 +       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
37873 +       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
37874 +       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
37875 +      fi
37876 +      hardcode_libdir_flag_spec='-R$libdir'
37877 +      hardcode_shlibpath_var=no
37878 +      case $host_os in
37879 +      solaris2.[0-5] | solaris2.[0-5].*) ;;
37880 +      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
37881 +       whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
37882 +      esac
37883 +      link_all_deplibs=yes
37884 +      ;;
37885 +
37886 +    sunos4*)
37887 +      if test "x$host_vendor" = xsequent; then
37888 +       # Use $CC to link under sequent, because it throws in some extra .o
37889 +       # files that make .init and .fini sections work.
37890 +       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
37891 +      else
37892 +       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
37893 +      fi
37894 +      hardcode_libdir_flag_spec='-L$libdir'
37895 +      hardcode_direct=yes
37896 +      hardcode_minus_L=yes
37897 +      hardcode_shlibpath_var=no
37898 +      ;;
37899 +
37900 +    sysv4)
37901 +      case $host_vendor in
37902 +       sni)
37903 +         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
37904 +         hardcode_direct=yes # is this really true???
37905 +       ;;
37906 +       siemens)
37907 +         ## LD is ld it makes a PLAMLIB
37908 +         ## CC just makes a GrossModule.
37909 +         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
37910 +         reload_cmds='$CC -r -o $output$reload_objs'
37911 +         hardcode_direct=no
37912 +        ;;
37913 +       motorola)
37914 +         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
37915 +         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
37916 +       ;;
37917 +      esac
37918 +      runpath_var='LD_RUN_PATH'
37919 +      hardcode_shlibpath_var=no
37920 +      ;;
37921 +
37922 +    sysv4.3*)
37923 +      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
37924 +      hardcode_shlibpath_var=no
37925 +      export_dynamic_flag_spec='-Bexport'
37926 +      ;;
37927 +
37928 +    sysv4*MP*)
37929 +      if test -d /usr/nec; then
37930 +       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
37931 +       hardcode_shlibpath_var=no
37932 +       runpath_var=LD_RUN_PATH
37933 +       hardcode_runpath_var=yes
37934 +       ld_shlibs=yes
37935 +      fi
37936 +      ;;
37937 +
37938 +    sysv4.2uw2*)
37939 +      archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
37940 +      hardcode_direct=yes
37941 +      hardcode_minus_L=no
37942 +      hardcode_shlibpath_var=no
37943 +      hardcode_runpath_var=yes
37944 +      runpath_var=LD_RUN_PATH
37945 +      ;;
37946 +
37947 +   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
37948 +      no_undefined_flag='${wl}-z ${wl}text'
37949 +      if test "$GCC" = yes; then
37950 +       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
37951 +      else
37952 +       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
37953 +      fi
37954 +      runpath_var='LD_RUN_PATH'
37955 +      hardcode_shlibpath_var=no
37956 +      ;;
37957 +
37958 +    sysv5*)
37959 +      no_undefined_flag=' -z text'
37960 +      # $CC -shared without GNU ld will not create a library from C++
37961 +      # object files and a static libstdc++, better avoid it by now
37962 +      archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
37963 +      archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
37964 +               $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
37965 +      hardcode_libdir_flag_spec=
37966 +      hardcode_shlibpath_var=no
37967 +      runpath_var='LD_RUN_PATH'
37968 +      ;;
37969 +
37970 +    uts4*)
37971 +      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
37972 +      hardcode_libdir_flag_spec='-L$libdir'
37973 +      hardcode_shlibpath_var=no
37974 +      ;;
37975 +
37976 +    *)
37977 +      ld_shlibs=no
37978 +      ;;
37979 +    esac
37980 +  fi
37981 +
37982 +echo "$as_me:$LINENO: result: $ld_shlibs" >&5
37983 +echo "${ECHO_T}$ld_shlibs" >&6
37984 +test "$ld_shlibs" = no && can_build_shared=no
37985 +
37986 +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
37987 +if test "$GCC" = yes; then
37988 +  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
37989 +fi
37990 +
37991 +#
37992 +# Do we need to explicitly link libc?
37993 +#
37994 +case "x$archive_cmds_need_lc" in
37995 +x|xyes)
37996 +  # Assume -lc should be added
37997 +  archive_cmds_need_lc=yes
37998 +
37999 +  if test "$enable_shared" = yes && test "$GCC" = yes; then
38000 +    case $archive_cmds in
38001 +    *'~'*)
38002 +      # FIXME: we may have to deal with multi-command sequences.
38003 +      ;;
38004 +    '$CC '*)
38005 +      # Test whether the compiler implicitly links with -lc since on some
38006 +      # systems, -lgcc has to come before -lc. If gcc already passes -lc
38007 +      # to ld, don't add -lc before -lgcc.
38008 +      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
38009 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
38010 +      $rm conftest*
38011 +      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
38012 +
38013 +      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
38014 +  (eval $ac_compile) 2>&5
38015 +  ac_status=$?
38016 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
38017 +  (exit $ac_status); } 2>conftest.err; then
38018 +        soname=conftest
38019 +        lib=conftest
38020 +        libobjs=conftest.$ac_objext
38021 +        deplibs=
38022 +        wl=$lt_prog_compiler_wl
38023 +        compiler_flags=-v
38024 +        linker_flags=-v
38025 +        verstring=
38026 +        output_objdir=.
38027 +        libname=conftest
38028 +        lt_save_allow_undefined_flag=$allow_undefined_flag
38029 +        allow_undefined_flag=
38030 +        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
38031 +  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
38032 +  ac_status=$?
38033 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
38034 +  (exit $ac_status); }
38035 +        then
38036 +         archive_cmds_need_lc=no
38037 +        else
38038 +         archive_cmds_need_lc=yes
38039 +        fi
38040 +        allow_undefined_flag=$lt_save_allow_undefined_flag
38041 +      else
38042 +        cat conftest.err 1>&5
38043 +      fi
38044 +      $rm conftest*
38045 +      echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
38046 +echo "${ECHO_T}$archive_cmds_need_lc" >&6
38047 +      ;;
38048 +    esac
38049 +  fi
38050 +  ;;
38051 +esac
38052 +
38053 +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
38054 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
38055 +library_names_spec=
38056 +libname_spec='lib$name'
38057 +soname_spec=
38058 +shrext_cmds=".so"
38059 +postinstall_cmds=
38060 +postuninstall_cmds=
38061 +finish_cmds=
38062 +finish_eval=
38063 +shlibpath_var=
38064 +shlibpath_overrides_runpath=unknown
38065 +version_type=none
38066 +dynamic_linker="$host_os ld.so"
38067 +sys_lib_dlsearch_path_spec="/lib /usr/lib"
38068 +if test "$GCC" = yes; then
38069 +  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
38070 +  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
38071 +    # if the path contains ";" then we assume it to be the separator
38072 +    # otherwise default to the standard path separator (i.e. ":") - it is
38073 +    # assumed that no part of a normal pathname contains ";" but that should
38074 +    # okay in the real world where ";" in dirpaths is itself problematic.
38075 +    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
38076 +  else
38077 +    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
38078 +  fi
38079 +else
38080 +  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
38081 +fi
38082 +need_lib_prefix=unknown
38083 +hardcode_into_libs=no
38084 +
38085 +# when you set need_version to no, make sure it does not cause -set_version
38086 +# flags to be left without arguments
38087 +need_version=unknown
38088 +
38089 +case $host_os in
38090 +aix3*)
38091 +  version_type=linux
38092 +  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
38093 +  shlibpath_var=LIBPATH
38094 +
38095 +  # AIX 3 has no versioning support, so we append a major version to the name.
38096 +  soname_spec='${libname}${release}${shared_ext}$major'
38097 +  ;;
38098 +
38099 +aix4* | aix5*)
38100 +  version_type=linux
38101 +  need_lib_prefix=no
38102 +  need_version=no
38103 +  hardcode_into_libs=yes
38104 +  if test "$host_cpu" = ia64; then
38105 +    # AIX 5 supports IA64
38106 +    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
38107 +    shlibpath_var=LD_LIBRARY_PATH
38108 +  else
38109 +    # With GCC up to 2.95.x, collect2 would create an import file
38110 +    # for dependence libraries.  The import file would start with
38111 +    # the line `#! .'.  This would cause the generated library to
38112 +    # depend on `.', always an invalid library.  This was fixed in
38113 +    # development snapshots of GCC prior to 3.0.
38114 +    case $host_os in
38115 +      aix4 | aix4.[01] | aix4.[01].*)
38116 +      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
38117 +          echo ' yes '
38118 +          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
38119 +       :
38120 +      else
38121 +       can_build_shared=no
38122 +      fi
38123 +      ;;
38124 +    esac
38125 +    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
38126 +    # soname into executable. Probably we can add versioning support to
38127 +    # collect2, so additional links can be useful in future.
38128 +    if test "$aix_use_runtimelinking" = yes; then
38129 +      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
38130 +      # instead of lib<name>.a to let people know that these are not
38131 +      # typical AIX shared libraries.
38132 +      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38133 +    else
38134 +      # We preserve .a as extension for shared libraries through AIX4.2
38135 +      # and later when we are not doing run time linking.
38136 +      library_names_spec='${libname}${release}.a $libname.a'
38137 +      soname_spec='${libname}${release}${shared_ext}$major'
38138 +    fi
38139 +    shlibpath_var=LIBPATH
38140 +  fi
38141 +  ;;
38142 +
38143 +amigaos*)
38144 +  library_names_spec='$libname.ixlibrary $libname.a'
38145 +  # Create ${libname}_ixlibrary.a entries in /sys/libs.
38146 +  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
38147 +  ;;
38148 +
38149 +beos*)
38150 +  library_names_spec='${libname}${shared_ext}'
38151 +  dynamic_linker="$host_os ld.so"
38152 +  shlibpath_var=LIBRARY_PATH
38153 +  ;;
38154 +
38155 +bsdi[45]*)
38156 +  version_type=linux
38157 +  need_version=no
38158 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38159 +  soname_spec='${libname}${release}${shared_ext}$major'
38160 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
38161 +  shlibpath_var=LD_LIBRARY_PATH
38162 +  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
38163 +  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
38164 +  # the default ld.so.conf also contains /usr/contrib/lib and
38165 +  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
38166 +  # libtool to hard-code these into programs
38167 +  ;;
38168 +
38169 +cygwin* | mingw* | pw32*)
38170 +  version_type=windows
38171 +  shrext_cmds=".dll"
38172 +  need_version=no
38173 +  need_lib_prefix=no
38174 +
38175 +  case $GCC,$host_os in
38176 +  yes,cygwin* | yes,mingw* | yes,pw32*)
38177 +    library_names_spec='$libname.dll.a'
38178 +    # DLL is installed to $(libdir)/../bin by postinstall_cmds
38179 +    postinstall_cmds='base_file=`basename \${file}`~
38180 +      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
38181 +      dldir=$destdir/`dirname \$dlpath`~
38182 +      test -d \$dldir || mkdir -p \$dldir~
38183 +      $install_prog $dir/$dlname \$dldir/$dlname'
38184 +    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
38185 +      dlpath=$dir/\$dldll~
38186 +       $rm \$dlpath'
38187 +    shlibpath_overrides_runpath=yes
38188 +
38189 +    case $host_os in
38190 +    cygwin*)
38191 +      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
38192 +      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
38193 +      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
38194 +      ;;
38195 +    mingw*)
38196 +      # MinGW DLLs use traditional 'lib' prefix
38197 +      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
38198 +      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
38199 +      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
38200 +        # It is most probably a Windows format PATH printed by
38201 +        # mingw gcc, but we are running on Cygwin. Gcc prints its search
38202 +        # path with ; separators, and with drive letters. We can handle the
38203 +        # drive letters (cygwin fileutils understands them), so leave them,
38204 +        # especially as we might pass files found there to a mingw objdump,
38205 +        # which wouldn't understand a cygwinified path. Ahh.
38206 +        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
38207 +      else
38208 +        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
38209 +      fi
38210 +      ;;
38211 +    pw32*)
38212 +      # pw32 DLLs use 'pw' prefix rather than 'lib'
38213 +      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
38214 +      ;;
38215 +    esac
38216 +    ;;
38217 +
38218 +  *)
38219 +    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
38220 +    ;;
38221 +  esac
38222 +  dynamic_linker='Win32 ld.exe'
38223 +  # FIXME: first we should search . and the directory the executable is in
38224 +  shlibpath_var=PATH
38225 +  ;;
38226 +
38227 +darwin* | rhapsody*)
38228 +  dynamic_linker="$host_os dyld"
38229 +  version_type=darwin
38230 +  need_lib_prefix=no
38231 +  need_version=no
38232 +  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
38233 +  soname_spec='${libname}${release}${major}$shared_ext'
38234 +  shlibpath_overrides_runpath=yes
38235 +  shlibpath_var=DYLD_LIBRARY_PATH
38236 +  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
38237 +  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
38238 +  if test "$GCC" = yes; then
38239 +    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
38240 +  else
38241 +    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
38242 +  fi
38243 +  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
38244 +  ;;
38245 +
38246 +dgux*)
38247 +  version_type=linux
38248 +  need_lib_prefix=no
38249 +  need_version=no
38250 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
38251 +  soname_spec='${libname}${release}${shared_ext}$major'
38252 +  shlibpath_var=LD_LIBRARY_PATH
38253 +  ;;
38254 +
38255 +freebsd1*)
38256 +  dynamic_linker=no
38257 +  ;;
38258 +
38259 +kfreebsd*-gnu)
38260 +  version_type=linux
38261 +  need_lib_prefix=no
38262 +  need_version=no
38263 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
38264 +  soname_spec='${libname}${release}${shared_ext}$major'
38265 +  shlibpath_var=LD_LIBRARY_PATH
38266 +  shlibpath_overrides_runpath=no
38267 +  hardcode_into_libs=yes
38268 +  dynamic_linker='GNU ld.so'
38269 +  ;;
38270 +
38271 +freebsd* | dragonfly*)
38272 +  # DragonFly does not have aout.  When/if they implement a new
38273 +  # versioning mechanism, adjust this.
38274 +  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
38275 +  version_type=freebsd-$objformat
38276 +  case $version_type in
38277 +    freebsd-elf*)
38278 +      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
38279 +      need_version=no
38280 +      need_lib_prefix=no
38281 +      ;;
38282 +    freebsd-*)
38283 +      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
38284 +      need_version=yes
38285 +      ;;
38286 +  esac
38287 +  shlibpath_var=LD_LIBRARY_PATH
38288 +  case $host_os in
38289 +  freebsd2*)
38290 +    shlibpath_overrides_runpath=yes
38291 +    ;;
38292 +  freebsd3.[01]* | freebsdelf3.[01]*)
38293 +    shlibpath_overrides_runpath=yes
38294 +    hardcode_into_libs=yes
38295 +    ;;
38296 +  *) # from 3.2 on
38297 +    shlibpath_overrides_runpath=no
38298 +    hardcode_into_libs=yes
38299 +    ;;
38300 +  esac
38301 +  ;;
38302 +
38303 +gnu*)
38304 +  version_type=linux
38305 +  need_lib_prefix=no
38306 +  need_version=no
38307 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
38308 +  soname_spec='${libname}${release}${shared_ext}$major'
38309 +  shlibpath_var=LD_LIBRARY_PATH
38310 +  hardcode_into_libs=yes
38311 +  ;;
38312 +
38313 +hpux9* | hpux10* | hpux11*)
38314 +  # Give a soname corresponding to the major version so that dld.sl refuses to
38315 +  # link against other versions.
38316 +  version_type=sunos
38317 +  need_lib_prefix=no
38318 +  need_version=no
38319 +  case "$host_cpu" in
38320 +  ia64*)
38321 +    shrext_cmds='.so'
38322 +    hardcode_into_libs=yes
38323 +    dynamic_linker="$host_os dld.so"
38324 +    shlibpath_var=LD_LIBRARY_PATH
38325 +    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
38326 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38327 +    soname_spec='${libname}${release}${shared_ext}$major'
38328 +    if test "X$HPUX_IA64_MODE" = X32; then
38329 +      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
38330 +    else
38331 +      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
38332 +    fi
38333 +    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
38334 +    ;;
38335 +   hppa*64*)
38336 +     shrext_cmds='.sl'
38337 +     hardcode_into_libs=yes
38338 +     dynamic_linker="$host_os dld.sl"
38339 +     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
38340 +     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
38341 +     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38342 +     soname_spec='${libname}${release}${shared_ext}$major'
38343 +     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
38344 +     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
38345 +     ;;
38346 +   *)
38347 +    shrext_cmds='.sl'
38348 +    dynamic_linker="$host_os dld.sl"
38349 +    shlibpath_var=SHLIB_PATH
38350 +    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
38351 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38352 +    soname_spec='${libname}${release}${shared_ext}$major'
38353 +    ;;
38354 +  esac
38355 +  # HP-UX runs *really* slowly unless shared libraries are mode 555.
38356 +  postinstall_cmds='chmod 555 $lib'
38357 +  ;;
38358 +
38359 +irix5* | irix6* | nonstopux*)
38360 +  case $host_os in
38361 +    nonstopux*) version_type=nonstopux ;;
38362 +    *)
38363 +       if test "$lt_cv_prog_gnu_ld" = yes; then
38364 +               version_type=linux
38365 +       else
38366 +               version_type=irix
38367 +       fi ;;
38368 +  esac
38369 +  need_lib_prefix=no
38370 +  need_version=no
38371 +  soname_spec='${libname}${release}${shared_ext}$major'
38372 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
38373 +  case $host_os in
38374 +  irix5* | nonstopux*)
38375 +    libsuff= shlibsuff=
38376 +    ;;
38377 +  *)
38378 +    case $LD in # libtool.m4 will add one of these switches to LD
38379 +    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
38380 +      libsuff= shlibsuff= libmagic=32-bit;;
38381 +    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
38382 +      libsuff=32 shlibsuff=N32 libmagic=N32;;
38383 +    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
38384 +      libsuff=64 shlibsuff=64 libmagic=64-bit;;
38385 +    *) libsuff= shlibsuff= libmagic=never-match;;
38386 +    esac
38387 +    ;;
38388 +  esac
38389 +  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
38390 +  shlibpath_overrides_runpath=no
38391 +  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
38392 +  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
38393 +  hardcode_into_libs=yes
38394 +  ;;
38395 +
38396 +# No shared lib support for Linux oldld, aout, or coff.
38397 +linux*oldld* | linux*aout* | linux*coff*)
38398 +  dynamic_linker=no
38399 +  ;;
38400 +
38401 +# This must be Linux ELF.
38402 +linux*)
38403 +  version_type=linux
38404 +  need_lib_prefix=no
38405 +  need_version=no
38406 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38407 +  soname_spec='${libname}${release}${shared_ext}$major'
38408 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
38409 +  shlibpath_var=LD_LIBRARY_PATH
38410 +  shlibpath_overrides_runpath=no
38411 +  # This implies no fast_install, which is unacceptable.
38412 +  # Some rework will be needed to allow for fast_install
38413 +  # before this can be enabled.
38414 +  hardcode_into_libs=yes
38415 +
38416 +  # Append ld.so.conf contents to the search path
38417 +  if test -f /etc/ld.so.conf; then
38418 +    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
38419 +    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
38420 +  fi
38421 +
38422 +  # We used to test for /lib/ld.so.1 and disable shared libraries on
38423 +  # powerpc, because MkLinux only supported shared libraries with the
38424 +  # GNU dynamic linker.  Since this was broken with cross compilers,
38425 +  # most powerpc-linux boxes support dynamic linking these days and
38426 +  # people can always --disable-shared, the test was removed, and we
38427 +  # assume the GNU/Linux dynamic linker is in use.
38428 +  dynamic_linker='GNU/Linux ld.so'
38429 +  ;;
38430 +
38431 +knetbsd*-gnu)
38432 +  version_type=linux
38433 +  need_lib_prefix=no
38434 +  need_version=no
38435 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
38436 +  soname_spec='${libname}${release}${shared_ext}$major'
38437 +  shlibpath_var=LD_LIBRARY_PATH
38438 +  shlibpath_overrides_runpath=no
38439 +  hardcode_into_libs=yes
38440 +  dynamic_linker='GNU ld.so'
38441 +  ;;
38442 +
38443 +netbsd*)
38444 +  version_type=sunos
38445 +  need_lib_prefix=no
38446 +  need_version=no
38447 +  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
38448 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
38449 +    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
38450 +    dynamic_linker='NetBSD (a.out) ld.so'
38451 +  else
38452 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
38453 +    soname_spec='${libname}${release}${shared_ext}$major'
38454 +    dynamic_linker='NetBSD ld.elf_so'
38455 +  fi
38456 +  shlibpath_var=LD_LIBRARY_PATH
38457 +  shlibpath_overrides_runpath=yes
38458 +  hardcode_into_libs=yes
38459 +  ;;
38460 +
38461 +newsos6)
38462 +  version_type=linux
38463 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38464 +  shlibpath_var=LD_LIBRARY_PATH
38465 +  shlibpath_overrides_runpath=yes
38466 +  ;;
38467 +
38468 +nto-qnx*)
38469 +  version_type=linux
38470 +  need_lib_prefix=no
38471 +  need_version=no
38472 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38473 +  soname_spec='${libname}${release}${shared_ext}$major'
38474 +  shlibpath_var=LD_LIBRARY_PATH
38475 +  shlibpath_overrides_runpath=yes
38476 +  ;;
38477 +
38478 +openbsd*)
38479 +  version_type=sunos
38480 +  need_lib_prefix=no
38481 +  need_version=no
38482 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
38483 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
38484 +  shlibpath_var=LD_LIBRARY_PATH
38485 +  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
38486 +    case $host_os in
38487 +      openbsd2.[89] | openbsd2.[89].*)
38488 +       shlibpath_overrides_runpath=no
38489 +       ;;
38490 +      *)
38491 +       shlibpath_overrides_runpath=yes
38492 +       ;;
38493 +      esac
38494 +  else
38495 +    shlibpath_overrides_runpath=yes
38496 +  fi
38497 +  ;;
38498 +
38499 +os2*)
38500 +  libname_spec='$name'
38501 +  shrext_cmds=".dll"
38502 +  need_lib_prefix=no
38503 +  library_names_spec='$libname${shared_ext} $libname.a'
38504 +  dynamic_linker='OS/2 ld.exe'
38505 +  shlibpath_var=LIBPATH
38506 +  ;;
38507 +
38508 +osf3* | osf4* | osf5*)
38509 +  version_type=osf
38510 +  need_lib_prefix=no
38511 +  need_version=no
38512 +  soname_spec='${libname}${release}${shared_ext}$major'
38513 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38514 +  shlibpath_var=LD_LIBRARY_PATH
38515 +  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
38516 +  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
38517 +  ;;
38518 +
38519 +sco3.2v5*)
38520 +  version_type=osf
38521 +  soname_spec='${libname}${release}${shared_ext}$major'
38522 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38523 +  shlibpath_var=LD_LIBRARY_PATH
38524 +  ;;
38525 +
38526 +solaris*)
38527 +  version_type=linux
38528 +  need_lib_prefix=no
38529 +  need_version=no
38530 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38531 +  soname_spec='${libname}${release}${shared_ext}$major'
38532 +  shlibpath_var=LD_LIBRARY_PATH
38533 +  shlibpath_overrides_runpath=yes
38534 +  hardcode_into_libs=yes
38535 +  # ldd complains unless libraries are executable
38536 +  postinstall_cmds='chmod +x $lib'
38537 +  ;;
38538 +
38539 +sunos4*)
38540 +  version_type=sunos
38541 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
38542 +  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
38543 +  shlibpath_var=LD_LIBRARY_PATH
38544 +  shlibpath_overrides_runpath=yes
38545 +  if test "$with_gnu_ld" = yes; then
38546 +    need_lib_prefix=no
38547 +  fi
38548 +  need_version=yes
38549 +  ;;
38550 +
38551 +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
38552 +  version_type=linux
38553 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38554 +  soname_spec='${libname}${release}${shared_ext}$major'
38555 +  shlibpath_var=LD_LIBRARY_PATH
38556 +  case $host_vendor in
38557 +    sni)
38558 +      shlibpath_overrides_runpath=no
38559 +      need_lib_prefix=no
38560 +      export_dynamic_flag_spec='${wl}-Blargedynsym'
38561 +      runpath_var=LD_RUN_PATH
38562 +      ;;
38563 +    siemens)
38564 +      need_lib_prefix=no
38565 +      ;;
38566 +    motorola)
38567 +      need_lib_prefix=no
38568 +      need_version=no
38569 +      shlibpath_overrides_runpath=no
38570 +      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
38571 +      ;;
38572 +  esac
38573 +  ;;
38574 +
38575 +sysv4*MP*)
38576 +  if test -d /usr/nec ;then
38577 +    version_type=linux
38578 +    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
38579 +    soname_spec='$libname${shared_ext}.$major'
38580 +    shlibpath_var=LD_LIBRARY_PATH
38581 +  fi
38582 +  ;;
38583 +
38584 +uts4*)
38585 +  version_type=linux
38586 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38587 +  soname_spec='${libname}${release}${shared_ext}$major'
38588 +  shlibpath_var=LD_LIBRARY_PATH
38589 +  ;;
38590 +
38591 +*)
38592 +  dynamic_linker=no
38593 +  ;;
38594 +esac
38595 +echo "$as_me:$LINENO: result: $dynamic_linker" >&5
38596 +echo "${ECHO_T}$dynamic_linker" >&6
38597 +test "$dynamic_linker" = no && can_build_shared=no
38598 +
38599 +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
38600 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
38601 +hardcode_action=
38602 +if test -n "$hardcode_libdir_flag_spec" || \
38603 +   test -n "$runpath_var" || \
38604 +   test "X$hardcode_automatic" = "Xyes" ; then
38605 +
38606 +  # We can hardcode non-existant directories.
38607 +  if test "$hardcode_direct" != no &&
38608 +     # If the only mechanism to avoid hardcoding is shlibpath_var, we
38609 +     # have to relink, otherwise we might link with an installed library
38610 +     # when we should be linking with a yet-to-be-installed one
38611 +     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
38612 +     test "$hardcode_minus_L" != no; then
38613 +    # Linking always hardcodes the temporary library directory.
38614 +    hardcode_action=relink
38615 +  else
38616 +    # We can link without hardcoding, and we can hardcode nonexisting dirs.
38617 +    hardcode_action=immediate
38618 +  fi
38619 +else
38620 +  # We cannot hardcode anything, or else we can only hardcode existing
38621 +  # directories.
38622 +  hardcode_action=unsupported
38623 +fi
38624 +echo "$as_me:$LINENO: result: $hardcode_action" >&5
38625 +echo "${ECHO_T}$hardcode_action" >&6
38626 +
38627 +if test "$hardcode_action" = relink; then
38628 +  # Fast installation is not supported
38629 +  enable_fast_install=no
38630 +elif test "$shlibpath_overrides_runpath" = yes ||
38631 +     test "$enable_shared" = no; then
38632 +  # Fast installation is not necessary
38633 +  enable_fast_install=needless
38634 +fi
38635 +
38636 +striplib=
38637 +old_striplib=
38638 +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
38639 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
38640 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
38641 +  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
38642 +  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
38643 +  echo "$as_me:$LINENO: result: yes" >&5
38644 +echo "${ECHO_T}yes" >&6
38645 +else
38646 +# FIXME - insert some real tests, host_os isn't really good enough
38647 +  case $host_os in
38648 +   darwin*)
38649 +       if test -n "$STRIP" ; then
38650 +         striplib="$STRIP -x"
38651 +         echo "$as_me:$LINENO: result: yes" >&5
38652 +echo "${ECHO_T}yes" >&6
38653 +       else
38654 +  echo "$as_me:$LINENO: result: no" >&5
38655 +echo "${ECHO_T}no" >&6
38656 +fi
38657 +       ;;
38658 +   *)
38659 +  echo "$as_me:$LINENO: result: no" >&5
38660 +echo "${ECHO_T}no" >&6
38661 +    ;;
38662 +  esac
38663 +fi
38664 +
38665 +if test "x$enable_dlopen" != xyes; then
38666 +  enable_dlopen=unknown
38667 +  enable_dlopen_self=unknown
38668 +  enable_dlopen_self_static=unknown
38669 +else
38670 +  lt_cv_dlopen=no
38671 +  lt_cv_dlopen_libs=
38672 +
38673 +  case $host_os in
38674 +  beos*)
38675 +    lt_cv_dlopen="load_add_on"
38676 +    lt_cv_dlopen_libs=
38677 +    lt_cv_dlopen_self=yes
38678 +    ;;
38679 +
38680 +  mingw* | pw32*)
38681 +    lt_cv_dlopen="LoadLibrary"
38682 +    lt_cv_dlopen_libs=
38683 +   ;;
38684 +
38685 +  cygwin*)
38686 +    lt_cv_dlopen="dlopen"
38687 +    lt_cv_dlopen_libs=
38688 +   ;;
38689 +
38690 +  darwin*)
38691 +  # if libdl is installed we need to link against it
38692 +    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
38693 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
38694 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then
38695 +  echo $ECHO_N "(cached) $ECHO_C" >&6
38696 +else
38697 +  ac_check_lib_save_LIBS=$LIBS
38698 +LIBS="-ldl  $LIBS"
38699 +cat >conftest.$ac_ext <<_ACEOF
38700 +/* confdefs.h.  */
38701 +_ACEOF
38702 +cat confdefs.h >>conftest.$ac_ext
38703 +cat >>conftest.$ac_ext <<_ACEOF
38704 +/* end confdefs.h.  */
38705 +
38706 +/* Override any gcc2 internal prototype to avoid an error.  */
38707 +#ifdef __cplusplus
38708 +extern "C"
38709 +#endif
38710 +/* We use char because int might match the return type of a gcc2
38711 +   builtin and then its argument prototype would still apply.  */
38712 +char dlopen ();
38713 +int
38714 +main ()
38715 +{
38716 +dlopen ();
38717 +  ;
38718 +  return 0;
38719 +}
38720 +_ACEOF
38721 +rm -f conftest.$ac_objext conftest$ac_exeext
38722 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38723 +  (eval $ac_link) 2>conftest.er1
38724 +  ac_status=$?
38725 +  grep -v '^ *+' conftest.er1 >conftest.err
38726 +  rm -f conftest.er1
38727 +  cat conftest.err >&5
38728 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
38729 +  (exit $ac_status); } &&
38730 +        { ac_try='test -z "$ac_c_werror_flag"
38731 +                        || test ! -s conftest.err'
38732 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38733 +  (eval $ac_try) 2>&5
38734 +  ac_status=$?
38735 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
38736 +  (exit $ac_status); }; } &&
38737 +        { ac_try='test -s conftest$ac_exeext'
38738 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38739 +  (eval $ac_try) 2>&5
38740 +  ac_status=$?
38741 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
38742 +  (exit $ac_status); }; }; then
38743 +  ac_cv_lib_dl_dlopen=yes
38744 +else
38745 +  echo "$as_me: failed program was:" >&5
38746 +sed 's/^/| /' conftest.$ac_ext >&5
38747 +
38748 +ac_cv_lib_dl_dlopen=no
38749 +fi
38750 +rm -f conftest.err conftest.$ac_objext \
38751 +      conftest$ac_exeext conftest.$ac_ext
38752 +LIBS=$ac_check_lib_save_LIBS
38753 +fi
38754 +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
38755 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
38756 +if test $ac_cv_lib_dl_dlopen = yes; then
38757 +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
38758 +else
38759 +
38760 +    lt_cv_dlopen="dyld"
38761 +    lt_cv_dlopen_libs=
38762 +    lt_cv_dlopen_self=yes
38763 +
38764 +fi
38765 +
38766 +   ;;
38767 +
38768 +  *)
38769 +    echo "$as_me:$LINENO: checking for shl_load" >&5
38770 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
38771 +if test "${ac_cv_func_shl_load+set}" = set; then
38772 +  echo $ECHO_N "(cached) $ECHO_C" >&6
38773 +else
38774 +  cat >conftest.$ac_ext <<_ACEOF
38775 +/* confdefs.h.  */
38776 +_ACEOF
38777 +cat confdefs.h >>conftest.$ac_ext
38778 +cat >>conftest.$ac_ext <<_ACEOF
38779 +/* end confdefs.h.  */
38780 +/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
38781 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38782 +#define shl_load innocuous_shl_load
38783 +
38784 +/* System header to define __stub macros and hopefully few prototypes,
38785 +    which can conflict with char shl_load (); below.
38786 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38787 +    <limits.h> exists even on freestanding compilers.  */
38788 +
38789 +#ifdef __STDC__
38790 +# include <limits.h>
38791 +#else
38792 +# include <assert.h>
38793 +#endif
38794 +
38795 +#undef shl_load
38796 +
38797 +/* Override any gcc2 internal prototype to avoid an error.  */
38798 +#ifdef __cplusplus
38799 +extern "C"
38800 +{
38801 +#endif
38802 +/* We use char because int might match the return type of a gcc2
38803 +   builtin and then its argument prototype would still apply.  */
38804 +char shl_load ();
38805 +/* The GNU C library defines this for functions which it implements
38806 +    to always fail with ENOSYS.  Some functions are actually named
38807 +    something starting with __ and the normal name is an alias.  */
38808 +#if defined (__stub_shl_load) || defined (__stub___shl_load)
38809 +choke me
38810 +#else
38811 +char (*f) () = shl_load;
38812 +#endif
38813 +#ifdef __cplusplus
38814 +}
38815 +#endif
38816 +
38817 +int
38818 +main ()
38819 +{
38820 +return f != shl_load;
38821 +  ;
38822 +  return 0;
38823 +}
38824 +_ACEOF
38825 +rm -f conftest.$ac_objext conftest$ac_exeext
38826 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38827 +  (eval $ac_link) 2>conftest.er1
38828 +  ac_status=$?
38829 +  grep -v '^ *+' conftest.er1 >conftest.err
38830 +  rm -f conftest.er1
38831 +  cat conftest.err >&5
38832 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
38833 +  (exit $ac_status); } &&
38834 +        { ac_try='test -z "$ac_c_werror_flag"
38835 +                        || test ! -s conftest.err'
38836 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38837 +  (eval $ac_try) 2>&5
38838 +  ac_status=$?
38839 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
38840 +  (exit $ac_status); }; } &&
38841 +        { ac_try='test -s conftest$ac_exeext'
38842 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38843 +  (eval $ac_try) 2>&5
38844 +  ac_status=$?
38845 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
38846 +  (exit $ac_status); }; }; then
38847 +  ac_cv_func_shl_load=yes
38848 +else
38849 +  echo "$as_me: failed program was:" >&5
38850 +sed 's/^/| /' conftest.$ac_ext >&5
38851 +
38852 +ac_cv_func_shl_load=no
38853 +fi
38854 +rm -f conftest.err conftest.$ac_objext \
38855 +      conftest$ac_exeext conftest.$ac_ext
38856 +fi
38857 +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
38858 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6
38859 +if test $ac_cv_func_shl_load = yes; then
38860 +  lt_cv_dlopen="shl_load"
38861 +else
38862 +  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
38863 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
38864 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then
38865 +  echo $ECHO_N "(cached) $ECHO_C" >&6
38866 +else
38867 +  ac_check_lib_save_LIBS=$LIBS
38868 +LIBS="-ldld  $LIBS"
38869 +cat >conftest.$ac_ext <<_ACEOF
38870 +/* confdefs.h.  */
38871 +_ACEOF
38872 +cat confdefs.h >>conftest.$ac_ext
38873 +cat >>conftest.$ac_ext <<_ACEOF
38874 +/* end confdefs.h.  */
38875 +
38876 +/* Override any gcc2 internal prototype to avoid an error.  */
38877 +#ifdef __cplusplus
38878 +extern "C"
38879 +#endif
38880 +/* We use char because int might match the return type of a gcc2
38881 +   builtin and then its argument prototype would still apply.  */
38882 +char shl_load ();
38883 +int
38884 +main ()
38885 +{
38886 +shl_load ();
38887 +  ;
38888 +  return 0;
38889 +}
38890 +_ACEOF
38891 +rm -f conftest.$ac_objext conftest$ac_exeext
38892 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38893 +  (eval $ac_link) 2>conftest.er1
38894 +  ac_status=$?
38895 +  grep -v '^ *+' conftest.er1 >conftest.err
38896 +  rm -f conftest.er1
38897 +  cat conftest.err >&5
38898 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
38899 +  (exit $ac_status); } &&
38900 +        { ac_try='test -z "$ac_c_werror_flag"
38901 +                        || test ! -s conftest.err'
38902 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38903 +  (eval $ac_try) 2>&5
38904 +  ac_status=$?
38905 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
38906 +  (exit $ac_status); }; } &&
38907 +        { ac_try='test -s conftest$ac_exeext'
38908 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38909 +  (eval $ac_try) 2>&5
38910 +  ac_status=$?
38911 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
38912 +  (exit $ac_status); }; }; then
38913 +  ac_cv_lib_dld_shl_load=yes
38914 +else
38915 +  echo "$as_me: failed program was:" >&5
38916 +sed 's/^/| /' conftest.$ac_ext >&5
38917 +
38918 +ac_cv_lib_dld_shl_load=no
38919 +fi
38920 +rm -f conftest.err conftest.$ac_objext \
38921 +      conftest$ac_exeext conftest.$ac_ext
38922 +LIBS=$ac_check_lib_save_LIBS
38923 +fi
38924 +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
38925 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
38926 +if test $ac_cv_lib_dld_shl_load = yes; then
38927 +  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
38928 +else
38929 +  echo "$as_me:$LINENO: checking for dlopen" >&5
38930 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
38931 +if test "${ac_cv_func_dlopen+set}" = set; then
38932 +  echo $ECHO_N "(cached) $ECHO_C" >&6
38933 +else
38934 +  cat >conftest.$ac_ext <<_ACEOF
38935 +/* confdefs.h.  */
38936 +_ACEOF
38937 +cat confdefs.h >>conftest.$ac_ext
38938 +cat >>conftest.$ac_ext <<_ACEOF
38939 +/* end confdefs.h.  */
38940 +/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
38941 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38942 +#define dlopen innocuous_dlopen
38943 +
38944 +/* System header to define __stub macros and hopefully few prototypes,
38945 +    which can conflict with char dlopen (); below.
38946 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38947 +    <limits.h> exists even on freestanding compilers.  */
38948 +
38949 +#ifdef __STDC__
38950 +# include <limits.h>
38951 +#else
38952 +# include <assert.h>
38953 +#endif
38954 +
38955 +#undef dlopen
38956 +
38957 +/* Override any gcc2 internal prototype to avoid an error.  */
38958 +#ifdef __cplusplus
38959 +extern "C"
38960 +{
38961 +#endif
38962 +/* We use char because int might match the return type of a gcc2
38963 +   builtin and then its argument prototype would still apply.  */
38964 +char dlopen ();
38965 +/* The GNU C library defines this for functions which it implements
38966 +    to always fail with ENOSYS.  Some functions are actually named
38967 +    something starting with __ and the normal name is an alias.  */
38968 +#if defined (__stub_dlopen) || defined (__stub___dlopen)
38969 +choke me
38970 +#else
38971 +char (*f) () = dlopen;
38972 +#endif
38973 +#ifdef __cplusplus
38974 +}
38975 +#endif
38976 +
38977 +int
38978 +main ()
38979 +{
38980 +return f != dlopen;
38981 +  ;
38982 +  return 0;
38983 +}
38984 +_ACEOF
38985 +rm -f conftest.$ac_objext conftest$ac_exeext
38986 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38987 +  (eval $ac_link) 2>conftest.er1
38988 +  ac_status=$?
38989 +  grep -v '^ *+' conftest.er1 >conftest.err
38990 +  rm -f conftest.er1
38991 +  cat conftest.err >&5
38992 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
38993 +  (exit $ac_status); } &&
38994 +        { ac_try='test -z "$ac_c_werror_flag"
38995 +                        || test ! -s conftest.err'
38996 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38997 +  (eval $ac_try) 2>&5
38998 +  ac_status=$?
38999 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
39000 +  (exit $ac_status); }; } &&
39001 +        { ac_try='test -s conftest$ac_exeext'
39002 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39003 +  (eval $ac_try) 2>&5
39004 +  ac_status=$?
39005 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
39006 +  (exit $ac_status); }; }; then
39007 +  ac_cv_func_dlopen=yes
39008 +else
39009 +  echo "$as_me: failed program was:" >&5
39010 +sed 's/^/| /' conftest.$ac_ext >&5
39011 +
39012 +ac_cv_func_dlopen=no
39013 +fi
39014 +rm -f conftest.err conftest.$ac_objext \
39015 +      conftest$ac_exeext conftest.$ac_ext
39016 +fi
39017 +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
39018 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6
39019 +if test $ac_cv_func_dlopen = yes; then
39020 +  lt_cv_dlopen="dlopen"
39021 +else
39022 +  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
39023 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
39024 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then
39025 +  echo $ECHO_N "(cached) $ECHO_C" >&6
39026 +else
39027 +  ac_check_lib_save_LIBS=$LIBS
39028 +LIBS="-ldl  $LIBS"
39029 +cat >conftest.$ac_ext <<_ACEOF
39030 +/* confdefs.h.  */
39031 +_ACEOF
39032 +cat confdefs.h >>conftest.$ac_ext
39033 +cat >>conftest.$ac_ext <<_ACEOF
39034 +/* end confdefs.h.  */
39035 +
39036 +/* Override any gcc2 internal prototype to avoid an error.  */
39037 +#ifdef __cplusplus
39038 +extern "C"
39039 +#endif
39040 +/* We use char because int might match the return type of a gcc2
39041 +   builtin and then its argument prototype would still apply.  */
39042 +char dlopen ();
39043 +int
39044 +main ()
39045 +{
39046 +dlopen ();
39047 +  ;
39048 +  return 0;
39049 +}
39050 +_ACEOF
39051 +rm -f conftest.$ac_objext conftest$ac_exeext
39052 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39053 +  (eval $ac_link) 2>conftest.er1
39054 +  ac_status=$?
39055 +  grep -v '^ *+' conftest.er1 >conftest.err
39056 +  rm -f conftest.er1
39057 +  cat conftest.err >&5
39058 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
39059 +  (exit $ac_status); } &&
39060 +        { ac_try='test -z "$ac_c_werror_flag"
39061 +                        || test ! -s conftest.err'
39062 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39063 +  (eval $ac_try) 2>&5
39064 +  ac_status=$?
39065 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
39066 +  (exit $ac_status); }; } &&
39067 +        { ac_try='test -s conftest$ac_exeext'
39068 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39069 +  (eval $ac_try) 2>&5
39070 +  ac_status=$?
39071 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
39072 +  (exit $ac_status); }; }; then
39073 +  ac_cv_lib_dl_dlopen=yes
39074 +else
39075 +  echo "$as_me: failed program was:" >&5
39076 +sed 's/^/| /' conftest.$ac_ext >&5
39077 +
39078 +ac_cv_lib_dl_dlopen=no
39079 +fi
39080 +rm -f conftest.err conftest.$ac_objext \
39081 +      conftest$ac_exeext conftest.$ac_ext
39082 +LIBS=$ac_check_lib_save_LIBS
39083 +fi
39084 +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
39085 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
39086 +if test $ac_cv_lib_dl_dlopen = yes; then
39087 +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
39088 +else
39089 +  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
39090 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
39091 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then
39092 +  echo $ECHO_N "(cached) $ECHO_C" >&6
39093 +else
39094 +  ac_check_lib_save_LIBS=$LIBS
39095 +LIBS="-lsvld  $LIBS"
39096 +cat >conftest.$ac_ext <<_ACEOF
39097 +/* confdefs.h.  */
39098 +_ACEOF
39099 +cat confdefs.h >>conftest.$ac_ext
39100 +cat >>conftest.$ac_ext <<_ACEOF
39101 +/* end confdefs.h.  */
39102 +
39103 +/* Override any gcc2 internal prototype to avoid an error.  */
39104 +#ifdef __cplusplus
39105 +extern "C"
39106 +#endif
39107 +/* We use char because int might match the return type of a gcc2
39108 +   builtin and then its argument prototype would still apply.  */
39109 +char dlopen ();
39110 +int
39111 +main ()
39112 +{
39113 +dlopen ();
39114 +  ;
39115 +  return 0;
39116 +}
39117 +_ACEOF
39118 +rm -f conftest.$ac_objext conftest$ac_exeext
39119 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39120 +  (eval $ac_link) 2>conftest.er1
39121 +  ac_status=$?
39122 +  grep -v '^ *+' conftest.er1 >conftest.err
39123 +  rm -f conftest.er1
39124 +  cat conftest.err >&5
39125 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
39126 +  (exit $ac_status); } &&
39127 +        { ac_try='test -z "$ac_c_werror_flag"
39128 +                        || test ! -s conftest.err'
39129 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39130 +  (eval $ac_try) 2>&5
39131 +  ac_status=$?
39132 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
39133 +  (exit $ac_status); }; } &&
39134 +        { ac_try='test -s conftest$ac_exeext'
39135 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39136 +  (eval $ac_try) 2>&5
39137 +  ac_status=$?
39138 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
39139 +  (exit $ac_status); }; }; then
39140 +  ac_cv_lib_svld_dlopen=yes
39141 +else
39142 +  echo "$as_me: failed program was:" >&5
39143 +sed 's/^/| /' conftest.$ac_ext >&5
39144 +
39145 +ac_cv_lib_svld_dlopen=no
39146 +fi
39147 +rm -f conftest.err conftest.$ac_objext \
39148 +      conftest$ac_exeext conftest.$ac_ext
39149 +LIBS=$ac_check_lib_save_LIBS
39150 +fi
39151 +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
39152 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
39153 +if test $ac_cv_lib_svld_dlopen = yes; then
39154 +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
39155 +else
39156 +  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
39157 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
39158 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then
39159 +  echo $ECHO_N "(cached) $ECHO_C" >&6
39160 +else
39161 +  ac_check_lib_save_LIBS=$LIBS
39162 +LIBS="-ldld  $LIBS"
39163 +cat >conftest.$ac_ext <<_ACEOF
39164 +/* confdefs.h.  */
39165 +_ACEOF
39166 +cat confdefs.h >>conftest.$ac_ext
39167 +cat >>conftest.$ac_ext <<_ACEOF
39168 +/* end confdefs.h.  */
39169 +
39170 +/* Override any gcc2 internal prototype to avoid an error.  */
39171 +#ifdef __cplusplus
39172 +extern "C"
39173 +#endif
39174 +/* We use char because int might match the return type of a gcc2
39175 +   builtin and then its argument prototype would still apply.  */
39176 +char dld_link ();
39177 +int
39178 +main ()
39179 +{
39180 +dld_link ();
39181 +  ;
39182 +  return 0;
39183 +}
39184 +_ACEOF
39185 +rm -f conftest.$ac_objext conftest$ac_exeext
39186 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39187 +  (eval $ac_link) 2>conftest.er1
39188 +  ac_status=$?
39189 +  grep -v '^ *+' conftest.er1 >conftest.err
39190 +  rm -f conftest.er1
39191 +  cat conftest.err >&5
39192 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
39193 +  (exit $ac_status); } &&
39194 +        { ac_try='test -z "$ac_c_werror_flag"
39195 +                        || test ! -s conftest.err'
39196 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39197 +  (eval $ac_try) 2>&5
39198 +  ac_status=$?
39199 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
39200 +  (exit $ac_status); }; } &&
39201 +        { ac_try='test -s conftest$ac_exeext'
39202 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39203 +  (eval $ac_try) 2>&5
39204 +  ac_status=$?
39205 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
39206 +  (exit $ac_status); }; }; then
39207 +  ac_cv_lib_dld_dld_link=yes
39208 +else
39209 +  echo "$as_me: failed program was:" >&5
39210 +sed 's/^/| /' conftest.$ac_ext >&5
39211 +
39212 +ac_cv_lib_dld_dld_link=no
39213 +fi
39214 +rm -f conftest.err conftest.$ac_objext \
39215 +      conftest$ac_exeext conftest.$ac_ext
39216 +LIBS=$ac_check_lib_save_LIBS
39217 +fi
39218 +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
39219 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
39220 +if test $ac_cv_lib_dld_dld_link = yes; then
39221 +  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
39222 +fi
39223 +
39224 +
39225 +fi
39226 +
39227 +
39228 +fi
39229 +
39230 +
39231 +fi
39232 +
39233 +
39234 +fi
39235 +
39236 +
39237 +fi
39238 +
39239 +    ;;
39240 +  esac
39241 +
39242 +  if test "x$lt_cv_dlopen" != xno; then
39243 +    enable_dlopen=yes
39244 +  else
39245 +    enable_dlopen=no
39246 +  fi
39247 +
39248 +  case $lt_cv_dlopen in
39249 +  dlopen)
39250 +    save_CPPFLAGS="$CPPFLAGS"
39251 +    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
39252 +
39253 +    save_LDFLAGS="$LDFLAGS"
39254 +    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
39255 +
39256 +    save_LIBS="$LIBS"
39257 +    LIBS="$lt_cv_dlopen_libs $LIBS"
39258 +
39259 +    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
39260 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
39261 +if test "${lt_cv_dlopen_self+set}" = set; then
39262 +  echo $ECHO_N "(cached) $ECHO_C" >&6
39263 +else
39264 +         if test "$cross_compiling" = yes; then :
39265 +  lt_cv_dlopen_self=cross
39266 +else
39267 +  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
39268 +  lt_status=$lt_dlunknown
39269 +  cat > conftest.$ac_ext <<EOF
39270 +#line 8976 "configure"
39271 +#include "confdefs.h"
39272 +
39273 +#if HAVE_DLFCN_H
39274 +#include <dlfcn.h>
39275 +#endif
39276 +
39277 +#include <stdio.h>
39278 +
39279 +#ifdef RTLD_GLOBAL
39280 +#  define LT_DLGLOBAL          RTLD_GLOBAL
39281 +#else
39282 +#  ifdef DL_GLOBAL
39283 +#    define LT_DLGLOBAL                DL_GLOBAL
39284 +#  else
39285 +#    define LT_DLGLOBAL                0
39286 +#  endif
39287 +#endif
39288 +
39289 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
39290 +   find out it does not work in some platform. */
39291 +#ifndef LT_DLLAZY_OR_NOW
39292 +#  ifdef RTLD_LAZY
39293 +#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
39294 +#  else
39295 +#    ifdef DL_LAZY
39296 +#      define LT_DLLAZY_OR_NOW         DL_LAZY
39297 +#    else
39298 +#      ifdef RTLD_NOW
39299 +#        define LT_DLLAZY_OR_NOW       RTLD_NOW
39300 +#      else
39301 +#        ifdef DL_NOW
39302 +#          define LT_DLLAZY_OR_NOW     DL_NOW
39303 +#        else
39304 +#          define LT_DLLAZY_OR_NOW     0
39305 +#        endif
39306 +#      endif
39307 +#    endif
39308 +#  endif
39309 +#endif
39310 +
39311 +#ifdef __cplusplus
39312 +extern "C" void exit (int);
39313 +#endif
39314 +
39315 +void fnord() { int i=42;}
39316 +int main ()
39317 +{
39318 +  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
39319 +  int status = $lt_dlunknown;
39320 +
39321 +  if (self)
39322 +    {
39323 +      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
39324 +      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
39325 +      /* dlclose (self); */
39326 +    }
39327 +
39328 +    exit (status);
39329 +}
39330 +EOF
39331 +  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39332 +  (eval $ac_link) 2>&5
39333 +  ac_status=$?
39334 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
39335 +  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
39336 +    (./conftest; exit; ) 2>/dev/null
39337 +    lt_status=$?
39338 +    case x$lt_status in
39339 +      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
39340 +      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
39341 +      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
39342 +    esac
39343 +  else :
39344 +    # compilation failed
39345 +    lt_cv_dlopen_self=no
39346 +  fi
39347 +fi
39348 +rm -fr conftest*
39349 +
39350 +
39351 +fi
39352 +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
39353 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6
39354 +
39355 +    if test "x$lt_cv_dlopen_self" = xyes; then
39356 +      LDFLAGS="$LDFLAGS $link_static_flag"
39357 +      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
39358 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
39359 +if test "${lt_cv_dlopen_self_static+set}" = set; then
39360 +  echo $ECHO_N "(cached) $ECHO_C" >&6
39361 +else
39362 +         if test "$cross_compiling" = yes; then :
39363 +  lt_cv_dlopen_self_static=cross
39364 +else
39365 +  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
39366 +  lt_status=$lt_dlunknown
39367 +  cat > conftest.$ac_ext <<EOF
39368 +#line 9074 "configure"
39369 +#include "confdefs.h"
39370 +
39371 +#if HAVE_DLFCN_H
39372 +#include <dlfcn.h>
39373 +#endif
39374 +
39375 +#include <stdio.h>
39376 +
39377 +#ifdef RTLD_GLOBAL
39378 +#  define LT_DLGLOBAL          RTLD_GLOBAL
39379 +#else
39380 +#  ifdef DL_GLOBAL
39381 +#    define LT_DLGLOBAL                DL_GLOBAL
39382 +#  else
39383 +#    define LT_DLGLOBAL                0
39384 +#  endif
39385 +#endif
39386 +
39387 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
39388 +   find out it does not work in some platform. */
39389 +#ifndef LT_DLLAZY_OR_NOW
39390 +#  ifdef RTLD_LAZY
39391 +#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
39392 +#  else
39393 +#    ifdef DL_LAZY
39394 +#      define LT_DLLAZY_OR_NOW         DL_LAZY
39395 +#    else
39396 +#      ifdef RTLD_NOW
39397 +#        define LT_DLLAZY_OR_NOW       RTLD_NOW
39398 +#      else
39399 +#        ifdef DL_NOW
39400 +#          define LT_DLLAZY_OR_NOW     DL_NOW
39401 +#        else
39402 +#          define LT_DLLAZY_OR_NOW     0
39403 +#        endif
39404 +#      endif
39405 +#    endif
39406 +#  endif
39407 +#endif
39408 +
39409 +#ifdef __cplusplus
39410 +extern "C" void exit (int);
39411 +#endif
39412 +
39413 +void fnord() { int i=42;}
39414 +int main ()
39415 +{
39416 +  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
39417 +  int status = $lt_dlunknown;
39418 +
39419 +  if (self)
39420 +    {
39421 +      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
39422 +      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
39423 +      /* dlclose (self); */
39424 +    }
39425 +
39426 +    exit (status);
39427 +}
39428 +EOF
39429 +  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39430 +  (eval $ac_link) 2>&5
39431 +  ac_status=$?
39432 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
39433 +  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
39434 +    (./conftest; exit; ) 2>/dev/null
39435 +    lt_status=$?
39436 +    case x$lt_status in
39437 +      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
39438 +      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
39439 +      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
39440 +    esac
39441 +  else :
39442 +    # compilation failed
39443 +    lt_cv_dlopen_self_static=no
39444 +  fi
39445 +fi
39446 +rm -fr conftest*
39447 +
39448 +
39449 +fi
39450 +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
39451 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
39452 +    fi
39453 +
39454 +    CPPFLAGS="$save_CPPFLAGS"
39455 +    LDFLAGS="$save_LDFLAGS"
39456 +    LIBS="$save_LIBS"
39457 +    ;;
39458 +  esac
39459 +
39460 +  case $lt_cv_dlopen_self in
39461 +  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
39462 +  *) enable_dlopen_self=unknown ;;
39463 +  esac
39464 +
39465 +  case $lt_cv_dlopen_self_static in
39466 +  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
39467 +  *) enable_dlopen_self_static=unknown ;;
39468 +  esac
39469 +fi
39470 +
39471 +
39472 +# Report which librarie types wil actually be built
39473 +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
39474 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
39475 +echo "$as_me:$LINENO: result: $can_build_shared" >&5
39476 +echo "${ECHO_T}$can_build_shared" >&6
39477 +
39478 +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
39479 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
39480 +test "$can_build_shared" = "no" && enable_shared=no
39481 +
39482 +# On AIX, shared libraries and static libraries use the same namespace, and
39483 +# are all built from PIC.
39484 +case "$host_os" in
39485 +aix3*)
39486 +  test "$enable_shared" = yes && enable_static=no
39487 +  if test -n "$RANLIB"; then
39488 +    archive_cmds="$archive_cmds~\$RANLIB \$lib"
39489 +    postinstall_cmds='$RANLIB $lib'
39490 +  fi
39491 +  ;;
39492 +
39493 +aix4* | aix5*)
39494 +  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
39495 +    test "$enable_shared" = yes && enable_static=no
39496 +  fi
39497 +    ;;
39498 +esac
39499 +echo "$as_me:$LINENO: result: $enable_shared" >&5
39500 +echo "${ECHO_T}$enable_shared" >&6
39501 +
39502 +echo "$as_me:$LINENO: checking whether to build static libraries" >&5
39503 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
39504 +# Make sure either enable_shared or enable_static is yes.
39505 +test "$enable_shared" = yes || enable_static=yes
39506 +echo "$as_me:$LINENO: result: $enable_static" >&5
39507 +echo "${ECHO_T}$enable_static" >&6
39508 +
39509 +# The else clause should only fire when bootstrapping the
39510 +# libtool distribution, otherwise you forgot to ship ltmain.sh
39511 +# with your package, and you will get complaints that there are
39512 +# no rules to generate ltmain.sh.
39513 +if test -f "$ltmain"; then
39514 +  # See if we are running on zsh, and set the options which allow our commands through
39515 +  # without removal of \ escapes.
39516 +  if test -n "${ZSH_VERSION+set}" ; then
39517 +    setopt NO_GLOB_SUBST
39518 +  fi
39519 +  # Now quote all the things that may contain metacharacters while being
39520 +  # careful not to overquote the AC_SUBSTed values.  We take copies of the
39521 +  # variables and quote the copies for generation of the libtool script.
39522 +  for var in echo old_CC old_CFLAGS AR AR_FLAGS AS EGREP RANLIB LN_S LTCC NM \
39523 +    SED SHELL STRIP \
39524 +    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
39525 +    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
39526 +    deplibs_check_method reload_flag reload_cmds need_locks \
39527 +    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
39528 +    lt_cv_sys_global_symbol_to_c_name_address \
39529 +    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
39530 +    old_postinstall_cmds old_postuninstall_cmds \
39531 +    compiler \
39532 +    CC \
39533 +    LD \
39534 +    lt_prog_compiler_wl \
39535 +    lt_prog_compiler_pic \
39536 +    lt_prog_compiler_static \
39537 +    lt_prog_compiler_no_builtin_flag \
39538 +    export_dynamic_flag_spec \
39539 +    thread_safe_flag_spec \
39540 +    whole_archive_flag_spec \
39541 +    enable_shared_with_static_runtimes \
39542 +    old_archive_cmds \
39543 +    old_archive_from_new_cmds \
39544 +    predep_objects \
39545 +    postdep_objects \
39546 +    predeps \
39547 +    postdeps \
39548 +    compiler_lib_search_path \
39549 +    archive_cmds \
39550 +    archive_expsym_cmds \
39551 +    postinstall_cmds \
39552 +    postuninstall_cmds \
39553 +    old_archive_from_expsyms_cmds \
39554 +    allow_undefined_flag \
39555 +    no_undefined_flag \
39556 +    export_symbols_cmds \
39557 +    hardcode_libdir_flag_spec \
39558 +    hardcode_libdir_flag_spec_ld \
39559 +    hardcode_libdir_separator \
39560 +    hardcode_automatic \
39561 +    module_cmds \
39562 +    module_expsym_cmds \
39563 +    lt_cv_prog_compiler_c_o \
39564 +    exclude_expsyms \
39565 +    include_expsyms; do
39566 +
39567 +    case $var in
39568 +    old_archive_cmds | \
39569 +    old_archive_from_new_cmds | \
39570 +    archive_cmds | \
39571 +    archive_expsym_cmds | \
39572 +    module_cmds | \
39573 +    module_expsym_cmds | \
39574 +    old_archive_from_expsyms_cmds | \
39575 +    export_symbols_cmds | \
39576 +    extract_expsyms_cmds | reload_cmds | finish_cmds | \
39577 +    postinstall_cmds | postuninstall_cmds | \
39578 +    old_postinstall_cmds | old_postuninstall_cmds | \
39579 +    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
39580 +      # Double-quote double-evaled strings.
39581 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
39582 +      ;;
39583 +    *)
39584 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
39585 +      ;;
39586 +    esac
39587 +  done
39588 +
39589 +  case $lt_echo in
39590 +  *'\$0 --fallback-echo"')
39591 +    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
39592 +    ;;
39593 +  esac
39594 +
39595 +cfgfile="${ofile}T"
39596 +  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
39597 +  $rm -f "$cfgfile"
39598 +  { echo "$as_me:$LINENO: creating $ofile" >&5
39599 +echo "$as_me: creating $ofile" >&6;}
39600 +
39601 +  cat <<__EOF__ >> "$cfgfile"
39602 +#! $SHELL
39603 +
39604 +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
39605 +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
39606 +# NOTE: Changes made to this file will be lost: look at ltmain.sh.
39607 +#
39608 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
39609 +# Free Software Foundation, Inc.
39610 +#
39611 +# This file is part of GNU Libtool:
39612 +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
39613 +#
39614 +# This program is free software; you can redistribute it and/or modify
39615 +# it under the terms of the GNU General Public License as published by
39616 +# the Free Software Foundation; either version 2 of the License, or
39617 +# (at your option) any later version.
39618 +#
39619 +# This program is distributed in the hope that it will be useful, but
39620 +# WITHOUT ANY WARRANTY; without even the implied warranty of
39621 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
39622 +# General Public License for more details.
39623 +#
39624 +# You should have received a copy of the GNU General Public License
39625 +# along with this program; if not, write to the Free Software
39626 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
39627 +#
39628 +# As a special exception to the GNU General Public License, if you
39629 +# distribute this file as part of a program that contains a
39630 +# configuration script generated by Autoconf, you may include it under
39631 +# the same distribution terms that you use for the rest of that program.
39632 +
39633 +# A sed program that does not truncate output.
39634 +SED=$lt_SED
39635 +
39636 +# Sed that helps us avoid accidentally triggering echo(1) options like -n.
39637 +Xsed="$SED -e s/^X//"
39638 +
39639 +# The HP-UX ksh and POSIX shell print the target directory to stdout
39640 +# if CDPATH is set.
39641 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
39642 +
39643 +# The names of the tagged configurations supported by this script.
39644 +available_tags=
39645 +
39646 +# ### BEGIN LIBTOOL CONFIG
39647 +
39648 +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
39649 +
39650 +# Shell to use when invoking shell scripts.
39651 +SHELL=$lt_SHELL
39652 +
39653 +# Whether or not to build shared libraries.
39654 +build_libtool_libs=$enable_shared
39655 +
39656 +# Whether or not to build static libraries.
39657 +build_old_libs=$enable_static
39658 +
39659 +# Whether or not to add -lc for building shared libraries.
39660 +build_libtool_need_lc=$archive_cmds_need_lc
39661 +
39662 +# Whether or not to disallow shared libs when runtime libs are static
39663 +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
39664 +
39665 +# Whether or not to optimize for fast installation.
39666 +fast_install=$enable_fast_install
39667 +
39668 +# The host system.
39669 +host_alias=$host_alias
39670 +host=$host
39671 +host_os=$host_os
39672 +
39673 +# The build system.
39674 +build_alias=$build_alias
39675 +build=$build
39676 +build_os=$build_os
39677 +
39678 +# An echo program that does not interpret backslashes.
39679 +echo=$lt_echo
39680 +
39681 +# The archiver.
39682 +AR=$lt_AR
39683 +AR_FLAGS=$lt_AR_FLAGS
39684 +
39685 +# A C compiler.
39686 +LTCC=$lt_LTCC
39687 +
39688 +# A language-specific compiler.
39689 +CC=$lt_compiler
39690 +
39691 +# Is the compiler the GNU C compiler?
39692 +with_gcc=$GCC
39693 +
39694 +# An ERE matcher.
39695 +EGREP=$lt_EGREP
39696 +
39697 +# The linker used to build libraries.
39698 +LD=$lt_LD
39699 +
39700 +# Whether we need hard or soft links.
39701 +LN_S=$lt_LN_S
39702 +
39703 +# A BSD-compatible nm program.
39704 +NM=$lt_NM
39705 +
39706 +# A symbol stripping program
39707 +STRIP=$lt_STRIP
39708 +
39709 +# Used to examine libraries when file_magic_cmd begins "file"
39710 +MAGIC_CMD=$MAGIC_CMD
39711 +
39712 +# Used on cygwin: DLL creation program.
39713 +DLLTOOL="$DLLTOOL"
39714 +
39715 +# Used on cygwin: object dumper.
39716 +OBJDUMP="$OBJDUMP"
39717 +
39718 +# Used on cygwin: assembler.
39719 +AS=$lt_AS
39720 +
39721 +# The name of the directory that contains temporary libtool files.
39722 +objdir=$objdir
39723 +
39724 +# How to create reloadable object files.
39725 +reload_flag=$lt_reload_flag
39726 +reload_cmds=$lt_reload_cmds
39727 +
39728 +# How to pass a linker flag through the compiler.
39729 +wl=$lt_lt_prog_compiler_wl
39730 +
39731 +# Object file suffix (normally "o").
39732 +objext="$ac_objext"
39733 +
39734 +# Old archive suffix (normally "a").
39735 +libext="$libext"
39736 +
39737 +# Shared library suffix (normally ".so").
39738 +shrext_cmds='$shrext_cmds'
39739 +
39740 +# Executable file suffix (normally "").
39741 +exeext="$exeext"
39742 +
39743 +# Additional compiler flags for building library objects.
39744 +pic_flag=$lt_lt_prog_compiler_pic
39745 +pic_mode=$pic_mode
39746 +
39747 +# What is the maximum length of a command?
39748 +max_cmd_len=$lt_cv_sys_max_cmd_len
39749 +
39750 +# Does compiler simultaneously support -c and -o options?
39751 +compiler_c_o=$lt_lt_cv_prog_compiler_c_o
39752 +
39753 +# Must we lock files when doing compilation ?
39754 +need_locks=$lt_need_locks
39755 +
39756 +# Do we need the lib prefix for modules?
39757 +need_lib_prefix=$need_lib_prefix
39758 +
39759 +# Do we need a version for libraries?
39760 +need_version=$need_version
39761 +
39762 +# Whether dlopen is supported.
39763 +dlopen_support=$enable_dlopen
39764 +
39765 +# Whether dlopen of programs is supported.
39766 +dlopen_self=$enable_dlopen_self
39767 +
39768 +# Whether dlopen of statically linked programs is supported.
39769 +dlopen_self_static=$enable_dlopen_self_static
39770 +
39771 +# Compiler flag to prevent dynamic linking.
39772 +link_static_flag=$lt_lt_prog_compiler_static
39773 +
39774 +# Compiler flag to turn off builtin functions.
39775 +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
39776 +
39777 +# Compiler flag to allow reflexive dlopens.
39778 +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
39779 +
39780 +# Compiler flag to generate shared objects directly from archives.
39781 +whole_archive_flag_spec=$lt_whole_archive_flag_spec
39782 +
39783 +# Compiler flag to generate thread-safe objects.
39784 +thread_safe_flag_spec=$lt_thread_safe_flag_spec
39785 +
39786 +# Library versioning type.
39787 +version_type=$version_type
39788 +
39789 +# Format of library name prefix.
39790 +libname_spec=$lt_libname_spec
39791 +
39792 +# List of archive names.  First name is the real one, the rest are links.
39793 +# The last name is the one that the linker finds with -lNAME.
39794 +library_names_spec=$lt_library_names_spec
39795 +
39796 +# The coded name of the library, if different from the real name.
39797 +soname_spec=$lt_soname_spec
39798 +
39799 +# Commands used to build and install an old-style archive.
39800 +RANLIB=$lt_RANLIB
39801 +old_archive_cmds=$lt_old_archive_cmds
39802 +old_postinstall_cmds=$lt_old_postinstall_cmds
39803 +old_postuninstall_cmds=$lt_old_postuninstall_cmds
39804 +
39805 +# Create an old-style archive from a shared archive.
39806 +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
39807 +
39808 +# Create a temporary old-style archive to link instead of a shared archive.
39809 +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
39810 +
39811 +# Commands used to build and install a shared archive.
39812 +archive_cmds=$lt_archive_cmds
39813 +archive_expsym_cmds=$lt_archive_expsym_cmds
39814 +postinstall_cmds=$lt_postinstall_cmds
39815 +postuninstall_cmds=$lt_postuninstall_cmds
39816 +
39817 +# Commands used to build a loadable module (assumed same as above if empty)
39818 +module_cmds=$lt_module_cmds
39819 +module_expsym_cmds=$lt_module_expsym_cmds
39820 +
39821 +# Commands to strip libraries.
39822 +old_striplib=$lt_old_striplib
39823 +striplib=$lt_striplib
39824 +
39825 +# Dependencies to place before the objects being linked to create a
39826 +# shared library.
39827 +predep_objects=$lt_predep_objects
39828 +
39829 +# Dependencies to place after the objects being linked to create a
39830 +# shared library.
39831 +postdep_objects=$lt_postdep_objects
39832 +
39833 +# Dependencies to place before the objects being linked to create a
39834 +# shared library.
39835 +predeps=$lt_predeps
39836 +
39837 +# Dependencies to place after the objects being linked to create a
39838 +# shared library.
39839 +postdeps=$lt_postdeps
39840 +
39841 +# The library search path used internally by the compiler when linking
39842 +# a shared library.
39843 +compiler_lib_search_path=$lt_compiler_lib_search_path
39844 +
39845 +# Method to check whether dependent libraries are shared objects.
39846 +deplibs_check_method=$lt_deplibs_check_method
39847 +
39848 +# Command to use when deplibs_check_method == file_magic.
39849 +file_magic_cmd=$lt_file_magic_cmd
39850 +
39851 +# Flag that allows shared libraries with undefined symbols to be built.
39852 +allow_undefined_flag=$lt_allow_undefined_flag
39853 +
39854 +# Flag that forces no undefined symbols.
39855 +no_undefined_flag=$lt_no_undefined_flag
39856 +
39857 +# Commands used to finish a libtool library installation in a directory.
39858 +finish_cmds=$lt_finish_cmds
39859 +
39860 +# Same as above, but a single script fragment to be evaled but not shown.
39861 +finish_eval=$lt_finish_eval
39862 +
39863 +# Take the output of nm and produce a listing of raw symbols and C names.
39864 +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
39865 +
39866 +# Transform the output of nm in a proper C declaration
39867 +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
39868 +
39869 +# Transform the output of nm in a C name address pair
39870 +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
39871 +
39872 +# This is the shared library runtime path variable.
39873 +runpath_var=$runpath_var
39874 +
39875 +# This is the shared library path variable.
39876 +shlibpath_var=$shlibpath_var
39877 +
39878 +# Is shlibpath searched before the hard-coded library search path?
39879 +shlibpath_overrides_runpath=$shlibpath_overrides_runpath
39880 +
39881 +# How to hardcode a shared library path into an executable.
39882 +hardcode_action=$hardcode_action
39883 +
39884 +# Whether we should hardcode library paths into libraries.
39885 +hardcode_into_libs=$hardcode_into_libs
39886 +
39887 +# Flag to hardcode \$libdir into a binary during linking.
39888 +# This must work even if \$libdir does not exist.
39889 +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
39890 +
39891 +# If ld is used when linking, flag to hardcode \$libdir into
39892 +# a binary during linking. This must work even if \$libdir does
39893 +# not exist.
39894 +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
39895 +
39896 +# Whether we need a single -rpath flag with a separated argument.
39897 +hardcode_libdir_separator=$lt_hardcode_libdir_separator
39898 +
39899 +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
39900 +# resulting binary.
39901 +hardcode_direct=$hardcode_direct
39902 +
39903 +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
39904 +# resulting binary.
39905 +hardcode_minus_L=$hardcode_minus_L
39906 +
39907 +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
39908 +# the resulting binary.
39909 +hardcode_shlibpath_var=$hardcode_shlibpath_var
39910 +
39911 +# Set to yes if building a shared library automatically hardcodes DIR into the library
39912 +# and all subsequent libraries and executables linked against it.
39913 +hardcode_automatic=$hardcode_automatic
39914 +
39915 +# Variables whose values should be saved in libtool wrapper scripts and
39916 +# restored at relink time.
39917 +variables_saved_for_relink="$variables_saved_for_relink"
39918 +
39919 +# Whether libtool must link a program against all its dependency libraries.
39920 +link_all_deplibs=$link_all_deplibs
39921 +
39922 +# Compile-time system search path for libraries
39923 +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
39924 +
39925 +# Run-time system search path for libraries
39926 +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
39927 +
39928 +# Fix the shell variable \$srcfile for the compiler.
39929 +fix_srcfile_path="$fix_srcfile_path"
39930 +
39931 +# Set to yes if exported symbols are required.
39932 +always_export_symbols=$always_export_symbols
39933 +
39934 +# The commands to list exported symbols.
39935 +export_symbols_cmds=$lt_export_symbols_cmds
39936 +
39937 +# The commands to extract the exported symbol list from a shared archive.
39938 +extract_expsyms_cmds=$lt_extract_expsyms_cmds
39939 +
39940 +# Symbols that should not be listed in the preloaded symbols.
39941 +exclude_expsyms=$lt_exclude_expsyms
39942 +
39943 +# Symbols that must always be exported.
39944 +include_expsyms=$lt_include_expsyms
39945 +
39946 +# ### END LIBTOOL CONFIG
39947 +
39948 +__EOF__
39949 +
39950 +
39951 +  case $host_os in
39952 +  aix3*)
39953 +    cat <<\EOF >> "$cfgfile"
39954 +
39955 +# AIX sometimes has problems with the GCC collect2 program.  For some
39956 +# reason, if we set the COLLECT_NAMES environment variable, the problems
39957 +# vanish in a puff of smoke.
39958 +if test "X${COLLECT_NAMES+set}" != Xset; then
39959 +  COLLECT_NAMES=
39960 +  export COLLECT_NAMES
39961 +fi
39962 +EOF
39963 +    ;;
39964 +  esac
39965 +
39966 +  # We use sed instead of cat because bash on DJGPP gets confused if
39967 +  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
39968 +  # text mode, it properly converts lines to CR/LF.  This bash problem
39969 +  # is reportedly fixed, but why not run on old versions too?
39970 +  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
39971 +
39972 +  mv -f "$cfgfile" "$ofile" || \
39973 +    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
39974 +  chmod +x "$ofile"
39975 +
39976 +else
39977 +  # If there is no Makefile yet, we rely on a make rule to execute
39978 +  # `config.status --recheck' to rerun these tests and create the
39979 +  # libtool script then.
39980 +  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
39981 +  if test -f "$ltmain_in"; then
39982 +    test -f Makefile && make "$ltmain"
39983 +  fi
39984 +fi
39985 +
39986 +
39987 +ac_ext=c
39988 +ac_cpp='$CPP $CPPFLAGS'
39989 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
39990 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
39991 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
39992 +
39993 +CC="$lt_save_CC"
39994 +
39995 +
39996 +# Check whether --with-tags or --without-tags was given.
39997 +if test "${with_tags+set}" = set; then
39998 +  withval="$with_tags"
39999 +  tagnames="$withval"
40000 +fi;
40001 +
40002 +if test -f "$ltmain" && test -n "$tagnames"; then
40003 +  if test ! -f "${ofile}"; then
40004 +    { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
40005 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
40006 +  fi
40007 +
40008 +  if test -z "$LTCC"; then
40009 +    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
40010 +    if test -z "$LTCC"; then
40011 +      { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
40012 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
40013 +    else
40014 +      { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
40015 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
40016 +    fi
40017 +  fi
40018 +
40019 +  # Extract list of available tagged configurations in $ofile.
40020 +  # Note that this assumes the entire list is on one line.
40021 +  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
40022 +
40023 +  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
40024 +  for tagname in $tagnames; do
40025 +    IFS="$lt_save_ifs"
40026 +    # Check whether tagname contains only valid characters
40027 +    case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
40028 +    "") ;;
40029 +    *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
40030 +echo "$as_me: error: invalid tag name: $tagname" >&2;}
40031 +   { (exit 1); exit 1; }; }
40032 +       ;;
40033 +    esac
40034 +
40035 +    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
40036 +    then
40037 +      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
40038 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
40039 +   { (exit 1); exit 1; }; }
40040 +    fi
40041 +
40042 +    # Update the list of available tags.
40043 +    if test -n "$tagname"; then
40044 +      echo appending configuration tag \"$tagname\" to $ofile
40045 +
40046 +      case $tagname in
40047 +      CXX)
40048 +       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
40049 +           ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
40050 +           (test "X$CXX" != "Xg++"))) ; then
40051 +         ac_ext=cc
40052 +ac_cpp='$CXXCPP $CPPFLAGS'
40053 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40054 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40055 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40056 +
40057 +
40058 +
40059 +
40060 +archive_cmds_need_lc_CXX=no
40061 +allow_undefined_flag_CXX=
40062 +always_export_symbols_CXX=no
40063 +archive_expsym_cmds_CXX=
40064 +export_dynamic_flag_spec_CXX=
40065 +hardcode_direct_CXX=no
40066 +hardcode_libdir_flag_spec_CXX=
40067 +hardcode_libdir_flag_spec_ld_CXX=
40068 +hardcode_libdir_separator_CXX=
40069 +hardcode_minus_L_CXX=no
40070 +hardcode_automatic_CXX=no
40071 +module_cmds_CXX=
40072 +module_expsym_cmds_CXX=
40073 +link_all_deplibs_CXX=unknown
40074 +old_archive_cmds_CXX=$old_archive_cmds
40075 +no_undefined_flag_CXX=
40076 +whole_archive_flag_spec_CXX=
40077 +enable_shared_with_static_runtimes_CXX=no
40078 +
40079 +# Dependencies to place before and after the object being linked:
40080 +predep_objects_CXX=
40081 +postdep_objects_CXX=
40082 +predeps_CXX=
40083 +postdeps_CXX=
40084 +compiler_lib_search_path_CXX=
40085 +
40086 +# Source file extension for C++ test sources.
40087 +ac_ext=cc
40088 +
40089 +# Object file extension for compiled C++ test sources.
40090 +objext=o
40091 +objext_CXX=$objext
40092 +
40093 +# Code to be used in simple compile tests
40094 +lt_simple_compile_test_code="int some_variable = 0;\n"
40095 +
40096 +# Code to be used in simple link tests
40097 +lt_simple_link_test_code='int main(int, char *) { return(0); }\n'
40098 +
40099 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
40100 +
40101 +# If no C compiler was specified, use CC.
40102 +LTCC=${LTCC-"$CC"}
40103 +
40104 +# Allow CC to be a program name with arguments.
40105 +compiler=$CC
40106 +
40107 +
40108 +# Allow CC to be a program name with arguments.
40109 +lt_save_CC=$CC
40110 +lt_save_LD=$LD
40111 +lt_save_GCC=$GCC
40112 +GCC=$GXX
40113 +lt_save_with_gnu_ld=$with_gnu_ld
40114 +lt_save_path_LD=$lt_cv_path_LD
40115 +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
40116 +  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
40117 +else
40118 +  unset lt_cv_prog_gnu_ld
40119 +fi
40120 +if test -n "${lt_cv_path_LDCXX+set}"; then
40121 +  lt_cv_path_LD=$lt_cv_path_LDCXX
40122 +else
40123 +  unset lt_cv_path_LD
40124 +fi
40125 +test -z "${LDCXX+set}" || LD=$LDCXX
40126 +CC=${CXX-"c++"}
40127 +compiler=$CC
40128 +compiler_CXX=$CC
40129 +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
40130 +
40131 +# We don't want -fno-exception wen compiling C++ code, so set the
40132 +# no_builtin_flag separately
40133 +if test "$GXX" = yes; then
40134 +  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
40135 +else
40136 +  lt_prog_compiler_no_builtin_flag_CXX=
40137 +fi
40138 +
40139 +if test "$GXX" = yes; then
40140 +  # Set up default GNU C++ configuration
40141 +
40142 +
40143 +# Check whether --with-gnu-ld or --without-gnu-ld was given.
40144 +if test "${with_gnu_ld+set}" = set; then
40145 +  withval="$with_gnu_ld"
40146 +  test "$withval" = no || with_gnu_ld=yes
40147 +else
40148 +  with_gnu_ld=no
40149 +fi;
40150 +ac_prog=ld
40151 +if test "$GCC" = yes; then
40152 +  # Check if gcc -print-prog-name=ld gives a path.
40153 +  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
40154 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
40155 +  case $host in
40156 +  *-*-mingw*)
40157 +    # gcc leaves a trailing carriage return which upsets mingw
40158 +    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
40159 +  *)
40160 +    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
40161 +  esac
40162 +  case $ac_prog in
40163 +    # Accept absolute paths.
40164 +    [\\/]* | ?:[\\/]*)
40165 +      re_direlt='/[^/][^/]*/\.\./'
40166 +      # Canonicalize the pathname of ld
40167 +      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
40168 +      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
40169 +       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
40170 +      done
40171 +      test -z "$LD" && LD="$ac_prog"
40172 +      ;;
40173 +  "")
40174 +    # If it fails, then pretend we aren't using GCC.
40175 +    ac_prog=ld
40176 +    ;;
40177 +  *)
40178 +    # If it is relative, then search for the first ld in PATH.
40179 +    with_gnu_ld=unknown
40180 +    ;;
40181 +  esac
40182 +elif test "$with_gnu_ld" = yes; then
40183 +  echo "$as_me:$LINENO: checking for GNU ld" >&5
40184 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
40185 +else
40186 +  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
40187 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
40188 +fi
40189 +if test "${lt_cv_path_LD+set}" = set; then
40190 +  echo $ECHO_N "(cached) $ECHO_C" >&6
40191 +else
40192 +  if test -z "$LD"; then
40193 +  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
40194 +  for ac_dir in $PATH; do
40195 +    IFS="$lt_save_ifs"
40196 +    test -z "$ac_dir" && ac_dir=.
40197 +    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
40198 +      lt_cv_path_LD="$ac_dir/$ac_prog"
40199 +      # Check to see if the program is GNU ld.  I'd rather use --version,
40200 +      # but apparently some GNU ld's only accept -v.
40201 +      # Break only if it was the GNU/non-GNU ld that we prefer.
40202 +      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
40203 +      *GNU* | *'with BFD'*)
40204 +       test "$with_gnu_ld" != no && break
40205 +       ;;
40206 +      *)
40207 +       test "$with_gnu_ld" != yes && break
40208 +       ;;
40209 +      esac
40210 +    fi
40211 +  done
40212 +  IFS="$lt_save_ifs"
40213 +else
40214 +  lt_cv_path_LD="$LD" # Let the user override the test with a path.
40215 +fi
40216 +fi
40217 +
40218 +LD="$lt_cv_path_LD"
40219 +if test -n "$LD"; then
40220 +  echo "$as_me:$LINENO: result: $LD" >&5
40221 +echo "${ECHO_T}$LD" >&6
40222 +else
40223 +  echo "$as_me:$LINENO: result: no" >&5
40224 +echo "${ECHO_T}no" >&6
40225 +fi
40226 +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
40227 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
40228 +   { (exit 1); exit 1; }; }
40229 +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
40230 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
40231 +if test "${lt_cv_prog_gnu_ld+set}" = set; then
40232 +  echo $ECHO_N "(cached) $ECHO_C" >&6
40233 +else
40234 +  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
40235 +case `$LD -v 2>&1 </dev/null` in
40236 +*GNU* | *'with BFD'*)
40237 +  lt_cv_prog_gnu_ld=yes
40238 +  ;;
40239 +*)
40240 +  lt_cv_prog_gnu_ld=no
40241 +  ;;
40242 +esac
40243 +fi
40244 +echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
40245 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
40246 +with_gnu_ld=$lt_cv_prog_gnu_ld
40247 +
40248 +
40249 +
40250 +  # Check if GNU C++ uses GNU ld as the underlying linker, since the
40251 +  # archiving commands below assume that GNU ld is being used.
40252 +  if test "$with_gnu_ld" = yes; then
40253 +    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
40254 +    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
40255 +
40256 +    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
40257 +    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
40258 +
40259 +    # If archive_cmds runs LD, not CC, wlarc should be empty
40260 +    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
40261 +    #     investigate it a little bit more. (MM)
40262 +    wlarc='${wl}'
40263 +
40264 +    # ancient GNU ld didn't support --whole-archive et. al.
40265 +    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
40266 +       grep 'no-whole-archive' > /dev/null; then
40267 +      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
40268 +    else
40269 +      whole_archive_flag_spec_CXX=
40270 +    fi
40271 +  else
40272 +    with_gnu_ld=no
40273 +    wlarc=
40274 +
40275 +    # A generic and very simple default shared library creation
40276 +    # command for GNU C++ for the case where it uses the native
40277 +    # linker, instead of GNU ld.  If possible, this setting should
40278 +    # overridden to take advantage of the native linker features on
40279 +    # the platform it is being used on.
40280 +    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
40281 +  fi
40282 +
40283 +  # Commands to make compiler produce verbose output that lists
40284 +  # what "hidden" libraries, object files and flags are used when
40285 +  # linking a shared library.
40286 +  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
40287 +
40288 +else
40289 +  GXX=no
40290 +  with_gnu_ld=no
40291 +  wlarc=
40292 +fi
40293 +
40294 +# PORTME: fill in a description of your system's C++ link characteristics
40295 +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
40296 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
40297 +ld_shlibs_CXX=yes
40298 +case $host_os in
40299 +  aix3*)
40300 +    # FIXME: insert proper C++ library support
40301 +    ld_shlibs_CXX=no
40302 +    ;;
40303 +  aix4* | aix5*)
40304 +    if test "$host_cpu" = ia64; then
40305 +      # On IA64, the linker does run time linking by default, so we don't
40306 +      # have to do anything special.
40307 +      aix_use_runtimelinking=no
40308 +      exp_sym_flag='-Bexport'
40309 +      no_entry_flag=""
40310 +    else
40311 +      aix_use_runtimelinking=no
40312 +
40313 +      # Test if we are trying to use run time linking or normal
40314 +      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
40315 +      # need to do runtime linking.
40316 +      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
40317 +       for ld_flag in $LDFLAGS; do
40318 +         case $ld_flag in
40319 +         *-brtl*)
40320 +           aix_use_runtimelinking=yes
40321 +           break
40322 +           ;;
40323 +         esac
40324 +       done
40325 +      esac
40326 +
40327 +      exp_sym_flag='-bexport'
40328 +      no_entry_flag='-bnoentry'
40329 +    fi
40330 +
40331 +    # When large executables or shared objects are built, AIX ld can
40332 +    # have problems creating the table of contents.  If linking a library
40333 +    # or program results in "error TOC overflow" add -mminimal-toc to
40334 +    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
40335 +    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
40336 +
40337 +    archive_cmds_CXX=''
40338 +    hardcode_direct_CXX=yes
40339 +    hardcode_libdir_separator_CXX=':'
40340 +    link_all_deplibs_CXX=yes
40341 +
40342 +    if test "$GXX" = yes; then
40343 +      case $host_os in aix4.[012]|aix4.[012].*)
40344 +      # We only want to do this on AIX 4.2 and lower, the check
40345 +      # below for broken collect2 doesn't work under 4.3+
40346 +       collect2name=`${CC} -print-prog-name=collect2`
40347 +       if test -f "$collect2name" && \
40348 +          strings "$collect2name" | grep resolve_lib_name >/dev/null
40349 +       then
40350 +         # We have reworked collect2
40351 +         hardcode_direct_CXX=yes
40352 +       else
40353 +         # We have old collect2
40354 +         hardcode_direct_CXX=unsupported
40355 +         # It fails to find uninstalled libraries when the uninstalled
40356 +         # path is not listed in the libpath.  Setting hardcode_minus_L
40357 +         # to unsupported forces relinking
40358 +         hardcode_minus_L_CXX=yes
40359 +         hardcode_libdir_flag_spec_CXX='-L$libdir'
40360 +         hardcode_libdir_separator_CXX=
40361 +       fi
40362 +      esac
40363 +      shared_flag='-shared'
40364 +      if test "$aix_use_runtimelinking" = yes; then
40365 +       shared_flag="$shared_flag "'${wl}-G'
40366 +      fi
40367 +    else
40368 +      # not using gcc
40369 +      if test "$host_cpu" = ia64; then
40370 +       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
40371 +       # chokes on -Wl,-G. The following line is correct:
40372 +       shared_flag='-G'
40373 +      else
40374 +       if test "$aix_use_runtimelinking" = yes; then
40375 +         shared_flag='${wl}-G'
40376 +       else
40377 +         shared_flag='${wl}-bM:SRE'
40378 +       fi
40379 +      fi
40380 +    fi
40381 +
40382 +    # It seems that -bexpall does not export symbols beginning with
40383 +    # underscore (_), so it is better to generate a list of symbols to export.
40384 +    always_export_symbols_CXX=yes
40385 +    if test "$aix_use_runtimelinking" = yes; then
40386 +      # Warning - without using the other runtime loading flags (-brtl),
40387 +      # -berok will link without error, but may produce a broken library.
40388 +      allow_undefined_flag_CXX='-berok'
40389 +      # Determine the default libpath from the value encoded in an empty executable.
40390 +      cat >conftest.$ac_ext <<_ACEOF
40391 +/* confdefs.h.  */
40392 +_ACEOF
40393 +cat confdefs.h >>conftest.$ac_ext
40394 +cat >>conftest.$ac_ext <<_ACEOF
40395 +/* end confdefs.h.  */
40396 +
40397 +int
40398 +main ()
40399 +{
40400 +
40401 +  ;
40402 +  return 0;
40403 +}
40404 +_ACEOF
40405 +rm -f conftest.$ac_objext conftest$ac_exeext
40406 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
40407 +  (eval $ac_link) 2>conftest.er1
40408 +  ac_status=$?
40409 +  grep -v '^ *+' conftest.er1 >conftest.err
40410 +  rm -f conftest.er1
40411 +  cat conftest.err >&5
40412 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
40413 +  (exit $ac_status); } &&
40414 +        { ac_try='test -z "$ac_cxx_werror_flag"
40415 +                        || test ! -s conftest.err'
40416 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40417 +  (eval $ac_try) 2>&5
40418 +  ac_status=$?
40419 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
40420 +  (exit $ac_status); }; } &&
40421 +        { ac_try='test -s conftest$ac_exeext'
40422 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40423 +  (eval $ac_try) 2>&5
40424 +  ac_status=$?
40425 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
40426 +  (exit $ac_status); }; }; then
40427 +
40428 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
40429 +}'`
40430 +# Check for a 64-bit object if we didn't find anything.
40431 +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
40432 +}'`; fi
40433 +else
40434 +  echo "$as_me: failed program was:" >&5
40435 +sed 's/^/| /' conftest.$ac_ext >&5
40436 +
40437 +fi
40438 +rm -f conftest.err conftest.$ac_objext \
40439 +      conftest$ac_exeext conftest.$ac_ext
40440 +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
40441 +
40442 +      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
40443 +
40444 +      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
40445 +     else
40446 +      if test "$host_cpu" = ia64; then
40447 +       hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
40448 +       allow_undefined_flag_CXX="-z nodefs"
40449 +       archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
40450 +      else
40451 +       # Determine the default libpath from the value encoded in an empty executable.
40452 +       cat >conftest.$ac_ext <<_ACEOF
40453 +/* confdefs.h.  */
40454 +_ACEOF
40455 +cat confdefs.h >>conftest.$ac_ext
40456 +cat >>conftest.$ac_ext <<_ACEOF
40457 +/* end confdefs.h.  */
40458 +
40459 +int
40460 +main ()
40461 +{
40462 +
40463 +  ;
40464 +  return 0;
40465 +}
40466 +_ACEOF
40467 +rm -f conftest.$ac_objext conftest$ac_exeext
40468 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
40469 +  (eval $ac_link) 2>conftest.er1
40470 +  ac_status=$?
40471 +  grep -v '^ *+' conftest.er1 >conftest.err
40472 +  rm -f conftest.er1
40473 +  cat conftest.err >&5
40474 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
40475 +  (exit $ac_status); } &&
40476 +        { ac_try='test -z "$ac_cxx_werror_flag"
40477 +                        || test ! -s conftest.err'
40478 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40479 +  (eval $ac_try) 2>&5
40480 +  ac_status=$?
40481 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
40482 +  (exit $ac_status); }; } &&
40483 +        { ac_try='test -s conftest$ac_exeext'
40484 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40485 +  (eval $ac_try) 2>&5
40486 +  ac_status=$?
40487 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
40488 +  (exit $ac_status); }; }; then
40489 +
40490 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
40491 +}'`
40492 +# Check for a 64-bit object if we didn't find anything.
40493 +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
40494 +}'`; fi
40495 +else
40496 +  echo "$as_me: failed program was:" >&5
40497 +sed 's/^/| /' conftest.$ac_ext >&5
40498 +
40499 +fi
40500 +rm -f conftest.err conftest.$ac_objext \
40501 +      conftest$ac_exeext conftest.$ac_ext
40502 +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
40503 +
40504 +       hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
40505 +       # Warning - without using the other run time loading flags,
40506 +       # -berok will link without error, but may produce a broken library.
40507 +       no_undefined_flag_CXX=' ${wl}-bernotok'
40508 +       allow_undefined_flag_CXX=' ${wl}-berok'
40509 +       # -bexpall does not export symbols beginning with underscore (_)
40510 +       always_export_symbols_CXX=yes
40511 +       # Exported symbols can be pulled into shared objects from archives
40512 +       whole_archive_flag_spec_CXX=' '
40513 +       archive_cmds_need_lc_CXX=yes
40514 +       # This is similar to how AIX traditionally builds it's shared libraries.
40515 +       archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
40516 +      fi
40517 +    fi
40518 +    ;;
40519 +  chorus*)
40520 +    case $cc_basename in
40521 +      *)
40522 +       # FIXME: insert proper C++ library support
40523 +       ld_shlibs_CXX=no
40524 +       ;;
40525 +    esac
40526 +    ;;
40527 +
40528 +
40529 +  cygwin* | mingw* | pw32*)
40530 +    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
40531 +    # as there is no search path for DLLs.
40532 +    hardcode_libdir_flag_spec_CXX='-L$libdir'
40533 +    allow_undefined_flag_CXX=unsupported
40534 +    always_export_symbols_CXX=no
40535 +    enable_shared_with_static_runtimes_CXX=yes
40536 +
40537 +    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
40538 +      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
40539 +      # If the export-symbols file already is a .def file (1st line
40540 +      # is EXPORTS), use it as is; otherwise, prepend...
40541 +      archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
40542 +       cp $export_symbols $output_objdir/$soname.def;
40543 +      else
40544 +       echo EXPORTS > $output_objdir/$soname.def;
40545 +       cat $export_symbols >> $output_objdir/$soname.def;
40546 +      fi~
40547 +      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
40548 +    else
40549 +      ld_shlibs_CXX=no
40550 +    fi
40551 +  ;;
40552 +      darwin* | rhapsody*)
40553 +        case "$host_os" in
40554 +        rhapsody* | darwin1.[012])
40555 +         allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
40556 +         ;;
40557 +       *) # Darwin 1.3 on
40558 +         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
40559 +           allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
40560 +         else
40561 +           case ${MACOSX_DEPLOYMENT_TARGET} in
40562 +             10.[012])
40563 +               allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
40564 +               ;;
40565 +             10.*)
40566 +               allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
40567 +               ;;
40568 +           esac
40569 +         fi
40570 +         ;;
40571 +        esac
40572 +      archive_cmds_need_lc_CXX=no
40573 +      hardcode_direct_CXX=no
40574 +      hardcode_automatic_CXX=yes
40575 +      hardcode_shlibpath_var_CXX=unsupported
40576 +      whole_archive_flag_spec_CXX=''
40577 +      link_all_deplibs_CXX=yes
40578 +
40579 +    if test "$GXX" = yes ; then
40580 +      lt_int_apple_cc_single_mod=no
40581 +      output_verbose_link_cmd='echo'
40582 +      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
40583 +       lt_int_apple_cc_single_mod=yes
40584 +      fi
40585 +      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
40586 +       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
40587 +      else
40588 +          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
40589 +        fi
40590 +        module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
40591 +        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
40592 +          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
40593 +            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
40594 +          else
40595 +            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
40596 +          fi
40597 +            module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
40598 +      else
40599 +      case "$cc_basename" in
40600 +        xlc*)
40601 +         output_verbose_link_cmd='echo'
40602 +          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
40603 +          module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
40604 +          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
40605 +          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
40606 +          module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
40607 +          ;;
40608 +       *)
40609 +         ld_shlibs_CXX=no
40610 +          ;;
40611 +      esac
40612 +      fi
40613 +        ;;
40614 +
40615 +  dgux*)
40616 +    case $cc_basename in
40617 +      ec++)
40618 +       # FIXME: insert proper C++ library support
40619 +       ld_shlibs_CXX=no
40620 +       ;;
40621 +      ghcx)
40622 +       # Green Hills C++ Compiler
40623 +       # FIXME: insert proper C++ library support
40624 +       ld_shlibs_CXX=no
40625 +       ;;
40626 +      *)
40627 +       # FIXME: insert proper C++ library support
40628 +       ld_shlibs_CXX=no
40629 +       ;;
40630 +    esac
40631 +    ;;
40632 +  freebsd[12]*)
40633 +    # C++ shared libraries reported to be fairly broken before switch to ELF
40634 +    ld_shlibs_CXX=no
40635 +    ;;
40636 +  freebsd-elf*)
40637 +    archive_cmds_need_lc_CXX=no
40638 +    ;;
40639 +  freebsd* | kfreebsd*-gnu | dragonfly*)
40640 +    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
40641 +    # conventions
40642 +    ld_shlibs_CXX=yes
40643 +    ;;
40644 +  gnu*)
40645 +    ;;
40646 +  hpux9*)
40647 +    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
40648 +    hardcode_libdir_separator_CXX=:
40649 +    export_dynamic_flag_spec_CXX='${wl}-E'
40650 +    hardcode_direct_CXX=yes
40651 +    hardcode_minus_L_CXX=yes # Not in the search PATH,
40652 +                               # but as the default
40653 +                               # location of the library.
40654 +
40655 +    case $cc_basename in
40656 +    CC)
40657 +      # FIXME: insert proper C++ library support
40658 +      ld_shlibs_CXX=no
40659 +      ;;
40660 +    aCC)
40661 +      archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
40662 +      # Commands to make compiler produce verbose output that lists
40663 +      # what "hidden" libraries, object files and flags are used when
40664 +      # linking a shared library.
40665 +      #
40666 +      # There doesn't appear to be a way to prevent this compiler from
40667 +      # explicitly linking system object files so we need to strip them
40668 +      # from the output so that they don't get included in the library
40669 +      # dependencies.
40670 +      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
40671 +      ;;
40672 +    *)
40673 +      if test "$GXX" = yes; then
40674 +        archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
40675 +      else
40676 +        # FIXME: insert proper C++ library support
40677 +        ld_shlibs_CXX=no
40678 +      fi
40679 +      ;;
40680 +    esac
40681 +    ;;
40682 +  hpux10*|hpux11*)
40683 +    if test $with_gnu_ld = no; then
40684 +      case "$host_cpu" in
40685 +      hppa*64*)
40686 +       hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
40687 +       hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
40688 +       hardcode_libdir_separator_CXX=:
40689 +        ;;
40690 +      ia64*)
40691 +       hardcode_libdir_flag_spec_CXX='-L$libdir'
40692 +        ;;
40693 +      *)
40694 +       hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
40695 +       hardcode_libdir_separator_CXX=:
40696 +       export_dynamic_flag_spec_CXX='${wl}-E'
40697 +        ;;
40698 +      esac
40699 +    fi
40700 +    case "$host_cpu" in
40701 +    hppa*64*)
40702 +      hardcode_direct_CXX=no
40703 +      hardcode_shlibpath_var_CXX=no
40704 +      ;;
40705 +    ia64*)
40706 +      hardcode_direct_CXX=no
40707 +      hardcode_shlibpath_var_CXX=no
40708 +      hardcode_minus_L_CXX=yes # Not in the search PATH,
40709 +                                             # but as the default
40710 +                                             # location of the library.
40711 +      ;;
40712 +    *)
40713 +      hardcode_direct_CXX=yes
40714 +      hardcode_minus_L_CXX=yes # Not in the search PATH,
40715 +                                             # but as the default
40716 +                                             # location of the library.
40717 +      ;;
40718 +    esac
40719 +
40720 +    case $cc_basename in
40721 +      CC)
40722 +       # FIXME: insert proper C++ library support
40723 +       ld_shlibs_CXX=no
40724 +       ;;
40725 +      aCC)
40726 +       case "$host_cpu" in
40727 +       hppa*64*|ia64*)
40728 +         archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
40729 +         ;;
40730 +       *)
40731 +         archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
40732 +         ;;
40733 +       esac
40734 +       # Commands to make compiler produce verbose output that lists
40735 +       # what "hidden" libraries, object files and flags are used when
40736 +       # linking a shared library.
40737 +       #
40738 +       # There doesn't appear to be a way to prevent this compiler from
40739 +       # explicitly linking system object files so we need to strip them
40740 +       # from the output so that they don't get included in the library
40741 +       # dependencies.
40742 +       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
40743 +       ;;
40744 +      *)
40745 +       if test "$GXX" = yes; then
40746 +         if test $with_gnu_ld = no; then
40747 +           case "$host_cpu" in
40748 +           ia64*|hppa*64*)
40749 +             archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
40750 +             ;;
40751 +           *)
40752 +             archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
40753 +             ;;
40754 +           esac
40755 +         fi
40756 +       else
40757 +         # FIXME: insert proper C++ library support
40758 +         ld_shlibs_CXX=no
40759 +       fi
40760 +       ;;
40761 +    esac
40762 +    ;;
40763 +  irix5* | irix6*)
40764 +    case $cc_basename in
40765 +      CC)
40766 +       # SGI C++
40767 +       archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
40768 +
40769 +       # Archives containing C++ object files must be created using
40770 +       # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
40771 +       # necessary to make sure instantiated templates are included
40772 +       # in the archive.
40773 +       old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
40774 +       ;;
40775 +      *)
40776 +       if test "$GXX" = yes; then
40777 +         if test "$with_gnu_ld" = no; then
40778 +           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
40779 +         else
40780 +           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
40781 +         fi
40782 +       fi
40783 +       link_all_deplibs_CXX=yes
40784 +       ;;
40785 +    esac
40786 +    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
40787 +    hardcode_libdir_separator_CXX=:
40788 +    ;;
40789 +  linux*)
40790 +    case $cc_basename in
40791 +      KCC)
40792 +       # Kuck and Associates, Inc. (KAI) C++ Compiler
40793 +
40794 +       # KCC will only create a shared library if the output file
40795 +       # ends with ".so" (or ".sl" for HP-UX), so rename the library
40796 +       # to its proper name (with version) after linking.
40797 +       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
40798 +       archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
40799 +       # Commands to make compiler produce verbose output that lists
40800 +       # what "hidden" libraries, object files and flags are used when
40801 +       # linking a shared library.
40802 +       #
40803 +       # There doesn't appear to be a way to prevent this compiler from
40804 +       # explicitly linking system object files so we need to strip them
40805 +       # from the output so that they don't get included in the library
40806 +       # dependencies.
40807 +       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
40808 +
40809 +       hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
40810 +       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
40811 +
40812 +       # Archives containing C++ object files must be created using
40813 +       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
40814 +       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
40815 +       ;;
40816 +      icpc)
40817 +       # Intel C++
40818 +       with_gnu_ld=yes
40819 +       # version 8.0 and above of icpc choke on multiply defined symbols
40820 +       # if we add $predep_objects and $postdep_objects, however 7.1 and
40821 +       # earlier do not add the objects themselves.
40822 +       case `$CC -V 2>&1` in
40823 +       *"Version 7."*)
40824 +         archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
40825 +         archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
40826 +         ;;
40827 +       *)  # Version 8.0 or newer
40828 +         tmp_idyn=
40829 +         case $host_cpu in
40830 +           ia64*) tmp_idyn=' -i_dynamic';;
40831 +         esac
40832 +         archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
40833 +         archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
40834 +         ;;
40835 +       esac
40836 +       archive_cmds_need_lc_CXX=no
40837 +       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
40838 +       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
40839 +       whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
40840 +       ;;
40841 +      pgCC)
40842 +        # Portland Group C++ compiler
40843 +       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
40844 +       archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
40845 +
40846 +       hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
40847 +       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
40848 +        ;;
40849 +      cxx)
40850 +       # Compaq C++
40851 +       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
40852 +       archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
40853 +
40854 +       runpath_var=LD_RUN_PATH
40855 +       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
40856 +       hardcode_libdir_separator_CXX=:
40857 +
40858 +       # Commands to make compiler produce verbose output that lists
40859 +       # what "hidden" libraries, object files and flags are used when
40860 +       # linking a shared library.
40861 +       #
40862 +       # There doesn't appear to be a way to prevent this compiler from
40863 +       # explicitly linking system object files so we need to strip them
40864 +       # from the output so that they don't get included in the library
40865 +       # dependencies.
40866 +       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
40867 +       ;;
40868 +    esac
40869 +    ;;
40870 +  lynxos*)
40871 +    # FIXME: insert proper C++ library support
40872 +    ld_shlibs_CXX=no
40873 +    ;;
40874 +  m88k*)
40875 +    # FIXME: insert proper C++ library support
40876 +    ld_shlibs_CXX=no
40877 +    ;;
40878 +  mvs*)
40879 +    case $cc_basename in
40880 +      cxx)
40881 +       # FIXME: insert proper C++ library support
40882 +       ld_shlibs_CXX=no
40883 +       ;;
40884 +      *)
40885 +       # FIXME: insert proper C++ library support
40886 +       ld_shlibs_CXX=no
40887 +       ;;
40888 +    esac
40889 +    ;;
40890 +  netbsd*)
40891 +    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
40892 +      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
40893 +      wlarc=
40894 +      hardcode_libdir_flag_spec_CXX='-R$libdir'
40895 +      hardcode_direct_CXX=yes
40896 +      hardcode_shlibpath_var_CXX=no
40897 +    fi
40898 +    # Workaround some broken pre-1.5 toolchains
40899 +    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
40900 +    ;;
40901 +  openbsd2*)
40902 +    # C++ shared libraries are fairly broken
40903 +    ld_shlibs_CXX=no
40904 +    ;;
40905 +  openbsd*)
40906 +    hardcode_direct_CXX=yes
40907 +    hardcode_shlibpath_var_CXX=no
40908 +    archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
40909 +    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
40910 +    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
40911 +      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
40912 +      export_dynamic_flag_spec_CXX='${wl}-E'
40913 +      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
40914 +    fi
40915 +    output_verbose_link_cmd='echo'
40916 +    ;;
40917 +  osf3*)
40918 +    case $cc_basename in
40919 +      KCC)
40920 +       # Kuck and Associates, Inc. (KAI) C++ Compiler
40921 +
40922 +       # KCC will only create a shared library if the output file
40923 +       # ends with ".so" (or ".sl" for HP-UX), so rename the library
40924 +       # to its proper name (with version) after linking.
40925 +       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
40926 +
40927 +       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
40928 +       hardcode_libdir_separator_CXX=:
40929 +
40930 +       # Archives containing C++ object files must be created using
40931 +       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
40932 +       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
40933 +
40934 +       ;;
40935 +      RCC)
40936 +       # Rational C++ 2.4.1
40937 +       # FIXME: insert proper C++ library support
40938 +       ld_shlibs_CXX=no
40939 +       ;;
40940 +      cxx)
40941 +       allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
40942 +       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
40943 +
40944 +       hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
40945 +       hardcode_libdir_separator_CXX=:
40946 +
40947 +       # Commands to make compiler produce verbose output that lists
40948 +       # what "hidden" libraries, object files and flags are used when
40949 +       # linking a shared library.
40950 +       #
40951 +       # There doesn't appear to be a way to prevent this compiler from
40952 +       # explicitly linking system object files so we need to strip them
40953 +       # from the output so that they don't get included in the library
40954 +       # dependencies.
40955 +       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
40956 +       ;;
40957 +      *)
40958 +       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
40959 +         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
40960 +         archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
40961 +
40962 +         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
40963 +         hardcode_libdir_separator_CXX=:
40964 +
40965 +         # Commands to make compiler produce verbose output that lists
40966 +         # what "hidden" libraries, object files and flags are used when
40967 +         # linking a shared library.
40968 +         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
40969 +
40970 +       else
40971 +         # FIXME: insert proper C++ library support
40972 +         ld_shlibs_CXX=no
40973 +       fi
40974 +       ;;
40975 +    esac
40976 +    ;;
40977 +  osf4* | osf5*)
40978 +    case $cc_basename in
40979 +      KCC)
40980 +       # Kuck and Associates, Inc. (KAI) C++ Compiler
40981 +
40982 +       # KCC will only create a shared library if the output file
40983 +       # ends with ".so" (or ".sl" for HP-UX), so rename the library
40984 +       # to its proper name (with version) after linking.
40985 +       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
40986 +
40987 +       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
40988 +       hardcode_libdir_separator_CXX=:
40989 +
40990 +       # Archives containing C++ object files must be created using
40991 +       # the KAI C++ compiler.
40992 +       old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
40993 +       ;;
40994 +      RCC)
40995 +       # Rational C++ 2.4.1
40996 +       # FIXME: insert proper C++ library support
40997 +       ld_shlibs_CXX=no
40998 +       ;;
40999 +      cxx)
41000 +       allow_undefined_flag_CXX=' -expect_unresolved \*'
41001 +       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
41002 +       archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
41003 +         echo "-hidden">> $lib.exp~
41004 +         $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
41005 +         $rm $lib.exp'
41006 +
41007 +       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
41008 +       hardcode_libdir_separator_CXX=:
41009 +
41010 +       # Commands to make compiler produce verbose output that lists
41011 +       # what "hidden" libraries, object files and flags are used when
41012 +       # linking a shared library.
41013 +       #
41014 +       # There doesn't appear to be a way to prevent this compiler from
41015 +       # explicitly linking system object files so we need to strip them
41016 +       # from the output so that they don't get included in the library
41017 +       # dependencies.
41018 +       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
41019 +       ;;
41020 +      *)
41021 +       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
41022 +         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
41023 +        archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
41024 +
41025 +         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
41026 +         hardcode_libdir_separator_CXX=:
41027 +
41028 +         # Commands to make compiler produce verbose output that lists
41029 +         # what "hidden" libraries, object files and flags are used when
41030 +         # linking a shared library.
41031 +         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
41032 +
41033 +       else
41034 +         # FIXME: insert proper C++ library support
41035 +         ld_shlibs_CXX=no
41036 +       fi
41037 +       ;;
41038 +    esac
41039 +    ;;
41040 +  psos*)
41041 +    # FIXME: insert proper C++ library support
41042 +    ld_shlibs_CXX=no
41043 +    ;;
41044 +  sco*)
41045 +    archive_cmds_need_lc_CXX=no
41046 +    case $cc_basename in
41047 +      CC)
41048 +       # FIXME: insert proper C++ library support
41049 +       ld_shlibs_CXX=no
41050 +       ;;
41051 +      *)
41052 +       # FIXME: insert proper C++ library support
41053 +       ld_shlibs_CXX=no
41054 +       ;;
41055 +    esac
41056 +    ;;
41057 +  sunos4*)
41058 +    case $cc_basename in
41059 +      CC)
41060 +       # Sun C++ 4.x
41061 +       # FIXME: insert proper C++ library support
41062 +       ld_shlibs_CXX=no
41063 +       ;;
41064 +      lcc)
41065 +       # Lucid
41066 +       # FIXME: insert proper C++ library support
41067 +       ld_shlibs_CXX=no
41068 +       ;;
41069 +      *)
41070 +       # FIXME: insert proper C++ library support
41071 +       ld_shlibs_CXX=no
41072 +       ;;
41073 +    esac
41074 +    ;;
41075 +  solaris*)
41076 +    case $cc_basename in
41077 +      CC)
41078 +       # Sun C++ 4.2, 5.x and Centerline C++
41079 +       no_undefined_flag_CXX=' -zdefs'
41080 +       archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
41081 +       archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
41082 +       $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
41083 +
41084 +       hardcode_libdir_flag_spec_CXX='-R$libdir'
41085 +       hardcode_shlibpath_var_CXX=no
41086 +       case $host_os in
41087 +         solaris2.[0-5] | solaris2.[0-5].*) ;;
41088 +         *)
41089 +           # The C++ compiler is used as linker so we must use $wl
41090 +           # flag to pass the commands to the underlying system
41091 +           # linker.
41092 +           # Supported since Solaris 2.6 (maybe 2.5.1?)
41093 +           whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
41094 +           ;;
41095 +       esac
41096 +       link_all_deplibs_CXX=yes
41097 +
41098 +       # Commands to make compiler produce verbose output that lists
41099 +       # what "hidden" libraries, object files and flags are used when
41100 +       # linking a shared library.
41101 +       #
41102 +       # There doesn't appear to be a way to prevent this compiler from
41103 +       # explicitly linking system object files so we need to strip them
41104 +       # from the output so that they don't get included in the library
41105 +       # dependencies.
41106 +       output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
41107 +
41108 +       # Archives containing C++ object files must be created using
41109 +       # "CC -xar", where "CC" is the Sun C++ compiler.  This is
41110 +       # necessary to make sure instantiated templates are included
41111 +       # in the archive.
41112 +       old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
41113 +       ;;
41114 +      gcx)
41115 +       # Green Hills C++ Compiler
41116 +       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
41117 +
41118 +       # The C++ compiler must be used to create the archive.
41119 +       old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
41120 +       ;;
41121 +      *)
41122 +       # GNU C++ compiler with Solaris linker
41123 +       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
41124 +         no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
41125 +         if $CC --version | grep -v '^2\.7' > /dev/null; then
41126 +           archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
41127 +           archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
41128 +               $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
41129 +
41130 +           # Commands to make compiler produce verbose output that lists
41131 +           # what "hidden" libraries, object files and flags are used when
41132 +           # linking a shared library.
41133 +           output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
41134 +         else
41135 +           # g++ 2.7 appears to require `-G' NOT `-shared' on this
41136 +           # platform.
41137 +           archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
41138 +           archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
41139 +               $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
41140 +
41141 +           # Commands to make compiler produce verbose output that lists
41142 +           # what "hidden" libraries, object files and flags are used when
41143 +           # linking a shared library.
41144 +           output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
41145 +         fi
41146 +
41147 +         hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
41148 +       fi
41149 +       ;;
41150 +    esac
41151 +    ;;
41152 +  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
41153 +    archive_cmds_need_lc_CXX=no
41154 +    ;;
41155 +  tandem*)
41156 +    case $cc_basename in
41157 +      NCC)
41158 +       # NonStop-UX NCC 3.20
41159 +       # FIXME: insert proper C++ library support
41160 +       ld_shlibs_CXX=no
41161 +       ;;
41162 +      *)
41163 +       # FIXME: insert proper C++ library support
41164 +       ld_shlibs_CXX=no
41165 +       ;;
41166 +    esac
41167 +    ;;
41168 +  vxworks*)
41169 +    # FIXME: insert proper C++ library support
41170 +    ld_shlibs_CXX=no
41171 +    ;;
41172 +  *)
41173 +    # FIXME: insert proper C++ library support
41174 +    ld_shlibs_CXX=no
41175 +    ;;
41176 +esac
41177 +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
41178 +echo "${ECHO_T}$ld_shlibs_CXX" >&6
41179 +test "$ld_shlibs_CXX" = no && can_build_shared=no
41180 +
41181 +GCC_CXX="$GXX"
41182 +LD_CXX="$LD"
41183 +
41184 +
41185 +cat > conftest.$ac_ext <<EOF
41186 +class Foo
41187 +{
41188 +public:
41189 +  Foo (void) { a = 0; }
41190 +private:
41191 +  int a;
41192 +};
41193 +EOF
41194 +
41195 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41196 +  (eval $ac_compile) 2>&5
41197 +  ac_status=$?
41198 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
41199 +  (exit $ac_status); }; then
41200 +  # Parse the compiler output and extract the necessary
41201 +  # objects, libraries and library flags.
41202 +
41203 +  # Sentinel used to keep track of whether or not we are before
41204 +  # the conftest object file.
41205 +  pre_test_object_deps_done=no
41206 +
41207 +  # The `*' in the case matches for architectures that use `case' in
41208 +  # $output_verbose_cmd can trigger glob expansion during the loop
41209 +  # eval without this substitution.
41210 +  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
41211 +
41212 +  for p in `eval $output_verbose_link_cmd`; do
41213 +    case $p in
41214 +
41215 +    -L* | -R* | -l*)
41216 +       # Some compilers place space between "-{L,R}" and the path.
41217 +       # Remove the space.
41218 +       if test $p = "-L" \
41219 +         || test $p = "-R"; then
41220 +        prev=$p
41221 +        continue
41222 +       else
41223 +        prev=
41224 +       fi
41225 +
41226 +       if test "$pre_test_object_deps_done" = no; then
41227 +        case $p in
41228 +        -L* | -R*)
41229 +          # Internal compiler library paths should come after those
41230 +          # provided the user.  The postdeps already come after the
41231 +          # user supplied libs so there is no need to process them.
41232 +          if test -z "$compiler_lib_search_path_CXX"; then
41233 +            compiler_lib_search_path_CXX="${prev}${p}"
41234 +          else
41235 +            compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
41236 +          fi
41237 +          ;;
41238 +        # The "-l" case would never come before the object being
41239 +        # linked, so don't bother handling this case.
41240 +        esac
41241 +       else
41242 +        if test -z "$postdeps_CXX"; then
41243 +          postdeps_CXX="${prev}${p}"
41244 +        else
41245 +          postdeps_CXX="${postdeps_CXX} ${prev}${p}"
41246 +        fi
41247 +       fi
41248 +       ;;
41249 +
41250 +    *.$objext)
41251 +       # This assumes that the test object file only shows up
41252 +       # once in the compiler output.
41253 +       if test "$p" = "conftest.$objext"; then
41254 +        pre_test_object_deps_done=yes
41255 +        continue
41256 +       fi
41257 +
41258 +       if test "$pre_test_object_deps_done" = no; then
41259 +        if test -z "$predep_objects_CXX"; then
41260 +          predep_objects_CXX="$p"
41261 +        else
41262 +          predep_objects_CXX="$predep_objects_CXX $p"
41263 +        fi
41264 +       else
41265 +        if test -z "$postdep_objects_CXX"; then
41266 +          postdep_objects_CXX="$p"
41267 +        else
41268 +          postdep_objects_CXX="$postdep_objects_CXX $p"
41269 +        fi
41270 +       fi
41271 +       ;;
41272 +
41273 +    *) ;; # Ignore the rest.
41274 +
41275 +    esac
41276 +  done
41277 +
41278 +  # Clean up.
41279 +  rm -f a.out a.exe
41280 +else
41281 +  echo "libtool.m4: error: problem compiling CXX test program"
41282 +fi
41283 +
41284 +$rm -f confest.$objext
41285 +
41286 +case " $postdeps_CXX " in
41287 +*" -lc "*) archive_cmds_need_lc_CXX=no ;;
41288 +esac
41289 +
41290 +lt_prog_compiler_wl_CXX=
41291 +lt_prog_compiler_pic_CXX=
41292 +lt_prog_compiler_static_CXX=
41293 +
41294 +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
41295 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
41296 +
41297 +  # C++ specific cases for pic, static, wl, etc.
41298 +  if test "$GXX" = yes; then
41299 +    lt_prog_compiler_wl_CXX='-Wl,'
41300 +    lt_prog_compiler_static_CXX='-static'
41301 +
41302 +    case $host_os in
41303 +    aix*)
41304 +      # All AIX code is PIC.
41305 +      if test "$host_cpu" = ia64; then
41306 +       # AIX 5 now supports IA64 processor
41307 +       lt_prog_compiler_static_CXX='-Bstatic'
41308 +      fi
41309 +      ;;
41310 +    amigaos*)
41311 +      # FIXME: we need at least 68020 code to build shared libraries, but
41312 +      # adding the `-m68020' flag to GCC prevents building anything better,
41313 +      # like `-m68040'.
41314 +      lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
41315 +      ;;
41316 +    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
41317 +      # PIC is the default for these OSes.
41318 +      ;;
41319 +    mingw* | os2* | pw32*)
41320 +      # This hack is so that the source file can tell whether it is being
41321 +      # built for inclusion in a dll (and should export symbols for example).
41322 +      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
41323 +      ;;
41324 +    darwin* | rhapsody*)
41325 +      # PIC is the default on this platform
41326 +      # Common symbols not allowed in MH_DYLIB files
41327 +      lt_prog_compiler_pic_CXX='-fno-common'
41328 +      ;;
41329 +    *djgpp*)
41330 +      # DJGPP does not support shared libraries at all
41331 +      lt_prog_compiler_pic_CXX=
41332 +      ;;
41333 +    sysv4*MP*)
41334 +      if test -d /usr/nec; then
41335 +       lt_prog_compiler_pic_CXX=-Kconform_pic
41336 +      fi
41337 +      ;;
41338 +    hpux*)
41339 +      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
41340 +      # not for PA HP-UX.
41341 +      case "$host_cpu" in
41342 +      hppa*64*|ia64*)
41343 +       ;;
41344 +      *)
41345 +       lt_prog_compiler_pic_CXX='-fPIC'
41346 +       ;;
41347 +      esac
41348 +      ;;
41349 +    *)
41350 +      lt_prog_compiler_pic_CXX='-fPIC'
41351 +      ;;
41352 +    esac
41353 +  else
41354 +    case $host_os in
41355 +      aix4* | aix5*)
41356 +       # All AIX code is PIC.
41357 +       if test "$host_cpu" = ia64; then
41358 +         # AIX 5 now supports IA64 processor
41359 +         lt_prog_compiler_static_CXX='-Bstatic'
41360 +       else
41361 +         lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
41362 +       fi
41363 +       ;;
41364 +      chorus*)
41365 +       case $cc_basename in
41366 +       cxch68)
41367 +         # Green Hills C++ Compiler
41368 +         # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
41369 +         ;;
41370 +       esac
41371 +       ;;
41372 +       darwin*)
41373 +         # PIC is the default on this platform
41374 +         # Common symbols not allowed in MH_DYLIB files
41375 +         case "$cc_basename" in
41376 +           xlc*)
41377 +           lt_prog_compiler_pic_CXX='-qnocommon'
41378 +           lt_prog_compiler_wl_CXX='-Wl,'
41379 +           ;;
41380 +         esac
41381 +       ;;
41382 +      dgux*)
41383 +       case $cc_basename in
41384 +         ec++)
41385 +           lt_prog_compiler_pic_CXX='-KPIC'
41386 +           ;;
41387 +         ghcx)
41388 +           # Green Hills C++ Compiler
41389 +           lt_prog_compiler_pic_CXX='-pic'
41390 +           ;;
41391 +         *)
41392 +           ;;
41393 +       esac
41394 +       ;;
41395 +      freebsd* | kfreebsd*-gnu | dragonfly*)
41396 +       # FreeBSD uses GNU C++
41397 +       ;;
41398 +      hpux9* | hpux10* | hpux11*)
41399 +       case $cc_basename in
41400 +         CC)
41401 +           lt_prog_compiler_wl_CXX='-Wl,'
41402 +           lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
41403 +           if test "$host_cpu" != ia64; then
41404 +             lt_prog_compiler_pic_CXX='+Z'
41405 +           fi
41406 +           ;;
41407 +         aCC)
41408 +           lt_prog_compiler_wl_CXX='-Wl,'
41409 +           lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
41410 +           case "$host_cpu" in
41411 +           hppa*64*|ia64*)
41412 +             # +Z the default
41413 +             ;;
41414 +           *)
41415 +             lt_prog_compiler_pic_CXX='+Z'
41416 +             ;;
41417 +           esac
41418 +           ;;
41419 +         *)
41420 +           ;;
41421 +       esac
41422 +       ;;
41423 +      irix5* | irix6* | nonstopux*)
41424 +       case $cc_basename in
41425 +         CC)
41426 +           lt_prog_compiler_wl_CXX='-Wl,'
41427 +           lt_prog_compiler_static_CXX='-non_shared'
41428 +           # CC pic flag -KPIC is the default.
41429 +           ;;
41430 +         *)
41431 +           ;;
41432 +       esac
41433 +       ;;
41434 +      linux*)
41435 +       case $cc_basename in
41436 +         KCC)
41437 +           # KAI C++ Compiler
41438 +           lt_prog_compiler_wl_CXX='--backend -Wl,'
41439 +           lt_prog_compiler_pic_CXX='-fPIC'
41440 +           ;;
41441 +         icpc* | ecpc*)
41442 +           # Intel C++
41443 +           lt_prog_compiler_wl_CXX='-Wl,'
41444 +           lt_prog_compiler_pic_CXX='-KPIC'
41445 +           lt_prog_compiler_static_CXX='-static'
41446 +           ;;
41447 +         pgCC)
41448 +           # Portland Group C++ compiler.
41449 +           lt_prog_compiler_wl_CXX='-Wl,'
41450 +           lt_prog_compiler_pic_CXX='-fpic'
41451 +           lt_prog_compiler_static_CXX='-static'
41452 +           ;;
41453 +         cxx)
41454 +           # Compaq C++
41455 +           # Make sure the PIC flag is empty.  It appears that all Alpha
41456 +           # Linux and Compaq Tru64 Unix objects are PIC.
41457 +           lt_prog_compiler_pic_CXX=
41458 +           lt_prog_compiler_static_CXX='-non_shared'
41459 +           ;;
41460 +         *)
41461 +           ;;
41462 +       esac
41463 +       ;;
41464 +      lynxos*)
41465 +       ;;
41466 +      m88k*)
41467 +       ;;
41468 +      mvs*)
41469 +       case $cc_basename in
41470 +         cxx)
41471 +           lt_prog_compiler_pic_CXX='-W c,exportall'
41472 +           ;;
41473 +         *)
41474 +           ;;
41475 +       esac
41476 +       ;;
41477 +      netbsd*)
41478 +       ;;
41479 +      osf3* | osf4* | osf5*)
41480 +       case $cc_basename in
41481 +         KCC)
41482 +           lt_prog_compiler_wl_CXX='--backend -Wl,'
41483 +           ;;
41484 +         RCC)
41485 +           # Rational C++ 2.4.1
41486 +           lt_prog_compiler_pic_CXX='-pic'
41487 +           ;;
41488 +         cxx)
41489 +           # Digital/Compaq C++
41490 +           lt_prog_compiler_wl_CXX='-Wl,'
41491 +           # Make sure the PIC flag is empty.  It appears that all Alpha
41492 +           # Linux and Compaq Tru64 Unix objects are PIC.
41493 +           lt_prog_compiler_pic_CXX=
41494 +           lt_prog_compiler_static_CXX='-non_shared'
41495 +           ;;
41496 +         *)
41497 +           ;;
41498 +       esac
41499 +       ;;
41500 +      psos*)
41501 +       ;;
41502 +      sco*)
41503 +       case $cc_basename in
41504 +         CC)
41505 +           lt_prog_compiler_pic_CXX='-fPIC'
41506 +           ;;
41507 +         *)
41508 +           ;;
41509 +       esac
41510 +       ;;
41511 +      solaris*)
41512 +       case $cc_basename in
41513 +         CC)
41514 +           # Sun C++ 4.2, 5.x and Centerline C++
41515 +           lt_prog_compiler_pic_CXX='-KPIC'
41516 +           lt_prog_compiler_static_CXX='-Bstatic'
41517 +           lt_prog_compiler_wl_CXX='-Qoption ld '
41518 +           ;;
41519 +         gcx)
41520 +           # Green Hills C++ Compiler
41521 +           lt_prog_compiler_pic_CXX='-PIC'
41522 +           ;;
41523 +         *)
41524 +           ;;
41525 +       esac
41526 +       ;;
41527 +      sunos4*)
41528 +       case $cc_basename in
41529 +         CC)
41530 +           # Sun C++ 4.x
41531 +           lt_prog_compiler_pic_CXX='-pic'
41532 +           lt_prog_compiler_static_CXX='-Bstatic'
41533 +           ;;
41534 +         lcc)
41535 +           # Lucid
41536 +           lt_prog_compiler_pic_CXX='-pic'
41537 +           ;;
41538 +         *)
41539 +           ;;
41540 +       esac
41541 +       ;;
41542 +      tandem*)
41543 +       case $cc_basename in
41544 +         NCC)
41545 +           # NonStop-UX NCC 3.20
41546 +           lt_prog_compiler_pic_CXX='-KPIC'
41547 +           ;;
41548 +         *)
41549 +           ;;
41550 +       esac
41551 +       ;;
41552 +      unixware*)
41553 +       ;;
41554 +      vxworks*)
41555 +       ;;
41556 +      *)
41557 +       lt_prog_compiler_can_build_shared_CXX=no
41558 +       ;;
41559 +    esac
41560 +  fi
41561 +
41562 +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
41563 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
41564 +
41565 +#
41566 +# Check to make sure the PIC flag actually works.
41567 +#
41568 +if test -n "$lt_prog_compiler_pic_CXX"; then
41569 +
41570 +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
41571 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
41572 +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
41573 +  echo $ECHO_N "(cached) $ECHO_C" >&6
41574 +else
41575 +  lt_prog_compiler_pic_works_CXX=no
41576 +  ac_outfile=conftest.$ac_objext
41577 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
41578 +   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
41579 +   # Insert the option either (1) after the last *FLAGS variable, or
41580 +   # (2) before a word containing "conftest.", or (3) at the end.
41581 +   # Note that $ac_compile itself does not contain backslashes and begins
41582 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
41583 +   # The option is referenced via a variable to avoid confusing sed.
41584 +   lt_compile=`echo "$ac_compile" | $SED \
41585 +   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
41586 +   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
41587 +   -e 's:$: $lt_compiler_flag:'`
41588 +   (eval echo "\"\$as_me:11294: $lt_compile\"" >&5)
41589 +   (eval "$lt_compile" 2>conftest.err)
41590 +   ac_status=$?
41591 +   cat conftest.err >&5
41592 +   echo "$as_me:11298: \$? = $ac_status" >&5
41593 +   if (exit $ac_status) && test -s "$ac_outfile"; then
41594 +     # The compiler can only warn and ignore the option if not recognized
41595 +     # So say no if there are warnings
41596 +     if test ! -s conftest.err; then
41597 +       lt_prog_compiler_pic_works_CXX=yes
41598 +     fi
41599 +   fi
41600 +   $rm conftest*
41601 +
41602 +fi
41603 +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
41604 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
41605 +
41606 +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
41607 +    case $lt_prog_compiler_pic_CXX in
41608 +     "" | " "*) ;;
41609 +     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
41610 +     esac
41611 +else
41612 +    lt_prog_compiler_pic_CXX=
41613 +     lt_prog_compiler_can_build_shared_CXX=no
41614 +fi
41615 +
41616 +fi
41617 +case "$host_os" in
41618 +  # For platforms which do not support PIC, -DPIC is meaningless:
41619 +  *djgpp*)
41620 +    lt_prog_compiler_pic_CXX=
41621 +    ;;
41622 +  *)
41623 +    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
41624 +    ;;
41625 +esac
41626 +
41627 +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
41628 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
41629 +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
41630 +  echo $ECHO_N "(cached) $ECHO_C" >&6
41631 +else
41632 +  lt_cv_prog_compiler_c_o_CXX=no
41633 +   $rm -r conftest 2>/dev/null
41634 +   mkdir conftest
41635 +   cd conftest
41636 +   mkdir out
41637 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
41638 +
41639 +   lt_compiler_flag="-o out/conftest2.$ac_objext"
41640 +   # Insert the option either (1) after the last *FLAGS variable, or
41641 +   # (2) before a word containing "conftest.", or (3) at the end.
41642 +   # Note that $ac_compile itself does not contain backslashes and begins
41643 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
41644 +   lt_compile=`echo "$ac_compile" | $SED \
41645 +   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
41646 +   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
41647 +   -e 's:$: $lt_compiler_flag:'`
41648 +   (eval echo "\"\$as_me:11354: $lt_compile\"" >&5)
41649 +   (eval "$lt_compile" 2>out/conftest.err)
41650 +   ac_status=$?
41651 +   cat out/conftest.err >&5
41652 +   echo "$as_me:11358: \$? = $ac_status" >&5
41653 +   if (exit $ac_status) && test -s out/conftest2.$ac_objext
41654 +   then
41655 +     # The compiler can only warn and ignore the option if not recognized
41656 +     # So say no if there are warnings
41657 +     if test ! -s out/conftest.err; then
41658 +       lt_cv_prog_compiler_c_o_CXX=yes
41659 +     fi
41660 +   fi
41661 +   chmod u+w .
41662 +   $rm conftest*
41663 +   # SGI C++ compiler will create directory out/ii_files/ for
41664 +   # template instantiation
41665 +   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
41666 +   $rm out/* && rmdir out
41667 +   cd ..
41668 +   rmdir conftest
41669 +   $rm conftest*
41670 +
41671 +fi
41672 +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
41673 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
41674 +
41675 +
41676 +hard_links="nottested"
41677 +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
41678 +  # do not overwrite the value of need_locks provided by the user
41679 +  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
41680 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
41681 +  hard_links=yes
41682 +  $rm conftest*
41683 +  ln conftest.a conftest.b 2>/dev/null && hard_links=no
41684 +  touch conftest.a
41685 +  ln conftest.a conftest.b 2>&5 || hard_links=no
41686 +  ln conftest.a conftest.b 2>/dev/null && hard_links=no
41687 +  echo "$as_me:$LINENO: result: $hard_links" >&5
41688 +echo "${ECHO_T}$hard_links" >&6
41689 +  if test "$hard_links" = no; then
41690 +    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
41691 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
41692 +    need_locks=warn
41693 +  fi
41694 +else
41695 +  need_locks=no
41696 +fi
41697 +
41698 +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
41699 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
41700 +
41701 +  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
41702 +  case $host_os in
41703 +  aix4* | aix5*)
41704 +    # If we're using GNU nm, then we don't want the "-C" option.
41705 +    # -C means demangle to AIX nm, but means don't demangle with GNU nm
41706 +    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
41707 +      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
41708 +    else
41709 +      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
41710 +    fi
41711 +    ;;
41712 +  pw32*)
41713 +    export_symbols_cmds_CXX="$ltdll_cmds"
41714 +  ;;
41715 +  cygwin* | mingw*)
41716 +    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
41717 +  ;;
41718 +  *)
41719 +    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
41720 +  ;;
41721 +  esac
41722 +
41723 +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
41724 +echo "${ECHO_T}$ld_shlibs_CXX" >&6
41725 +test "$ld_shlibs_CXX" = no && can_build_shared=no
41726 +
41727 +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
41728 +if test "$GCC" = yes; then
41729 +  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
41730 +fi
41731 +
41732 +#
41733 +# Do we need to explicitly link libc?
41734 +#
41735 +case "x$archive_cmds_need_lc_CXX" in
41736 +x|xyes)
41737 +  # Assume -lc should be added
41738 +  archive_cmds_need_lc_CXX=yes
41739 +
41740 +  if test "$enable_shared" = yes && test "$GCC" = yes; then
41741 +    case $archive_cmds_CXX in
41742 +    *'~'*)
41743 +      # FIXME: we may have to deal with multi-command sequences.
41744 +      ;;
41745 +    '$CC '*)
41746 +      # Test whether the compiler implicitly links with -lc since on some
41747 +      # systems, -lgcc has to come before -lc. If gcc already passes -lc
41748 +      # to ld, don't add -lc before -lgcc.
41749 +      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
41750 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
41751 +      $rm conftest*
41752 +      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
41753 +
41754 +      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
41755 +  (eval $ac_compile) 2>&5
41756 +  ac_status=$?
41757 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
41758 +  (exit $ac_status); } 2>conftest.err; then
41759 +        soname=conftest
41760 +        lib=conftest
41761 +        libobjs=conftest.$ac_objext
41762 +        deplibs=
41763 +        wl=$lt_prog_compiler_wl_CXX
41764 +        compiler_flags=-v
41765 +        linker_flags=-v
41766 +        verstring=
41767 +        output_objdir=.
41768 +        libname=conftest
41769 +        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
41770 +        allow_undefined_flag_CXX=
41771 +        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
41772 +  (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
41773 +  ac_status=$?
41774 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
41775 +  (exit $ac_status); }
41776 +        then
41777 +         archive_cmds_need_lc_CXX=no
41778 +        else
41779 +         archive_cmds_need_lc_CXX=yes
41780 +        fi
41781 +        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
41782 +      else
41783 +        cat conftest.err 1>&5
41784 +      fi
41785 +      $rm conftest*
41786 +      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
41787 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
41788 +      ;;
41789 +    esac
41790 +  fi
41791 +  ;;
41792 +esac
41793 +
41794 +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
41795 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
41796 +library_names_spec=
41797 +libname_spec='lib$name'
41798 +soname_spec=
41799 +shrext_cmds=".so"
41800 +postinstall_cmds=
41801 +postuninstall_cmds=
41802 +finish_cmds=
41803 +finish_eval=
41804 +shlibpath_var=
41805 +shlibpath_overrides_runpath=unknown
41806 +version_type=none
41807 +dynamic_linker="$host_os ld.so"
41808 +sys_lib_dlsearch_path_spec="/lib /usr/lib"
41809 +if test "$GCC" = yes; then
41810 +  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
41811 +  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
41812 +    # if the path contains ";" then we assume it to be the separator
41813 +    # otherwise default to the standard path separator (i.e. ":") - it is
41814 +    # assumed that no part of a normal pathname contains ";" but that should
41815 +    # okay in the real world where ";" in dirpaths is itself problematic.
41816 +    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
41817 +  else
41818 +    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
41819 +  fi
41820 +else
41821 +  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
41822 +fi
41823 +need_lib_prefix=unknown
41824 +hardcode_into_libs=no
41825 +
41826 +# when you set need_version to no, make sure it does not cause -set_version
41827 +# flags to be left without arguments
41828 +need_version=unknown
41829 +
41830 +case $host_os in
41831 +aix3*)
41832 +  version_type=linux
41833 +  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
41834 +  shlibpath_var=LIBPATH
41835 +
41836 +  # AIX 3 has no versioning support, so we append a major version to the name.
41837 +  soname_spec='${libname}${release}${shared_ext}$major'
41838 +  ;;
41839 +
41840 +aix4* | aix5*)
41841 +  version_type=linux
41842 +  need_lib_prefix=no
41843 +  need_version=no
41844 +  hardcode_into_libs=yes
41845 +  if test "$host_cpu" = ia64; then
41846 +    # AIX 5 supports IA64
41847 +    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
41848 +    shlibpath_var=LD_LIBRARY_PATH
41849 +  else
41850 +    # With GCC up to 2.95.x, collect2 would create an import file
41851 +    # for dependence libraries.  The import file would start with
41852 +    # the line `#! .'.  This would cause the generated library to
41853 +    # depend on `.', always an invalid library.  This was fixed in
41854 +    # development snapshots of GCC prior to 3.0.
41855 +    case $host_os in
41856 +      aix4 | aix4.[01] | aix4.[01].*)
41857 +      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
41858 +          echo ' yes '
41859 +          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
41860 +       :
41861 +      else
41862 +       can_build_shared=no
41863 +      fi
41864 +      ;;
41865 +    esac
41866 +    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
41867 +    # soname into executable. Probably we can add versioning support to
41868 +    # collect2, so additional links can be useful in future.
41869 +    if test "$aix_use_runtimelinking" = yes; then
41870 +      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
41871 +      # instead of lib<name>.a to let people know that these are not
41872 +      # typical AIX shared libraries.
41873 +      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
41874 +    else
41875 +      # We preserve .a as extension for shared libraries through AIX4.2
41876 +      # and later when we are not doing run time linking.
41877 +      library_names_spec='${libname}${release}.a $libname.a'
41878 +      soname_spec='${libname}${release}${shared_ext}$major'
41879 +    fi
41880 +    shlibpath_var=LIBPATH
41881 +  fi
41882 +  ;;
41883 +
41884 +amigaos*)
41885 +  library_names_spec='$libname.ixlibrary $libname.a'
41886 +  # Create ${libname}_ixlibrary.a entries in /sys/libs.
41887 +  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
41888 +  ;;
41889 +
41890 +beos*)
41891 +  library_names_spec='${libname}${shared_ext}'
41892 +  dynamic_linker="$host_os ld.so"
41893 +  shlibpath_var=LIBRARY_PATH
41894 +  ;;
41895 +
41896 +bsdi[45]*)
41897 +  version_type=linux
41898 +  need_version=no
41899 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
41900 +  soname_spec='${libname}${release}${shared_ext}$major'
41901 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
41902 +  shlibpath_var=LD_LIBRARY_PATH
41903 +  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
41904 +  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
41905 +  # the default ld.so.conf also contains /usr/contrib/lib and
41906 +  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
41907 +  # libtool to hard-code these into programs
41908 +  ;;
41909 +
41910 +cygwin* | mingw* | pw32*)
41911 +  version_type=windows
41912 +  shrext_cmds=".dll"
41913 +  need_version=no
41914 +  need_lib_prefix=no
41915 +
41916 +  case $GCC,$host_os in
41917 +  yes,cygwin* | yes,mingw* | yes,pw32*)
41918 +    library_names_spec='$libname.dll.a'
41919 +    # DLL is installed to $(libdir)/../bin by postinstall_cmds
41920 +    postinstall_cmds='base_file=`basename \${file}`~
41921 +      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
41922 +      dldir=$destdir/`dirname \$dlpath`~
41923 +      test -d \$dldir || mkdir -p \$dldir~
41924 +      $install_prog $dir/$dlname \$dldir/$dlname'
41925 +    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
41926 +      dlpath=$dir/\$dldll~
41927 +       $rm \$dlpath'
41928 +    shlibpath_overrides_runpath=yes
41929 +
41930 +    case $host_os in
41931 +    cygwin*)
41932 +      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
41933 +      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
41934 +      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
41935 +      ;;
41936 +    mingw*)
41937 +      # MinGW DLLs use traditional 'lib' prefix
41938 +      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
41939 +      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
41940 +      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
41941 +        # It is most probably a Windows format PATH printed by
41942 +        # mingw gcc, but we are running on Cygwin. Gcc prints its search
41943 +        # path with ; separators, and with drive letters. We can handle the
41944 +        # drive letters (cygwin fileutils understands them), so leave them,
41945 +        # especially as we might pass files found there to a mingw objdump,
41946 +        # which wouldn't understand a cygwinified path. Ahh.
41947 +        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
41948 +      else
41949 +        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
41950 +      fi
41951 +      ;;
41952 +    pw32*)
41953 +      # pw32 DLLs use 'pw' prefix rather than 'lib'
41954 +      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
41955 +      ;;
41956 +    esac
41957 +    ;;
41958 +
41959 +  *)
41960 +    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
41961 +    ;;
41962 +  esac
41963 +  dynamic_linker='Win32 ld.exe'
41964 +  # FIXME: first we should search . and the directory the executable is in
41965 +  shlibpath_var=PATH
41966 +  ;;
41967 +
41968 +darwin* | rhapsody*)
41969 +  dynamic_linker="$host_os dyld"
41970 +  version_type=darwin
41971 +  need_lib_prefix=no
41972 +  need_version=no
41973 +  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
41974 +  soname_spec='${libname}${release}${major}$shared_ext'
41975 +  shlibpath_overrides_runpath=yes
41976 +  shlibpath_var=DYLD_LIBRARY_PATH
41977 +  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
41978 +  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
41979 +  if test "$GCC" = yes; then
41980 +    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
41981 +  else
41982 +    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
41983 +  fi
41984 +  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
41985 +  ;;
41986 +
41987 +dgux*)
41988 +  version_type=linux
41989 +  need_lib_prefix=no
41990 +  need_version=no
41991 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
41992 +  soname_spec='${libname}${release}${shared_ext}$major'
41993 +  shlibpath_var=LD_LIBRARY_PATH
41994 +  ;;
41995 +
41996 +freebsd1*)
41997 +  dynamic_linker=no
41998 +  ;;
41999 +
42000 +kfreebsd*-gnu)
42001 +  version_type=linux
42002 +  need_lib_prefix=no
42003 +  need_version=no
42004 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
42005 +  soname_spec='${libname}${release}${shared_ext}$major'
42006 +  shlibpath_var=LD_LIBRARY_PATH
42007 +  shlibpath_overrides_runpath=no
42008 +  hardcode_into_libs=yes
42009 +  dynamic_linker='GNU ld.so'
42010 +  ;;
42011 +
42012 +freebsd* | dragonfly*)
42013 +  # DragonFly does not have aout.  When/if they implement a new
42014 +  # versioning mechanism, adjust this.
42015 +  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
42016 +  version_type=freebsd-$objformat
42017 +  case $version_type in
42018 +    freebsd-elf*)
42019 +      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
42020 +      need_version=no
42021 +      need_lib_prefix=no
42022 +      ;;
42023 +    freebsd-*)
42024 +      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
42025 +      need_version=yes
42026 +      ;;
42027 +  esac
42028 +  shlibpath_var=LD_LIBRARY_PATH
42029 +  case $host_os in
42030 +  freebsd2*)
42031 +    shlibpath_overrides_runpath=yes
42032 +    ;;
42033 +  freebsd3.[01]* | freebsdelf3.[01]*)
42034 +    shlibpath_overrides_runpath=yes
42035 +    hardcode_into_libs=yes
42036 +    ;;
42037 +  *) # from 3.2 on
42038 +    shlibpath_overrides_runpath=no
42039 +    hardcode_into_libs=yes
42040 +    ;;
42041 +  esac
42042 +  ;;
42043 +
42044 +gnu*)
42045 +  version_type=linux
42046 +  need_lib_prefix=no
42047 +  need_version=no
42048 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
42049 +  soname_spec='${libname}${release}${shared_ext}$major'
42050 +  shlibpath_var=LD_LIBRARY_PATH
42051 +  hardcode_into_libs=yes
42052 +  ;;
42053 +
42054 +hpux9* | hpux10* | hpux11*)
42055 +  # Give a soname corresponding to the major version so that dld.sl refuses to
42056 +  # link against other versions.
42057 +  version_type=sunos
42058 +  need_lib_prefix=no
42059 +  need_version=no
42060 +  case "$host_cpu" in
42061 +  ia64*)
42062 +    shrext_cmds='.so'
42063 +    hardcode_into_libs=yes
42064 +    dynamic_linker="$host_os dld.so"
42065 +    shlibpath_var=LD_LIBRARY_PATH
42066 +    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
42067 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
42068 +    soname_spec='${libname}${release}${shared_ext}$major'
42069 +    if test "X$HPUX_IA64_MODE" = X32; then
42070 +      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
42071 +    else
42072 +      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
42073 +    fi
42074 +    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
42075 +    ;;
42076 +   hppa*64*)
42077 +     shrext_cmds='.sl'
42078 +     hardcode_into_libs=yes
42079 +     dynamic_linker="$host_os dld.sl"
42080 +     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
42081 +     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
42082 +     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
42083 +     soname_spec='${libname}${release}${shared_ext}$major'
42084 +     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
42085 +     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
42086 +     ;;
42087 +   *)
42088 +    shrext_cmds='.sl'
42089 +    dynamic_linker="$host_os dld.sl"
42090 +    shlibpath_var=SHLIB_PATH
42091 +    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
42092 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
42093 +    soname_spec='${libname}${release}${shared_ext}$major'
42094 +    ;;
42095 +  esac
42096 +  # HP-UX runs *really* slowly unless shared libraries are mode 555.
42097 +  postinstall_cmds='chmod 555 $lib'
42098 +  ;;
42099 +
42100 +irix5* | irix6* | nonstopux*)
42101 +  case $host_os in
42102 +    nonstopux*) version_type=nonstopux ;;
42103 +    *)
42104 +       if test "$lt_cv_prog_gnu_ld" = yes; then
42105 +               version_type=linux
42106 +       else
42107 +               version_type=irix
42108 +       fi ;;
42109 +  esac
42110 +  need_lib_prefix=no
42111 +  need_version=no
42112 +  soname_spec='${libname}${release}${shared_ext}$major'
42113 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
42114 +  case $host_os in
42115 +  irix5* | nonstopux*)
42116 +    libsuff= shlibsuff=
42117 +    ;;
42118 +  *)
42119 +    case $LD in # libtool.m4 will add one of these switches to LD
42120 +    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
42121 +      libsuff= shlibsuff= libmagic=32-bit;;
42122 +    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
42123 +      libsuff=32 shlibsuff=N32 libmagic=N32;;
42124 +    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
42125 +      libsuff=64 shlibsuff=64 libmagic=64-bit;;
42126 +    *) libsuff= shlibsuff= libmagic=never-match;;
42127 +    esac
42128 +    ;;
42129 +  esac
42130 +  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
42131 +  shlibpath_overrides_runpath=no
42132 +  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
42133 +  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
42134 +  hardcode_into_libs=yes
42135 +  ;;
42136 +
42137 +# No shared lib support for Linux oldld, aout, or coff.
42138 +linux*oldld* | linux*aout* | linux*coff*)
42139 +  dynamic_linker=no
42140 +  ;;
42141 +
42142 +# This must be Linux ELF.
42143 +linux*)
42144 +  version_type=linux
42145 +  need_lib_prefix=no
42146 +  need_version=no
42147 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
42148 +  soname_spec='${libname}${release}${shared_ext}$major'
42149 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
42150 +  shlibpath_var=LD_LIBRARY_PATH
42151 +  shlibpath_overrides_runpath=no
42152 +  # This implies no fast_install, which is unacceptable.
42153 +  # Some rework will be needed to allow for fast_install
42154 +  # before this can be enabled.
42155 +  hardcode_into_libs=yes
42156 +
42157 +  # Append ld.so.conf contents to the search path
42158 +  if test -f /etc/ld.so.conf; then
42159 +    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
42160 +    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
42161 +  fi
42162 +
42163 +  # We used to test for /lib/ld.so.1 and disable shared libraries on
42164 +  # powerpc, because MkLinux only supported shared libraries with the
42165 +  # GNU dynamic linker.  Since this was broken with cross compilers,
42166 +  # most powerpc-linux boxes support dynamic linking these days and
42167 +  # people can always --disable-shared, the test was removed, and we
42168 +  # assume the GNU/Linux dynamic linker is in use.
42169 +  dynamic_linker='GNU/Linux ld.so'
42170 +  ;;
42171 +
42172 +knetbsd*-gnu)
42173 +  version_type=linux
42174 +  need_lib_prefix=no
42175 +  need_version=no
42176 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
42177 +  soname_spec='${libname}${release}${shared_ext}$major'
42178 +  shlibpath_var=LD_LIBRARY_PATH
42179 +  shlibpath_overrides_runpath=no
42180 +  hardcode_into_libs=yes
42181 +  dynamic_linker='GNU ld.so'
42182 +  ;;
42183 +
42184 +netbsd*)
42185 +  version_type=sunos
42186 +  need_lib_prefix=no
42187 +  need_version=no
42188 +  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
42189 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
42190 +    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
42191 +    dynamic_linker='NetBSD (a.out) ld.so'
42192 +  else
42193 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
42194 +    soname_spec='${libname}${release}${shared_ext}$major'
42195 +    dynamic_linker='NetBSD ld.elf_so'
42196 +  fi
42197 +  shlibpath_var=LD_LIBRARY_PATH
42198 +  shlibpath_overrides_runpath=yes
42199 +  hardcode_into_libs=yes
42200 +  ;;
42201 +
42202 +newsos6)
42203 +  version_type=linux
42204 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
42205 +  shlibpath_var=LD_LIBRARY_PATH
42206 +  shlibpath_overrides_runpath=yes
42207 +  ;;
42208 +
42209 +nto-qnx*)
42210 +  version_type=linux
42211 +  need_lib_prefix=no
42212 +  need_version=no
42213 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
42214 +  soname_spec='${libname}${release}${shared_ext}$major'
42215 +  shlibpath_var=LD_LIBRARY_PATH
42216 +  shlibpath_overrides_runpath=yes
42217 +  ;;
42218 +
42219 +openbsd*)
42220 +  version_type=sunos
42221 +  need_lib_prefix=no
42222 +  need_version=no
42223 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
42224 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
42225 +  shlibpath_var=LD_LIBRARY_PATH
42226 +  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
42227 +    case $host_os in
42228 +      openbsd2.[89] | openbsd2.[89].*)
42229 +       shlibpath_overrides_runpath=no
42230 +       ;;
42231 +      *)
42232 +       shlibpath_overrides_runpath=yes
42233 +       ;;
42234 +      esac
42235 +  else
42236 +    shlibpath_overrides_runpath=yes
42237 +  fi
42238 +  ;;
42239 +
42240 +os2*)
42241 +  libname_spec='$name'
42242 +  shrext_cmds=".dll"
42243 +  need_lib_prefix=no
42244 +  library_names_spec='$libname${shared_ext} $libname.a'
42245 +  dynamic_linker='OS/2 ld.exe'
42246 +  shlibpath_var=LIBPATH
42247 +  ;;
42248 +
42249 +osf3* | osf4* | osf5*)
42250 +  version_type=osf
42251 +  need_lib_prefix=no
42252 +  need_version=no
42253 +  soname_spec='${libname}${release}${shared_ext}$major'
42254 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
42255 +  shlibpath_var=LD_LIBRARY_PATH
42256 +  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
42257 +  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
42258 +  ;;
42259 +
42260 +sco3.2v5*)
42261 +  version_type=osf
42262 +  soname_spec='${libname}${release}${shared_ext}$major'
42263 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
42264 +  shlibpath_var=LD_LIBRARY_PATH
42265 +  ;;
42266 +
42267 +solaris*)
42268 +  version_type=linux
42269 +  need_lib_prefix=no
42270 +  need_version=no
42271 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
42272 +  soname_spec='${libname}${release}${shared_ext}$major'
42273 +  shlibpath_var=LD_LIBRARY_PATH
42274 +  shlibpath_overrides_runpath=yes
42275 +  hardcode_into_libs=yes
42276 +  # ldd complains unless libraries are executable
42277 +  postinstall_cmds='chmod +x $lib'
42278 +  ;;
42279 +
42280 +sunos4*)
42281 +  version_type=sunos
42282 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
42283 +  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
42284 +  shlibpath_var=LD_LIBRARY_PATH
42285 +  shlibpath_overrides_runpath=yes
42286 +  if test "$with_gnu_ld" = yes; then
42287 +    need_lib_prefix=no
42288 +  fi
42289 +  need_version=yes
42290 +  ;;
42291 +
42292 +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
42293 +  version_type=linux
42294 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
42295 +  soname_spec='${libname}${release}${shared_ext}$major'
42296 +  shlibpath_var=LD_LIBRARY_PATH
42297 +  case $host_vendor in
42298 +    sni)
42299 +      shlibpath_overrides_runpath=no
42300 +      need_lib_prefix=no
42301 +      export_dynamic_flag_spec='${wl}-Blargedynsym'
42302 +      runpath_var=LD_RUN_PATH
42303 +      ;;
42304 +    siemens)
42305 +      need_lib_prefix=no
42306 +      ;;
42307 +    motorola)
42308 +      need_lib_prefix=no
42309 +      need_version=no
42310 +      shlibpath_overrides_runpath=no
42311 +      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
42312 +      ;;
42313 +  esac
42314 +  ;;
42315 +
42316 +sysv4*MP*)
42317 +  if test -d /usr/nec ;then
42318 +    version_type=linux
42319 +    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
42320 +    soname_spec='$libname${shared_ext}.$major'
42321 +    shlibpath_var=LD_LIBRARY_PATH
42322 +  fi
42323 +  ;;
42324 +
42325 +uts4*)
42326 +  version_type=linux
42327 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
42328 +  soname_spec='${libname}${release}${shared_ext}$major'
42329 +  shlibpath_var=LD_LIBRARY_PATH
42330 +  ;;
42331 +
42332 +*)
42333 +  dynamic_linker=no
42334 +  ;;
42335 +esac
42336 +echo "$as_me:$LINENO: result: $dynamic_linker" >&5
42337 +echo "${ECHO_T}$dynamic_linker" >&6
42338 +test "$dynamic_linker" = no && can_build_shared=no
42339 +
42340 +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
42341 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
42342 +hardcode_action_CXX=
42343 +if test -n "$hardcode_libdir_flag_spec_CXX" || \
42344 +   test -n "$runpath_var_CXX" || \
42345 +   test "X$hardcode_automatic_CXX" = "Xyes" ; then
42346 +
42347 +  # We can hardcode non-existant directories.
42348 +  if test "$hardcode_direct_CXX" != no &&
42349 +     # If the only mechanism to avoid hardcoding is shlibpath_var, we
42350 +     # have to relink, otherwise we might link with an installed library
42351 +     # when we should be linking with a yet-to-be-installed one
42352 +     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
42353 +     test "$hardcode_minus_L_CXX" != no; then
42354 +    # Linking always hardcodes the temporary library directory.
42355 +    hardcode_action_CXX=relink
42356 +  else
42357 +    # We can link without hardcoding, and we can hardcode nonexisting dirs.
42358 +    hardcode_action_CXX=immediate
42359 +  fi
42360 +else
42361 +  # We cannot hardcode anything, or else we can only hardcode existing
42362 +  # directories.
42363 +  hardcode_action_CXX=unsupported
42364 +fi
42365 +echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
42366 +echo "${ECHO_T}$hardcode_action_CXX" >&6
42367 +
42368 +if test "$hardcode_action_CXX" = relink; then
42369 +  # Fast installation is not supported
42370 +  enable_fast_install=no
42371 +elif test "$shlibpath_overrides_runpath" = yes ||
42372 +     test "$enable_shared" = no; then
42373 +  # Fast installation is not necessary
42374 +  enable_fast_install=needless
42375 +fi
42376 +
42377 +striplib=
42378 +old_striplib=
42379 +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
42380 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
42381 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
42382 +  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
42383 +  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
42384 +  echo "$as_me:$LINENO: result: yes" >&5
42385 +echo "${ECHO_T}yes" >&6
42386 +else
42387 +# FIXME - insert some real tests, host_os isn't really good enough
42388 +  case $host_os in
42389 +   darwin*)
42390 +       if test -n "$STRIP" ; then
42391 +         striplib="$STRIP -x"
42392 +         echo "$as_me:$LINENO: result: yes" >&5
42393 +echo "${ECHO_T}yes" >&6
42394 +       else
42395 +  echo "$as_me:$LINENO: result: no" >&5
42396 +echo "${ECHO_T}no" >&6
42397 +fi
42398 +       ;;
42399 +   *)
42400 +  echo "$as_me:$LINENO: result: no" >&5
42401 +echo "${ECHO_T}no" >&6
42402 +    ;;
42403 +  esac
42404 +fi
42405 +
42406 +if test "x$enable_dlopen" != xyes; then
42407 +  enable_dlopen=unknown
42408 +  enable_dlopen_self=unknown
42409 +  enable_dlopen_self_static=unknown
42410 +else
42411 +  lt_cv_dlopen=no
42412 +  lt_cv_dlopen_libs=
42413 +
42414 +  case $host_os in
42415 +  beos*)
42416 +    lt_cv_dlopen="load_add_on"
42417 +    lt_cv_dlopen_libs=
42418 +    lt_cv_dlopen_self=yes
42419 +    ;;
42420 +
42421 +  mingw* | pw32*)
42422 +    lt_cv_dlopen="LoadLibrary"
42423 +    lt_cv_dlopen_libs=
42424 +   ;;
42425 +
42426 +  cygwin*)
42427 +    lt_cv_dlopen="dlopen"
42428 +    lt_cv_dlopen_libs=
42429 +   ;;
42430 +
42431 +  darwin*)
42432 +  # if libdl is installed we need to link against it
42433 +    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
42434 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
42435 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then
42436 +  echo $ECHO_N "(cached) $ECHO_C" >&6
42437 +else
42438 +  ac_check_lib_save_LIBS=$LIBS
42439 +LIBS="-ldl  $LIBS"
42440 +cat >conftest.$ac_ext <<_ACEOF
42441 +/* confdefs.h.  */
42442 +_ACEOF
42443 +cat confdefs.h >>conftest.$ac_ext
42444 +cat >>conftest.$ac_ext <<_ACEOF
42445 +/* end confdefs.h.  */
42446 +
42447 +/* Override any gcc2 internal prototype to avoid an error.  */
42448 +#ifdef __cplusplus
42449 +extern "C"
42450 +#endif
42451 +/* We use char because int might match the return type of a gcc2
42452 +   builtin and then its argument prototype would still apply.  */
42453 +char dlopen ();
42454 +int
42455 +main ()
42456 +{
42457 +dlopen ();
42458 +  ;
42459 +  return 0;
42460 +}
42461 +_ACEOF
42462 +rm -f conftest.$ac_objext conftest$ac_exeext
42463 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42464 +  (eval $ac_link) 2>conftest.er1
42465 +  ac_status=$?
42466 +  grep -v '^ *+' conftest.er1 >conftest.err
42467 +  rm -f conftest.er1
42468 +  cat conftest.err >&5
42469 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42470 +  (exit $ac_status); } &&
42471 +        { ac_try='test -z "$ac_cxx_werror_flag"
42472 +                        || test ! -s conftest.err'
42473 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42474 +  (eval $ac_try) 2>&5
42475 +  ac_status=$?
42476 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42477 +  (exit $ac_status); }; } &&
42478 +        { ac_try='test -s conftest$ac_exeext'
42479 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42480 +  (eval $ac_try) 2>&5
42481 +  ac_status=$?
42482 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42483 +  (exit $ac_status); }; }; then
42484 +  ac_cv_lib_dl_dlopen=yes
42485 +else
42486 +  echo "$as_me: failed program was:" >&5
42487 +sed 's/^/| /' conftest.$ac_ext >&5
42488 +
42489 +ac_cv_lib_dl_dlopen=no
42490 +fi
42491 +rm -f conftest.err conftest.$ac_objext \
42492 +      conftest$ac_exeext conftest.$ac_ext
42493 +LIBS=$ac_check_lib_save_LIBS
42494 +fi
42495 +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
42496 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
42497 +if test $ac_cv_lib_dl_dlopen = yes; then
42498 +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
42499 +else
42500 +
42501 +    lt_cv_dlopen="dyld"
42502 +    lt_cv_dlopen_libs=
42503 +    lt_cv_dlopen_self=yes
42504 +
42505 +fi
42506 +
42507 +   ;;
42508 +
42509 +  *)
42510 +    echo "$as_me:$LINENO: checking for shl_load" >&5
42511 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
42512 +if test "${ac_cv_func_shl_load+set}" = set; then
42513 +  echo $ECHO_N "(cached) $ECHO_C" >&6
42514 +else
42515 +  cat >conftest.$ac_ext <<_ACEOF
42516 +/* confdefs.h.  */
42517 +_ACEOF
42518 +cat confdefs.h >>conftest.$ac_ext
42519 +cat >>conftest.$ac_ext <<_ACEOF
42520 +/* end confdefs.h.  */
42521 +/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
42522 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42523 +#define shl_load innocuous_shl_load
42524 +
42525 +/* System header to define __stub macros and hopefully few prototypes,
42526 +    which can conflict with char shl_load (); below.
42527 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42528 +    <limits.h> exists even on freestanding compilers.  */
42529 +
42530 +#ifdef __STDC__
42531 +# include <limits.h>
42532 +#else
42533 +# include <assert.h>
42534 +#endif
42535 +
42536 +#undef shl_load
42537 +
42538 +/* Override any gcc2 internal prototype to avoid an error.  */
42539 +#ifdef __cplusplus
42540 +extern "C"
42541 +{
42542 +#endif
42543 +/* We use char because int might match the return type of a gcc2
42544 +   builtin and then its argument prototype would still apply.  */
42545 +char shl_load ();
42546 +/* The GNU C library defines this for functions which it implements
42547 +    to always fail with ENOSYS.  Some functions are actually named
42548 +    something starting with __ and the normal name is an alias.  */
42549 +#if defined (__stub_shl_load) || defined (__stub___shl_load)
42550 +choke me
42551 +#else
42552 +char (*f) () = shl_load;
42553 +#endif
42554 +#ifdef __cplusplus
42555 +}
42556 +#endif
42557 +
42558 +int
42559 +main ()
42560 +{
42561 +return f != shl_load;
42562 +  ;
42563 +  return 0;
42564 +}
42565 +_ACEOF
42566 +rm -f conftest.$ac_objext conftest$ac_exeext
42567 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42568 +  (eval $ac_link) 2>conftest.er1
42569 +  ac_status=$?
42570 +  grep -v '^ *+' conftest.er1 >conftest.err
42571 +  rm -f conftest.er1
42572 +  cat conftest.err >&5
42573 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42574 +  (exit $ac_status); } &&
42575 +        { ac_try='test -z "$ac_cxx_werror_flag"
42576 +                        || test ! -s conftest.err'
42577 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42578 +  (eval $ac_try) 2>&5
42579 +  ac_status=$?
42580 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42581 +  (exit $ac_status); }; } &&
42582 +        { ac_try='test -s conftest$ac_exeext'
42583 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42584 +  (eval $ac_try) 2>&5
42585 +  ac_status=$?
42586 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42587 +  (exit $ac_status); }; }; then
42588 +  ac_cv_func_shl_load=yes
42589 +else
42590 +  echo "$as_me: failed program was:" >&5
42591 +sed 's/^/| /' conftest.$ac_ext >&5
42592 +
42593 +ac_cv_func_shl_load=no
42594 +fi
42595 +rm -f conftest.err conftest.$ac_objext \
42596 +      conftest$ac_exeext conftest.$ac_ext
42597 +fi
42598 +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
42599 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6
42600 +if test $ac_cv_func_shl_load = yes; then
42601 +  lt_cv_dlopen="shl_load"
42602 +else
42603 +  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
42604 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
42605 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then
42606 +  echo $ECHO_N "(cached) $ECHO_C" >&6
42607 +else
42608 +  ac_check_lib_save_LIBS=$LIBS
42609 +LIBS="-ldld  $LIBS"
42610 +cat >conftest.$ac_ext <<_ACEOF
42611 +/* confdefs.h.  */
42612 +_ACEOF
42613 +cat confdefs.h >>conftest.$ac_ext
42614 +cat >>conftest.$ac_ext <<_ACEOF
42615 +/* end confdefs.h.  */
42616 +
42617 +/* Override any gcc2 internal prototype to avoid an error.  */
42618 +#ifdef __cplusplus
42619 +extern "C"
42620 +#endif
42621 +/* We use char because int might match the return type of a gcc2
42622 +   builtin and then its argument prototype would still apply.  */
42623 +char shl_load ();
42624 +int
42625 +main ()
42626 +{
42627 +shl_load ();
42628 +  ;
42629 +  return 0;
42630 +}
42631 +_ACEOF
42632 +rm -f conftest.$ac_objext conftest$ac_exeext
42633 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42634 +  (eval $ac_link) 2>conftest.er1
42635 +  ac_status=$?
42636 +  grep -v '^ *+' conftest.er1 >conftest.err
42637 +  rm -f conftest.er1
42638 +  cat conftest.err >&5
42639 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42640 +  (exit $ac_status); } &&
42641 +        { ac_try='test -z "$ac_cxx_werror_flag"
42642 +                        || test ! -s conftest.err'
42643 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42644 +  (eval $ac_try) 2>&5
42645 +  ac_status=$?
42646 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42647 +  (exit $ac_status); }; } &&
42648 +        { ac_try='test -s conftest$ac_exeext'
42649 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42650 +  (eval $ac_try) 2>&5
42651 +  ac_status=$?
42652 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42653 +  (exit $ac_status); }; }; then
42654 +  ac_cv_lib_dld_shl_load=yes
42655 +else
42656 +  echo "$as_me: failed program was:" >&5
42657 +sed 's/^/| /' conftest.$ac_ext >&5
42658 +
42659 +ac_cv_lib_dld_shl_load=no
42660 +fi
42661 +rm -f conftest.err conftest.$ac_objext \
42662 +      conftest$ac_exeext conftest.$ac_ext
42663 +LIBS=$ac_check_lib_save_LIBS
42664 +fi
42665 +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
42666 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
42667 +if test $ac_cv_lib_dld_shl_load = yes; then
42668 +  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
42669 +else
42670 +  echo "$as_me:$LINENO: checking for dlopen" >&5
42671 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
42672 +if test "${ac_cv_func_dlopen+set}" = set; then
42673 +  echo $ECHO_N "(cached) $ECHO_C" >&6
42674 +else
42675 +  cat >conftest.$ac_ext <<_ACEOF
42676 +/* confdefs.h.  */
42677 +_ACEOF
42678 +cat confdefs.h >>conftest.$ac_ext
42679 +cat >>conftest.$ac_ext <<_ACEOF
42680 +/* end confdefs.h.  */
42681 +/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
42682 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
42683 +#define dlopen innocuous_dlopen
42684 +
42685 +/* System header to define __stub macros and hopefully few prototypes,
42686 +    which can conflict with char dlopen (); below.
42687 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
42688 +    <limits.h> exists even on freestanding compilers.  */
42689 +
42690 +#ifdef __STDC__
42691 +# include <limits.h>
42692 +#else
42693 +# include <assert.h>
42694 +#endif
42695 +
42696 +#undef dlopen
42697 +
42698 +/* Override any gcc2 internal prototype to avoid an error.  */
42699 +#ifdef __cplusplus
42700 +extern "C"
42701 +{
42702 +#endif
42703 +/* We use char because int might match the return type of a gcc2
42704 +   builtin and then its argument prototype would still apply.  */
42705 +char dlopen ();
42706 +/* The GNU C library defines this for functions which it implements
42707 +    to always fail with ENOSYS.  Some functions are actually named
42708 +    something starting with __ and the normal name is an alias.  */
42709 +#if defined (__stub_dlopen) || defined (__stub___dlopen)
42710 +choke me
42711 +#else
42712 +char (*f) () = dlopen;
42713 +#endif
42714 +#ifdef __cplusplus
42715 +}
42716 +#endif
42717 +
42718 +int
42719 +main ()
42720 +{
42721 +return f != dlopen;
42722 +  ;
42723 +  return 0;
42724 +}
42725 +_ACEOF
42726 +rm -f conftest.$ac_objext conftest$ac_exeext
42727 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42728 +  (eval $ac_link) 2>conftest.er1
42729 +  ac_status=$?
42730 +  grep -v '^ *+' conftest.er1 >conftest.err
42731 +  rm -f conftest.er1
42732 +  cat conftest.err >&5
42733 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42734 +  (exit $ac_status); } &&
42735 +        { ac_try='test -z "$ac_cxx_werror_flag"
42736 +                        || test ! -s conftest.err'
42737 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42738 +  (eval $ac_try) 2>&5
42739 +  ac_status=$?
42740 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42741 +  (exit $ac_status); }; } &&
42742 +        { ac_try='test -s conftest$ac_exeext'
42743 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42744 +  (eval $ac_try) 2>&5
42745 +  ac_status=$?
42746 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42747 +  (exit $ac_status); }; }; then
42748 +  ac_cv_func_dlopen=yes
42749 +else
42750 +  echo "$as_me: failed program was:" >&5
42751 +sed 's/^/| /' conftest.$ac_ext >&5
42752 +
42753 +ac_cv_func_dlopen=no
42754 +fi
42755 +rm -f conftest.err conftest.$ac_objext \
42756 +      conftest$ac_exeext conftest.$ac_ext
42757 +fi
42758 +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
42759 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6
42760 +if test $ac_cv_func_dlopen = yes; then
42761 +  lt_cv_dlopen="dlopen"
42762 +else
42763 +  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
42764 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
42765 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then
42766 +  echo $ECHO_N "(cached) $ECHO_C" >&6
42767 +else
42768 +  ac_check_lib_save_LIBS=$LIBS
42769 +LIBS="-ldl  $LIBS"
42770 +cat >conftest.$ac_ext <<_ACEOF
42771 +/* confdefs.h.  */
42772 +_ACEOF
42773 +cat confdefs.h >>conftest.$ac_ext
42774 +cat >>conftest.$ac_ext <<_ACEOF
42775 +/* end confdefs.h.  */
42776 +
42777 +/* Override any gcc2 internal prototype to avoid an error.  */
42778 +#ifdef __cplusplus
42779 +extern "C"
42780 +#endif
42781 +/* We use char because int might match the return type of a gcc2
42782 +   builtin and then its argument prototype would still apply.  */
42783 +char dlopen ();
42784 +int
42785 +main ()
42786 +{
42787 +dlopen ();
42788 +  ;
42789 +  return 0;
42790 +}
42791 +_ACEOF
42792 +rm -f conftest.$ac_objext conftest$ac_exeext
42793 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42794 +  (eval $ac_link) 2>conftest.er1
42795 +  ac_status=$?
42796 +  grep -v '^ *+' conftest.er1 >conftest.err
42797 +  rm -f conftest.er1
42798 +  cat conftest.err >&5
42799 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42800 +  (exit $ac_status); } &&
42801 +        { ac_try='test -z "$ac_cxx_werror_flag"
42802 +                        || test ! -s conftest.err'
42803 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42804 +  (eval $ac_try) 2>&5
42805 +  ac_status=$?
42806 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42807 +  (exit $ac_status); }; } &&
42808 +        { ac_try='test -s conftest$ac_exeext'
42809 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42810 +  (eval $ac_try) 2>&5
42811 +  ac_status=$?
42812 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42813 +  (exit $ac_status); }; }; then
42814 +  ac_cv_lib_dl_dlopen=yes
42815 +else
42816 +  echo "$as_me: failed program was:" >&5
42817 +sed 's/^/| /' conftest.$ac_ext >&5
42818 +
42819 +ac_cv_lib_dl_dlopen=no
42820 +fi
42821 +rm -f conftest.err conftest.$ac_objext \
42822 +      conftest$ac_exeext conftest.$ac_ext
42823 +LIBS=$ac_check_lib_save_LIBS
42824 +fi
42825 +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
42826 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
42827 +if test $ac_cv_lib_dl_dlopen = yes; then
42828 +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
42829 +else
42830 +  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
42831 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
42832 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then
42833 +  echo $ECHO_N "(cached) $ECHO_C" >&6
42834 +else
42835 +  ac_check_lib_save_LIBS=$LIBS
42836 +LIBS="-lsvld  $LIBS"
42837 +cat >conftest.$ac_ext <<_ACEOF
42838 +/* confdefs.h.  */
42839 +_ACEOF
42840 +cat confdefs.h >>conftest.$ac_ext
42841 +cat >>conftest.$ac_ext <<_ACEOF
42842 +/* end confdefs.h.  */
42843 +
42844 +/* Override any gcc2 internal prototype to avoid an error.  */
42845 +#ifdef __cplusplus
42846 +extern "C"
42847 +#endif
42848 +/* We use char because int might match the return type of a gcc2
42849 +   builtin and then its argument prototype would still apply.  */
42850 +char dlopen ();
42851 +int
42852 +main ()
42853 +{
42854 +dlopen ();
42855 +  ;
42856 +  return 0;
42857 +}
42858 +_ACEOF
42859 +rm -f conftest.$ac_objext conftest$ac_exeext
42860 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42861 +  (eval $ac_link) 2>conftest.er1
42862 +  ac_status=$?
42863 +  grep -v '^ *+' conftest.er1 >conftest.err
42864 +  rm -f conftest.er1
42865 +  cat conftest.err >&5
42866 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42867 +  (exit $ac_status); } &&
42868 +        { ac_try='test -z "$ac_cxx_werror_flag"
42869 +                        || test ! -s conftest.err'
42870 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42871 +  (eval $ac_try) 2>&5
42872 +  ac_status=$?
42873 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42874 +  (exit $ac_status); }; } &&
42875 +        { ac_try='test -s conftest$ac_exeext'
42876 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42877 +  (eval $ac_try) 2>&5
42878 +  ac_status=$?
42879 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42880 +  (exit $ac_status); }; }; then
42881 +  ac_cv_lib_svld_dlopen=yes
42882 +else
42883 +  echo "$as_me: failed program was:" >&5
42884 +sed 's/^/| /' conftest.$ac_ext >&5
42885 +
42886 +ac_cv_lib_svld_dlopen=no
42887 +fi
42888 +rm -f conftest.err conftest.$ac_objext \
42889 +      conftest$ac_exeext conftest.$ac_ext
42890 +LIBS=$ac_check_lib_save_LIBS
42891 +fi
42892 +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
42893 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
42894 +if test $ac_cv_lib_svld_dlopen = yes; then
42895 +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
42896 +else
42897 +  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
42898 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
42899 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then
42900 +  echo $ECHO_N "(cached) $ECHO_C" >&6
42901 +else
42902 +  ac_check_lib_save_LIBS=$LIBS
42903 +LIBS="-ldld  $LIBS"
42904 +cat >conftest.$ac_ext <<_ACEOF
42905 +/* confdefs.h.  */
42906 +_ACEOF
42907 +cat confdefs.h >>conftest.$ac_ext
42908 +cat >>conftest.$ac_ext <<_ACEOF
42909 +/* end confdefs.h.  */
42910 +
42911 +/* Override any gcc2 internal prototype to avoid an error.  */
42912 +#ifdef __cplusplus
42913 +extern "C"
42914 +#endif
42915 +/* We use char because int might match the return type of a gcc2
42916 +   builtin and then its argument prototype would still apply.  */
42917 +char dld_link ();
42918 +int
42919 +main ()
42920 +{
42921 +dld_link ();
42922 +  ;
42923 +  return 0;
42924 +}
42925 +_ACEOF
42926 +rm -f conftest.$ac_objext conftest$ac_exeext
42927 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
42928 +  (eval $ac_link) 2>conftest.er1
42929 +  ac_status=$?
42930 +  grep -v '^ *+' conftest.er1 >conftest.err
42931 +  rm -f conftest.er1
42932 +  cat conftest.err >&5
42933 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42934 +  (exit $ac_status); } &&
42935 +        { ac_try='test -z "$ac_cxx_werror_flag"
42936 +                        || test ! -s conftest.err'
42937 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42938 +  (eval $ac_try) 2>&5
42939 +  ac_status=$?
42940 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42941 +  (exit $ac_status); }; } &&
42942 +        { ac_try='test -s conftest$ac_exeext'
42943 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
42944 +  (eval $ac_try) 2>&5
42945 +  ac_status=$?
42946 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
42947 +  (exit $ac_status); }; }; then
42948 +  ac_cv_lib_dld_dld_link=yes
42949 +else
42950 +  echo "$as_me: failed program was:" >&5
42951 +sed 's/^/| /' conftest.$ac_ext >&5
42952 +
42953 +ac_cv_lib_dld_dld_link=no
42954 +fi
42955 +rm -f conftest.err conftest.$ac_objext \
42956 +      conftest$ac_exeext conftest.$ac_ext
42957 +LIBS=$ac_check_lib_save_LIBS
42958 +fi
42959 +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
42960 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
42961 +if test $ac_cv_lib_dld_dld_link = yes; then
42962 +  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
42963 +fi
42964 +
42965 +
42966 +fi
42967 +
42968 +
42969 +fi
42970 +
42971 +
42972 +fi
42973 +
42974 +
42975 +fi
42976 +
42977 +
42978 +fi
42979 +
42980 +    ;;
42981 +  esac
42982 +
42983 +  if test "x$lt_cv_dlopen" != xno; then
42984 +    enable_dlopen=yes
42985 +  else
42986 +    enable_dlopen=no
42987 +  fi
42988 +
42989 +  case $lt_cv_dlopen in
42990 +  dlopen)
42991 +    save_CPPFLAGS="$CPPFLAGS"
42992 +    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
42993 +
42994 +    save_LDFLAGS="$LDFLAGS"
42995 +    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
42996 +
42997 +    save_LIBS="$LIBS"
42998 +    LIBS="$lt_cv_dlopen_libs $LIBS"
42999 +
43000 +    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
43001 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
43002 +if test "${lt_cv_dlopen_self+set}" = set; then
43003 +  echo $ECHO_N "(cached) $ECHO_C" >&6
43004 +else
43005 +         if test "$cross_compiling" = yes; then :
43006 +  lt_cv_dlopen_self=cross
43007 +else
43008 +  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
43009 +  lt_status=$lt_dlunknown
43010 +  cat > conftest.$ac_ext <<EOF
43011 +#line 12717 "configure"
43012 +#include "confdefs.h"
43013 +
43014 +#if HAVE_DLFCN_H
43015 +#include <dlfcn.h>
43016 +#endif
43017 +
43018 +#include <stdio.h>
43019 +
43020 +#ifdef RTLD_GLOBAL
43021 +#  define LT_DLGLOBAL          RTLD_GLOBAL
43022 +#else
43023 +#  ifdef DL_GLOBAL
43024 +#    define LT_DLGLOBAL                DL_GLOBAL
43025 +#  else
43026 +#    define LT_DLGLOBAL                0
43027 +#  endif
43028 +#endif
43029 +
43030 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
43031 +   find out it does not work in some platform. */
43032 +#ifndef LT_DLLAZY_OR_NOW
43033 +#  ifdef RTLD_LAZY
43034 +#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
43035 +#  else
43036 +#    ifdef DL_LAZY
43037 +#      define LT_DLLAZY_OR_NOW         DL_LAZY
43038 +#    else
43039 +#      ifdef RTLD_NOW
43040 +#        define LT_DLLAZY_OR_NOW       RTLD_NOW
43041 +#      else
43042 +#        ifdef DL_NOW
43043 +#          define LT_DLLAZY_OR_NOW     DL_NOW
43044 +#        else
43045 +#          define LT_DLLAZY_OR_NOW     0
43046 +#        endif
43047 +#      endif
43048 +#    endif
43049 +#  endif
43050 +#endif
43051 +
43052 +#ifdef __cplusplus
43053 +extern "C" void exit (int);
43054 +#endif
43055 +
43056 +void fnord() { int i=42;}
43057 +int main ()
43058 +{
43059 +  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
43060 +  int status = $lt_dlunknown;
43061 +
43062 +  if (self)
43063 +    {
43064 +      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
43065 +      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
43066 +      /* dlclose (self); */
43067 +    }
43068 +
43069 +    exit (status);
43070 +}
43071 +EOF
43072 +  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43073 +  (eval $ac_link) 2>&5
43074 +  ac_status=$?
43075 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
43076 +  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
43077 +    (./conftest; exit; ) 2>/dev/null
43078 +    lt_status=$?
43079 +    case x$lt_status in
43080 +      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
43081 +      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
43082 +      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
43083 +    esac
43084 +  else :
43085 +    # compilation failed
43086 +    lt_cv_dlopen_self=no
43087 +  fi
43088 +fi
43089 +rm -fr conftest*
43090 +
43091 +
43092 +fi
43093 +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
43094 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6
43095 +
43096 +    if test "x$lt_cv_dlopen_self" = xyes; then
43097 +      LDFLAGS="$LDFLAGS $link_static_flag"
43098 +      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
43099 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
43100 +if test "${lt_cv_dlopen_self_static+set}" = set; then
43101 +  echo $ECHO_N "(cached) $ECHO_C" >&6
43102 +else
43103 +         if test "$cross_compiling" = yes; then :
43104 +  lt_cv_dlopen_self_static=cross
43105 +else
43106 +  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
43107 +  lt_status=$lt_dlunknown
43108 +  cat > conftest.$ac_ext <<EOF
43109 +#line 12815 "configure"
43110 +#include "confdefs.h"
43111 +
43112 +#if HAVE_DLFCN_H
43113 +#include <dlfcn.h>
43114 +#endif
43115 +
43116 +#include <stdio.h>
43117 +
43118 +#ifdef RTLD_GLOBAL
43119 +#  define LT_DLGLOBAL          RTLD_GLOBAL
43120 +#else
43121 +#  ifdef DL_GLOBAL
43122 +#    define LT_DLGLOBAL                DL_GLOBAL
43123 +#  else
43124 +#    define LT_DLGLOBAL                0
43125 +#  endif
43126 +#endif
43127 +
43128 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
43129 +   find out it does not work in some platform. */
43130 +#ifndef LT_DLLAZY_OR_NOW
43131 +#  ifdef RTLD_LAZY
43132 +#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
43133 +#  else
43134 +#    ifdef DL_LAZY
43135 +#      define LT_DLLAZY_OR_NOW         DL_LAZY
43136 +#    else
43137 +#      ifdef RTLD_NOW
43138 +#        define LT_DLLAZY_OR_NOW       RTLD_NOW
43139 +#      else
43140 +#        ifdef DL_NOW
43141 +#          define LT_DLLAZY_OR_NOW     DL_NOW
43142 +#        else
43143 +#          define LT_DLLAZY_OR_NOW     0
43144 +#        endif
43145 +#      endif
43146 +#    endif
43147 +#  endif
43148 +#endif
43149 +
43150 +#ifdef __cplusplus
43151 +extern "C" void exit (int);
43152 +#endif
43153 +
43154 +void fnord() { int i=42;}
43155 +int main ()
43156 +{
43157 +  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
43158 +  int status = $lt_dlunknown;
43159 +
43160 +  if (self)
43161 +    {
43162 +      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
43163 +      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
43164 +      /* dlclose (self); */
43165 +    }
43166 +
43167 +    exit (status);
43168 +}
43169 +EOF
43170 +  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
43171 +  (eval $ac_link) 2>&5
43172 +  ac_status=$?
43173 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
43174 +  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
43175 +    (./conftest; exit; ) 2>/dev/null
43176 +    lt_status=$?
43177 +    case x$lt_status in
43178 +      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
43179 +      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
43180 +      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
43181 +    esac
43182 +  else :
43183 +    # compilation failed
43184 +    lt_cv_dlopen_self_static=no
43185 +  fi
43186 +fi
43187 +rm -fr conftest*
43188 +
43189 +
43190 +fi
43191 +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
43192 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
43193 +    fi
43194 +
43195 +    CPPFLAGS="$save_CPPFLAGS"
43196 +    LDFLAGS="$save_LDFLAGS"
43197 +    LIBS="$save_LIBS"
43198 +    ;;
43199 +  esac
43200 +
43201 +  case $lt_cv_dlopen_self in
43202 +  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
43203 +  *) enable_dlopen_self=unknown ;;
43204 +  esac
43205 +
43206 +  case $lt_cv_dlopen_self_static in
43207 +  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
43208 +  *) enable_dlopen_self_static=unknown ;;
43209 +  esac
43210 +fi
43211 +
43212 +
43213 +# The else clause should only fire when bootstrapping the
43214 +# libtool distribution, otherwise you forgot to ship ltmain.sh
43215 +# with your package, and you will get complaints that there are
43216 +# no rules to generate ltmain.sh.
43217 +if test -f "$ltmain"; then
43218 +  # See if we are running on zsh, and set the options which allow our commands through
43219 +  # without removal of \ escapes.
43220 +  if test -n "${ZSH_VERSION+set}" ; then
43221 +    setopt NO_GLOB_SUBST
43222 +  fi
43223 +  # Now quote all the things that may contain metacharacters while being
43224 +  # careful not to overquote the AC_SUBSTed values.  We take copies of the
43225 +  # variables and quote the copies for generation of the libtool script.
43226 +  for var in echo old_CC old_CFLAGS AR AR_FLAGS AS EGREP RANLIB LN_S LTCC NM \
43227 +    SED SHELL STRIP \
43228 +    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
43229 +    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
43230 +    deplibs_check_method reload_flag reload_cmds need_locks \
43231 +    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
43232 +    lt_cv_sys_global_symbol_to_c_name_address \
43233 +    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
43234 +    old_postinstall_cmds old_postuninstall_cmds \
43235 +    compiler_CXX \
43236 +    CC_CXX \
43237 +    LD_CXX \
43238 +    lt_prog_compiler_wl_CXX \
43239 +    lt_prog_compiler_pic_CXX \
43240 +    lt_prog_compiler_static_CXX \
43241 +    lt_prog_compiler_no_builtin_flag_CXX \
43242 +    export_dynamic_flag_spec_CXX \
43243 +    thread_safe_flag_spec_CXX \
43244 +    whole_archive_flag_spec_CXX \
43245 +    enable_shared_with_static_runtimes_CXX \
43246 +    old_archive_cmds_CXX \
43247 +    old_archive_from_new_cmds_CXX \
43248 +    predep_objects_CXX \
43249 +    postdep_objects_CXX \
43250 +    predeps_CXX \
43251 +    postdeps_CXX \
43252 +    compiler_lib_search_path_CXX \
43253 +    archive_cmds_CXX \
43254 +    archive_expsym_cmds_CXX \
43255 +    postinstall_cmds_CXX \
43256 +    postuninstall_cmds_CXX \
43257 +    old_archive_from_expsyms_cmds_CXX \
43258 +    allow_undefined_flag_CXX \
43259 +    no_undefined_flag_CXX \
43260 +    export_symbols_cmds_CXX \
43261 +    hardcode_libdir_flag_spec_CXX \
43262 +    hardcode_libdir_flag_spec_ld_CXX \
43263 +    hardcode_libdir_separator_CXX \
43264 +    hardcode_automatic_CXX \
43265 +    module_cmds_CXX \
43266 +    module_expsym_cmds_CXX \
43267 +    lt_cv_prog_compiler_c_o_CXX \
43268 +    exclude_expsyms_CXX \
43269 +    include_expsyms_CXX; do
43270 +
43271 +    case $var in
43272 +    old_archive_cmds_CXX | \
43273 +    old_archive_from_new_cmds_CXX | \
43274 +    archive_cmds_CXX | \
43275 +    archive_expsym_cmds_CXX | \
43276 +    module_cmds_CXX | \
43277 +    module_expsym_cmds_CXX | \
43278 +    old_archive_from_expsyms_cmds_CXX | \
43279 +    export_symbols_cmds_CXX | \
43280 +    extract_expsyms_cmds | reload_cmds | finish_cmds | \
43281 +    postinstall_cmds | postuninstall_cmds | \
43282 +    old_postinstall_cmds | old_postuninstall_cmds | \
43283 +    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
43284 +      # Double-quote double-evaled strings.
43285 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
43286 +      ;;
43287 +    *)
43288 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
43289 +      ;;
43290 +    esac
43291 +  done
43292 +
43293 +  case $lt_echo in
43294 +  *'\$0 --fallback-echo"')
43295 +    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
43296 +    ;;
43297 +  esac
43298 +
43299 +cfgfile="$ofile"
43300 +
43301 +  cat <<__EOF__ >> "$cfgfile"
43302 +# ### BEGIN LIBTOOL TAG CONFIG: $tagname
43303 +
43304 +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
43305 +
43306 +# Shell to use when invoking shell scripts.
43307 +SHELL=$lt_SHELL
43308 +
43309 +# Whether or not to build shared libraries.
43310 +build_libtool_libs=$enable_shared
43311 +
43312 +# Whether or not to build static libraries.
43313 +build_old_libs=$enable_static
43314 +
43315 +# Whether or not to add -lc for building shared libraries.
43316 +build_libtool_need_lc=$archive_cmds_need_lc_CXX
43317 +
43318 +# Whether or not to disallow shared libs when runtime libs are static
43319 +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
43320 +
43321 +# Whether or not to optimize for fast installation.
43322 +fast_install=$enable_fast_install
43323 +
43324 +# The host system.
43325 +host_alias=$host_alias
43326 +host=$host
43327 +host_os=$host_os
43328 +
43329 +# The build system.
43330 +build_alias=$build_alias
43331 +build=$build
43332 +build_os=$build_os
43333 +
43334 +# An echo program that does not interpret backslashes.
43335 +echo=$lt_echo
43336 +
43337 +# The archiver.
43338 +AR=$lt_AR
43339 +AR_FLAGS=$lt_AR_FLAGS
43340 +
43341 +# A C compiler.
43342 +LTCC=$lt_LTCC
43343 +
43344 +# A language-specific compiler.
43345 +CC=$lt_compiler_CXX
43346 +
43347 +# Is the compiler the GNU C compiler?
43348 +with_gcc=$GCC_CXX
43349 +
43350 +# An ERE matcher.
43351 +EGREP=$lt_EGREP
43352 +
43353 +# The linker used to build libraries.
43354 +LD=$lt_LD_CXX
43355 +
43356 +# Whether we need hard or soft links.
43357 +LN_S=$lt_LN_S
43358 +
43359 +# A BSD-compatible nm program.
43360 +NM=$lt_NM
43361 +
43362 +# A symbol stripping program
43363 +STRIP=$lt_STRIP
43364 +
43365 +# Used to examine libraries when file_magic_cmd begins "file"
43366 +MAGIC_CMD=$MAGIC_CMD
43367 +
43368 +# Used on cygwin: DLL creation program.
43369 +DLLTOOL="$DLLTOOL"
43370 +
43371 +# Used on cygwin: object dumper.
43372 +OBJDUMP="$OBJDUMP"
43373 +
43374 +# Used on cygwin: assembler.
43375 +AS=$lt_AS
43376 +
43377 +# The name of the directory that contains temporary libtool files.
43378 +objdir=$objdir
43379 +
43380 +# How to create reloadable object files.
43381 +reload_flag=$lt_reload_flag
43382 +reload_cmds=$lt_reload_cmds
43383 +
43384 +# How to pass a linker flag through the compiler.
43385 +wl=$lt_lt_prog_compiler_wl_CXX
43386 +
43387 +# Object file suffix (normally "o").
43388 +objext="$ac_objext"
43389 +
43390 +# Old archive suffix (normally "a").
43391 +libext="$libext"
43392 +
43393 +# Shared library suffix (normally ".so").
43394 +shrext_cmds='$shrext_cmds'
43395 +
43396 +# Executable file suffix (normally "").
43397 +exeext="$exeext"
43398 +
43399 +# Additional compiler flags for building library objects.
43400 +pic_flag=$lt_lt_prog_compiler_pic_CXX
43401 +pic_mode=$pic_mode
43402 +
43403 +# What is the maximum length of a command?
43404 +max_cmd_len=$lt_cv_sys_max_cmd_len
43405 +
43406 +# Does compiler simultaneously support -c and -o options?
43407 +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
43408 +
43409 +# Must we lock files when doing compilation ?
43410 +need_locks=$lt_need_locks
43411 +
43412 +# Do we need the lib prefix for modules?
43413 +need_lib_prefix=$need_lib_prefix
43414 +
43415 +# Do we need a version for libraries?
43416 +need_version=$need_version
43417 +
43418 +# Whether dlopen is supported.
43419 +dlopen_support=$enable_dlopen
43420 +
43421 +# Whether dlopen of programs is supported.
43422 +dlopen_self=$enable_dlopen_self
43423 +
43424 +# Whether dlopen of statically linked programs is supported.
43425 +dlopen_self_static=$enable_dlopen_self_static
43426 +
43427 +# Compiler flag to prevent dynamic linking.
43428 +link_static_flag=$lt_lt_prog_compiler_static_CXX
43429 +
43430 +# Compiler flag to turn off builtin functions.
43431 +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
43432 +
43433 +# Compiler flag to allow reflexive dlopens.
43434 +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
43435 +
43436 +# Compiler flag to generate shared objects directly from archives.
43437 +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
43438 +
43439 +# Compiler flag to generate thread-safe objects.
43440 +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
43441 +
43442 +# Library versioning type.
43443 +version_type=$version_type
43444 +
43445 +# Format of library name prefix.
43446 +libname_spec=$lt_libname_spec
43447 +
43448 +# List of archive names.  First name is the real one, the rest are links.
43449 +# The last name is the one that the linker finds with -lNAME.
43450 +library_names_spec=$lt_library_names_spec
43451 +
43452 +# The coded name of the library, if different from the real name.
43453 +soname_spec=$lt_soname_spec
43454 +
43455 +# Commands used to build and install an old-style archive.
43456 +RANLIB=$lt_RANLIB
43457 +old_archive_cmds=$lt_old_archive_cmds_CXX
43458 +old_postinstall_cmds=$lt_old_postinstall_cmds
43459 +old_postuninstall_cmds=$lt_old_postuninstall_cmds
43460 +
43461 +# Create an old-style archive from a shared archive.
43462 +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
43463 +
43464 +# Create a temporary old-style archive to link instead of a shared archive.
43465 +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
43466 +
43467 +# Commands used to build and install a shared archive.
43468 +archive_cmds=$lt_archive_cmds_CXX
43469 +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
43470 +postinstall_cmds=$lt_postinstall_cmds
43471 +postuninstall_cmds=$lt_postuninstall_cmds
43472 +
43473 +# Commands used to build a loadable module (assumed same as above if empty)
43474 +module_cmds=$lt_module_cmds_CXX
43475 +module_expsym_cmds=$lt_module_expsym_cmds_CXX
43476 +
43477 +# Commands to strip libraries.
43478 +old_striplib=$lt_old_striplib
43479 +striplib=$lt_striplib
43480 +
43481 +# Dependencies to place before the objects being linked to create a
43482 +# shared library.
43483 +predep_objects=$lt_predep_objects_CXX
43484 +
43485 +# Dependencies to place after the objects being linked to create a
43486 +# shared library.
43487 +postdep_objects=$lt_postdep_objects_CXX
43488 +
43489 +# Dependencies to place before the objects being linked to create a
43490 +# shared library.
43491 +predeps=$lt_predeps_CXX
43492 +
43493 +# Dependencies to place after the objects being linked to create a
43494 +# shared library.
43495 +postdeps=$lt_postdeps_CXX
43496 +
43497 +# The library search path used internally by the compiler when linking
43498 +# a shared library.
43499 +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
43500 +
43501 +# Method to check whether dependent libraries are shared objects.
43502 +deplibs_check_method=$lt_deplibs_check_method
43503 +
43504 +# Command to use when deplibs_check_method == file_magic.
43505 +file_magic_cmd=$lt_file_magic_cmd
43506 +
43507 +# Flag that allows shared libraries with undefined symbols to be built.
43508 +allow_undefined_flag=$lt_allow_undefined_flag_CXX
43509 +
43510 +# Flag that forces no undefined symbols.
43511 +no_undefined_flag=$lt_no_undefined_flag_CXX
43512 +
43513 +# Commands used to finish a libtool library installation in a directory.
43514 +finish_cmds=$lt_finish_cmds
43515 +
43516 +# Same as above, but a single script fragment to be evaled but not shown.
43517 +finish_eval=$lt_finish_eval
43518 +
43519 +# Take the output of nm and produce a listing of raw symbols and C names.
43520 +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
43521 +
43522 +# Transform the output of nm in a proper C declaration
43523 +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
43524 +
43525 +# Transform the output of nm in a C name address pair
43526 +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
43527 +
43528 +# This is the shared library runtime path variable.
43529 +runpath_var=$runpath_var
43530 +
43531 +# This is the shared library path variable.
43532 +shlibpath_var=$shlibpath_var
43533 +
43534 +# Is shlibpath searched before the hard-coded library search path?
43535 +shlibpath_overrides_runpath=$shlibpath_overrides_runpath
43536 +
43537 +# How to hardcode a shared library path into an executable.
43538 +hardcode_action=$hardcode_action_CXX
43539 +
43540 +# Whether we should hardcode library paths into libraries.
43541 +hardcode_into_libs=$hardcode_into_libs
43542 +
43543 +# Flag to hardcode \$libdir into a binary during linking.
43544 +# This must work even if \$libdir does not exist.
43545 +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
43546 +
43547 +# If ld is used when linking, flag to hardcode \$libdir into
43548 +# a binary during linking. This must work even if \$libdir does
43549 +# not exist.
43550 +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
43551 +
43552 +# Whether we need a single -rpath flag with a separated argument.
43553 +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
43554 +
43555 +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
43556 +# resulting binary.
43557 +hardcode_direct=$hardcode_direct_CXX
43558 +
43559 +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
43560 +# resulting binary.
43561 +hardcode_minus_L=$hardcode_minus_L_CXX
43562 +
43563 +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
43564 +# the resulting binary.
43565 +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
43566 +
43567 +# Set to yes if building a shared library automatically hardcodes DIR into the library
43568 +# and all subsequent libraries and executables linked against it.
43569 +hardcode_automatic=$hardcode_automatic_CXX
43570 +
43571 +# Variables whose values should be saved in libtool wrapper scripts and
43572 +# restored at relink time.
43573 +variables_saved_for_relink="$variables_saved_for_relink"
43574 +
43575 +# Whether libtool must link a program against all its dependency libraries.
43576 +link_all_deplibs=$link_all_deplibs_CXX
43577 +
43578 +# Compile-time system search path for libraries
43579 +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
43580 +
43581 +# Run-time system search path for libraries
43582 +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
43583 +
43584 +# Fix the shell variable \$srcfile for the compiler.
43585 +fix_srcfile_path="$fix_srcfile_path_CXX"
43586 +
43587 +# Set to yes if exported symbols are required.
43588 +always_export_symbols=$always_export_symbols_CXX
43589 +
43590 +# The commands to list exported symbols.
43591 +export_symbols_cmds=$lt_export_symbols_cmds_CXX
43592 +
43593 +# The commands to extract the exported symbol list from a shared archive.
43594 +extract_expsyms_cmds=$lt_extract_expsyms_cmds
43595 +
43596 +# Symbols that should not be listed in the preloaded symbols.
43597 +exclude_expsyms=$lt_exclude_expsyms_CXX
43598 +
43599 +# Symbols that must always be exported.
43600 +include_expsyms=$lt_include_expsyms_CXX
43601 +
43602 +# ### END LIBTOOL TAG CONFIG: $tagname
43603 +
43604 +__EOF__
43605 +
43606 +
43607 +else
43608 +  # If there is no Makefile yet, we rely on a make rule to execute
43609 +  # `config.status --recheck' to rerun these tests and create the
43610 +  # libtool script then.
43611 +  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
43612 +  if test -f "$ltmain_in"; then
43613 +    test -f Makefile && make "$ltmain"
43614 +  fi
43615 +fi
43616 +
43617 +
43618 +ac_ext=c
43619 +ac_cpp='$CPP $CPPFLAGS'
43620 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43621 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43622 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
43623 +
43624 +CC=$lt_save_CC
43625 +LDCXX=$LD
43626 +LD=$lt_save_LD
43627 +GCC=$lt_save_GCC
43628 +with_gnu_ldcxx=$with_gnu_ld
43629 +with_gnu_ld=$lt_save_with_gnu_ld
43630 +lt_cv_path_LDCXX=$lt_cv_path_LD
43631 +lt_cv_path_LD=$lt_save_path_LD
43632 +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
43633 +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
43634 +
43635 +       else
43636 +         tagname=""
43637 +       fi
43638 +       ;;
43639 +
43640 +      F77)
43641 +       if test -n "$F77" && test "X$F77" != "Xno"; then
43642 +
43643 +ac_ext=f
43644 +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
43645 +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43646 +ac_compiler_gnu=$ac_cv_f77_compiler_gnu
43647 +
43648 +
43649 +archive_cmds_need_lc_F77=no
43650 +allow_undefined_flag_F77=
43651 +always_export_symbols_F77=no
43652 +archive_expsym_cmds_F77=
43653 +export_dynamic_flag_spec_F77=
43654 +hardcode_direct_F77=no
43655 +hardcode_libdir_flag_spec_F77=
43656 +hardcode_libdir_flag_spec_ld_F77=
43657 +hardcode_libdir_separator_F77=
43658 +hardcode_minus_L_F77=no
43659 +hardcode_automatic_F77=no
43660 +module_cmds_F77=
43661 +module_expsym_cmds_F77=
43662 +link_all_deplibs_F77=unknown
43663 +old_archive_cmds_F77=$old_archive_cmds
43664 +no_undefined_flag_F77=
43665 +whole_archive_flag_spec_F77=
43666 +enable_shared_with_static_runtimes_F77=no
43667 +
43668 +# Source file extension for f77 test sources.
43669 +ac_ext=f
43670 +
43671 +# Object file extension for compiled f77 test sources.
43672 +objext=o
43673 +objext_F77=$objext
43674 +
43675 +# Code to be used in simple compile tests
43676 +lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
43677 +
43678 +# Code to be used in simple link tests
43679 +lt_simple_link_test_code="      program t\n      end\n"
43680 +
43681 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
43682 +
43683 +# If no C compiler was specified, use CC.
43684 +LTCC=${LTCC-"$CC"}
43685 +
43686 +# Allow CC to be a program name with arguments.
43687 +compiler=$CC
43688 +
43689 +
43690 +# Allow CC to be a program name with arguments.
43691 +lt_save_CC="$CC"
43692 +CC=${F77-"f77"}
43693 +compiler=$CC
43694 +compiler_F77=$CC
43695 +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
43696 +
43697 +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
43698 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
43699 +echo "$as_me:$LINENO: result: $can_build_shared" >&5
43700 +echo "${ECHO_T}$can_build_shared" >&6
43701 +
43702 +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
43703 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
43704 +test "$can_build_shared" = "no" && enable_shared=no
43705 +
43706 +# On AIX, shared libraries and static libraries use the same namespace, and
43707 +# are all built from PIC.
43708 +case "$host_os" in
43709 +aix3*)
43710 +  test "$enable_shared" = yes && enable_static=no
43711 +  if test -n "$RANLIB"; then
43712 +    archive_cmds="$archive_cmds~\$RANLIB \$lib"
43713 +    postinstall_cmds='$RANLIB $lib'
43714 +  fi
43715 +  ;;
43716 +aix4* | aix5*)
43717 +  test "$enable_shared" = yes && enable_static=no
43718 +  ;;
43719 +esac
43720 +echo "$as_me:$LINENO: result: $enable_shared" >&5
43721 +echo "${ECHO_T}$enable_shared" >&6
43722 +
43723 +echo "$as_me:$LINENO: checking whether to build static libraries" >&5
43724 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
43725 +# Make sure either enable_shared or enable_static is yes.
43726 +test "$enable_shared" = yes || enable_static=yes
43727 +echo "$as_me:$LINENO: result: $enable_static" >&5
43728 +echo "${ECHO_T}$enable_static" >&6
43729 +
43730 +test "$ld_shlibs_F77" = no && can_build_shared=no
43731 +
43732 +GCC_F77="$G77"
43733 +LD_F77="$LD"
43734 +
43735 +lt_prog_compiler_wl_F77=
43736 +lt_prog_compiler_pic_F77=
43737 +lt_prog_compiler_static_F77=
43738 +
43739 +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
43740 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
43741 +
43742 +  if test "$GCC" = yes; then
43743 +    lt_prog_compiler_wl_F77='-Wl,'
43744 +    lt_prog_compiler_static_F77='-static'
43745 +
43746 +    case $host_os in
43747 +      aix*)
43748 +      # All AIX code is PIC.
43749 +      if test "$host_cpu" = ia64; then
43750 +       # AIX 5 now supports IA64 processor
43751 +       lt_prog_compiler_static_F77='-Bstatic'
43752 +      fi
43753 +      ;;
43754 +
43755 +    amigaos*)
43756 +      # FIXME: we need at least 68020 code to build shared libraries, but
43757 +      # adding the `-m68020' flag to GCC prevents building anything better,
43758 +      # like `-m68040'.
43759 +      lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
43760 +      ;;
43761 +
43762 +    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
43763 +      # PIC is the default for these OSes.
43764 +      ;;
43765 +
43766 +    mingw* | pw32* | os2*)
43767 +      # This hack is so that the source file can tell whether it is being
43768 +      # built for inclusion in a dll (and should export symbols for example).
43769 +      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
43770 +      ;;
43771 +
43772 +    darwin* | rhapsody*)
43773 +      # PIC is the default on this platform
43774 +      # Common symbols not allowed in MH_DYLIB files
43775 +      lt_prog_compiler_pic_F77='-fno-common'
43776 +      ;;
43777 +
43778 +    msdosdjgpp*)
43779 +      # Just because we use GCC doesn't mean we suddenly get shared libraries
43780 +      # on systems that don't support them.
43781 +      lt_prog_compiler_can_build_shared_F77=no
43782 +      enable_shared=no
43783 +      ;;
43784 +
43785 +    sysv4*MP*)
43786 +      if test -d /usr/nec; then
43787 +       lt_prog_compiler_pic_F77=-Kconform_pic
43788 +      fi
43789 +      ;;
43790 +
43791 +    hpux*)
43792 +      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
43793 +      # not for PA HP-UX.
43794 +      case "$host_cpu" in
43795 +      hppa*64*|ia64*)
43796 +       # +Z the default
43797 +       ;;
43798 +      *)
43799 +       lt_prog_compiler_pic_F77='-fPIC'
43800 +       ;;
43801 +      esac
43802 +      ;;
43803 +
43804 +    *)
43805 +      lt_prog_compiler_pic_F77='-fPIC'
43806 +      ;;
43807 +    esac
43808 +  else
43809 +    # PORTME Check for flag to pass linker flags through the system compiler.
43810 +    case $host_os in
43811 +    aix*)
43812 +      lt_prog_compiler_wl_F77='-Wl,'
43813 +      if test "$host_cpu" = ia64; then
43814 +       # AIX 5 now supports IA64 processor
43815 +       lt_prog_compiler_static_F77='-Bstatic'
43816 +      else
43817 +       lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
43818 +      fi
43819 +      ;;
43820 +      darwin*)
43821 +        # PIC is the default on this platform
43822 +        # Common symbols not allowed in MH_DYLIB files
43823 +       case "$cc_basename" in
43824 +         xlc*)
43825 +         lt_prog_compiler_pic_F77='-qnocommon'
43826 +         lt_prog_compiler_wl_F77='-Wl,'
43827 +         ;;
43828 +       esac
43829 +       ;;
43830 +
43831 +    mingw* | pw32* | os2*)
43832 +      # This hack is so that the source file can tell whether it is being
43833 +      # built for inclusion in a dll (and should export symbols for example).
43834 +      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
43835 +      ;;
43836 +
43837 +    hpux9* | hpux10* | hpux11*)
43838 +      lt_prog_compiler_wl_F77='-Wl,'
43839 +      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
43840 +      # not for PA HP-UX.
43841 +      case "$host_cpu" in
43842 +      hppa*64*|ia64*)
43843 +       # +Z the default
43844 +       ;;
43845 +      *)
43846 +       lt_prog_compiler_pic_F77='+Z'
43847 +       ;;
43848 +      esac
43849 +      # Is there a better lt_prog_compiler_static that works with the bundled CC?
43850 +      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
43851 +      ;;
43852 +
43853 +    irix5* | irix6* | nonstopux*)
43854 +      lt_prog_compiler_wl_F77='-Wl,'
43855 +      # PIC (with -KPIC) is the default.
43856 +      lt_prog_compiler_static_F77='-non_shared'
43857 +      ;;
43858 +
43859 +    newsos6)
43860 +      lt_prog_compiler_pic_F77='-KPIC'
43861 +      lt_prog_compiler_static_F77='-Bstatic'
43862 +      ;;
43863 +
43864 +    linux*)
43865 +      case $cc_basename in
43866 +      icc* | ecc*)
43867 +       lt_prog_compiler_wl_F77='-Wl,'
43868 +       lt_prog_compiler_pic_F77='-KPIC'
43869 +       lt_prog_compiler_static_F77='-static'
43870 +        ;;
43871 +      pgcc | pgf77 | pgf90)
43872 +        # Portland Group compilers (*not* the Pentium gcc compiler,
43873 +       # which looks to be a dead project)
43874 +       lt_prog_compiler_wl_F77='-Wl,'
43875 +       lt_prog_compiler_pic_F77='-fpic'
43876 +       lt_prog_compiler_static_F77='-static'
43877 +        ;;
43878 +      ccc*)
43879 +        lt_prog_compiler_wl_F77='-Wl,'
43880 +        # All Alpha code is PIC.
43881 +        lt_prog_compiler_static_F77='-non_shared'
43882 +        ;;
43883 +      esac
43884 +      ;;
43885 +
43886 +    osf3* | osf4* | osf5*)
43887 +      lt_prog_compiler_wl_F77='-Wl,'
43888 +      # All OSF/1 code is PIC.
43889 +      lt_prog_compiler_static_F77='-non_shared'
43890 +      ;;
43891 +
43892 +    sco3.2v5*)
43893 +      lt_prog_compiler_pic_F77='-Kpic'
43894 +      lt_prog_compiler_static_F77='-dn'
43895 +      ;;
43896 +
43897 +    solaris*)
43898 +      lt_prog_compiler_wl_F77='-Wl,'
43899 +      lt_prog_compiler_pic_F77='-KPIC'
43900 +      lt_prog_compiler_static_F77='-Bstatic'
43901 +      ;;
43902 +
43903 +    sunos4*)
43904 +      lt_prog_compiler_wl_F77='-Qoption ld '
43905 +      lt_prog_compiler_pic_F77='-PIC'
43906 +      lt_prog_compiler_static_F77='-Bstatic'
43907 +      ;;
43908 +
43909 +    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
43910 +      lt_prog_compiler_wl_F77='-Wl,'
43911 +      lt_prog_compiler_pic_F77='-KPIC'
43912 +      lt_prog_compiler_static_F77='-Bstatic'
43913 +      ;;
43914 +
43915 +    sysv4*MP*)
43916 +      if test -d /usr/nec ;then
43917 +       lt_prog_compiler_pic_F77='-Kconform_pic'
43918 +       lt_prog_compiler_static_F77='-Bstatic'
43919 +      fi
43920 +      ;;
43921 +
43922 +    unicos*)
43923 +      lt_prog_compiler_wl_F77='-Wl,'
43924 +      lt_prog_compiler_can_build_shared_F77=no
43925 +      ;;
43926 +
43927 +    uts4*)
43928 +      lt_prog_compiler_pic_F77='-pic'
43929 +      lt_prog_compiler_static_F77='-Bstatic'
43930 +      ;;
43931 +
43932 +    *)
43933 +      lt_prog_compiler_can_build_shared_F77=no
43934 +      ;;
43935 +    esac
43936 +  fi
43937 +
43938 +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
43939 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6
43940 +
43941 +#
43942 +# Check to make sure the PIC flag actually works.
43943 +#
43944 +if test -n "$lt_prog_compiler_pic_F77"; then
43945 +
43946 +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
43947 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
43948 +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
43949 +  echo $ECHO_N "(cached) $ECHO_C" >&6
43950 +else
43951 +  lt_prog_compiler_pic_works_F77=no
43952 +  ac_outfile=conftest.$ac_objext
43953 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
43954 +   lt_compiler_flag="$lt_prog_compiler_pic_F77"
43955 +   # Insert the option either (1) after the last *FLAGS variable, or
43956 +   # (2) before a word containing "conftest.", or (3) at the end.
43957 +   # Note that $ac_compile itself does not contain backslashes and begins
43958 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
43959 +   # The option is referenced via a variable to avoid confusing sed.
43960 +   lt_compile=`echo "$ac_compile" | $SED \
43961 +   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
43962 +   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
43963 +   -e 's:$: $lt_compiler_flag:'`
43964 +   (eval echo "\"\$as_me:13670: $lt_compile\"" >&5)
43965 +   (eval "$lt_compile" 2>conftest.err)
43966 +   ac_status=$?
43967 +   cat conftest.err >&5
43968 +   echo "$as_me:13674: \$? = $ac_status" >&5
43969 +   if (exit $ac_status) && test -s "$ac_outfile"; then
43970 +     # The compiler can only warn and ignore the option if not recognized
43971 +     # So say no if there are warnings
43972 +     if test ! -s conftest.err; then
43973 +       lt_prog_compiler_pic_works_F77=yes
43974 +     fi
43975 +   fi
43976 +   $rm conftest*
43977 +
43978 +fi
43979 +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
43980 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6
43981 +
43982 +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
43983 +    case $lt_prog_compiler_pic_F77 in
43984 +     "" | " "*) ;;
43985 +     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
43986 +     esac
43987 +else
43988 +    lt_prog_compiler_pic_F77=
43989 +     lt_prog_compiler_can_build_shared_F77=no
43990 +fi
43991 +
43992 +fi
43993 +case "$host_os" in
43994 +  # For platforms which do not support PIC, -DPIC is meaningless:
43995 +  *djgpp*)
43996 +    lt_prog_compiler_pic_F77=
43997 +    ;;
43998 +  *)
43999 +    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
44000 +    ;;
44001 +esac
44002 +
44003 +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
44004 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
44005 +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
44006 +  echo $ECHO_N "(cached) $ECHO_C" >&6
44007 +else
44008 +  lt_cv_prog_compiler_c_o_F77=no
44009 +   $rm -r conftest 2>/dev/null
44010 +   mkdir conftest
44011 +   cd conftest
44012 +   mkdir out
44013 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
44014 +
44015 +   lt_compiler_flag="-o out/conftest2.$ac_objext"
44016 +   # Insert the option either (1) after the last *FLAGS variable, or
44017 +   # (2) before a word containing "conftest.", or (3) at the end.
44018 +   # Note that $ac_compile itself does not contain backslashes and begins
44019 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
44020 +   lt_compile=`echo "$ac_compile" | $SED \
44021 +   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
44022 +   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
44023 +   -e 's:$: $lt_compiler_flag:'`
44024 +   (eval echo "\"\$as_me:13730: $lt_compile\"" >&5)
44025 +   (eval "$lt_compile" 2>out/conftest.err)
44026 +   ac_status=$?
44027 +   cat out/conftest.err >&5
44028 +   echo "$as_me:13734: \$? = $ac_status" >&5
44029 +   if (exit $ac_status) && test -s out/conftest2.$ac_objext
44030 +   then
44031 +     # The compiler can only warn and ignore the option if not recognized
44032 +     # So say no if there are warnings
44033 +     if test ! -s out/conftest.err; then
44034 +       lt_cv_prog_compiler_c_o_F77=yes
44035 +     fi
44036 +   fi
44037 +   chmod u+w .
44038 +   $rm conftest*
44039 +   # SGI C++ compiler will create directory out/ii_files/ for
44040 +   # template instantiation
44041 +   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
44042 +   $rm out/* && rmdir out
44043 +   cd ..
44044 +   rmdir conftest
44045 +   $rm conftest*
44046 +
44047 +fi
44048 +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
44049 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6
44050 +
44051 +
44052 +hard_links="nottested"
44053 +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
44054 +  # do not overwrite the value of need_locks provided by the user
44055 +  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
44056 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
44057 +  hard_links=yes
44058 +  $rm conftest*
44059 +  ln conftest.a conftest.b 2>/dev/null && hard_links=no
44060 +  touch conftest.a
44061 +  ln conftest.a conftest.b 2>&5 || hard_links=no
44062 +  ln conftest.a conftest.b 2>/dev/null && hard_links=no
44063 +  echo "$as_me:$LINENO: result: $hard_links" >&5
44064 +echo "${ECHO_T}$hard_links" >&6
44065 +  if test "$hard_links" = no; then
44066 +    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
44067 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
44068 +    need_locks=warn
44069 +  fi
44070 +else
44071 +  need_locks=no
44072 +fi
44073 +
44074 +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
44075 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
44076 +
44077 +  runpath_var=
44078 +  allow_undefined_flag_F77=
44079 +  enable_shared_with_static_runtimes_F77=no
44080 +  archive_cmds_F77=
44081 +  archive_expsym_cmds_F77=
44082 +  old_archive_From_new_cmds_F77=
44083 +  old_archive_from_expsyms_cmds_F77=
44084 +  export_dynamic_flag_spec_F77=
44085 +  whole_archive_flag_spec_F77=
44086 +  thread_safe_flag_spec_F77=
44087 +  hardcode_libdir_flag_spec_F77=
44088 +  hardcode_libdir_flag_spec_ld_F77=
44089 +  hardcode_libdir_separator_F77=
44090 +  hardcode_direct_F77=no
44091 +  hardcode_minus_L_F77=no
44092 +  hardcode_shlibpath_var_F77=unsupported
44093 +  link_all_deplibs_F77=unknown
44094 +  hardcode_automatic_F77=no
44095 +  module_cmds_F77=
44096 +  module_expsym_cmds_F77=
44097 +  always_export_symbols_F77=no
44098 +  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
44099 +  # include_expsyms should be a list of space-separated symbols to be *always*
44100 +  # included in the symbol list
44101 +  include_expsyms_F77=
44102 +  # exclude_expsyms can be an extended regexp of symbols to exclude
44103 +  # it will be wrapped by ` (' and `)$', so one must not match beginning or
44104 +  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
44105 +  # as well as any symbol that contains `d'.
44106 +  exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
44107 +  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
44108 +  # platforms (ab)use it in PIC code, but their linkers get confused if
44109 +  # the symbol is explicitly referenced.  Since portable code cannot
44110 +  # rely on this symbol name, it's probably fine to never include it in
44111 +  # preloaded symbol tables.
44112 +  extract_expsyms_cmds=
44113 +
44114 +  case $host_os in
44115 +  cygwin* | mingw* | pw32*)
44116 +    # FIXME: the MSVC++ port hasn't been tested in a loooong time
44117 +    # When not using gcc, we currently assume that we are using
44118 +    # Microsoft Visual C++.
44119 +    if test "$GCC" != yes; then
44120 +      with_gnu_ld=no
44121 +    fi
44122 +    ;;
44123 +  openbsd*)
44124 +    with_gnu_ld=no
44125 +    ;;
44126 +  esac
44127 +
44128 +  ld_shlibs_F77=yes
44129 +  if test "$with_gnu_ld" = yes; then
44130 +    # If archive_cmds runs LD, not CC, wlarc should be empty
44131 +    wlarc='${wl}'
44132 +
44133 +    # See if GNU ld supports shared libraries.
44134 +    case $host_os in
44135 +    aix3* | aix4* | aix5*)
44136 +      # On AIX/PPC, the GNU linker is very broken
44137 +      if test "$host_cpu" != ia64; then
44138 +       ld_shlibs_F77=no
44139 +       cat <<EOF 1>&2
44140 +
44141 +*** Warning: the GNU linker, at least up to release 2.9.1, is reported
44142 +*** to be unable to reliably create shared libraries on AIX.
44143 +*** Therefore, libtool is disabling shared libraries support.  If you
44144 +*** really care for shared libraries, you may want to modify your PATH
44145 +*** so that a non-GNU linker is found, and then restart.
44146 +
44147 +EOF
44148 +      fi
44149 +      ;;
44150 +
44151 +    amigaos*)
44152 +      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
44153 +      hardcode_libdir_flag_spec_F77='-L$libdir'
44154 +      hardcode_minus_L_F77=yes
44155 +
44156 +      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
44157 +      # that the semantics of dynamic libraries on AmigaOS, at least up
44158 +      # to version 4, is to share data among multiple programs linked
44159 +      # with the same dynamic library.  Since this doesn't match the
44160 +      # behavior of shared libraries on other platforms, we can't use
44161 +      # them.
44162 +      ld_shlibs_F77=no
44163 +      ;;
44164 +
44165 +    beos*)
44166 +      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
44167 +       allow_undefined_flag_F77=unsupported
44168 +       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
44169 +       # support --undefined.  This deserves some investigation.  FIXME
44170 +       archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44171 +      else
44172 +       ld_shlibs_F77=no
44173 +      fi
44174 +      ;;
44175 +
44176 +    cygwin* | mingw* | pw32*)
44177 +      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
44178 +      # as there is no search path for DLLs.
44179 +      hardcode_libdir_flag_spec_F77='-L$libdir'
44180 +      allow_undefined_flag_F77=unsupported
44181 +      always_export_symbols_F77=no
44182 +      enable_shared_with_static_runtimes_F77=yes
44183 +      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
44184 +
44185 +      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
44186 +        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
44187 +       # If the export-symbols file already is a .def file (1st line
44188 +       # is EXPORTS), use it as is; otherwise, prepend...
44189 +       archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
44190 +         cp $export_symbols $output_objdir/$soname.def;
44191 +       else
44192 +         echo EXPORTS > $output_objdir/$soname.def;
44193 +         cat $export_symbols >> $output_objdir/$soname.def;
44194 +       fi~
44195 +       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
44196 +      else
44197 +       ld_shlibs_F77=no
44198 +      fi
44199 +      ;;
44200 +
44201 +    netbsd*)
44202 +      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
44203 +       archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
44204 +       wlarc=
44205 +      else
44206 +       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44207 +       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
44208 +      fi
44209 +      ;;
44210 +
44211 +    solaris* | sysv5*)
44212 +      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
44213 +       ld_shlibs_F77=no
44214 +       cat <<EOF 1>&2
44215 +
44216 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably
44217 +*** create shared libraries on Solaris systems.  Therefore, libtool
44218 +*** is disabling shared libraries support.  We urge you to upgrade GNU
44219 +*** binutils to release 2.9.1 or newer.  Another option is to modify
44220 +*** your PATH or compiler configuration so that the native linker is
44221 +*** used, and then restart.
44222 +
44223 +EOF
44224 +      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
44225 +       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44226 +       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
44227 +      else
44228 +       ld_shlibs_F77=no
44229 +      fi
44230 +      ;;
44231 +
44232 +    sunos4*)
44233 +      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
44234 +      wlarc=
44235 +      hardcode_direct_F77=yes
44236 +      hardcode_shlibpath_var_F77=no
44237 +      ;;
44238 +
44239 +  linux*)
44240 +    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
44241 +      tmp_addflag=
44242 +      case $CC,$host_cpu in
44243 +      pgf77* | pgf90* )                        # Portland Group f77 and f90 compilers
44244 +        tmp_addflag=' -fpic' ;;
44245 +      ecc*,ia64* | icc*,ia64*)         # Intel C compiler on ia64
44246 +        tmp_addflag=' -i_dynamic' ;;
44247 +      efc*,ia64* | ifort*,ia64*)       # Intel Fortran compiler on ia64
44248 +        tmp_addflag=' -i_dynamic -nofor_main' ;;
44249 +      ifc* | ifort*)                   # Intel Fortran compiler
44250 +       tmp_addflag=' -nofor_main' ;;
44251 +      esac
44252 +      archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44253 +      supports_anon_versioning=no
44254 +      case `$LD -v 2>/dev/null` in
44255 +        *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
44256 +        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
44257 +        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
44258 +        *\ 2.11.*) ;; # other 2.11 versions
44259 +        *) supports_anon_versioning=yes ;;
44260 +      esac
44261 +      if test $supports_anon_versioning = yes; then
44262 +        archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
44263 +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
44264 +$echo "local: *; };" >> $output_objdir/$libname.ver~
44265 +        $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
44266 +      else
44267 +        archive_expsym_cmds_F77=$archive_cmds_F77
44268 +      fi
44269 +    else
44270 +      ld_shlibs_F77=no
44271 +    fi
44272 +    ;;
44273 +
44274 +    *)
44275 +      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
44276 +       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
44277 +       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
44278 +      else
44279 +       ld_shlibs_F77=no
44280 +      fi
44281 +      ;;
44282 +    esac
44283 +
44284 +    if test "$ld_shlibs_F77" = yes; then
44285 +      runpath_var=LD_RUN_PATH
44286 +      hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
44287 +      export_dynamic_flag_spec_F77='${wl}--export-dynamic'
44288 +      # ancient GNU ld didn't support --whole-archive et. al.
44289 +      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
44290 +       whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
44291 +      else
44292 +       whole_archive_flag_spec_F77=
44293 +      fi
44294 +    fi
44295 +  else
44296 +    # PORTME fill in a description of your system's linker (not GNU ld)
44297 +    case $host_os in
44298 +    aix3*)
44299 +      allow_undefined_flag_F77=unsupported
44300 +      always_export_symbols_F77=yes
44301 +      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
44302 +      # Note: this linker hardcodes the directories in LIBPATH if there
44303 +      # are no directories specified by -L.
44304 +      hardcode_minus_L_F77=yes
44305 +      if test "$GCC" = yes && test -z "$link_static_flag"; then
44306 +       # Neither direct hardcoding nor static linking is supported with a
44307 +       # broken collect2.
44308 +       hardcode_direct_F77=unsupported
44309 +      fi
44310 +      ;;
44311 +
44312 +    aix4* | aix5*)
44313 +      if test "$host_cpu" = ia64; then
44314 +       # On IA64, the linker does run time linking by default, so we don't
44315 +       # have to do anything special.
44316 +       aix_use_runtimelinking=no
44317 +       exp_sym_flag='-Bexport'
44318 +       no_entry_flag=""
44319 +      else
44320 +       # If we're using GNU nm, then we don't want the "-C" option.
44321 +       # -C means demangle to AIX nm, but means don't demangle with GNU nm
44322 +       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
44323 +         export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
44324 +       else
44325 +         export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
44326 +       fi
44327 +       aix_use_runtimelinking=no
44328 +
44329 +       # Test if we are trying to use run time linking or normal
44330 +       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
44331 +       # need to do runtime linking.
44332 +       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
44333 +         for ld_flag in $LDFLAGS; do
44334 +         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
44335 +           aix_use_runtimelinking=yes
44336 +           break
44337 +         fi
44338 +         done
44339 +       esac
44340 +
44341 +       exp_sym_flag='-bexport'
44342 +       no_entry_flag='-bnoentry'
44343 +      fi
44344 +
44345 +      # When large executables or shared objects are built, AIX ld can
44346 +      # have problems creating the table of contents.  If linking a library
44347 +      # or program results in "error TOC overflow" add -mminimal-toc to
44348 +      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
44349 +      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
44350 +
44351 +      archive_cmds_F77=''
44352 +      hardcode_direct_F77=yes
44353 +      hardcode_libdir_separator_F77=':'
44354 +      link_all_deplibs_F77=yes
44355 +
44356 +      if test "$GCC" = yes; then
44357 +       case $host_os in aix4.[012]|aix4.[012].*)
44358 +       # We only want to do this on AIX 4.2 and lower, the check
44359 +       # below for broken collect2 doesn't work under 4.3+
44360 +         collect2name=`${CC} -print-prog-name=collect2`
44361 +         if test -f "$collect2name" && \
44362 +          strings "$collect2name" | grep resolve_lib_name >/dev/null
44363 +         then
44364 +         # We have reworked collect2
44365 +         hardcode_direct_F77=yes
44366 +         else
44367 +         # We have old collect2
44368 +         hardcode_direct_F77=unsupported
44369 +         # It fails to find uninstalled libraries when the uninstalled
44370 +         # path is not listed in the libpath.  Setting hardcode_minus_L
44371 +         # to unsupported forces relinking
44372 +         hardcode_minus_L_F77=yes
44373 +         hardcode_libdir_flag_spec_F77='-L$libdir'
44374 +         hardcode_libdir_separator_F77=
44375 +         fi
44376 +       esac
44377 +       shared_flag='-shared'
44378 +       if test "$aix_use_runtimelinking" = yes; then
44379 +         shared_flag="$shared_flag "'${wl}-G'
44380 +       fi
44381 +      else
44382 +       # not using gcc
44383 +       if test "$host_cpu" = ia64; then
44384 +       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
44385 +       # chokes on -Wl,-G. The following line is correct:
44386 +         shared_flag='-G'
44387 +       else
44388 +       if test "$aix_use_runtimelinking" = yes; then
44389 +           shared_flag='${wl}-G'
44390 +         else
44391 +           shared_flag='${wl}-bM:SRE'
44392 +       fi
44393 +       fi
44394 +      fi
44395 +
44396 +      # It seems that -bexpall does not export symbols beginning with
44397 +      # underscore (_), so it is better to generate a list of symbols to export.
44398 +      always_export_symbols_F77=yes
44399 +      if test "$aix_use_runtimelinking" = yes; then
44400 +       # Warning - without using the other runtime loading flags (-brtl),
44401 +       # -berok will link without error, but may produce a broken library.
44402 +       allow_undefined_flag_F77='-berok'
44403 +       # Determine the default libpath from the value encoded in an empty executable.
44404 +       cat >conftest.$ac_ext <<_ACEOF
44405 +      program main
44406 +
44407 +      end
44408 +_ACEOF
44409 +rm -f conftest.$ac_objext conftest$ac_exeext
44410 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44411 +  (eval $ac_link) 2>conftest.er1
44412 +  ac_status=$?
44413 +  grep -v '^ *+' conftest.er1 >conftest.err
44414 +  rm -f conftest.er1
44415 +  cat conftest.err >&5
44416 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
44417 +  (exit $ac_status); } &&
44418 +        { ac_try='test -z "$ac_f77_werror_flag"
44419 +                        || test ! -s conftest.err'
44420 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44421 +  (eval $ac_try) 2>&5
44422 +  ac_status=$?
44423 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
44424 +  (exit $ac_status); }; } &&
44425 +        { ac_try='test -s conftest$ac_exeext'
44426 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44427 +  (eval $ac_try) 2>&5
44428 +  ac_status=$?
44429 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
44430 +  (exit $ac_status); }; }; then
44431 +
44432 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
44433 +}'`
44434 +# Check for a 64-bit object if we didn't find anything.
44435 +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
44436 +}'`; fi
44437 +else
44438 +  echo "$as_me: failed program was:" >&5
44439 +sed 's/^/| /' conftest.$ac_ext >&5
44440 +
44441 +fi
44442 +rm -f conftest.err conftest.$ac_objext \
44443 +      conftest$ac_exeext conftest.$ac_ext
44444 +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
44445 +
44446 +       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
44447 +       archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
44448 +       else
44449 +       if test "$host_cpu" = ia64; then
44450 +         hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
44451 +         allow_undefined_flag_F77="-z nodefs"
44452 +         archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
44453 +       else
44454 +        # Determine the default libpath from the value encoded in an empty executable.
44455 +        cat >conftest.$ac_ext <<_ACEOF
44456 +      program main
44457 +
44458 +      end
44459 +_ACEOF
44460 +rm -f conftest.$ac_objext conftest$ac_exeext
44461 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
44462 +  (eval $ac_link) 2>conftest.er1
44463 +  ac_status=$?
44464 +  grep -v '^ *+' conftest.er1 >conftest.err
44465 +  rm -f conftest.er1
44466 +  cat conftest.err >&5
44467 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
44468 +  (exit $ac_status); } &&
44469 +        { ac_try='test -z "$ac_f77_werror_flag"
44470 +                        || test ! -s conftest.err'
44471 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44472 +  (eval $ac_try) 2>&5
44473 +  ac_status=$?
44474 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
44475 +  (exit $ac_status); }; } &&
44476 +        { ac_try='test -s conftest$ac_exeext'
44477 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
44478 +  (eval $ac_try) 2>&5
44479 +  ac_status=$?
44480 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
44481 +  (exit $ac_status); }; }; then
44482 +
44483 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
44484 +}'`
44485 +# Check for a 64-bit object if we didn't find anything.
44486 +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
44487 +}'`; fi
44488 +else
44489 +  echo "$as_me: failed program was:" >&5
44490 +sed 's/^/| /' conftest.$ac_ext >&5
44491 +
44492 +fi
44493 +rm -f conftest.err conftest.$ac_objext \
44494 +      conftest$ac_exeext conftest.$ac_ext
44495 +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
44496 +
44497 +        hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
44498 +         # Warning - without using the other run time loading flags,
44499 +         # -berok will link without error, but may produce a broken library.
44500 +         no_undefined_flag_F77=' ${wl}-bernotok'
44501 +         allow_undefined_flag_F77=' ${wl}-berok'
44502 +         # -bexpall does not export symbols beginning with underscore (_)
44503 +         always_export_symbols_F77=yes
44504 +         # Exported symbols can be pulled into shared objects from archives
44505 +         whole_archive_flag_spec_F77=' '
44506 +         archive_cmds_need_lc_F77=yes
44507 +         # This is similar to how AIX traditionally builds it's shared libraries.
44508 +         archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
44509 +       fi
44510 +      fi
44511 +      ;;
44512 +
44513 +    amigaos*)
44514 +      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
44515 +      hardcode_libdir_flag_spec_F77='-L$libdir'
44516 +      hardcode_minus_L_F77=yes
44517 +      # see comment about different semantics on the GNU ld section
44518 +      ld_shlibs_F77=no
44519 +      ;;
44520 +
44521 +    bsdi[45]*)
44522 +      export_dynamic_flag_spec_F77=-rdynamic
44523 +      ;;
44524 +
44525 +    cygwin* | mingw* | pw32*)
44526 +      # When not using gcc, we currently assume that we are using
44527 +      # Microsoft Visual C++.
44528 +      # hardcode_libdir_flag_spec is actually meaningless, as there is
44529 +      # no search path for DLLs.
44530 +      hardcode_libdir_flag_spec_F77=' '
44531 +      allow_undefined_flag_F77=unsupported
44532 +      # Tell ltmain to make .lib files, not .a files.
44533 +      libext=lib
44534 +      # Tell ltmain to make .dll files, not .so files.
44535 +      shrext_cmds=".dll"
44536 +      # FIXME: Setting linknames here is a bad hack.
44537 +      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
44538 +      # The linker will automatically build a .lib file if we build a DLL.
44539 +      old_archive_From_new_cmds_F77='true'
44540 +      # FIXME: Should let the user specify the lib program.
44541 +      old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
44542 +      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
44543 +      enable_shared_with_static_runtimes_F77=yes
44544 +      ;;
44545 +
44546 +    darwin* | rhapsody*)
44547 +      case "$host_os" in
44548 +        rhapsody* | darwin1.[012])
44549 +         allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
44550 +         ;;
44551 +       *) # Darwin 1.3 on
44552 +         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
44553 +           allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
44554 +         else
44555 +           case ${MACOSX_DEPLOYMENT_TARGET} in
44556 +             10.[012])
44557 +               allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
44558 +               ;;
44559 +             10.*)
44560 +               allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
44561 +               ;;
44562 +           esac
44563 +         fi
44564 +         ;;
44565 +      esac
44566 +      archive_cmds_need_lc_F77=no
44567 +      hardcode_direct_F77=no
44568 +      hardcode_automatic_F77=yes
44569 +      hardcode_shlibpath_var_F77=unsupported
44570 +      whole_archive_flag_spec_F77=''
44571 +      link_all_deplibs_F77=yes
44572 +    if test "$GCC" = yes ; then
44573 +       output_verbose_link_cmd='echo'
44574 +        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
44575 +      module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
44576 +      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
44577 +      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
44578 +      module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
44579 +    else
44580 +      case "$cc_basename" in
44581 +        xlc*)
44582 +         output_verbose_link_cmd='echo'
44583 +         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
44584 +         module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
44585 +          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
44586 +         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
44587 +          module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
44588 +          ;;
44589 +       *)
44590 +         ld_shlibs_F77=no
44591 +          ;;
44592 +      esac
44593 +    fi
44594 +      ;;
44595 +
44596 +    dgux*)
44597 +      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
44598 +      hardcode_libdir_flag_spec_F77='-L$libdir'
44599 +      hardcode_shlibpath_var_F77=no
44600 +      ;;
44601 +
44602 +    freebsd1*)
44603 +      ld_shlibs_F77=no
44604 +      ;;
44605 +
44606 +    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
44607 +    # support.  Future versions do this automatically, but an explicit c++rt0.o
44608 +    # does not break anything, and helps significantly (at the cost of a little
44609 +    # extra space).
44610 +    freebsd2.2*)
44611 +      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
44612 +      hardcode_libdir_flag_spec_F77='-R$libdir'
44613 +      hardcode_direct_F77=yes
44614 +      hardcode_shlibpath_var_F77=no
44615 +      ;;
44616 +
44617 +    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
44618 +    freebsd2*)
44619 +      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
44620 +      hardcode_direct_F77=yes
44621 +      hardcode_minus_L_F77=yes
44622 +      hardcode_shlibpath_var_F77=no
44623 +      ;;
44624 +
44625 +    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
44626 +    freebsd* | kfreebsd*-gnu | dragonfly*)
44627 +      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
44628 +      hardcode_libdir_flag_spec_F77='-R$libdir'
44629 +      hardcode_direct_F77=yes
44630 +      hardcode_shlibpath_var_F77=no
44631 +      ;;
44632 +
44633 +    hpux9*)
44634 +      if test "$GCC" = yes; then
44635 +       archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
44636 +      else
44637 +       archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
44638 +      fi
44639 +      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
44640 +      hardcode_libdir_separator_F77=:
44641 +      hardcode_direct_F77=yes
44642 +
44643 +      # hardcode_minus_L: Not really in the search PATH,
44644 +      # but as the default location of the library.
44645 +      hardcode_minus_L_F77=yes
44646 +      export_dynamic_flag_spec_F77='${wl}-E'
44647 +      ;;
44648 +
44649 +    hpux10* | hpux11*)
44650 +      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
44651 +       case "$host_cpu" in
44652 +       hppa*64*|ia64*)
44653 +         archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
44654 +         ;;
44655 +       *)
44656 +         archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
44657 +         ;;
44658 +       esac
44659 +      else
44660 +       case "$host_cpu" in
44661 +       hppa*64*|ia64*)
44662 +         archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
44663 +         ;;
44664 +       *)
44665 +         archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
44666 +         ;;
44667 +       esac
44668 +      fi
44669 +      if test "$with_gnu_ld" = no; then
44670 +       case "$host_cpu" in
44671 +       hppa*64*)
44672 +         hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
44673 +         hardcode_libdir_flag_spec_ld_F77='+b $libdir'
44674 +         hardcode_libdir_separator_F77=:
44675 +         hardcode_direct_F77=no
44676 +         hardcode_shlibpath_var_F77=no
44677 +         ;;
44678 +       ia64*)
44679 +         hardcode_libdir_flag_spec_F77='-L$libdir'
44680 +         hardcode_direct_F77=no
44681 +         hardcode_shlibpath_var_F77=no
44682 +
44683 +         # hardcode_minus_L: Not really in the search PATH,
44684 +         # but as the default location of the library.
44685 +         hardcode_minus_L_F77=yes
44686 +         ;;
44687 +       *)
44688 +         hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
44689 +         hardcode_libdir_separator_F77=:
44690 +         hardcode_direct_F77=yes
44691 +         export_dynamic_flag_spec_F77='${wl}-E'
44692 +
44693 +         # hardcode_minus_L: Not really in the search PATH,
44694 +         # but as the default location of the library.
44695 +         hardcode_minus_L_F77=yes
44696 +         ;;
44697 +       esac
44698 +      fi
44699 +      ;;
44700 +
44701 +    irix5* | irix6* | nonstopux*)
44702 +      if test "$GCC" = yes; then
44703 +       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
44704 +      else
44705 +       archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
44706 +       hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
44707 +      fi
44708 +      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
44709 +      hardcode_libdir_separator_F77=:
44710 +      link_all_deplibs_F77=yes
44711 +      ;;
44712 +
44713 +    netbsd*)
44714 +      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
44715 +       archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
44716 +      else
44717 +       archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
44718 +      fi
44719 +      hardcode_libdir_flag_spec_F77='-R$libdir'
44720 +      hardcode_direct_F77=yes
44721 +      hardcode_shlibpath_var_F77=no
44722 +      ;;
44723 +
44724 +    newsos6)
44725 +      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
44726 +      hardcode_direct_F77=yes
44727 +      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
44728 +      hardcode_libdir_separator_F77=:
44729 +      hardcode_shlibpath_var_F77=no
44730 +      ;;
44731 +
44732 +    openbsd*)
44733 +      hardcode_direct_F77=yes
44734 +      hardcode_shlibpath_var_F77=no
44735 +      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
44736 +       archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
44737 +       archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
44738 +       hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
44739 +       export_dynamic_flag_spec_F77='${wl}-E'
44740 +      else
44741 +       case $host_os in
44742 +        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
44743 +          archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
44744 +          hardcode_libdir_flag_spec_F77='-R$libdir'
44745 +          ;;
44746 +        *)
44747 +          archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
44748 +          hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
44749 +          ;;
44750 +       esac
44751 +      fi
44752 +      ;;
44753 +
44754 +    os2*)
44755 +      hardcode_libdir_flag_spec_F77='-L$libdir'
44756 +      hardcode_minus_L_F77=yes
44757 +      allow_undefined_flag_F77=unsupported
44758 +      archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
44759 +      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
44760 +      ;;
44761 +
44762 +    osf3*)
44763 +      if test "$GCC" = yes; then
44764 +       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
44765 +       archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
44766 +      else
44767 +       allow_undefined_flag_F77=' -expect_unresolved \*'
44768 +       archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
44769 +      fi
44770 +      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
44771 +      hardcode_libdir_separator_F77=:
44772 +      ;;
44773 +
44774 +    osf4* | osf5*)     # as osf3* with the addition of -msym flag
44775 +      if test "$GCC" = yes; then
44776 +       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
44777 +       archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
44778 +       hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
44779 +      else
44780 +       allow_undefined_flag_F77=' -expect_unresolved \*'
44781 +       archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
44782 +       archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
44783 +       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
44784 +
44785 +       # Both c and cxx compiler support -rpath directly
44786 +       hardcode_libdir_flag_spec_F77='-rpath $libdir'
44787 +      fi
44788 +      hardcode_libdir_separator_F77=:
44789 +      ;;
44790 +
44791 +    sco3.2v5*)
44792 +      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
44793 +      hardcode_shlibpath_var_F77=no
44794 +      export_dynamic_flag_spec_F77='${wl}-Bexport'
44795 +      runpath_var=LD_RUN_PATH
44796 +      hardcode_runpath_var=yes
44797 +      ;;
44798 +
44799 +    solaris*)
44800 +      no_undefined_flag_F77=' -z text'
44801 +      if test "$GCC" = yes; then
44802 +       archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
44803 +       archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
44804 +         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
44805 +      else
44806 +       archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
44807 +       archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
44808 +       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
44809 +      fi
44810 +      hardcode_libdir_flag_spec_F77='-R$libdir'
44811 +      hardcode_shlibpath_var_F77=no
44812 +      case $host_os in
44813 +      solaris2.[0-5] | solaris2.[0-5].*) ;;
44814 +      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
44815 +       whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
44816 +      esac
44817 +      link_all_deplibs_F77=yes
44818 +      ;;
44819 +
44820 +    sunos4*)
44821 +      if test "x$host_vendor" = xsequent; then
44822 +       # Use $CC to link under sequent, because it throws in some extra .o
44823 +       # files that make .init and .fini sections work.
44824 +       archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
44825 +      else
44826 +       archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
44827 +      fi
44828 +      hardcode_libdir_flag_spec_F77='-L$libdir'
44829 +      hardcode_direct_F77=yes
44830 +      hardcode_minus_L_F77=yes
44831 +      hardcode_shlibpath_var_F77=no
44832 +      ;;
44833 +
44834 +    sysv4)
44835 +      case $host_vendor in
44836 +       sni)
44837 +         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
44838 +         hardcode_direct_F77=yes # is this really true???
44839 +       ;;
44840 +       siemens)
44841 +         ## LD is ld it makes a PLAMLIB
44842 +         ## CC just makes a GrossModule.
44843 +         archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
44844 +         reload_cmds_F77='$CC -r -o $output$reload_objs'
44845 +         hardcode_direct_F77=no
44846 +        ;;
44847 +       motorola)
44848 +         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
44849 +         hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
44850 +       ;;
44851 +      esac
44852 +      runpath_var='LD_RUN_PATH'
44853 +      hardcode_shlibpath_var_F77=no
44854 +      ;;
44855 +
44856 +    sysv4.3*)
44857 +      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
44858 +      hardcode_shlibpath_var_F77=no
44859 +      export_dynamic_flag_spec_F77='-Bexport'
44860 +      ;;
44861 +
44862 +    sysv4*MP*)
44863 +      if test -d /usr/nec; then
44864 +       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
44865 +       hardcode_shlibpath_var_F77=no
44866 +       runpath_var=LD_RUN_PATH
44867 +       hardcode_runpath_var=yes
44868 +       ld_shlibs_F77=yes
44869 +      fi
44870 +      ;;
44871 +
44872 +    sysv4.2uw2*)
44873 +      archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
44874 +      hardcode_direct_F77=yes
44875 +      hardcode_minus_L_F77=no
44876 +      hardcode_shlibpath_var_F77=no
44877 +      hardcode_runpath_var=yes
44878 +      runpath_var=LD_RUN_PATH
44879 +      ;;
44880 +
44881 +   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
44882 +      no_undefined_flag_F77='${wl}-z ${wl}text'
44883 +      if test "$GCC" = yes; then
44884 +       archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
44885 +      else
44886 +       archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
44887 +      fi
44888 +      runpath_var='LD_RUN_PATH'
44889 +      hardcode_shlibpath_var_F77=no
44890 +      ;;
44891 +
44892 +    sysv5*)
44893 +      no_undefined_flag_F77=' -z text'
44894 +      # $CC -shared without GNU ld will not create a library from C++
44895 +      # object files and a static libstdc++, better avoid it by now
44896 +      archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
44897 +      archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
44898 +               $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
44899 +      hardcode_libdir_flag_spec_F77=
44900 +      hardcode_shlibpath_var_F77=no
44901 +      runpath_var='LD_RUN_PATH'
44902 +      ;;
44903 +
44904 +    uts4*)
44905 +      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
44906 +      hardcode_libdir_flag_spec_F77='-L$libdir'
44907 +      hardcode_shlibpath_var_F77=no
44908 +      ;;
44909 +
44910 +    *)
44911 +      ld_shlibs_F77=no
44912 +      ;;
44913 +    esac
44914 +  fi
44915 +
44916 +echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
44917 +echo "${ECHO_T}$ld_shlibs_F77" >&6
44918 +test "$ld_shlibs_F77" = no && can_build_shared=no
44919 +
44920 +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
44921 +if test "$GCC" = yes; then
44922 +  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
44923 +fi
44924 +
44925 +#
44926 +# Do we need to explicitly link libc?
44927 +#
44928 +case "x$archive_cmds_need_lc_F77" in
44929 +x|xyes)
44930 +  # Assume -lc should be added
44931 +  archive_cmds_need_lc_F77=yes
44932 +
44933 +  if test "$enable_shared" = yes && test "$GCC" = yes; then
44934 +    case $archive_cmds_F77 in
44935 +    *'~'*)
44936 +      # FIXME: we may have to deal with multi-command sequences.
44937 +      ;;
44938 +    '$CC '*)
44939 +      # Test whether the compiler implicitly links with -lc since on some
44940 +      # systems, -lgcc has to come before -lc. If gcc already passes -lc
44941 +      # to ld, don't add -lc before -lgcc.
44942 +      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
44943 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
44944 +      $rm conftest*
44945 +      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
44946 +
44947 +      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44948 +  (eval $ac_compile) 2>&5
44949 +  ac_status=$?
44950 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
44951 +  (exit $ac_status); } 2>conftest.err; then
44952 +        soname=conftest
44953 +        lib=conftest
44954 +        libobjs=conftest.$ac_objext
44955 +        deplibs=
44956 +        wl=$lt_prog_compiler_wl_F77
44957 +        compiler_flags=-v
44958 +        linker_flags=-v
44959 +        verstring=
44960 +        output_objdir=.
44961 +        libname=conftest
44962 +        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
44963 +        allow_undefined_flag_F77=
44964 +        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
44965 +  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
44966 +  ac_status=$?
44967 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
44968 +  (exit $ac_status); }
44969 +        then
44970 +         archive_cmds_need_lc_F77=no
44971 +        else
44972 +         archive_cmds_need_lc_F77=yes
44973 +        fi
44974 +        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
44975 +      else
44976 +        cat conftest.err 1>&5
44977 +      fi
44978 +      $rm conftest*
44979 +      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
44980 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6
44981 +      ;;
44982 +    esac
44983 +  fi
44984 +  ;;
44985 +esac
44986 +
44987 +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
44988 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
44989 +library_names_spec=
44990 +libname_spec='lib$name'
44991 +soname_spec=
44992 +shrext_cmds=".so"
44993 +postinstall_cmds=
44994 +postuninstall_cmds=
44995 +finish_cmds=
44996 +finish_eval=
44997 +shlibpath_var=
44998 +shlibpath_overrides_runpath=unknown
44999 +version_type=none
45000 +dynamic_linker="$host_os ld.so"
45001 +sys_lib_dlsearch_path_spec="/lib /usr/lib"
45002 +if test "$GCC" = yes; then
45003 +  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
45004 +  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
45005 +    # if the path contains ";" then we assume it to be the separator
45006 +    # otherwise default to the standard path separator (i.e. ":") - it is
45007 +    # assumed that no part of a normal pathname contains ";" but that should
45008 +    # okay in the real world where ";" in dirpaths is itself problematic.
45009 +    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
45010 +  else
45011 +    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
45012 +  fi
45013 +else
45014 +  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
45015 +fi
45016 +need_lib_prefix=unknown
45017 +hardcode_into_libs=no
45018 +
45019 +# when you set need_version to no, make sure it does not cause -set_version
45020 +# flags to be left without arguments
45021 +need_version=unknown
45022 +
45023 +case $host_os in
45024 +aix3*)
45025 +  version_type=linux
45026 +  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
45027 +  shlibpath_var=LIBPATH
45028 +
45029 +  # AIX 3 has no versioning support, so we append a major version to the name.
45030 +  soname_spec='${libname}${release}${shared_ext}$major'
45031 +  ;;
45032 +
45033 +aix4* | aix5*)
45034 +  version_type=linux
45035 +  need_lib_prefix=no
45036 +  need_version=no
45037 +  hardcode_into_libs=yes
45038 +  if test "$host_cpu" = ia64; then
45039 +    # AIX 5 supports IA64
45040 +    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
45041 +    shlibpath_var=LD_LIBRARY_PATH
45042 +  else
45043 +    # With GCC up to 2.95.x, collect2 would create an import file
45044 +    # for dependence libraries.  The import file would start with
45045 +    # the line `#! .'.  This would cause the generated library to
45046 +    # depend on `.', always an invalid library.  This was fixed in
45047 +    # development snapshots of GCC prior to 3.0.
45048 +    case $host_os in
45049 +      aix4 | aix4.[01] | aix4.[01].*)
45050 +      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
45051 +          echo ' yes '
45052 +          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
45053 +       :
45054 +      else
45055 +       can_build_shared=no
45056 +      fi
45057 +      ;;
45058 +    esac
45059 +    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
45060 +    # soname into executable. Probably we can add versioning support to
45061 +    # collect2, so additional links can be useful in future.
45062 +    if test "$aix_use_runtimelinking" = yes; then
45063 +      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
45064 +      # instead of lib<name>.a to let people know that these are not
45065 +      # typical AIX shared libraries.
45066 +      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45067 +    else
45068 +      # We preserve .a as extension for shared libraries through AIX4.2
45069 +      # and later when we are not doing run time linking.
45070 +      library_names_spec='${libname}${release}.a $libname.a'
45071 +      soname_spec='${libname}${release}${shared_ext}$major'
45072 +    fi
45073 +    shlibpath_var=LIBPATH
45074 +  fi
45075 +  ;;
45076 +
45077 +amigaos*)
45078 +  library_names_spec='$libname.ixlibrary $libname.a'
45079 +  # Create ${libname}_ixlibrary.a entries in /sys/libs.
45080 +  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
45081 +  ;;
45082 +
45083 +beos*)
45084 +  library_names_spec='${libname}${shared_ext}'
45085 +  dynamic_linker="$host_os ld.so"
45086 +  shlibpath_var=LIBRARY_PATH
45087 +  ;;
45088 +
45089 +bsdi[45]*)
45090 +  version_type=linux
45091 +  need_version=no
45092 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45093 +  soname_spec='${libname}${release}${shared_ext}$major'
45094 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
45095 +  shlibpath_var=LD_LIBRARY_PATH
45096 +  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
45097 +  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
45098 +  # the default ld.so.conf also contains /usr/contrib/lib and
45099 +  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
45100 +  # libtool to hard-code these into programs
45101 +  ;;
45102 +
45103 +cygwin* | mingw* | pw32*)
45104 +  version_type=windows
45105 +  shrext_cmds=".dll"
45106 +  need_version=no
45107 +  need_lib_prefix=no
45108 +
45109 +  case $GCC,$host_os in
45110 +  yes,cygwin* | yes,mingw* | yes,pw32*)
45111 +    library_names_spec='$libname.dll.a'
45112 +    # DLL is installed to $(libdir)/../bin by postinstall_cmds
45113 +    postinstall_cmds='base_file=`basename \${file}`~
45114 +      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
45115 +      dldir=$destdir/`dirname \$dlpath`~
45116 +      test -d \$dldir || mkdir -p \$dldir~
45117 +      $install_prog $dir/$dlname \$dldir/$dlname'
45118 +    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
45119 +      dlpath=$dir/\$dldll~
45120 +       $rm \$dlpath'
45121 +    shlibpath_overrides_runpath=yes
45122 +
45123 +    case $host_os in
45124 +    cygwin*)
45125 +      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
45126 +      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
45127 +      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
45128 +      ;;
45129 +    mingw*)
45130 +      # MinGW DLLs use traditional 'lib' prefix
45131 +      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
45132 +      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
45133 +      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
45134 +        # It is most probably a Windows format PATH printed by
45135 +        # mingw gcc, but we are running on Cygwin. Gcc prints its search
45136 +        # path with ; separators, and with drive letters. We can handle the
45137 +        # drive letters (cygwin fileutils understands them), so leave them,
45138 +        # especially as we might pass files found there to a mingw objdump,
45139 +        # which wouldn't understand a cygwinified path. Ahh.
45140 +        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
45141 +      else
45142 +        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
45143 +      fi
45144 +      ;;
45145 +    pw32*)
45146 +      # pw32 DLLs use 'pw' prefix rather than 'lib'
45147 +      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
45148 +      ;;
45149 +    esac
45150 +    ;;
45151 +
45152 +  *)
45153 +    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
45154 +    ;;
45155 +  esac
45156 +  dynamic_linker='Win32 ld.exe'
45157 +  # FIXME: first we should search . and the directory the executable is in
45158 +  shlibpath_var=PATH
45159 +  ;;
45160 +
45161 +darwin* | rhapsody*)
45162 +  dynamic_linker="$host_os dyld"
45163 +  version_type=darwin
45164 +  need_lib_prefix=no
45165 +  need_version=no
45166 +  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
45167 +  soname_spec='${libname}${release}${major}$shared_ext'
45168 +  shlibpath_overrides_runpath=yes
45169 +  shlibpath_var=DYLD_LIBRARY_PATH
45170 +  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
45171 +  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
45172 +  if test "$GCC" = yes; then
45173 +    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
45174 +  else
45175 +    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
45176 +  fi
45177 +  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
45178 +  ;;
45179 +
45180 +dgux*)
45181 +  version_type=linux
45182 +  need_lib_prefix=no
45183 +  need_version=no
45184 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
45185 +  soname_spec='${libname}${release}${shared_ext}$major'
45186 +  shlibpath_var=LD_LIBRARY_PATH
45187 +  ;;
45188 +
45189 +freebsd1*)
45190 +  dynamic_linker=no
45191 +  ;;
45192 +
45193 +kfreebsd*-gnu)
45194 +  version_type=linux
45195 +  need_lib_prefix=no
45196 +  need_version=no
45197 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
45198 +  soname_spec='${libname}${release}${shared_ext}$major'
45199 +  shlibpath_var=LD_LIBRARY_PATH
45200 +  shlibpath_overrides_runpath=no
45201 +  hardcode_into_libs=yes
45202 +  dynamic_linker='GNU ld.so'
45203 +  ;;
45204 +
45205 +freebsd* | dragonfly*)
45206 +  # DragonFly does not have aout.  When/if they implement a new
45207 +  # versioning mechanism, adjust this.
45208 +  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
45209 +  version_type=freebsd-$objformat
45210 +  case $version_type in
45211 +    freebsd-elf*)
45212 +      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
45213 +      need_version=no
45214 +      need_lib_prefix=no
45215 +      ;;
45216 +    freebsd-*)
45217 +      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
45218 +      need_version=yes
45219 +      ;;
45220 +  esac
45221 +  shlibpath_var=LD_LIBRARY_PATH
45222 +  case $host_os in
45223 +  freebsd2*)
45224 +    shlibpath_overrides_runpath=yes
45225 +    ;;
45226 +  freebsd3.[01]* | freebsdelf3.[01]*)
45227 +    shlibpath_overrides_runpath=yes
45228 +    hardcode_into_libs=yes
45229 +    ;;
45230 +  *) # from 3.2 on
45231 +    shlibpath_overrides_runpath=no
45232 +    hardcode_into_libs=yes
45233 +    ;;
45234 +  esac
45235 +  ;;
45236 +
45237 +gnu*)
45238 +  version_type=linux
45239 +  need_lib_prefix=no
45240 +  need_version=no
45241 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
45242 +  soname_spec='${libname}${release}${shared_ext}$major'
45243 +  shlibpath_var=LD_LIBRARY_PATH
45244 +  hardcode_into_libs=yes
45245 +  ;;
45246 +
45247 +hpux9* | hpux10* | hpux11*)
45248 +  # Give a soname corresponding to the major version so that dld.sl refuses to
45249 +  # link against other versions.
45250 +  version_type=sunos
45251 +  need_lib_prefix=no
45252 +  need_version=no
45253 +  case "$host_cpu" in
45254 +  ia64*)
45255 +    shrext_cmds='.so'
45256 +    hardcode_into_libs=yes
45257 +    dynamic_linker="$host_os dld.so"
45258 +    shlibpath_var=LD_LIBRARY_PATH
45259 +    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
45260 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45261 +    soname_spec='${libname}${release}${shared_ext}$major'
45262 +    if test "X$HPUX_IA64_MODE" = X32; then
45263 +      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
45264 +    else
45265 +      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
45266 +    fi
45267 +    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
45268 +    ;;
45269 +   hppa*64*)
45270 +     shrext_cmds='.sl'
45271 +     hardcode_into_libs=yes
45272 +     dynamic_linker="$host_os dld.sl"
45273 +     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
45274 +     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
45275 +     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45276 +     soname_spec='${libname}${release}${shared_ext}$major'
45277 +     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
45278 +     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
45279 +     ;;
45280 +   *)
45281 +    shrext_cmds='.sl'
45282 +    dynamic_linker="$host_os dld.sl"
45283 +    shlibpath_var=SHLIB_PATH
45284 +    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
45285 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45286 +    soname_spec='${libname}${release}${shared_ext}$major'
45287 +    ;;
45288 +  esac
45289 +  # HP-UX runs *really* slowly unless shared libraries are mode 555.
45290 +  postinstall_cmds='chmod 555 $lib'
45291 +  ;;
45292 +
45293 +irix5* | irix6* | nonstopux*)
45294 +  case $host_os in
45295 +    nonstopux*) version_type=nonstopux ;;
45296 +    *)
45297 +       if test "$lt_cv_prog_gnu_ld" = yes; then
45298 +               version_type=linux
45299 +       else
45300 +               version_type=irix
45301 +       fi ;;
45302 +  esac
45303 +  need_lib_prefix=no
45304 +  need_version=no
45305 +  soname_spec='${libname}${release}${shared_ext}$major'
45306 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
45307 +  case $host_os in
45308 +  irix5* | nonstopux*)
45309 +    libsuff= shlibsuff=
45310 +    ;;
45311 +  *)
45312 +    case $LD in # libtool.m4 will add one of these switches to LD
45313 +    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
45314 +      libsuff= shlibsuff= libmagic=32-bit;;
45315 +    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
45316 +      libsuff=32 shlibsuff=N32 libmagic=N32;;
45317 +    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
45318 +      libsuff=64 shlibsuff=64 libmagic=64-bit;;
45319 +    *) libsuff= shlibsuff= libmagic=never-match;;
45320 +    esac
45321 +    ;;
45322 +  esac
45323 +  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
45324 +  shlibpath_overrides_runpath=no
45325 +  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
45326 +  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
45327 +  hardcode_into_libs=yes
45328 +  ;;
45329 +
45330 +# No shared lib support for Linux oldld, aout, or coff.
45331 +linux*oldld* | linux*aout* | linux*coff*)
45332 +  dynamic_linker=no
45333 +  ;;
45334 +
45335 +# This must be Linux ELF.
45336 +linux*)
45337 +  version_type=linux
45338 +  need_lib_prefix=no
45339 +  need_version=no
45340 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45341 +  soname_spec='${libname}${release}${shared_ext}$major'
45342 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
45343 +  shlibpath_var=LD_LIBRARY_PATH
45344 +  shlibpath_overrides_runpath=no
45345 +  # This implies no fast_install, which is unacceptable.
45346 +  # Some rework will be needed to allow for fast_install
45347 +  # before this can be enabled.
45348 +  hardcode_into_libs=yes
45349 +
45350 +  # Append ld.so.conf contents to the search path
45351 +  if test -f /etc/ld.so.conf; then
45352 +    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
45353 +    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
45354 +  fi
45355 +
45356 +  # We used to test for /lib/ld.so.1 and disable shared libraries on
45357 +  # powerpc, because MkLinux only supported shared libraries with the
45358 +  # GNU dynamic linker.  Since this was broken with cross compilers,
45359 +  # most powerpc-linux boxes support dynamic linking these days and
45360 +  # people can always --disable-shared, the test was removed, and we
45361 +  # assume the GNU/Linux dynamic linker is in use.
45362 +  dynamic_linker='GNU/Linux ld.so'
45363 +  ;;
45364 +
45365 +knetbsd*-gnu)
45366 +  version_type=linux
45367 +  need_lib_prefix=no
45368 +  need_version=no
45369 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
45370 +  soname_spec='${libname}${release}${shared_ext}$major'
45371 +  shlibpath_var=LD_LIBRARY_PATH
45372 +  shlibpath_overrides_runpath=no
45373 +  hardcode_into_libs=yes
45374 +  dynamic_linker='GNU ld.so'
45375 +  ;;
45376 +
45377 +netbsd*)
45378 +  version_type=sunos
45379 +  need_lib_prefix=no
45380 +  need_version=no
45381 +  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
45382 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
45383 +    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
45384 +    dynamic_linker='NetBSD (a.out) ld.so'
45385 +  else
45386 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
45387 +    soname_spec='${libname}${release}${shared_ext}$major'
45388 +    dynamic_linker='NetBSD ld.elf_so'
45389 +  fi
45390 +  shlibpath_var=LD_LIBRARY_PATH
45391 +  shlibpath_overrides_runpath=yes
45392 +  hardcode_into_libs=yes
45393 +  ;;
45394 +
45395 +newsos6)
45396 +  version_type=linux
45397 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45398 +  shlibpath_var=LD_LIBRARY_PATH
45399 +  shlibpath_overrides_runpath=yes
45400 +  ;;
45401 +
45402 +nto-qnx*)
45403 +  version_type=linux
45404 +  need_lib_prefix=no
45405 +  need_version=no
45406 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45407 +  soname_spec='${libname}${release}${shared_ext}$major'
45408 +  shlibpath_var=LD_LIBRARY_PATH
45409 +  shlibpath_overrides_runpath=yes
45410 +  ;;
45411 +
45412 +openbsd*)
45413 +  version_type=sunos
45414 +  need_lib_prefix=no
45415 +  need_version=no
45416 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
45417 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
45418 +  shlibpath_var=LD_LIBRARY_PATH
45419 +  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
45420 +    case $host_os in
45421 +      openbsd2.[89] | openbsd2.[89].*)
45422 +       shlibpath_overrides_runpath=no
45423 +       ;;
45424 +      *)
45425 +       shlibpath_overrides_runpath=yes
45426 +       ;;
45427 +      esac
45428 +  else
45429 +    shlibpath_overrides_runpath=yes
45430 +  fi
45431 +  ;;
45432 +
45433 +os2*)
45434 +  libname_spec='$name'
45435 +  shrext_cmds=".dll"
45436 +  need_lib_prefix=no
45437 +  library_names_spec='$libname${shared_ext} $libname.a'
45438 +  dynamic_linker='OS/2 ld.exe'
45439 +  shlibpath_var=LIBPATH
45440 +  ;;
45441 +
45442 +osf3* | osf4* | osf5*)
45443 +  version_type=osf
45444 +  need_lib_prefix=no
45445 +  need_version=no
45446 +  soname_spec='${libname}${release}${shared_ext}$major'
45447 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45448 +  shlibpath_var=LD_LIBRARY_PATH
45449 +  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
45450 +  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
45451 +  ;;
45452 +
45453 +sco3.2v5*)
45454 +  version_type=osf
45455 +  soname_spec='${libname}${release}${shared_ext}$major'
45456 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45457 +  shlibpath_var=LD_LIBRARY_PATH
45458 +  ;;
45459 +
45460 +solaris*)
45461 +  version_type=linux
45462 +  need_lib_prefix=no
45463 +  need_version=no
45464 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45465 +  soname_spec='${libname}${release}${shared_ext}$major'
45466 +  shlibpath_var=LD_LIBRARY_PATH
45467 +  shlibpath_overrides_runpath=yes
45468 +  hardcode_into_libs=yes
45469 +  # ldd complains unless libraries are executable
45470 +  postinstall_cmds='chmod +x $lib'
45471 +  ;;
45472 +
45473 +sunos4*)
45474 +  version_type=sunos
45475 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
45476 +  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
45477 +  shlibpath_var=LD_LIBRARY_PATH
45478 +  shlibpath_overrides_runpath=yes
45479 +  if test "$with_gnu_ld" = yes; then
45480 +    need_lib_prefix=no
45481 +  fi
45482 +  need_version=yes
45483 +  ;;
45484 +
45485 +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
45486 +  version_type=linux
45487 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45488 +  soname_spec='${libname}${release}${shared_ext}$major'
45489 +  shlibpath_var=LD_LIBRARY_PATH
45490 +  case $host_vendor in
45491 +    sni)
45492 +      shlibpath_overrides_runpath=no
45493 +      need_lib_prefix=no
45494 +      export_dynamic_flag_spec='${wl}-Blargedynsym'
45495 +      runpath_var=LD_RUN_PATH
45496 +      ;;
45497 +    siemens)
45498 +      need_lib_prefix=no
45499 +      ;;
45500 +    motorola)
45501 +      need_lib_prefix=no
45502 +      need_version=no
45503 +      shlibpath_overrides_runpath=no
45504 +      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
45505 +      ;;
45506 +  esac
45507 +  ;;
45508 +
45509 +sysv4*MP*)
45510 +  if test -d /usr/nec ;then
45511 +    version_type=linux
45512 +    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
45513 +    soname_spec='$libname${shared_ext}.$major'
45514 +    shlibpath_var=LD_LIBRARY_PATH
45515 +  fi
45516 +  ;;
45517 +
45518 +uts4*)
45519 +  version_type=linux
45520 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45521 +  soname_spec='${libname}${release}${shared_ext}$major'
45522 +  shlibpath_var=LD_LIBRARY_PATH
45523 +  ;;
45524 +
45525 +*)
45526 +  dynamic_linker=no
45527 +  ;;
45528 +esac
45529 +echo "$as_me:$LINENO: result: $dynamic_linker" >&5
45530 +echo "${ECHO_T}$dynamic_linker" >&6
45531 +test "$dynamic_linker" = no && can_build_shared=no
45532 +
45533 +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
45534 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
45535 +hardcode_action_F77=
45536 +if test -n "$hardcode_libdir_flag_spec_F77" || \
45537 +   test -n "$runpath_var_F77" || \
45538 +   test "X$hardcode_automatic_F77" = "Xyes" ; then
45539 +
45540 +  # We can hardcode non-existant directories.
45541 +  if test "$hardcode_direct_F77" != no &&
45542 +     # If the only mechanism to avoid hardcoding is shlibpath_var, we
45543 +     # have to relink, otherwise we might link with an installed library
45544 +     # when we should be linking with a yet-to-be-installed one
45545 +     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
45546 +     test "$hardcode_minus_L_F77" != no; then
45547 +    # Linking always hardcodes the temporary library directory.
45548 +    hardcode_action_F77=relink
45549 +  else
45550 +    # We can link without hardcoding, and we can hardcode nonexisting dirs.
45551 +    hardcode_action_F77=immediate
45552 +  fi
45553 +else
45554 +  # We cannot hardcode anything, or else we can only hardcode existing
45555 +  # directories.
45556 +  hardcode_action_F77=unsupported
45557 +fi
45558 +echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
45559 +echo "${ECHO_T}$hardcode_action_F77" >&6
45560 +
45561 +if test "$hardcode_action_F77" = relink; then
45562 +  # Fast installation is not supported
45563 +  enable_fast_install=no
45564 +elif test "$shlibpath_overrides_runpath" = yes ||
45565 +     test "$enable_shared" = no; then
45566 +  # Fast installation is not necessary
45567 +  enable_fast_install=needless
45568 +fi
45569 +
45570 +striplib=
45571 +old_striplib=
45572 +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
45573 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
45574 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
45575 +  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
45576 +  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
45577 +  echo "$as_me:$LINENO: result: yes" >&5
45578 +echo "${ECHO_T}yes" >&6
45579 +else
45580 +# FIXME - insert some real tests, host_os isn't really good enough
45581 +  case $host_os in
45582 +   darwin*)
45583 +       if test -n "$STRIP" ; then
45584 +         striplib="$STRIP -x"
45585 +         echo "$as_me:$LINENO: result: yes" >&5
45586 +echo "${ECHO_T}yes" >&6
45587 +       else
45588 +  echo "$as_me:$LINENO: result: no" >&5
45589 +echo "${ECHO_T}no" >&6
45590 +fi
45591 +       ;;
45592 +   *)
45593 +  echo "$as_me:$LINENO: result: no" >&5
45594 +echo "${ECHO_T}no" >&6
45595 +    ;;
45596 +  esac
45597 +fi
45598 +
45599 +
45600 +
45601 +# The else clause should only fire when bootstrapping the
45602 +# libtool distribution, otherwise you forgot to ship ltmain.sh
45603 +# with your package, and you will get complaints that there are
45604 +# no rules to generate ltmain.sh.
45605 +if test -f "$ltmain"; then
45606 +  # See if we are running on zsh, and set the options which allow our commands through
45607 +  # without removal of \ escapes.
45608 +  if test -n "${ZSH_VERSION+set}" ; then
45609 +    setopt NO_GLOB_SUBST
45610 +  fi
45611 +  # Now quote all the things that may contain metacharacters while being
45612 +  # careful not to overquote the AC_SUBSTed values.  We take copies of the
45613 +  # variables and quote the copies for generation of the libtool script.
45614 +  for var in echo old_CC old_CFLAGS AR AR_FLAGS AS EGREP RANLIB LN_S LTCC NM \
45615 +    SED SHELL STRIP \
45616 +    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
45617 +    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
45618 +    deplibs_check_method reload_flag reload_cmds need_locks \
45619 +    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
45620 +    lt_cv_sys_global_symbol_to_c_name_address \
45621 +    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
45622 +    old_postinstall_cmds old_postuninstall_cmds \
45623 +    compiler_F77 \
45624 +    CC_F77 \
45625 +    LD_F77 \
45626 +    lt_prog_compiler_wl_F77 \
45627 +    lt_prog_compiler_pic_F77 \
45628 +    lt_prog_compiler_static_F77 \
45629 +    lt_prog_compiler_no_builtin_flag_F77 \
45630 +    export_dynamic_flag_spec_F77 \
45631 +    thread_safe_flag_spec_F77 \
45632 +    whole_archive_flag_spec_F77 \
45633 +    enable_shared_with_static_runtimes_F77 \
45634 +    old_archive_cmds_F77 \
45635 +    old_archive_from_new_cmds_F77 \
45636 +    predep_objects_F77 \
45637 +    postdep_objects_F77 \
45638 +    predeps_F77 \
45639 +    postdeps_F77 \
45640 +    compiler_lib_search_path_F77 \
45641 +    archive_cmds_F77 \
45642 +    archive_expsym_cmds_F77 \
45643 +    postinstall_cmds_F77 \
45644 +    postuninstall_cmds_F77 \
45645 +    old_archive_from_expsyms_cmds_F77 \
45646 +    allow_undefined_flag_F77 \
45647 +    no_undefined_flag_F77 \
45648 +    export_symbols_cmds_F77 \
45649 +    hardcode_libdir_flag_spec_F77 \
45650 +    hardcode_libdir_flag_spec_ld_F77 \
45651 +    hardcode_libdir_separator_F77 \
45652 +    hardcode_automatic_F77 \
45653 +    module_cmds_F77 \
45654 +    module_expsym_cmds_F77 \
45655 +    lt_cv_prog_compiler_c_o_F77 \
45656 +    exclude_expsyms_F77 \
45657 +    include_expsyms_F77; do
45658 +
45659 +    case $var in
45660 +    old_archive_cmds_F77 | \
45661 +    old_archive_from_new_cmds_F77 | \
45662 +    archive_cmds_F77 | \
45663 +    archive_expsym_cmds_F77 | \
45664 +    module_cmds_F77 | \
45665 +    module_expsym_cmds_F77 | \
45666 +    old_archive_from_expsyms_cmds_F77 | \
45667 +    export_symbols_cmds_F77 | \
45668 +    extract_expsyms_cmds | reload_cmds | finish_cmds | \
45669 +    postinstall_cmds | postuninstall_cmds | \
45670 +    old_postinstall_cmds | old_postuninstall_cmds | \
45671 +    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
45672 +      # Double-quote double-evaled strings.
45673 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
45674 +      ;;
45675 +    *)
45676 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
45677 +      ;;
45678 +    esac
45679 +  done
45680 +
45681 +  case $lt_echo in
45682 +  *'\$0 --fallback-echo"')
45683 +    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
45684 +    ;;
45685 +  esac
45686 +
45687 +cfgfile="$ofile"
45688 +
45689 +  cat <<__EOF__ >> "$cfgfile"
45690 +# ### BEGIN LIBTOOL TAG CONFIG: $tagname
45691 +
45692 +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
45693 +
45694 +# Shell to use when invoking shell scripts.
45695 +SHELL=$lt_SHELL
45696 +
45697 +# Whether or not to build shared libraries.
45698 +build_libtool_libs=$enable_shared
45699 +
45700 +# Whether or not to build static libraries.
45701 +build_old_libs=$enable_static
45702 +
45703 +# Whether or not to add -lc for building shared libraries.
45704 +build_libtool_need_lc=$archive_cmds_need_lc_F77
45705 +
45706 +# Whether or not to disallow shared libs when runtime libs are static
45707 +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
45708 +
45709 +# Whether or not to optimize for fast installation.
45710 +fast_install=$enable_fast_install
45711 +
45712 +# The host system.
45713 +host_alias=$host_alias
45714 +host=$host
45715 +host_os=$host_os
45716 +
45717 +# The build system.
45718 +build_alias=$build_alias
45719 +build=$build
45720 +build_os=$build_os
45721 +
45722 +# An echo program that does not interpret backslashes.
45723 +echo=$lt_echo
45724 +
45725 +# The archiver.
45726 +AR=$lt_AR
45727 +AR_FLAGS=$lt_AR_FLAGS
45728 +
45729 +# A C compiler.
45730 +LTCC=$lt_LTCC
45731 +
45732 +# A language-specific compiler.
45733 +CC=$lt_compiler_F77
45734 +
45735 +# Is the compiler the GNU C compiler?
45736 +with_gcc=$GCC_F77
45737 +
45738 +# An ERE matcher.
45739 +EGREP=$lt_EGREP
45740 +
45741 +# The linker used to build libraries.
45742 +LD=$lt_LD_F77
45743 +
45744 +# Whether we need hard or soft links.
45745 +LN_S=$lt_LN_S
45746 +
45747 +# A BSD-compatible nm program.
45748 +NM=$lt_NM
45749 +
45750 +# A symbol stripping program
45751 +STRIP=$lt_STRIP
45752 +
45753 +# Used to examine libraries when file_magic_cmd begins "file"
45754 +MAGIC_CMD=$MAGIC_CMD
45755 +
45756 +# Used on cygwin: DLL creation program.
45757 +DLLTOOL="$DLLTOOL"
45758 +
45759 +# Used on cygwin: object dumper.
45760 +OBJDUMP="$OBJDUMP"
45761 +
45762 +# Used on cygwin: assembler.
45763 +AS=$lt_AS
45764 +
45765 +# The name of the directory that contains temporary libtool files.
45766 +objdir=$objdir
45767 +
45768 +# How to create reloadable object files.
45769 +reload_flag=$lt_reload_flag
45770 +reload_cmds=$lt_reload_cmds
45771 +
45772 +# How to pass a linker flag through the compiler.
45773 +wl=$lt_lt_prog_compiler_wl_F77
45774 +
45775 +# Object file suffix (normally "o").
45776 +objext="$ac_objext"
45777 +
45778 +# Old archive suffix (normally "a").
45779 +libext="$libext"
45780 +
45781 +# Shared library suffix (normally ".so").
45782 +shrext_cmds='$shrext_cmds'
45783 +
45784 +# Executable file suffix (normally "").
45785 +exeext="$exeext"
45786 +
45787 +# Additional compiler flags for building library objects.
45788 +pic_flag=$lt_lt_prog_compiler_pic_F77
45789 +pic_mode=$pic_mode
45790 +
45791 +# What is the maximum length of a command?
45792 +max_cmd_len=$lt_cv_sys_max_cmd_len
45793 +
45794 +# Does compiler simultaneously support -c and -o options?
45795 +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
45796 +
45797 +# Must we lock files when doing compilation ?
45798 +need_locks=$lt_need_locks
45799 +
45800 +# Do we need the lib prefix for modules?
45801 +need_lib_prefix=$need_lib_prefix
45802 +
45803 +# Do we need a version for libraries?
45804 +need_version=$need_version
45805 +
45806 +# Whether dlopen is supported.
45807 +dlopen_support=$enable_dlopen
45808 +
45809 +# Whether dlopen of programs is supported.
45810 +dlopen_self=$enable_dlopen_self
45811 +
45812 +# Whether dlopen of statically linked programs is supported.
45813 +dlopen_self_static=$enable_dlopen_self_static
45814 +
45815 +# Compiler flag to prevent dynamic linking.
45816 +link_static_flag=$lt_lt_prog_compiler_static_F77
45817 +
45818 +# Compiler flag to turn off builtin functions.
45819 +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
45820 +
45821 +# Compiler flag to allow reflexive dlopens.
45822 +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
45823 +
45824 +# Compiler flag to generate shared objects directly from archives.
45825 +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
45826 +
45827 +# Compiler flag to generate thread-safe objects.
45828 +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
45829 +
45830 +# Library versioning type.
45831 +version_type=$version_type
45832 +
45833 +# Format of library name prefix.
45834 +libname_spec=$lt_libname_spec
45835 +
45836 +# List of archive names.  First name is the real one, the rest are links.
45837 +# The last name is the one that the linker finds with -lNAME.
45838 +library_names_spec=$lt_library_names_spec
45839 +
45840 +# The coded name of the library, if different from the real name.
45841 +soname_spec=$lt_soname_spec
45842 +
45843 +# Commands used to build and install an old-style archive.
45844 +RANLIB=$lt_RANLIB
45845 +old_archive_cmds=$lt_old_archive_cmds_F77
45846 +old_postinstall_cmds=$lt_old_postinstall_cmds
45847 +old_postuninstall_cmds=$lt_old_postuninstall_cmds
45848 +
45849 +# Create an old-style archive from a shared archive.
45850 +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
45851 +
45852 +# Create a temporary old-style archive to link instead of a shared archive.
45853 +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
45854 +
45855 +# Commands used to build and install a shared archive.
45856 +archive_cmds=$lt_archive_cmds_F77
45857 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77
45858 +postinstall_cmds=$lt_postinstall_cmds
45859 +postuninstall_cmds=$lt_postuninstall_cmds
45860 +
45861 +# Commands used to build a loadable module (assumed same as above if empty)
45862 +module_cmds=$lt_module_cmds_F77
45863 +module_expsym_cmds=$lt_module_expsym_cmds_F77
45864 +
45865 +# Commands to strip libraries.
45866 +old_striplib=$lt_old_striplib
45867 +striplib=$lt_striplib
45868 +
45869 +# Dependencies to place before the objects being linked to create a
45870 +# shared library.
45871 +predep_objects=$lt_predep_objects_F77
45872 +
45873 +# Dependencies to place after the objects being linked to create a
45874 +# shared library.
45875 +postdep_objects=$lt_postdep_objects_F77
45876 +
45877 +# Dependencies to place before the objects being linked to create a
45878 +# shared library.
45879 +predeps=$lt_predeps_F77
45880 +
45881 +# Dependencies to place after the objects being linked to create a
45882 +# shared library.
45883 +postdeps=$lt_postdeps_F77
45884 +
45885 +# The library search path used internally by the compiler when linking
45886 +# a shared library.
45887 +compiler_lib_search_path=$lt_compiler_lib_search_path_F77
45888 +
45889 +# Method to check whether dependent libraries are shared objects.
45890 +deplibs_check_method=$lt_deplibs_check_method
45891 +
45892 +# Command to use when deplibs_check_method == file_magic.
45893 +file_magic_cmd=$lt_file_magic_cmd
45894 +
45895 +# Flag that allows shared libraries with undefined symbols to be built.
45896 +allow_undefined_flag=$lt_allow_undefined_flag_F77
45897 +
45898 +# Flag that forces no undefined symbols.
45899 +no_undefined_flag=$lt_no_undefined_flag_F77
45900 +
45901 +# Commands used to finish a libtool library installation in a directory.
45902 +finish_cmds=$lt_finish_cmds
45903 +
45904 +# Same as above, but a single script fragment to be evaled but not shown.
45905 +finish_eval=$lt_finish_eval
45906 +
45907 +# Take the output of nm and produce a listing of raw symbols and C names.
45908 +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
45909 +
45910 +# Transform the output of nm in a proper C declaration
45911 +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
45912 +
45913 +# Transform the output of nm in a C name address pair
45914 +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
45915 +
45916 +# This is the shared library runtime path variable.
45917 +runpath_var=$runpath_var
45918 +
45919 +# This is the shared library path variable.
45920 +shlibpath_var=$shlibpath_var
45921 +
45922 +# Is shlibpath searched before the hard-coded library search path?
45923 +shlibpath_overrides_runpath=$shlibpath_overrides_runpath
45924 +
45925 +# How to hardcode a shared library path into an executable.
45926 +hardcode_action=$hardcode_action_F77
45927 +
45928 +# Whether we should hardcode library paths into libraries.
45929 +hardcode_into_libs=$hardcode_into_libs
45930 +
45931 +# Flag to hardcode \$libdir into a binary during linking.
45932 +# This must work even if \$libdir does not exist.
45933 +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
45934 +
45935 +# If ld is used when linking, flag to hardcode \$libdir into
45936 +# a binary during linking. This must work even if \$libdir does
45937 +# not exist.
45938 +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
45939 +
45940 +# Whether we need a single -rpath flag with a separated argument.
45941 +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
45942 +
45943 +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
45944 +# resulting binary.
45945 +hardcode_direct=$hardcode_direct_F77
45946 +
45947 +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
45948 +# resulting binary.
45949 +hardcode_minus_L=$hardcode_minus_L_F77
45950 +
45951 +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
45952 +# the resulting binary.
45953 +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
45954 +
45955 +# Set to yes if building a shared library automatically hardcodes DIR into the library
45956 +# and all subsequent libraries and executables linked against it.
45957 +hardcode_automatic=$hardcode_automatic_F77
45958 +
45959 +# Variables whose values should be saved in libtool wrapper scripts and
45960 +# restored at relink time.
45961 +variables_saved_for_relink="$variables_saved_for_relink"
45962 +
45963 +# Whether libtool must link a program against all its dependency libraries.
45964 +link_all_deplibs=$link_all_deplibs_F77
45965 +
45966 +# Compile-time system search path for libraries
45967 +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
45968 +
45969 +# Run-time system search path for libraries
45970 +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
45971 +
45972 +# Fix the shell variable \$srcfile for the compiler.
45973 +fix_srcfile_path="$fix_srcfile_path_F77"
45974 +
45975 +# Set to yes if exported symbols are required.
45976 +always_export_symbols=$always_export_symbols_F77
45977 +
45978 +# The commands to list exported symbols.
45979 +export_symbols_cmds=$lt_export_symbols_cmds_F77
45980 +
45981 +# The commands to extract the exported symbol list from a shared archive.
45982 +extract_expsyms_cmds=$lt_extract_expsyms_cmds
45983 +
45984 +# Symbols that should not be listed in the preloaded symbols.
45985 +exclude_expsyms=$lt_exclude_expsyms_F77
45986 +
45987 +# Symbols that must always be exported.
45988 +include_expsyms=$lt_include_expsyms_F77
45989 +
45990 +# ### END LIBTOOL TAG CONFIG: $tagname
45991 +
45992 +__EOF__
45993 +
45994 +
45995 +else
45996 +  # If there is no Makefile yet, we rely on a make rule to execute
45997 +  # `config.status --recheck' to rerun these tests and create the
45998 +  # libtool script then.
45999 +  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
46000 +  if test -f "$ltmain_in"; then
46001 +    test -f Makefile && make "$ltmain"
46002 +  fi
46003 +fi
46004 +
46005 +
46006 +ac_ext=c
46007 +ac_cpp='$CPP $CPPFLAGS'
46008 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46009 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46010 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
46011 +
46012 +CC="$lt_save_CC"
46013 +
46014 +       else
46015 +         tagname=""
46016 +       fi
46017 +       ;;
46018 +
46019 +      GCJ)
46020 +       if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
46021 +
46022 +
46023 +
46024 +# Source file extension for Java test sources.
46025 +ac_ext=java
46026 +
46027 +# Object file extension for compiled Java test sources.
46028 +objext=o
46029 +objext_GCJ=$objext
46030 +
46031 +# Code to be used in simple compile tests
46032 +lt_simple_compile_test_code="class foo {}\n"
46033 +
46034 +# Code to be used in simple link tests
46035 +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
46036 +
46037 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
46038 +
46039 +# If no C compiler was specified, use CC.
46040 +LTCC=${LTCC-"$CC"}
46041 +
46042 +# Allow CC to be a program name with arguments.
46043 +compiler=$CC
46044 +
46045 +
46046 +# Allow CC to be a program name with arguments.
46047 +lt_save_CC="$CC"
46048 +CC=${GCJ-"gcj"}
46049 +compiler=$CC
46050 +compiler_GCJ=$CC
46051 +
46052 +# GCJ did not exist at the time GCC didn't implicitly link libc in.
46053 +archive_cmds_need_lc_GCJ=no
46054 +
46055 +
46056 +lt_prog_compiler_no_builtin_flag_GCJ=
46057 +
46058 +if test "$GCC" = yes; then
46059 +  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
46060 +
46061 +
46062 +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
46063 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
46064 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
46065 +  echo $ECHO_N "(cached) $ECHO_C" >&6
46066 +else
46067 +  lt_cv_prog_compiler_rtti_exceptions=no
46068 +  ac_outfile=conftest.$ac_objext
46069 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
46070 +   lt_compiler_flag="-fno-rtti -fno-exceptions"
46071 +   # Insert the option either (1) after the last *FLAGS variable, or
46072 +   # (2) before a word containing "conftest.", or (3) at the end.
46073 +   # Note that $ac_compile itself does not contain backslashes and begins
46074 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
46075 +   # The option is referenced via a variable to avoid confusing sed.
46076 +   lt_compile=`echo "$ac_compile" | $SED \
46077 +   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
46078 +   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
46079 +   -e 's:$: $lt_compiler_flag:'`
46080 +   (eval echo "\"\$as_me:15786: $lt_compile\"" >&5)
46081 +   (eval "$lt_compile" 2>conftest.err)
46082 +   ac_status=$?
46083 +   cat conftest.err >&5
46084 +   echo "$as_me:15790: \$? = $ac_status" >&5
46085 +   if (exit $ac_status) && test -s "$ac_outfile"; then
46086 +     # The compiler can only warn and ignore the option if not recognized
46087 +     # So say no if there are warnings
46088 +     if test ! -s conftest.err; then
46089 +       lt_cv_prog_compiler_rtti_exceptions=yes
46090 +     fi
46091 +   fi
46092 +   $rm conftest*
46093 +
46094 +fi
46095 +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
46096 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
46097 +
46098 +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
46099 +    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
46100 +else
46101 +    :
46102 +fi
46103 +
46104 +fi
46105 +
46106 +lt_prog_compiler_wl_GCJ=
46107 +lt_prog_compiler_pic_GCJ=
46108 +lt_prog_compiler_static_GCJ=
46109 +
46110 +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
46111 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
46112 +
46113 +  if test "$GCC" = yes; then
46114 +    lt_prog_compiler_wl_GCJ='-Wl,'
46115 +    lt_prog_compiler_static_GCJ='-static'
46116 +
46117 +    case $host_os in
46118 +      aix*)
46119 +      # All AIX code is PIC.
46120 +      if test "$host_cpu" = ia64; then
46121 +       # AIX 5 now supports IA64 processor
46122 +       lt_prog_compiler_static_GCJ='-Bstatic'
46123 +      fi
46124 +      ;;
46125 +
46126 +    amigaos*)
46127 +      # FIXME: we need at least 68020 code to build shared libraries, but
46128 +      # adding the `-m68020' flag to GCC prevents building anything better,
46129 +      # like `-m68040'.
46130 +      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
46131 +      ;;
46132 +
46133 +    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
46134 +      # PIC is the default for these OSes.
46135 +      ;;
46136 +
46137 +    mingw* | pw32* | os2*)
46138 +      # This hack is so that the source file can tell whether it is being
46139 +      # built for inclusion in a dll (and should export symbols for example).
46140 +      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
46141 +      ;;
46142 +
46143 +    darwin* | rhapsody*)
46144 +      # PIC is the default on this platform
46145 +      # Common symbols not allowed in MH_DYLIB files
46146 +      lt_prog_compiler_pic_GCJ='-fno-common'
46147 +      ;;
46148 +
46149 +    msdosdjgpp*)
46150 +      # Just because we use GCC doesn't mean we suddenly get shared libraries
46151 +      # on systems that don't support them.
46152 +      lt_prog_compiler_can_build_shared_GCJ=no
46153 +      enable_shared=no
46154 +      ;;
46155 +
46156 +    sysv4*MP*)
46157 +      if test -d /usr/nec; then
46158 +       lt_prog_compiler_pic_GCJ=-Kconform_pic
46159 +      fi
46160 +      ;;
46161 +
46162 +    hpux*)
46163 +      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
46164 +      # not for PA HP-UX.
46165 +      case "$host_cpu" in
46166 +      hppa*64*|ia64*)
46167 +       # +Z the default
46168 +       ;;
46169 +      *)
46170 +       lt_prog_compiler_pic_GCJ='-fPIC'
46171 +       ;;
46172 +      esac
46173 +      ;;
46174 +
46175 +    *)
46176 +      lt_prog_compiler_pic_GCJ='-fPIC'
46177 +      ;;
46178 +    esac
46179 +  else
46180 +    # PORTME Check for flag to pass linker flags through the system compiler.
46181 +    case $host_os in
46182 +    aix*)
46183 +      lt_prog_compiler_wl_GCJ='-Wl,'
46184 +      if test "$host_cpu" = ia64; then
46185 +       # AIX 5 now supports IA64 processor
46186 +       lt_prog_compiler_static_GCJ='-Bstatic'
46187 +      else
46188 +       lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
46189 +      fi
46190 +      ;;
46191 +      darwin*)
46192 +        # PIC is the default on this platform
46193 +        # Common symbols not allowed in MH_DYLIB files
46194 +       case "$cc_basename" in
46195 +         xlc*)
46196 +         lt_prog_compiler_pic_GCJ='-qnocommon'
46197 +         lt_prog_compiler_wl_GCJ='-Wl,'
46198 +         ;;
46199 +       esac
46200 +       ;;
46201 +
46202 +    mingw* | pw32* | os2*)
46203 +      # This hack is so that the source file can tell whether it is being
46204 +      # built for inclusion in a dll (and should export symbols for example).
46205 +      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
46206 +      ;;
46207 +
46208 +    hpux9* | hpux10* | hpux11*)
46209 +      lt_prog_compiler_wl_GCJ='-Wl,'
46210 +      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
46211 +      # not for PA HP-UX.
46212 +      case "$host_cpu" in
46213 +      hppa*64*|ia64*)
46214 +       # +Z the default
46215 +       ;;
46216 +      *)
46217 +       lt_prog_compiler_pic_GCJ='+Z'
46218 +       ;;
46219 +      esac
46220 +      # Is there a better lt_prog_compiler_static that works with the bundled CC?
46221 +      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
46222 +      ;;
46223 +
46224 +    irix5* | irix6* | nonstopux*)
46225 +      lt_prog_compiler_wl_GCJ='-Wl,'
46226 +      # PIC (with -KPIC) is the default.
46227 +      lt_prog_compiler_static_GCJ='-non_shared'
46228 +      ;;
46229 +
46230 +    newsos6)
46231 +      lt_prog_compiler_pic_GCJ='-KPIC'
46232 +      lt_prog_compiler_static_GCJ='-Bstatic'
46233 +      ;;
46234 +
46235 +    linux*)
46236 +      case $cc_basename in
46237 +      icc* | ecc*)
46238 +       lt_prog_compiler_wl_GCJ='-Wl,'
46239 +       lt_prog_compiler_pic_GCJ='-KPIC'
46240 +       lt_prog_compiler_static_GCJ='-static'
46241 +        ;;
46242 +      pgcc | pgf77 | pgf90)
46243 +        # Portland Group compilers (*not* the Pentium gcc compiler,
46244 +       # which looks to be a dead project)
46245 +       lt_prog_compiler_wl_GCJ='-Wl,'
46246 +       lt_prog_compiler_pic_GCJ='-fpic'
46247 +       lt_prog_compiler_static_GCJ='-static'
46248 +        ;;
46249 +      ccc*)
46250 +        lt_prog_compiler_wl_GCJ='-Wl,'
46251 +        # All Alpha code is PIC.
46252 +        lt_prog_compiler_static_GCJ='-non_shared'
46253 +        ;;
46254 +      esac
46255 +      ;;
46256 +
46257 +    osf3* | osf4* | osf5*)
46258 +      lt_prog_compiler_wl_GCJ='-Wl,'
46259 +      # All OSF/1 code is PIC.
46260 +      lt_prog_compiler_static_GCJ='-non_shared'
46261 +      ;;
46262 +
46263 +    sco3.2v5*)
46264 +      lt_prog_compiler_pic_GCJ='-Kpic'
46265 +      lt_prog_compiler_static_GCJ='-dn'
46266 +      ;;
46267 +
46268 +    solaris*)
46269 +      lt_prog_compiler_wl_GCJ='-Wl,'
46270 +      lt_prog_compiler_pic_GCJ='-KPIC'
46271 +      lt_prog_compiler_static_GCJ='-Bstatic'
46272 +      ;;
46273 +
46274 +    sunos4*)
46275 +      lt_prog_compiler_wl_GCJ='-Qoption ld '
46276 +      lt_prog_compiler_pic_GCJ='-PIC'
46277 +      lt_prog_compiler_static_GCJ='-Bstatic'
46278 +      ;;
46279 +
46280 +    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
46281 +      lt_prog_compiler_wl_GCJ='-Wl,'
46282 +      lt_prog_compiler_pic_GCJ='-KPIC'
46283 +      lt_prog_compiler_static_GCJ='-Bstatic'
46284 +      ;;
46285 +
46286 +    sysv4*MP*)
46287 +      if test -d /usr/nec ;then
46288 +       lt_prog_compiler_pic_GCJ='-Kconform_pic'
46289 +       lt_prog_compiler_static_GCJ='-Bstatic'
46290 +      fi
46291 +      ;;
46292 +
46293 +    unicos*)
46294 +      lt_prog_compiler_wl_GCJ='-Wl,'
46295 +      lt_prog_compiler_can_build_shared_GCJ=no
46296 +      ;;
46297 +
46298 +    uts4*)
46299 +      lt_prog_compiler_pic_GCJ='-pic'
46300 +      lt_prog_compiler_static_GCJ='-Bstatic'
46301 +      ;;
46302 +
46303 +    *)
46304 +      lt_prog_compiler_can_build_shared_GCJ=no
46305 +      ;;
46306 +    esac
46307 +  fi
46308 +
46309 +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
46310 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
46311 +
46312 +#
46313 +# Check to make sure the PIC flag actually works.
46314 +#
46315 +if test -n "$lt_prog_compiler_pic_GCJ"; then
46316 +
46317 +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
46318 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
46319 +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
46320 +  echo $ECHO_N "(cached) $ECHO_C" >&6
46321 +else
46322 +  lt_prog_compiler_pic_works_GCJ=no
46323 +  ac_outfile=conftest.$ac_objext
46324 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
46325 +   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
46326 +   # Insert the option either (1) after the last *FLAGS variable, or
46327 +   # (2) before a word containing "conftest.", or (3) at the end.
46328 +   # Note that $ac_compile itself does not contain backslashes and begins
46329 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
46330 +   # The option is referenced via a variable to avoid confusing sed.
46331 +   lt_compile=`echo "$ac_compile" | $SED \
46332 +   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
46333 +   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
46334 +   -e 's:$: $lt_compiler_flag:'`
46335 +   (eval echo "\"\$as_me:16041: $lt_compile\"" >&5)
46336 +   (eval "$lt_compile" 2>conftest.err)
46337 +   ac_status=$?
46338 +   cat conftest.err >&5
46339 +   echo "$as_me:16045: \$? = $ac_status" >&5
46340 +   if (exit $ac_status) && test -s "$ac_outfile"; then
46341 +     # The compiler can only warn and ignore the option if not recognized
46342 +     # So say no if there are warnings
46343 +     if test ! -s conftest.err; then
46344 +       lt_prog_compiler_pic_works_GCJ=yes
46345 +     fi
46346 +   fi
46347 +   $rm conftest*
46348 +
46349 +fi
46350 +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
46351 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
46352 +
46353 +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
46354 +    case $lt_prog_compiler_pic_GCJ in
46355 +     "" | " "*) ;;
46356 +     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
46357 +     esac
46358 +else
46359 +    lt_prog_compiler_pic_GCJ=
46360 +     lt_prog_compiler_can_build_shared_GCJ=no
46361 +fi
46362 +
46363 +fi
46364 +case "$host_os" in
46365 +  # For platforms which do not support PIC, -DPIC is meaningless:
46366 +  *djgpp*)
46367 +    lt_prog_compiler_pic_GCJ=
46368 +    ;;
46369 +  *)
46370 +    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
46371 +    ;;
46372 +esac
46373 +
46374 +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
46375 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
46376 +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
46377 +  echo $ECHO_N "(cached) $ECHO_C" >&6
46378 +else
46379 +  lt_cv_prog_compiler_c_o_GCJ=no
46380 +   $rm -r conftest 2>/dev/null
46381 +   mkdir conftest
46382 +   cd conftest
46383 +   mkdir out
46384 +   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
46385 +
46386 +   lt_compiler_flag="-o out/conftest2.$ac_objext"
46387 +   # Insert the option either (1) after the last *FLAGS variable, or
46388 +   # (2) before a word containing "conftest.", or (3) at the end.
46389 +   # Note that $ac_compile itself does not contain backslashes and begins
46390 +   # with a dollar sign (not a hyphen), so the echo should work correctly.
46391 +   lt_compile=`echo "$ac_compile" | $SED \
46392 +   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
46393 +   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
46394 +   -e 's:$: $lt_compiler_flag:'`
46395 +   (eval echo "\"\$as_me:16101: $lt_compile\"" >&5)
46396 +   (eval "$lt_compile" 2>out/conftest.err)
46397 +   ac_status=$?
46398 +   cat out/conftest.err >&5
46399 +   echo "$as_me:16105: \$? = $ac_status" >&5
46400 +   if (exit $ac_status) && test -s out/conftest2.$ac_objext
46401 +   then
46402 +     # The compiler can only warn and ignore the option if not recognized
46403 +     # So say no if there are warnings
46404 +     if test ! -s out/conftest.err; then
46405 +       lt_cv_prog_compiler_c_o_GCJ=yes
46406 +     fi
46407 +   fi
46408 +   chmod u+w .
46409 +   $rm conftest*
46410 +   # SGI C++ compiler will create directory out/ii_files/ for
46411 +   # template instantiation
46412 +   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
46413 +   $rm out/* && rmdir out
46414 +   cd ..
46415 +   rmdir conftest
46416 +   $rm conftest*
46417 +
46418 +fi
46419 +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
46420 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
46421 +
46422 +
46423 +hard_links="nottested"
46424 +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
46425 +  # do not overwrite the value of need_locks provided by the user
46426 +  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
46427 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
46428 +  hard_links=yes
46429 +  $rm conftest*
46430 +  ln conftest.a conftest.b 2>/dev/null && hard_links=no
46431 +  touch conftest.a
46432 +  ln conftest.a conftest.b 2>&5 || hard_links=no
46433 +  ln conftest.a conftest.b 2>/dev/null && hard_links=no
46434 +  echo "$as_me:$LINENO: result: $hard_links" >&5
46435 +echo "${ECHO_T}$hard_links" >&6
46436 +  if test "$hard_links" = no; then
46437 +    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
46438 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
46439 +    need_locks=warn
46440 +  fi
46441 +else
46442 +  need_locks=no
46443 +fi
46444 +
46445 +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
46446 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
46447 +
46448 +  runpath_var=
46449 +  allow_undefined_flag_GCJ=
46450 +  enable_shared_with_static_runtimes_GCJ=no
46451 +  archive_cmds_GCJ=
46452 +  archive_expsym_cmds_GCJ=
46453 +  old_archive_From_new_cmds_GCJ=
46454 +  old_archive_from_expsyms_cmds_GCJ=
46455 +  export_dynamic_flag_spec_GCJ=
46456 +  whole_archive_flag_spec_GCJ=
46457 +  thread_safe_flag_spec_GCJ=
46458 +  hardcode_libdir_flag_spec_GCJ=
46459 +  hardcode_libdir_flag_spec_ld_GCJ=
46460 +  hardcode_libdir_separator_GCJ=
46461 +  hardcode_direct_GCJ=no
46462 +  hardcode_minus_L_GCJ=no
46463 +  hardcode_shlibpath_var_GCJ=unsupported
46464 +  link_all_deplibs_GCJ=unknown
46465 +  hardcode_automatic_GCJ=no
46466 +  module_cmds_GCJ=
46467 +  module_expsym_cmds_GCJ=
46468 +  always_export_symbols_GCJ=no
46469 +  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
46470 +  # include_expsyms should be a list of space-separated symbols to be *always*
46471 +  # included in the symbol list
46472 +  include_expsyms_GCJ=
46473 +  # exclude_expsyms can be an extended regexp of symbols to exclude
46474 +  # it will be wrapped by ` (' and `)$', so one must not match beginning or
46475 +  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
46476 +  # as well as any symbol that contains `d'.
46477 +  exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
46478 +  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
46479 +  # platforms (ab)use it in PIC code, but their linkers get confused if
46480 +  # the symbol is explicitly referenced.  Since portable code cannot
46481 +  # rely on this symbol name, it's probably fine to never include it in
46482 +  # preloaded symbol tables.
46483 +  extract_expsyms_cmds=
46484 +
46485 +  case $host_os in
46486 +  cygwin* | mingw* | pw32*)
46487 +    # FIXME: the MSVC++ port hasn't been tested in a loooong time
46488 +    # When not using gcc, we currently assume that we are using
46489 +    # Microsoft Visual C++.
46490 +    if test "$GCC" != yes; then
46491 +      with_gnu_ld=no
46492 +    fi
46493 +    ;;
46494 +  openbsd*)
46495 +    with_gnu_ld=no
46496 +    ;;
46497 +  esac
46498 +
46499 +  ld_shlibs_GCJ=yes
46500 +  if test "$with_gnu_ld" = yes; then
46501 +    # If archive_cmds runs LD, not CC, wlarc should be empty
46502 +    wlarc='${wl}'
46503 +
46504 +    # See if GNU ld supports shared libraries.
46505 +    case $host_os in
46506 +    aix3* | aix4* | aix5*)
46507 +      # On AIX/PPC, the GNU linker is very broken
46508 +      if test "$host_cpu" != ia64; then
46509 +       ld_shlibs_GCJ=no
46510 +       cat <<EOF 1>&2
46511 +
46512 +*** Warning: the GNU linker, at least up to release 2.9.1, is reported
46513 +*** to be unable to reliably create shared libraries on AIX.
46514 +*** Therefore, libtool is disabling shared libraries support.  If you
46515 +*** really care for shared libraries, you may want to modify your PATH
46516 +*** so that a non-GNU linker is found, and then restart.
46517 +
46518 +EOF
46519 +      fi
46520 +      ;;
46521 +
46522 +    amigaos*)
46523 +      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
46524 +      hardcode_libdir_flag_spec_GCJ='-L$libdir'
46525 +      hardcode_minus_L_GCJ=yes
46526 +
46527 +      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
46528 +      # that the semantics of dynamic libraries on AmigaOS, at least up
46529 +      # to version 4, is to share data among multiple programs linked
46530 +      # with the same dynamic library.  Since this doesn't match the
46531 +      # behavior of shared libraries on other platforms, we can't use
46532 +      # them.
46533 +      ld_shlibs_GCJ=no
46534 +      ;;
46535 +
46536 +    beos*)
46537 +      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
46538 +       allow_undefined_flag_GCJ=unsupported
46539 +       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
46540 +       # support --undefined.  This deserves some investigation.  FIXME
46541 +       archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
46542 +      else
46543 +       ld_shlibs_GCJ=no
46544 +      fi
46545 +      ;;
46546 +
46547 +    cygwin* | mingw* | pw32*)
46548 +      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
46549 +      # as there is no search path for DLLs.
46550 +      hardcode_libdir_flag_spec_GCJ='-L$libdir'
46551 +      allow_undefined_flag_GCJ=unsupported
46552 +      always_export_symbols_GCJ=no
46553 +      enable_shared_with_static_runtimes_GCJ=yes
46554 +      export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
46555 +
46556 +      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
46557 +        archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
46558 +       # If the export-symbols file already is a .def file (1st line
46559 +       # is EXPORTS), use it as is; otherwise, prepend...
46560 +       archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
46561 +         cp $export_symbols $output_objdir/$soname.def;
46562 +       else
46563 +         echo EXPORTS > $output_objdir/$soname.def;
46564 +         cat $export_symbols >> $output_objdir/$soname.def;
46565 +       fi~
46566 +       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
46567 +      else
46568 +       ld_shlibs_GCJ=no
46569 +      fi
46570 +      ;;
46571 +
46572 +    netbsd*)
46573 +      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
46574 +       archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
46575 +       wlarc=
46576 +      else
46577 +       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
46578 +       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
46579 +      fi
46580 +      ;;
46581 +
46582 +    solaris* | sysv5*)
46583 +      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
46584 +       ld_shlibs_GCJ=no
46585 +       cat <<EOF 1>&2
46586 +
46587 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably
46588 +*** create shared libraries on Solaris systems.  Therefore, libtool
46589 +*** is disabling shared libraries support.  We urge you to upgrade GNU
46590 +*** binutils to release 2.9.1 or newer.  Another option is to modify
46591 +*** your PATH or compiler configuration so that the native linker is
46592 +*** used, and then restart.
46593 +
46594 +EOF
46595 +      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
46596 +       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
46597 +       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
46598 +      else
46599 +       ld_shlibs_GCJ=no
46600 +      fi
46601 +      ;;
46602 +
46603 +    sunos4*)
46604 +      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
46605 +      wlarc=
46606 +      hardcode_direct_GCJ=yes
46607 +      hardcode_shlibpath_var_GCJ=no
46608 +      ;;
46609 +
46610 +  linux*)
46611 +    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
46612 +      tmp_addflag=
46613 +      case $CC,$host_cpu in
46614 +      pgf77* | pgf90* )                        # Portland Group f77 and f90 compilers
46615 +        tmp_addflag=' -fpic' ;;
46616 +      ecc*,ia64* | icc*,ia64*)         # Intel C compiler on ia64
46617 +        tmp_addflag=' -i_dynamic' ;;
46618 +      efc*,ia64* | ifort*,ia64*)       # Intel Fortran compiler on ia64
46619 +        tmp_addflag=' -i_dynamic -nofor_main' ;;
46620 +      ifc* | ifort*)                   # Intel Fortran compiler
46621 +       tmp_addflag=' -nofor_main' ;;
46622 +      esac
46623 +      archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
46624 +      supports_anon_versioning=no
46625 +      case `$LD -v 2>/dev/null` in
46626 +        *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
46627 +        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
46628 +        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
46629 +        *\ 2.11.*) ;; # other 2.11 versions
46630 +        *) supports_anon_versioning=yes ;;
46631 +      esac
46632 +      if test $supports_anon_versioning = yes; then
46633 +        archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
46634 +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
46635 +$echo "local: *; };" >> $output_objdir/$libname.ver~
46636 +        $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
46637 +      else
46638 +        archive_expsym_cmds_GCJ=$archive_cmds_GCJ
46639 +      fi
46640 +    else
46641 +      ld_shlibs_GCJ=no
46642 +    fi
46643 +    ;;
46644 +
46645 +    *)
46646 +      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
46647 +       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
46648 +       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
46649 +      else
46650 +       ld_shlibs_GCJ=no
46651 +      fi
46652 +      ;;
46653 +    esac
46654 +
46655 +    if test "$ld_shlibs_GCJ" = yes; then
46656 +      runpath_var=LD_RUN_PATH
46657 +      hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
46658 +      export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
46659 +      # ancient GNU ld didn't support --whole-archive et. al.
46660 +      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
46661 +       whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
46662 +      else
46663 +       whole_archive_flag_spec_GCJ=
46664 +      fi
46665 +    fi
46666 +  else
46667 +    # PORTME fill in a description of your system's linker (not GNU ld)
46668 +    case $host_os in
46669 +    aix3*)
46670 +      allow_undefined_flag_GCJ=unsupported
46671 +      always_export_symbols_GCJ=yes
46672 +      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
46673 +      # Note: this linker hardcodes the directories in LIBPATH if there
46674 +      # are no directories specified by -L.
46675 +      hardcode_minus_L_GCJ=yes
46676 +      if test "$GCC" = yes && test -z "$link_static_flag"; then
46677 +       # Neither direct hardcoding nor static linking is supported with a
46678 +       # broken collect2.
46679 +       hardcode_direct_GCJ=unsupported
46680 +      fi
46681 +      ;;
46682 +
46683 +    aix4* | aix5*)
46684 +      if test "$host_cpu" = ia64; then
46685 +       # On IA64, the linker does run time linking by default, so we don't
46686 +       # have to do anything special.
46687 +       aix_use_runtimelinking=no
46688 +       exp_sym_flag='-Bexport'
46689 +       no_entry_flag=""
46690 +      else
46691 +       # If we're using GNU nm, then we don't want the "-C" option.
46692 +       # -C means demangle to AIX nm, but means don't demangle with GNU nm
46693 +       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
46694 +         export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
46695 +       else
46696 +         export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
46697 +       fi
46698 +       aix_use_runtimelinking=no
46699 +
46700 +       # Test if we are trying to use run time linking or normal
46701 +       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
46702 +       # need to do runtime linking.
46703 +       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
46704 +         for ld_flag in $LDFLAGS; do
46705 +         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
46706 +           aix_use_runtimelinking=yes
46707 +           break
46708 +         fi
46709 +         done
46710 +       esac
46711 +
46712 +       exp_sym_flag='-bexport'
46713 +       no_entry_flag='-bnoentry'
46714 +      fi
46715 +
46716 +      # When large executables or shared objects are built, AIX ld can
46717 +      # have problems creating the table of contents.  If linking a library
46718 +      # or program results in "error TOC overflow" add -mminimal-toc to
46719 +      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
46720 +      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
46721 +
46722 +      archive_cmds_GCJ=''
46723 +      hardcode_direct_GCJ=yes
46724 +      hardcode_libdir_separator_GCJ=':'
46725 +      link_all_deplibs_GCJ=yes
46726 +
46727 +      if test "$GCC" = yes; then
46728 +       case $host_os in aix4.[012]|aix4.[012].*)
46729 +       # We only want to do this on AIX 4.2 and lower, the check
46730 +       # below for broken collect2 doesn't work under 4.3+
46731 +         collect2name=`${CC} -print-prog-name=collect2`
46732 +         if test -f "$collect2name" && \
46733 +          strings "$collect2name" | grep resolve_lib_name >/dev/null
46734 +         then
46735 +         # We have reworked collect2
46736 +         hardcode_direct_GCJ=yes
46737 +         else
46738 +         # We have old collect2
46739 +         hardcode_direct_GCJ=unsupported
46740 +         # It fails to find uninstalled libraries when the uninstalled
46741 +         # path is not listed in the libpath.  Setting hardcode_minus_L
46742 +         # to unsupported forces relinking
46743 +         hardcode_minus_L_GCJ=yes
46744 +         hardcode_libdir_flag_spec_GCJ='-L$libdir'
46745 +         hardcode_libdir_separator_GCJ=
46746 +         fi
46747 +       esac
46748 +       shared_flag='-shared'
46749 +       if test "$aix_use_runtimelinking" = yes; then
46750 +         shared_flag="$shared_flag "'${wl}-G'
46751 +       fi
46752 +      else
46753 +       # not using gcc
46754 +       if test "$host_cpu" = ia64; then
46755 +       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
46756 +       # chokes on -Wl,-G. The following line is correct:
46757 +         shared_flag='-G'
46758 +       else
46759 +       if test "$aix_use_runtimelinking" = yes; then
46760 +           shared_flag='${wl}-G'
46761 +         else
46762 +           shared_flag='${wl}-bM:SRE'
46763 +       fi
46764 +       fi
46765 +      fi
46766 +
46767 +      # It seems that -bexpall does not export symbols beginning with
46768 +      # underscore (_), so it is better to generate a list of symbols to export.
46769 +      always_export_symbols_GCJ=yes
46770 +      if test "$aix_use_runtimelinking" = yes; then
46771 +       # Warning - without using the other runtime loading flags (-brtl),
46772 +       # -berok will link without error, but may produce a broken library.
46773 +       allow_undefined_flag_GCJ='-berok'
46774 +       # Determine the default libpath from the value encoded in an empty executable.
46775 +       cat >conftest.$ac_ext <<_ACEOF
46776 +/* confdefs.h.  */
46777 +_ACEOF
46778 +cat confdefs.h >>conftest.$ac_ext
46779 +cat >>conftest.$ac_ext <<_ACEOF
46780 +/* end confdefs.h.  */
46781 +
46782 +int
46783 +main ()
46784 +{
46785 +
46786 +  ;
46787 +  return 0;
46788 +}
46789 +_ACEOF
46790 +rm -f conftest.$ac_objext conftest$ac_exeext
46791 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
46792 +  (eval $ac_link) 2>conftest.er1
46793 +  ac_status=$?
46794 +  grep -v '^ *+' conftest.er1 >conftest.err
46795 +  rm -f conftest.er1
46796 +  cat conftest.err >&5
46797 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
46798 +  (exit $ac_status); } &&
46799 +        { ac_try='test -z "$ac_c_werror_flag"
46800 +                        || test ! -s conftest.err'
46801 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
46802 +  (eval $ac_try) 2>&5
46803 +  ac_status=$?
46804 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
46805 +  (exit $ac_status); }; } &&
46806 +        { ac_try='test -s conftest$ac_exeext'
46807 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
46808 +  (eval $ac_try) 2>&5
46809 +  ac_status=$?
46810 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
46811 +  (exit $ac_status); }; }; then
46812 +
46813 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
46814 +}'`
46815 +# Check for a 64-bit object if we didn't find anything.
46816 +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
46817 +}'`; fi
46818 +else
46819 +  echo "$as_me: failed program was:" >&5
46820 +sed 's/^/| /' conftest.$ac_ext >&5
46821 +
46822 +fi
46823 +rm -f conftest.err conftest.$ac_objext \
46824 +      conftest$ac_exeext conftest.$ac_ext
46825 +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
46826 +
46827 +       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
46828 +       archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
46829 +       else
46830 +       if test "$host_cpu" = ia64; then
46831 +         hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
46832 +         allow_undefined_flag_GCJ="-z nodefs"
46833 +         archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
46834 +       else
46835 +        # Determine the default libpath from the value encoded in an empty executable.
46836 +        cat >conftest.$ac_ext <<_ACEOF
46837 +/* confdefs.h.  */
46838 +_ACEOF
46839 +cat confdefs.h >>conftest.$ac_ext
46840 +cat >>conftest.$ac_ext <<_ACEOF
46841 +/* end confdefs.h.  */
46842 +
46843 +int
46844 +main ()
46845 +{
46846 +
46847 +  ;
46848 +  return 0;
46849 +}
46850 +_ACEOF
46851 +rm -f conftest.$ac_objext conftest$ac_exeext
46852 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
46853 +  (eval $ac_link) 2>conftest.er1
46854 +  ac_status=$?
46855 +  grep -v '^ *+' conftest.er1 >conftest.err
46856 +  rm -f conftest.er1
46857 +  cat conftest.err >&5
46858 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
46859 +  (exit $ac_status); } &&
46860 +        { ac_try='test -z "$ac_c_werror_flag"
46861 +                        || test ! -s conftest.err'
46862 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
46863 +  (eval $ac_try) 2>&5
46864 +  ac_status=$?
46865 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
46866 +  (exit $ac_status); }; } &&
46867 +        { ac_try='test -s conftest$ac_exeext'
46868 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
46869 +  (eval $ac_try) 2>&5
46870 +  ac_status=$?
46871 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
46872 +  (exit $ac_status); }; }; then
46873 +
46874 +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
46875 +}'`
46876 +# Check for a 64-bit object if we didn't find anything.
46877 +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
46878 +}'`; fi
46879 +else
46880 +  echo "$as_me: failed program was:" >&5
46881 +sed 's/^/| /' conftest.$ac_ext >&5
46882 +
46883 +fi
46884 +rm -f conftest.err conftest.$ac_objext \
46885 +      conftest$ac_exeext conftest.$ac_ext
46886 +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
46887 +
46888 +        hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
46889 +         # Warning - without using the other run time loading flags,
46890 +         # -berok will link without error, but may produce a broken library.
46891 +         no_undefined_flag_GCJ=' ${wl}-bernotok'
46892 +         allow_undefined_flag_GCJ=' ${wl}-berok'
46893 +         # -bexpall does not export symbols beginning with underscore (_)
46894 +         always_export_symbols_GCJ=yes
46895 +         # Exported symbols can be pulled into shared objects from archives
46896 +         whole_archive_flag_spec_GCJ=' '
46897 +         archive_cmds_need_lc_GCJ=yes
46898 +         # This is similar to how AIX traditionally builds it's shared libraries.
46899 +         archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
46900 +       fi
46901 +      fi
46902 +      ;;
46903 +
46904 +    amigaos*)
46905 +      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
46906 +      hardcode_libdir_flag_spec_GCJ='-L$libdir'
46907 +      hardcode_minus_L_GCJ=yes
46908 +      # see comment about different semantics on the GNU ld section
46909 +      ld_shlibs_GCJ=no
46910 +      ;;
46911 +
46912 +    bsdi[45]*)
46913 +      export_dynamic_flag_spec_GCJ=-rdynamic
46914 +      ;;
46915 +
46916 +    cygwin* | mingw* | pw32*)
46917 +      # When not using gcc, we currently assume that we are using
46918 +      # Microsoft Visual C++.
46919 +      # hardcode_libdir_flag_spec is actually meaningless, as there is
46920 +      # no search path for DLLs.
46921 +      hardcode_libdir_flag_spec_GCJ=' '
46922 +      allow_undefined_flag_GCJ=unsupported
46923 +      # Tell ltmain to make .lib files, not .a files.
46924 +      libext=lib
46925 +      # Tell ltmain to make .dll files, not .so files.
46926 +      shrext_cmds=".dll"
46927 +      # FIXME: Setting linknames here is a bad hack.
46928 +      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
46929 +      # The linker will automatically build a .lib file if we build a DLL.
46930 +      old_archive_From_new_cmds_GCJ='true'
46931 +      # FIXME: Should let the user specify the lib program.
46932 +      old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
46933 +      fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
46934 +      enable_shared_with_static_runtimes_GCJ=yes
46935 +      ;;
46936 +
46937 +    darwin* | rhapsody*)
46938 +      case "$host_os" in
46939 +        rhapsody* | darwin1.[012])
46940 +         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
46941 +         ;;
46942 +       *) # Darwin 1.3 on
46943 +         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
46944 +           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
46945 +         else
46946 +           case ${MACOSX_DEPLOYMENT_TARGET} in
46947 +             10.[012])
46948 +               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
46949 +               ;;
46950 +             10.*)
46951 +               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
46952 +               ;;
46953 +           esac
46954 +         fi
46955 +         ;;
46956 +      esac
46957 +      archive_cmds_need_lc_GCJ=no
46958 +      hardcode_direct_GCJ=no
46959 +      hardcode_automatic_GCJ=yes
46960 +      hardcode_shlibpath_var_GCJ=unsupported
46961 +      whole_archive_flag_spec_GCJ=''
46962 +      link_all_deplibs_GCJ=yes
46963 +    if test "$GCC" = yes ; then
46964 +       output_verbose_link_cmd='echo'
46965 +        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
46966 +      module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
46967 +      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
46968 +      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
46969 +      module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
46970 +    else
46971 +      case "$cc_basename" in
46972 +        xlc*)
46973 +         output_verbose_link_cmd='echo'
46974 +         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
46975 +         module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
46976 +          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
46977 +         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
46978 +          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
46979 +          ;;
46980 +       *)
46981 +         ld_shlibs_GCJ=no
46982 +          ;;
46983 +      esac
46984 +    fi
46985 +      ;;
46986 +
46987 +    dgux*)
46988 +      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
46989 +      hardcode_libdir_flag_spec_GCJ='-L$libdir'
46990 +      hardcode_shlibpath_var_GCJ=no
46991 +      ;;
46992 +
46993 +    freebsd1*)
46994 +      ld_shlibs_GCJ=no
46995 +      ;;
46996 +
46997 +    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
46998 +    # support.  Future versions do this automatically, but an explicit c++rt0.o
46999 +    # does not break anything, and helps significantly (at the cost of a little
47000 +    # extra space).
47001 +    freebsd2.2*)
47002 +      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
47003 +      hardcode_libdir_flag_spec_GCJ='-R$libdir'
47004 +      hardcode_direct_GCJ=yes
47005 +      hardcode_shlibpath_var_GCJ=no
47006 +      ;;
47007 +
47008 +    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
47009 +    freebsd2*)
47010 +      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
47011 +      hardcode_direct_GCJ=yes
47012 +      hardcode_minus_L_GCJ=yes
47013 +      hardcode_shlibpath_var_GCJ=no
47014 +      ;;
47015 +
47016 +    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
47017 +    freebsd* | kfreebsd*-gnu | dragonfly*)
47018 +      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
47019 +      hardcode_libdir_flag_spec_GCJ='-R$libdir'
47020 +      hardcode_direct_GCJ=yes
47021 +      hardcode_shlibpath_var_GCJ=no
47022 +      ;;
47023 +
47024 +    hpux9*)
47025 +      if test "$GCC" = yes; then
47026 +       archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
47027 +      else
47028 +       archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
47029 +      fi
47030 +      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
47031 +      hardcode_libdir_separator_GCJ=:
47032 +      hardcode_direct_GCJ=yes
47033 +
47034 +      # hardcode_minus_L: Not really in the search PATH,
47035 +      # but as the default location of the library.
47036 +      hardcode_minus_L_GCJ=yes
47037 +      export_dynamic_flag_spec_GCJ='${wl}-E'
47038 +      ;;
47039 +
47040 +    hpux10* | hpux11*)
47041 +      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
47042 +       case "$host_cpu" in
47043 +       hppa*64*|ia64*)
47044 +         archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
47045 +         ;;
47046 +       *)
47047 +         archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
47048 +         ;;
47049 +       esac
47050 +      else
47051 +       case "$host_cpu" in
47052 +       hppa*64*|ia64*)
47053 +         archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
47054 +         ;;
47055 +       *)
47056 +         archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
47057 +         ;;
47058 +       esac
47059 +      fi
47060 +      if test "$with_gnu_ld" = no; then
47061 +       case "$host_cpu" in
47062 +       hppa*64*)
47063 +         hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
47064 +         hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
47065 +         hardcode_libdir_separator_GCJ=:
47066 +         hardcode_direct_GCJ=no
47067 +         hardcode_shlibpath_var_GCJ=no
47068 +         ;;
47069 +       ia64*)
47070 +         hardcode_libdir_flag_spec_GCJ='-L$libdir'
47071 +         hardcode_direct_GCJ=no
47072 +         hardcode_shlibpath_var_GCJ=no
47073 +
47074 +         # hardcode_minus_L: Not really in the search PATH,
47075 +         # but as the default location of the library.
47076 +         hardcode_minus_L_GCJ=yes
47077 +         ;;
47078 +       *)
47079 +         hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
47080 +         hardcode_libdir_separator_GCJ=:
47081 +         hardcode_direct_GCJ=yes
47082 +         export_dynamic_flag_spec_GCJ='${wl}-E'
47083 +
47084 +         # hardcode_minus_L: Not really in the search PATH,
47085 +         # but as the default location of the library.
47086 +         hardcode_minus_L_GCJ=yes
47087 +         ;;
47088 +       esac
47089 +      fi
47090 +      ;;
47091 +
47092 +    irix5* | irix6* | nonstopux*)
47093 +      if test "$GCC" = yes; then
47094 +       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
47095 +      else
47096 +       archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
47097 +       hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
47098 +      fi
47099 +      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
47100 +      hardcode_libdir_separator_GCJ=:
47101 +      link_all_deplibs_GCJ=yes
47102 +      ;;
47103 +
47104 +    netbsd*)
47105 +      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
47106 +       archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
47107 +      else
47108 +       archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
47109 +      fi
47110 +      hardcode_libdir_flag_spec_GCJ='-R$libdir'
47111 +      hardcode_direct_GCJ=yes
47112 +      hardcode_shlibpath_var_GCJ=no
47113 +      ;;
47114 +
47115 +    newsos6)
47116 +      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
47117 +      hardcode_direct_GCJ=yes
47118 +      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
47119 +      hardcode_libdir_separator_GCJ=:
47120 +      hardcode_shlibpath_var_GCJ=no
47121 +      ;;
47122 +
47123 +    openbsd*)
47124 +      hardcode_direct_GCJ=yes
47125 +      hardcode_shlibpath_var_GCJ=no
47126 +      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
47127 +       archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
47128 +       archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
47129 +       hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
47130 +       export_dynamic_flag_spec_GCJ='${wl}-E'
47131 +      else
47132 +       case $host_os in
47133 +        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
47134 +          archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
47135 +          hardcode_libdir_flag_spec_GCJ='-R$libdir'
47136 +          ;;
47137 +        *)
47138 +          archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
47139 +          hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
47140 +          ;;
47141 +       esac
47142 +      fi
47143 +      ;;
47144 +
47145 +    os2*)
47146 +      hardcode_libdir_flag_spec_GCJ='-L$libdir'
47147 +      hardcode_minus_L_GCJ=yes
47148 +      allow_undefined_flag_GCJ=unsupported
47149 +      archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
47150 +      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
47151 +      ;;
47152 +
47153 +    osf3*)
47154 +      if test "$GCC" = yes; then
47155 +       allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
47156 +       archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
47157 +      else
47158 +       allow_undefined_flag_GCJ=' -expect_unresolved \*'
47159 +       archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
47160 +      fi
47161 +      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
47162 +      hardcode_libdir_separator_GCJ=:
47163 +      ;;
47164 +
47165 +    osf4* | osf5*)     # as osf3* with the addition of -msym flag
47166 +      if test "$GCC" = yes; then
47167 +       allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
47168 +       archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
47169 +       hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
47170 +      else
47171 +       allow_undefined_flag_GCJ=' -expect_unresolved \*'
47172 +       archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
47173 +       archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
47174 +       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
47175 +
47176 +       # Both c and cxx compiler support -rpath directly
47177 +       hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
47178 +      fi
47179 +      hardcode_libdir_separator_GCJ=:
47180 +      ;;
47181 +
47182 +    sco3.2v5*)
47183 +      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
47184 +      hardcode_shlibpath_var_GCJ=no
47185 +      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
47186 +      runpath_var=LD_RUN_PATH
47187 +      hardcode_runpath_var=yes
47188 +      ;;
47189 +
47190 +    solaris*)
47191 +      no_undefined_flag_GCJ=' -z text'
47192 +      if test "$GCC" = yes; then
47193 +       archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
47194 +       archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
47195 +         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
47196 +      else
47197 +       archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
47198 +       archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
47199 +       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
47200 +      fi
47201 +      hardcode_libdir_flag_spec_GCJ='-R$libdir'
47202 +      hardcode_shlibpath_var_GCJ=no
47203 +      case $host_os in
47204 +      solaris2.[0-5] | solaris2.[0-5].*) ;;
47205 +      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
47206 +       whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
47207 +      esac
47208 +      link_all_deplibs_GCJ=yes
47209 +      ;;
47210 +
47211 +    sunos4*)
47212 +      if test "x$host_vendor" = xsequent; then
47213 +       # Use $CC to link under sequent, because it throws in some extra .o
47214 +       # files that make .init and .fini sections work.
47215 +       archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
47216 +      else
47217 +       archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
47218 +      fi
47219 +      hardcode_libdir_flag_spec_GCJ='-L$libdir'
47220 +      hardcode_direct_GCJ=yes
47221 +      hardcode_minus_L_GCJ=yes
47222 +      hardcode_shlibpath_var_GCJ=no
47223 +      ;;
47224 +
47225 +    sysv4)
47226 +      case $host_vendor in
47227 +       sni)
47228 +         archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
47229 +         hardcode_direct_GCJ=yes # is this really true???
47230 +       ;;
47231 +       siemens)
47232 +         ## LD is ld it makes a PLAMLIB
47233 +         ## CC just makes a GrossModule.
47234 +         archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
47235 +         reload_cmds_GCJ='$CC -r -o $output$reload_objs'
47236 +         hardcode_direct_GCJ=no
47237 +        ;;
47238 +       motorola)
47239 +         archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
47240 +         hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
47241 +       ;;
47242 +      esac
47243 +      runpath_var='LD_RUN_PATH'
47244 +      hardcode_shlibpath_var_GCJ=no
47245 +      ;;
47246 +
47247 +    sysv4.3*)
47248 +      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
47249 +      hardcode_shlibpath_var_GCJ=no
47250 +      export_dynamic_flag_spec_GCJ='-Bexport'
47251 +      ;;
47252 +
47253 +    sysv4*MP*)
47254 +      if test -d /usr/nec; then
47255 +       archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
47256 +       hardcode_shlibpath_var_GCJ=no
47257 +       runpath_var=LD_RUN_PATH
47258 +       hardcode_runpath_var=yes
47259 +       ld_shlibs_GCJ=yes
47260 +      fi
47261 +      ;;
47262 +
47263 +    sysv4.2uw2*)
47264 +      archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
47265 +      hardcode_direct_GCJ=yes
47266 +      hardcode_minus_L_GCJ=no
47267 +      hardcode_shlibpath_var_GCJ=no
47268 +      hardcode_runpath_var=yes
47269 +      runpath_var=LD_RUN_PATH
47270 +      ;;
47271 +
47272 +   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
47273 +      no_undefined_flag_GCJ='${wl}-z ${wl}text'
47274 +      if test "$GCC" = yes; then
47275 +       archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
47276 +      else
47277 +       archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
47278 +      fi
47279 +      runpath_var='LD_RUN_PATH'
47280 +      hardcode_shlibpath_var_GCJ=no
47281 +      ;;
47282 +
47283 +    sysv5*)
47284 +      no_undefined_flag_GCJ=' -z text'
47285 +      # $CC -shared without GNU ld will not create a library from C++
47286 +      # object files and a static libstdc++, better avoid it by now
47287 +      archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
47288 +      archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
47289 +               $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
47290 +      hardcode_libdir_flag_spec_GCJ=
47291 +      hardcode_shlibpath_var_GCJ=no
47292 +      runpath_var='LD_RUN_PATH'
47293 +      ;;
47294 +
47295 +    uts4*)
47296 +      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
47297 +      hardcode_libdir_flag_spec_GCJ='-L$libdir'
47298 +      hardcode_shlibpath_var_GCJ=no
47299 +      ;;
47300 +
47301 +    *)
47302 +      ld_shlibs_GCJ=no
47303 +      ;;
47304 +    esac
47305 +  fi
47306 +
47307 +echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
47308 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6
47309 +test "$ld_shlibs_GCJ" = no && can_build_shared=no
47310 +
47311 +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
47312 +if test "$GCC" = yes; then
47313 +  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
47314 +fi
47315 +
47316 +#
47317 +# Do we need to explicitly link libc?
47318 +#
47319 +case "x$archive_cmds_need_lc_GCJ" in
47320 +x|xyes)
47321 +  # Assume -lc should be added
47322 +  archive_cmds_need_lc_GCJ=yes
47323 +
47324 +  if test "$enable_shared" = yes && test "$GCC" = yes; then
47325 +    case $archive_cmds_GCJ in
47326 +    *'~'*)
47327 +      # FIXME: we may have to deal with multi-command sequences.
47328 +      ;;
47329 +    '$CC '*)
47330 +      # Test whether the compiler implicitly links with -lc since on some
47331 +      # systems, -lgcc has to come before -lc. If gcc already passes -lc
47332 +      # to ld, don't add -lc before -lgcc.
47333 +      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
47334 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
47335 +      $rm conftest*
47336 +      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
47337 +
47338 +      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
47339 +  (eval $ac_compile) 2>&5
47340 +  ac_status=$?
47341 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
47342 +  (exit $ac_status); } 2>conftest.err; then
47343 +        soname=conftest
47344 +        lib=conftest
47345 +        libobjs=conftest.$ac_objext
47346 +        deplibs=
47347 +        wl=$lt_prog_compiler_wl_GCJ
47348 +        compiler_flags=-v
47349 +        linker_flags=-v
47350 +        verstring=
47351 +        output_objdir=.
47352 +        libname=conftest
47353 +        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
47354 +        allow_undefined_flag_GCJ=
47355 +        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
47356 +  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
47357 +  ac_status=$?
47358 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
47359 +  (exit $ac_status); }
47360 +        then
47361 +         archive_cmds_need_lc_GCJ=no
47362 +        else
47363 +         archive_cmds_need_lc_GCJ=yes
47364 +        fi
47365 +        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
47366 +      else
47367 +        cat conftest.err 1>&5
47368 +      fi
47369 +      $rm conftest*
47370 +      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
47371 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
47372 +      ;;
47373 +    esac
47374 +  fi
47375 +  ;;
47376 +esac
47377 +
47378 +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
47379 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
47380 +library_names_spec=
47381 +libname_spec='lib$name'
47382 +soname_spec=
47383 +shrext_cmds=".so"
47384 +postinstall_cmds=
47385 +postuninstall_cmds=
47386 +finish_cmds=
47387 +finish_eval=
47388 +shlibpath_var=
47389 +shlibpath_overrides_runpath=unknown
47390 +version_type=none
47391 +dynamic_linker="$host_os ld.so"
47392 +sys_lib_dlsearch_path_spec="/lib /usr/lib"
47393 +if test "$GCC" = yes; then
47394 +  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
47395 +  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
47396 +    # if the path contains ";" then we assume it to be the separator
47397 +    # otherwise default to the standard path separator (i.e. ":") - it is
47398 +    # assumed that no part of a normal pathname contains ";" but that should
47399 +    # okay in the real world where ";" in dirpaths is itself problematic.
47400 +    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
47401 +  else
47402 +    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
47403 +  fi
47404 +else
47405 +  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
47406 +fi
47407 +need_lib_prefix=unknown
47408 +hardcode_into_libs=no
47409 +
47410 +# when you set need_version to no, make sure it does not cause -set_version
47411 +# flags to be left without arguments
47412 +need_version=unknown
47413 +
47414 +case $host_os in
47415 +aix3*)
47416 +  version_type=linux
47417 +  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
47418 +  shlibpath_var=LIBPATH
47419 +
47420 +  # AIX 3 has no versioning support, so we append a major version to the name.
47421 +  soname_spec='${libname}${release}${shared_ext}$major'
47422 +  ;;
47423 +
47424 +aix4* | aix5*)
47425 +  version_type=linux
47426 +  need_lib_prefix=no
47427 +  need_version=no
47428 +  hardcode_into_libs=yes
47429 +  if test "$host_cpu" = ia64; then
47430 +    # AIX 5 supports IA64
47431 +    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
47432 +    shlibpath_var=LD_LIBRARY_PATH
47433 +  else
47434 +    # With GCC up to 2.95.x, collect2 would create an import file
47435 +    # for dependence libraries.  The import file would start with
47436 +    # the line `#! .'.  This would cause the generated library to
47437 +    # depend on `.', always an invalid library.  This was fixed in
47438 +    # development snapshots of GCC prior to 3.0.
47439 +    case $host_os in
47440 +      aix4 | aix4.[01] | aix4.[01].*)
47441 +      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
47442 +          echo ' yes '
47443 +          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
47444 +       :
47445 +      else
47446 +       can_build_shared=no
47447 +      fi
47448 +      ;;
47449 +    esac
47450 +    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
47451 +    # soname into executable. Probably we can add versioning support to
47452 +    # collect2, so additional links can be useful in future.
47453 +    if test "$aix_use_runtimelinking" = yes; then
47454 +      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
47455 +      # instead of lib<name>.a to let people know that these are not
47456 +      # typical AIX shared libraries.
47457 +      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
47458 +    else
47459 +      # We preserve .a as extension for shared libraries through AIX4.2
47460 +      # and later when we are not doing run time linking.
47461 +      library_names_spec='${libname}${release}.a $libname.a'
47462 +      soname_spec='${libname}${release}${shared_ext}$major'
47463 +    fi
47464 +    shlibpath_var=LIBPATH
47465 +  fi
47466 +  ;;
47467 +
47468 +amigaos*)
47469 +  library_names_spec='$libname.ixlibrary $libname.a'
47470 +  # Create ${libname}_ixlibrary.a entries in /sys/libs.
47471 +  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
47472 +  ;;
47473 +
47474 +beos*)
47475 +  library_names_spec='${libname}${shared_ext}'
47476 +  dynamic_linker="$host_os ld.so"
47477 +  shlibpath_var=LIBRARY_PATH
47478 +  ;;
47479 +
47480 +bsdi[45]*)
47481 +  version_type=linux
47482 +  need_version=no
47483 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
47484 +  soname_spec='${libname}${release}${shared_ext}$major'
47485 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
47486 +  shlibpath_var=LD_LIBRARY_PATH
47487 +  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
47488 +  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
47489 +  # the default ld.so.conf also contains /usr/contrib/lib and
47490 +  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
47491 +  # libtool to hard-code these into programs
47492 +  ;;
47493 +
47494 +cygwin* | mingw* | pw32*)
47495 +  version_type=windows
47496 +  shrext_cmds=".dll"
47497 +  need_version=no
47498 +  need_lib_prefix=no
47499 +
47500 +  case $GCC,$host_os in
47501 +  yes,cygwin* | yes,mingw* | yes,pw32*)
47502 +    library_names_spec='$libname.dll.a'
47503 +    # DLL is installed to $(libdir)/../bin by postinstall_cmds
47504 +    postinstall_cmds='base_file=`basename \${file}`~
47505 +      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
47506 +      dldir=$destdir/`dirname \$dlpath`~
47507 +      test -d \$dldir || mkdir -p \$dldir~
47508 +      $install_prog $dir/$dlname \$dldir/$dlname'
47509 +    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
47510 +      dlpath=$dir/\$dldll~
47511 +       $rm \$dlpath'
47512 +    shlibpath_overrides_runpath=yes
47513 +
47514 +    case $host_os in
47515 +    cygwin*)
47516 +      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
47517 +      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
47518 +      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
47519 +      ;;
47520 +    mingw*)
47521 +      # MinGW DLLs use traditional 'lib' prefix
47522 +      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
47523 +      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
47524 +      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
47525 +        # It is most probably a Windows format PATH printed by
47526 +        # mingw gcc, but we are running on Cygwin. Gcc prints its search
47527 +        # path with ; separators, and with drive letters. We can handle the
47528 +        # drive letters (cygwin fileutils understands them), so leave them,
47529 +        # especially as we might pass files found there to a mingw objdump,
47530 +        # which wouldn't understand a cygwinified path. Ahh.
47531 +        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
47532 +      else
47533 +        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
47534 +      fi
47535 +      ;;
47536 +    pw32*)
47537 +      # pw32 DLLs use 'pw' prefix rather than 'lib'
47538 +      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
47539 +      ;;
47540 +    esac
47541 +    ;;
47542 +
47543 +  *)
47544 +    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
47545 +    ;;
47546 +  esac
47547 +  dynamic_linker='Win32 ld.exe'
47548 +  # FIXME: first we should search . and the directory the executable is in
47549 +  shlibpath_var=PATH
47550 +  ;;
47551 +
47552 +darwin* | rhapsody*)
47553 +  dynamic_linker="$host_os dyld"
47554 +  version_type=darwin
47555 +  need_lib_prefix=no
47556 +  need_version=no
47557 +  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
47558 +  soname_spec='${libname}${release}${major}$shared_ext'
47559 +  shlibpath_overrides_runpath=yes
47560 +  shlibpath_var=DYLD_LIBRARY_PATH
47561 +  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
47562 +  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
47563 +  if test "$GCC" = yes; then
47564 +    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
47565 +  else
47566 +    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
47567 +  fi
47568 +  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
47569 +  ;;
47570 +
47571 +dgux*)
47572 +  version_type=linux
47573 +  need_lib_prefix=no
47574 +  need_version=no
47575 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
47576 +  soname_spec='${libname}${release}${shared_ext}$major'
47577 +  shlibpath_var=LD_LIBRARY_PATH
47578 +  ;;
47579 +
47580 +freebsd1*)
47581 +  dynamic_linker=no
47582 +  ;;
47583 +
47584 +kfreebsd*-gnu)
47585 +  version_type=linux
47586 +  need_lib_prefix=no
47587 +  need_version=no
47588 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
47589 +  soname_spec='${libname}${release}${shared_ext}$major'
47590 +  shlibpath_var=LD_LIBRARY_PATH
47591 +  shlibpath_overrides_runpath=no
47592 +  hardcode_into_libs=yes
47593 +  dynamic_linker='GNU ld.so'
47594 +  ;;
47595 +
47596 +freebsd* | dragonfly*)
47597 +  # DragonFly does not have aout.  When/if they implement a new
47598 +  # versioning mechanism, adjust this.
47599 +  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
47600 +  version_type=freebsd-$objformat
47601 +  case $version_type in
47602 +    freebsd-elf*)
47603 +      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
47604 +      need_version=no
47605 +      need_lib_prefix=no
47606 +      ;;
47607 +    freebsd-*)
47608 +      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
47609 +      need_version=yes
47610 +      ;;
47611 +  esac
47612 +  shlibpath_var=LD_LIBRARY_PATH
47613 +  case $host_os in
47614 +  freebsd2*)
47615 +    shlibpath_overrides_runpath=yes
47616 +    ;;
47617 +  freebsd3.[01]* | freebsdelf3.[01]*)
47618 +    shlibpath_overrides_runpath=yes
47619 +    hardcode_into_libs=yes
47620 +    ;;
47621 +  *) # from 3.2 on
47622 +    shlibpath_overrides_runpath=no
47623 +    hardcode_into_libs=yes
47624 +    ;;
47625 +  esac
47626 +  ;;
47627 +
47628 +gnu*)
47629 +  version_type=linux
47630 +  need_lib_prefix=no
47631 +  need_version=no
47632 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
47633 +  soname_spec='${libname}${release}${shared_ext}$major'
47634 +  shlibpath_var=LD_LIBRARY_PATH
47635 +  hardcode_into_libs=yes
47636 +  ;;
47637 +
47638 +hpux9* | hpux10* | hpux11*)
47639 +  # Give a soname corresponding to the major version so that dld.sl refuses to
47640 +  # link against other versions.
47641 +  version_type=sunos
47642 +  need_lib_prefix=no
47643 +  need_version=no
47644 +  case "$host_cpu" in
47645 +  ia64*)
47646 +    shrext_cmds='.so'
47647 +    hardcode_into_libs=yes
47648 +    dynamic_linker="$host_os dld.so"
47649 +    shlibpath_var=LD_LIBRARY_PATH
47650 +    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
47651 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
47652 +    soname_spec='${libname}${release}${shared_ext}$major'
47653 +    if test "X$HPUX_IA64_MODE" = X32; then
47654 +      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
47655 +    else
47656 +      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
47657 +    fi
47658 +    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
47659 +    ;;
47660 +   hppa*64*)
47661 +     shrext_cmds='.sl'
47662 +     hardcode_into_libs=yes
47663 +     dynamic_linker="$host_os dld.sl"
47664 +     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
47665 +     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
47666 +     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
47667 +     soname_spec='${libname}${release}${shared_ext}$major'
47668 +     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
47669 +     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
47670 +     ;;
47671 +   *)
47672 +    shrext_cmds='.sl'
47673 +    dynamic_linker="$host_os dld.sl"
47674 +    shlibpath_var=SHLIB_PATH
47675 +    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
47676 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
47677 +    soname_spec='${libname}${release}${shared_ext}$major'
47678 +    ;;
47679 +  esac
47680 +  # HP-UX runs *really* slowly unless shared libraries are mode 555.
47681 +  postinstall_cmds='chmod 555 $lib'
47682 +  ;;
47683 +
47684 +irix5* | irix6* | nonstopux*)
47685 +  case $host_os in
47686 +    nonstopux*) version_type=nonstopux ;;
47687 +    *)
47688 +       if test "$lt_cv_prog_gnu_ld" = yes; then
47689 +               version_type=linux
47690 +       else
47691 +               version_type=irix
47692 +       fi ;;
47693 +  esac
47694 +  need_lib_prefix=no
47695 +  need_version=no
47696 +  soname_spec='${libname}${release}${shared_ext}$major'
47697 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
47698 +  case $host_os in
47699 +  irix5* | nonstopux*)
47700 +    libsuff= shlibsuff=
47701 +    ;;
47702 +  *)
47703 +    case $LD in # libtool.m4 will add one of these switches to LD
47704 +    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
47705 +      libsuff= shlibsuff= libmagic=32-bit;;
47706 +    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
47707 +      libsuff=32 shlibsuff=N32 libmagic=N32;;
47708 +    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
47709 +      libsuff=64 shlibsuff=64 libmagic=64-bit;;
47710 +    *) libsuff= shlibsuff= libmagic=never-match;;
47711 +    esac
47712 +    ;;
47713 +  esac
47714 +  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
47715 +  shlibpath_overrides_runpath=no
47716 +  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
47717 +  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
47718 +  hardcode_into_libs=yes
47719 +  ;;
47720 +
47721 +# No shared lib support for Linux oldld, aout, or coff.
47722 +linux*oldld* | linux*aout* | linux*coff*)
47723 +  dynamic_linker=no
47724 +  ;;
47725 +
47726 +# This must be Linux ELF.
47727 +linux*)
47728 +  version_type=linux
47729 +  need_lib_prefix=no
47730 +  need_version=no
47731 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
47732 +  soname_spec='${libname}${release}${shared_ext}$major'
47733 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
47734 +  shlibpath_var=LD_LIBRARY_PATH
47735 +  shlibpath_overrides_runpath=no
47736 +  # This implies no fast_install, which is unacceptable.
47737 +  # Some rework will be needed to allow for fast_install
47738 +  # before this can be enabled.
47739 +  hardcode_into_libs=yes
47740 +
47741 +  # Append ld.so.conf contents to the search path
47742 +  if test -f /etc/ld.so.conf; then
47743 +    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
47744 +    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
47745 +  fi
47746 +
47747 +  # We used to test for /lib/ld.so.1 and disable shared libraries on
47748 +  # powerpc, because MkLinux only supported shared libraries with the
47749 +  # GNU dynamic linker.  Since this was broken with cross compilers,
47750 +  # most powerpc-linux boxes support dynamic linking these days and
47751 +  # people can always --disable-shared, the test was removed, and we
47752 +  # assume the GNU/Linux dynamic linker is in use.
47753 +  dynamic_linker='GNU/Linux ld.so'
47754 +  ;;
47755 +
47756 +knetbsd*-gnu)
47757 +  version_type=linux
47758 +  need_lib_prefix=no
47759 +  need_version=no
47760 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
47761 +  soname_spec='${libname}${release}${shared_ext}$major'
47762 +  shlibpath_var=LD_LIBRARY_PATH
47763 +  shlibpath_overrides_runpath=no
47764 +  hardcode_into_libs=yes
47765 +  dynamic_linker='GNU ld.so'
47766 +  ;;
47767 +
47768 +netbsd*)
47769 +  version_type=sunos
47770 +  need_lib_prefix=no
47771 +  need_version=no
47772 +  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
47773 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
47774 +    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
47775 +    dynamic_linker='NetBSD (a.out) ld.so'
47776 +  else
47777 +    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
47778 +    soname_spec='${libname}${release}${shared_ext}$major'
47779 +    dynamic_linker='NetBSD ld.elf_so'
47780 +  fi
47781 +  shlibpath_var=LD_LIBRARY_PATH
47782 +  shlibpath_overrides_runpath=yes
47783 +  hardcode_into_libs=yes
47784 +  ;;
47785 +
47786 +newsos6)
47787 +  version_type=linux
47788 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
47789 +  shlibpath_var=LD_LIBRARY_PATH
47790 +  shlibpath_overrides_runpath=yes
47791 +  ;;
47792 +
47793 +nto-qnx*)
47794 +  version_type=linux
47795 +  need_lib_prefix=no
47796 +  need_version=no
47797 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
47798 +  soname_spec='${libname}${release}${shared_ext}$major'
47799 +  shlibpath_var=LD_LIBRARY_PATH
47800 +  shlibpath_overrides_runpath=yes
47801 +  ;;
47802 +
47803 +openbsd*)
47804 +  version_type=sunos
47805 +  need_lib_prefix=no
47806 +  need_version=no
47807 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
47808 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
47809 +  shlibpath_var=LD_LIBRARY_PATH
47810 +  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
47811 +    case $host_os in
47812 +      openbsd2.[89] | openbsd2.[89].*)
47813 +       shlibpath_overrides_runpath=no
47814 +       ;;
47815 +      *)
47816 +       shlibpath_overrides_runpath=yes
47817 +       ;;
47818 +      esac
47819 +  else
47820 +    shlibpath_overrides_runpath=yes
47821 +  fi
47822 +  ;;
47823 +
47824 +os2*)
47825 +  libname_spec='$name'
47826 +  shrext_cmds=".dll"
47827 +  need_lib_prefix=no
47828 +  library_names_spec='$libname${shared_ext} $libname.a'
47829 +  dynamic_linker='OS/2 ld.exe'
47830 +  shlibpath_var=LIBPATH
47831 +  ;;
47832 +
47833 +osf3* | osf4* | osf5*)
47834 +  version_type=osf
47835 +  need_lib_prefix=no
47836 +  need_version=no
47837 +  soname_spec='${libname}${release}${shared_ext}$major'
47838 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
47839 +  shlibpath_var=LD_LIBRARY_PATH
47840 +  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
47841 +  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
47842 +  ;;
47843 +
47844 +sco3.2v5*)
47845 +  version_type=osf
47846 +  soname_spec='${libname}${release}${shared_ext}$major'
47847 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
47848 +  shlibpath_var=LD_LIBRARY_PATH
47849 +  ;;
47850 +
47851 +solaris*)
47852 +  version_type=linux
47853 +  need_lib_prefix=no
47854 +  need_version=no
47855 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
47856 +  soname_spec='${libname}${release}${shared_ext}$major'
47857 +  shlibpath_var=LD_LIBRARY_PATH
47858 +  shlibpath_overrides_runpath=yes
47859 +  hardcode_into_libs=yes
47860 +  # ldd complains unless libraries are executable
47861 +  postinstall_cmds='chmod +x $lib'
47862 +  ;;
47863 +
47864 +sunos4*)
47865 +  version_type=sunos
47866 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
47867 +  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
47868 +  shlibpath_var=LD_LIBRARY_PATH
47869 +  shlibpath_overrides_runpath=yes
47870 +  if test "$with_gnu_ld" = yes; then
47871 +    need_lib_prefix=no
47872 +  fi
47873 +  need_version=yes
47874 +  ;;
47875 +
47876 +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
47877 +  version_type=linux
47878 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
47879 +  soname_spec='${libname}${release}${shared_ext}$major'
47880 +  shlibpath_var=LD_LIBRARY_PATH
47881 +  case $host_vendor in
47882 +    sni)
47883 +      shlibpath_overrides_runpath=no
47884 +      need_lib_prefix=no
47885 +      export_dynamic_flag_spec='${wl}-Blargedynsym'
47886 +      runpath_var=LD_RUN_PATH
47887 +      ;;
47888 +    siemens)
47889 +      need_lib_prefix=no
47890 +      ;;
47891 +    motorola)
47892 +      need_lib_prefix=no
47893 +      need_version=no
47894 +      shlibpath_overrides_runpath=no
47895 +      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
47896 +      ;;
47897 +  esac
47898 +  ;;
47899 +
47900 +sysv4*MP*)
47901 +  if test -d /usr/nec ;then
47902 +    version_type=linux
47903 +    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
47904 +    soname_spec='$libname${shared_ext}.$major'
47905 +    shlibpath_var=LD_LIBRARY_PATH
47906 +  fi
47907 +  ;;
47908 +
47909 +uts4*)
47910 +  version_type=linux
47911 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
47912 +  soname_spec='${libname}${release}${shared_ext}$major'
47913 +  shlibpath_var=LD_LIBRARY_PATH
47914 +  ;;
47915 +
47916 +*)
47917 +  dynamic_linker=no
47918 +  ;;
47919 +esac
47920 +echo "$as_me:$LINENO: result: $dynamic_linker" >&5
47921 +echo "${ECHO_T}$dynamic_linker" >&6
47922 +test "$dynamic_linker" = no && can_build_shared=no
47923 +
47924 +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
47925 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
47926 +hardcode_action_GCJ=
47927 +if test -n "$hardcode_libdir_flag_spec_GCJ" || \
47928 +   test -n "$runpath_var_GCJ" || \
47929 +   test "X$hardcode_automatic_GCJ" = "Xyes" ; then
47930 +
47931 +  # We can hardcode non-existant directories.
47932 +  if test "$hardcode_direct_GCJ" != no &&
47933 +     # If the only mechanism to avoid hardcoding is shlibpath_var, we
47934 +     # have to relink, otherwise we might link with an installed library
47935 +     # when we should be linking with a yet-to-be-installed one
47936 +     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
47937 +     test "$hardcode_minus_L_GCJ" != no; then
47938 +    # Linking always hardcodes the temporary library directory.
47939 +    hardcode_action_GCJ=relink
47940 +  else
47941 +    # We can link without hardcoding, and we can hardcode nonexisting dirs.
47942 +    hardcode_action_GCJ=immediate
47943 +  fi
47944 +else
47945 +  # We cannot hardcode anything, or else we can only hardcode existing
47946 +  # directories.
47947 +  hardcode_action_GCJ=unsupported
47948 +fi
47949 +echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
47950 +echo "${ECHO_T}$hardcode_action_GCJ" >&6
47951 +
47952 +if test "$hardcode_action_GCJ" = relink; then
47953 +  # Fast installation is not supported
47954 +  enable_fast_install=no
47955 +elif test "$shlibpath_overrides_runpath" = yes ||
47956 +     test "$enable_shared" = no; then
47957 +  # Fast installation is not necessary
47958 +  enable_fast_install=needless
47959 +fi
47960 +
47961 +striplib=
47962 +old_striplib=
47963 +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
47964 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
47965 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
47966 +  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
47967 +  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
47968 +  echo "$as_me:$LINENO: result: yes" >&5
47969 +echo "${ECHO_T}yes" >&6
47970 +else
47971 +# FIXME - insert some real tests, host_os isn't really good enough
47972 +  case $host_os in
47973 +   darwin*)
47974 +       if test -n "$STRIP" ; then
47975 +         striplib="$STRIP -x"
47976 +         echo "$as_me:$LINENO: result: yes" >&5
47977 +echo "${ECHO_T}yes" >&6
47978 +       else
47979 +  echo "$as_me:$LINENO: result: no" >&5
47980 +echo "${ECHO_T}no" >&6
47981 +fi
47982 +       ;;
47983 +   *)
47984 +  echo "$as_me:$LINENO: result: no" >&5
47985 +echo "${ECHO_T}no" >&6
47986 +    ;;
47987 +  esac
47988 +fi
47989 +
47990 +if test "x$enable_dlopen" != xyes; then
47991 +  enable_dlopen=unknown
47992 +  enable_dlopen_self=unknown
47993 +  enable_dlopen_self_static=unknown
47994 +else
47995 +  lt_cv_dlopen=no
47996 +  lt_cv_dlopen_libs=
47997 +
47998 +  case $host_os in
47999 +  beos*)
48000 +    lt_cv_dlopen="load_add_on"
48001 +    lt_cv_dlopen_libs=
48002 +    lt_cv_dlopen_self=yes
48003 +    ;;
48004 +
48005 +  mingw* | pw32*)
48006 +    lt_cv_dlopen="LoadLibrary"
48007 +    lt_cv_dlopen_libs=
48008 +   ;;
48009 +
48010 +  cygwin*)
48011 +    lt_cv_dlopen="dlopen"
48012 +    lt_cv_dlopen_libs=
48013 +   ;;
48014 +
48015 +  darwin*)
48016 +  # if libdl is installed we need to link against it
48017 +    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
48018 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
48019 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then
48020 +  echo $ECHO_N "(cached) $ECHO_C" >&6
48021 +else
48022 +  ac_check_lib_save_LIBS=$LIBS
48023 +LIBS="-ldl  $LIBS"
48024 +cat >conftest.$ac_ext <<_ACEOF
48025 +/* confdefs.h.  */
48026 +_ACEOF
48027 +cat confdefs.h >>conftest.$ac_ext
48028 +cat >>conftest.$ac_ext <<_ACEOF
48029 +/* end confdefs.h.  */
48030 +
48031 +/* Override any gcc2 internal prototype to avoid an error.  */
48032 +#ifdef __cplusplus
48033 +extern "C"
48034 +#endif
48035 +/* We use char because int might match the return type of a gcc2
48036 +   builtin and then its argument prototype would still apply.  */
48037 +char dlopen ();
48038 +int
48039 +main ()
48040 +{
48041 +dlopen ();
48042 +  ;
48043 +  return 0;
48044 +}
48045 +_ACEOF
48046 +rm -f conftest.$ac_objext conftest$ac_exeext
48047 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
48048 +  (eval $ac_link) 2>conftest.er1
48049 +  ac_status=$?
48050 +  grep -v '^ *+' conftest.er1 >conftest.err
48051 +  rm -f conftest.er1
48052 +  cat conftest.err >&5
48053 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48054 +  (exit $ac_status); } &&
48055 +        { ac_try='test -z "$ac_c_werror_flag"
48056 +                        || test ! -s conftest.err'
48057 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48058 +  (eval $ac_try) 2>&5
48059 +  ac_status=$?
48060 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48061 +  (exit $ac_status); }; } &&
48062 +        { ac_try='test -s conftest$ac_exeext'
48063 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48064 +  (eval $ac_try) 2>&5
48065 +  ac_status=$?
48066 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48067 +  (exit $ac_status); }; }; then
48068 +  ac_cv_lib_dl_dlopen=yes
48069 +else
48070 +  echo "$as_me: failed program was:" >&5
48071 +sed 's/^/| /' conftest.$ac_ext >&5
48072 +
48073 +ac_cv_lib_dl_dlopen=no
48074 +fi
48075 +rm -f conftest.err conftest.$ac_objext \
48076 +      conftest$ac_exeext conftest.$ac_ext
48077 +LIBS=$ac_check_lib_save_LIBS
48078 +fi
48079 +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
48080 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
48081 +if test $ac_cv_lib_dl_dlopen = yes; then
48082 +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
48083 +else
48084 +
48085 +    lt_cv_dlopen="dyld"
48086 +    lt_cv_dlopen_libs=
48087 +    lt_cv_dlopen_self=yes
48088 +
48089 +fi
48090 +
48091 +   ;;
48092 +
48093 +  *)
48094 +    echo "$as_me:$LINENO: checking for shl_load" >&5
48095 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
48096 +if test "${ac_cv_func_shl_load+set}" = set; then
48097 +  echo $ECHO_N "(cached) $ECHO_C" >&6
48098 +else
48099 +  cat >conftest.$ac_ext <<_ACEOF
48100 +/* confdefs.h.  */
48101 +_ACEOF
48102 +cat confdefs.h >>conftest.$ac_ext
48103 +cat >>conftest.$ac_ext <<_ACEOF
48104 +/* end confdefs.h.  */
48105 +/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
48106 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
48107 +#define shl_load innocuous_shl_load
48108 +
48109 +/* System header to define __stub macros and hopefully few prototypes,
48110 +    which can conflict with char shl_load (); below.
48111 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
48112 +    <limits.h> exists even on freestanding compilers.  */
48113 +
48114 +#ifdef __STDC__
48115 +# include <limits.h>
48116 +#else
48117 +# include <assert.h>
48118 +#endif
48119 +
48120 +#undef shl_load
48121 +
48122 +/* Override any gcc2 internal prototype to avoid an error.  */
48123 +#ifdef __cplusplus
48124 +extern "C"
48125 +{
48126 +#endif
48127 +/* We use char because int might match the return type of a gcc2
48128 +   builtin and then its argument prototype would still apply.  */
48129 +char shl_load ();
48130 +/* The GNU C library defines this for functions which it implements
48131 +    to always fail with ENOSYS.  Some functions are actually named
48132 +    something starting with __ and the normal name is an alias.  */
48133 +#if defined (__stub_shl_load) || defined (__stub___shl_load)
48134 +choke me
48135 +#else
48136 +char (*f) () = shl_load;
48137 +#endif
48138 +#ifdef __cplusplus
48139 +}
48140 +#endif
48141 +
48142 +int
48143 +main ()
48144 +{
48145 +return f != shl_load;
48146 +  ;
48147 +  return 0;
48148 +}
48149 +_ACEOF
48150 +rm -f conftest.$ac_objext conftest$ac_exeext
48151 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
48152 +  (eval $ac_link) 2>conftest.er1
48153 +  ac_status=$?
48154 +  grep -v '^ *+' conftest.er1 >conftest.err
48155 +  rm -f conftest.er1
48156 +  cat conftest.err >&5
48157 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48158 +  (exit $ac_status); } &&
48159 +        { ac_try='test -z "$ac_c_werror_flag"
48160 +                        || test ! -s conftest.err'
48161 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48162 +  (eval $ac_try) 2>&5
48163 +  ac_status=$?
48164 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48165 +  (exit $ac_status); }; } &&
48166 +        { ac_try='test -s conftest$ac_exeext'
48167 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48168 +  (eval $ac_try) 2>&5
48169 +  ac_status=$?
48170 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48171 +  (exit $ac_status); }; }; then
48172 +  ac_cv_func_shl_load=yes
48173 +else
48174 +  echo "$as_me: failed program was:" >&5
48175 +sed 's/^/| /' conftest.$ac_ext >&5
48176 +
48177 +ac_cv_func_shl_load=no
48178 +fi
48179 +rm -f conftest.err conftest.$ac_objext \
48180 +      conftest$ac_exeext conftest.$ac_ext
48181 +fi
48182 +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
48183 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6
48184 +if test $ac_cv_func_shl_load = yes; then
48185 +  lt_cv_dlopen="shl_load"
48186 +else
48187 +  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
48188 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
48189 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then
48190 +  echo $ECHO_N "(cached) $ECHO_C" >&6
48191 +else
48192 +  ac_check_lib_save_LIBS=$LIBS
48193 +LIBS="-ldld  $LIBS"
48194 +cat >conftest.$ac_ext <<_ACEOF
48195 +/* confdefs.h.  */
48196 +_ACEOF
48197 +cat confdefs.h >>conftest.$ac_ext
48198 +cat >>conftest.$ac_ext <<_ACEOF
48199 +/* end confdefs.h.  */
48200 +
48201 +/* Override any gcc2 internal prototype to avoid an error.  */
48202 +#ifdef __cplusplus
48203 +extern "C"
48204 +#endif
48205 +/* We use char because int might match the return type of a gcc2
48206 +   builtin and then its argument prototype would still apply.  */
48207 +char shl_load ();
48208 +int
48209 +main ()
48210 +{
48211 +shl_load ();
48212 +  ;
48213 +  return 0;
48214 +}
48215 +_ACEOF
48216 +rm -f conftest.$ac_objext conftest$ac_exeext
48217 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
48218 +  (eval $ac_link) 2>conftest.er1
48219 +  ac_status=$?
48220 +  grep -v '^ *+' conftest.er1 >conftest.err
48221 +  rm -f conftest.er1
48222 +  cat conftest.err >&5
48223 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48224 +  (exit $ac_status); } &&
48225 +        { ac_try='test -z "$ac_c_werror_flag"
48226 +                        || test ! -s conftest.err'
48227 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48228 +  (eval $ac_try) 2>&5
48229 +  ac_status=$?
48230 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48231 +  (exit $ac_status); }; } &&
48232 +        { ac_try='test -s conftest$ac_exeext'
48233 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48234 +  (eval $ac_try) 2>&5
48235 +  ac_status=$?
48236 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48237 +  (exit $ac_status); }; }; then
48238 +  ac_cv_lib_dld_shl_load=yes
48239 +else
48240 +  echo "$as_me: failed program was:" >&5
48241 +sed 's/^/| /' conftest.$ac_ext >&5
48242 +
48243 +ac_cv_lib_dld_shl_load=no
48244 +fi
48245 +rm -f conftest.err conftest.$ac_objext \
48246 +      conftest$ac_exeext conftest.$ac_ext
48247 +LIBS=$ac_check_lib_save_LIBS
48248 +fi
48249 +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
48250 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
48251 +if test $ac_cv_lib_dld_shl_load = yes; then
48252 +  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
48253 +else
48254 +  echo "$as_me:$LINENO: checking for dlopen" >&5
48255 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
48256 +if test "${ac_cv_func_dlopen+set}" = set; then
48257 +  echo $ECHO_N "(cached) $ECHO_C" >&6
48258 +else
48259 +  cat >conftest.$ac_ext <<_ACEOF
48260 +/* confdefs.h.  */
48261 +_ACEOF
48262 +cat confdefs.h >>conftest.$ac_ext
48263 +cat >>conftest.$ac_ext <<_ACEOF
48264 +/* end confdefs.h.  */
48265 +/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
48266 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
48267 +#define dlopen innocuous_dlopen
48268 +
48269 +/* System header to define __stub macros and hopefully few prototypes,
48270 +    which can conflict with char dlopen (); below.
48271 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
48272 +    <limits.h> exists even on freestanding compilers.  */
48273 +
48274 +#ifdef __STDC__
48275 +# include <limits.h>
48276 +#else
48277 +# include <assert.h>
48278 +#endif
48279 +
48280 +#undef dlopen
48281 +
48282 +/* Override any gcc2 internal prototype to avoid an error.  */
48283 +#ifdef __cplusplus
48284 +extern "C"
48285 +{
48286 +#endif
48287 +/* We use char because int might match the return type of a gcc2
48288 +   builtin and then its argument prototype would still apply.  */
48289 +char dlopen ();
48290 +/* The GNU C library defines this for functions which it implements
48291 +    to always fail with ENOSYS.  Some functions are actually named
48292 +    something starting with __ and the normal name is an alias.  */
48293 +#if defined (__stub_dlopen) || defined (__stub___dlopen)
48294 +choke me
48295 +#else
48296 +char (*f) () = dlopen;
48297 +#endif
48298 +#ifdef __cplusplus
48299 +}
48300 +#endif
48301 +
48302 +int
48303 +main ()
48304 +{
48305 +return f != dlopen;
48306 +  ;
48307 +  return 0;
48308 +}
48309 +_ACEOF
48310 +rm -f conftest.$ac_objext conftest$ac_exeext
48311 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
48312 +  (eval $ac_link) 2>conftest.er1
48313 +  ac_status=$?
48314 +  grep -v '^ *+' conftest.er1 >conftest.err
48315 +  rm -f conftest.er1
48316 +  cat conftest.err >&5
48317 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48318 +  (exit $ac_status); } &&
48319 +        { ac_try='test -z "$ac_c_werror_flag"
48320 +                        || test ! -s conftest.err'
48321 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48322 +  (eval $ac_try) 2>&5
48323 +  ac_status=$?
48324 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48325 +  (exit $ac_status); }; } &&
48326 +        { ac_try='test -s conftest$ac_exeext'
48327 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48328 +  (eval $ac_try) 2>&5
48329 +  ac_status=$?
48330 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48331 +  (exit $ac_status); }; }; then
48332 +  ac_cv_func_dlopen=yes
48333 +else
48334 +  echo "$as_me: failed program was:" >&5
48335 +sed 's/^/| /' conftest.$ac_ext >&5
48336 +
48337 +ac_cv_func_dlopen=no
48338 +fi
48339 +rm -f conftest.err conftest.$ac_objext \
48340 +      conftest$ac_exeext conftest.$ac_ext
48341 +fi
48342 +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
48343 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6
48344 +if test $ac_cv_func_dlopen = yes; then
48345 +  lt_cv_dlopen="dlopen"
48346 +else
48347 +  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
48348 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
48349 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then
48350 +  echo $ECHO_N "(cached) $ECHO_C" >&6
48351 +else
48352 +  ac_check_lib_save_LIBS=$LIBS
48353 +LIBS="-ldl  $LIBS"
48354 +cat >conftest.$ac_ext <<_ACEOF
48355 +/* confdefs.h.  */
48356 +_ACEOF
48357 +cat confdefs.h >>conftest.$ac_ext
48358 +cat >>conftest.$ac_ext <<_ACEOF
48359 +/* end confdefs.h.  */
48360 +
48361 +/* Override any gcc2 internal prototype to avoid an error.  */
48362 +#ifdef __cplusplus
48363 +extern "C"
48364 +#endif
48365 +/* We use char because int might match the return type of a gcc2
48366 +   builtin and then its argument prototype would still apply.  */
48367 +char dlopen ();
48368 +int
48369 +main ()
48370 +{
48371 +dlopen ();
48372 +  ;
48373 +  return 0;
48374 +}
48375 +_ACEOF
48376 +rm -f conftest.$ac_objext conftest$ac_exeext
48377 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
48378 +  (eval $ac_link) 2>conftest.er1
48379 +  ac_status=$?
48380 +  grep -v '^ *+' conftest.er1 >conftest.err
48381 +  rm -f conftest.er1
48382 +  cat conftest.err >&5
48383 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48384 +  (exit $ac_status); } &&
48385 +        { ac_try='test -z "$ac_c_werror_flag"
48386 +                        || test ! -s conftest.err'
48387 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48388 +  (eval $ac_try) 2>&5
48389 +  ac_status=$?
48390 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48391 +  (exit $ac_status); }; } &&
48392 +        { ac_try='test -s conftest$ac_exeext'
48393 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48394 +  (eval $ac_try) 2>&5
48395 +  ac_status=$?
48396 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48397 +  (exit $ac_status); }; }; then
48398 +  ac_cv_lib_dl_dlopen=yes
48399 +else
48400 +  echo "$as_me: failed program was:" >&5
48401 +sed 's/^/| /' conftest.$ac_ext >&5
48402 +
48403 +ac_cv_lib_dl_dlopen=no
48404 +fi
48405 +rm -f conftest.err conftest.$ac_objext \
48406 +      conftest$ac_exeext conftest.$ac_ext
48407 +LIBS=$ac_check_lib_save_LIBS
48408 +fi
48409 +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
48410 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
48411 +if test $ac_cv_lib_dl_dlopen = yes; then
48412 +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
48413 +else
48414 +  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
48415 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
48416 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then
48417 +  echo $ECHO_N "(cached) $ECHO_C" >&6
48418 +else
48419 +  ac_check_lib_save_LIBS=$LIBS
48420 +LIBS="-lsvld  $LIBS"
48421 +cat >conftest.$ac_ext <<_ACEOF
48422 +/* confdefs.h.  */
48423 +_ACEOF
48424 +cat confdefs.h >>conftest.$ac_ext
48425 +cat >>conftest.$ac_ext <<_ACEOF
48426 +/* end confdefs.h.  */
48427 +
48428 +/* Override any gcc2 internal prototype to avoid an error.  */
48429 +#ifdef __cplusplus
48430 +extern "C"
48431 +#endif
48432 +/* We use char because int might match the return type of a gcc2
48433 +   builtin and then its argument prototype would still apply.  */
48434 +char dlopen ();
48435 +int
48436 +main ()
48437 +{
48438 +dlopen ();
48439 +  ;
48440 +  return 0;
48441 +}
48442 +_ACEOF
48443 +rm -f conftest.$ac_objext conftest$ac_exeext
48444 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
48445 +  (eval $ac_link) 2>conftest.er1
48446 +  ac_status=$?
48447 +  grep -v '^ *+' conftest.er1 >conftest.err
48448 +  rm -f conftest.er1
48449 +  cat conftest.err >&5
48450 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48451 +  (exit $ac_status); } &&
48452 +        { ac_try='test -z "$ac_c_werror_flag"
48453 +                        || test ! -s conftest.err'
48454 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48455 +  (eval $ac_try) 2>&5
48456 +  ac_status=$?
48457 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48458 +  (exit $ac_status); }; } &&
48459 +        { ac_try='test -s conftest$ac_exeext'
48460 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48461 +  (eval $ac_try) 2>&5
48462 +  ac_status=$?
48463 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48464 +  (exit $ac_status); }; }; then
48465 +  ac_cv_lib_svld_dlopen=yes
48466 +else
48467 +  echo "$as_me: failed program was:" >&5
48468 +sed 's/^/| /' conftest.$ac_ext >&5
48469 +
48470 +ac_cv_lib_svld_dlopen=no
48471 +fi
48472 +rm -f conftest.err conftest.$ac_objext \
48473 +      conftest$ac_exeext conftest.$ac_ext
48474 +LIBS=$ac_check_lib_save_LIBS
48475 +fi
48476 +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
48477 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
48478 +if test $ac_cv_lib_svld_dlopen = yes; then
48479 +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
48480 +else
48481 +  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
48482 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
48483 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then
48484 +  echo $ECHO_N "(cached) $ECHO_C" >&6
48485 +else
48486 +  ac_check_lib_save_LIBS=$LIBS
48487 +LIBS="-ldld  $LIBS"
48488 +cat >conftest.$ac_ext <<_ACEOF
48489 +/* confdefs.h.  */
48490 +_ACEOF
48491 +cat confdefs.h >>conftest.$ac_ext
48492 +cat >>conftest.$ac_ext <<_ACEOF
48493 +/* end confdefs.h.  */
48494 +
48495 +/* Override any gcc2 internal prototype to avoid an error.  */
48496 +#ifdef __cplusplus
48497 +extern "C"
48498 +#endif
48499 +/* We use char because int might match the return type of a gcc2
48500 +   builtin and then its argument prototype would still apply.  */
48501 +char dld_link ();
48502 +int
48503 +main ()
48504 +{
48505 +dld_link ();
48506 +  ;
48507 +  return 0;
48508 +}
48509 +_ACEOF
48510 +rm -f conftest.$ac_objext conftest$ac_exeext
48511 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
48512 +  (eval $ac_link) 2>conftest.er1
48513 +  ac_status=$?
48514 +  grep -v '^ *+' conftest.er1 >conftest.err
48515 +  rm -f conftest.er1
48516 +  cat conftest.err >&5
48517 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48518 +  (exit $ac_status); } &&
48519 +        { ac_try='test -z "$ac_c_werror_flag"
48520 +                        || test ! -s conftest.err'
48521 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48522 +  (eval $ac_try) 2>&5
48523 +  ac_status=$?
48524 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48525 +  (exit $ac_status); }; } &&
48526 +        { ac_try='test -s conftest$ac_exeext'
48527 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
48528 +  (eval $ac_try) 2>&5
48529 +  ac_status=$?
48530 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48531 +  (exit $ac_status); }; }; then
48532 +  ac_cv_lib_dld_dld_link=yes
48533 +else
48534 +  echo "$as_me: failed program was:" >&5
48535 +sed 's/^/| /' conftest.$ac_ext >&5
48536 +
48537 +ac_cv_lib_dld_dld_link=no
48538 +fi
48539 +rm -f conftest.err conftest.$ac_objext \
48540 +      conftest$ac_exeext conftest.$ac_ext
48541 +LIBS=$ac_check_lib_save_LIBS
48542 +fi
48543 +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
48544 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
48545 +if test $ac_cv_lib_dld_dld_link = yes; then
48546 +  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
48547 +fi
48548 +
48549 +
48550 +fi
48551 +
48552 +
48553 +fi
48554 +
48555 +
48556 +fi
48557 +
48558 +
48559 +fi
48560 +
48561 +
48562 +fi
48563 +
48564 +    ;;
48565 +  esac
48566 +
48567 +  if test "x$lt_cv_dlopen" != xno; then
48568 +    enable_dlopen=yes
48569 +  else
48570 +    enable_dlopen=no
48571 +  fi
48572 +
48573 +  case $lt_cv_dlopen in
48574 +  dlopen)
48575 +    save_CPPFLAGS="$CPPFLAGS"
48576 +    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
48577 +
48578 +    save_LDFLAGS="$LDFLAGS"
48579 +    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
48580 +
48581 +    save_LIBS="$LIBS"
48582 +    LIBS="$lt_cv_dlopen_libs $LIBS"
48583 +
48584 +    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
48585 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
48586 +if test "${lt_cv_dlopen_self+set}" = set; then
48587 +  echo $ECHO_N "(cached) $ECHO_C" >&6
48588 +else
48589 +         if test "$cross_compiling" = yes; then :
48590 +  lt_cv_dlopen_self=cross
48591 +else
48592 +  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
48593 +  lt_status=$lt_dlunknown
48594 +  cat > conftest.$ac_ext <<EOF
48595 +#line 18301 "configure"
48596 +#include "confdefs.h"
48597 +
48598 +#if HAVE_DLFCN_H
48599 +#include <dlfcn.h>
48600 +#endif
48601 +
48602 +#include <stdio.h>
48603 +
48604 +#ifdef RTLD_GLOBAL
48605 +#  define LT_DLGLOBAL          RTLD_GLOBAL
48606 +#else
48607 +#  ifdef DL_GLOBAL
48608 +#    define LT_DLGLOBAL                DL_GLOBAL
48609 +#  else
48610 +#    define LT_DLGLOBAL                0
48611 +#  endif
48612 +#endif
48613 +
48614 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
48615 +   find out it does not work in some platform. */
48616 +#ifndef LT_DLLAZY_OR_NOW
48617 +#  ifdef RTLD_LAZY
48618 +#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
48619 +#  else
48620 +#    ifdef DL_LAZY
48621 +#      define LT_DLLAZY_OR_NOW         DL_LAZY
48622 +#    else
48623 +#      ifdef RTLD_NOW
48624 +#        define LT_DLLAZY_OR_NOW       RTLD_NOW
48625 +#      else
48626 +#        ifdef DL_NOW
48627 +#          define LT_DLLAZY_OR_NOW     DL_NOW
48628 +#        else
48629 +#          define LT_DLLAZY_OR_NOW     0
48630 +#        endif
48631 +#      endif
48632 +#    endif
48633 +#  endif
48634 +#endif
48635 +
48636 +#ifdef __cplusplus
48637 +extern "C" void exit (int);
48638 +#endif
48639 +
48640 +void fnord() { int i=42;}
48641 +int main ()
48642 +{
48643 +  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
48644 +  int status = $lt_dlunknown;
48645 +
48646 +  if (self)
48647 +    {
48648 +      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
48649 +      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
48650 +      /* dlclose (self); */
48651 +    }
48652 +
48653 +    exit (status);
48654 +}
48655 +EOF
48656 +  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
48657 +  (eval $ac_link) 2>&5
48658 +  ac_status=$?
48659 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48660 +  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
48661 +    (./conftest; exit; ) 2>/dev/null
48662 +    lt_status=$?
48663 +    case x$lt_status in
48664 +      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
48665 +      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
48666 +      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
48667 +    esac
48668 +  else :
48669 +    # compilation failed
48670 +    lt_cv_dlopen_self=no
48671 +  fi
48672 +fi
48673 +rm -fr conftest*
48674 +
48675 +
48676 +fi
48677 +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
48678 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6
48679 +
48680 +    if test "x$lt_cv_dlopen_self" = xyes; then
48681 +      LDFLAGS="$LDFLAGS $link_static_flag"
48682 +      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
48683 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
48684 +if test "${lt_cv_dlopen_self_static+set}" = set; then
48685 +  echo $ECHO_N "(cached) $ECHO_C" >&6
48686 +else
48687 +         if test "$cross_compiling" = yes; then :
48688 +  lt_cv_dlopen_self_static=cross
48689 +else
48690 +  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
48691 +  lt_status=$lt_dlunknown
48692 +  cat > conftest.$ac_ext <<EOF
48693 +#line 18399 "configure"
48694 +#include "confdefs.h"
48695 +
48696 +#if HAVE_DLFCN_H
48697 +#include <dlfcn.h>
48698 +#endif
48699 +
48700 +#include <stdio.h>
48701 +
48702 +#ifdef RTLD_GLOBAL
48703 +#  define LT_DLGLOBAL          RTLD_GLOBAL
48704 +#else
48705 +#  ifdef DL_GLOBAL
48706 +#    define LT_DLGLOBAL                DL_GLOBAL
48707 +#  else
48708 +#    define LT_DLGLOBAL                0
48709 +#  endif
48710 +#endif
48711 +
48712 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
48713 +   find out it does not work in some platform. */
48714 +#ifndef LT_DLLAZY_OR_NOW
48715 +#  ifdef RTLD_LAZY
48716 +#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
48717 +#  else
48718 +#    ifdef DL_LAZY
48719 +#      define LT_DLLAZY_OR_NOW         DL_LAZY
48720 +#    else
48721 +#      ifdef RTLD_NOW
48722 +#        define LT_DLLAZY_OR_NOW       RTLD_NOW
48723 +#      else
48724 +#        ifdef DL_NOW
48725 +#          define LT_DLLAZY_OR_NOW     DL_NOW
48726 +#        else
48727 +#          define LT_DLLAZY_OR_NOW     0
48728 +#        endif
48729 +#      endif
48730 +#    endif
48731 +#  endif
48732 +#endif
48733 +
48734 +#ifdef __cplusplus
48735 +extern "C" void exit (int);
48736 +#endif
48737 +
48738 +void fnord() { int i=42;}
48739 +int main ()
48740 +{
48741 +  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
48742 +  int status = $lt_dlunknown;
48743 +
48744 +  if (self)
48745 +    {
48746 +      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
48747 +      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
48748 +      /* dlclose (self); */
48749 +    }
48750 +
48751 +    exit (status);
48752 +}
48753 +EOF
48754 +  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
48755 +  (eval $ac_link) 2>&5
48756 +  ac_status=$?
48757 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
48758 +  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
48759 +    (./conftest; exit; ) 2>/dev/null
48760 +    lt_status=$?
48761 +    case x$lt_status in
48762 +      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
48763 +      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
48764 +      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
48765 +    esac
48766 +  else :
48767 +    # compilation failed
48768 +    lt_cv_dlopen_self_static=no
48769 +  fi
48770 +fi
48771 +rm -fr conftest*
48772 +
48773 +
48774 +fi
48775 +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
48776 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
48777 +    fi
48778 +
48779 +    CPPFLAGS="$save_CPPFLAGS"
48780 +    LDFLAGS="$save_LDFLAGS"
48781 +    LIBS="$save_LIBS"
48782 +    ;;
48783 +  esac
48784 +
48785 +  case $lt_cv_dlopen_self in
48786 +  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
48787 +  *) enable_dlopen_self=unknown ;;
48788 +  esac
48789 +
48790 +  case $lt_cv_dlopen_self_static in
48791 +  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
48792 +  *) enable_dlopen_self_static=unknown ;;
48793 +  esac
48794 +fi
48795 +
48796 +
48797 +# The else clause should only fire when bootstrapping the
48798 +# libtool distribution, otherwise you forgot to ship ltmain.sh
48799 +# with your package, and you will get complaints that there are
48800 +# no rules to generate ltmain.sh.
48801 +if test -f "$ltmain"; then
48802 +  # See if we are running on zsh, and set the options which allow our commands through
48803 +  # without removal of \ escapes.
48804 +  if test -n "${ZSH_VERSION+set}" ; then
48805 +    setopt NO_GLOB_SUBST
48806 +  fi
48807 +  # Now quote all the things that may contain metacharacters while being
48808 +  # careful not to overquote the AC_SUBSTed values.  We take copies of the
48809 +  # variables and quote the copies for generation of the libtool script.
48810 +  for var in echo old_CC old_CFLAGS AR AR_FLAGS AS EGREP RANLIB LN_S LTCC NM \
48811 +    SED SHELL STRIP \
48812 +    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
48813 +    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
48814 +    deplibs_check_method reload_flag reload_cmds need_locks \
48815 +    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
48816 +    lt_cv_sys_global_symbol_to_c_name_address \
48817 +    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
48818 +    old_postinstall_cmds old_postuninstall_cmds \
48819 +    compiler_GCJ \
48820 +    CC_GCJ \
48821 +    LD_GCJ \
48822 +    lt_prog_compiler_wl_GCJ \
48823 +    lt_prog_compiler_pic_GCJ \
48824 +    lt_prog_compiler_static_GCJ \
48825 +    lt_prog_compiler_no_builtin_flag_GCJ \
48826 +    export_dynamic_flag_spec_GCJ \
48827 +    thread_safe_flag_spec_GCJ \
48828 +    whole_archive_flag_spec_GCJ \
48829 +    enable_shared_with_static_runtimes_GCJ \
48830 +    old_archive_cmds_GCJ \
48831 +    old_archive_from_new_cmds_GCJ \
48832 +    predep_objects_GCJ \
48833 +    postdep_objects_GCJ \
48834 +    predeps_GCJ \
48835 +    postdeps_GCJ \
48836 +    compiler_lib_search_path_GCJ \
48837 +    archive_cmds_GCJ \
48838 +    archive_expsym_cmds_GCJ \
48839 +    postinstall_cmds_GCJ \
48840 +    postuninstall_cmds_GCJ \
48841 +    old_archive_from_expsyms_cmds_GCJ \
48842 +    allow_undefined_flag_GCJ \
48843 +    no_undefined_flag_GCJ \
48844 +    export_symbols_cmds_GCJ \
48845 +    hardcode_libdir_flag_spec_GCJ \
48846 +    hardcode_libdir_flag_spec_ld_GCJ \
48847 +    hardcode_libdir_separator_GCJ \
48848 +    hardcode_automatic_GCJ \
48849 +    module_cmds_GCJ \
48850 +    module_expsym_cmds_GCJ \
48851 +    lt_cv_prog_compiler_c_o_GCJ \
48852 +    exclude_expsyms_GCJ \
48853 +    include_expsyms_GCJ; do
48854 +
48855 +    case $var in
48856 +    old_archive_cmds_GCJ | \
48857 +    old_archive_from_new_cmds_GCJ | \
48858 +    archive_cmds_GCJ | \
48859 +    archive_expsym_cmds_GCJ | \
48860 +    module_cmds_GCJ | \
48861 +    module_expsym_cmds_GCJ | \
48862 +    old_archive_from_expsyms_cmds_GCJ | \
48863 +    export_symbols_cmds_GCJ | \
48864 +    extract_expsyms_cmds | reload_cmds | finish_cmds | \
48865 +    postinstall_cmds | postuninstall_cmds | \
48866 +    old_postinstall_cmds | old_postuninstall_cmds | \
48867 +    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
48868 +      # Double-quote double-evaled strings.
48869 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
48870 +      ;;
48871 +    *)
48872 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
48873 +      ;;
48874 +    esac
48875 +  done
48876 +
48877 +  case $lt_echo in
48878 +  *'\$0 --fallback-echo"')
48879 +    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
48880 +    ;;
48881 +  esac
48882 +
48883 +cfgfile="$ofile"
48884 +
48885 +  cat <<__EOF__ >> "$cfgfile"
48886 +# ### BEGIN LIBTOOL TAG CONFIG: $tagname
48887 +
48888 +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
48889 +
48890 +# Shell to use when invoking shell scripts.
48891 +SHELL=$lt_SHELL
48892 +
48893 +# Whether or not to build shared libraries.
48894 +build_libtool_libs=$enable_shared
48895 +
48896 +# Whether or not to build static libraries.
48897 +build_old_libs=$enable_static
48898 +
48899 +# Whether or not to add -lc for building shared libraries.
48900 +build_libtool_need_lc=$archive_cmds_need_lc_GCJ
48901 +
48902 +# Whether or not to disallow shared libs when runtime libs are static
48903 +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
48904 +
48905 +# Whether or not to optimize for fast installation.
48906 +fast_install=$enable_fast_install
48907 +
48908 +# The host system.
48909 +host_alias=$host_alias
48910 +host=$host
48911 +host_os=$host_os
48912 +
48913 +# The build system.
48914 +build_alias=$build_alias
48915 +build=$build
48916 +build_os=$build_os
48917 +
48918 +# An echo program that does not interpret backslashes.
48919 +echo=$lt_echo
48920 +
48921 +# The archiver.
48922 +AR=$lt_AR
48923 +AR_FLAGS=$lt_AR_FLAGS
48924 +
48925 +# A C compiler.
48926 +LTCC=$lt_LTCC
48927 +
48928 +# A language-specific compiler.
48929 +CC=$lt_compiler_GCJ
48930 +
48931 +# Is the compiler the GNU C compiler?
48932 +with_gcc=$GCC_GCJ
48933 +
48934 +# An ERE matcher.
48935 +EGREP=$lt_EGREP
48936 +
48937 +# The linker used to build libraries.
48938 +LD=$lt_LD_GCJ
48939 +
48940 +# Whether we need hard or soft links.
48941 +LN_S=$lt_LN_S
48942 +
48943 +# A BSD-compatible nm program.
48944 +NM=$lt_NM
48945 +
48946 +# A symbol stripping program
48947 +STRIP=$lt_STRIP
48948 +
48949 +# Used to examine libraries when file_magic_cmd begins "file"
48950 +MAGIC_CMD=$MAGIC_CMD
48951 +
48952 +# Used on cygwin: DLL creation program.
48953 +DLLTOOL="$DLLTOOL"
48954 +
48955 +# Used on cygwin: object dumper.
48956 +OBJDUMP="$OBJDUMP"
48957 +
48958 +# Used on cygwin: assembler.
48959 +AS=$lt_AS
48960 +
48961 +# The name of the directory that contains temporary libtool files.
48962 +objdir=$objdir
48963 +
48964 +# How to create reloadable object files.
48965 +reload_flag=$lt_reload_flag
48966 +reload_cmds=$lt_reload_cmds
48967 +
48968 +# How to pass a linker flag through the compiler.
48969 +wl=$lt_lt_prog_compiler_wl_GCJ
48970 +
48971 +# Object file suffix (normally "o").
48972 +objext="$ac_objext"
48973 +
48974 +# Old archive suffix (normally "a").
48975 +libext="$libext"
48976 +
48977 +# Shared library suffix (normally ".so").
48978 +shrext_cmds='$shrext_cmds'
48979 +
48980 +# Executable file suffix (normally "").
48981 +exeext="$exeext"
48982 +
48983 +# Additional compiler flags for building library objects.
48984 +pic_flag=$lt_lt_prog_compiler_pic_GCJ
48985 +pic_mode=$pic_mode
48986 +
48987 +# What is the maximum length of a command?
48988 +max_cmd_len=$lt_cv_sys_max_cmd_len
48989 +
48990 +# Does compiler simultaneously support -c and -o options?
48991 +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
48992 +
48993 +# Must we lock files when doing compilation ?
48994 +need_locks=$lt_need_locks
48995 +
48996 +# Do we need the lib prefix for modules?
48997 +need_lib_prefix=$need_lib_prefix
48998 +
48999 +# Do we need a version for libraries?
49000 +need_version=$need_version
49001 +
49002 +# Whether dlopen is supported.
49003 +dlopen_support=$enable_dlopen
49004 +
49005 +# Whether dlopen of programs is supported.
49006 +dlopen_self=$enable_dlopen_self
49007 +
49008 +# Whether dlopen of statically linked programs is supported.
49009 +dlopen_self_static=$enable_dlopen_self_static
49010 +
49011 +# Compiler flag to prevent dynamic linking.
49012 +link_static_flag=$lt_lt_prog_compiler_static_GCJ
49013 +
49014 +# Compiler flag to turn off builtin functions.
49015 +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
49016 +
49017 +# Compiler flag to allow reflexive dlopens.
49018 +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
49019 +
49020 +# Compiler flag to generate shared objects directly from archives.
49021 +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
49022 +
49023 +# Compiler flag to generate thread-safe objects.
49024 +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
49025 +
49026 +# Library versioning type.
49027 +version_type=$version_type
49028 +
49029 +# Format of library name prefix.
49030 +libname_spec=$lt_libname_spec
49031 +
49032 +# List of archive names.  First name is the real one, the rest are links.
49033 +# The last name is the one that the linker finds with -lNAME.
49034 +library_names_spec=$lt_library_names_spec
49035 +
49036 +# The coded name of the library, if different from the real name.
49037 +soname_spec=$lt_soname_spec
49038 +
49039 +# Commands used to build and install an old-style archive.
49040 +RANLIB=$lt_RANLIB
49041 +old_archive_cmds=$lt_old_archive_cmds_GCJ
49042 +old_postinstall_cmds=$lt_old_postinstall_cmds
49043 +old_postuninstall_cmds=$lt_old_postuninstall_cmds
49044 +
49045 +# Create an old-style archive from a shared archive.
49046 +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
49047 +
49048 +# Create a temporary old-style archive to link instead of a shared archive.
49049 +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
49050 +
49051 +# Commands used to build and install a shared archive.
49052 +archive_cmds=$lt_archive_cmds_GCJ
49053 +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
49054 +postinstall_cmds=$lt_postinstall_cmds
49055 +postuninstall_cmds=$lt_postuninstall_cmds
49056 +
49057 +# Commands used to build a loadable module (assumed same as above if empty)
49058 +module_cmds=$lt_module_cmds_GCJ
49059 +module_expsym_cmds=$lt_module_expsym_cmds_GCJ
49060 +
49061 +# Commands to strip libraries.
49062 +old_striplib=$lt_old_striplib
49063 +striplib=$lt_striplib
49064 +
49065 +# Dependencies to place before the objects being linked to create a
49066 +# shared library.
49067 +predep_objects=$lt_predep_objects_GCJ
49068 +
49069 +# Dependencies to place after the objects being linked to create a
49070 +# shared library.
49071 +postdep_objects=$lt_postdep_objects_GCJ
49072 +
49073 +# Dependencies to place before the objects being linked to create a
49074 +# shared library.
49075 +predeps=$lt_predeps_GCJ
49076 +
49077 +# Dependencies to place after the objects being linked to create a
49078 +# shared library.
49079 +postdeps=$lt_postdeps_GCJ
49080 +
49081 +# The library search path used internally by the compiler when linking
49082 +# a shared library.
49083 +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
49084 +
49085 +# Method to check whether dependent libraries are shared objects.
49086 +deplibs_check_method=$lt_deplibs_check_method
49087 +
49088 +# Command to use when deplibs_check_method == file_magic.
49089 +file_magic_cmd=$lt_file_magic_cmd
49090 +
49091 +# Flag that allows shared libraries with undefined symbols to be built.
49092 +allow_undefined_flag=$lt_allow_undefined_flag_GCJ
49093 +
49094 +# Flag that forces no undefined symbols.
49095 +no_undefined_flag=$lt_no_undefined_flag_GCJ
49096 +
49097 +# Commands used to finish a libtool library installation in a directory.
49098 +finish_cmds=$lt_finish_cmds
49099 +
49100 +# Same as above, but a single script fragment to be evaled but not shown.
49101 +finish_eval=$lt_finish_eval
49102 +
49103 +# Take the output of nm and produce a listing of raw symbols and C names.
49104 +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
49105 +
49106 +# Transform the output of nm in a proper C declaration
49107 +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
49108 +
49109 +# Transform the output of nm in a C name address pair
49110 +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
49111 +
49112 +# This is the shared library runtime path variable.
49113 +runpath_var=$runpath_var
49114 +
49115 +# This is the shared library path variable.
49116 +shlibpath_var=$shlibpath_var
49117 +
49118 +# Is shlibpath searched before the hard-coded library search path?
49119 +shlibpath_overrides_runpath=$shlibpath_overrides_runpath
49120 +
49121 +# How to hardcode a shared library path into an executable.
49122 +hardcode_action=$hardcode_action_GCJ
49123 +
49124 +# Whether we should hardcode library paths into libraries.
49125 +hardcode_into_libs=$hardcode_into_libs
49126 +
49127 +# Flag to hardcode \$libdir into a binary during linking.
49128 +# This must work even if \$libdir does not exist.
49129 +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
49130 +
49131 +# If ld is used when linking, flag to hardcode \$libdir into
49132 +# a binary during linking. This must work even if \$libdir does
49133 +# not exist.
49134 +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
49135 +
49136 +# Whether we need a single -rpath flag with a separated argument.
49137 +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
49138 +
49139 +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
49140 +# resulting binary.
49141 +hardcode_direct=$hardcode_direct_GCJ
49142 +
49143 +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
49144 +# resulting binary.
49145 +hardcode_minus_L=$hardcode_minus_L_GCJ
49146 +
49147 +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
49148 +# the resulting binary.
49149 +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
49150 +
49151 +# Set to yes if building a shared library automatically hardcodes DIR into the library
49152 +# and all subsequent libraries and executables linked against it.
49153 +hardcode_automatic=$hardcode_automatic_GCJ
49154 +
49155 +# Variables whose values should be saved in libtool wrapper scripts and
49156 +# restored at relink time.
49157 +variables_saved_for_relink="$variables_saved_for_relink"
49158 +
49159 +# Whether libtool must link a program against all its dependency libraries.
49160 +link_all_deplibs=$link_all_deplibs_GCJ
49161 +
49162 +# Compile-time system search path for libraries
49163 +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
49164 +
49165 +# Run-time system search path for libraries
49166 +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
49167 +
49168 +# Fix the shell variable \$srcfile for the compiler.
49169 +fix_srcfile_path="$fix_srcfile_path_GCJ"
49170 +
49171 +# Set to yes if exported symbols are required.
49172 +always_export_symbols=$always_export_symbols_GCJ
49173 +
49174 +# The commands to list exported symbols.
49175 +export_symbols_cmds=$lt_export_symbols_cmds_GCJ
49176 +
49177 +# The commands to extract the exported symbol list from a shared archive.
49178 +extract_expsyms_cmds=$lt_extract_expsyms_cmds
49179 +
49180 +# Symbols that should not be listed in the preloaded symbols.
49181 +exclude_expsyms=$lt_exclude_expsyms_GCJ
49182 +
49183 +# Symbols that must always be exported.
49184 +include_expsyms=$lt_include_expsyms_GCJ
49185 +
49186 +# ### END LIBTOOL TAG CONFIG: $tagname
49187 +
49188 +__EOF__
49189 +
49190 +
49191 +else
49192 +  # If there is no Makefile yet, we rely on a make rule to execute
49193 +  # `config.status --recheck' to rerun these tests and create the
49194 +  # libtool script then.
49195 +  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
49196 +  if test -f "$ltmain_in"; then
49197 +    test -f Makefile && make "$ltmain"
49198 +  fi
49199 +fi
49200 +
49201 +
49202 +ac_ext=c
49203 +ac_cpp='$CPP $CPPFLAGS'
49204 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49205 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49206 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
49207 +
49208 +CC="$lt_save_CC"
49209 +
49210 +       else
49211 +         tagname=""
49212 +       fi
49213 +       ;;
49214 +
49215 +      RC)
49216 +
49217 +
49218 +
49219 +# Source file extension for RC test sources.
49220 +ac_ext=rc
49221 +
49222 +# Object file extension for compiled RC test sources.
49223 +objext=o
49224 +objext_RC=$objext
49225 +
49226 +# Code to be used in simple compile tests
49227 +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
49228 +
49229 +# Code to be used in simple link tests
49230 +lt_simple_link_test_code="$lt_simple_compile_test_code"
49231 +
49232 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
49233 +
49234 +# If no C compiler was specified, use CC.
49235 +LTCC=${LTCC-"$CC"}
49236 +
49237 +# Allow CC to be a program name with arguments.
49238 +compiler=$CC
49239 +
49240 +
49241 +# Allow CC to be a program name with arguments.
49242 +lt_save_CC="$CC"
49243 +CC=${RC-"windres"}
49244 +compiler=$CC
49245 +compiler_RC=$CC
49246 +lt_cv_prog_compiler_c_o_RC=yes
49247 +
49248 +# The else clause should only fire when bootstrapping the
49249 +# libtool distribution, otherwise you forgot to ship ltmain.sh
49250 +# with your package, and you will get complaints that there are
49251 +# no rules to generate ltmain.sh.
49252 +if test -f "$ltmain"; then
49253 +  # See if we are running on zsh, and set the options which allow our commands through
49254 +  # without removal of \ escapes.
49255 +  if test -n "${ZSH_VERSION+set}" ; then
49256 +    setopt NO_GLOB_SUBST
49257 +  fi
49258 +  # Now quote all the things that may contain metacharacters while being
49259 +  # careful not to overquote the AC_SUBSTed values.  We take copies of the
49260 +  # variables and quote the copies for generation of the libtool script.
49261 +  for var in echo old_CC old_CFLAGS AR AR_FLAGS AS EGREP RANLIB LN_S LTCC NM \
49262 +    SED SHELL STRIP \
49263 +    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
49264 +    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
49265 +    deplibs_check_method reload_flag reload_cmds need_locks \
49266 +    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
49267 +    lt_cv_sys_global_symbol_to_c_name_address \
49268 +    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
49269 +    old_postinstall_cmds old_postuninstall_cmds \
49270 +    compiler_RC \
49271 +    CC_RC \
49272 +    LD_RC \
49273 +    lt_prog_compiler_wl_RC \
49274 +    lt_prog_compiler_pic_RC \
49275 +    lt_prog_compiler_static_RC \
49276 +    lt_prog_compiler_no_builtin_flag_RC \
49277 +    export_dynamic_flag_spec_RC \
49278 +    thread_safe_flag_spec_RC \
49279 +    whole_archive_flag_spec_RC \
49280 +    enable_shared_with_static_runtimes_RC \
49281 +    old_archive_cmds_RC \
49282 +    old_archive_from_new_cmds_RC \
49283 +    predep_objects_RC \
49284 +    postdep_objects_RC \
49285 +    predeps_RC \
49286 +    postdeps_RC \
49287 +    compiler_lib_search_path_RC \
49288 +    archive_cmds_RC \
49289 +    archive_expsym_cmds_RC \
49290 +    postinstall_cmds_RC \
49291 +    postuninstall_cmds_RC \
49292 +    old_archive_from_expsyms_cmds_RC \
49293 +    allow_undefined_flag_RC \
49294 +    no_undefined_flag_RC \
49295 +    export_symbols_cmds_RC \
49296 +    hardcode_libdir_flag_spec_RC \
49297 +    hardcode_libdir_flag_spec_ld_RC \
49298 +    hardcode_libdir_separator_RC \
49299 +    hardcode_automatic_RC \
49300 +    module_cmds_RC \
49301 +    module_expsym_cmds_RC \
49302 +    lt_cv_prog_compiler_c_o_RC \
49303 +    exclude_expsyms_RC \
49304 +    include_expsyms_RC; do
49305 +
49306 +    case $var in
49307 +    old_archive_cmds_RC | \
49308 +    old_archive_from_new_cmds_RC | \
49309 +    archive_cmds_RC | \
49310 +    archive_expsym_cmds_RC | \
49311 +    module_cmds_RC | \
49312 +    module_expsym_cmds_RC | \
49313 +    old_archive_from_expsyms_cmds_RC | \
49314 +    export_symbols_cmds_RC | \
49315 +    extract_expsyms_cmds | reload_cmds | finish_cmds | \
49316 +    postinstall_cmds | postuninstall_cmds | \
49317 +    old_postinstall_cmds | old_postuninstall_cmds | \
49318 +    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
49319 +      # Double-quote double-evaled strings.
49320 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
49321 +      ;;
49322 +    *)
49323 +      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
49324 +      ;;
49325 +    esac
49326 +  done
49327 +
49328 +  case $lt_echo in
49329 +  *'\$0 --fallback-echo"')
49330 +    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
49331 +    ;;
49332 +  esac
49333 +
49334 +cfgfile="$ofile"
49335 +
49336 +  cat <<__EOF__ >> "$cfgfile"
49337 +# ### BEGIN LIBTOOL TAG CONFIG: $tagname
49338 +
49339 +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
49340 +
49341 +# Shell to use when invoking shell scripts.
49342 +SHELL=$lt_SHELL
49343 +
49344 +# Whether or not to build shared libraries.
49345 +build_libtool_libs=$enable_shared
49346 +
49347 +# Whether or not to build static libraries.
49348 +build_old_libs=$enable_static
49349 +
49350 +# Whether or not to add -lc for building shared libraries.
49351 +build_libtool_need_lc=$archive_cmds_need_lc_RC
49352 +
49353 +# Whether or not to disallow shared libs when runtime libs are static
49354 +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
49355 +
49356 +# Whether or not to optimize for fast installation.
49357 +fast_install=$enable_fast_install
49358 +
49359 +# The host system.
49360 +host_alias=$host_alias
49361 +host=$host
49362 +host_os=$host_os
49363 +
49364 +# The build system.
49365 +build_alias=$build_alias
49366 +build=$build
49367 +build_os=$build_os
49368 +
49369 +# An echo program that does not interpret backslashes.
49370 +echo=$lt_echo
49371 +
49372 +# The archiver.
49373 +AR=$lt_AR
49374 +AR_FLAGS=$lt_AR_FLAGS
49375 +
49376 +# A C compiler.
49377 +LTCC=$lt_LTCC
49378 +
49379 +# A language-specific compiler.
49380 +CC=$lt_compiler_RC
49381 +
49382 +# Is the compiler the GNU C compiler?
49383 +with_gcc=$GCC_RC
49384 +
49385 +# An ERE matcher.
49386 +EGREP=$lt_EGREP
49387 +
49388 +# The linker used to build libraries.
49389 +LD=$lt_LD_RC
49390 +
49391 +# Whether we need hard or soft links.
49392 +LN_S=$lt_LN_S
49393 +
49394 +# A BSD-compatible nm program.
49395 +NM=$lt_NM
49396 +
49397 +# A symbol stripping program
49398 +STRIP=$lt_STRIP
49399 +
49400 +# Used to examine libraries when file_magic_cmd begins "file"
49401 +MAGIC_CMD=$MAGIC_CMD
49402 +
49403 +# Used on cygwin: DLL creation program.
49404 +DLLTOOL="$DLLTOOL"
49405 +
49406 +# Used on cygwin: object dumper.
49407 +OBJDUMP="$OBJDUMP"
49408 +
49409 +# Used on cygwin: assembler.
49410 +AS=$lt_AS
49411 +
49412 +# The name of the directory that contains temporary libtool files.
49413 +objdir=$objdir
49414 +
49415 +# How to create reloadable object files.
49416 +reload_flag=$lt_reload_flag
49417 +reload_cmds=$lt_reload_cmds
49418 +
49419 +# How to pass a linker flag through the compiler.
49420 +wl=$lt_lt_prog_compiler_wl_RC
49421 +
49422 +# Object file suffix (normally "o").
49423 +objext="$ac_objext"
49424 +
49425 +# Old archive suffix (normally "a").
49426 +libext="$libext"
49427 +
49428 +# Shared library suffix (normally ".so").
49429 +shrext_cmds='$shrext_cmds'
49430 +
49431 +# Executable file suffix (normally "").
49432 +exeext="$exeext"
49433 +
49434 +# Additional compiler flags for building library objects.
49435 +pic_flag=$lt_lt_prog_compiler_pic_RC
49436 +pic_mode=$pic_mode
49437 +
49438 +# What is the maximum length of a command?
49439 +max_cmd_len=$lt_cv_sys_max_cmd_len
49440 +
49441 +# Does compiler simultaneously support -c and -o options?
49442 +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
49443 +
49444 +# Must we lock files when doing compilation ?
49445 +need_locks=$lt_need_locks
49446 +
49447 +# Do we need the lib prefix for modules?
49448 +need_lib_prefix=$need_lib_prefix
49449 +
49450 +# Do we need a version for libraries?
49451 +need_version=$need_version
49452 +
49453 +# Whether dlopen is supported.
49454 +dlopen_support=$enable_dlopen
49455 +
49456 +# Whether dlopen of programs is supported.
49457 +dlopen_self=$enable_dlopen_self
49458 +
49459 +# Whether dlopen of statically linked programs is supported.
49460 +dlopen_self_static=$enable_dlopen_self_static
49461 +
49462 +# Compiler flag to prevent dynamic linking.
49463 +link_static_flag=$lt_lt_prog_compiler_static_RC
49464 +
49465 +# Compiler flag to turn off builtin functions.
49466 +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
49467 +
49468 +# Compiler flag to allow reflexive dlopens.
49469 +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
49470 +
49471 +# Compiler flag to generate shared objects directly from archives.
49472 +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
49473 +
49474 +# Compiler flag to generate thread-safe objects.
49475 +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
49476 +
49477 +# Library versioning type.
49478 +version_type=$version_type
49479 +
49480 +# Format of library name prefix.
49481 +libname_spec=$lt_libname_spec
49482 +
49483 +# List of archive names.  First name is the real one, the rest are links.
49484 +# The last name is the one that the linker finds with -lNAME.
49485 +library_names_spec=$lt_library_names_spec
49486 +
49487 +# The coded name of the library, if different from the real name.
49488 +soname_spec=$lt_soname_spec
49489 +
49490 +# Commands used to build and install an old-style archive.
49491 +RANLIB=$lt_RANLIB
49492 +old_archive_cmds=$lt_old_archive_cmds_RC
49493 +old_postinstall_cmds=$lt_old_postinstall_cmds
49494 +old_postuninstall_cmds=$lt_old_postuninstall_cmds
49495 +
49496 +# Create an old-style archive from a shared archive.
49497 +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
49498 +
49499 +# Create a temporary old-style archive to link instead of a shared archive.
49500 +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
49501 +
49502 +# Commands used to build and install a shared archive.
49503 +archive_cmds=$lt_archive_cmds_RC
49504 +archive_expsym_cmds=$lt_archive_expsym_cmds_RC
49505 +postinstall_cmds=$lt_postinstall_cmds
49506 +postuninstall_cmds=$lt_postuninstall_cmds
49507 +
49508 +# Commands used to build a loadable module (assumed same as above if empty)
49509 +module_cmds=$lt_module_cmds_RC
49510 +module_expsym_cmds=$lt_module_expsym_cmds_RC
49511 +
49512 +# Commands to strip libraries.
49513 +old_striplib=$lt_old_striplib
49514 +striplib=$lt_striplib
49515 +
49516 +# Dependencies to place before the objects being linked to create a
49517 +# shared library.
49518 +predep_objects=$lt_predep_objects_RC
49519 +
49520 +# Dependencies to place after the objects being linked to create a
49521 +# shared library.
49522 +postdep_objects=$lt_postdep_objects_RC
49523 +
49524 +# Dependencies to place before the objects being linked to create a
49525 +# shared library.
49526 +predeps=$lt_predeps_RC
49527 +
49528 +# Dependencies to place after the objects being linked to create a
49529 +# shared library.
49530 +postdeps=$lt_postdeps_RC
49531 +
49532 +# The library search path used internally by the compiler when linking
49533 +# a shared library.
49534 +compiler_lib_search_path=$lt_compiler_lib_search_path_RC
49535 +
49536 +# Method to check whether dependent libraries are shared objects.
49537 +deplibs_check_method=$lt_deplibs_check_method
49538 +
49539 +# Command to use when deplibs_check_method == file_magic.
49540 +file_magic_cmd=$lt_file_magic_cmd
49541 +
49542 +# Flag that allows shared libraries with undefined symbols to be built.
49543 +allow_undefined_flag=$lt_allow_undefined_flag_RC
49544 +
49545 +# Flag that forces no undefined symbols.
49546 +no_undefined_flag=$lt_no_undefined_flag_RC
49547 +
49548 +# Commands used to finish a libtool library installation in a directory.
49549 +finish_cmds=$lt_finish_cmds
49550 +
49551 +# Same as above, but a single script fragment to be evaled but not shown.
49552 +finish_eval=$lt_finish_eval
49553 +
49554 +# Take the output of nm and produce a listing of raw symbols and C names.
49555 +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
49556 +
49557 +# Transform the output of nm in a proper C declaration
49558 +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
49559 +
49560 +# Transform the output of nm in a C name address pair
49561 +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
49562 +
49563 +# This is the shared library runtime path variable.
49564 +runpath_var=$runpath_var
49565 +
49566 +# This is the shared library path variable.
49567 +shlibpath_var=$shlibpath_var
49568 +
49569 +# Is shlibpath searched before the hard-coded library search path?
49570 +shlibpath_overrides_runpath=$shlibpath_overrides_runpath
49571 +
49572 +# How to hardcode a shared library path into an executable.
49573 +hardcode_action=$hardcode_action_RC
49574 +
49575 +# Whether we should hardcode library paths into libraries.
49576 +hardcode_into_libs=$hardcode_into_libs
49577 +
49578 +# Flag to hardcode \$libdir into a binary during linking.
49579 +# This must work even if \$libdir does not exist.
49580 +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
49581 +
49582 +# If ld is used when linking, flag to hardcode \$libdir into
49583 +# a binary during linking. This must work even if \$libdir does
49584 +# not exist.
49585 +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
49586 +
49587 +# Whether we need a single -rpath flag with a separated argument.
49588 +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
49589 +
49590 +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
49591 +# resulting binary.
49592 +hardcode_direct=$hardcode_direct_RC
49593 +
49594 +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
49595 +# resulting binary.
49596 +hardcode_minus_L=$hardcode_minus_L_RC
49597 +
49598 +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
49599 +# the resulting binary.
49600 +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
49601 +
49602 +# Set to yes if building a shared library automatically hardcodes DIR into the library
49603 +# and all subsequent libraries and executables linked against it.
49604 +hardcode_automatic=$hardcode_automatic_RC
49605 +
49606 +# Variables whose values should be saved in libtool wrapper scripts and
49607 +# restored at relink time.
49608 +variables_saved_for_relink="$variables_saved_for_relink"
49609 +
49610 +# Whether libtool must link a program against all its dependency libraries.
49611 +link_all_deplibs=$link_all_deplibs_RC
49612 +
49613 +# Compile-time system search path for libraries
49614 +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
49615 +
49616 +# Run-time system search path for libraries
49617 +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
49618 +
49619 +# Fix the shell variable \$srcfile for the compiler.
49620 +fix_srcfile_path="$fix_srcfile_path_RC"
49621 +
49622 +# Set to yes if exported symbols are required.
49623 +always_export_symbols=$always_export_symbols_RC
49624 +
49625 +# The commands to list exported symbols.
49626 +export_symbols_cmds=$lt_export_symbols_cmds_RC
49627 +
49628 +# The commands to extract the exported symbol list from a shared archive.
49629 +extract_expsyms_cmds=$lt_extract_expsyms_cmds
49630 +
49631 +# Symbols that should not be listed in the preloaded symbols.
49632 +exclude_expsyms=$lt_exclude_expsyms_RC
49633 +
49634 +# Symbols that must always be exported.
49635 +include_expsyms=$lt_include_expsyms_RC
49636 +
49637 +# ### END LIBTOOL TAG CONFIG: $tagname
49638 +
49639 +__EOF__
49640 +
49641 +
49642 +else
49643 +  # If there is no Makefile yet, we rely on a make rule to execute
49644 +  # `config.status --recheck' to rerun these tests and create the
49645 +  # libtool script then.
49646 +  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
49647 +  if test -f "$ltmain_in"; then
49648 +    test -f Makefile && make "$ltmain"
49649 +  fi
49650 +fi
49651 +
49652 +
49653 +ac_ext=c
49654 +ac_cpp='$CPP $CPPFLAGS'
49655 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49656 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49657 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
49658 +
49659 +CC="$lt_save_CC"
49660 +
49661 +       ;;
49662 +
49663 +      *)
49664 +       { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
49665 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
49666 +   { (exit 1); exit 1; }; }
49667 +       ;;
49668 +      esac
49669 +
49670 +      # Append the new tag name to the list of available tags.
49671 +      if test -n "$tagname" ; then
49672 +      available_tags="$available_tags $tagname"
49673 +    fi
49674 +    fi
49675 +  done
49676 +  IFS="$lt_save_ifs"
49677 +
49678 +  # Now substitute the updated list of available tags.
49679 +  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
49680 +    mv "${ofile}T" "$ofile"
49681 +    chmod +x "$ofile"
49682 +  else
49683 +    rm -f "${ofile}T"
49684 +    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
49685 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
49686 +   { (exit 1); exit 1; }; }
49687 +  fi
49688 +fi
49689 +
49690 +
49691 +
49692 +# This can be used to rebuild libtool when needed
49693 +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
49694 +
49695 +# Always use our own libtool.
49696 +LIBTOOL='$(SHELL) $(top_builddir)/libtool'
49697 +
49698 +# Prevent multiple expansion
49699 +
49700 +
49701 +
49702 +
49703 +
49704 +
49705 +
49706 +
49707 +
49708 +
49709 +
49710 +
49711 +
49712 +
49713 +
49714 +
49715 +
49716 +
49717 +
49718 +
49719 +
49720 +
49721 +
49722 +
49723 +# Check whether --with-rtsig or --without-rtsig was given.
49724 +if test "${with_rtsig+set}" = set; then
49725 +  withval="$with_rtsig"
49726 +  usertsig=yes
49727 +else
49728 +  usertsig=no
49729 +fi;
49730 +
49731 +
49732 +echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
49733 +echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
49734 +if test "${ac_cv_lib_socket_socket+set}" = set; then
49735 +  echo $ECHO_N "(cached) $ECHO_C" >&6
49736 +else
49737 +  ac_check_lib_save_LIBS=$LIBS
49738 +LIBS="-lsocket  $LIBS"
49739 +cat >conftest.$ac_ext <<_ACEOF
49740 +/* confdefs.h.  */
49741 +_ACEOF
49742 +cat confdefs.h >>conftest.$ac_ext
49743 +cat >>conftest.$ac_ext <<_ACEOF
49744 +/* end confdefs.h.  */
49745 +
49746 +/* Override any gcc2 internal prototype to avoid an error.  */
49747 +#ifdef __cplusplus
49748 +extern "C"
49749 +#endif
49750 +/* We use char because int might match the return type of a gcc2
49751 +   builtin and then its argument prototype would still apply.  */
49752 +char socket ();
49753 +int
49754 +main ()
49755 +{
49756 +socket ();
49757 +  ;
49758 +  return 0;
49759 +}
49760 +_ACEOF
49761 +rm -f conftest.$ac_objext conftest$ac_exeext
49762 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
49763 +  (eval $ac_link) 2>conftest.er1
49764 +  ac_status=$?
49765 +  grep -v '^ *+' conftest.er1 >conftest.err
49766 +  rm -f conftest.er1
49767 +  cat conftest.err >&5
49768 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
49769 +  (exit $ac_status); } &&
49770 +        { ac_try='test -z "$ac_c_werror_flag"
49771 +                        || test ! -s conftest.err'
49772 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
49773 +  (eval $ac_try) 2>&5
49774 +  ac_status=$?
49775 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
49776 +  (exit $ac_status); }; } &&
49777 +        { ac_try='test -s conftest$ac_exeext'
49778 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
49779 +  (eval $ac_try) 2>&5
49780 +  ac_status=$?
49781 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
49782 +  (exit $ac_status); }; }; then
49783 +  ac_cv_lib_socket_socket=yes
49784 +else
49785 +  echo "$as_me: failed program was:" >&5
49786 +sed 's/^/| /' conftest.$ac_ext >&5
49787 +
49788 +ac_cv_lib_socket_socket=no
49789 +fi
49790 +rm -f conftest.err conftest.$ac_objext \
49791 +      conftest$ac_exeext conftest.$ac_ext
49792 +LIBS=$ac_check_lib_save_LIBS
49793 +fi
49794 +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
49795 +echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
49796 +if test $ac_cv_lib_socket_socket = yes; then
49797 +  cat >>confdefs.h <<_ACEOF
49798 +#define HAVE_LIBSOCKET 1
49799 +_ACEOF
49800 +
49801 +  LIBS="-lsocket $LIBS"
49802 +
49803 +fi
49804 +
49805 +
49806 +echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
49807 +echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
49808 +if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
49809 +  echo $ECHO_N "(cached) $ECHO_C" >&6
49810 +else
49811 +  ac_check_lib_save_LIBS=$LIBS
49812 +LIBS="-lresolv  $LIBS"
49813 +cat >conftest.$ac_ext <<_ACEOF
49814 +/* confdefs.h.  */
49815 +_ACEOF
49816 +cat confdefs.h >>conftest.$ac_ext
49817 +cat >>conftest.$ac_ext <<_ACEOF
49818 +/* end confdefs.h.  */
49819 +
49820 +/* Override any gcc2 internal prototype to avoid an error.  */
49821 +#ifdef __cplusplus
49822 +extern "C"
49823 +#endif
49824 +/* We use char because int might match the return type of a gcc2
49825 +   builtin and then its argument prototype would still apply.  */
49826 +char inet_aton ();
49827 +int
49828 +main ()
49829 +{
49830 +inet_aton ();
49831 +  ;
49832 +  return 0;
49833 +}
49834 +_ACEOF
49835 +rm -f conftest.$ac_objext conftest$ac_exeext
49836 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
49837 +  (eval $ac_link) 2>conftest.er1
49838 +  ac_status=$?
49839 +  grep -v '^ *+' conftest.er1 >conftest.err
49840 +  rm -f conftest.er1
49841 +  cat conftest.err >&5
49842 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
49843 +  (exit $ac_status); } &&
49844 +        { ac_try='test -z "$ac_c_werror_flag"
49845 +                        || test ! -s conftest.err'
49846 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
49847 +  (eval $ac_try) 2>&5
49848 +  ac_status=$?
49849 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
49850 +  (exit $ac_status); }; } &&
49851 +        { ac_try='test -s conftest$ac_exeext'
49852 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
49853 +  (eval $ac_try) 2>&5
49854 +  ac_status=$?
49855 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
49856 +  (exit $ac_status); }; }; then
49857 +  ac_cv_lib_resolv_inet_aton=yes
49858 +else
49859 +  echo "$as_me: failed program was:" >&5
49860 +sed 's/^/| /' conftest.$ac_ext >&5
49861 +
49862 +ac_cv_lib_resolv_inet_aton=no
49863 +fi
49864 +rm -f conftest.err conftest.$ac_objext \
49865 +      conftest$ac_exeext conftest.$ac_ext
49866 +LIBS=$ac_check_lib_save_LIBS
49867 +fi
49868 +echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
49869 +echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
49870 +if test $ac_cv_lib_resolv_inet_aton = yes; then
49871 +  cat >>confdefs.h <<_ACEOF
49872 +#define HAVE_LIBRESOLV 1
49873 +_ACEOF
49874 +
49875 +  LIBS="-lresolv $LIBS"
49876 +
49877 +fi
49878 +
49879 +
49880 +echo "$as_me:$LINENO: checking for ANSI C header files" >&5
49881 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
49882 +if test "${ac_cv_header_stdc+set}" = set; then
49883 +  echo $ECHO_N "(cached) $ECHO_C" >&6
49884 +else
49885 +  cat >conftest.$ac_ext <<_ACEOF
49886 +/* confdefs.h.  */
49887 +_ACEOF
49888 +cat confdefs.h >>conftest.$ac_ext
49889 +cat >>conftest.$ac_ext <<_ACEOF
49890 +/* end confdefs.h.  */
49891 +#include <stdlib.h>
49892 +#include <stdarg.h>
49893 +#include <string.h>
49894 +#include <float.h>
49895 +
49896 +int
49897 +main ()
49898 +{
49899 +
49900 +  ;
49901 +  return 0;
49902 +}
49903 +_ACEOF
49904 +rm -f conftest.$ac_objext
49905 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
49906 +  (eval $ac_compile) 2>conftest.er1
49907 +  ac_status=$?
49908 +  grep -v '^ *+' conftest.er1 >conftest.err
49909 +  rm -f conftest.er1
49910 +  cat conftest.err >&5
49911 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
49912 +  (exit $ac_status); } &&
49913 +        { ac_try='test -z "$ac_c_werror_flag"
49914 +                        || test ! -s conftest.err'
49915 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
49916 +  (eval $ac_try) 2>&5
49917 +  ac_status=$?
49918 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
49919 +  (exit $ac_status); }; } &&
49920 +        { ac_try='test -s conftest.$ac_objext'
49921 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
49922 +  (eval $ac_try) 2>&5
49923 +  ac_status=$?
49924 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
49925 +  (exit $ac_status); }; }; then
49926 +  ac_cv_header_stdc=yes
49927 +else
49928 +  echo "$as_me: failed program was:" >&5
49929 +sed 's/^/| /' conftest.$ac_ext >&5
49930 +
49931 +ac_cv_header_stdc=no
49932 +fi
49933 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
49934 +
49935 +if test $ac_cv_header_stdc = yes; then
49936 +  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49937 +  cat >conftest.$ac_ext <<_ACEOF
49938 +/* confdefs.h.  */
49939 +_ACEOF
49940 +cat confdefs.h >>conftest.$ac_ext
49941 +cat >>conftest.$ac_ext <<_ACEOF
49942 +/* end confdefs.h.  */
49943 +#include <string.h>
49944 +
49945 +_ACEOF
49946 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49947 +  $EGREP "memchr" >/dev/null 2>&1; then
49948 +  :
49949 +else
49950 +  ac_cv_header_stdc=no
49951 +fi
49952 +rm -f conftest*
49953 +
49954 +fi
49955 +
49956 +if test $ac_cv_header_stdc = yes; then
49957 +  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49958 +  cat >conftest.$ac_ext <<_ACEOF
49959 +/* confdefs.h.  */
49960 +_ACEOF
49961 +cat confdefs.h >>conftest.$ac_ext
49962 +cat >>conftest.$ac_ext <<_ACEOF
49963 +/* end confdefs.h.  */
49964 +#include <stdlib.h>
49965 +
49966 +_ACEOF
49967 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49968 +  $EGREP "free" >/dev/null 2>&1; then
49969 +  :
49970 +else
49971 +  ac_cv_header_stdc=no
49972 +fi
49973 +rm -f conftest*
49974 +
49975 +fi
49976 +
49977 +if test $ac_cv_header_stdc = yes; then
49978 +  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49979 +  if test "$cross_compiling" = yes; then
49980 +  :
49981 +else
49982 +  cat >conftest.$ac_ext <<_ACEOF
49983 +/* confdefs.h.  */
49984 +_ACEOF
49985 +cat confdefs.h >>conftest.$ac_ext
49986 +cat >>conftest.$ac_ext <<_ACEOF
49987 +/* end confdefs.h.  */
49988 +#include <ctype.h>
49989 +#if ((' ' & 0x0FF) == 0x020)
49990 +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49991 +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49992 +#else
49993 +# define ISLOWER(c) \
49994 +                  (('a' <= (c) && (c) <= 'i') \
49995 +                    || ('j' <= (c) && (c) <= 'r') \
49996 +                    || ('s' <= (c) && (c) <= 'z'))
49997 +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49998 +#endif
49999 +
50000 +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
50001 +int
50002 +main ()
50003 +{
50004 +  int i;
50005 +  for (i = 0; i < 256; i++)
50006 +    if (XOR (islower (i), ISLOWER (i))
50007 +       || toupper (i) != TOUPPER (i))
50008 +      exit(2);
50009 +  exit (0);
50010 +}
50011 +_ACEOF
50012 +rm -f conftest$ac_exeext
50013 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
50014 +  (eval $ac_link) 2>&5
50015 +  ac_status=$?
50016 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50017 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
50018 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50019 +  (eval $ac_try) 2>&5
50020 +  ac_status=$?
50021 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50022 +  (exit $ac_status); }; }; then
50023 +  :
50024 +else
50025 +  echo "$as_me: program exited with status $ac_status" >&5
50026 +echo "$as_me: failed program was:" >&5
50027 +sed 's/^/| /' conftest.$ac_ext >&5
50028 +
50029 +( exit $ac_status )
50030 +ac_cv_header_stdc=no
50031 +fi
50032 +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
50033 +fi
50034 +fi
50035 +fi
50036 +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
50037 +echo "${ECHO_T}$ac_cv_header_stdc" >&6
50038 +if test $ac_cv_header_stdc = yes; then
50039 +
50040 +cat >>confdefs.h <<\_ACEOF
50041 +#define STDC_HEADERS 1
50042 +_ACEOF
50043 +
50044 +fi
50045 +
50046 +
50047 +
50048 +
50049 +
50050 +
50051 +
50052 +
50053 +
50054 +
50055 +
50056 +
50057 +
50058 +
50059 +
50060 +
50061 +for ac_header in fcntl.h stdarg.h inttypes.h stdint.h poll.h signal.h unistd.h sys/epoll.h sys/time.h sys/queue.h sys/event.h sys/ioctl.h sys/devpoll.h port.h netinet/in6.h
50062 +do
50063 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
50064 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
50065 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
50066 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
50067 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
50068 +  echo $ECHO_N "(cached) $ECHO_C" >&6
50069 +fi
50070 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
50071 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
50072 +else
50073 +  # Is the header compilable?
50074 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
50075 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
50076 +cat >conftest.$ac_ext <<_ACEOF
50077 +/* confdefs.h.  */
50078 +_ACEOF
50079 +cat confdefs.h >>conftest.$ac_ext
50080 +cat >>conftest.$ac_ext <<_ACEOF
50081 +/* end confdefs.h.  */
50082 +$ac_includes_default
50083 +#include <$ac_header>
50084 +_ACEOF
50085 +rm -f conftest.$ac_objext
50086 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
50087 +  (eval $ac_compile) 2>conftest.er1
50088 +  ac_status=$?
50089 +  grep -v '^ *+' conftest.er1 >conftest.err
50090 +  rm -f conftest.er1
50091 +  cat conftest.err >&5
50092 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50093 +  (exit $ac_status); } &&
50094 +        { ac_try='test -z "$ac_c_werror_flag"
50095 +                        || test ! -s conftest.err'
50096 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50097 +  (eval $ac_try) 2>&5
50098 +  ac_status=$?
50099 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50100 +  (exit $ac_status); }; } &&
50101 +        { ac_try='test -s conftest.$ac_objext'
50102 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50103 +  (eval $ac_try) 2>&5
50104 +  ac_status=$?
50105 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50106 +  (exit $ac_status); }; }; then
50107 +  ac_header_compiler=yes
50108 +else
50109 +  echo "$as_me: failed program was:" >&5
50110 +sed 's/^/| /' conftest.$ac_ext >&5
50111 +
50112 +ac_header_compiler=no
50113 +fi
50114 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
50115 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
50116 +echo "${ECHO_T}$ac_header_compiler" >&6
50117 +
50118 +# Is the header present?
50119 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
50120 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
50121 +cat >conftest.$ac_ext <<_ACEOF
50122 +/* confdefs.h.  */
50123 +_ACEOF
50124 +cat confdefs.h >>conftest.$ac_ext
50125 +cat >>conftest.$ac_ext <<_ACEOF
50126 +/* end confdefs.h.  */
50127 +#include <$ac_header>
50128 +_ACEOF
50129 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
50130 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
50131 +  ac_status=$?
50132 +  grep -v '^ *+' conftest.er1 >conftest.err
50133 +  rm -f conftest.er1
50134 +  cat conftest.err >&5
50135 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50136 +  (exit $ac_status); } >/dev/null; then
50137 +  if test -s conftest.err; then
50138 +    ac_cpp_err=$ac_c_preproc_warn_flag
50139 +    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
50140 +  else
50141 +    ac_cpp_err=
50142 +  fi
50143 +else
50144 +  ac_cpp_err=yes
50145 +fi
50146 +if test -z "$ac_cpp_err"; then
50147 +  ac_header_preproc=yes
50148 +else
50149 +  echo "$as_me: failed program was:" >&5
50150 +sed 's/^/| /' conftest.$ac_ext >&5
50151 +
50152 +  ac_header_preproc=no
50153 +fi
50154 +rm -f conftest.err conftest.$ac_ext
50155 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
50156 +echo "${ECHO_T}$ac_header_preproc" >&6
50157 +
50158 +# So?  What about this header?
50159 +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
50160 +  yes:no: )
50161 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
50162 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
50163 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
50164 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
50165 +    ac_header_preproc=yes
50166 +    ;;
50167 +  no:yes:* )
50168 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
50169 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
50170 +    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
50171 +echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
50172 +    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
50173 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
50174 +    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
50175 +echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
50176 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
50177 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
50178 +    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
50179 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
50180 +    (
50181 +      cat <<\_ASBOX
50182 +## ------------------------------------------ ##
50183 +## Report this to the AC_PACKAGE_NAME lists.  ##
50184 +## ------------------------------------------ ##
50185 +_ASBOX
50186 +    ) |
50187 +      sed "s/^/$as_me: WARNING:     /" >&2
50188 +    ;;
50189 +esac
50190 +echo "$as_me:$LINENO: checking for $ac_header" >&5
50191 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
50192 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
50193 +  echo $ECHO_N "(cached) $ECHO_C" >&6
50194 +else
50195 +  eval "$as_ac_Header=\$ac_header_preproc"
50196 +fi
50197 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
50198 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
50199 +
50200 +fi
50201 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
50202 +  cat >>confdefs.h <<_ACEOF
50203 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
50204 +_ACEOF
50205 +
50206 +fi
50207 +
50208 +done
50209 +
50210 +if test "x$ac_cv_header_sys_queue_h" = "xyes"; then
50211 +       echo "$as_me:$LINENO: checking for TAILQ_FOREACH in sys/queue.h" >&5
50212 +echo $ECHO_N "checking for TAILQ_FOREACH in sys/queue.h... $ECHO_C" >&6
50213 +       cat >conftest.$ac_ext <<_ACEOF
50214 +/* confdefs.h.  */
50215 +_ACEOF
50216 +cat confdefs.h >>conftest.$ac_ext
50217 +cat >>conftest.$ac_ext <<_ACEOF
50218 +/* end confdefs.h.  */
50219 +
50220 +#include <sys/queue.h>
50221 +#ifdef TAILQ_FOREACH
50222 + yes
50223 +#endif
50224 +
50225 +_ACEOF
50226 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50227 +  $EGREP "yes" >/dev/null 2>&1; then
50228 +  echo "$as_me:$LINENO: result: yes" >&5
50229 +echo "${ECHO_T}yes" >&6
50230 +
50231 +cat >>confdefs.h <<\_ACEOF
50232 +#define HAVE_TAILQFOREACH 1
50233 +_ACEOF
50234 +
50235 +else
50236 +  echo "$as_me:$LINENO: result: no" >&5
50237 +echo "${ECHO_T}no" >&6
50238 +
50239 +fi
50240 +rm -f conftest*
50241 +
50242 +fi
50243 +
50244 +if test "x$ac_cv_header_sys_time_h" = "xyes"; then
50245 +       echo "$as_me:$LINENO: checking for timeradd in sys/time.h" >&5
50246 +echo $ECHO_N "checking for timeradd in sys/time.h... $ECHO_C" >&6
50247 +       cat >conftest.$ac_ext <<_ACEOF
50248 +/* confdefs.h.  */
50249 +_ACEOF
50250 +cat confdefs.h >>conftest.$ac_ext
50251 +cat >>conftest.$ac_ext <<_ACEOF
50252 +/* end confdefs.h.  */
50253 +
50254 +#include <sys/time.h>
50255 +#ifdef timeradd
50256 + yes
50257 +#endif
50258 +
50259 +_ACEOF
50260 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50261 +  $EGREP "yes" >/dev/null 2>&1; then
50262 +
50263 +cat >>confdefs.h <<\_ACEOF
50264 +#define HAVE_TIMERADD 1
50265 +_ACEOF
50266 +
50267 +         echo "$as_me:$LINENO: result: yes" >&5
50268 +echo "${ECHO_T}yes" >&6
50269 +else
50270 +  echo "$as_me:$LINENO: result: no" >&5
50271 +echo "${ECHO_T}no" >&6
50272 +
50273 +fi
50274 +rm -f conftest*
50275 +
50276 +fi
50277 +
50278 +if test "x$ac_cv_header_sys_time_h" = "xyes"; then
50279 +       echo "$as_me:$LINENO: checking for timercmp in sys/time.h" >&5
50280 +echo $ECHO_N "checking for timercmp in sys/time.h... $ECHO_C" >&6
50281 +       cat >conftest.$ac_ext <<_ACEOF
50282 +/* confdefs.h.  */
50283 +_ACEOF
50284 +cat confdefs.h >>conftest.$ac_ext
50285 +cat >>conftest.$ac_ext <<_ACEOF
50286 +/* end confdefs.h.  */
50287 +
50288 +#include <sys/time.h>
50289 +#ifdef timercmp
50290 + yes
50291 +#endif
50292 +
50293 +_ACEOF
50294 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50295 +  $EGREP "yes" >/dev/null 2>&1; then
50296 +
50297 +cat >>confdefs.h <<\_ACEOF
50298 +#define HAVE_TIMERCMP 1
50299 +_ACEOF
50300 +
50301 +         echo "$as_me:$LINENO: result: yes" >&5
50302 +echo "${ECHO_T}yes" >&6
50303 +else
50304 +  echo "$as_me:$LINENO: result: no" >&5
50305 +echo "${ECHO_T}no" >&6
50306 +
50307 +fi
50308 +rm -f conftest*
50309 +
50310 +fi
50311 +
50312 +if test "x$ac_cv_header_sys_time_h" = "xyes"; then
50313 +       echo "$as_me:$LINENO: checking for timerclear in sys/time.h" >&5
50314 +echo $ECHO_N "checking for timerclear in sys/time.h... $ECHO_C" >&6
50315 +       cat >conftest.$ac_ext <<_ACEOF
50316 +/* confdefs.h.  */
50317 +_ACEOF
50318 +cat confdefs.h >>conftest.$ac_ext
50319 +cat >>conftest.$ac_ext <<_ACEOF
50320 +/* end confdefs.h.  */
50321 +
50322 +#include <sys/time.h>
50323 +#ifdef timerclear
50324 + yes
50325 +#endif
50326 +
50327 +_ACEOF
50328 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50329 +  $EGREP "yes" >/dev/null 2>&1; then
50330 +
50331 +cat >>confdefs.h <<\_ACEOF
50332 +#define HAVE_TIMERCLEAR 1
50333 +_ACEOF
50334 +
50335 +         echo "$as_me:$LINENO: result: yes" >&5
50336 +echo "${ECHO_T}yes" >&6
50337 +else
50338 +  echo "$as_me:$LINENO: result: no" >&5
50339 +echo "${ECHO_T}no" >&6
50340 +
50341 +fi
50342 +rm -f conftest*
50343 +
50344 +fi
50345 +
50346 +if test "x$ac_cv_header_sys_time_h" = "xyes"; then
50347 +       echo "$as_me:$LINENO: checking for timerisset in sys/time.h" >&5
50348 +echo $ECHO_N "checking for timerisset in sys/time.h... $ECHO_C" >&6
50349 +       cat >conftest.$ac_ext <<_ACEOF
50350 +/* confdefs.h.  */
50351 +_ACEOF
50352 +cat confdefs.h >>conftest.$ac_ext
50353 +cat >>conftest.$ac_ext <<_ACEOF
50354 +/* end confdefs.h.  */
50355 +
50356 +#include <sys/time.h>
50357 +#ifdef timerisset
50358 + yes
50359 +#endif
50360 +
50361 +_ACEOF
50362 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50363 +  $EGREP "yes" >/dev/null 2>&1; then
50364 +
50365 +cat >>confdefs.h <<\_ACEOF
50366 +#define HAVE_TIMERISSET 1
50367 +_ACEOF
50368 +
50369 +         echo "$as_me:$LINENO: result: yes" >&5
50370 +echo "${ECHO_T}yes" >&6
50371 +else
50372 +  echo "$as_me:$LINENO: result: no" >&5
50373 +echo "${ECHO_T}no" >&6
50374 +
50375 +fi
50376 +rm -f conftest*
50377 +
50378 +fi
50379 +
50380 +echo "$as_me:$LINENO: checking for WIN32" >&5
50381 +echo $ECHO_N "checking for WIN32... $ECHO_C" >&6
50382 +cat >conftest.$ac_ext <<_ACEOF
50383 +/* confdefs.h.  */
50384 +_ACEOF
50385 +cat confdefs.h >>conftest.$ac_ext
50386 +cat >>conftest.$ac_ext <<_ACEOF
50387 +/* end confdefs.h.  */
50388 +
50389 +int
50390 +main ()
50391 +{
50392 +
50393 +       #ifndef WIN32
50394 +       #error
50395 +       #endif
50396 +
50397 +  ;
50398 +  return 0;
50399 +}
50400 +_ACEOF
50401 +rm -f conftest.$ac_objext
50402 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
50403 +  (eval $ac_compile) 2>conftest.er1
50404 +  ac_status=$?
50405 +  grep -v '^ *+' conftest.er1 >conftest.err
50406 +  rm -f conftest.er1
50407 +  cat conftest.err >&5
50408 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50409 +  (exit $ac_status); } &&
50410 +        { ac_try='test -z "$ac_c_werror_flag"
50411 +                        || test ! -s conftest.err'
50412 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50413 +  (eval $ac_try) 2>&5
50414 +  ac_status=$?
50415 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50416 +  (exit $ac_status); }; } &&
50417 +        { ac_try='test -s conftest.$ac_objext'
50418 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50419 +  (eval $ac_try) 2>&5
50420 +  ac_status=$?
50421 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50422 +  (exit $ac_status); }; }; then
50423 +  bwin32=true; echo "$as_me:$LINENO: result: yes" >&5
50424 +echo "${ECHO_T}yes" >&6
50425 +else
50426 +  echo "$as_me: failed program was:" >&5
50427 +sed 's/^/| /' conftest.$ac_ext >&5
50428 +
50429 +bwin32=false; echo "$as_me:$LINENO: result: no" >&5
50430 +echo "${ECHO_T}no" >&6
50431 +fi
50432 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
50433 +
50434 +
50435 +
50436 +if test x$bwin32 = xtrue; then
50437 +  BUILD_WIN32_TRUE=
50438 +  BUILD_WIN32_FALSE='#'
50439 +else
50440 +  BUILD_WIN32_TRUE='#'
50441 +  BUILD_WIN32_FALSE=
50442 +fi
50443 +
50444 +
50445 +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
50446 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
50447 +if test "${ac_cv_c_const+set}" = set; then
50448 +  echo $ECHO_N "(cached) $ECHO_C" >&6
50449 +else
50450 +  cat >conftest.$ac_ext <<_ACEOF
50451 +/* confdefs.h.  */
50452 +_ACEOF
50453 +cat confdefs.h >>conftest.$ac_ext
50454 +cat >>conftest.$ac_ext <<_ACEOF
50455 +/* end confdefs.h.  */
50456 +
50457 +int
50458 +main ()
50459 +{
50460 +/* FIXME: Include the comments suggested by Paul. */
50461 +#ifndef __cplusplus
50462 +  /* Ultrix mips cc rejects this.  */
50463 +  typedef int charset[2];
50464 +  const charset x;
50465 +  /* SunOS 4.1.1 cc rejects this.  */
50466 +  char const *const *ccp;
50467 +  char **p;
50468 +  /* NEC SVR4.0.2 mips cc rejects this.  */
50469 +  struct point {int x, y;};
50470 +  static struct point const zero = {0,0};
50471 +  /* AIX XL C 1.02.0.0 rejects this.
50472 +     It does not let you subtract one const X* pointer from another in
50473 +     an arm of an if-expression whose if-part is not a constant
50474 +     expression */
50475 +  const char *g = "string";
50476 +  ccp = &g + (g ? g-g : 0);
50477 +  /* HPUX 7.0 cc rejects these. */
50478 +  ++ccp;
50479 +  p = (char**) ccp;
50480 +  ccp = (char const *const *) p;
50481 +  { /* SCO 3.2v4 cc rejects this.  */
50482 +    char *t;
50483 +    char const *s = 0 ? (char *) 0 : (char const *) 0;
50484 +
50485 +    *t++ = 0;
50486 +  }
50487 +  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
50488 +    int x[] = {25, 17};
50489 +    const int *foo = &x[0];
50490 +    ++foo;
50491 +  }
50492 +  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
50493 +    typedef const int *iptr;
50494 +    iptr p = 0;
50495 +    ++p;
50496 +  }
50497 +  { /* AIX XL C 1.02.0.0 rejects this saying
50498 +       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
50499 +    struct s { int j; const int *ap[3]; };
50500 +    struct s *b; b->j = 5;
50501 +  }
50502 +  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
50503 +    const int foo = 10;
50504 +  }
50505 +#endif
50506 +
50507 +  ;
50508 +  return 0;
50509 +}
50510 +_ACEOF
50511 +rm -f conftest.$ac_objext
50512 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
50513 +  (eval $ac_compile) 2>conftest.er1
50514 +  ac_status=$?
50515 +  grep -v '^ *+' conftest.er1 >conftest.err
50516 +  rm -f conftest.er1
50517 +  cat conftest.err >&5
50518 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50519 +  (exit $ac_status); } &&
50520 +        { ac_try='test -z "$ac_c_werror_flag"
50521 +                        || test ! -s conftest.err'
50522 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50523 +  (eval $ac_try) 2>&5
50524 +  ac_status=$?
50525 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50526 +  (exit $ac_status); }; } &&
50527 +        { ac_try='test -s conftest.$ac_objext'
50528 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50529 +  (eval $ac_try) 2>&5
50530 +  ac_status=$?
50531 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50532 +  (exit $ac_status); }; }; then
50533 +  ac_cv_c_const=yes
50534 +else
50535 +  echo "$as_me: failed program was:" >&5
50536 +sed 's/^/| /' conftest.$ac_ext >&5
50537 +
50538 +ac_cv_c_const=no
50539 +fi
50540 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
50541 +fi
50542 +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
50543 +echo "${ECHO_T}$ac_cv_c_const" >&6
50544 +if test $ac_cv_c_const = no; then
50545 +
50546 +cat >>confdefs.h <<\_ACEOF
50547 +#define const
50548 +_ACEOF
50549 +
50550 +fi
50551 +
50552 +echo "$as_me:$LINENO: checking for inline" >&5
50553 +echo $ECHO_N "checking for inline... $ECHO_C" >&6
50554 +if test "${ac_cv_c_inline+set}" = set; then
50555 +  echo $ECHO_N "(cached) $ECHO_C" >&6
50556 +else
50557 +  ac_cv_c_inline=no
50558 +for ac_kw in inline __inline__ __inline; do
50559 +  cat >conftest.$ac_ext <<_ACEOF
50560 +/* confdefs.h.  */
50561 +_ACEOF
50562 +cat confdefs.h >>conftest.$ac_ext
50563 +cat >>conftest.$ac_ext <<_ACEOF
50564 +/* end confdefs.h.  */
50565 +#ifndef __cplusplus
50566 +typedef int foo_t;
50567 +static $ac_kw foo_t static_foo () {return 0; }
50568 +$ac_kw foo_t foo () {return 0; }
50569 +#endif
50570 +
50571 +_ACEOF
50572 +rm -f conftest.$ac_objext
50573 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
50574 +  (eval $ac_compile) 2>conftest.er1
50575 +  ac_status=$?
50576 +  grep -v '^ *+' conftest.er1 >conftest.err
50577 +  rm -f conftest.er1
50578 +  cat conftest.err >&5
50579 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50580 +  (exit $ac_status); } &&
50581 +        { ac_try='test -z "$ac_c_werror_flag"
50582 +                        || test ! -s conftest.err'
50583 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50584 +  (eval $ac_try) 2>&5
50585 +  ac_status=$?
50586 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50587 +  (exit $ac_status); }; } &&
50588 +        { ac_try='test -s conftest.$ac_objext'
50589 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50590 +  (eval $ac_try) 2>&5
50591 +  ac_status=$?
50592 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50593 +  (exit $ac_status); }; }; then
50594 +  ac_cv_c_inline=$ac_kw; break
50595 +else
50596 +  echo "$as_me: failed program was:" >&5
50597 +sed 's/^/| /' conftest.$ac_ext >&5
50598 +
50599 +fi
50600 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
50601 +done
50602 +
50603 +fi
50604 +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
50605 +echo "${ECHO_T}$ac_cv_c_inline" >&6
50606 +
50607 +
50608 +case $ac_cv_c_inline in
50609 +  inline | yes) ;;
50610 +  *)
50611 +    case $ac_cv_c_inline in
50612 +      no) ac_val=;;
50613 +      *) ac_val=$ac_cv_c_inline;;
50614 +    esac
50615 +    cat >>confdefs.h <<_ACEOF
50616 +#ifndef __cplusplus
50617 +#define inline $ac_val
50618 +#endif
50619 +_ACEOF
50620 +    ;;
50621 +esac
50622 +
50623 +echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
50624 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
50625 +if test "${ac_cv_header_time+set}" = set; then
50626 +  echo $ECHO_N "(cached) $ECHO_C" >&6
50627 +else
50628 +  cat >conftest.$ac_ext <<_ACEOF
50629 +/* confdefs.h.  */
50630 +_ACEOF
50631 +cat confdefs.h >>conftest.$ac_ext
50632 +cat >>conftest.$ac_ext <<_ACEOF
50633 +/* end confdefs.h.  */
50634 +#include <sys/types.h>
50635 +#include <sys/time.h>
50636 +#include <time.h>
50637 +
50638 +int
50639 +main ()
50640 +{
50641 +if ((struct tm *) 0)
50642 +return 0;
50643 +  ;
50644 +  return 0;
50645 +}
50646 +_ACEOF
50647 +rm -f conftest.$ac_objext
50648 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
50649 +  (eval $ac_compile) 2>conftest.er1
50650 +  ac_status=$?
50651 +  grep -v '^ *+' conftest.er1 >conftest.err
50652 +  rm -f conftest.er1
50653 +  cat conftest.err >&5
50654 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50655 +  (exit $ac_status); } &&
50656 +        { ac_try='test -z "$ac_c_werror_flag"
50657 +                        || test ! -s conftest.err'
50658 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50659 +  (eval $ac_try) 2>&5
50660 +  ac_status=$?
50661 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50662 +  (exit $ac_status); }; } &&
50663 +        { ac_try='test -s conftest.$ac_objext'
50664 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50665 +  (eval $ac_try) 2>&5
50666 +  ac_status=$?
50667 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50668 +  (exit $ac_status); }; }; then
50669 +  ac_cv_header_time=yes
50670 +else
50671 +  echo "$as_me: failed program was:" >&5
50672 +sed 's/^/| /' conftest.$ac_ext >&5
50673 +
50674 +ac_cv_header_time=no
50675 +fi
50676 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
50677 +fi
50678 +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
50679 +echo "${ECHO_T}$ac_cv_header_time" >&6
50680 +if test $ac_cv_header_time = yes; then
50681 +
50682 +cat >>confdefs.h <<\_ACEOF
50683 +#define TIME_WITH_SYS_TIME 1
50684 +_ACEOF
50685 +
50686 +fi
50687 +
50688 +
50689 +
50690 +
50691 +
50692 +
50693 +
50694 +
50695 +
50696 +
50697 +
50698 +
50699 +for ac_func in gettimeofday vasprintf fcntl clock_gettime strtok_r strsep getaddrinfo getnameinfo strlcpy inet_ntop
50700 +do
50701 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
50702 +echo "$as_me:$LINENO: checking for $ac_func" >&5
50703 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
50704 +if eval "test \"\${$as_ac_var+set}\" = set"; then
50705 +  echo $ECHO_N "(cached) $ECHO_C" >&6
50706 +else
50707 +  cat >conftest.$ac_ext <<_ACEOF
50708 +/* confdefs.h.  */
50709 +_ACEOF
50710 +cat confdefs.h >>conftest.$ac_ext
50711 +cat >>conftest.$ac_ext <<_ACEOF
50712 +/* end confdefs.h.  */
50713 +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
50714 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
50715 +#define $ac_func innocuous_$ac_func
50716 +
50717 +/* System header to define __stub macros and hopefully few prototypes,
50718 +    which can conflict with char $ac_func (); below.
50719 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
50720 +    <limits.h> exists even on freestanding compilers.  */
50721 +
50722 +#ifdef __STDC__
50723 +# include <limits.h>
50724 +#else
50725 +# include <assert.h>
50726 +#endif
50727 +
50728 +#undef $ac_func
50729 +
50730 +/* Override any gcc2 internal prototype to avoid an error.  */
50731 +#ifdef __cplusplus
50732 +extern "C"
50733 +{
50734 +#endif
50735 +/* We use char because int might match the return type of a gcc2
50736 +   builtin and then its argument prototype would still apply.  */
50737 +char $ac_func ();
50738 +/* The GNU C library defines this for functions which it implements
50739 +    to always fail with ENOSYS.  Some functions are actually named
50740 +    something starting with __ and the normal name is an alias.  */
50741 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
50742 +choke me
50743 +#else
50744 +char (*f) () = $ac_func;
50745 +#endif
50746 +#ifdef __cplusplus
50747 +}
50748 +#endif
50749 +
50750 +int
50751 +main ()
50752 +{
50753 +return f != $ac_func;
50754 +  ;
50755 +  return 0;
50756 +}
50757 +_ACEOF
50758 +rm -f conftest.$ac_objext conftest$ac_exeext
50759 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
50760 +  (eval $ac_link) 2>conftest.er1
50761 +  ac_status=$?
50762 +  grep -v '^ *+' conftest.er1 >conftest.err
50763 +  rm -f conftest.er1
50764 +  cat conftest.err >&5
50765 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50766 +  (exit $ac_status); } &&
50767 +        { ac_try='test -z "$ac_c_werror_flag"
50768 +                        || test ! -s conftest.err'
50769 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50770 +  (eval $ac_try) 2>&5
50771 +  ac_status=$?
50772 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50773 +  (exit $ac_status); }; } &&
50774 +        { ac_try='test -s conftest$ac_exeext'
50775 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50776 +  (eval $ac_try) 2>&5
50777 +  ac_status=$?
50778 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50779 +  (exit $ac_status); }; }; then
50780 +  eval "$as_ac_var=yes"
50781 +else
50782 +  echo "$as_me: failed program was:" >&5
50783 +sed 's/^/| /' conftest.$ac_ext >&5
50784 +
50785 +eval "$as_ac_var=no"
50786 +fi
50787 +rm -f conftest.err conftest.$ac_objext \
50788 +      conftest$ac_exeext conftest.$ac_ext
50789 +fi
50790 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
50791 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
50792 +if test `eval echo '${'$as_ac_var'}'` = yes; then
50793 +  cat >>confdefs.h <<_ACEOF
50794 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
50795 +_ACEOF
50796 +
50797 +fi
50798 +done
50799 +
50800 +
50801 +if test "x$ac_cv_func_clock_gettime" = "xyes"; then
50802 +
50803 +cat >>confdefs.h <<\_ACEOF
50804 +#define DNS_USE_CPU_CLOCK_FOR_ID 1
50805 +_ACEOF
50806 +
50807 +else
50808 +
50809 +cat >>confdefs.h <<\_ACEOF
50810 +#define DNS_USE_GETTIMEOFDAY_FOR_ID 1
50811 +_ACEOF
50812 +
50813 +fi
50814 +
50815 +echo "$as_me:$LINENO: checking for F_SETFD in fcntl.h" >&5
50816 +echo $ECHO_N "checking for F_SETFD in fcntl.h... $ECHO_C" >&6
50817 +cat >conftest.$ac_ext <<_ACEOF
50818 +/* confdefs.h.  */
50819 +_ACEOF
50820 +cat confdefs.h >>conftest.$ac_ext
50821 +cat >>conftest.$ac_ext <<_ACEOF
50822 +/* end confdefs.h.  */
50823 +
50824 +#define _GNU_SOURCE
50825 +#include <fcntl.h>
50826 +#ifdef F_SETFD
50827 +yes
50828 +#endif
50829 +
50830 +_ACEOF
50831 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50832 +  $EGREP "yes" >/dev/null 2>&1; then
50833 +
50834 +cat >>confdefs.h <<\_ACEOF
50835 +#define HAVE_SETFD 1
50836 +_ACEOF
50837 +
50838 +         echo "$as_me:$LINENO: result: yes" >&5
50839 +echo "${ECHO_T}yes" >&6
50840 +else
50841 +  echo "$as_me:$LINENO: result: no" >&5
50842 +echo "${ECHO_T}no" >&6
50843 +fi
50844 +rm -f conftest*
50845 +
50846 +
50847 +needsignal=no
50848 +haveselect=no
50849 +
50850 +for ac_func in select
50851 +do
50852 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
50853 +echo "$as_me:$LINENO: checking for $ac_func" >&5
50854 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
50855 +if eval "test \"\${$as_ac_var+set}\" = set"; then
50856 +  echo $ECHO_N "(cached) $ECHO_C" >&6
50857 +else
50858 +  cat >conftest.$ac_ext <<_ACEOF
50859 +/* confdefs.h.  */
50860 +_ACEOF
50861 +cat confdefs.h >>conftest.$ac_ext
50862 +cat >>conftest.$ac_ext <<_ACEOF
50863 +/* end confdefs.h.  */
50864 +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
50865 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
50866 +#define $ac_func innocuous_$ac_func
50867 +
50868 +/* System header to define __stub macros and hopefully few prototypes,
50869 +    which can conflict with char $ac_func (); below.
50870 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
50871 +    <limits.h> exists even on freestanding compilers.  */
50872 +
50873 +#ifdef __STDC__
50874 +# include <limits.h>
50875 +#else
50876 +# include <assert.h>
50877 +#endif
50878 +
50879 +#undef $ac_func
50880 +
50881 +/* Override any gcc2 internal prototype to avoid an error.  */
50882 +#ifdef __cplusplus
50883 +extern "C"
50884 +{
50885 +#endif
50886 +/* We use char because int might match the return type of a gcc2
50887 +   builtin and then its argument prototype would still apply.  */
50888 +char $ac_func ();
50889 +/* The GNU C library defines this for functions which it implements
50890 +    to always fail with ENOSYS.  Some functions are actually named
50891 +    something starting with __ and the normal name is an alias.  */
50892 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
50893 +choke me
50894 +#else
50895 +char (*f) () = $ac_func;
50896 +#endif
50897 +#ifdef __cplusplus
50898 +}
50899 +#endif
50900 +
50901 +int
50902 +main ()
50903 +{
50904 +return f != $ac_func;
50905 +  ;
50906 +  return 0;
50907 +}
50908 +_ACEOF
50909 +rm -f conftest.$ac_objext conftest$ac_exeext
50910 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
50911 +  (eval $ac_link) 2>conftest.er1
50912 +  ac_status=$?
50913 +  grep -v '^ *+' conftest.er1 >conftest.err
50914 +  rm -f conftest.er1
50915 +  cat conftest.err >&5
50916 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50917 +  (exit $ac_status); } &&
50918 +        { ac_try='test -z "$ac_c_werror_flag"
50919 +                        || test ! -s conftest.err'
50920 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50921 +  (eval $ac_try) 2>&5
50922 +  ac_status=$?
50923 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50924 +  (exit $ac_status); }; } &&
50925 +        { ac_try='test -s conftest$ac_exeext'
50926 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
50927 +  (eval $ac_try) 2>&5
50928 +  ac_status=$?
50929 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
50930 +  (exit $ac_status); }; }; then
50931 +  eval "$as_ac_var=yes"
50932 +else
50933 +  echo "$as_me: failed program was:" >&5
50934 +sed 's/^/| /' conftest.$ac_ext >&5
50935 +
50936 +eval "$as_ac_var=no"
50937 +fi
50938 +rm -f conftest.err conftest.$ac_objext \
50939 +      conftest$ac_exeext conftest.$ac_ext
50940 +fi
50941 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
50942 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
50943 +if test `eval echo '${'$as_ac_var'}'` = yes; then
50944 +  cat >>confdefs.h <<_ACEOF
50945 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
50946 +_ACEOF
50947 + haveselect=yes
50948 +fi
50949 +done
50950 +
50951 +if test "x$haveselect" = "xyes" ; then
50952 +       case $LIBOBJS in
50953 +    "select.$ac_objext"   | \
50954 +  *" select.$ac_objext"   | \
50955 +    "select.$ac_objext "* | \
50956 +  *" select.$ac_objext "* ) ;;
50957 +  *) LIBOBJS="$LIBOBJS select.$ac_objext" ;;
50958 +esac
50959 +
50960 +       needsignal=yes
50961 +fi
50962 +
50963 +havepoll=no
50964 +havertsig=no
50965 +
50966 +for ac_func in poll
50967 +do
50968 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
50969 +echo "$as_me:$LINENO: checking for $ac_func" >&5
50970 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
50971 +if eval "test \"\${$as_ac_var+set}\" = set"; then
50972 +  echo $ECHO_N "(cached) $ECHO_C" >&6
50973 +else
50974 +  cat >conftest.$ac_ext <<_ACEOF
50975 +/* confdefs.h.  */
50976 +_ACEOF
50977 +cat confdefs.h >>conftest.$ac_ext
50978 +cat >>conftest.$ac_ext <<_ACEOF
50979 +/* end confdefs.h.  */
50980 +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
50981 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
50982 +#define $ac_func innocuous_$ac_func
50983 +
50984 +/* System header to define __stub macros and hopefully few prototypes,
50985 +    which can conflict with char $ac_func (); below.
50986 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
50987 +    <limits.h> exists even on freestanding compilers.  */
50988 +
50989 +#ifdef __STDC__
50990 +# include <limits.h>
50991 +#else
50992 +# include <assert.h>
50993 +#endif
50994 +
50995 +#undef $ac_func
50996 +
50997 +/* Override any gcc2 internal prototype to avoid an error.  */
50998 +#ifdef __cplusplus
50999 +extern "C"
51000 +{
51001 +#endif
51002 +/* We use char because int might match the return type of a gcc2
51003 +   builtin and then its argument prototype would still apply.  */
51004 +char $ac_func ();
51005 +/* The GNU C library defines this for functions which it implements
51006 +    to always fail with ENOSYS.  Some functions are actually named
51007 +    something starting with __ and the normal name is an alias.  */
51008 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
51009 +choke me
51010 +#else
51011 +char (*f) () = $ac_func;
51012 +#endif
51013 +#ifdef __cplusplus
51014 +}
51015 +#endif
51016 +
51017 +int
51018 +main ()
51019 +{
51020 +return f != $ac_func;
51021 +  ;
51022 +  return 0;
51023 +}
51024 +_ACEOF
51025 +rm -f conftest.$ac_objext conftest$ac_exeext
51026 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
51027 +  (eval $ac_link) 2>conftest.er1
51028 +  ac_status=$?
51029 +  grep -v '^ *+' conftest.er1 >conftest.err
51030 +  rm -f conftest.er1
51031 +  cat conftest.err >&5
51032 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51033 +  (exit $ac_status); } &&
51034 +        { ac_try='test -z "$ac_c_werror_flag"
51035 +                        || test ! -s conftest.err'
51036 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51037 +  (eval $ac_try) 2>&5
51038 +  ac_status=$?
51039 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51040 +  (exit $ac_status); }; } &&
51041 +        { ac_try='test -s conftest$ac_exeext'
51042 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51043 +  (eval $ac_try) 2>&5
51044 +  ac_status=$?
51045 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51046 +  (exit $ac_status); }; }; then
51047 +  eval "$as_ac_var=yes"
51048 +else
51049 +  echo "$as_me: failed program was:" >&5
51050 +sed 's/^/| /' conftest.$ac_ext >&5
51051 +
51052 +eval "$as_ac_var=no"
51053 +fi
51054 +rm -f conftest.err conftest.$ac_objext \
51055 +      conftest$ac_exeext conftest.$ac_ext
51056 +fi
51057 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
51058 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
51059 +if test `eval echo '${'$as_ac_var'}'` = yes; then
51060 +  cat >>confdefs.h <<_ACEOF
51061 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
51062 +_ACEOF
51063 + havepoll=yes
51064 +fi
51065 +done
51066 +
51067 +if test "x$havepoll" = "xyes" ; then
51068 +       case $LIBOBJS in
51069 +    "poll.$ac_objext"   | \
51070 +  *" poll.$ac_objext"   | \
51071 +    "poll.$ac_objext "* | \
51072 +  *" poll.$ac_objext "* ) ;;
51073 +  *) LIBOBJS="$LIBOBJS poll.$ac_objext" ;;
51074 +esac
51075 +
51076 +       needsignal=yes
51077 +
51078 +       if test "x$usertsig" = "xyes" ; then
51079 +
51080 +for ac_func in sigtimedwait
51081 +do
51082 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
51083 +echo "$as_me:$LINENO: checking for $ac_func" >&5
51084 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
51085 +if eval "test \"\${$as_ac_var+set}\" = set"; then
51086 +  echo $ECHO_N "(cached) $ECHO_C" >&6
51087 +else
51088 +  cat >conftest.$ac_ext <<_ACEOF
51089 +/* confdefs.h.  */
51090 +_ACEOF
51091 +cat confdefs.h >>conftest.$ac_ext
51092 +cat >>conftest.$ac_ext <<_ACEOF
51093 +/* end confdefs.h.  */
51094 +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
51095 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
51096 +#define $ac_func innocuous_$ac_func
51097 +
51098 +/* System header to define __stub macros and hopefully few prototypes,
51099 +    which can conflict with char $ac_func (); below.
51100 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
51101 +    <limits.h> exists even on freestanding compilers.  */
51102 +
51103 +#ifdef __STDC__
51104 +# include <limits.h>
51105 +#else
51106 +# include <assert.h>
51107 +#endif
51108 +
51109 +#undef $ac_func
51110 +
51111 +/* Override any gcc2 internal prototype to avoid an error.  */
51112 +#ifdef __cplusplus
51113 +extern "C"
51114 +{
51115 +#endif
51116 +/* We use char because int might match the return type of a gcc2
51117 +   builtin and then its argument prototype would still apply.  */
51118 +char $ac_func ();
51119 +/* The GNU C library defines this for functions which it implements
51120 +    to always fail with ENOSYS.  Some functions are actually named
51121 +    something starting with __ and the normal name is an alias.  */
51122 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
51123 +choke me
51124 +#else
51125 +char (*f) () = $ac_func;
51126 +#endif
51127 +#ifdef __cplusplus
51128 +}
51129 +#endif
51130 +
51131 +int
51132 +main ()
51133 +{
51134 +return f != $ac_func;
51135 +  ;
51136 +  return 0;
51137 +}
51138 +_ACEOF
51139 +rm -f conftest.$ac_objext conftest$ac_exeext
51140 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
51141 +  (eval $ac_link) 2>conftest.er1
51142 +  ac_status=$?
51143 +  grep -v '^ *+' conftest.er1 >conftest.err
51144 +  rm -f conftest.er1
51145 +  cat conftest.err >&5
51146 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51147 +  (exit $ac_status); } &&
51148 +        { ac_try='test -z "$ac_c_werror_flag"
51149 +                        || test ! -s conftest.err'
51150 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51151 +  (eval $ac_try) 2>&5
51152 +  ac_status=$?
51153 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51154 +  (exit $ac_status); }; } &&
51155 +        { ac_try='test -s conftest$ac_exeext'
51156 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51157 +  (eval $ac_try) 2>&5
51158 +  ac_status=$?
51159 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51160 +  (exit $ac_status); }; }; then
51161 +  eval "$as_ac_var=yes"
51162 +else
51163 +  echo "$as_me: failed program was:" >&5
51164 +sed 's/^/| /' conftest.$ac_ext >&5
51165 +
51166 +eval "$as_ac_var=no"
51167 +fi
51168 +rm -f conftest.err conftest.$ac_objext \
51169 +      conftest$ac_exeext conftest.$ac_ext
51170 +fi
51171 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
51172 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
51173 +if test `eval echo '${'$as_ac_var'}'` = yes; then
51174 +  cat >>confdefs.h <<_ACEOF
51175 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
51176 +_ACEOF
51177 + havertsig=yes
51178 +fi
51179 +done
51180 +
51181 +       fi
51182 +fi
51183 +if test "x$havertsig" = "xyes" ; then
51184 +       echo "$as_me:$LINENO: checking for F_SETSIG in fcntl.h" >&5
51185 +echo $ECHO_N "checking for F_SETSIG in fcntl.h... $ECHO_C" >&6
51186 +       cat >conftest.$ac_ext <<_ACEOF
51187 +/* confdefs.h.  */
51188 +_ACEOF
51189 +cat confdefs.h >>conftest.$ac_ext
51190 +cat >>conftest.$ac_ext <<_ACEOF
51191 +/* end confdefs.h.  */
51192 +
51193 +#define _GNU_SOURCE
51194 +#include <fcntl.h>
51195 +#ifdef F_SETSIG
51196 +yes
51197 +#endif
51198 +
51199 +_ACEOF
51200 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
51201 +  $EGREP "yes" >/dev/null 2>&1; then
51202 +   echo "$as_me:$LINENO: result: yes" >&5
51203 +echo "${ECHO_T}yes" >&6
51204 +else
51205 +   echo "$as_me:$LINENO: result: no" >&5
51206 +echo "${ECHO_T}no" >&6; havertsig=no
51207 +fi
51208 +rm -f conftest*
51209 +
51210 +fi
51211 +if test "x$havertsig" = "xyes" ; then
51212 +
51213 +cat >>confdefs.h <<\_ACEOF
51214 +#define HAVE_RTSIG 1
51215 +_ACEOF
51216 +
51217 +       case $LIBOBJS in
51218 +    "rtsig.$ac_objext"   | \
51219 +  *" rtsig.$ac_objext"   | \
51220 +    "rtsig.$ac_objext "* | \
51221 +  *" rtsig.$ac_objext "* ) ;;
51222 +  *) LIBOBJS="$LIBOBJS rtsig.$ac_objext" ;;
51223 +esac
51224 +
51225 +       echo "$as_me:$LINENO: checking for working rtsig on pipes" >&5
51226 +echo $ECHO_N "checking for working rtsig on pipes... $ECHO_C" >&6
51227 +       if test "$cross_compiling" = yes; then
51228 +  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
51229 +See \`config.log' for more details." >&5
51230 +echo "$as_me: error: cannot run test program while cross compiling
51231 +See \`config.log' for more details." >&2;}
51232 +   { (exit 1); exit 1; }; }
51233 +else
51234 +  cat >conftest.$ac_ext <<_ACEOF
51235 +/* confdefs.h.  */
51236 +_ACEOF
51237 +cat confdefs.h >>conftest.$ac_ext
51238 +cat >>conftest.$ac_ext <<_ACEOF
51239 +/* end confdefs.h.  */
51240 +
51241 +#define _GNU_SOURCE
51242 +#include <fcntl.h>
51243 +#include <signal.h>
51244 +#include <unistd.h>
51245 +
51246 +int sigio()
51247 +{
51248 +       exit(0);
51249 +}
51250 +
51251 +int main()
51252 +{
51253 +       int fd[2];
51254 +
51255 +       pipe(fd);
51256 +       signal(SIGIO, sigio);
51257 +       fcntl(fd[0], F_SETOWN, getpid());
51258 +       fcntl(fd[0], F_SETSIG, SIGIO);
51259 +       fcntl(fd[0], F_SETFL, fcntl(fd[0], F_GETFL) | O_ASYNC);
51260 +       write(fd[1], "", 1);
51261 +       return 1;
51262 +}
51263 +
51264 +_ACEOF
51265 +rm -f conftest$ac_exeext
51266 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
51267 +  (eval $ac_link) 2>&5
51268 +  ac_status=$?
51269 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51270 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
51271 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51272 +  (eval $ac_try) 2>&5
51273 +  ac_status=$?
51274 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51275 +  (exit $ac_status); }; }; then
51276 +   echo "$as_me:$LINENO: result: yes" >&5
51277 +echo "${ECHO_T}yes" >&6
51278 +
51279 +cat >>confdefs.h <<\_ACEOF
51280 +#define HAVE_WORKING_RTSIG 1
51281 +_ACEOF
51282 +
51283 +else
51284 +  echo "$as_me: program exited with status $ac_status" >&5
51285 +echo "$as_me: failed program was:" >&5
51286 +sed 's/^/| /' conftest.$ac_ext >&5
51287 +
51288 +( exit $ac_status )
51289 +echo "$as_me:$LINENO: result: no" >&5
51290 +echo "${ECHO_T}no" >&6
51291 +fi
51292 +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
51293 +fi
51294 +fi
51295 +
51296 +haveepoll=no
51297 +
51298 +for ac_func in epoll_ctl
51299 +do
51300 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
51301 +echo "$as_me:$LINENO: checking for $ac_func" >&5
51302 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
51303 +if eval "test \"\${$as_ac_var+set}\" = set"; then
51304 +  echo $ECHO_N "(cached) $ECHO_C" >&6
51305 +else
51306 +  cat >conftest.$ac_ext <<_ACEOF
51307 +/* confdefs.h.  */
51308 +_ACEOF
51309 +cat confdefs.h >>conftest.$ac_ext
51310 +cat >>conftest.$ac_ext <<_ACEOF
51311 +/* end confdefs.h.  */
51312 +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
51313 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
51314 +#define $ac_func innocuous_$ac_func
51315 +
51316 +/* System header to define __stub macros and hopefully few prototypes,
51317 +    which can conflict with char $ac_func (); below.
51318 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
51319 +    <limits.h> exists even on freestanding compilers.  */
51320 +
51321 +#ifdef __STDC__
51322 +# include <limits.h>
51323 +#else
51324 +# include <assert.h>
51325 +#endif
51326 +
51327 +#undef $ac_func
51328 +
51329 +/* Override any gcc2 internal prototype to avoid an error.  */
51330 +#ifdef __cplusplus
51331 +extern "C"
51332 +{
51333 +#endif
51334 +/* We use char because int might match the return type of a gcc2
51335 +   builtin and then its argument prototype would still apply.  */
51336 +char $ac_func ();
51337 +/* The GNU C library defines this for functions which it implements
51338 +    to always fail with ENOSYS.  Some functions are actually named
51339 +    something starting with __ and the normal name is an alias.  */
51340 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
51341 +choke me
51342 +#else
51343 +char (*f) () = $ac_func;
51344 +#endif
51345 +#ifdef __cplusplus
51346 +}
51347 +#endif
51348 +
51349 +int
51350 +main ()
51351 +{
51352 +return f != $ac_func;
51353 +  ;
51354 +  return 0;
51355 +}
51356 +_ACEOF
51357 +rm -f conftest.$ac_objext conftest$ac_exeext
51358 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
51359 +  (eval $ac_link) 2>conftest.er1
51360 +  ac_status=$?
51361 +  grep -v '^ *+' conftest.er1 >conftest.err
51362 +  rm -f conftest.er1
51363 +  cat conftest.err >&5
51364 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51365 +  (exit $ac_status); } &&
51366 +        { ac_try='test -z "$ac_c_werror_flag"
51367 +                        || test ! -s conftest.err'
51368 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51369 +  (eval $ac_try) 2>&5
51370 +  ac_status=$?
51371 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51372 +  (exit $ac_status); }; } &&
51373 +        { ac_try='test -s conftest$ac_exeext'
51374 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51375 +  (eval $ac_try) 2>&5
51376 +  ac_status=$?
51377 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51378 +  (exit $ac_status); }; }; then
51379 +  eval "$as_ac_var=yes"
51380 +else
51381 +  echo "$as_me: failed program was:" >&5
51382 +sed 's/^/| /' conftest.$ac_ext >&5
51383 +
51384 +eval "$as_ac_var=no"
51385 +fi
51386 +rm -f conftest.err conftest.$ac_objext \
51387 +      conftest$ac_exeext conftest.$ac_ext
51388 +fi
51389 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
51390 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
51391 +if test `eval echo '${'$as_ac_var'}'` = yes; then
51392 +  cat >>confdefs.h <<_ACEOF
51393 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
51394 +_ACEOF
51395 + haveepoll=yes
51396 +fi
51397 +done
51398 +
51399 +if test "x$haveepoll" = "xyes" ; then
51400 +
51401 +cat >>confdefs.h <<\_ACEOF
51402 +#define HAVE_EPOLL 1
51403 +_ACEOF
51404 +
51405 +       case $LIBOBJS in
51406 +    "epoll.$ac_objext"   | \
51407 +  *" epoll.$ac_objext"   | \
51408 +    "epoll.$ac_objext "* | \
51409 +  *" epoll.$ac_objext "* ) ;;
51410 +  *) LIBOBJS="$LIBOBJS epoll.$ac_objext" ;;
51411 +esac
51412 +
51413 +       needsignal=yes
51414 +fi
51415 +
51416 +havedevpoll=no
51417 +if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then
51418 +
51419 +cat >>confdefs.h <<\_ACEOF
51420 +#define HAVE_DEVPOLL 1
51421 +_ACEOF
51422 +
51423 +        case $LIBOBJS in
51424 +    "devpoll.$ac_objext"   | \
51425 +  *" devpoll.$ac_objext"   | \
51426 +    "devpoll.$ac_objext "* | \
51427 +  *" devpoll.$ac_objext "* ) ;;
51428 +  *) LIBOBJS="$LIBOBJS devpoll.$ac_objext" ;;
51429 +esac
51430 +
51431 +fi
51432 +
51433 +havekqueue=no
51434 +if test "x$ac_cv_header_sys_event_h" = "xyes"; then
51435 +
51436 +for ac_func in kqueue
51437 +do
51438 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
51439 +echo "$as_me:$LINENO: checking for $ac_func" >&5
51440 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
51441 +if eval "test \"\${$as_ac_var+set}\" = set"; then
51442 +  echo $ECHO_N "(cached) $ECHO_C" >&6
51443 +else
51444 +  cat >conftest.$ac_ext <<_ACEOF
51445 +/* confdefs.h.  */
51446 +_ACEOF
51447 +cat confdefs.h >>conftest.$ac_ext
51448 +cat >>conftest.$ac_ext <<_ACEOF
51449 +/* end confdefs.h.  */
51450 +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
51451 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
51452 +#define $ac_func innocuous_$ac_func
51453 +
51454 +/* System header to define __stub macros and hopefully few prototypes,
51455 +    which can conflict with char $ac_func (); below.
51456 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
51457 +    <limits.h> exists even on freestanding compilers.  */
51458 +
51459 +#ifdef __STDC__
51460 +# include <limits.h>
51461 +#else
51462 +# include <assert.h>
51463 +#endif
51464 +
51465 +#undef $ac_func
51466 +
51467 +/* Override any gcc2 internal prototype to avoid an error.  */
51468 +#ifdef __cplusplus
51469 +extern "C"
51470 +{
51471 +#endif
51472 +/* We use char because int might match the return type of a gcc2
51473 +   builtin and then its argument prototype would still apply.  */
51474 +char $ac_func ();
51475 +/* The GNU C library defines this for functions which it implements
51476 +    to always fail with ENOSYS.  Some functions are actually named
51477 +    something starting with __ and the normal name is an alias.  */
51478 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
51479 +choke me
51480 +#else
51481 +char (*f) () = $ac_func;
51482 +#endif
51483 +#ifdef __cplusplus
51484 +}
51485 +#endif
51486 +
51487 +int
51488 +main ()
51489 +{
51490 +return f != $ac_func;
51491 +  ;
51492 +  return 0;
51493 +}
51494 +_ACEOF
51495 +rm -f conftest.$ac_objext conftest$ac_exeext
51496 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
51497 +  (eval $ac_link) 2>conftest.er1
51498 +  ac_status=$?
51499 +  grep -v '^ *+' conftest.er1 >conftest.err
51500 +  rm -f conftest.er1
51501 +  cat conftest.err >&5
51502 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51503 +  (exit $ac_status); } &&
51504 +        { ac_try='test -z "$ac_c_werror_flag"
51505 +                        || test ! -s conftest.err'
51506 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51507 +  (eval $ac_try) 2>&5
51508 +  ac_status=$?
51509 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51510 +  (exit $ac_status); }; } &&
51511 +        { ac_try='test -s conftest$ac_exeext'
51512 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51513 +  (eval $ac_try) 2>&5
51514 +  ac_status=$?
51515 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51516 +  (exit $ac_status); }; }; then
51517 +  eval "$as_ac_var=yes"
51518 +else
51519 +  echo "$as_me: failed program was:" >&5
51520 +sed 's/^/| /' conftest.$ac_ext >&5
51521 +
51522 +eval "$as_ac_var=no"
51523 +fi
51524 +rm -f conftest.err conftest.$ac_objext \
51525 +      conftest$ac_exeext conftest.$ac_ext
51526 +fi
51527 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
51528 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
51529 +if test `eval echo '${'$as_ac_var'}'` = yes; then
51530 +  cat >>confdefs.h <<_ACEOF
51531 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
51532 +_ACEOF
51533 + havekqueue=yes
51534 +fi
51535 +done
51536 +
51537 +       if test "x$havekqueue" = "xyes" ; then
51538 +               echo "$as_me:$LINENO: checking for working kqueue" >&5
51539 +echo $ECHO_N "checking for working kqueue... $ECHO_C" >&6
51540 +               if test "$cross_compiling" = yes; then
51541 +  echo "$as_me:$LINENO: result: no" >&5
51542 +echo "${ECHO_T}no" >&6
51543 +else
51544 +  cat >conftest.$ac_ext <<_ACEOF
51545 +/* confdefs.h.  */
51546 +_ACEOF
51547 +cat confdefs.h >>conftest.$ac_ext
51548 +cat >>conftest.$ac_ext <<_ACEOF
51549 +/* end confdefs.h.  */
51550 +#include <sys/types.h>
51551 +#include <sys/time.h>
51552 +#include <sys/event.h>
51553 +#include <stdio.h>
51554 +#include <unistd.h>
51555 +#include <fcntl.h>
51556 +
51557 +int
51558 +main(int argc, char **argv)
51559 +{
51560 +       int kq;
51561 +       int n;
51562 +       int fd[2];
51563 +       struct kevent ev;
51564 +       struct timespec ts;
51565 +       char buf[8000];
51566 +
51567 +       if (pipe(fd) == -1)
51568 +               exit(1);
51569 +       if (fcntl(fd[1], F_SETFL, O_NONBLOCK) == -1)
51570 +               exit(1);
51571 +
51572 +       while ((n = write(fd[1], buf, sizeof(buf))) == sizeof(buf))
51573 +               ;
51574 +
51575 +        if ((kq = kqueue()) == -1)
51576 +               exit(1);
51577 +
51578 +       ev.ident = fd[1];
51579 +       ev.filter = EVFILT_WRITE;
51580 +       ev.flags = EV_ADD | EV_ENABLE;
51581 +       n = kevent(kq, &ev, 1, NULL, 0, NULL);
51582 +       if (n == -1)
51583 +               exit(1);
51584 +
51585 +       read(fd[0], buf, sizeof(buf));
51586 +
51587 +       ts.tv_sec = 0;
51588 +       ts.tv_nsec = 0;
51589 +       n = kevent(kq, NULL, 0, &ev, 1, &ts);
51590 +       if (n == -1 || n == 0)
51591 +               exit(1);
51592 +
51593 +       exit(0);
51594 +}
51595 +_ACEOF
51596 +rm -f conftest$ac_exeext
51597 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
51598 +  (eval $ac_link) 2>&5
51599 +  ac_status=$?
51600 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51601 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
51602 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51603 +  (eval $ac_try) 2>&5
51604 +  ac_status=$?
51605 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51606 +  (exit $ac_status); }; }; then
51607 +  echo "$as_me:$LINENO: result: yes" >&5
51608 +echo "${ECHO_T}yes" >&6
51609 +
51610 +cat >>confdefs.h <<\_ACEOF
51611 +#define HAVE_WORKING_KQUEUE 1
51612 +_ACEOF
51613 +
51614 +    case $LIBOBJS in
51615 +    "kqueue.$ac_objext"   | \
51616 +  *" kqueue.$ac_objext"   | \
51617 +    "kqueue.$ac_objext "* | \
51618 +  *" kqueue.$ac_objext "* ) ;;
51619 +  *) LIBOBJS="$LIBOBJS kqueue.$ac_objext" ;;
51620 +esac
51621 +
51622 +else
51623 +  echo "$as_me: program exited with status $ac_status" >&5
51624 +echo "$as_me: failed program was:" >&5
51625 +sed 's/^/| /' conftest.$ac_ext >&5
51626 +
51627 +( exit $ac_status )
51628 +echo "$as_me:$LINENO: result: no" >&5
51629 +echo "${ECHO_T}no" >&6
51630 +fi
51631 +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
51632 +fi
51633 +       fi
51634 +fi
51635 +
51636 +haveepollsyscall=no
51637 +if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then
51638 +       if test "x$haveepoll" = "xno" ; then
51639 +               echo "$as_me:$LINENO: checking for epoll system call" >&5
51640 +echo $ECHO_N "checking for epoll system call... $ECHO_C" >&6
51641 +               if test "$cross_compiling" = yes; then
51642 +  echo "$as_me:$LINENO: result: no" >&5
51643 +echo "${ECHO_T}no" >&6
51644 +else
51645 +  cat >conftest.$ac_ext <<_ACEOF
51646 +/* confdefs.h.  */
51647 +_ACEOF
51648 +cat confdefs.h >>conftest.$ac_ext
51649 +cat >>conftest.$ac_ext <<_ACEOF
51650 +/* end confdefs.h.  */
51651 +#include <stdint.h>
51652 +#include <sys/param.h>
51653 +#include <sys/types.h>
51654 +#include <sys/syscall.h>
51655 +#include <sys/epoll.h>
51656 +#include <unistd.h>
51657 +
51658 +int
51659 +epoll_create(int size)
51660 +{
51661 +       return (syscall(__NR_epoll_create, size));
51662 +}
51663 +
51664 +int
51665 +main(int argc, char **argv)
51666 +{
51667 +       int epfd;
51668 +
51669 +       epfd = epoll_create(256);
51670 +       exit (epfd == -1 ? 1 : 0);
51671 +}
51672 +_ACEOF
51673 +rm -f conftest$ac_exeext
51674 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
51675 +  (eval $ac_link) 2>&5
51676 +  ac_status=$?
51677 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51678 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
51679 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51680 +  (eval $ac_try) 2>&5
51681 +  ac_status=$?
51682 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51683 +  (exit $ac_status); }; }; then
51684 +  echo "$as_me:$LINENO: result: yes" >&5
51685 +echo "${ECHO_T}yes" >&6
51686 +
51687 +cat >>confdefs.h <<\_ACEOF
51688 +#define HAVE_EPOLL 1
51689 +_ACEOF
51690 +
51691 +    needsignal=yes
51692 +    case $LIBOBJS in
51693 +    "epoll_sub.$ac_objext"   | \
51694 +  *" epoll_sub.$ac_objext"   | \
51695 +    "epoll_sub.$ac_objext "* | \
51696 +  *" epoll_sub.$ac_objext "* ) ;;
51697 +  *) LIBOBJS="$LIBOBJS epoll_sub.$ac_objext" ;;
51698 +esac
51699 +
51700 +    case $LIBOBJS in
51701 +    "epoll.$ac_objext"   | \
51702 +  *" epoll.$ac_objext"   | \
51703 +    "epoll.$ac_objext "* | \
51704 +  *" epoll.$ac_objext "* ) ;;
51705 +  *) LIBOBJS="$LIBOBJS epoll.$ac_objext" ;;
51706 +esac
51707 +
51708 +else
51709 +  echo "$as_me: program exited with status $ac_status" >&5
51710 +echo "$as_me: failed program was:" >&5
51711 +sed 's/^/| /' conftest.$ac_ext >&5
51712 +
51713 +( exit $ac_status )
51714 +echo "$as_me:$LINENO: result: no" >&5
51715 +echo "${ECHO_T}no" >&6
51716 +fi
51717 +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
51718 +fi
51719 +       fi
51720 +fi
51721 +
51722 +haveeventports=no
51723 +
51724 +for ac_func in port_create
51725 +do
51726 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
51727 +echo "$as_me:$LINENO: checking for $ac_func" >&5
51728 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
51729 +if eval "test \"\${$as_ac_var+set}\" = set"; then
51730 +  echo $ECHO_N "(cached) $ECHO_C" >&6
51731 +else
51732 +  cat >conftest.$ac_ext <<_ACEOF
51733 +/* confdefs.h.  */
51734 +_ACEOF
51735 +cat confdefs.h >>conftest.$ac_ext
51736 +cat >>conftest.$ac_ext <<_ACEOF
51737 +/* end confdefs.h.  */
51738 +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
51739 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
51740 +#define $ac_func innocuous_$ac_func
51741 +
51742 +/* System header to define __stub macros and hopefully few prototypes,
51743 +    which can conflict with char $ac_func (); below.
51744 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
51745 +    <limits.h> exists even on freestanding compilers.  */
51746 +
51747 +#ifdef __STDC__
51748 +# include <limits.h>
51749 +#else
51750 +# include <assert.h>
51751 +#endif
51752 +
51753 +#undef $ac_func
51754 +
51755 +/* Override any gcc2 internal prototype to avoid an error.  */
51756 +#ifdef __cplusplus
51757 +extern "C"
51758 +{
51759 +#endif
51760 +/* We use char because int might match the return type of a gcc2
51761 +   builtin and then its argument prototype would still apply.  */
51762 +char $ac_func ();
51763 +/* The GNU C library defines this for functions which it implements
51764 +    to always fail with ENOSYS.  Some functions are actually named
51765 +    something starting with __ and the normal name is an alias.  */
51766 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
51767 +choke me
51768 +#else
51769 +char (*f) () = $ac_func;
51770 +#endif
51771 +#ifdef __cplusplus
51772 +}
51773 +#endif
51774 +
51775 +int
51776 +main ()
51777 +{
51778 +return f != $ac_func;
51779 +  ;
51780 +  return 0;
51781 +}
51782 +_ACEOF
51783 +rm -f conftest.$ac_objext conftest$ac_exeext
51784 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
51785 +  (eval $ac_link) 2>conftest.er1
51786 +  ac_status=$?
51787 +  grep -v '^ *+' conftest.er1 >conftest.err
51788 +  rm -f conftest.er1
51789 +  cat conftest.err >&5
51790 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51791 +  (exit $ac_status); } &&
51792 +        { ac_try='test -z "$ac_c_werror_flag"
51793 +                        || test ! -s conftest.err'
51794 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51795 +  (eval $ac_try) 2>&5
51796 +  ac_status=$?
51797 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51798 +  (exit $ac_status); }; } &&
51799 +        { ac_try='test -s conftest$ac_exeext'
51800 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51801 +  (eval $ac_try) 2>&5
51802 +  ac_status=$?
51803 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51804 +  (exit $ac_status); }; }; then
51805 +  eval "$as_ac_var=yes"
51806 +else
51807 +  echo "$as_me: failed program was:" >&5
51808 +sed 's/^/| /' conftest.$ac_ext >&5
51809 +
51810 +eval "$as_ac_var=no"
51811 +fi
51812 +rm -f conftest.err conftest.$ac_objext \
51813 +      conftest$ac_exeext conftest.$ac_ext
51814 +fi
51815 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
51816 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
51817 +if test `eval echo '${'$as_ac_var'}'` = yes; then
51818 +  cat >>confdefs.h <<_ACEOF
51819 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
51820 +_ACEOF
51821 + haveeventports=yes
51822 +fi
51823 +done
51824 +
51825 +if test "x$haveeventports" = "xyes" ; then
51826 +
51827 +cat >>confdefs.h <<\_ACEOF
51828 +#define HAVE_EVENT_PORTS 1
51829 +_ACEOF
51830 +
51831 +       case $LIBOBJS in
51832 +    "evport.$ac_objext"   | \
51833 +  *" evport.$ac_objext"   | \
51834 +    "evport.$ac_objext "* | \
51835 +  *" evport.$ac_objext "* ) ;;
51836 +  *) LIBOBJS="$LIBOBJS evport.$ac_objext" ;;
51837 +esac
51838 +
51839 +       needsignal=yes
51840 +fi
51841 +if test "x$needsignal" = "xyes" ; then
51842 +       case $LIBOBJS in
51843 +    "signal.$ac_objext"   | \
51844 +  *" signal.$ac_objext"   | \
51845 +    "signal.$ac_objext "* | \
51846 +  *" signal.$ac_objext "* ) ;;
51847 +  *) LIBOBJS="$LIBOBJS signal.$ac_objext" ;;
51848 +esac
51849 +
51850 +fi
51851 +
51852 +echo "$as_me:$LINENO: checking for pid_t" >&5
51853 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
51854 +if test "${ac_cv_type_pid_t+set}" = set; then
51855 +  echo $ECHO_N "(cached) $ECHO_C" >&6
51856 +else
51857 +  cat >conftest.$ac_ext <<_ACEOF
51858 +/* confdefs.h.  */
51859 +_ACEOF
51860 +cat confdefs.h >>conftest.$ac_ext
51861 +cat >>conftest.$ac_ext <<_ACEOF
51862 +/* end confdefs.h.  */
51863 +$ac_includes_default
51864 +int
51865 +main ()
51866 +{
51867 +if ((pid_t *) 0)
51868 +  return 0;
51869 +if (sizeof (pid_t))
51870 +  return 0;
51871 +  ;
51872 +  return 0;
51873 +}
51874 +_ACEOF
51875 +rm -f conftest.$ac_objext
51876 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
51877 +  (eval $ac_compile) 2>conftest.er1
51878 +  ac_status=$?
51879 +  grep -v '^ *+' conftest.er1 >conftest.err
51880 +  rm -f conftest.er1
51881 +  cat conftest.err >&5
51882 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51883 +  (exit $ac_status); } &&
51884 +        { ac_try='test -z "$ac_c_werror_flag"
51885 +                        || test ! -s conftest.err'
51886 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51887 +  (eval $ac_try) 2>&5
51888 +  ac_status=$?
51889 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51890 +  (exit $ac_status); }; } &&
51891 +        { ac_try='test -s conftest.$ac_objext'
51892 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51893 +  (eval $ac_try) 2>&5
51894 +  ac_status=$?
51895 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51896 +  (exit $ac_status); }; }; then
51897 +  ac_cv_type_pid_t=yes
51898 +else
51899 +  echo "$as_me: failed program was:" >&5
51900 +sed 's/^/| /' conftest.$ac_ext >&5
51901 +
51902 +ac_cv_type_pid_t=no
51903 +fi
51904 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
51905 +fi
51906 +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
51907 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6
51908 +if test $ac_cv_type_pid_t = yes; then
51909 +  :
51910 +else
51911 +
51912 +cat >>confdefs.h <<_ACEOF
51913 +#define pid_t int
51914 +_ACEOF
51915 +
51916 +fi
51917 +
51918 +echo "$as_me:$LINENO: checking for size_t" >&5
51919 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6
51920 +if test "${ac_cv_type_size_t+set}" = set; then
51921 +  echo $ECHO_N "(cached) $ECHO_C" >&6
51922 +else
51923 +  cat >conftest.$ac_ext <<_ACEOF
51924 +/* confdefs.h.  */
51925 +_ACEOF
51926 +cat confdefs.h >>conftest.$ac_ext
51927 +cat >>conftest.$ac_ext <<_ACEOF
51928 +/* end confdefs.h.  */
51929 +$ac_includes_default
51930 +int
51931 +main ()
51932 +{
51933 +if ((size_t *) 0)
51934 +  return 0;
51935 +if (sizeof (size_t))
51936 +  return 0;
51937 +  ;
51938 +  return 0;
51939 +}
51940 +_ACEOF
51941 +rm -f conftest.$ac_objext
51942 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
51943 +  (eval $ac_compile) 2>conftest.er1
51944 +  ac_status=$?
51945 +  grep -v '^ *+' conftest.er1 >conftest.err
51946 +  rm -f conftest.er1
51947 +  cat conftest.err >&5
51948 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51949 +  (exit $ac_status); } &&
51950 +        { ac_try='test -z "$ac_c_werror_flag"
51951 +                        || test ! -s conftest.err'
51952 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51953 +  (eval $ac_try) 2>&5
51954 +  ac_status=$?
51955 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51956 +  (exit $ac_status); }; } &&
51957 +        { ac_try='test -s conftest.$ac_objext'
51958 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
51959 +  (eval $ac_try) 2>&5
51960 +  ac_status=$?
51961 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
51962 +  (exit $ac_status); }; }; then
51963 +  ac_cv_type_size_t=yes
51964 +else
51965 +  echo "$as_me: failed program was:" >&5
51966 +sed 's/^/| /' conftest.$ac_ext >&5
51967 +
51968 +ac_cv_type_size_t=no
51969 +fi
51970 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
51971 +fi
51972 +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
51973 +echo "${ECHO_T}$ac_cv_type_size_t" >&6
51974 +if test $ac_cv_type_size_t = yes; then
51975 +  :
51976 +else
51977 +
51978 +cat >>confdefs.h <<_ACEOF
51979 +#define size_t unsigned
51980 +_ACEOF
51981 +
51982 +fi
51983 +
51984 +echo "$as_me:$LINENO: checking for struct in6_addr" >&5
51985 +echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6
51986 +if test "${ac_cv_type_struct_in6_addr+set}" = set; then
51987 +  echo $ECHO_N "(cached) $ECHO_C" >&6
51988 +else
51989 +  cat >conftest.$ac_ext <<_ACEOF
51990 +/* confdefs.h.  */
51991 +_ACEOF
51992 +cat confdefs.h >>conftest.$ac_ext
51993 +cat >>conftest.$ac_ext <<_ACEOF
51994 +/* end confdefs.h.  */
51995 +#ifdef WIN32
51996 +#include <winsock2.h>
51997 +#else
51998 +#include <sys/types.h>
51999 +#include <netinet/in.h>
52000 +#include <sys/socket.h>
52001 +#endif
52002 +#ifdef HAVE_NETINET_IN6_H
52003 +#include <netinet/in6.h>
52004 +#endif
52005 +
52006 +int
52007 +main ()
52008 +{
52009 +if ((struct in6_addr *) 0)
52010 +  return 0;
52011 +if (sizeof (struct in6_addr))
52012 +  return 0;
52013 +  ;
52014 +  return 0;
52015 +}
52016 +_ACEOF
52017 +rm -f conftest.$ac_objext
52018 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
52019 +  (eval $ac_compile) 2>conftest.er1
52020 +  ac_status=$?
52021 +  grep -v '^ *+' conftest.er1 >conftest.err
52022 +  rm -f conftest.er1
52023 +  cat conftest.err >&5
52024 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
52025 +  (exit $ac_status); } &&
52026 +        { ac_try='test -z "$ac_c_werror_flag"
52027 +                        || test ! -s conftest.err'
52028 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
52029 +  (eval $ac_try) 2>&5
52030 +  ac_status=$?
52031 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
52032 +  (exit $ac_status); }; } &&
52033 +        { ac_try='test -s conftest.$ac_objext'
52034 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
52035 +  (eval $ac_try) 2>&5
52036 +  ac_status=$?
52037 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
52038 +  (exit $ac_status); }; }; then
52039 +  ac_cv_type_struct_in6_addr=yes
52040 +else
52041 +  echo "$as_me: failed program was:" >&5
52042 +sed 's/^/| /' conftest.$ac_ext >&5
52043 +
52044 +ac_cv_type_struct_in6_addr=no
52045 +fi
52046 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
52047 +fi
52048 +echo "$as_me:$LINENO: result: $ac_cv_type_struct_in6_addr" >&5
52049 +echo "${ECHO_T}$ac_cv_type_struct_in6_addr" >&6
52050 +if test $ac_cv_type_struct_in6_addr = yes; then
52051 +
52052 +cat >>confdefs.h <<_ACEOF
52053 +#define HAVE_STRUCT_IN6_ADDR 1
52054 +_ACEOF
52055 +
52056 +
52057 +fi
52058 +
52059 +
52060 +echo "$as_me:$LINENO: checking for socklen_t" >&5
52061 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
52062 +cat >conftest.$ac_ext <<_ACEOF
52063 +/* confdefs.h.  */
52064 +_ACEOF
52065 +cat confdefs.h >>conftest.$ac_ext
52066 +cat >>conftest.$ac_ext <<_ACEOF
52067 +/* end confdefs.h.  */
52068 +
52069 + #include <sys/types.h>
52070 + #include <sys/socket.h>
52071 +int
52072 +main ()
52073 +{
52074 +socklen_t x;
52075 +  ;
52076 +  return 0;
52077 +}
52078 +_ACEOF
52079 +rm -f conftest.$ac_objext
52080 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
52081 +  (eval $ac_compile) 2>conftest.er1
52082 +  ac_status=$?
52083 +  grep -v '^ *+' conftest.er1 >conftest.err
52084 +  rm -f conftest.er1
52085 +  cat conftest.err >&5
52086 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
52087 +  (exit $ac_status); } &&
52088 +        { ac_try='test -z "$ac_c_werror_flag"
52089 +                        || test ! -s conftest.err'
52090 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
52091 +  (eval $ac_try) 2>&5
52092 +  ac_status=$?
52093 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
52094 +  (exit $ac_status); }; } &&
52095 +        { ac_try='test -s conftest.$ac_objext'
52096 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
52097 +  (eval $ac_try) 2>&5
52098 +  ac_status=$?
52099 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
52100 +  (exit $ac_status); }; }; then
52101 +  echo "$as_me:$LINENO: result: yes" >&5
52102 +echo "${ECHO_T}yes" >&6
52103 +else
52104 +  echo "$as_me: failed program was:" >&5
52105 +sed 's/^/| /' conftest.$ac_ext >&5
52106 +
52107 +echo "$as_me:$LINENO: result: no" >&5
52108 +echo "${ECHO_T}no" >&6
52109 +
52110 +cat >>confdefs.h <<\_ACEOF
52111 +#define socklen_t unsigned int
52112 +_ACEOF
52113 +
52114 +
52115 +fi
52116 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
52117 +
52118 +echo "$as_me:$LINENO: checking whether our compiler supports __func__" >&5
52119 +echo $ECHO_N "checking whether our compiler supports __func__... $ECHO_C" >&6
52120 +cat >conftest.$ac_ext <<_ACEOF
52121 +/* confdefs.h.  */
52122 +_ACEOF
52123 +cat confdefs.h >>conftest.$ac_ext
52124 +cat >>conftest.$ac_ext <<_ACEOF
52125 +/* end confdefs.h.  */
52126 +
52127 +int
52128 +main ()
52129 +{
52130 +void foo() { const char *cp = __func__; }
52131 +  ;
52132 +  return 0;
52133 +}
52134 +_ACEOF
52135 +rm -f conftest.$ac_objext
52136 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
52137 +  (eval $ac_compile) 2>conftest.er1
52138 +  ac_status=$?
52139 +  grep -v '^ *+' conftest.er1 >conftest.err
52140 +  rm -f conftest.er1
52141 +  cat conftest.err >&5
52142 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
52143 +  (exit $ac_status); } &&
52144 +        { ac_try='test -z "$ac_c_werror_flag"
52145 +                        || test ! -s conftest.err'
52146 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
52147 +  (eval $ac_try) 2>&5
52148 +  ac_status=$?
52149 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
52150 +  (exit $ac_status); }; } &&
52151 +        { ac_try='test -s conftest.$ac_objext'
52152 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
52153 +  (eval $ac_try) 2>&5
52154 +  ac_status=$?
52155 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
52156 +  (exit $ac_status); }; }; then
52157 +  echo "$as_me:$LINENO: result: yes" >&5
52158 +echo "${ECHO_T}yes" >&6
52159 +else
52160 +  echo "$as_me: failed program was:" >&5
52161 +sed 's/^/| /' conftest.$ac_ext >&5
52162 +
52163 +echo "$as_me:$LINENO: result: no" >&5
52164 +echo "${ECHO_T}no" >&6
52165 + echo "$as_me:$LINENO: checking whether our compiler supports __FUNCTION__" >&5
52166 +echo $ECHO_N "checking whether our compiler supports __FUNCTION__... $ECHO_C" >&6
52167 + cat >conftest.$ac_ext <<_ACEOF
52168 +/* confdefs.h.  */
52169 +_ACEOF
52170 +cat confdefs.h >>conftest.$ac_ext
52171 +cat >>conftest.$ac_ext <<_ACEOF
52172 +/* end confdefs.h.  */
52173 +
52174 +int
52175 +main ()
52176 +{
52177 +void foo() { const char *cp = __FUNCTION__; }
52178 +  ;
52179 +  return 0;
52180 +}
52181 +_ACEOF
52182 +rm -f conftest.$ac_objext
52183 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
52184 +  (eval $ac_compile) 2>conftest.er1
52185 +  ac_status=$?
52186 +  grep -v '^ *+' conftest.er1 >conftest.err
52187 +  rm -f conftest.er1
52188 +  cat conftest.err >&5
52189 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
52190 +  (exit $ac_status); } &&
52191 +        { ac_try='test -z "$ac_c_werror_flag"
52192 +                        || test ! -s conftest.err'
52193 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
52194 +  (eval $ac_try) 2>&5
52195 +  ac_status=$?
52196 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
52197 +  (exit $ac_status); }; } &&
52198 +        { ac_try='test -s conftest.$ac_objext'
52199 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
52200 +  (eval $ac_try) 2>&5
52201 +  ac_status=$?
52202 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
52203 +  (exit $ac_status); }; }; then
52204 +  echo "$as_me:$LINENO: result: yes" >&5
52205 +echo "${ECHO_T}yes" >&6
52206 +
52207 +cat >>confdefs.h <<\_ACEOF
52208 +#define __func__ __FUNCTION__
52209 +_ACEOF
52210 +
52211 +else
52212 +  echo "$as_me: failed program was:" >&5
52213 +sed 's/^/| /' conftest.$ac_ext >&5
52214 +
52215 +echo "$as_me:$LINENO: result: no" >&5
52216 +echo "${ECHO_T}no" >&6
52217 +
52218 +cat >>confdefs.h <<\_ACEOF
52219 +#define __func__ __FILE__
52220 +_ACEOF
52221 +
52222 +fi
52223 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
52224 +fi
52225 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
52226 +
52227 +
52228 +          ac_config_files="$ac_config_files Makefile"
52229 +cat >confcache <<\_ACEOF
52230 +# This file is a shell script that caches the results of configure
52231 +# tests run on this system so they can be shared between configure
52232 +# scripts and configure runs, see configure's option --config-cache.
52233 +# It is not useful on other systems.  If it contains results you don't
52234 +# want to keep, you may remove or edit it.
52235 +#
52236 +# config.status only pays attention to the cache file if you give it
52237 +# the --recheck option to rerun configure.
52238 +#
52239 +# `ac_cv_env_foo' variables (set or unset) will be overridden when
52240 +# loading this file, other *unset* `ac_cv_foo' will be assigned the
52241 +# following values.
52242 +
52243 +_ACEOF
52244 +
52245 +# The following way of writing the cache mishandles newlines in values,
52246 +# but we know of no workaround that is simple, portable, and efficient.
52247 +# So, don't put newlines in cache variables' values.
52248 +# Ultrix sh set writes to stderr and can't be redirected directly,
52249 +# and sets the high bit in the cache file unless we assign to the vars.
52250 +{
52251 +  (set) 2>&1 |
52252 +    case `(ac_space=' '; set | grep ac_space) 2>&1` in
52253 +    *ac_space=\ *)
52254 +      # `set' does not quote correctly, so add quotes (double-quote
52255 +      # substitution turns \\\\ into \\, and sed turns \\ into \).
52256 +      sed -n \
52257 +       "s/'/'\\\\''/g;
52258 +         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
52259 +      ;;
52260 +    *)
52261 +      # `set' quotes correctly as required by POSIX, so do not add quotes.
52262 +      sed -n \
52263 +       "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
52264 +      ;;
52265 +    esac;
52266 +} |
52267 +  sed '
52268 +     t clear
52269 +     : clear
52270 +     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
52271 +     t end
52272 +     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
52273 +     : end' >>confcache
52274 +if diff $cache_file confcache >/dev/null 2>&1; then :; else
52275 +  if test -w $cache_file; then
52276 +    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
52277 +    cat confcache >$cache_file
52278 +  else
52279 +    echo "not updating unwritable cache $cache_file"
52280 +  fi
52281 +fi
52282 +rm -f confcache
52283 +
52284 +test "x$prefix" = xNONE && prefix=$ac_default_prefix
52285 +# Let make expand exec_prefix.
52286 +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
52287 +
52288 +# VPATH may cause trouble with some makes, so we remove $(srcdir),
52289 +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
52290 +# trailing colons and then remove the whole line if VPATH becomes empty
52291 +# (actually we leave an empty line to preserve line numbers).
52292 +if test "x$srcdir" = x.; then
52293 +  ac_vpsub='/^[         ]*VPATH[        ]*=/{
52294 +s/:*\$(srcdir):*/:/;
52295 +s/:*\${srcdir}:*/:/;
52296 +s/:*@srcdir@:*/:/;
52297 +s/^\([^=]*=[    ]*\):*/\1/;
52298 +s/:*$//;
52299 +s/^[^=]*=[      ]*$//;
52300 +}'
52301 +fi
52302 +
52303 +DEFS=-DHAVE_CONFIG_H
52304 +
52305 +ac_libobjs=
52306 +ac_ltlibobjs=
52307 +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
52308 +  # 1. Remove the extension, and $U if already installed.
52309 +  ac_i=`echo "$ac_i" |
52310 +        sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
52311 +  # 2. Add them.
52312 +  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
52313 +  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
52314 +done
52315 +LIBOBJS=$ac_libobjs
52316 +
52317 +LTLIBOBJS=$ac_ltlibobjs
52318 +
52319 +
52320 +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
52321 +  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
52322 +Usually this means the macro was only invoked conditionally." >&5
52323 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
52324 +Usually this means the macro was only invoked conditionally." >&2;}
52325 +   { (exit 1); exit 1; }; }
52326 +fi
52327 +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
52328 +  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
52329 +Usually this means the macro was only invoked conditionally." >&5
52330 +echo "$as_me: error: conditional \"AMDEP\" was never defined.
52331 +Usually this means the macro was only invoked conditionally." >&2;}
52332 +   { (exit 1); exit 1; }; }
52333 +fi
52334 +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
52335 +  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
52336 +Usually this means the macro was only invoked conditionally." >&5
52337 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
52338 +Usually this means the macro was only invoked conditionally." >&2;}
52339 +   { (exit 1); exit 1; }; }
52340 +fi
52341 +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
52342 +  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
52343 +Usually this means the macro was only invoked conditionally." >&5
52344 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
52345 +Usually this means the macro was only invoked conditionally." >&2;}
52346 +   { (exit 1); exit 1; }; }
52347 +fi
52348 +if test -z "${BUILD_WIN32_TRUE}" && test -z "${BUILD_WIN32_FALSE}"; then
52349 +  { { echo "$as_me:$LINENO: error: conditional \"BUILD_WIN32\" was never defined.
52350 +Usually this means the macro was only invoked conditionally." >&5
52351 +echo "$as_me: error: conditional \"BUILD_WIN32\" was never defined.
52352 +Usually this means the macro was only invoked conditionally." >&2;}
52353 +   { (exit 1); exit 1; }; }
52354 +fi
52355 +
52356 +: ${CONFIG_STATUS=./config.status}
52357 +ac_clean_files_save=$ac_clean_files
52358 +ac_clean_files="$ac_clean_files $CONFIG_STATUS"
52359 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
52360 +echo "$as_me: creating $CONFIG_STATUS" >&6;}
52361 +cat >$CONFIG_STATUS <<_ACEOF
52362 +#! $SHELL
52363 +# Generated by $as_me.
52364 +# Run this file to recreate the current configuration.
52365 +# Compiler output produced by configure, useful for debugging
52366 +# configure, is in config.log if it exists.
52367 +
52368 +debug=false
52369 +ac_cs_recheck=false
52370 +ac_cs_silent=false
52371 +SHELL=\${CONFIG_SHELL-$SHELL}
52372 +_ACEOF
52373 +
52374 +cat >>$CONFIG_STATUS <<\_ACEOF
52375 +## --------------------- ##
52376 +## M4sh Initialization.  ##
52377 +## --------------------- ##
52378 +
52379 +# Be Bourne compatible
52380 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
52381 +  emulate sh
52382 +  NULLCMD=:
52383 +  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
52384 +  # is contrary to our usage.  Disable this feature.
52385 +  alias -g '${1+"$@"}'='"$@"'
52386 +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
52387 +  set -o posix
52388 +fi
52389 +DUALCASE=1; export DUALCASE # for MKS sh
52390 +
52391 +# Support unset when possible.
52392 +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
52393 +  as_unset=unset
52394 +else
52395 +  as_unset=false
52396 +fi
52397 +
52398 +
52399 +# Work around bugs in pre-3.0 UWIN ksh.
52400 +$as_unset ENV MAIL MAILPATH
52401 +PS1='$ '
52402 +PS2='> '
52403 +PS4='+ '
52404 +
52405 +# NLS nuisances.
52406 +for as_var in \
52407 +  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
52408 +  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
52409 +  LC_TELEPHONE LC_TIME
52410 +do
52411 +  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
52412 +    eval $as_var=C; export $as_var
52413 +  else
52414 +    $as_unset $as_var
52415 +  fi
52416 +done
52417 +
52418 +# Required to use basename.
52419 +if expr a : '\(a\)' >/dev/null 2>&1; then
52420 +  as_expr=expr
52421 +else
52422 +  as_expr=false
52423 +fi
52424 +
52425 +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
52426 +  as_basename=basename
52427 +else
52428 +  as_basename=false
52429 +fi
52430 +
52431 +
52432 +# Name of the executable.
52433 +as_me=`$as_basename "$0" ||
52434 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
52435 +        X"$0" : 'X\(//\)$' \| \
52436 +        X"$0" : 'X\(/\)$' \| \
52437 +        .     : '\(.\)' 2>/dev/null ||
52438 +echo X/"$0" |
52439 +    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
52440 +         /^X\/\(\/\/\)$/{ s//\1/; q; }
52441 +         /^X\/\(\/\).*/{ s//\1/; q; }
52442 +         s/.*/./; q'`
52443 +
52444 +
52445 +# PATH needs CR, and LINENO needs CR and PATH.
52446 +# Avoid depending upon Character Ranges.
52447 +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
52448 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
52449 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
52450 +as_cr_digits='0123456789'
52451 +as_cr_alnum=$as_cr_Letters$as_cr_digits
52452 +
52453 +# The user is always right.
52454 +if test "${PATH_SEPARATOR+set}" != set; then
52455 +  echo "#! /bin/sh" >conf$$.sh
52456 +  echo  "exit 0"   >>conf$$.sh
52457 +  chmod +x conf$$.sh
52458 +  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
52459 +    PATH_SEPARATOR=';'
52460 +  else
52461 +    PATH_SEPARATOR=:
52462 +  fi
52463 +  rm -f conf$$.sh
52464 +fi
52465 +
52466 +
52467 +  as_lineno_1=$LINENO
52468 +  as_lineno_2=$LINENO
52469 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
52470 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
52471 +  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
52472 +  # Find who we are.  Look in the path if we contain no path at all
52473 +  # relative or not.
52474 +  case $0 in
52475 +    *[\\/]* ) as_myself=$0 ;;
52476 +    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52477 +for as_dir in $PATH
52478 +do
52479 +  IFS=$as_save_IFS
52480 +  test -z "$as_dir" && as_dir=.
52481 +  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
52482 +done
52483 +
52484 +       ;;
52485 +  esac
52486 +  # We did not find ourselves, most probably we were run as `sh COMMAND'
52487 +  # in which case we are not to be found in the path.
52488 +  if test "x$as_myself" = x; then
52489 +    as_myself=$0
52490 +  fi
52491 +  if test ! -f "$as_myself"; then
52492 +    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
52493 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
52494 +   { (exit 1); exit 1; }; }
52495 +  fi
52496 +  case $CONFIG_SHELL in
52497 +  '')
52498 +    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52499 +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
52500 +do
52501 +  IFS=$as_save_IFS
52502 +  test -z "$as_dir" && as_dir=.
52503 +  for as_base in sh bash ksh sh5; do
52504 +        case $as_dir in
52505 +        /*)
52506 +          if ("$as_dir/$as_base" -c '
52507 +  as_lineno_1=$LINENO
52508 +  as_lineno_2=$LINENO
52509 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
52510 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
52511 +  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
52512 +            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
52513 +            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
52514 +            CONFIG_SHELL=$as_dir/$as_base
52515 +            export CONFIG_SHELL
52516 +            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
52517 +          fi;;
52518 +        esac
52519 +       done
52520 +done
52521 +;;
52522 +  esac
52523 +
52524 +  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
52525 +  # uniformly replaced by the line number.  The first 'sed' inserts a
52526 +  # line-number line before each line; the second 'sed' does the real
52527 +  # work.  The second script uses 'N' to pair each line-number line
52528 +  # with the numbered line, and appends trailing '-' during
52529 +  # substitution so that $LINENO is not a special case at line end.
52530 +  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
52531 +  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
52532 +  sed '=' <$as_myself |
52533 +    sed '
52534 +      N
52535 +      s,$,-,
52536 +      : loop
52537 +      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
52538 +      t loop
52539 +      s,-$,,
52540 +      s,^['$as_cr_digits']*\n,,
52541 +    ' >$as_me.lineno &&
52542 +  chmod +x $as_me.lineno ||
52543 +    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
52544 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
52545 +   { (exit 1); exit 1; }; }
52546 +
52547 +  # Don't try to exec as it changes $[0], causing all sort of problems
52548 +  # (the dirname of $[0] is not the place where we might find the
52549 +  # original and so on.  Autoconf is especially sensible to this).
52550 +  . ./$as_me.lineno
52551 +  # Exit status is that of the last command.
52552 +  exit
52553 +}
52554 +
52555 +
52556 +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
52557 +  *c*,-n*) ECHO_N= ECHO_C='
52558 +' ECHO_T='     ' ;;
52559 +  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
52560 +  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
52561 +esac
52562 +
52563 +if expr a : '\(a\)' >/dev/null 2>&1; then
52564 +  as_expr=expr
52565 +else
52566 +  as_expr=false
52567 +fi
52568 +
52569 +rm -f conf$$ conf$$.exe conf$$.file
52570 +echo >conf$$.file
52571 +if ln -s conf$$.file conf$$ 2>/dev/null; then
52572 +  # We could just check for DJGPP; but this test a) works b) is more generic
52573 +  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
52574 +  if test -f conf$$.exe; then
52575 +    # Don't use ln at all; we don't have any links
52576 +    as_ln_s='cp -p'
52577 +  else
52578 +    as_ln_s='ln -s'
52579 +  fi
52580 +elif ln conf$$.file conf$$ 2>/dev/null; then
52581 +  as_ln_s=ln
52582 +else
52583 +  as_ln_s='cp -p'
52584 +fi
52585 +rm -f conf$$ conf$$.exe conf$$.file
52586 +
52587 +if mkdir -p . 2>/dev/null; then
52588 +  as_mkdir_p=:
52589 +else
52590 +  test -d ./-p && rmdir ./-p
52591 +  as_mkdir_p=false
52592 +fi
52593 +
52594 +as_executable_p="test -f"
52595 +
52596 +# Sed expression to map a string onto a valid CPP name.
52597 +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52598 +
52599 +# Sed expression to map a string onto a valid variable name.
52600 +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52601 +
52602 +
52603 +# IFS
52604 +# We need space, tab and new line, in precisely that order.
52605 +as_nl='
52606 +'
52607 +IFS="  $as_nl"
52608 +
52609 +# CDPATH.
52610 +$as_unset CDPATH
52611 +
52612 +exec 6>&1
52613 +
52614 +# Open the log real soon, to keep \$[0] and so on meaningful, and to
52615 +# report actual input values of CONFIG_FILES etc. instead of their
52616 +# values after options handling.  Logging --version etc. is OK.
52617 +exec 5>>config.log
52618 +{
52619 +  echo
52620 +  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52621 +## Running $as_me. ##
52622 +_ASBOX
52623 +} >&5
52624 +cat >&5 <<_CSEOF
52625 +
52626 +This file was extended by $as_me, which was
52627 +generated by GNU Autoconf 2.59.  Invocation command line was
52628 +
52629 +  CONFIG_FILES    = $CONFIG_FILES
52630 +  CONFIG_HEADERS  = $CONFIG_HEADERS
52631 +  CONFIG_LINKS    = $CONFIG_LINKS
52632 +  CONFIG_COMMANDS = $CONFIG_COMMANDS
52633 +  $ $0 $@
52634 +
52635 +_CSEOF
52636 +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
52637 +echo >&5
52638 +_ACEOF
52639 +
52640 +# Files that config.status was made for.
52641 +if test -n "$ac_config_files"; then
52642 +  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
52643 +fi
52644 +
52645 +if test -n "$ac_config_headers"; then
52646 +  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
52647 +fi
52648 +
52649 +if test -n "$ac_config_links"; then
52650 +  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
52651 +fi
52652 +
52653 +if test -n "$ac_config_commands"; then
52654 +  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
52655 +fi
52656 +
52657 +cat >>$CONFIG_STATUS <<\_ACEOF
52658 +
52659 +ac_cs_usage="\
52660 +\`$as_me' instantiates files from templates according to the
52661 +current configuration.
52662 +
52663 +Usage: $0 [OPTIONS] [FILE]...
52664 +
52665 +  -h, --help       print this help, then exit
52666 +  -V, --version    print version number, then exit
52667 +  -q, --quiet      do not print progress messages
52668 +  -d, --debug      don't remove temporary files
52669 +      --recheck    update $as_me by reconfiguring in the same conditions
52670 +  --file=FILE[:TEMPLATE]
52671 +                  instantiate the configuration file FILE
52672 +  --header=FILE[:TEMPLATE]
52673 +                  instantiate the configuration header FILE
52674 +
52675 +Configuration files:
52676 +$config_files
52677 +
52678 +Configuration headers:
52679 +$config_headers
52680 +
52681 +Configuration commands:
52682 +$config_commands
52683 +
52684 +Report bugs to <bug-autoconf@gnu.org>."
52685 +_ACEOF
52686 +
52687 +cat >>$CONFIG_STATUS <<_ACEOF
52688 +ac_cs_version="\\
52689 +config.status
52690 +configured by $0, generated by GNU Autoconf 2.59,
52691 +  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
52692 +
52693 +Copyright (C) 2003 Free Software Foundation, Inc.
52694 +This config.status script is free software; the Free Software Foundation
52695 +gives unlimited permission to copy, distribute and modify it."
52696 +srcdir=$srcdir
52697 +INSTALL="$INSTALL"
52698 +_ACEOF
52699 +
52700 +cat >>$CONFIG_STATUS <<\_ACEOF
52701 +# If no file are specified by the user, then we need to provide default
52702 +# value.  By we need to know if files were specified by the user.
52703 +ac_need_defaults=:
52704 +while test $# != 0
52705 +do
52706 +  case $1 in
52707 +  --*=*)
52708 +    ac_option=`expr "x$1" : 'x\([^=]*\)='`
52709 +    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
52710 +    ac_shift=:
52711 +    ;;
52712 +  -*)
52713 +    ac_option=$1
52714 +    ac_optarg=$2
52715 +    ac_shift=shift
52716 +    ;;
52717 +  *) # This is not an option, so the user has probably given explicit
52718 +     # arguments.
52719 +     ac_option=$1
52720 +     ac_need_defaults=false;;
52721 +  esac
52722 +
52723 +  case $ac_option in
52724 +  # Handling of the options.
52725 +_ACEOF
52726 +cat >>$CONFIG_STATUS <<\_ACEOF
52727 +  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52728 +    ac_cs_recheck=: ;;
52729 +  --version | --vers* | -V )
52730 +    echo "$ac_cs_version"; exit 0 ;;
52731 +  --he | --h)
52732 +    # Conflict between --help and --header
52733 +    { { echo "$as_me:$LINENO: error: ambiguous option: $1
52734 +Try \`$0 --help' for more information." >&5
52735 +echo "$as_me: error: ambiguous option: $1
52736 +Try \`$0 --help' for more information." >&2;}
52737 +   { (exit 1); exit 1; }; };;
52738 +  --help | --hel | -h )
52739 +    echo "$ac_cs_usage"; exit 0 ;;
52740 +  --debug | --d* | -d )
52741 +    debug=: ;;
52742 +  --file | --fil | --fi | --f )
52743 +    $ac_shift
52744 +    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
52745 +    ac_need_defaults=false;;
52746 +  --header | --heade | --head | --hea )
52747 +    $ac_shift
52748 +    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
52749 +    ac_need_defaults=false;;
52750 +  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52751 +  | -silent | --silent | --silen | --sile | --sil | --si | --s)
52752 +    ac_cs_silent=: ;;
52753 +
52754 +  # This is an error.
52755 +  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
52756 +Try \`$0 --help' for more information." >&5
52757 +echo "$as_me: error: unrecognized option: $1
52758 +Try \`$0 --help' for more information." >&2;}
52759 +   { (exit 1); exit 1; }; } ;;
52760 +
52761 +  *) ac_config_targets="$ac_config_targets $1" ;;
52762 +
52763 +  esac
52764 +  shift
52765 +done
52766 +
52767 +ac_configure_extra_args=
52768 +
52769 +if $ac_cs_silent; then
52770 +  exec 6>/dev/null
52771 +  ac_configure_extra_args="$ac_configure_extra_args --silent"
52772 +fi
52773 +
52774 +_ACEOF
52775 +cat >>$CONFIG_STATUS <<_ACEOF
52776 +if \$ac_cs_recheck; then
52777 +  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
52778 +  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52779 +fi
52780 +
52781 +_ACEOF
52782 +
52783 +cat >>$CONFIG_STATUS <<_ACEOF
52784 +#
52785 +# INIT-COMMANDS section.
52786 +#
52787 +
52788 +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
52789 +
52790 +_ACEOF
52791 +
52792 +
52793 +
52794 +cat >>$CONFIG_STATUS <<\_ACEOF
52795 +for ac_config_target in $ac_config_targets
52796 +do
52797 +  case "$ac_config_target" in
52798 +  # Handling of arguments.
52799 +  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
52800 +  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
52801 +  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
52802 +  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
52803 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
52804 +   { (exit 1); exit 1; }; };;
52805 +  esac
52806 +done
52807 +
52808 +# If the user did not use the arguments to specify the items to instantiate,
52809 +# then the envvar interface is used.  Set only those that are not.
52810 +# We use the long form for the default assignment because of an extremely
52811 +# bizarre bug on SunOS 4.1.3.
52812 +if $ac_need_defaults; then
52813 +  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52814 +  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
52815 +  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
52816 +fi
52817 +
52818 +# Have a temporary directory for convenience.  Make it in the build tree
52819 +# simply because there is no reason to put it here, and in addition,
52820 +# creating and moving files from /tmp can sometimes cause problems.
52821 +# Create a temporary directory, and hook for its removal unless debugging.
52822 +$debug ||
52823 +{
52824 +  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
52825 +  trap '{ (exit 1); exit 1; }' 1 2 13 15
52826 +}
52827 +
52828 +# Create a (secure) tmp directory for tmp files.
52829 +
52830 +{
52831 +  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
52832 +  test -n "$tmp" && test -d "$tmp"
52833 +}  ||
52834 +{
52835 +  tmp=./confstat$$-$RANDOM
52836 +  (umask 077 && mkdir $tmp)
52837 +} ||
52838 +{
52839 +   echo "$me: cannot create a temporary directory in ." >&2
52840 +   { (exit 1); exit 1; }
52841 +}
52842 +
52843 +_ACEOF
52844 +
52845 +cat >>$CONFIG_STATUS <<_ACEOF
52846 +
52847 +#
52848 +# CONFIG_FILES section.
52849 +#
52850 +
52851 +# No need to generate the scripts if there are no CONFIG_FILES.
52852 +# This happens for instance when ./config.status config.h
52853 +if test -n "\$CONFIG_FILES"; then
52854 +  # Protect against being on the right side of a sed subst in config.status.
52855 +  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
52856 +   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
52857 +s,@SHELL@,$SHELL,;t t
52858 +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
52859 +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
52860 +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
52861 +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
52862 +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
52863 +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
52864 +s,@exec_prefix@,$exec_prefix,;t t
52865 +s,@prefix@,$prefix,;t t
52866 +s,@program_transform_name@,$program_transform_name,;t t
52867 +s,@bindir@,$bindir,;t t
52868 +s,@sbindir@,$sbindir,;t t
52869 +s,@libexecdir@,$libexecdir,;t t
52870 +s,@datadir@,$datadir,;t t
52871 +s,@sysconfdir@,$sysconfdir,;t t
52872 +s,@sharedstatedir@,$sharedstatedir,;t t
52873 +s,@localstatedir@,$localstatedir,;t t
52874 +s,@libdir@,$libdir,;t t
52875 +s,@includedir@,$includedir,;t t
52876 +s,@oldincludedir@,$oldincludedir,;t t
52877 +s,@infodir@,$infodir,;t t
52878 +s,@mandir@,$mandir,;t t
52879 +s,@build_alias@,$build_alias,;t t
52880 +s,@host_alias@,$host_alias,;t t
52881 +s,@target_alias@,$target_alias,;t t
52882 +s,@DEFS@,$DEFS,;t t
52883 +s,@ECHO_C@,$ECHO_C,;t t
52884 +s,@ECHO_N@,$ECHO_N,;t t
52885 +s,@ECHO_T@,$ECHO_T,;t t
52886 +s,@LIBS@,$LIBS,;t t
52887 +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
52888 +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
52889 +s,@INSTALL_DATA@,$INSTALL_DATA,;t t
52890 +s,@CYGPATH_W@,$CYGPATH_W,;t t
52891 +s,@PACKAGE@,$PACKAGE,;t t
52892 +s,@VERSION@,$VERSION,;t t
52893 +s,@ACLOCAL@,$ACLOCAL,;t t
52894 +s,@AUTOCONF@,$AUTOCONF,;t t
52895 +s,@AUTOMAKE@,$AUTOMAKE,;t t
52896 +s,@AUTOHEADER@,$AUTOHEADER,;t t
52897 +s,@MAKEINFO@,$MAKEINFO,;t t
52898 +s,@install_sh@,$install_sh,;t t
52899 +s,@STRIP@,$STRIP,;t t
52900 +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
52901 +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
52902 +s,@mkdir_p@,$mkdir_p,;t t
52903 +s,@AWK@,$AWK,;t t
52904 +s,@SET_MAKE@,$SET_MAKE,;t t
52905 +s,@am__leading_dot@,$am__leading_dot,;t t
52906 +s,@AMTAR@,$AMTAR,;t t
52907 +s,@am__tar@,$am__tar,;t t
52908 +s,@am__untar@,$am__untar,;t t
52909 +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
52910 +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
52911 +s,@MAINT@,$MAINT,;t t
52912 +s,@CC@,$CC,;t t
52913 +s,@CFLAGS@,$CFLAGS,;t t
52914 +s,@LDFLAGS@,$LDFLAGS,;t t
52915 +s,@CPPFLAGS@,$CPPFLAGS,;t t
52916 +s,@ac_ct_CC@,$ac_ct_CC,;t t
52917 +s,@EXEEXT@,$EXEEXT,;t t
52918 +s,@OBJEXT@,$OBJEXT,;t t
52919 +s,@DEPDIR@,$DEPDIR,;t t
52920 +s,@am__include@,$am__include,;t t
52921 +s,@am__quote@,$am__quote,;t t
52922 +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
52923 +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
52924 +s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
52925 +s,@CCDEPMODE@,$CCDEPMODE,;t t
52926 +s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
52927 +s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
52928 +s,@LN_S@,$LN_S,;t t
52929 +s,@CPP@,$CPP,;t t
52930 +s,@EGREP@,$EGREP,;t t
52931 +s,@build@,$build,;t t
52932 +s,@build_cpu@,$build_cpu,;t t
52933 +s,@build_vendor@,$build_vendor,;t t
52934 +s,@build_os@,$build_os,;t t
52935 +s,@host@,$host,;t t
52936 +s,@host_cpu@,$host_cpu,;t t
52937 +s,@host_vendor@,$host_vendor,;t t
52938 +s,@host_os@,$host_os,;t t
52939 +s,@ECHO@,$ECHO,;t t
52940 +s,@AR@,$AR,;t t
52941 +s,@ac_ct_AR@,$ac_ct_AR,;t t
52942 +s,@RANLIB@,$RANLIB,;t t
52943 +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
52944 +s,@CXX@,$CXX,;t t
52945 +s,@CXXFLAGS@,$CXXFLAGS,;t t
52946 +s,@ac_ct_CXX@,$ac_ct_CXX,;t t
52947 +s,@CXXDEPMODE@,$CXXDEPMODE,;t t
52948 +s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
52949 +s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
52950 +s,@CXXCPP@,$CXXCPP,;t t
52951 +s,@F77@,$F77,;t t
52952 +s,@FFLAGS@,$FFLAGS,;t t
52953 +s,@ac_ct_F77@,$ac_ct_F77,;t t
52954 +s,@LIBTOOL@,$LIBTOOL,;t t
52955 +s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t
52956 +s,@BUILD_WIN32_TRUE@,$BUILD_WIN32_TRUE,;t t
52957 +s,@BUILD_WIN32_FALSE@,$BUILD_WIN32_FALSE,;t t
52958 +s,@LIBOBJS@,$LIBOBJS,;t t
52959 +s,@LTLIBOBJS@,$LTLIBOBJS,;t t
52960 +CEOF
52961 +
52962 +_ACEOF
52963 +
52964 +  cat >>$CONFIG_STATUS <<\_ACEOF
52965 +  # Split the substitutions into bite-sized pieces for seds with
52966 +  # small command number limits, like on Digital OSF/1 and HP-UX.
52967 +  ac_max_sed_lines=48
52968 +  ac_sed_frag=1 # Number of current file.
52969 +  ac_beg=1 # First line for current file.
52970 +  ac_end=$ac_max_sed_lines # Line after last line for current file.
52971 +  ac_more_lines=:
52972 +  ac_sed_cmds=
52973 +  while $ac_more_lines; do
52974 +    if test $ac_beg -gt 1; then
52975 +      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
52976 +    else
52977 +      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
52978 +    fi
52979 +    if test ! -s $tmp/subs.frag; then
52980 +      ac_more_lines=false
52981 +    else
52982 +      # The purpose of the label and of the branching condition is to
52983 +      # speed up the sed processing (if there are no `@' at all, there
52984 +      # is no need to browse any of the substitutions).
52985 +      # These are the two extra sed commands mentioned above.
52986 +      (echo ':t
52987 +  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
52988 +      if test -z "$ac_sed_cmds"; then
52989 +       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
52990 +      else
52991 +       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
52992 +      fi
52993 +      ac_sed_frag=`expr $ac_sed_frag + 1`
52994 +      ac_beg=$ac_end
52995 +      ac_end=`expr $ac_end + $ac_max_sed_lines`
52996 +    fi
52997 +  done
52998 +  if test -z "$ac_sed_cmds"; then
52999 +    ac_sed_cmds=cat
53000 +  fi
53001 +fi # test -n "$CONFIG_FILES"
53002 +
53003 +_ACEOF
53004 +cat >>$CONFIG_STATUS <<\_ACEOF
53005 +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
53006 +  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
53007 +  case $ac_file in
53008 +  - | *:- | *:-:* ) # input from stdin
53009 +       cat >$tmp/stdin
53010 +       ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
53011 +       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
53012 +  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
53013 +       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
53014 +  * )   ac_file_in=$ac_file.in ;;
53015 +  esac
53016 +
53017 +  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
53018 +  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
53019 +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53020 +        X"$ac_file" : 'X\(//\)[^/]' \| \
53021 +        X"$ac_file" : 'X\(//\)$' \| \
53022 +        X"$ac_file" : 'X\(/\)' \| \
53023 +        .     : '\(.\)' 2>/dev/null ||
53024 +echo X"$ac_file" |
53025 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
53026 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
53027 +         /^X\(\/\/\)$/{ s//\1/; q; }
53028 +         /^X\(\/\).*/{ s//\1/; q; }
53029 +         s/.*/./; q'`
53030 +  { if $as_mkdir_p; then
53031 +    mkdir -p "$ac_dir"
53032 +  else
53033 +    as_dir="$ac_dir"
53034 +    as_dirs=
53035 +    while test ! -d "$as_dir"; do
53036 +      as_dirs="$as_dir $as_dirs"
53037 +      as_dir=`(dirname "$as_dir") 2>/dev/null ||
53038 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53039 +        X"$as_dir" : 'X\(//\)[^/]' \| \
53040 +        X"$as_dir" : 'X\(//\)$' \| \
53041 +        X"$as_dir" : 'X\(/\)' \| \
53042 +        .     : '\(.\)' 2>/dev/null ||
53043 +echo X"$as_dir" |
53044 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
53045 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
53046 +         /^X\(\/\/\)$/{ s//\1/; q; }
53047 +         /^X\(\/\).*/{ s//\1/; q; }
53048 +         s/.*/./; q'`
53049 +    done
53050 +    test ! -n "$as_dirs" || mkdir $as_dirs
53051 +  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
53052 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
53053 +   { (exit 1); exit 1; }; }; }
53054 +
53055 +  ac_builddir=.
53056 +
53057 +if test "$ac_dir" != .; then
53058 +  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
53059 +  # A "../" for each directory in $ac_dir_suffix.
53060 +  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
53061 +else
53062 +  ac_dir_suffix= ac_top_builddir=
53063 +fi
53064 +
53065 +case $srcdir in
53066 +  .)  # No --srcdir option.  We are building in place.
53067 +    ac_srcdir=.
53068 +    if test -z "$ac_top_builddir"; then
53069 +       ac_top_srcdir=.
53070 +    else
53071 +       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
53072 +    fi ;;
53073 +  [\\/]* | ?:[\\/]* )  # Absolute path.
53074 +    ac_srcdir=$srcdir$ac_dir_suffix;
53075 +    ac_top_srcdir=$srcdir ;;
53076 +  *) # Relative path.
53077 +    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
53078 +    ac_top_srcdir=$ac_top_builddir$srcdir ;;
53079 +esac
53080 +
53081 +# Do not use `cd foo && pwd` to compute absolute paths, because
53082 +# the directories may not exist.
53083 +case `pwd` in
53084 +.) ac_abs_builddir="$ac_dir";;
53085 +*)
53086 +  case "$ac_dir" in
53087 +  .) ac_abs_builddir=`pwd`;;
53088 +  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
53089 +  *) ac_abs_builddir=`pwd`/"$ac_dir";;
53090 +  esac;;
53091 +esac
53092 +case $ac_abs_builddir in
53093 +.) ac_abs_top_builddir=${ac_top_builddir}.;;
53094 +*)
53095 +  case ${ac_top_builddir}. in
53096 +  .) ac_abs_top_builddir=$ac_abs_builddir;;
53097 +  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
53098 +  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
53099 +  esac;;
53100 +esac
53101 +case $ac_abs_builddir in
53102 +.) ac_abs_srcdir=$ac_srcdir;;
53103 +*)
53104 +  case $ac_srcdir in
53105 +  .) ac_abs_srcdir=$ac_abs_builddir;;
53106 +  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
53107 +  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
53108 +  esac;;
53109 +esac
53110 +case $ac_abs_builddir in
53111 +.) ac_abs_top_srcdir=$ac_top_srcdir;;
53112 +*)
53113 +  case $ac_top_srcdir in
53114 +  .) ac_abs_top_srcdir=$ac_abs_builddir;;
53115 +  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
53116 +  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
53117 +  esac;;
53118 +esac
53119 +
53120 +
53121 +  case $INSTALL in
53122 +  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
53123 +  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
53124 +  esac
53125 +
53126 +  if test x"$ac_file" != x-; then
53127 +    { echo "$as_me:$LINENO: creating $ac_file" >&5
53128 +echo "$as_me: creating $ac_file" >&6;}
53129 +    rm -f "$ac_file"
53130 +  fi
53131 +  # Let's still pretend it is `configure' which instantiates (i.e., don't
53132 +  # use $as_me), people would be surprised to read:
53133 +  #    /* config.h.  Generated by config.status.  */
53134 +  if test x"$ac_file" = x-; then
53135 +    configure_input=
53136 +  else
53137 +    configure_input="$ac_file.  "
53138 +  fi
53139 +  configure_input=$configure_input"Generated from `echo $ac_file_in |
53140 +                                    sed 's,.*/,,'` by configure."
53141 +
53142 +  # First look for the input files in the build tree, otherwise in the
53143 +  # src tree.
53144 +  ac_file_inputs=`IFS=:
53145 +    for f in $ac_file_in; do
53146 +      case $f in
53147 +      -) echo $tmp/stdin ;;
53148 +      [\\/$]*)
53149 +        # Absolute (can't be DOS-style, as IFS=:)
53150 +        test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
53151 +echo "$as_me: error: cannot find input file: $f" >&2;}
53152 +   { (exit 1); exit 1; }; }
53153 +        echo "$f";;
53154 +      *) # Relative
53155 +        if test -f "$f"; then
53156 +          # Build tree
53157 +          echo "$f"
53158 +        elif test -f "$srcdir/$f"; then
53159 +          # Source tree
53160 +          echo "$srcdir/$f"
53161 +        else
53162 +          # /dev/null tree
53163 +          { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
53164 +echo "$as_me: error: cannot find input file: $f" >&2;}
53165 +   { (exit 1); exit 1; }; }
53166 +        fi;;
53167 +      esac
53168 +    done` || { (exit 1); exit 1; }
53169 +_ACEOF
53170 +cat >>$CONFIG_STATUS <<_ACEOF
53171 +  sed "$ac_vpsub
53172 +$extrasub
53173 +_ACEOF
53174 +cat >>$CONFIG_STATUS <<\_ACEOF
53175 +:t
53176 +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
53177 +s,@configure_input@,$configure_input,;t t
53178 +s,@srcdir@,$ac_srcdir,;t t
53179 +s,@abs_srcdir@,$ac_abs_srcdir,;t t
53180 +s,@top_srcdir@,$ac_top_srcdir,;t t
53181 +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
53182 +s,@builddir@,$ac_builddir,;t t
53183 +s,@abs_builddir@,$ac_abs_builddir,;t t
53184 +s,@top_builddir@,$ac_top_builddir,;t t
53185 +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
53186 +s,@INSTALL@,$ac_INSTALL,;t t
53187 +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
53188 +  rm -f $tmp/stdin
53189 +  if test x"$ac_file" != x-; then
53190 +    mv $tmp/out $ac_file
53191 +  else
53192 +    cat $tmp/out
53193 +    rm -f $tmp/out
53194 +  fi
53195 +
53196 +done
53197 +_ACEOF
53198 +cat >>$CONFIG_STATUS <<\_ACEOF
53199 +
53200 +#
53201 +# CONFIG_HEADER section.
53202 +#
53203 +
53204 +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
53205 +# NAME is the cpp macro being defined and VALUE is the value it is being given.
53206 +#
53207 +# ac_d sets the value in "#define NAME VALUE" lines.
53208 +ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
53209 +ac_dB='[        ].*$,\1#\2'
53210 +ac_dC=' '
53211 +ac_dD=',;t'
53212 +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
53213 +ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
53214 +ac_uB='$,\1#\2define\3'
53215 +ac_uC=' '
53216 +ac_uD=',;t'
53217 +
53218 +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
53219 +  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
53220 +  case $ac_file in
53221 +  - | *:- | *:-:* ) # input from stdin
53222 +       cat >$tmp/stdin
53223 +       ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
53224 +       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
53225 +  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
53226 +       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
53227 +  * )   ac_file_in=$ac_file.in ;;
53228 +  esac
53229 +
53230 +  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
53231 +echo "$as_me: creating $ac_file" >&6;}
53232 +
53233 +  # First look for the input files in the build tree, otherwise in the
53234 +  # src tree.
53235 +  ac_file_inputs=`IFS=:
53236 +    for f in $ac_file_in; do
53237 +      case $f in
53238 +      -) echo $tmp/stdin ;;
53239 +      [\\/$]*)
53240 +        # Absolute (can't be DOS-style, as IFS=:)
53241 +        test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
53242 +echo "$as_me: error: cannot find input file: $f" >&2;}
53243 +   { (exit 1); exit 1; }; }
53244 +        # Do quote $f, to prevent DOS paths from being IFS'd.
53245 +        echo "$f";;
53246 +      *) # Relative
53247 +        if test -f "$f"; then
53248 +          # Build tree
53249 +          echo "$f"
53250 +        elif test -f "$srcdir/$f"; then
53251 +          # Source tree
53252 +          echo "$srcdir/$f"
53253 +        else
53254 +          # /dev/null tree
53255 +          { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
53256 +echo "$as_me: error: cannot find input file: $f" >&2;}
53257 +   { (exit 1); exit 1; }; }
53258 +        fi;;
53259 +      esac
53260 +    done` || { (exit 1); exit 1; }
53261 +  # Remove the trailing spaces.
53262 +  sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
53263 +
53264 +_ACEOF
53265 +
53266 +# Transform confdefs.h into two sed scripts, `conftest.defines' and
53267 +# `conftest.undefs', that substitutes the proper values into
53268 +# config.h.in to produce config.h.  The first handles `#define'
53269 +# templates, and the second `#undef' templates.
53270 +# And first: Protect against being on the right side of a sed subst in
53271 +# config.status.  Protect against being in an unquoted here document
53272 +# in config.status.
53273 +rm -f conftest.defines conftest.undefs
53274 +# Using a here document instead of a string reduces the quoting nightmare.
53275 +# Putting comments in sed scripts is not portable.
53276 +#
53277 +# `end' is used to avoid that the second main sed command (meant for
53278 +# 0-ary CPP macros) applies to n-ary macro definitions.
53279 +# See the Autoconf documentation for `clear'.
53280 +cat >confdef2sed.sed <<\_ACEOF
53281 +s/[\\&,]/\\&/g
53282 +s,[\\$`],\\&,g
53283 +t clear
53284 +: clear
53285 +s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
53286 +t end
53287 +s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
53288 +: end
53289 +_ACEOF
53290 +# If some macros were called several times there might be several times
53291 +# the same #defines, which is useless.  Nevertheless, we may not want to
53292 +# sort them, since we want the *last* AC-DEFINE to be honored.
53293 +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
53294 +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
53295 +rm -f confdef2sed.sed
53296 +
53297 +# This sed command replaces #undef with comments.  This is necessary, for
53298 +# example, in the case of _POSIX_SOURCE, which is predefined and required
53299 +# on some systems where configure will not decide to define it.
53300 +cat >>conftest.undefs <<\_ACEOF
53301 +s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
53302 +_ACEOF
53303 +
53304 +# Break up conftest.defines because some shells have a limit on the size
53305 +# of here documents, and old seds have small limits too (100 cmds).
53306 +echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
53307 +echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
53308 +echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
53309 +echo '  :' >>$CONFIG_STATUS
53310 +rm -f conftest.tail
53311 +while grep . conftest.defines >/dev/null
53312 +do
53313 +  # Write a limited-size here document to $tmp/defines.sed.
53314 +  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
53315 +  # Speed up: don't consider the non `#define' lines.
53316 +  echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
53317 +  # Work around the forget-to-reset-the-flag bug.
53318 +  echo 't clr' >>$CONFIG_STATUS
53319 +  echo ': clr' >>$CONFIG_STATUS
53320 +  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
53321 +  echo 'CEOF
53322 +  sed -f $tmp/defines.sed $tmp/in >$tmp/out
53323 +  rm -f $tmp/in
53324 +  mv $tmp/out $tmp/in
53325 +' >>$CONFIG_STATUS
53326 +  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
53327 +  rm -f conftest.defines
53328 +  mv conftest.tail conftest.defines
53329 +done
53330 +rm -f conftest.defines
53331 +echo '  fi # grep' >>$CONFIG_STATUS
53332 +echo >>$CONFIG_STATUS
53333 +
53334 +# Break up conftest.undefs because some shells have a limit on the size
53335 +# of here documents, and old seds have small limits too (100 cmds).
53336 +echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
53337 +rm -f conftest.tail
53338 +while grep . conftest.undefs >/dev/null
53339 +do
53340 +  # Write a limited-size here document to $tmp/undefs.sed.
53341 +  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
53342 +  # Speed up: don't consider the non `#undef'
53343 +  echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
53344 +  # Work around the forget-to-reset-the-flag bug.
53345 +  echo 't clr' >>$CONFIG_STATUS
53346 +  echo ': clr' >>$CONFIG_STATUS
53347 +  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
53348 +  echo 'CEOF
53349 +  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
53350 +  rm -f $tmp/in
53351 +  mv $tmp/out $tmp/in
53352 +' >>$CONFIG_STATUS
53353 +  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
53354 +  rm -f conftest.undefs
53355 +  mv conftest.tail conftest.undefs
53356 +done
53357 +rm -f conftest.undefs
53358 +
53359 +cat >>$CONFIG_STATUS <<\_ACEOF
53360 +  # Let's still pretend it is `configure' which instantiates (i.e., don't
53361 +  # use $as_me), people would be surprised to read:
53362 +  #    /* config.h.  Generated by config.status.  */
53363 +  if test x"$ac_file" = x-; then
53364 +    echo "/* Generated by configure.  */" >$tmp/config.h
53365 +  else
53366 +    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
53367 +  fi
53368 +  cat $tmp/in >>$tmp/config.h
53369 +  rm -f $tmp/in
53370 +  if test x"$ac_file" != x-; then
53371 +    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
53372 +      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
53373 +echo "$as_me: $ac_file is unchanged" >&6;}
53374 +    else
53375 +      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
53376 +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53377 +        X"$ac_file" : 'X\(//\)[^/]' \| \
53378 +        X"$ac_file" : 'X\(//\)$' \| \
53379 +        X"$ac_file" : 'X\(/\)' \| \
53380 +        .     : '\(.\)' 2>/dev/null ||
53381 +echo X"$ac_file" |
53382 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
53383 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
53384 +         /^X\(\/\/\)$/{ s//\1/; q; }
53385 +         /^X\(\/\).*/{ s//\1/; q; }
53386 +         s/.*/./; q'`
53387 +      { if $as_mkdir_p; then
53388 +    mkdir -p "$ac_dir"
53389 +  else
53390 +    as_dir="$ac_dir"
53391 +    as_dirs=
53392 +    while test ! -d "$as_dir"; do
53393 +      as_dirs="$as_dir $as_dirs"
53394 +      as_dir=`(dirname "$as_dir") 2>/dev/null ||
53395 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53396 +        X"$as_dir" : 'X\(//\)[^/]' \| \
53397 +        X"$as_dir" : 'X\(//\)$' \| \
53398 +        X"$as_dir" : 'X\(/\)' \| \
53399 +        .     : '\(.\)' 2>/dev/null ||
53400 +echo X"$as_dir" |
53401 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
53402 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
53403 +         /^X\(\/\/\)$/{ s//\1/; q; }
53404 +         /^X\(\/\).*/{ s//\1/; q; }
53405 +         s/.*/./; q'`
53406 +    done
53407 +    test ! -n "$as_dirs" || mkdir $as_dirs
53408 +  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
53409 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
53410 +   { (exit 1); exit 1; }; }; }
53411 +
53412 +      rm -f $ac_file
53413 +      mv $tmp/config.h $ac_file
53414 +    fi
53415 +  else
53416 +    cat $tmp/config.h
53417 +    rm -f $tmp/config.h
53418 +  fi
53419 +# Compute $ac_file's index in $config_headers.
53420 +_am_stamp_count=1
53421 +for _am_header in $config_headers :; do
53422 +  case $_am_header in
53423 +    $ac_file | $ac_file:* )
53424 +      break ;;
53425 +    * )
53426 +      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
53427 +  esac
53428 +done
53429 +echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
53430 +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53431 +        X$ac_file : 'X\(//\)[^/]' \| \
53432 +        X$ac_file : 'X\(//\)$' \| \
53433 +        X$ac_file : 'X\(/\)' \| \
53434 +        .     : '\(.\)' 2>/dev/null ||
53435 +echo X$ac_file |
53436 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
53437 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
53438 +         /^X\(\/\/\)$/{ s//\1/; q; }
53439 +         /^X\(\/\).*/{ s//\1/; q; }
53440 +         s/.*/./; q'`/stamp-h$_am_stamp_count
53441 +done
53442 +_ACEOF
53443 +cat >>$CONFIG_STATUS <<\_ACEOF
53444 +
53445 +#
53446 +# CONFIG_COMMANDS section.
53447 +#
53448 +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
53449 +  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
53450 +  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
53451 +  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
53452 +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53453 +        X"$ac_dest" : 'X\(//\)[^/]' \| \
53454 +        X"$ac_dest" : 'X\(//\)$' \| \
53455 +        X"$ac_dest" : 'X\(/\)' \| \
53456 +        .     : '\(.\)' 2>/dev/null ||
53457 +echo X"$ac_dest" |
53458 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
53459 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
53460 +         /^X\(\/\/\)$/{ s//\1/; q; }
53461 +         /^X\(\/\).*/{ s//\1/; q; }
53462 +         s/.*/./; q'`
53463 +  { if $as_mkdir_p; then
53464 +    mkdir -p "$ac_dir"
53465 +  else
53466 +    as_dir="$ac_dir"
53467 +    as_dirs=
53468 +    while test ! -d "$as_dir"; do
53469 +      as_dirs="$as_dir $as_dirs"
53470 +      as_dir=`(dirname "$as_dir") 2>/dev/null ||
53471 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53472 +        X"$as_dir" : 'X\(//\)[^/]' \| \
53473 +        X"$as_dir" : 'X\(//\)$' \| \
53474 +        X"$as_dir" : 'X\(/\)' \| \
53475 +        .     : '\(.\)' 2>/dev/null ||
53476 +echo X"$as_dir" |
53477 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
53478 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
53479 +         /^X\(\/\/\)$/{ s//\1/; q; }
53480 +         /^X\(\/\).*/{ s//\1/; q; }
53481 +         s/.*/./; q'`
53482 +    done
53483 +    test ! -n "$as_dirs" || mkdir $as_dirs
53484 +  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
53485 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
53486 +   { (exit 1); exit 1; }; }; }
53487 +
53488 +  ac_builddir=.
53489 +
53490 +if test "$ac_dir" != .; then
53491 +  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
53492 +  # A "../" for each directory in $ac_dir_suffix.
53493 +  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
53494 +else
53495 +  ac_dir_suffix= ac_top_builddir=
53496 +fi
53497 +
53498 +case $srcdir in
53499 +  .)  # No --srcdir option.  We are building in place.
53500 +    ac_srcdir=.
53501 +    if test -z "$ac_top_builddir"; then
53502 +       ac_top_srcdir=.
53503 +    else
53504 +       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
53505 +    fi ;;
53506 +  [\\/]* | ?:[\\/]* )  # Absolute path.
53507 +    ac_srcdir=$srcdir$ac_dir_suffix;
53508 +    ac_top_srcdir=$srcdir ;;
53509 +  *) # Relative path.
53510 +    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
53511 +    ac_top_srcdir=$ac_top_builddir$srcdir ;;
53512 +esac
53513 +
53514 +# Do not use `cd foo && pwd` to compute absolute paths, because
53515 +# the directories may not exist.
53516 +case `pwd` in
53517 +.) ac_abs_builddir="$ac_dir";;
53518 +*)
53519 +  case "$ac_dir" in
53520 +  .) ac_abs_builddir=`pwd`;;
53521 +  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
53522 +  *) ac_abs_builddir=`pwd`/"$ac_dir";;
53523 +  esac;;
53524 +esac
53525 +case $ac_abs_builddir in
53526 +.) ac_abs_top_builddir=${ac_top_builddir}.;;
53527 +*)
53528 +  case ${ac_top_builddir}. in
53529 +  .) ac_abs_top_builddir=$ac_abs_builddir;;
53530 +  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
53531 +  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
53532 +  esac;;
53533 +esac
53534 +case $ac_abs_builddir in
53535 +.) ac_abs_srcdir=$ac_srcdir;;
53536 +*)
53537 +  case $ac_srcdir in
53538 +  .) ac_abs_srcdir=$ac_abs_builddir;;
53539 +  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
53540 +  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
53541 +  esac;;
53542 +esac
53543 +case $ac_abs_builddir in
53544 +.) ac_abs_top_srcdir=$ac_top_srcdir;;
53545 +*)
53546 +  case $ac_top_srcdir in
53547 +  .) ac_abs_top_srcdir=$ac_abs_builddir;;
53548 +  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
53549 +  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
53550 +  esac;;
53551 +esac
53552 +
53553 +
53554 +  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
53555 +echo "$as_me: executing $ac_dest commands" >&6;}
53556 +  case $ac_dest in
53557 +    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
53558 +  # Strip MF so we end up with the name of the file.
53559 +  mf=`echo "$mf" | sed -e 's/:.*$//'`
53560 +  # Check whether this is an Automake generated Makefile or not.
53561 +  # We used to match only the files named `Makefile.in', but
53562 +  # some people rename them; so instead we look at the file content.
53563 +  # Grep'ing the first line is not enough: some people post-process
53564 +  # each Makefile.in and add a new line on top of each file to say so.
53565 +  # So let's grep whole file.
53566 +  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
53567 +    dirpart=`(dirname "$mf") 2>/dev/null ||
53568 +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53569 +        X"$mf" : 'X\(//\)[^/]' \| \
53570 +        X"$mf" : 'X\(//\)$' \| \
53571 +        X"$mf" : 'X\(/\)' \| \
53572 +        .     : '\(.\)' 2>/dev/null ||
53573 +echo X"$mf" |
53574 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
53575 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
53576 +         /^X\(\/\/\)$/{ s//\1/; q; }
53577 +         /^X\(\/\).*/{ s//\1/; q; }
53578 +         s/.*/./; q'`
53579 +  else
53580 +    continue
53581 +  fi
53582 +  # Extract the definition of DEPDIR, am__include, and am__quote
53583 +  # from the Makefile without running `make'.
53584 +  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
53585 +  test -z "$DEPDIR" && continue
53586 +  am__include=`sed -n 's/^am__include = //p' < "$mf"`
53587 +  test -z "am__include" && continue
53588 +  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
53589 +  # When using ansi2knr, U may be empty or an underscore; expand it
53590 +  U=`sed -n 's/^U = //p' < "$mf"`
53591 +  # Find all dependency output files, they are included files with
53592 +  # $(DEPDIR) in their names.  We invoke sed twice because it is the
53593 +  # simplest approach to changing $(DEPDIR) to its actual value in the
53594 +  # expansion.
53595 +  for file in `sed -n "
53596 +    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
53597 +       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
53598 +    # Make sure the directory exists.
53599 +    test -f "$dirpart/$file" && continue
53600 +    fdir=`(dirname "$file") 2>/dev/null ||
53601 +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53602 +        X"$file" : 'X\(//\)[^/]' \| \
53603 +        X"$file" : 'X\(//\)$' \| \
53604 +        X"$file" : 'X\(/\)' \| \
53605 +        .     : '\(.\)' 2>/dev/null ||
53606 +echo X"$file" |
53607 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
53608 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
53609 +         /^X\(\/\/\)$/{ s//\1/; q; }
53610 +         /^X\(\/\).*/{ s//\1/; q; }
53611 +         s/.*/./; q'`
53612 +    { if $as_mkdir_p; then
53613 +    mkdir -p $dirpart/$fdir
53614 +  else
53615 +    as_dir=$dirpart/$fdir
53616 +    as_dirs=
53617 +    while test ! -d "$as_dir"; do
53618 +      as_dirs="$as_dir $as_dirs"
53619 +      as_dir=`(dirname "$as_dir") 2>/dev/null ||
53620 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53621 +        X"$as_dir" : 'X\(//\)[^/]' \| \
53622 +        X"$as_dir" : 'X\(//\)$' \| \
53623 +        X"$as_dir" : 'X\(/\)' \| \
53624 +        .     : '\(.\)' 2>/dev/null ||
53625 +echo X"$as_dir" |
53626 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
53627 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
53628 +         /^X\(\/\/\)$/{ s//\1/; q; }
53629 +         /^X\(\/\).*/{ s//\1/; q; }
53630 +         s/.*/./; q'`
53631 +    done
53632 +    test ! -n "$as_dirs" || mkdir $as_dirs
53633 +  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
53634 +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
53635 +   { (exit 1); exit 1; }; }; }
53636 +
53637 +    # echo "creating $dirpart/$file"
53638 +    echo '# dummy' > "$dirpart/$file"
53639 +  done
53640 +done
53641 + ;;
53642 +  esac
53643 +done
53644 +_ACEOF
53645 +
53646 +cat >>$CONFIG_STATUS <<\_ACEOF
53647 +
53648 +{ (exit 0); exit 0; }
53649 +_ACEOF
53650 +chmod +x $CONFIG_STATUS
53651 +ac_clean_files=$ac_clean_files_save
53652 +
53653 +
53654 +# configure is writing to config.log, and then calls config.status.
53655 +# config.status does its own redirection, appending to config.log.
53656 +# Unfortunately, on DOS this fails, as config.log is still kept open
53657 +# by configure, so config.status won't be able to write to it; its
53658 +# output is simply discarded.  So we exec the FD to /dev/null,
53659 +# effectively closing config.log, so it can be properly (re)opened and
53660 +# appended to by config.status.  When coming back to configure, we
53661 +# need to make the FD available again.
53662 +if test "$no_create" != yes; then
53663 +  ac_cs_success=:
53664 +  ac_config_status_args=
53665 +  test "$silent" = yes &&
53666 +    ac_config_status_args="$ac_config_status_args --quiet"
53667 +  exec 5>/dev/null
53668 +  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
53669 +  exec 5>>config.log
53670 +  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
53671 +  # would make configure fail if this is the last instruction.
53672 +  $ac_cs_success || { (exit 1); exit 1; }
53673 +fi
53674 +
53675 diff -Nru php-5.2.4.vanilla/libevent/configure.in php-5.2.4.fpm/libevent/configure.in
53676 --- php-5.2.4.vanilla/libevent/configure.in     1970-01-01 03:00:00.000000000 +0300
53677 +++ php-5.2.4.fpm/libevent/configure.in 2007-08-31 15:47:19.000000000 +0400
53678 @@ -0,0 +1,379 @@
53679 +dnl configure.in for libevent
53680 +dnl Dug Song <dugsong@monkey.org>
53681 +AC_INIT(event.c)
53682 +
53683 +AM_INIT_AUTOMAKE(libevent,1.3b)
53684 +AM_CONFIG_HEADER(config.h)
53685 +AM_MAINTAINER_MODE
53686 +
53687 +dnl Initialize prefix.
53688 +if test "$prefix" = "NONE"; then
53689 +   prefix="/usr/local"
53690 +fi
53691 +
53692 +dnl Checks for programs.
53693 +AC_PROG_CC
53694 +AC_PROG_INSTALL
53695 +AC_PROG_LN_S
53696 +
53697 +AC_PROG_GCC_TRADITIONAL
53698 +if test "$GCC" = yes ; then
53699 +        CFLAGS="$CFLAGS -Wall"
53700 +fi
53701 +
53702 +AC_PROG_LIBTOOL
53703 +
53704 +dnl   Uncomment "AC_DISABLE_SHARED" to make shared librraries not get
53705 +dnl   built by default.  You can also turn shared libs on and off from 
53706 +dnl   the command line with --enable-shared and --disable-shared.
53707 +dnl AC_DISABLE_SHARED
53708 +AC_SUBST(LIBTOOL_DEPS)
53709 +
53710 +dnl Check for optional stuff
53711 +AC_ARG_WITH(rtsig,
53712 +  [  --with-rtsig              compile with support for real time signals (experimental)],
53713 +  [usertsig=yes], [usertsig=no])
53714 +
53715 +dnl Checks for libraries.
53716 +AC_CHECK_LIB(socket, socket)
53717 +AC_CHECK_LIB(resolv, inet_aton)
53718 +
53719 +dnl Checks for header files.
53720 +AC_HEADER_STDC
53721 +AC_CHECK_HEADERS(fcntl.h stdarg.h inttypes.h stdint.h poll.h signal.h unistd.h sys/epoll.h sys/time.h sys/queue.h sys/event.h sys/ioctl.h sys/devpoll.h port.h netinet/in6.h)
53722 +if test "x$ac_cv_header_sys_queue_h" = "xyes"; then
53723 +       AC_MSG_CHECKING(for TAILQ_FOREACH in sys/queue.h)
53724 +       AC_EGREP_CPP(yes,
53725 +[
53726 +#include <sys/queue.h>
53727 +#ifdef TAILQ_FOREACH
53728 + yes
53729 +#endif
53730 +],     [AC_MSG_RESULT(yes)
53731 +        AC_DEFINE(HAVE_TAILQFOREACH, 1,
53732 +               [Define if TAILQ_FOREACH is defined in <sys/queue.h>])],
53733 +       AC_MSG_RESULT(no)
53734 +       )
53735 +fi
53736 +
53737 +if test "x$ac_cv_header_sys_time_h" = "xyes"; then
53738 +       AC_MSG_CHECKING(for timeradd in sys/time.h)
53739 +       AC_EGREP_CPP(yes,
53740 +[
53741 +#include <sys/time.h>
53742 +#ifdef timeradd
53743 + yes
53744 +#endif
53745 +],     [ AC_DEFINE(HAVE_TIMERADD, 1,
53746 +               [Define if timeradd is defined in <sys/time.h>])
53747 +         AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
53748 +)
53749 +fi
53750 +
53751 +if test "x$ac_cv_header_sys_time_h" = "xyes"; then
53752 +       AC_MSG_CHECKING(for timercmp in sys/time.h)
53753 +       AC_EGREP_CPP(yes,
53754 +[
53755 +#include <sys/time.h>
53756 +#ifdef timercmp
53757 + yes
53758 +#endif
53759 +],     [ AC_DEFINE(HAVE_TIMERCMP, 1,
53760 +               [Define if timercmp is defined in <sys/time.h>])
53761 +         AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
53762 +)
53763 +fi
53764 +
53765 +if test "x$ac_cv_header_sys_time_h" = "xyes"; then
53766 +       AC_MSG_CHECKING(for timerclear in sys/time.h)
53767 +       AC_EGREP_CPP(yes,
53768 +[
53769 +#include <sys/time.h>
53770 +#ifdef timerclear
53771 + yes
53772 +#endif
53773 +],     [ AC_DEFINE(HAVE_TIMERCLEAR, 1,
53774 +               [Define if timerclear is defined in <sys/time.h>])
53775 +         AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
53776 +)
53777 +fi
53778 +
53779 +if test "x$ac_cv_header_sys_time_h" = "xyes"; then
53780 +       AC_MSG_CHECKING(for timerisset in sys/time.h)
53781 +       AC_EGREP_CPP(yes,
53782 +[
53783 +#include <sys/time.h>
53784 +#ifdef timerisset
53785 + yes
53786 +#endif
53787 +],     [ AC_DEFINE(HAVE_TIMERISSET, 1,
53788 +               [Define if timerisset is defined in <sys/time.h>])
53789 +         AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
53790 +)
53791 +fi
53792 +
53793 +dnl - check if the macro WIN32 is defined on this compiler.
53794 +dnl - (this is how we check for a windows version of GCC)
53795 +AC_MSG_CHECKING(for WIN32)
53796 +AC_TRY_COMPILE(,
53797 +       [
53798 +       #ifndef WIN32
53799 +       #error
53800 +       #endif
53801 +       ],
53802 +       bwin32=true; AC_MSG_RESULT(yes),
53803 +       bwin32=false; AC_MSG_RESULT(no),
53804 +)
53805 +
53806 +AM_CONDITIONAL(BUILD_WIN32, test x$bwin32 = xtrue)
53807 +
53808 +dnl Checks for typedefs, structures, and compiler characteristics.
53809 +AC_C_CONST
53810 +AC_C_INLINE
53811 +AC_HEADER_TIME
53812 +
53813 +dnl Checks for library functions.
53814 +AC_CHECK_FUNCS(gettimeofday vasprintf fcntl clock_gettime strtok_r strsep getaddrinfo getnameinfo strlcpy inet_ntop)
53815 +
53816 +if test "x$ac_cv_func_clock_gettime" = "xyes"; then
53817 +   AC_DEFINE(DNS_USE_CPU_CLOCK_FOR_ID, 1, [Define if clock_gettime is available in libc])
53818 +else
53819 +   AC_DEFINE(DNS_USE_GETTIMEOFDAY_FOR_ID, 1, [Define is no secure id variant is available])
53820 +fi
53821 +
53822 +AC_MSG_CHECKING(for F_SETFD in fcntl.h)
53823 +AC_EGREP_CPP(yes,
53824 +[
53825 +#define _GNU_SOURCE
53826 +#include <fcntl.h>
53827 +#ifdef F_SETFD
53828 +yes
53829 +#endif
53830 +],     [ AC_DEFINE(HAVE_SETFD, 1,
53831 +             [Define if F_SETFD is defined in <fcntl.h>])
53832 +         AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no))
53833 +
53834 +needsignal=no
53835 +haveselect=no
53836 +AC_CHECK_FUNCS(select, [haveselect=yes], )
53837 +if test "x$haveselect" = "xyes" ; then
53838 +       AC_LIBOBJ(select)
53839 +       needsignal=yes
53840 +fi
53841 +
53842 +havepoll=no
53843 +havertsig=no
53844 +AC_CHECK_FUNCS(poll, [havepoll=yes], )
53845 +if test "x$havepoll" = "xyes" ; then
53846 +       AC_LIBOBJ(poll)
53847 +       needsignal=yes
53848 +
53849 +       if test "x$usertsig" = "xyes" ; then
53850 +               AC_CHECK_FUNCS(sigtimedwait, [havertsig=yes], )
53851 +       fi
53852 +fi
53853 +if test "x$havertsig" = "xyes" ; then
53854 +       AC_MSG_CHECKING(for F_SETSIG in fcntl.h)
53855 +       AC_EGREP_CPP(yes,
53856 +[
53857 +#define _GNU_SOURCE
53858 +#include <fcntl.h>
53859 +#ifdef F_SETSIG
53860 +yes
53861 +#endif
53862 +],     [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no); havertsig=no])
53863 +fi
53864 +if test "x$havertsig" = "xyes" ; then
53865 +       AC_DEFINE(HAVE_RTSIG, 1, [Define if your system supports POSIX realtime signals])
53866 +       AC_LIBOBJ(rtsig)
53867 +       AC_MSG_CHECKING(for working rtsig on pipes)
53868 +       AC_TRY_RUN(
53869 +[
53870 +#define _GNU_SOURCE
53871 +#include <fcntl.h>
53872 +#include <signal.h>
53873 +#include <unistd.h>
53874 +
53875 +int sigio()
53876 +{
53877 +       exit(0);
53878 +}
53879 +
53880 +int main()
53881 +{
53882 +       int fd[2];
53883 +
53884 +       pipe(fd);
53885 +       signal(SIGIO, sigio);
53886 +       fcntl(fd[0], F_SETOWN, getpid());
53887 +       fcntl(fd[0], F_SETSIG, SIGIO);
53888 +       fcntl(fd[0], F_SETFL, fcntl(fd[0], F_GETFL) | O_ASYNC);
53889 +       write(fd[1], "", 1);
53890 +       return 1;
53891 +}
53892 +],     [ AC_MSG_RESULT(yes)
53893 +         AC_DEFINE(HAVE_WORKING_RTSIG, 1, [Define if realtime signals work on pipes])],
53894 +       AC_MSG_RESULT(no))
53895 +fi
53896 +
53897 +haveepoll=no
53898 +AC_CHECK_FUNCS(epoll_ctl, [haveepoll=yes], )
53899 +if test "x$haveepoll" = "xyes" ; then
53900 +       AC_DEFINE(HAVE_EPOLL, 1,
53901 +               [Define if your system supports the epoll system calls])
53902 +       AC_LIBOBJ(epoll)
53903 +       needsignal=yes
53904 +fi
53905 +
53906 +havedevpoll=no
53907 +if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then
53908 +       AC_DEFINE(HAVE_DEVPOLL, 1,
53909 +                   [Define if /dev/poll is available])
53910 +        AC_LIBOBJ(devpoll)
53911 +fi
53912 +
53913 +havekqueue=no
53914 +if test "x$ac_cv_header_sys_event_h" = "xyes"; then
53915 +       AC_CHECK_FUNCS(kqueue, [havekqueue=yes], )
53916 +       if test "x$havekqueue" = "xyes" ; then
53917 +               AC_MSG_CHECKING(for working kqueue)
53918 +               AC_TRY_RUN(
53919 +#include <sys/types.h>
53920 +#include <sys/time.h>
53921 +#include <sys/event.h>
53922 +#include <stdio.h>
53923 +#include <unistd.h>
53924 +#include <fcntl.h>
53925 +
53926 +int
53927 +main(int argc, char **argv)
53928 +{
53929 +       int kq;
53930 +       int n;
53931 +       int fd[[2]];
53932 +       struct kevent ev;
53933 +       struct timespec ts;
53934 +       char buf[[8000]];
53935 +
53936 +       if (pipe(fd) == -1)
53937 +               exit(1);
53938 +       if (fcntl(fd[[1]], F_SETFL, O_NONBLOCK) == -1)
53939 +               exit(1);
53940 +
53941 +       while ((n = write(fd[[1]], buf, sizeof(buf))) == sizeof(buf))
53942 +               ;
53943 +
53944 +        if ((kq = kqueue()) == -1)
53945 +               exit(1);
53946 +
53947 +       ev.ident = fd[[1]];
53948 +       ev.filter = EVFILT_WRITE;
53949 +       ev.flags = EV_ADD | EV_ENABLE;
53950 +       n = kevent(kq, &ev, 1, NULL, 0, NULL);
53951 +       if (n == -1)
53952 +               exit(1);
53953 +       
53954 +       read(fd[[0]], buf, sizeof(buf));
53955 +
53956 +       ts.tv_sec = 0;
53957 +       ts.tv_nsec = 0;
53958 +       n = kevent(kq, NULL, 0, &ev, 1, &ts);
53959 +       if (n == -1 || n == 0)
53960 +               exit(1);
53961 +
53962 +       exit(0);
53963 +}, [AC_MSG_RESULT(yes)
53964 +    AC_DEFINE(HAVE_WORKING_KQUEUE, 1,
53965 +               [Define if kqueue works correctly with pipes])
53966 +    AC_LIBOBJ(kqueue)], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
53967 +       fi
53968 +fi
53969 +
53970 +haveepollsyscall=no
53971 +if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then
53972 +       if test "x$haveepoll" = "xno" ; then
53973 +               AC_MSG_CHECKING(for epoll system call)
53974 +               AC_TRY_RUN(
53975 +#include <stdint.h>
53976 +#include <sys/param.h>
53977 +#include <sys/types.h>
53978 +#include <sys/syscall.h>
53979 +#include <sys/epoll.h>
53980 +#include <unistd.h>
53981 +
53982 +int
53983 +epoll_create(int size)
53984 +{
53985 +       return (syscall(__NR_epoll_create, size));
53986 +}
53987 +
53988 +int
53989 +main(int argc, char **argv)
53990 +{
53991 +       int epfd;
53992 +
53993 +       epfd = epoll_create(256);
53994 +       exit (epfd == -1 ? 1 : 0);
53995 +}, [AC_MSG_RESULT(yes)
53996 +    AC_DEFINE(HAVE_EPOLL, 1,
53997 +       [Define if your system supports the epoll system calls])
53998 +    needsignal=yes
53999 +    AC_LIBOBJ(epoll_sub)
54000 +    AC_LIBOBJ(epoll)], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
54001 +       fi
54002 +fi
54003 +
54004 +haveeventports=no
54005 +AC_CHECK_FUNCS(port_create, [haveeventports=yes], )
54006 +if test "x$haveeventports" = "xyes" ; then
54007 +       AC_DEFINE(HAVE_EVENT_PORTS, 1,
54008 +               [Define if your system supports event ports])
54009 +       AC_LIBOBJ(evport)
54010 +       needsignal=yes
54011 +fi
54012 +if test "x$needsignal" = "xyes" ; then
54013 +       AC_LIBOBJ(signal)
54014 +fi
54015 +
54016 +AC_TYPE_PID_T
54017 +AC_TYPE_SIZE_T
54018 +AC_CHECK_TYPES([struct in6_addr], , ,
54019 +[#ifdef WIN32
54020 +#include <winsock2.h>
54021 +#else
54022 +#include <sys/types.h>
54023 +#include <netinet/in.h>
54024 +#include <sys/socket.h>
54025 +#endif
54026 +#ifdef HAVE_NETINET_IN6_H
54027 +#include <netinet/in6.h>
54028 +#endif])
54029 +
54030 +AC_MSG_CHECKING([for socklen_t])
54031 +AC_TRY_COMPILE([
54032 + #include <sys/types.h>
54033 + #include <sys/socket.h>],
54034 +  [socklen_t x;],
54035 +  AC_MSG_RESULT([yes]),
54036 +  [AC_MSG_RESULT([no])
54037 +  AC_DEFINE(socklen_t, unsigned int,
54038 +       [Define to unsigned int if you dont have it])]
54039 +)
54040 +
54041 +AC_MSG_CHECKING([whether our compiler supports __func__])
54042 +AC_TRY_COMPILE([],
54043 + [void foo() { const char *cp = __func__; }],
54044 + AC_MSG_RESULT([yes]),
54045 + AC_MSG_RESULT([no])
54046 + AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
54047 + AC_TRY_COMPILE([],
54048 +   [void foo() { const char *cp = __FUNCTION__; }],
54049 +   AC_MSG_RESULT([yes])
54050 +   AC_DEFINE(__func__, __FUNCTION__,
54051 +         [Define to appropriate substitue if compiler doesnt have __func__]),
54052 +   AC_MSG_RESULT([no])
54053 +   AC_DEFINE(__func__, __FILE__,
54054 +         [Define to appropriate substitue if compiler doesnt have __func__])))
54055 +
54056 +
54057 +AC_OUTPUT(Makefile)
54058 diff -Nru php-5.2.4.vanilla/libevent/depcomp php-5.2.4.fpm/libevent/depcomp
54059 --- php-5.2.4.vanilla/libevent/depcomp  1970-01-01 03:00:00.000000000 +0300
54060 +++ php-5.2.4.fpm/libevent/depcomp      2007-08-31 15:47:19.000000000 +0400
54061 @@ -0,0 +1,529 @@
54062 +#! /bin/sh
54063 +# depcomp - compile a program generating dependencies as side-effects
54064 +
54065 +scriptversion=2005-02-09.22
54066 +
54067 +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
54068 +
54069 +# This program is free software; you can redistribute it and/or modify
54070 +# it under the terms of the GNU General Public License as published by
54071 +# the Free Software Foundation; either version 2, or (at your option)
54072 +# any later version.
54073 +
54074 +# This program is distributed in the hope that it will be useful,
54075 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
54076 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
54077 +# GNU General Public License for more details.
54078 +
54079 +# You should have received a copy of the GNU General Public License
54080 +# along with this program; if not, write to the Free Software
54081 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
54082 +# 02111-1307, USA.
54083 +
54084 +# As a special exception to the GNU General Public License, if you
54085 +# distribute this file as part of a program that contains a
54086 +# configuration script generated by Autoconf, you may include it under
54087 +# the same distribution terms that you use for the rest of that program.
54088 +
54089 +# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
54090 +
54091 +case $1 in
54092 +  '')
54093 +     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
54094 +     exit 1;
54095 +     ;;
54096 +  -h | --h*)
54097 +    cat <<\EOF
54098 +Usage: depcomp [--help] [--version] PROGRAM [ARGS]
54099 +
54100 +Run PROGRAMS ARGS to compile a file, generating dependencies
54101 +as side-effects.
54102 +
54103 +Environment variables:
54104 +  depmode     Dependency tracking mode.
54105 +  source      Source file read by `PROGRAMS ARGS'.
54106 +  object      Object file output by `PROGRAMS ARGS'.
54107 +  DEPDIR      directory where to store dependencies.
54108 +  depfile     Dependency file to output.
54109 +  tmpdepfile  Temporary file to use when outputing dependencies.
54110 +  libtool     Whether libtool is used (yes/no).
54111 +
54112 +Report bugs to <bug-automake@gnu.org>.
54113 +EOF
54114 +    exit $?
54115 +    ;;
54116 +  -v | --v*)
54117 +    echo "depcomp $scriptversion"
54118 +    exit $?
54119 +    ;;
54120 +esac
54121 +
54122 +if test -z "$depmode" || test -z "$source" || test -z "$object"; then
54123 +  echo "depcomp: Variables source, object and depmode must be set" 1>&2
54124 +  exit 1
54125 +fi
54126 +
54127 +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
54128 +depfile=${depfile-`echo "$object" |
54129 +  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
54130 +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
54131 +
54132 +rm -f "$tmpdepfile"
54133 +
54134 +# Some modes work just like other modes, but use different flags.  We
54135 +# parameterize here, but still list the modes in the big case below,
54136 +# to make depend.m4 easier to write.  Note that we *cannot* use a case
54137 +# here, because this file can only contain one case statement.
54138 +if test "$depmode" = hp; then
54139 +  # HP compiler uses -M and no extra arg.
54140 +  gccflag=-M
54141 +  depmode=gcc
54142 +fi
54143 +
54144 +if test "$depmode" = dashXmstdout; then
54145 +   # This is just like dashmstdout with a different argument.
54146 +   dashmflag=-xM
54147 +   depmode=dashmstdout
54148 +fi
54149 +
54150 +case "$depmode" in
54151 +gcc3)
54152 +## gcc 3 implements dependency tracking that does exactly what
54153 +## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
54154 +## it if -MD -MP comes after the -MF stuff.  Hmm.
54155 +  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
54156 +  stat=$?
54157 +  if test $stat -eq 0; then :
54158 +  else
54159 +    rm -f "$tmpdepfile"
54160 +    exit $stat
54161 +  fi
54162 +  mv "$tmpdepfile" "$depfile"
54163 +  ;;
54164 +
54165 +gcc)
54166 +## There are various ways to get dependency output from gcc.  Here's
54167 +## why we pick this rather obscure method:
54168 +## - Don't want to use -MD because we'd like the dependencies to end
54169 +##   up in a subdir.  Having to rename by hand is ugly.
54170 +##   (We might end up doing this anyway to support other compilers.)
54171 +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
54172 +##   -MM, not -M (despite what the docs say).
54173 +## - Using -M directly means running the compiler twice (even worse
54174 +##   than renaming).
54175 +  if test -z "$gccflag"; then
54176 +    gccflag=-MD,
54177 +  fi
54178 +  "$@" -Wp,"$gccflag$tmpdepfile"
54179 +  stat=$?
54180 +  if test $stat -eq 0; then :
54181 +  else
54182 +    rm -f "$tmpdepfile"
54183 +    exit $stat
54184 +  fi
54185 +  rm -f "$depfile"
54186 +  echo "$object : \\" > "$depfile"
54187 +  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
54188 +## The second -e expression handles DOS-style file names with drive letters.
54189 +  sed -e 's/^[^:]*: / /' \
54190 +      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
54191 +## This next piece of magic avoids the `deleted header file' problem.
54192 +## The problem is that when a header file which appears in a .P file
54193 +## is deleted, the dependency causes make to die (because there is
54194 +## typically no way to rebuild the header).  We avoid this by adding
54195 +## dummy dependencies for each header file.  Too bad gcc doesn't do
54196 +## this for us directly.
54197 +  tr ' ' '
54198 +' < "$tmpdepfile" |
54199 +## Some versions of gcc put a space before the `:'.  On the theory
54200 +## that the space means something, we add a space to the output as
54201 +## well.
54202 +## Some versions of the HPUX 10.20 sed can't process this invocation
54203 +## correctly.  Breaking it into two sed invocations is a workaround.
54204 +    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
54205 +  rm -f "$tmpdepfile"
54206 +  ;;
54207 +
54208 +hp)
54209 +  # This case exists only to let depend.m4 do its work.  It works by
54210 +  # looking at the text of this script.  This case will never be run,
54211 +  # since it is checked for above.
54212 +  exit 1
54213 +  ;;
54214 +
54215 +sgi)
54216 +  if test "$libtool" = yes; then
54217 +    "$@" "-Wp,-MDupdate,$tmpdepfile"
54218 +  else
54219 +    "$@" -MDupdate "$tmpdepfile"
54220 +  fi
54221 +  stat=$?
54222 +  if test $stat -eq 0; then :
54223 +  else
54224 +    rm -f "$tmpdepfile"
54225 +    exit $stat
54226 +  fi
54227 +  rm -f "$depfile"
54228 +
54229 +  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
54230 +    echo "$object : \\" > "$depfile"
54231 +
54232 +    # Clip off the initial element (the dependent).  Don't try to be
54233 +    # clever and replace this with sed code, as IRIX sed won't handle
54234 +    # lines with more than a fixed number of characters (4096 in
54235 +    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
54236 +    # the IRIX cc adds comments like `#:fec' to the end of the
54237 +    # dependency line.
54238 +    tr ' ' '
54239 +' < "$tmpdepfile" \
54240 +    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
54241 +    tr '
54242 +' ' ' >> $depfile
54243 +    echo >> $depfile
54244 +
54245 +    # The second pass generates a dummy entry for each header file.
54246 +    tr ' ' '
54247 +' < "$tmpdepfile" \
54248 +   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
54249 +   >> $depfile
54250 +  else
54251 +    # The sourcefile does not contain any dependencies, so just
54252 +    # store a dummy comment line, to avoid errors with the Makefile
54253 +    # "include basename.Plo" scheme.
54254 +    echo "#dummy" > "$depfile"
54255 +  fi
54256 +  rm -f "$tmpdepfile"
54257 +  ;;
54258 +
54259 +aix)
54260 +  # The C for AIX Compiler uses -M and outputs the dependencies
54261 +  # in a .u file.  In older versions, this file always lives in the
54262 +  # current directory.  Also, the AIX compiler puts `$object:' at the
54263 +  # start of each line; $object doesn't have directory information.
54264 +  # Version 6 uses the directory in both cases.
54265 +  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
54266 +  tmpdepfile="$stripped.u"
54267 +  if test "$libtool" = yes; then
54268 +    "$@" -Wc,-M
54269 +  else
54270 +    "$@" -M
54271 +  fi
54272 +  stat=$?
54273 +
54274 +  if test -f "$tmpdepfile"; then :
54275 +  else
54276 +    stripped=`echo "$stripped" | sed 's,^.*/,,'`
54277 +    tmpdepfile="$stripped.u"
54278 +  fi
54279 +
54280 +  if test $stat -eq 0; then :
54281 +  else
54282 +    rm -f "$tmpdepfile"
54283 +    exit $stat
54284 +  fi
54285 +
54286 +  if test -f "$tmpdepfile"; then
54287 +    outname="$stripped.o"
54288 +    # Each line is of the form `foo.o: dependent.h'.
54289 +    # Do two passes, one to just change these to
54290 +    # `$object: dependent.h' and one to simply `dependent.h:'.
54291 +    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
54292 +    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
54293 +  else
54294 +    # The sourcefile does not contain any dependencies, so just
54295 +    # store a dummy comment line, to avoid errors with the Makefile
54296 +    # "include basename.Plo" scheme.
54297 +    echo "#dummy" > "$depfile"
54298 +  fi
54299 +  rm -f "$tmpdepfile"
54300 +  ;;
54301 +
54302 +icc)
54303 +  # Intel's C compiler understands `-MD -MF file'.  However on
54304 +  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
54305 +  # ICC 7.0 will fill foo.d with something like
54306 +  #    foo.o: sub/foo.c
54307 +  #    foo.o: sub/foo.h
54308 +  # which is wrong.  We want:
54309 +  #    sub/foo.o: sub/foo.c
54310 +  #    sub/foo.o: sub/foo.h
54311 +  #    sub/foo.c:
54312 +  #    sub/foo.h:
54313 +  # ICC 7.1 will output
54314 +  #    foo.o: sub/foo.c sub/foo.h
54315 +  # and will wrap long lines using \ :
54316 +  #    foo.o: sub/foo.c ... \
54317 +  #     sub/foo.h ... \
54318 +  #     ...
54319 +
54320 +  "$@" -MD -MF "$tmpdepfile"
54321 +  stat=$?
54322 +  if test $stat -eq 0; then :
54323 +  else
54324 +    rm -f "$tmpdepfile"
54325 +    exit $stat
54326 +  fi
54327 +  rm -f "$depfile"
54328 +  # Each line is of the form `foo.o: dependent.h',
54329 +  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
54330 +  # Do two passes, one to just change these to
54331 +  # `$object: dependent.h' and one to simply `dependent.h:'.
54332 +  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
54333 +  # Some versions of the HPUX 10.20 sed can't process this invocation
54334 +  # correctly.  Breaking it into two sed invocations is a workaround.
54335 +  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
54336 +    sed -e 's/$/ :/' >> "$depfile"
54337 +  rm -f "$tmpdepfile"
54338 +  ;;
54339 +
54340 +tru64)
54341 +   # The Tru64 compiler uses -MD to generate dependencies as a side
54342 +   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
54343 +   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
54344 +   # dependencies in `foo.d' instead, so we check for that too.
54345 +   # Subdirectories are respected.
54346 +   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
54347 +   test "x$dir" = "x$object" && dir=
54348 +   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
54349 +
54350 +   if test "$libtool" = yes; then
54351 +      # With Tru64 cc, shared objects can also be used to make a
54352 +      # static library.  This mecanism is used in libtool 1.4 series to
54353 +      # handle both shared and static libraries in a single compilation.
54354 +      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
54355 +      #
54356 +      # With libtool 1.5 this exception was removed, and libtool now
54357 +      # generates 2 separate objects for the 2 libraries.  These two
54358 +      # compilations output dependencies in in $dir.libs/$base.o.d and
54359 +      # in $dir$base.o.d.  We have to check for both files, because
54360 +      # one of the two compilations can be disabled.  We should prefer
54361 +      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
54362 +      # automatically cleaned when .libs/ is deleted, while ignoring
54363 +      # the former would cause a distcleancheck panic.
54364 +      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
54365 +      tmpdepfile2=$dir$base.o.d          # libtool 1.5
54366 +      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
54367 +      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
54368 +      "$@" -Wc,-MD
54369 +   else
54370 +      tmpdepfile1=$dir$base.o.d
54371 +      tmpdepfile2=$dir$base.d
54372 +      tmpdepfile3=$dir$base.d
54373 +      tmpdepfile4=$dir$base.d
54374 +      "$@" -MD
54375 +   fi
54376 +
54377 +   stat=$?
54378 +   if test $stat -eq 0; then :
54379 +   else
54380 +      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
54381 +      exit $stat
54382 +   fi
54383 +
54384 +   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
54385 +   do
54386 +     test -f "$tmpdepfile" && break
54387 +   done
54388 +   if test -f "$tmpdepfile"; then
54389 +      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
54390 +      # That's a tab and a space in the [].
54391 +      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
54392 +   else
54393 +      echo "#dummy" > "$depfile"
54394 +   fi
54395 +   rm -f "$tmpdepfile"
54396 +   ;;
54397 +
54398 +#nosideeffect)
54399 +  # This comment above is used by automake to tell side-effect
54400 +  # dependency tracking mechanisms from slower ones.
54401 +
54402 +dashmstdout)
54403 +  # Important note: in order to support this mode, a compiler *must*
54404 +  # always write the preprocessed file to stdout, regardless of -o.
54405 +  "$@" || exit $?
54406 +
54407 +  # Remove the call to Libtool.
54408 +  if test "$libtool" = yes; then
54409 +    while test $1 != '--mode=compile'; do
54410 +      shift
54411 +    done
54412 +    shift
54413 +  fi
54414 +
54415 +  # Remove `-o $object'.
54416 +  IFS=" "
54417 +  for arg
54418 +  do
54419 +    case $arg in
54420 +    -o)
54421 +      shift
54422 +      ;;
54423 +    $object)
54424 +      shift
54425 +      ;;
54426 +    *)
54427 +      set fnord "$@" "$arg"
54428 +      shift # fnord
54429 +      shift # $arg
54430 +      ;;
54431 +    esac
54432 +  done
54433 +
54434 +  test -z "$dashmflag" && dashmflag=-M
54435 +  # Require at least two characters before searching for `:'
54436 +  # in the target name.  This is to cope with DOS-style filenames:
54437 +  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
54438 +  "$@" $dashmflag |
54439 +    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
54440 +  rm -f "$depfile"
54441 +  cat < "$tmpdepfile" > "$depfile"
54442 +  tr ' ' '
54443 +' < "$tmpdepfile" | \
54444 +## Some versions of the HPUX 10.20 sed can't process this invocation
54445 +## correctly.  Breaking it into two sed invocations is a workaround.
54446 +    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
54447 +  rm -f "$tmpdepfile"
54448 +  ;;
54449 +
54450 +dashXmstdout)
54451 +  # This case only exists to satisfy depend.m4.  It is never actually
54452 +  # run, as this mode is specially recognized in the preamble.
54453 +  exit 1
54454 +  ;;
54455 +
54456 +makedepend)
54457 +  "$@" || exit $?
54458 +  # Remove any Libtool call
54459 +  if test "$libtool" = yes; then
54460 +    while test $1 != '--mode=compile'; do
54461 +      shift
54462 +    done
54463 +    shift
54464 +  fi
54465 +  # X makedepend
54466 +  shift
54467 +  cleared=no
54468 +  for arg in "$@"; do
54469 +    case $cleared in
54470 +    no)
54471 +      set ""; shift
54472 +      cleared=yes ;;
54473 +    esac
54474 +    case "$arg" in
54475 +    -D*|-I*)
54476 +      set fnord "$@" "$arg"; shift ;;
54477 +    # Strip any option that makedepend may not understand.  Remove
54478 +    # the object too, otherwise makedepend will parse it as a source file.
54479 +    -*|$object)
54480 +      ;;
54481 +    *)
54482 +      set fnord "$@" "$arg"; shift ;;
54483 +    esac
54484 +  done
54485 +  obj_suffix="`echo $object | sed 's/^.*\././'`"
54486 +  touch "$tmpdepfile"
54487 +  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
54488 +  rm -f "$depfile"
54489 +  cat < "$tmpdepfile" > "$depfile"
54490 +  sed '1,2d' "$tmpdepfile" | tr ' ' '
54491 +' | \
54492 +## Some versions of the HPUX 10.20 sed can't process this invocation
54493 +## correctly.  Breaking it into two sed invocations is a workaround.
54494 +    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
54495 +  rm -f "$tmpdepfile" "$tmpdepfile".bak
54496 +  ;;
54497 +
54498 +cpp)
54499 +  # Important note: in order to support this mode, a compiler *must*
54500 +  # always write the preprocessed file to stdout.
54501 +  "$@" || exit $?
54502 +
54503 +  # Remove the call to Libtool.
54504 +  if test "$libtool" = yes; then
54505 +    while test $1 != '--mode=compile'; do
54506 +      shift
54507 +    done
54508 +    shift
54509 +  fi
54510 +
54511 +  # Remove `-o $object'.
54512 +  IFS=" "
54513 +  for arg
54514 +  do
54515 +    case $arg in
54516 +    -o)
54517 +      shift
54518 +      ;;
54519 +    $object)
54520 +      shift
54521 +      ;;
54522 +    *)
54523 +      set fnord "$@" "$arg"
54524 +      shift # fnord
54525 +      shift # $arg
54526 +      ;;
54527 +    esac
54528 +  done
54529 +
54530 +  "$@" -E |
54531 +    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
54532 +    sed '$ s: \\$::' > "$tmpdepfile"
54533 +  rm -f "$depfile"
54534 +  echo "$object : \\" > "$depfile"
54535 +  cat < "$tmpdepfile" >> "$depfile"
54536 +  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
54537 +  rm -f "$tmpdepfile"
54538 +  ;;
54539 +
54540 +msvisualcpp)
54541 +  # Important note: in order to support this mode, a compiler *must*
54542 +  # always write the preprocessed file to stdout, regardless of -o,
54543 +  # because we must use -o when running libtool.
54544 +  "$@" || exit $?
54545 +  IFS=" "
54546 +  for arg
54547 +  do
54548 +    case "$arg" in
54549 +    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
54550 +       set fnord "$@"
54551 +       shift
54552 +       shift
54553 +       ;;
54554 +    *)
54555 +       set fnord "$@" "$arg"
54556 +       shift
54557 +       shift
54558 +       ;;
54559 +    esac
54560 +  done
54561 +  "$@" -E |
54562 +  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
54563 +  rm -f "$depfile"
54564 +  echo "$object : \\" > "$depfile"
54565 +  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
54566 +  echo "       " >> "$depfile"
54567 +  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
54568 +  rm -f "$tmpdepfile"
54569 +  ;;
54570 +
54571 +none)
54572 +  exec "$@"
54573 +  ;;
54574 +
54575 +*)
54576 +  echo "Unknown depmode $depmode" 1>&2
54577 +  exit 1
54578 +  ;;
54579 +esac
54580 +
54581 +exit 0
54582 +
54583 +# Local Variables:
54584 +# mode: shell-script
54585 +# sh-indentation: 2
54586 +# eval: (add-hook 'write-file-hooks 'time-stamp)
54587 +# time-stamp-start: "scriptversion="
54588 +# time-stamp-format: "%:y-%02m-%02d.%02H"
54589 +# time-stamp-end: "$"
54590 +# End:
54591 diff -Nru php-5.2.4.vanilla/libevent/devpoll.c php-5.2.4.fpm/libevent/devpoll.c
54592 --- php-5.2.4.vanilla/libevent/devpoll.c        1970-01-01 03:00:00.000000000 +0300
54593 +++ php-5.2.4.fpm/libevent/devpoll.c    2007-08-31 15:47:19.000000000 +0400
54594 @@ -0,0 +1,418 @@
54595 +/*
54596 + * Copyright 2000-2004 Niels Provos <provos@citi.umich.edu>
54597 + * All rights reserved.
54598 + *
54599 + * Redistribution and use in source and binary forms, with or without
54600 + * modification, are permitted provided that the following conditions
54601 + * are met:
54602 + * 1. Redistributions of source code must retain the above copyright
54603 + *    notice, this list of conditions and the following disclaimer.
54604 + * 2. Redistributions in binary form must reproduce the above copyright
54605 + *    notice, this list of conditions and the following disclaimer in the
54606 + *    documentation and/or other materials provided with the distribution.
54607 + * 3. The name of the author may not be used to endorse or promote products
54608 + *    derived from this software without specific prior written permission.
54609 + *
54610 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
54611 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
54612 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
54613 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
54614 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
54615 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
54616 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
54617 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
54618 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
54619 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54620 + */
54621 +#ifdef HAVE_CONFIG_H
54622 +#include "config.h"
54623 +#endif
54624 +
54625 +#include <sys/types.h>
54626 +#include <sys/resource.h>
54627 +#ifdef HAVE_SYS_TIME_H
54628 +#include <sys/time.h>
54629 +#else
54630 +#include <sys/_time.h>
54631 +#endif
54632 +#include <sys/queue.h>
54633 +#include <sys/tree.h>
54634 +#include <sys/devpoll.h>
54635 +#include <signal.h>
54636 +#include <stdio.h>
54637 +#include <stdlib.h>
54638 +#include <string.h>
54639 +#include <unistd.h>
54640 +#include <fcntl.h>
54641 +#include <errno.h>
54642 +#include <assert.h>
54643 +
54644 +#include "event.h"
54645 +#include "event-internal.h"
54646 +#include "evsignal.h"
54647 +#include "log.h"
54648 +
54649 +/* due to limitations in the devpoll interface, we need to keep track of
54650 + * all file descriptors outself.
54651 + */
54652 +struct evdevpoll {
54653 +       struct event *evread;
54654 +       struct event *evwrite;
54655 +};
54656 +
54657 +struct devpollop {
54658 +       struct evdevpoll *fds;
54659 +       int nfds;
54660 +       struct pollfd *events;
54661 +       int nevents;
54662 +       int dpfd;
54663 +       struct pollfd *changes;
54664 +       int nchanges;
54665 +};
54666 +
54667 +void *devpoll_init     (struct event_base *);
54668 +int devpoll_add        (void *, struct event *);
54669 +int devpoll_del        (void *, struct event *);
54670 +int devpoll_recalc     (struct event_base *, void *, int);
54671 +int devpoll_dispatch   (struct event_base *, void *, struct timeval *);
54672 +void devpoll_dealloc   (struct event_base *, void *);
54673 +
54674 +struct eventop devpollops = {
54675 +       "devpoll",
54676 +       devpoll_init,
54677 +       devpoll_add,
54678 +       devpoll_del,
54679 +       devpoll_recalc,
54680 +       devpoll_dispatch,
54681 +       devpoll_dealloc
54682 +};
54683 +
54684 +#define NEVENT 32000
54685 +
54686 +static int
54687 +devpoll_commit(struct devpollop *devpollop)
54688 +{
54689 +       /*
54690 +        * Due to a bug in Solaris, we have to use pwrite with an offset of 0.
54691 +        * Write is limited to 2GB of data, until it will fail.
54692 +        */
54693 +       if (pwrite(devpollop->dpfd, devpollop->changes,
54694 +               sizeof(struct pollfd) * devpollop->nchanges, 0) == -1)
54695 +               return(-1);
54696 +
54697 +       devpollop->nchanges = 0;
54698 +       return(0);
54699 +}
54700 +
54701 +static int
54702 +devpoll_queue(struct devpollop *devpollop, int fd, int events) {
54703 +       struct pollfd *pfd;
54704 +
54705 +       if (devpollop->nchanges >= devpollop->nevents) {
54706 +               /*
54707 +                * Change buffer is full, must commit it to /dev/poll before 
54708 +                * adding more 
54709 +                */
54710 +               if (devpoll_commit(devpollop) != 0)
54711 +                       return(-1);
54712 +       }
54713 +
54714 +       pfd = &devpollop->changes[devpollop->nchanges++];
54715 +       pfd->fd = fd;
54716 +       pfd->events = events;
54717 +       pfd->revents = 0;
54718 +
54719 +       return(0);
54720 +}
54721 +
54722 +void *
54723 +devpoll_init(struct event_base *base)
54724 +{
54725 +       int dpfd, nfiles = NEVENT;
54726 +       struct rlimit rl;
54727 +       struct devpollop *devpollop;
54728 +
54729 +       /* Disable devpoll when this environment variable is set */
54730 +       if (getenv("EVENT_NODEVPOLL"))
54731 +               return (NULL);
54732 +
54733 +       if (!(devpollop = calloc(1, sizeof(struct devpollop))))
54734 +               return (NULL);
54735 +
54736 +       if (getrlimit(RLIMIT_NOFILE, &rl) == 0 &&
54737 +           rl.rlim_cur != RLIM_INFINITY)
54738 +               nfiles = rl.rlim_cur - 1;
54739 +
54740 +       /* Initialize the kernel queue */
54741 +       if ((dpfd = open("/dev/poll", O_RDWR)) == -1) {
54742 +                event_warn("open: /dev/poll");
54743 +               free(devpollop);
54744 +               return (NULL);
54745 +       }
54746 +
54747 +       devpollop->dpfd = dpfd;
54748 +
54749 +       /* Initialize fields */
54750 +       devpollop->events = calloc(nfiles, sizeof(struct pollfd));
54751 +       if (devpollop->events == NULL) {
54752 +               free(devpollop);
54753 +               close(dpfd);
54754 +               return (NULL);
54755 +       }
54756 +       devpollop->nevents = nfiles;
54757 +
54758 +       devpollop->fds = calloc(nfiles, sizeof(struct evdevpoll));
54759 +       if (devpollop->fds == NULL) {
54760 +               free(devpollop->events);
54761 +               free(devpollop);
54762 +               close(dpfd);
54763 +               return (NULL);
54764 +       }
54765 +       devpollop->nfds = nfiles;
54766 +
54767 +       devpollop->changes = calloc(nfiles, sizeof(struct pollfd));
54768 +       if (devpollop->changes == NULL) {
54769 +               free(devpollop->fds);
54770 +               free(devpollop->events);
54771 +               free(devpollop);
54772 +               close(dpfd);
54773 +               return (NULL);
54774 +       }
54775 +
54776 +       evsignal_init(base);
54777 +
54778 +       return (devpollop);
54779 +}
54780 +
54781 +int
54782 +devpoll_recalc(struct event_base *base, void *arg, int max)
54783 +{
54784 +       struct devpollop *devpollop = arg;
54785 +
54786 +       if (max > devpollop->nfds) {
54787 +               struct evdevpoll *fds;
54788 +               int nfds;
54789 +
54790 +               nfds = devpollop->nfds;
54791 +               while (nfds < max)
54792 +                       nfds <<= 1;
54793 +
54794 +               fds = realloc(devpollop->fds, nfds * sizeof(struct evdevpoll));
54795 +               if (fds == NULL) {
54796 +                       event_warn("realloc");
54797 +                       return (-1);
54798 +               }
54799 +               devpollop->fds = fds;
54800 +               memset(fds + devpollop->nfds, 0,
54801 +                   (nfds - devpollop->nfds) * sizeof(struct evdevpoll));
54802 +               devpollop->nfds = nfds;
54803 +       }
54804 +
54805 +       return (0);
54806 +}
54807 +
54808 +int
54809 +devpoll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
54810 +{
54811 +       struct devpollop *devpollop = arg;
54812 +       struct pollfd *events = devpollop->events;
54813 +       struct dvpoll dvp;
54814 +       struct evdevpoll *evdp;
54815 +       int i, res, timeout;
54816 +
54817 +       if (devpollop->nchanges)
54818 +               devpoll_commit(devpollop);
54819 +
54820 +       timeout = tv->tv_sec * 1000 + (tv->tv_usec + 999) / 1000;
54821 +
54822 +       dvp.dp_fds = devpollop->events;
54823 +       dvp.dp_nfds = devpollop->nevents;
54824 +       dvp.dp_timeout = timeout;
54825 +
54826 +       res = ioctl(devpollop->dpfd, DP_POLL, &dvp);
54827 +
54828 +       if (res == -1) {
54829 +               if (errno != EINTR) {
54830 +                       event_warn("ioctl: DP_POLL");
54831 +                       return (-1);
54832 +               }
54833 +
54834 +               evsignal_process(base);
54835 +               return (0);
54836 +       } else if (base->sig.evsignal_caught) {
54837 +               evsignal_process(base);
54838 +       }
54839 +
54840 +       event_debug(("%s: devpoll_wait reports %d", __func__, res));
54841 +
54842 +       for (i = 0; i < res; i++) {
54843 +               int which = 0;
54844 +               int what = events[i].revents;
54845 +               struct event *evread = NULL, *evwrite = NULL;
54846 +
54847 +               assert(events[i].fd < devpollop->nfds);
54848 +               evdp = &devpollop->fds[events[i].fd];
54849 +   
54850 +                if (what & POLLHUP)
54851 +                        what |= POLLIN | POLLOUT;
54852 +                else if (what & POLLERR)
54853 +                        what |= POLLIN | POLLOUT;
54854 +
54855 +               if (what & POLLIN) {
54856 +                       evread = evdp->evread;
54857 +                       which |= EV_READ;
54858 +               }
54859 +
54860 +               if (what & POLLOUT) {
54861 +                       evwrite = evdp->evwrite;
54862 +                       which |= EV_WRITE;
54863 +               }
54864 +
54865 +               if (!which)
54866 +                       continue;
54867 +
54868 +               if (evread != NULL && !(evread->ev_events & EV_PERSIST))
54869 +                       event_del(evread);
54870 +               if (evwrite != NULL && evwrite != evread &&
54871 +                   !(evwrite->ev_events & EV_PERSIST))
54872 +                       event_del(evwrite);
54873 +
54874 +               if (evread != NULL)
54875 +                       event_active(evread, EV_READ, 1);
54876 +               if (evwrite != NULL)
54877 +                       event_active(evwrite, EV_WRITE, 1);
54878 +       }
54879 +
54880 +       return (0);
54881 +}
54882 +
54883 +
54884 +int
54885 +devpoll_add(void *arg, struct event *ev)
54886 +{
54887 +       struct devpollop *devpollop = arg;
54888 +       struct evdevpoll *evdp;
54889 +       int fd, events;
54890 +
54891 +       if (ev->ev_events & EV_SIGNAL)
54892 +               return (evsignal_add(ev));
54893 +
54894 +       fd = ev->ev_fd;
54895 +       if (fd >= devpollop->nfds) {
54896 +               /* Extend the file descriptor array as necessary */
54897 +               if (devpoll_recalc(ev->ev_base, devpollop, fd) == -1)
54898 +                       return (-1);
54899 +       }
54900 +       evdp = &devpollop->fds[fd];
54901 +
54902 +       /* 
54903 +        * It's not necessary to OR the existing read/write events that we
54904 +        * are currently interested in with the new event we are adding.
54905 +        * The /dev/poll driver ORs any new events with the existing events
54906 +        * that it has cached for the fd.
54907 +        */
54908 +
54909 +       events = 0;
54910 +       if (ev->ev_events & EV_READ) {
54911 +               if (evdp->evread && evdp->evread != ev) {
54912 +                  /* There is already a different read event registered */
54913 +                  return(-1);
54914 +               }
54915 +               events |= POLLIN;
54916 +       }
54917 +
54918 +       if (ev->ev_events & EV_WRITE) {
54919 +               if (evdp->evwrite && evdp->evwrite != ev) {
54920 +                  /* There is already a different write event registered */
54921 +                  return(-1);
54922 +               }
54923 +               events |= POLLOUT;
54924 +       }
54925 +
54926 +       if (devpoll_queue(devpollop, fd, events) != 0)
54927 +               return(-1);
54928 +
54929 +       /* Update events responsible */
54930 +       if (ev->ev_events & EV_READ)
54931 +               evdp->evread = ev;
54932 +       if (ev->ev_events & EV_WRITE)
54933 +               evdp->evwrite = ev;
54934 +
54935 +       return (0);
54936 +}
54937 +
54938 +int
54939 +devpoll_del(void *arg, struct event *ev)
54940 +{
54941 +       struct devpollop *devpollop = arg;
54942 +       struct evdevpoll *evdp;
54943 +       int fd, events;
54944 +       int needwritedelete = 1, needreaddelete = 1;
54945 +
54946 +       if (ev->ev_events & EV_SIGNAL)
54947 +               return (evsignal_del(ev));
54948 +
54949 +       fd = ev->ev_fd;
54950 +       if (fd >= devpollop->nfds)
54951 +               return (0);
54952 +       evdp = &devpollop->fds[fd];
54953 +
54954 +       events = 0;
54955 +       if (ev->ev_events & EV_READ)
54956 +               events |= POLLIN;
54957 +       if (ev->ev_events & EV_WRITE)
54958 +               events |= POLLOUT;
54959 +
54960 +       /*
54961 +        * The only way to remove an fd from the /dev/poll monitored set is
54962 +        * to use POLLREMOVE by itself.  This removes ALL events for the fd 
54963 +        * provided so if we care about two events and are only removing one 
54964 +        * we must re-add the other event after POLLREMOVE.
54965 +        */
54966 +
54967 +       if (devpoll_queue(devpollop, fd, POLLREMOVE) != 0)
54968 +               return(-1);
54969 +
54970 +       if ((events & (POLLIN|POLLOUT)) != (POLLIN|POLLOUT)) {
54971 +               /*
54972 +                * We're not deleting all events, so we must resubmit the
54973 +                * event that we are still interested in if one exists.
54974 +                */
54975 +
54976 +               if ((events & POLLIN) && evdp->evwrite != NULL) {
54977 +                       /* Deleting read, still care about write */
54978 +                       devpoll_queue(devpollop, fd, POLLOUT);
54979 +                       needwritedelete = 0;
54980 +               } else if ((events & POLLOUT) && evdp->evread != NULL) {
54981 +                       /* Deleting write, still care about read */
54982 +                       devpoll_queue(devpollop, fd, POLLIN);
54983 +                       needreaddelete = 0;
54984 +               }
54985 +       }
54986 +
54987 +       if (needreaddelete)
54988 +               evdp->evread = NULL;
54989 +       if (needwritedelete)
54990 +               evdp->evwrite = NULL;
54991 +
54992 +       return (0);
54993 +}
54994 +
54995 +void
54996 +devpoll_dealloc(struct event_base *base, void *arg)
54997 +{
54998 +       struct devpollop *devpollop = arg;
54999 +
55000 +       evsignal_dealloc(base);
55001 +       if (devpollop->fds)
55002 +               free(devpollop->fds);
55003 +       if (devpollop->events)
55004 +               free(devpollop->events);
55005 +       if (devpollop->changes)
55006 +               free(devpollop->changes);
55007 +       if (devpollop->dpfd >= 0)
55008 +               close(devpollop->dpfd);
55009 +
55010 +       memset(devpollop, 0, sizeof(struct devpollop));
55011 +       free(devpollop);
55012 +}
55013 diff -Nru php-5.2.4.vanilla/libevent/epoll.c php-5.2.4.fpm/libevent/epoll.c
55014 --- php-5.2.4.vanilla/libevent/epoll.c  1970-01-01 03:00:00.000000000 +0300
55015 +++ php-5.2.4.fpm/libevent/epoll.c      2007-08-31 15:47:19.000000000 +0400
55016 @@ -0,0 +1,364 @@
55017 +/*
55018 + * Copyright 2000-2003 Niels Provos <provos@citi.umich.edu>
55019 + * All rights reserved.
55020 + *
55021 + * Redistribution and use in source and binary forms, with or without
55022 + * modification, are permitted provided that the following conditions
55023 + * are met:
55024 + * 1. Redistributions of source code must retain the above copyright
55025 + *    notice, this list of conditions and the following disclaimer.
55026 + * 2. Redistributions in binary form must reproduce the above copyright
55027 + *    notice, this list of conditions and the following disclaimer in the
55028 + *    documentation and/or other materials provided with the distribution.
55029 + * 3. The name of the author may not be used to endorse or promote products
55030 + *    derived from this software without specific prior written permission.
55031 + *
55032 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
55033 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
55034 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
55035 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
55036 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
55037 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
55038 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
55039 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
55040 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
55041 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55042 + */
55043 +#ifdef HAVE_CONFIG_H
55044 +#include "config.h"
55045 +#endif
55046 +
55047 +#include <stdint.h>
55048 +#include <sys/types.h>
55049 +#include <sys/tree.h>
55050 +#include <sys/resource.h>
55051 +#ifdef HAVE_SYS_TIME_H
55052 +#include <sys/time.h>
55053 +#else
55054 +#include <sys/_time.h>
55055 +#endif
55056 +#include <sys/queue.h>
55057 +#include <sys/epoll.h>
55058 +#include <signal.h>
55059 +#include <stdio.h>
55060 +#include <stdlib.h>
55061 +#include <string.h>
55062 +#include <unistd.h>
55063 +#include <errno.h>
55064 +#ifdef HAVE_FCNTL_H
55065 +#include <fcntl.h>
55066 +#endif
55067 +
55068 +#include "event.h"
55069 +#include "event-internal.h"
55070 +#include "evsignal.h"
55071 +#include "log.h"
55072 +
55073 +/* due to limitations in the epoll interface, we need to keep track of
55074 + * all file descriptors outself.
55075 + */
55076 +struct evepoll {
55077 +       struct event *evread;
55078 +       struct event *evwrite;
55079 +};
55080 +
55081 +struct epollop {
55082 +       struct evepoll *fds;
55083 +       int nfds;
55084 +       struct epoll_event *events;
55085 +       int nevents;
55086 +       int epfd;
55087 +};
55088 +
55089 +void *epoll_init       (struct event_base *);
55090 +int epoll_add  (void *, struct event *);
55091 +int epoll_del  (void *, struct event *);
55092 +int epoll_recalc       (struct event_base *, void *, int);
55093 +int epoll_dispatch     (struct event_base *, void *, struct timeval *);
55094 +void epoll_dealloc     (struct event_base *, void *);
55095 +
55096 +struct eventop epollops = {
55097 +       "epoll",
55098 +       epoll_init,
55099 +       epoll_add,
55100 +       epoll_del,
55101 +       epoll_recalc,
55102 +       epoll_dispatch,
55103 +       epoll_dealloc
55104 +};
55105 +
55106 +#ifdef HAVE_SETFD
55107 +#define FD_CLOSEONEXEC(x) do { \
55108 +        if (fcntl(x, F_SETFD, 1) == -1) \
55109 +                event_warn("fcntl(%d, F_SETFD)", x); \
55110 +} while (0)
55111 +#else
55112 +#define FD_CLOSEONEXEC(x)
55113 +#endif
55114 +
55115 +#define NEVENT 32000
55116 +
55117 +void *
55118 +epoll_init(struct event_base *base)
55119 +{
55120 +       int epfd, nfiles = NEVENT;
55121 +       struct rlimit rl;
55122 +       struct epollop *epollop;
55123 +
55124 +       /* Disable epollueue when this environment variable is set */
55125 +       if (getenv("EVENT_NOEPOLL"))
55126 +               return (NULL);
55127 +
55128 +       if (getrlimit(RLIMIT_NOFILE, &rl) == 0 &&
55129 +           rl.rlim_cur != RLIM_INFINITY) {
55130 +               /*
55131 +                * Solaris is somewhat retarded - it's important to drop
55132 +                * backwards compatibility when making changes.  So, don't
55133 +                * dare to put rl.rlim_cur here.
55134 +                */
55135 +               nfiles = rl.rlim_cur - 1;
55136 +       }
55137 +
55138 +       /* Initalize the kernel queue */
55139 +
55140 +       if ((epfd = epoll_create(nfiles)) == -1) {
55141 +                event_warn("epoll_create");
55142 +               return (NULL);
55143 +       }
55144 +
55145 +       FD_CLOSEONEXEC(epfd);
55146 +
55147 +       if (!(epollop = calloc(1, sizeof(struct epollop))))
55148 +               return (NULL);
55149 +
55150 +       epollop->epfd = epfd;
55151 +
55152 +       /* Initalize fields */
55153 +       epollop->events = malloc(nfiles * sizeof(struct epoll_event));
55154 +       if (epollop->events == NULL) {
55155 +               free(epollop);
55156 +               return (NULL);
55157 +       }
55158 +       epollop->nevents = nfiles;
55159 +
55160 +       epollop->fds = calloc(nfiles, sizeof(struct evepoll));
55161 +       if (epollop->fds == NULL) {
55162 +               free(epollop->events);
55163 +               free(epollop);
55164 +               return (NULL);
55165 +       }
55166 +       epollop->nfds = nfiles;
55167 +
55168 +       evsignal_init(base);
55169 +
55170 +       return (epollop);
55171 +}
55172 +
55173 +int
55174 +epoll_recalc(struct event_base *base, void *arg, int max)
55175 +{
55176 +       struct epollop *epollop = arg;
55177 +
55178 +       if (max > epollop->nfds) {
55179 +               struct evepoll *fds;
55180 +               int nfds;
55181 +
55182 +               nfds = epollop->nfds;
55183 +               while (nfds < max)
55184 +                       nfds <<= 1;
55185 +
55186 +               fds = realloc(epollop->fds, nfds * sizeof(struct evepoll));
55187 +               if (fds == NULL) {
55188 +                       event_warn("realloc");
55189 +                       return (-1);
55190 +               }
55191 +               epollop->fds = fds;
55192 +               memset(fds + epollop->nfds, 0,
55193 +                   (nfds - epollop->nfds) * sizeof(struct evepoll));
55194 +               epollop->nfds = nfds;
55195 +       }
55196 +
55197 +       return (0);
55198 +}
55199 +
55200 +int
55201 +epoll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
55202 +{
55203 +       struct epollop *epollop = arg;
55204 +       struct epoll_event *events = epollop->events;
55205 +       struct evepoll *evep;
55206 +       int i, res, timeout;
55207 +
55208 +       timeout = tv->tv_sec * 1000 + (tv->tv_usec + 999) / 1000;
55209 +       res = epoll_wait(epollop->epfd, events, epollop->nevents, timeout);
55210 +
55211 +       if (res == -1) {
55212 +               if (errno != EINTR) {
55213 +                       event_warn("epoll_wait");
55214 +                       return (-1);
55215 +               }
55216 +
55217 +               evsignal_process(base);
55218 +               return (0);
55219 +       } else if (base->sig.evsignal_caught) {
55220 +               evsignal_process(base);
55221 +       }
55222 +
55223 +       event_debug(("%s: epoll_wait reports %d", __func__, res));
55224 +
55225 +       for (i = 0; i < res; i++) {
55226 +               int which = 0;
55227 +               int what = events[i].events;
55228 +               struct event *evread = NULL, *evwrite = NULL;
55229 +
55230 +               evep = (struct evepoll *)events[i].data.ptr;
55231 +   
55232 +                if (what & EPOLLHUP)
55233 +                        what |= EPOLLIN | EPOLLOUT;
55234 +                else if (what & EPOLLERR)
55235 +                        what |= EPOLLIN | EPOLLOUT;
55236 +
55237 +               if (what & EPOLLIN) {
55238 +                       evread = evep->evread;
55239 +                       which |= EV_READ;
55240 +               }
55241 +
55242 +               if (what & EPOLLOUT) {
55243 +                       evwrite = evep->evwrite;
55244 +                       which |= EV_WRITE;
55245 +               }
55246 +
55247 +               if (!which)
55248 +                       continue;
55249 +
55250 +               if (evread != NULL && !(evread->ev_events & EV_PERSIST))
55251 +                       event_del(evread);
55252 +               if (evwrite != NULL && evwrite != evread &&
55253 +                   !(evwrite->ev_events & EV_PERSIST))
55254 +                       event_del(evwrite);
55255 +
55256 +               if (evread != NULL)
55257 +                       event_active(evread, EV_READ, 1);
55258 +               if (evwrite != NULL)
55259 +                       event_active(evwrite, EV_WRITE, 1);
55260 +       }
55261 +
55262 +       return (0);
55263 +}
55264 +
55265 +
55266 +int
55267 +epoll_add(void *arg, struct event *ev)
55268 +{
55269 +       struct epollop *epollop = arg;
55270 +       struct epoll_event epev = {0, {0}};
55271 +       struct evepoll *evep;
55272 +       int fd, op, events;
55273 +
55274 +       if (ev->ev_events & EV_SIGNAL)
55275 +               return (evsignal_add(ev));
55276 +
55277 +       fd = ev->ev_fd;
55278 +       if (fd >= epollop->nfds) {
55279 +               /* Extent the file descriptor array as necessary */
55280 +               if (epoll_recalc(ev->ev_base, epollop, fd) == -1)
55281 +                       return (-1);
55282 +       }
55283 +       evep = &epollop->fds[fd];
55284 +       op = EPOLL_CTL_ADD;
55285 +       events = 0;
55286 +       if (evep->evread != NULL) {
55287 +               events |= EPOLLIN;
55288 +               op = EPOLL_CTL_MOD;
55289 +       }
55290 +       if (evep->evwrite != NULL) {
55291 +               events |= EPOLLOUT;
55292 +               op = EPOLL_CTL_MOD;
55293 +       }
55294 +
55295 +       if (ev->ev_events & EV_READ)
55296 +               events |= EPOLLIN;
55297 +       if (ev->ev_events & EV_WRITE)
55298 +               events |= EPOLLOUT;
55299 +
55300 +       epev.data.ptr = evep;
55301 +       epev.events = events;
55302 +       if (epoll_ctl(epollop->epfd, op, ev->ev_fd, &epev) == -1)
55303 +                       return (-1);
55304 +
55305 +       /* Update events responsible */
55306 +       if (ev->ev_events & EV_READ)
55307 +               evep->evread = ev;
55308 +       if (ev->ev_events & EV_WRITE)
55309 +               evep->evwrite = ev;
55310 +
55311 +       return (0);
55312 +}
55313 +
55314 +int
55315 +epoll_del(void *arg, struct event *ev)
55316 +{
55317 +       struct epollop *epollop = arg;
55318 +       struct epoll_event epev = {0, {0}};
55319 +       struct evepoll *evep;
55320 +       int fd, events, op;
55321 +       int needwritedelete = 1, needreaddelete = 1;
55322 +
55323 +       if (ev->ev_events & EV_SIGNAL)
55324 +               return (evsignal_del(ev));
55325 +
55326 +       fd = ev->ev_fd;
55327 +       if (fd >= epollop->nfds)
55328 +               return (0);
55329 +       evep = &epollop->fds[fd];
55330 +
55331 +       op = EPOLL_CTL_DEL;
55332 +       events = 0;
55333 +
55334 +       if (ev->ev_events & EV_READ)
55335 +               events |= EPOLLIN;
55336 +       if (ev->ev_events & EV_WRITE)
55337 +               events |= EPOLLOUT;
55338 +
55339 +       if ((events & (EPOLLIN|EPOLLOUT)) != (EPOLLIN|EPOLLOUT)) {
55340 +               if ((events & EPOLLIN) && evep->evwrite != NULL) {
55341 +                       needwritedelete = 0;
55342 +                       events = EPOLLOUT;
55343 +                       op = EPOLL_CTL_MOD;
55344 +               } else if ((events & EPOLLOUT) && evep->evread != NULL) {
55345 +                       needreaddelete = 0;
55346 +                       events = EPOLLIN;
55347 +                       op = EPOLL_CTL_MOD;
55348 +               }
55349 +       }
55350 +
55351 +       epev.events = events;
55352 +       epev.data.ptr = evep;
55353 +
55354 +       if (needreaddelete)
55355 +               evep->evread = NULL;
55356 +       if (needwritedelete)
55357 +               evep->evwrite = NULL;
55358 +
55359 +       if (epoll_ctl(epollop->epfd, op, fd, &epev) == -1)
55360 +               return (-1);
55361 +
55362 +       return (0);
55363 +}
55364 +
55365 +void
55366 +epoll_dealloc(struct event_base *base, void *arg)
55367 +{
55368 +       struct epollop *epollop = arg;
55369 +
55370 +       evsignal_dealloc(base);
55371 +       if (epollop->fds)
55372 +               free(epollop->fds);
55373 +       if (epollop->events)
55374 +               free(epollop->events);
55375 +       if (epollop->epfd >= 0)
55376 +               close(epollop->epfd);
55377 +
55378 +       memset(epollop, 0, sizeof(struct epollop));
55379 +       free(epollop);
55380 +}
55381 diff -Nru php-5.2.4.vanilla/libevent/epoll_sub.c php-5.2.4.fpm/libevent/epoll_sub.c
55382 --- php-5.2.4.vanilla/libevent/epoll_sub.c      1970-01-01 03:00:00.000000000 +0300
55383 +++ php-5.2.4.fpm/libevent/epoll_sub.c  2007-08-31 15:47:19.000000000 +0400
55384 @@ -0,0 +1,52 @@
55385 +/*
55386 + * Copyright 2003 Niels Provos <provos@citi.umich.edu>
55387 + * All rights reserved.
55388 + *
55389 + * Redistribution and use in source and binary forms, with or without
55390 + * modification, are permitted provided that the following conditions
55391 + * are met:
55392 + * 1. Redistributions of source code must retain the above copyright
55393 + *    notice, this list of conditions and the following disclaimer.
55394 + * 2. Redistributions in binary form must reproduce the above copyright
55395 + *    notice, this list of conditions and the following disclaimer in the
55396 + *    documentation and/or other materials provided with the distribution.
55397 + * 3. The name of the author may not be used to endorse or promote products
55398 + *    derived from this software without specific prior written permission.
55399 + *
55400 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
55401 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
55402 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
55403 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
55404 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
55405 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
55406 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
55407 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
55408 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
55409 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55410 + */
55411 +#include <stdint.h>
55412 +
55413 +#include <sys/param.h>
55414 +#include <sys/types.h>
55415 +#include <sys/syscall.h>
55416 +#include <sys/epoll.h>
55417 +#include <unistd.h>
55418 +
55419 +int
55420 +epoll_create(int size)
55421 +{
55422 +       return (syscall(__NR_epoll_create, size));
55423 +}
55424 +
55425 +int
55426 +epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
55427 +{
55428 +
55429 +       return (syscall(__NR_epoll_ctl, epfd, op, fd, event));
55430 +}
55431 +
55432 +int
55433 +epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout)
55434 +{
55435 +       return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout));
55436 +}
55437 diff -Nru php-5.2.4.vanilla/libevent/evbuffer.c php-5.2.4.fpm/libevent/evbuffer.c
55438 --- php-5.2.4.vanilla/libevent/evbuffer.c       1970-01-01 03:00:00.000000000 +0300
55439 +++ php-5.2.4.fpm/libevent/evbuffer.c   2007-08-31 15:47:19.000000000 +0400
55440 @@ -0,0 +1,413 @@
55441 +/*
55442 + * Copyright (c) 2002-2004 Niels Provos <provos@citi.umich.edu>
55443 + * All rights reserved.
55444 + *
55445 + * Redistribution and use in source and binary forms, with or without
55446 + * modification, are permitted provided that the following conditions
55447 + * are met:
55448 + * 1. Redistributions of source code must retain the above copyright
55449 + *    notice, this list of conditions and the following disclaimer.
55450 + * 2. Redistributions in binary form must reproduce the above copyright
55451 + *    notice, this list of conditions and the following disclaimer in the
55452 + *    documentation and/or other materials provided with the distribution.
55453 + * 3. The name of the author may not be used to endorse or promote products
55454 + *    derived from this software without specific prior written permission.
55455 + *
55456 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
55457 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
55458 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
55459 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
55460 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
55461 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
55462 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
55463 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
55464 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
55465 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55466 + */
55467 +
55468 +#include <sys/types.h>
55469 +
55470 +#ifdef HAVE_CONFIG_H
55471 +#include "config.h"
55472 +#endif
55473 +
55474 +#ifdef HAVE_SYS_TIME_H
55475 +#include <sys/time.h>
55476 +#endif
55477 +
55478 +#include <errno.h>
55479 +#include <stdio.h>
55480 +#include <stdlib.h>
55481 +#include <string.h>
55482 +#ifdef HAVE_STDARG_H
55483 +#include <stdarg.h>
55484 +#endif
55485 +
55486 +#include "event.h"
55487 +
55488 +/* prototypes */
55489 +
55490 +void bufferevent_setwatermark(struct bufferevent *, short, size_t, size_t);
55491 +void bufferevent_read_pressure_cb(struct evbuffer *, size_t, size_t, void *);
55492 +
55493 +static int
55494 +bufferevent_add(struct event *ev, int timeout)
55495 +{
55496 +       struct timeval tv, *ptv = NULL;
55497 +
55498 +       if (timeout) {
55499 +               timerclear(&tv);
55500 +               tv.tv_sec = timeout;
55501 +               ptv = &tv;
55502 +       }
55503 +
55504 +       return (event_add(ev, ptv));
55505 +}
55506 +
55507 +/* 
55508 + * This callback is executed when the size of the input buffer changes.
55509 + * We use it to apply back pressure on the reading side.
55510 + */
55511 +
55512 +void
55513 +bufferevent_read_pressure_cb(struct evbuffer *buf, size_t old, size_t now,
55514 +    void *arg) {
55515 +       struct bufferevent *bufev = arg;
55516 +       /* 
55517 +        * If we are below the watermark then reschedule reading if it's
55518 +        * still enabled.
55519 +        */
55520 +       if (bufev->wm_read.high == 0 || now < bufev->wm_read.high) {
55521 +               evbuffer_setcb(buf, NULL, NULL);
55522 +
55523 +               if (bufev->enabled & EV_READ)
55524 +                       bufferevent_add(&bufev->ev_read, bufev->timeout_read);
55525 +       }
55526 +}
55527 +
55528 +static void
55529 +bufferevent_readcb(int fd, short event, void *arg)
55530 +{
55531 +       struct bufferevent *bufev = arg;
55532 +       int res = 0;
55533 +       short what = EVBUFFER_READ;
55534 +       size_t len;
55535 +       int howmuch = -1;
55536 +
55537 +       if (event == EV_TIMEOUT) {
55538 +               what |= EVBUFFER_TIMEOUT;
55539 +               goto error;
55540 +       }
55541 +
55542 +       /*
55543 +        * If we have a high watermark configured then we don't want to
55544 +        * read more data than would make us reach the watermark.
55545 +        */
55546 +       if (bufev->wm_read.high != 0)
55547 +               howmuch = bufev->wm_read.high;
55548 +
55549 +       res = evbuffer_read(bufev->input, fd, howmuch);
55550 +       if (res == -1) {
55551 +               if (errno == EAGAIN || errno == EINTR)
55552 +                       goto reschedule;
55553 +               /* error case */
55554 +               what |= EVBUFFER_ERROR;
55555 +       } else if (res == 0) {
55556 +               /* eof case */
55557 +               what |= EVBUFFER_EOF;
55558 +       }
55559 +
55560 +       if (res <= 0)
55561 +               goto error;
55562 +
55563 +       bufferevent_add(&bufev->ev_read, bufev->timeout_read);
55564 +
55565 +       /* See if this callbacks meets the water marks */
55566 +       len = EVBUFFER_LENGTH(bufev->input);
55567 +       if (bufev->wm_read.low != 0 && len < bufev->wm_read.low)
55568 +               return;
55569 +       if (bufev->wm_read.high != 0 && len > bufev->wm_read.high) {
55570 +               struct evbuffer *buf = bufev->input;
55571 +               event_del(&bufev->ev_read);
55572 +
55573 +               /* Now schedule a callback for us */
55574 +               evbuffer_setcb(buf, bufferevent_read_pressure_cb, bufev);
55575 +               return;
55576 +       }
55577 +
55578 +       /* Invoke the user callback - must always be called last */
55579 +       if (bufev->readcb != NULL)
55580 +               (*bufev->readcb)(bufev, bufev->cbarg);
55581 +       return;
55582 +
55583 + reschedule:
55584 +       bufferevent_add(&bufev->ev_read, bufev->timeout_read);
55585 +       return;
55586 +
55587 + error:
55588 +       (*bufev->errorcb)(bufev, what, bufev->cbarg);
55589 +}
55590 +
55591 +static void
55592 +bufferevent_writecb(int fd, short event, void *arg)
55593 +{
55594 +       struct bufferevent *bufev = arg;
55595 +       int res = 0;
55596 +       short what = EVBUFFER_WRITE;
55597 +
55598 +       if (event == EV_TIMEOUT) {
55599 +               what |= EVBUFFER_TIMEOUT;
55600 +               goto error;
55601 +       }
55602 +
55603 +       if (EVBUFFER_LENGTH(bufev->output)) {
55604 +           res = evbuffer_write(bufev->output, fd);
55605 +           if (res == -1) {
55606 +#ifndef WIN32
55607 +/*todo. evbuffer uses WriteFile when WIN32 is set. WIN32 system calls do not
55608 + *set errno. thus this error checking is not portable*/
55609 +                   if (errno == EAGAIN ||
55610 +                       errno == EINTR ||
55611 +                       errno == EINPROGRESS)
55612 +                           goto reschedule;
55613 +                   /* error case */
55614 +                   what |= EVBUFFER_ERROR;
55615 +
55616 +#else
55617 +                               goto reschedule;
55618 +#endif
55619 +
55620 +           } else if (res == 0) {
55621 +                   /* eof case */
55622 +                   what |= EVBUFFER_EOF;
55623 +           }
55624 +           if (res <= 0)
55625 +                   goto error;
55626 +       }
55627 +
55628 +       if (EVBUFFER_LENGTH(bufev->output) != 0)
55629 +               bufferevent_add(&bufev->ev_write, bufev->timeout_write);
55630 +
55631 +       /*
55632 +        * Invoke the user callback if our buffer is drained or below the
55633 +        * low watermark.
55634 +        */
55635 +       if (bufev->writecb != NULL &&
55636 +           EVBUFFER_LENGTH(bufev->output) <= bufev->wm_write.low)
55637 +               (*bufev->writecb)(bufev, bufev->cbarg);
55638 +
55639 +       return;
55640 +
55641 + reschedule:
55642 +       if (EVBUFFER_LENGTH(bufev->output) != 0)
55643 +               bufferevent_add(&bufev->ev_write, bufev->timeout_write);
55644 +       return;
55645 +
55646 + error:
55647 +       (*bufev->errorcb)(bufev, what, bufev->cbarg);
55648 +}
55649 +
55650 +/*
55651 + * Create a new buffered event object.
55652 + *
55653 + * The read callback is invoked whenever we read new data.
55654 + * The write callback is invoked whenever the output buffer is drained.
55655 + * The error callback is invoked on a write/read error or on EOF.
55656 + *
55657 + * Both read and write callbacks maybe NULL.  The error callback is not
55658 + * allowed to be NULL and have to be provided always.
55659 + */
55660 +
55661 +struct bufferevent *
55662 +bufferevent_new(int fd, evbuffercb readcb, evbuffercb writecb,
55663 +    everrorcb errorcb, void *cbarg)
55664 +{
55665 +       struct bufferevent *bufev;
55666 +
55667 +       if ((bufev = calloc(1, sizeof(struct bufferevent))) == NULL)
55668 +               return (NULL);
55669 +
55670 +       if ((bufev->input = evbuffer_new()) == NULL) {
55671 +               free(bufev);
55672 +               return (NULL);
55673 +       }
55674 +
55675 +       if ((bufev->output = evbuffer_new()) == NULL) {
55676 +               evbuffer_free(bufev->input);
55677 +               free(bufev);
55678 +               return (NULL);
55679 +       }
55680 +
55681 +       event_set(&bufev->ev_read, fd, EV_READ, bufferevent_readcb, bufev);
55682 +       event_set(&bufev->ev_write, fd, EV_WRITE, bufferevent_writecb, bufev);
55683 +
55684 +       bufev->readcb = readcb;
55685 +       bufev->writecb = writecb;
55686 +       bufev->errorcb = errorcb;
55687 +
55688 +       bufev->cbarg = cbarg;
55689 +
55690 +       /*
55691 +        * Set to EV_WRITE so that using bufferevent_write is going to
55692 +        * trigger a callback.  Reading needs to be explicitly enabled
55693 +        * because otherwise no data will be available.
55694 +        */
55695 +       bufev->enabled = EV_WRITE;
55696 +
55697 +       return (bufev);
55698 +}
55699 +
55700 +int
55701 +bufferevent_priority_set(struct bufferevent *bufev, int priority)
55702 +{
55703 +       if (event_priority_set(&bufev->ev_read, priority) == -1)
55704 +               return (-1);
55705 +       if (event_priority_set(&bufev->ev_write, priority) == -1)
55706 +               return (-1);
55707 +
55708 +       return (0);
55709 +}
55710 +
55711 +/* Closing the file descriptor is the responsibility of the caller */
55712 +
55713 +void
55714 +bufferevent_free(struct bufferevent *bufev)
55715 +{
55716 +       event_del(&bufev->ev_read);
55717 +       event_del(&bufev->ev_write);
55718 +
55719 +       evbuffer_free(bufev->input);
55720 +       evbuffer_free(bufev->output);
55721 +
55722 +       free(bufev);
55723 +}
55724 +
55725 +/*
55726 + * Returns 0 on success;
55727 + *        -1 on failure.
55728 + */
55729 +
55730 +int
55731 +bufferevent_write(struct bufferevent *bufev, void *data, size_t size)
55732 +{
55733 +       int res;
55734 +
55735 +       res = evbuffer_add(bufev->output, data, size);
55736 +
55737 +       if (res == -1)
55738 +               return (res);
55739 +
55740 +       /* If everything is okay, we need to schedule a write */
55741 +       if (size > 0 && (bufev->enabled & EV_WRITE))
55742 +               bufferevent_add(&bufev->ev_write, bufev->timeout_write);
55743 +
55744 +       return (res);
55745 +}
55746 +
55747 +int
55748 +bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer *buf)
55749 +{
55750 +       int res;
55751 +
55752 +       res = bufferevent_write(bufev, buf->buffer, buf->off);
55753 +       if (res != -1)
55754 +               evbuffer_drain(buf, buf->off);
55755 +
55756 +       return (res);
55757 +}
55758 +
55759 +size_t
55760 +bufferevent_read(struct bufferevent *bufev, void *data, size_t size)
55761 +{
55762 +       struct evbuffer *buf = bufev->input;
55763 +
55764 +       if (buf->off < size)
55765 +               size = buf->off;
55766 +
55767 +       /* Copy the available data to the user buffer */
55768 +       memcpy(data, buf->buffer, size);
55769 +
55770 +       if (size)
55771 +               evbuffer_drain(buf, size);
55772 +
55773 +       return (size);
55774 +}
55775 +
55776 +int
55777 +bufferevent_enable(struct bufferevent *bufev, short event)
55778 +{
55779 +       if (event & EV_READ) {
55780 +               if (bufferevent_add(&bufev->ev_read, bufev->timeout_read) == -1)
55781 +                       return (-1);
55782 +       }
55783 +       if (event & EV_WRITE) {
55784 +               if (bufferevent_add(&bufev->ev_write, bufev->timeout_write) == -1)
55785 +                       return (-1);
55786 +       }
55787 +
55788 +       bufev->enabled |= event;
55789 +       return (0);
55790 +}
55791 +
55792 +int
55793 +bufferevent_disable(struct bufferevent *bufev, short event)
55794 +{
55795 +       if (event & EV_READ) {
55796 +               if (event_del(&bufev->ev_read) == -1)
55797 +                       return (-1);
55798 +       }
55799 +       if (event & EV_WRITE) {
55800 +               if (event_del(&bufev->ev_write) == -1)
55801 +                       return (-1);
55802 +       }
55803 +
55804 +       bufev->enabled &= ~event;
55805 +       return (0);
55806 +}
55807 +
55808 +/*
55809 + * Sets the read and write timeout for a buffered event.
55810 + */
55811 +
55812 +void
55813 +bufferevent_settimeout(struct bufferevent *bufev,
55814 +    int timeout_read, int timeout_write) {
55815 +       bufev->timeout_read = timeout_read;
55816 +       bufev->timeout_write = timeout_write;
55817 +}
55818 +
55819 +/*
55820 + * Sets the water marks
55821 + */
55822 +
55823 +void
55824 +bufferevent_setwatermark(struct bufferevent *bufev, short events,
55825 +    size_t lowmark, size_t highmark)
55826 +{
55827 +       if (events & EV_READ) {
55828 +               bufev->wm_read.low = lowmark;
55829 +               bufev->wm_read.high = highmark;
55830 +       }
55831 +
55832 +       if (events & EV_WRITE) {
55833 +               bufev->wm_write.low = lowmark;
55834 +               bufev->wm_write.high = highmark;
55835 +       }
55836 +
55837 +       /* If the watermarks changed then see if we should call read again */
55838 +       bufferevent_read_pressure_cb(bufev->input,
55839 +           0, EVBUFFER_LENGTH(bufev->input), bufev);
55840 +}
55841 +
55842 +int
55843 +bufferevent_base_set(struct event_base *base, struct bufferevent *bufev)
55844 +{
55845 +       int res;
55846 +
55847 +       res = event_base_set(base, &bufev->ev_read);
55848 +       if (res == -1)
55849 +               return (res);
55850 +
55851 +       res = event_base_set(base, &bufev->ev_write);
55852 +       return (res);
55853 +}
55854 diff -Nru php-5.2.4.vanilla/libevent/evdns.3 php-5.2.4.fpm/libevent/evdns.3
55855 --- php-5.2.4.vanilla/libevent/evdns.3  1970-01-01 03:00:00.000000000 +0300
55856 +++ php-5.2.4.fpm/libevent/evdns.3      2007-08-31 15:47:19.000000000 +0400
55857 @@ -0,0 +1,322 @@
55858 +.\"
55859 +.\" Copyright (c) 2006 Niels Provos <provos@citi.umich.edu>
55860 +.\" All rights reserved.
55861 +.\"
55862 +.\" Redistribution and use in source and binary forms, with or without
55863 +.\" modification, are permitted provided that the following conditions
55864 +.\" are met:
55865 +.\"
55866 +.\" 1. Redistributions of source code must retain the above copyright
55867 +.\"    notice, this list of conditions and the following disclaimer.
55868 +.\" 2. Redistributions in binary form must reproduce the above copyright
55869 +.\"    notice, this list of conditions and the following disclaimer in the
55870 +.\"    documentation and/or other materials provided with the distribution.
55871 +.\" 3. The name of the author may not be used to endorse or promote products
55872 +.\"    derived from this software without specific prior written permission.
55873 +.\"
55874 +.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
55875 +.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
55876 +.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
55877 +.\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
55878 +.\" EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLUDING, BUT NOT LIMITED TO,
55879 +.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
55880 +.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
55881 +.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
55882 +.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
55883 +.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55884 +.\"
55885 +.Dd October 7, 2006
55886 +.Dt EVDNS 3
55887 +.Os
55888 +.Sh NAME
55889 +.Nm evdns_init
55890 +.Nm evdns_shutdown
55891 +.Nm evdns_err_to_string
55892 +.Nm evdns_nameserver_add
55893 +.Nm evdns_count_nameservers
55894 +.Nm evdns_clear_nameservers_and_suspend
55895 +.Nm evdns_resume
55896 +.Nm evdns_nameserver_ip_add
55897 +.Nm evdns_resolve_ipv4
55898 +.Nm evdns_resolve_reverse
55899 +.Nm evdns_resolv_conf_parse
55900 +.Nm evdns_config_windows_nameservers
55901 +.Nm evdns_search_clear
55902 +.Nm evdns_search_add
55903 +.Nm evdns_search_ndots_set
55904 +.Nm evdns_set_log_fn
55905 +.Nd asynchronous functions for DNS resolution.
55906 +.Sh SYNOPSIS
55907 +.Fd #include <sys/time.h>
55908 +.Fd #include <event.h>
55909 +.Fd #include <evdns.h>
55910 +.Ft int
55911 +.Fn evdns_init
55912 +.Ft void
55913 +.Fn evdns_shutdown "int fail_requests"
55914 +.Ft "const char *"
55915 +.Fn evdns_err_to_string "int err"
55916 +.Ft int
55917 +.Fn evdns_nameserver_add "unsigned long int address"
55918 +.Ft int
55919 +.Fn evdns_count_nameservers
55920 +.Ft int
55921 +.Fn evdns_clear_nameservers_and_suspend
55922 +.Ft int
55923 +.Fn evdns_resume
55924 +.Ft int
55925 +.Fn evdns_nameserver_ip_add(const char *ip_as_string);
55926 +.Ft int
55927 +.Fn evdns_resolve_ipv4 "const char *name" "int flags" "evdns_callback_type callback" "void *ptr"
55928 +.Ft int
55929 +.Fn evdns_resolve_reverse "struct in_addr *in" "int flags" "evdns_callback_type callback" "void *ptr"
55930 +.Ft int
55931 +.Fn evdns_resolv_conf_parse "int flags" "const char *"
55932 +.Ft void
55933 +.Fn evdns_search_clear
55934 +.Ft void
55935 +.Fn evdns_search_add "const char *domain"
55936 +.Ft void
55937 +.Fn evdns_search_ndots_set "const int ndots"
55938 +.Ft void
55939 +.Fn evdns_set_log_fn "evdns_debug_log_fn_type fn"
55940 +.Ft int
55941 +.Fn evdns_config_windows_nameservers
55942 +.Sh DESCRIPTION
55943 +Welcome, gentle reader
55944 +.Pp
55945 +Async DNS lookups are really a whole lot harder than they should be,
55946 +mostly stemming from the fact that the libc resolver has never been
55947 +very good at them. Before you use this library you should see if libc
55948 +can do the job for you with the modern async call getaddrinfo_a
55949 +(see http://www.imperialviolet.org/page25.html#e498). Otherwise,
55950 +please continue.
55951 +.Pp
55952 +This code is based on libevent and you must call event_init before
55953 +any of the APIs in this file. You must also seed the OpenSSL random
55954 +source if you are using OpenSSL for ids (see below).
55955 +.Pp
55956 +This library is designed to be included and shipped with your source
55957 +code. You statically link with it. You should also test for the
55958 +existence of strtok_r and define HAVE_STRTOK_R if you have it.
55959 +.Pp
55960 +The DNS protocol requires a good source of id numbers and these
55961 +numbers should be unpredictable for spoofing reasons. There are
55962 +three methods for generating them here and you must define exactly
55963 +one of them. In increasing order of preference:
55964 +.Pp
55965 +.Bl -tag -width "DNS_USE_GETTIMEOFDAY_FOR_ID" -compact -offset indent
55966 +.It DNS_USE_GETTIMEOFDAY_FOR_ID
55967 +Using the bottom 16 bits of the usec result from gettimeofday. This
55968 +is a pretty poor solution but should work anywhere.
55969 +.It DNS_USE_CPU_CLOCK_FOR_ID
55970 +Using the bottom 16 bits of the nsec result from the CPU's time
55971 +counter. This is better, but may not work everywhere. Requires
55972 +POSIX realtime support and you'll need to link against -lrt on
55973 +glibc systems at least.
55974 +.It DNS_USE_OPENSSL_FOR_ID
55975 +Uses the OpenSSL RAND_bytes call to generate the data. You must
55976 +have seeded the pool before making any calls to this library.
55977 +.El
55978 +.Pp
55979 +The library keeps track of the state of nameservers and will avoid
55980 +them when they go down. Otherwise it will round robin between them.
55981 +.Pp
55982 +Quick start guide:
55983 +  #include "evdns.h"
55984 +  void callback(int result, char type, int count, int ttl,
55985 +        void *addresses, void *arg);
55986 +  evdns_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf");
55987 +  evdns_resolve("www.hostname.com", 0, callback, NULL);
55988 +.Pp
55989 +When the lookup is complete the callback function is called. The
55990 +first argument will be one of the DNS_ERR_* defines in evdns.h.
55991 +Hopefully it will be DNS_ERR_NONE, in which case type will be
55992 +DNS_IPv4_A, count will be the number of IP addresses, ttl is the time
55993 +which the data can be cached for (in seconds), addresses will point
55994 +to an array of uint32_t's and arg will be whatever you passed to
55995 +evdns_resolve.
55996 +.Pp
55997 +Searching:
55998 +.Pp
55999 +In order for this library to be a good replacement for glibc's resolver it
56000 +supports searching. This involves setting a list of default domains, in
56001 +which names will be queried for. The number of dots in the query name
56002 +determines the order in which this list is used.
56003 +.Pp
56004 +Searching appears to be a single lookup from the point of view of the API,
56005 +although many DNS queries may be generated from a single call to
56006 +evdns_resolve. Searching can also drastically slow down the resolution
56007 +of names.
56008 +.Pp
56009 +To disable searching:
56010 +.Bl -enum -compact -offset indent
56011 +.It
56012 +Never set it up. If you never call
56013 +.Fn evdns_resolv_conf_parse,
56014 +.Fn evdns_init,
56015 +or
56016 +.Fn evdns_search_add
56017 +then no searching will occur.
56018 +.It
56019 +If you do call
56020 +.Fn evdns_resolv_conf_parse
56021 +then don't pass
56022 +.Va DNS_OPTION_SEARCH
56023 +(or
56024 +.Va DNS_OPTIONS_ALL,
56025 +which implies it).
56026 +.It
56027 +When calling
56028 +.Fn evdns_resolve,
56029 +pass the
56030 +.Va DNS_QUERY_NO_SEARCH
56031 +flag.
56032 +.El
56033 +.Pp
56034 +The order of searches depends on the number of dots in the name. If the
56035 +number is greater than the ndots setting then the names is first tried
56036 +globally. Otherwise each search domain is appended in turn.
56037 +.Pp
56038 +The ndots setting can either be set from a resolv.conf, or by calling
56039 +evdns_search_ndots_set.
56040 +.Pp
56041 +For example, with ndots set to 1 (the default) and a search domain list of
56042 +["myhome.net"]:
56043 + Query: www
56044 + Order: www.myhome.net, www.
56045 +.Pp
56046 + Query: www.abc
56047 + Order: www.abc., www.abc.myhome.net
56048 +.Pp
56049 +.Sh API reference
56050 +.Pp
56051 +.Bl -tag -width 0123456
56052 +.It Ft int Fn evdns_init
56053 +Initializes support for non-blocking name resolution by calling
56054 +.Fn evdns_resolv_conf_parse
56055 +on UNIX and
56056 +.Fn evdns_config_windows_nameservers
56057 +on Windows.
56058 +.It Ft int Fn evdns_nameserver_add "unsigned long int address"
56059 +Add a nameserver. The address should be an IP address in
56060 +network byte order. The type of address is chosen so that
56061 +it matches in_addr.s_addr.
56062 +Returns non-zero on error.
56063 +.It Ft int Fn evdns_nameserver_ip_add "const char *ip_as_string"
56064 +This wraps the above function by parsing a string as an IP
56065 +address and adds it as a nameserver.
56066 +Returns non-zero on error
56067 +.It Ft int Fn evdns_resolve "const char *name" "int flags" "evdns_callback_type callback" "void *ptr"
56068 +Resolve a name. The name parameter should be a DNS name.
56069 +The flags parameter should be 0, or DNS_QUERY_NO_SEARCH
56070 +which disables searching for this query. (see defn of
56071 +searching above).
56072 +.Pp
56073 +The callback argument is a function which is called when
56074 +this query completes and ptr is an argument which is passed
56075 +to that callback function.
56076 +.Pp
56077 +Returns non-zero on error
56078 +.It Ft void Fn evdns_search_clear
56079 +Clears the list of search domains
56080 +.It Ft void Fn evdns_search_add "const char *domain"
56081 +Add a domain to the list of search domains
56082 +.It Ft void Fn evdns_search_ndots_set "int ndots"
56083 +Set the number of dots which, when found in a name, causes
56084 +the first query to be without any search domain.
56085 +.It Ft int Fn evdns_count_nameservers "void"
56086 +Return the number of configured nameservers (not necessarily the
56087 +number of running nameservers).  This is useful for double-checking
56088 +whether our calls to the various nameserver configuration functions
56089 +have been successful.
56090 +.It Ft int Fn evdns_clear_nameservers_and_suspend "void"
56091 +Remove all currently configured nameservers, and suspend all pending
56092 +resolves.  Resolves will not necessarily be re-attempted until
56093 +evdns_resume() is called.
56094 +.It Ft int Fn evdns_resume "void"
56095 +Re-attempt resolves left in limbo after an earlier call to
56096 +evdns_clear_nameservers_and_suspend().
56097 +.It Ft int Fn evdns_config_windows_nameservers "void"
56098 +Attempt to configure a set of nameservers based on platform settings on
56099 +a win32 host.  Preferentially tries to use GetNetworkParams; if that fails,
56100 +looks in the registry.  Returns 0 on success, nonzero on failure.
56101 +.It Ft int Fn evdns_resolv_conf_parse "int flags" "const char *filename"
56102 +Parse a resolv.conf like file from the given filename.
56103 +.Pp
56104 +See the man page for resolv.conf for the format of this file.
56105 +The flags argument determines what information is parsed from
56106 +this file:
56107 +.Bl -tag -width "DNS_OPTION_NAMESERVERS" -offset indent -compact -nested
56108 +.It DNS_OPTION_SEARCH
56109 +domain, search and ndots options
56110 +.It DNS_OPTION_NAMESERVERS
56111 +nameserver lines
56112 +.It DNS_OPTION_MISC
56113 +timeout and attempts options
56114 +.It DNS_OPTIONS_ALL
56115 +all of the above
56116 +.El
56117 +.Pp
56118 +The following directives are not parsed from the file:
56119 +  sortlist, rotate, no-check-names, inet6, debug
56120 +.Pp
56121 +Returns non-zero on error:
56122 +.Bl -tag -width "0" -offset indent -compact -nested
56123 +.It 0
56124 +no errors
56125 +.It 1
56126 +failed to open file
56127 +.It 2
56128 +failed to stat file
56129 +.It 3
56130 +file too large
56131 +.It 4
56132 +out of memory
56133 +.It 5
56134 +short read from file
56135 +.El
56136 +.El
56137 +.Sh Internals:
56138 +Requests are kept in two queues. The first is the inflight queue. In
56139 +this queue requests have an allocated transaction id and nameserver.
56140 +They will soon be transmitted if they haven't already been.
56141 +.Pp
56142 +The second is the waiting queue. The size of the inflight ring is
56143 +limited and all other requests wait in waiting queue for space. This
56144 +bounds the number of concurrent requests so that we don't flood the
56145 +nameserver. Several algorithms require a full walk of the inflight
56146 +queue and so bounding its size keeps thing going nicely under huge
56147 +(many thousands of requests) loads.
56148 +.Pp
56149 +If a nameserver loses too many requests it is considered down and we
56150 +try not to use it. After a while we send a probe to that nameserver
56151 +(a lookup for google.com) and, if it replies, we consider it working
56152 +again. If the nameserver fails a probe we wait longer to try again
56153 +with the next probe.
56154 +.Sh SEE ALSO
56155 +.Xr event 3 ,
56156 +.Xr gethostbyname 3 ,
56157 +.Xr resolv.conf 5
56158 +.Sh HISTORY
56159 +The
56160 +.Nm evdns
56161 +API was developed by Adam Langley on top of the
56162 +.Nm libevent
56163 +API.
56164 +The code was integrate into
56165 +.Nm Tor
56166 +by Nick Mathewson and finally put into
56167 +.Nm libevent
56168 +itself by Niels Provos.
56169 +.Sh AUTHORS
56170 +The
56171 +.Nm evdns
56172 +API and code was written by Adam Langley with significant
56173 +contributions by Nick Mathewson.
56174 +.Sh BUGS
56175 +This documentation is neither complete nor authoritative.
56176 +If you are in doubt about the usage of this API then
56177 +check the source code to find out how it works, write
56178 +up the missing piece of documentation and send it to
56179 +me for inclusion in this man page.
56180 diff -Nru php-5.2.4.vanilla/libevent/evdns.c php-5.2.4.fpm/libevent/evdns.c
56181 --- php-5.2.4.vanilla/libevent/evdns.c  1970-01-01 03:00:00.000000000 +0300
56182 +++ php-5.2.4.fpm/libevent/evdns.c      2007-08-31 15:47:19.000000000 +0400
56183 @@ -0,0 +1,3114 @@
56184 +/* $Id$ */
56185 +
56186 +/* The original version of this module was written by Adam Langley; for
56187 + * a history of modifications, check out the subversion logs.
56188 + *
56189 + * When editing this module, try to keep it re-mergeable by Adam.  Don't
56190 + * reformat the whitespace, add Tor dependencies, or so on.
56191 + *
56192 + * TODO:
56193 + *   - Support IPv6 and PTR records.
56194 + *   - Replace all externally visible magic numbers with #defined constants.
56195 + *   - Write doccumentation for APIs of all external functions.
56196 + */
56197 +
56198 +/* Async DNS Library
56199 + * Adam Langley <agl@imperialviolet.org>
56200 + * http://www.imperialviolet.org/eventdns.html
56201 + * Public Domain code
56202 + *
56203 + * This software is Public Domain. To view a copy of the public domain dedication,
56204 + * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
56205 + * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
56206 + *
56207 + * I ask and expect, but do not require, that all derivative works contain an
56208 + * attribution similar to:
56209 + *     Parts developed by Adam Langley <agl@imperialviolet.org>
56210 + *
56211 + * You may wish to replace the word "Parts" with something else depending on
56212 + * the amount of original code.
56213 + *
56214 + * (Derivative works does not include programs which link against, run or include
56215 + * the source verbatim in their source distributions)
56216 + *
56217 + * Version: 0.1b
56218 + */
56219 +
56220 +#include <sys/types.h>
56221 +#ifdef HAVE_CONFIG_H
56222 +#include "config.h"
56223 +#endif
56224 +
56225 +#ifdef WIN32
56226 +#include "misc.h"
56227 +#endif
56228 +
56229 +//#define NDEBUG
56230 +
56231 +#ifndef DNS_USE_CPU_CLOCK_FOR_ID
56232 +#ifndef DNS_USE_GETTIMEOFDAY_FOR_ID
56233 +#ifndef DNS_USE_OPENSSL_FOR_ID
56234 +#error Must configure at least one id generation method.
56235 +#error Please see the documentation.
56236 +#endif
56237 +#endif
56238 +#endif
56239 +
56240 +// #define _POSIX_C_SOURCE 200507
56241 +#define _GNU_SOURCE
56242 +
56243 +#ifdef DNS_USE_CPU_CLOCK_FOR_ID
56244 +#ifdef DNS_USE_OPENSSL_FOR_ID
56245 +#error Multiple id options selected
56246 +#endif
56247 +#ifdef DNS_USE_GETTIMEOFDAY_FOR_ID
56248 +#error Multiple id options selected
56249 +#endif
56250 +#include <time.h>
56251 +#endif
56252 +
56253 +#ifdef DNS_USE_OPENSSL_FOR_ID
56254 +#ifdef DNS_USE_GETTIMEOFDAY_FOR_ID
56255 +#error Multiple id options selected
56256 +#endif
56257 +#include <openssl/rand.h>
56258 +#endif
56259 +
56260 +#define _FORTIFY_SOURCE 3
56261 +
56262 +#include <string.h>
56263 +#include <fcntl.h>
56264 +#include <sys/time.h>
56265 +#ifdef HAVE_STDINT_H
56266 +#include <stdint.h>
56267 +#endif
56268 +#include <stdlib.h>
56269 +#include <string.h>
56270 +#include <errno.h>
56271 +#include <assert.h>
56272 +#include <unistd.h>
56273 +#include <limits.h>
56274 +#include <sys/stat.h>
56275 +#include <ctype.h>
56276 +#include <stdio.h>
56277 +#include <stdarg.h>
56278 +
56279 +#include "evdns.h"
56280 +#include "log.h"
56281 +#ifdef WIN32
56282 +#include <windows.h>
56283 +#include <winsock2.h>
56284 +#include <iphlpapi.h>
56285 +#else
56286 +#include <sys/socket.h>
56287 +#include <netinet/in.h>
56288 +#include <arpa/inet.h>
56289 +#endif
56290 +
56291 +#ifdef HAVE_NETINET_IN6_H
56292 +#include <netinet/in6.h>
56293 +#endif
56294 +
56295 +#ifdef WIN32
56296 +typedef int socklen_t;
56297 +#endif
56298 +
56299 +#define EVDNS_LOG_DEBUG 0
56300 +#define EVDNS_LOG_WARN 1
56301 +
56302 +#ifndef HOST_NAME_MAX
56303 +#define HOST_NAME_MAX 255
56304 +#endif
56305 +
56306 +#ifndef NDEBUG
56307 +#include <stdio.h>
56308 +#endif
56309 +
56310 +#undef MIN
56311 +#define MIN(a,b) ((a)<(b)?(a):(b))
56312 +
56313 +#ifdef __USE_ISOC99B
56314 +// libevent doesn't work without this
56315 +typedef uint8_t u_char;
56316 +typedef unsigned int uint;
56317 +#endif
56318 +#include <event.h>
56319 +
56320 +#define u64 uint64_t
56321 +#define u32 uint32_t
56322 +#define u16 uint16_t
56323 +#define u8  uint8_t
56324 +
56325 +#define MAX_ADDRS 4  // maximum number of addresses from a single packet
56326 +// which we bother recording
56327 +
56328 +#define TYPE_A         EVDNS_TYPE_A
56329 +#define TYPE_CNAME     5
56330 +#define TYPE_PTR       EVDNS_TYPE_PTR
56331 +#define TYPE_AAAA      EVDNS_TYPE_AAAA
56332 +
56333 +#define CLASS_INET     EVDNS_CLASS_INET
56334 +
56335 +struct request {
56336 +       u8 *request;  // the dns packet data
56337 +       unsigned int request_len;
56338 +       int reissue_count;
56339 +       int tx_count;  // the number of times that this packet has been sent
56340 +       unsigned int request_type; // TYPE_PTR or TYPE_A
56341 +       void *user_pointer;  // the pointer given to us for this request
56342 +       evdns_callback_type user_callback;
56343 +       struct nameserver *ns;  // the server which we last sent it
56344 +
56345 +       // elements used by the searching code
56346 +       int search_index;
56347 +       struct search_state *search_state;
56348 +       char *search_origname;  // needs to be free()ed
56349 +       int search_flags;
56350 +
56351 +       // these objects are kept in a circular list
56352 +       struct request *next, *prev;
56353 +
56354 +       struct event timeout_event;
56355 +
56356 +       u16 trans_id;  // the transaction id
56357 +       char request_appended;  // true if the request pointer is data which follows this struct
56358 +       char transmit_me;  // needs to be transmitted
56359 +};
56360 +
56361 +#ifndef HAVE_STRUCT_IN6_ADDR
56362 +struct in6_addr {
56363 +       u8 s6_addr[16];
56364 +};
56365 +#endif
56366 +
56367 +struct reply {
56368 +       unsigned int type;
56369 +       unsigned int have_answer;
56370 +       union {
56371 +               struct {
56372 +                       u32 addrcount;
56373 +                       u32 addresses[MAX_ADDRS];
56374 +               } a;
56375 +               struct {
56376 +                       u32 addrcount;
56377 +                       struct in6_addr addresses[MAX_ADDRS];
56378 +               } aaaa;
56379 +               struct {
56380 +                       char name[HOST_NAME_MAX];
56381 +               } ptr;
56382 +       } data;
56383 +};
56384 +
56385 +struct nameserver {
56386 +       int socket;  // a connected UDP socket
56387 +       u32 address;
56388 +       int failed_times;  // number of times which we have given this server a chance
56389 +       int timedout;  // number of times in a row a request has timed out
56390 +       struct event event;
56391 +       // these objects are kept in a circular list
56392 +       struct nameserver *next, *prev;
56393 +       struct event timeout_event;  // used to keep the timeout for
56394 +                                    // when we next probe this server.
56395 +                                    // Valid if state == 0
56396 +       char state;  // zero if we think that this server is down
56397 +       char choked;  // true if we have an EAGAIN from this server's socket
56398 +       char write_waiting;  // true if we are waiting for EV_WRITE events
56399 +};
56400 +
56401 +static struct request *req_head = NULL, *req_waiting_head = NULL;
56402 +static struct nameserver *server_head = NULL;
56403 +
56404 +// Represents a local port where we're listening for DNS requests. Right now,
56405 +// only UDP is supported.
56406 +struct evdns_server_port {
56407 +       int socket; // socket we use to read queries and write replies.
56408 +       int refcnt; // reference count.
56409 +       char choked; // Are we currently blocked from writing?
56410 +       char closing; // Are we trying to close this port, pending writes?
56411 +       evdns_request_callback_fn_type user_callback; // Fn to handle requests
56412 +       void *user_data; // Opaque pointer passed to user_callback
56413 +       struct event event; // Read/write event
56414 +       // circular list of replies that we want to write.
56415 +       struct server_request *pending_replies;
56416 +};
56417 +
56418 +// Represents part of a reply being built.     (That is, a single RR.)
56419 +struct server_reply_item {
56420 +       struct server_reply_item *next; // next item in sequence.
56421 +       char *name; // name part of the RR
56422 +       u16 type : 16; // The RR type
56423 +       u16 class : 16; // The RR class (usually CLASS_INET)
56424 +       u32 ttl; // The RR TTL
56425 +       char is_name; // True iff data is a label
56426 +       u16 datalen; // Length of data; -1 if data is a label
56427 +       void *data; // The contents of the RR
56428 +};
56429 +
56430 +// Represents a request that we've received as a DNS server, and holds
56431 +// the components of the reply as we're constructing it.
56432 +struct server_request {
56433 +       // Pointers to the next and previous entries on the list of replies
56434 +       // that we're waiting to write.  Only set if we have tried to respond
56435 +       // and gotten EAGAIN.
56436 +       struct server_request *next_pending;
56437 +       struct server_request *prev_pending;
56438 +
56439 +       u16 trans_id; // Transaction id.
56440 +       struct evdns_server_port *port; // Which port received this request on?
56441 +       struct sockaddr_storage addr; // Where to send the response
56442 +       socklen_t addrlen; // length of addr
56443 +
56444 +       int n_answer; // how many answer RRs have been set?
56445 +       int n_authority; // how many authority RRs have been set?
56446 +       int n_additional; // how many additional RRs have been set?
56447 +
56448 +       struct server_reply_item *answer; // linked list of answer RRs
56449 +       struct server_reply_item *authority; // linked list of authority RRs
56450 +       struct server_reply_item *additional; // linked list of additional RRs
56451 +
56452 +       // Constructed response.  Only set once we're ready to send a reply.
56453 +       // Once this is set, the RR fields are cleared, and no more should be set.
56454 +       char *response;
56455 +       size_t response_len;
56456 +
56457 +       // Caller-visible fields: flags, questions.
56458 +       struct evdns_server_request base;
56459 +};
56460 +
56461 +// helper macro
56462 +#define OFFSET_OF(st, member) ((off_t) (((char*)&((st*)0)->member)-(char*)0))
56463 +
56464 +// Given a pointer to an evdns_server_request, get the corresponding
56465 +// server_request.
56466 +#define TO_SERVER_REQUEST(base_ptr)                                                                            \
56467 +       ((struct server_request*)                                                                                       \
56468 +        (((char*)(base_ptr) - OFFSET_OF(struct server_request, base))))
56469 +
56470 +// The number of good nameservers that we have
56471 +static int global_good_nameservers = 0;
56472 +
56473 +// inflight requests are contained in the req_head list
56474 +// and are actually going out across the network
56475 +static int global_requests_inflight = 0;
56476 +// requests which aren't inflight are in the waiting list
56477 +// and are counted here
56478 +static int global_requests_waiting = 0;
56479 +
56480 +static int global_max_requests_inflight = 64;
56481 +
56482 +static struct timeval global_timeout = {5, 0};  // 5 seconds
56483 +static int global_max_reissues = 1;  // a reissue occurs when we get some errors from the server
56484 +static int global_max_retransmits = 3;  // number of times we'll retransmit a request which timed out
56485 +// number of timeouts in a row before we consider this server to be down
56486 +static int global_max_nameserver_timeout = 3;
56487 +
56488 +// These are the timeout values for nameservers. If we find a nameserver is down
56489 +// we try to probe it at intervals as given below. Values are in seconds.
56490 +static const struct timeval global_nameserver_timeouts[] = {{10, 0}, {60, 0}, {300, 0}, {900, 0}, {3600, 0}};
56491 +static const int global_nameserver_timeouts_length = sizeof(global_nameserver_timeouts)/sizeof(struct timeval);
56492 +
56493 +static const char *const evdns_error_strings[] = {"no error", "The name server was unable to interpret the query", "The name server suffered an internal error", "The requested domain name does not exist", "The name server refused to reply to the request"};
56494 +
56495 +static struct nameserver *nameserver_pick(void);
56496 +static void evdns_request_insert(struct request *req, struct request **head);
56497 +static void nameserver_ready_callback(int fd, short events, void *arg);
56498 +static int evdns_transmit(void);
56499 +static int evdns_request_transmit(struct request *req);
56500 +static void nameserver_send_probe(struct nameserver *const ns);
56501 +static void search_request_finished(struct request *const);
56502 +static int search_try_next(struct request *const req);
56503 +static int search_request_new(int type, const char *const name, int flags, evdns_callback_type user_callback, void *user_arg);
56504 +static void evdns_requests_pump_waiting_queue(void);
56505 +static u16 transaction_id_pick(void);
56506 +static struct request *request_new(int type, const char *name, int flags, evdns_callback_type callback, void *ptr);
56507 +static void request_submit(struct request *req);
56508 +
56509 +static int server_request_free(struct server_request *req);
56510 +static void server_request_free_answers(struct server_request *req);
56511 +static void server_port_free(struct evdns_server_port *port);
56512 +static void server_port_ready_callback(int fd, short events, void *arg);
56513 +
56514 +static int strtoint(const char *const str);
56515 +
56516 +#ifdef WIN32
56517 +static int
56518 +last_error(int sock)
56519 +{
56520 +       int optval, optvallen=sizeof(optval);
56521 +       int err = WSAGetLastError();
56522 +       if (err == WSAEWOULDBLOCK && sock >= 0) {
56523 +               if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (void*)&optval,
56524 +                              &optvallen))
56525 +                       return err;
56526 +               if (optval)
56527 +                       return optval;
56528 +       }
56529 +       return err;
56530 +
56531 +}
56532 +static int
56533 +error_is_eagain(int err)
56534 +{
56535 +       return err == EAGAIN || err == WSAEWOULDBLOCK;
56536 +}
56537 +static int
56538 +inet_aton(const char *c, struct in_addr *addr)
56539 +{
56540 +       uint32_t r;
56541 +       if (strcmp(c, "255.255.255.255") == 0) {
56542 +               addr->s_addr = 0xffffffffu;
56543 +       } else {
56544 +               r = inet_addr(c);
56545 +               if (r == INADDR_NONE)
56546 +                       return 0;
56547 +               addr->s_addr = r;
56548 +       }
56549 +       return 1;
56550 +}
56551 +#define CLOSE_SOCKET(x) closesocket(x)
56552 +#else
56553 +#define last_error(sock) (errno)
56554 +#define error_is_eagain(err) ((err) == EAGAIN)
56555 +#define CLOSE_SOCKET(x) close(x)
56556 +#endif
56557 +
56558 +#define ISSPACE(c) isspace((int)(unsigned char)(c))
56559 +#define ISDIGIT(c) isdigit((int)(unsigned char)(c))
56560 +
56561 +#ifndef NDEBUG
56562 +static const char *
56563 +debug_ntoa(u32 address)
56564 +{
56565 +       static char buf[32];
56566 +       u32 a = ntohl(address);
56567 +       snprintf(buf, sizeof(buf), "%d.%d.%d.%d",
56568 +                      (int)(u8)((a>>24)&0xff),
56569 +                      (int)(u8)((a>>16)&0xff),
56570 +                      (int)(u8)((a>>8 )&0xff),
56571 +                     (int)(u8)((a    )&0xff));
56572 +       return buf;
56573 +}
56574 +#endif
56575 +
56576 +static evdns_debug_log_fn_type evdns_log_fn = NULL;
56577 +
56578 +void
56579 +evdns_set_log_fn(evdns_debug_log_fn_type fn)
56580 +{
56581 +  evdns_log_fn = fn;
56582 +}
56583 +
56584 +#ifdef __GNUC__
56585 +#define EVDNS_LOG_CHECK  __attribute__ ((format(printf, 2, 3)))
56586 +#else
56587 +#define EVDNS_LOG_CHECK
56588 +#endif
56589 +
56590 +static void _evdns_log(int warn, const char *fmt, ...) EVDNS_LOG_CHECK;
56591 +static void
56592 +_evdns_log(int warn, const char *fmt, ...)
56593 +{
56594 +  va_list args;
56595 +  static char buf[512];
56596 +  if (!evdns_log_fn)
56597 +    return;
56598 +  va_start(args,fmt);
56599 +#ifdef WIN32
56600 +  _vsnprintf(buf, sizeof(buf), fmt, args);
56601 +#else
56602 +  vsnprintf(buf, sizeof(buf), fmt, args);
56603 +#endif
56604 +  buf[sizeof(buf)-1] = '\0';
56605 +  evdns_log_fn(warn, buf);
56606 +  va_end(args);
56607 +}
56608 +
56609 +#define log _evdns_log
56610 +
56611 +// This walks the list of inflight requests to find the
56612 +// one with a matching transaction id. Returns NULL on
56613 +// failure
56614 +static struct request *
56615 +request_find_from_trans_id(u16 trans_id) {
56616 +       struct request *req = req_head, *const started_at = req_head;
56617 +
56618 +       if (req) {
56619 +               do {
56620 +                       if (req->trans_id == trans_id) return req;
56621 +                       req = req->next;
56622 +               } while (req != started_at);
56623 +       }
56624 +
56625 +       return NULL;
56626 +}
56627 +
56628 +// a libevent callback function which is called when a nameserver
56629 +// has gone down and we want to test if it has came back to life yet
56630 +static void
56631 +nameserver_prod_callback(int fd, short events, void *arg) {
56632 +       struct nameserver *const ns = (struct nameserver *) arg;
56633 +        (void)fd;
56634 +        (void)events;
56635 +
56636 +       nameserver_send_probe(ns);
56637 +}
56638 +
56639 +// a libevent callback which is called when a nameserver probe (to see if
56640 +// it has come back to life) times out. We increment the count of failed_times
56641 +// and wait longer to send the next probe packet.
56642 +static void
56643 +nameserver_probe_failed(struct nameserver *const ns) {
56644 +       const struct timeval * timeout;
56645 +       (void) evtimer_del(&ns->timeout_event);
56646 +       if (ns->state == 1) {
56647 +               // This can happen if the nameserver acts in a way which makes us mark
56648 +               // it as bad and then starts sending good replies.
56649 +               return;
56650 +       }
56651 +
56652 +       timeout =
56653 +         &global_nameserver_timeouts[MIN(ns->failed_times,
56654 +                                         global_nameserver_timeouts_length - 1)];
56655 +       ns->failed_times++;
56656 +
56657 +       evtimer_set(&ns->timeout_event, nameserver_prod_callback, ns);
56658 +       if (evtimer_add(&ns->timeout_event, (struct timeval *) timeout) < 0) {
56659 +          log(EVDNS_LOG_WARN,
56660 +              "Error from libevent when adding timer event for %s",
56661 +              debug_ntoa(ns->address));
56662 +          // ???? Do more?
56663 +        }
56664 +}
56665 +
56666 +// called when a nameserver has been deemed to have failed. For example, too
56667 +// many packets have timed out etc
56668 +static void
56669 +nameserver_failed(struct nameserver *const ns, const char *msg) {
56670 +       struct request *req, *started_at;
56671 +       // if this nameserver has already been marked as failed
56672 +       // then don't do anything
56673 +       if (!ns->state) return;
56674 +
56675 +       log(EVDNS_LOG_WARN, "Nameserver %s has failed: %s",
56676 +            debug_ntoa(ns->address), msg);
56677 +       global_good_nameservers--;
56678 +       assert(global_good_nameservers >= 0);
56679 +       if (global_good_nameservers == 0) {
56680 +               log(EVDNS_LOG_WARN, "All nameservers have failed");
56681 +       }
56682 +
56683 +       ns->state = 0;
56684 +       ns->failed_times = 1;
56685 +
56686 +       evtimer_set(&ns->timeout_event, nameserver_prod_callback, ns);
56687 +       if (evtimer_add(&ns->timeout_event, (struct timeval *) &global_nameserver_timeouts[0]) < 0) {
56688 +               log(EVDNS_LOG_WARN,
56689 +                   "Error from libevent when adding timer event for %s",
56690 +                   debug_ntoa(ns->address));
56691 +               // ???? Do more?
56692 +        }
56693 +
56694 +       // walk the list of inflight requests to see if any can be reassigned to
56695 +       // a different server. Requests in the waiting queue don't have a
56696 +       // nameserver assigned yet
56697 +
56698 +       // if we don't have *any* good nameservers then there's no point
56699 +       // trying to reassign requests to one
56700 +       if (!global_good_nameservers) return;
56701 +
56702 +       req = req_head;
56703 +       started_at = req_head;
56704 +       if (req) {
56705 +               do {
56706 +                       if (req->tx_count == 0 && req->ns == ns) {
56707 +                               // still waiting to go out, can be moved
56708 +                               // to another server
56709 +                               req->ns = nameserver_pick();
56710 +                       }
56711 +                       req = req->next;
56712 +               } while (req != started_at);
56713 +       }
56714 +}
56715 +
56716 +static void
56717 +nameserver_up(struct nameserver *const ns) {
56718 +       if (ns->state) return;
56719 +       log(EVDNS_LOG_WARN, "Nameserver %s is back up",
56720 +           debug_ntoa(ns->address));
56721 +       evtimer_del(&ns->timeout_event);
56722 +       ns->state = 1;
56723 +       ns->failed_times = 0;
56724 +       ns->timedout = 0;
56725 +       global_good_nameservers++;
56726 +}
56727 +
56728 +static void
56729 +request_trans_id_set(struct request *const req, const u16 trans_id) {
56730 +       req->trans_id = trans_id;
56731 +       *((u16 *) req->request) = htons(trans_id);
56732 +}
56733 +
56734 +// Called to remove a request from a list and dealloc it.
56735 +// head is a pointer to the head of the list it should be
56736 +// removed from or NULL if the request isn't in a list.
56737 +static void
56738 +request_finished(struct request *const req, struct request **head) {
56739 +       if (head) {
56740 +               if (req->next == req) {
56741 +                       // only item in the list
56742 +                       *head = NULL;
56743 +               } else {
56744 +                       req->next->prev = req->prev;
56745 +                       req->prev->next = req->next;
56746 +                       if (*head == req) *head = req->next;
56747 +               }
56748 +       }
56749 +
56750 +       log(EVDNS_LOG_DEBUG, "Removing timeout for request %lx",
56751 +           (unsigned long) req);
56752 +       evtimer_del(&req->timeout_event);
56753 +
56754 +       search_request_finished(req);
56755 +       global_requests_inflight--;
56756 +
56757 +       if (!req->request_appended) {
56758 +               // need to free the request data on it's own
56759 +               free(req->request);
56760 +       } else {
56761 +               // the request data is appended onto the header
56762 +               // so everything gets free()ed when we:
56763 +       }
56764 +
56765 +       free(req);
56766 +
56767 +       evdns_requests_pump_waiting_queue();
56768 +}
56769 +
56770 +// This is called when a server returns a funny error code.
56771 +// We try the request again with another server.
56772 +//
56773 +// return:
56774 +//   0 ok
56775 +//   1 failed/reissue is pointless
56776 +static int
56777 +request_reissue(struct request *req) {
56778 +       const struct nameserver *const last_ns = req->ns;
56779 +       // the last nameserver should have been marked as failing
56780 +       // by the caller of this function, therefore pick will try
56781 +       // not to return it
56782 +       req->ns = nameserver_pick();
56783 +       if (req->ns == last_ns) {
56784 +               // ... but pick did return it
56785 +               // not a lot of point in trying again with the
56786 +               // same server
56787 +               return 1;
56788 +       }
56789 +
56790 +       req->reissue_count++;
56791 +       req->tx_count = 0;
56792 +       req->transmit_me = 1;
56793 +
56794 +       return 0;
56795 +}
56796 +
56797 +// this function looks for space on the inflight queue and promotes
56798 +// requests from the waiting queue if it can.
56799 +static void
56800 +evdns_requests_pump_waiting_queue(void) {
56801 +       while (global_requests_inflight < global_max_requests_inflight &&
56802 +           global_requests_waiting) {
56803 +               struct request *req;
56804 +               // move a request from the waiting queue to the inflight queue
56805 +               assert(req_waiting_head);
56806 +               if (req_waiting_head->next == req_waiting_head) {
56807 +                       // only one item in the queue
56808 +                       req = req_waiting_head;
56809 +                       req_waiting_head = NULL;
56810 +               } else {
56811 +                       req = req_waiting_head;
56812 +                       req->next->prev = req->prev;
56813 +                       req->prev->next = req->next;
56814 +                       req_waiting_head = req->next;
56815 +               }
56816 +
56817 +               global_requests_waiting--;
56818 +               global_requests_inflight++;
56819 +
56820 +               req->ns = nameserver_pick();
56821 +               request_trans_id_set(req, transaction_id_pick());
56822 +
56823 +               evdns_request_insert(req, &req_head);
56824 +               evdns_request_transmit(req);
56825 +               evdns_transmit();
56826 +       }
56827 +}
56828 +
56829 +static void
56830 +reply_callback(struct request *const req, u32 ttl, u32 err, struct reply *reply) {
56831 +       switch (req->request_type) {
56832 +       case TYPE_A:
56833 +               if (reply)
56834 +                       req->user_callback(DNS_ERR_NONE, DNS_IPv4_A,
56835 +                                                          reply->data.a.addrcount, ttl,
56836 +                                                reply->data.a.addresses,
56837 +                                                          req->user_pointer);
56838 +               else
56839 +                       req->user_callback(err, 0, 0, 0, NULL, req->user_pointer);
56840 +               return;
56841 +       case TYPE_PTR:
56842 +               if (reply) {
56843 +                       char *name = reply->data.ptr.name;
56844 +                       req->user_callback(DNS_ERR_NONE, DNS_PTR, 1, ttl,
56845 +                                                          &name, req->user_pointer);
56846 +               } else {
56847 +                       req->user_callback(err, 0, 0, 0, NULL,
56848 +                                                          req->user_pointer);
56849 +               }
56850 +               return;
56851 +       case TYPE_AAAA:
56852 +               if (reply)
56853 +                       req->user_callback(DNS_ERR_NONE, DNS_IPv6_AAAA,
56854 +                                                          reply->data.aaaa.addrcount, ttl,
56855 +                                                          reply->data.aaaa.addresses,
56856 +                                                          req->user_pointer);
56857 +               else
56858 +                       req->user_callback(err, 0, 0, 0, NULL, req->user_pointer);
56859 +                return;
56860 +       }
56861 +       assert(0);
56862 +}
56863 +
56864 +// this processes a parsed reply packet
56865 +static void
56866 +reply_handle(struct request *const req, u16 flags, u32 ttl, struct reply *reply) {
56867 +       int error;
56868 +       static const int error_codes[] = {DNS_ERR_FORMAT, DNS_ERR_SERVERFAILED, DNS_ERR_NOTEXIST, DNS_ERR_NOTIMPL, DNS_ERR_REFUSED};
56869 +
56870 +       if (flags & 0x020f || !reply || !reply->have_answer) {
56871 +               // there was an error
56872 +               if (flags & 0x0200) {
56873 +                       error = DNS_ERR_TRUNCATED;
56874 +               } else {
56875 +                       u16 error_code = (flags & 0x000f) - 1;
56876 +                       if (error_code > 4) {
56877 +                               error = DNS_ERR_UNKNOWN;
56878 +                       } else {
56879 +                               error = error_codes[error_code];
56880 +                       }
56881 +               }
56882 +
56883 +               switch(error) {
56884 +               case DNS_ERR_NOTIMPL:
56885 +               case DNS_ERR_REFUSED:
56886 +                       // we regard these errors as marking a bad nameserver
56887 +                       if (req->reissue_count < global_max_reissues) {
56888 +                               char msg[64];
56889 +                               snprintf(msg, sizeof(msg), "Bad response %d (%s)",
56890 +                                        error, evdns_err_to_string(error));
56891 +                               nameserver_failed(req->ns, msg);
56892 +                               if (!request_reissue(req)) return;
56893 +                       }
56894 +                       break;
56895 +               case DNS_ERR_SERVERFAILED:
56896 +                       // rcode 2 (servfailed) sometimes means "we are broken" and
56897 +                       // sometimes (with some binds) means "that request was very
56898 +                       // confusing."  Treat this as a timeout, not a failure.
56899 +                       log(EVDNS_LOG_DEBUG, "Got a SERVERFAILED from nameserver %s; "
56900 +                               "will allow the request to time out.",
56901 +                               debug_ntoa(req->ns->address));
56902 +                       break;
56903 +               default:
56904 +                       // we got a good reply from the nameserver
56905 +                       nameserver_up(req->ns);
56906 +               }
56907 +
56908 +               if (req->search_state && req->request_type != TYPE_PTR) {
56909 +                       // if we have a list of domains to search in, try the next one
56910 +                       if (!search_try_next(req)) {
56911 +                               // a new request was issued so this request is finished and
56912 +                               // the user callback will be made when that request (or a
56913 +                               // child of it) finishes.
56914 +                               request_finished(req, &req_head);
56915 +                               return;
56916 +                       }
56917 +               }
56918 +
56919 +               // all else failed. Pass the failure up
56920 +               reply_callback(req, 0, error, NULL);
56921 +               request_finished(req, &req_head);
56922 +       } else {
56923 +               // all ok, tell the user
56924 +               reply_callback(req, ttl, 0, reply);
56925 +               nameserver_up(req->ns);
56926 +               request_finished(req, &req_head);
56927 +       }
56928 +}
56929 +
56930 +static inline int
56931 +name_parse(u8 *packet, int length, int *idx, char *name_out, int name_out_len) {
56932 +       int name_end = -1;
56933 +       int j = *idx;
56934 +       int ptr_count = 0;
56935 +#define GET32(x) do { if (j + 4 > length) goto err; memcpy(&_t32, packet + j, 4); j += 4; x = ntohl(_t32); } while(0);
56936 +#define GET16(x) do { if (j + 2 > length) goto err; memcpy(&_t, packet + j, 2); j += 2; x = ntohs(_t); } while(0);
56937 +#define GET8(x) do { if (j >= length) goto err; x = packet[j++]; } while(0);
56938 +
56939 +       char *cp = name_out;
56940 +       const char *const end = name_out + name_out_len;
56941 +
56942 +       // Normally, names are a series of length prefixed strings terminated
56943 +       // with a length of 0 (the lengths are u8's < 63).
56944 +       // However, the length can start with a pair of 1 bits and that
56945 +       // means that the next 14 bits are a pointer within the current
56946 +       // packet.
56947 +
56948 +       for(;;) {
56949 +               u8 label_len;
56950 +               if (j >= length) return -1;
56951 +               GET8(label_len);
56952 +               if (!label_len) break;
56953 +               if (label_len & 0xc0) {
56954 +                       u8 ptr_low;
56955 +                       GET8(ptr_low);
56956 +                       if (name_end < 0) name_end = j;
56957 +                       j = (((int)label_len & 0x3f) << 8) + ptr_low;
56958 +                       /* Make sure that the target offset is in-bounds. */
56959 +                       if (j < 0 || j >= length) return -1;
56960 +                       /* If we've jumped more times than there are characters in the
56961 +                        * message, we must have a loop. */
56962 +                       if (++ptr_count > length) return -1;
56963 +                       continue;
56964 +               }
56965 +               if (label_len > 63) return -1;
56966 +               if (cp != name_out) {
56967 +                       if (cp + 1 >= end) return -1;
56968 +                       *cp++ = '.';
56969 +               }
56970 +               if (cp + label_len >= end) return -1;
56971 +               memcpy(cp, packet + j, label_len);
56972 +               cp += label_len;
56973 +               j += label_len;
56974 +       }
56975 +       if (cp >= end) return -1;
56976 +       *cp = '\0';
56977 +       if (name_end < 0)
56978 +               *idx = j;
56979 +       else
56980 +               *idx = name_end;
56981 +       return 0;
56982 + err:
56983 +       return -1;
56984 +}
56985 +
56986 +// parses a raw request from a nameserver
56987 +static int
56988 +reply_parse(u8 *packet, int length) {
56989 +       int j = 0;  // index into packet
56990 +       u16 _t;  // used by the macros
56991 +       u32 _t32;  // used by the macros
56992 +       char tmp_name[256]; // used by the macros
56993 +
56994 +       u16 trans_id, questions, answers, authority, additional, datalength;
56995 +        u16 flags = 0;
56996 +       u32 ttl, ttl_r = 0xffffffff;
56997 +       struct reply reply;
56998 +       struct request *req = NULL;
56999 +       unsigned int i;
57000 +
57001 +       GET16(trans_id);
57002 +       GET16(flags);
57003 +       GET16(questions);
57004 +       GET16(answers);
57005 +       GET16(authority);
57006 +       GET16(additional);
57007 +       (void) authority; /* suppress "unused variable" warnings. */
57008 +       (void) additional; /* suppress "unused variable" warnings. */
57009 +
57010 +       req = request_find_from_trans_id(trans_id);
57011 +       if (!req) return -1;
57012 +
57013 +       memset(&reply, 0, sizeof(reply));
57014 +
57015 +       // If it's not an answer, it doesn't correspond to any request.
57016 +       if (!(flags & 0x8000)) return -1;  // must be an answer
57017 +       if (flags & 0x020f) {
57018 +               // there was an error
57019 +               goto err;
57020 +       }
57021 +       // if (!answers) return;  // must have an answer of some form
57022 +
57023 +       // This macro skips a name in the DNS reply.
57024 +#define SKIP_NAME \
57025 +       do { tmp_name[0] = '\0';                                        \
57026 +               if (name_parse(packet, length, &j, tmp_name, sizeof(tmp_name))<0) \
57027 +                       goto err;                                                                                                       \
57028 +       } while(0);
57029 +
57030 +       reply.type = req->request_type;
57031 +
57032 +       // skip over each question in the reply
57033 +       for (i = 0; i < questions; ++i) {
57034 +               // the question looks like
57035 +               //   <label:name><u16:type><u16:class>
57036 +               SKIP_NAME;
57037 +               j += 4;
57038 +               if (j >= length) goto err;
57039 +       }
57040 +
57041 +       // now we have the answer section which looks like
57042 +       // <label:name><u16:type><u16:class><u32:ttl><u16:len><data...>
57043 +
57044 +       for (i = 0; i < answers; ++i) {
57045 +               u16 type, class;
57046 +
57047 +               SKIP_NAME;
57048 +               GET16(type);
57049 +               GET16(class);
57050 +               GET32(ttl);
57051 +               GET16(datalength);
57052 +
57053 +               if (type == TYPE_A && class == CLASS_INET) {
57054 +                       int addrcount, addrtocopy;
57055 +                       if (req->request_type != TYPE_A) {
57056 +                               j += datalength; continue;
57057 +                       }
57058 +                       if ((datalength & 3) != 0) /* not an even number of As. */
57059 +                           goto err;
57060 +                       addrcount = datalength >> 2;
57061 +                       addrtocopy = MIN(MAX_ADDRS - reply.data.a.addrcount, (unsigned)addrcount);
57062 +
57063 +                       ttl_r = MIN(ttl_r, ttl);
57064 +                       // we only bother with the first four addresses.
57065 +                       if (j + 4*addrtocopy > length) goto err;
57066 +                       memcpy(&reply.data.a.addresses[reply.data.a.addrcount],
57067 +                                  packet + j, 4*addrtocopy);
57068 +                       j += 4*addrtocopy;
57069 +                       reply.data.a.addrcount += addrtocopy;
57070 +                       reply.have_answer = 1;
57071 +                       if (reply.data.a.addrcount == MAX_ADDRS) break;
57072 +               } else if (type == TYPE_PTR && class == CLASS_INET) {
57073 +                       if (req->request_type != TYPE_PTR) {
57074 +                               j += datalength; continue;
57075 +                       }
57076 +                       if (name_parse(packet, length, &j, reply.data.ptr.name,
57077 +                                                  sizeof(reply.data.ptr.name))<0)
57078 +                               goto err;
57079 +                       ttl_r = MIN(ttl_r, ttl);
57080 +                       reply.have_answer = 1;
57081 +                       break;
57082 +               } else if (type == TYPE_AAAA && class == CLASS_INET) {
57083 +                       int addrcount, addrtocopy;
57084 +                       if (req->request_type != TYPE_AAAA) {
57085 +                               j += datalength; continue;
57086 +                       }
57087 +                       if ((datalength & 15) != 0) /* not an even number of AAAAs. */
57088 +                               goto err;
57089 +                       addrcount = datalength >> 4;  // each address is 16 bytes long
57090 +                       addrtocopy = MIN(MAX_ADDRS - reply.data.aaaa.addrcount, (unsigned)addrcount);
57091 +                       ttl_r = MIN(ttl_r, ttl);
57092 +
57093 +                       // we only bother with the first four addresses.
57094 +                       if (j + 16*addrtocopy > length) goto err;
57095 +                       memcpy(&reply.data.aaaa.addresses[reply.data.aaaa.addrcount],
57096 +                                  packet + j, 16*addrtocopy);
57097 +                       reply.data.aaaa.addrcount += addrtocopy;
57098 +                       j += 16*addrtocopy;
57099 +                       reply.have_answer = 1;
57100 +                       if (reply.data.aaaa.addrcount == MAX_ADDRS) break;
57101 +               } else {
57102 +                       // skip over any other type of resource
57103 +                       j += datalength;
57104 +               }
57105 +       }
57106 +
57107 +       reply_handle(req, flags, ttl_r, &reply);
57108 +       return 0;
57109 + err:
57110 +       if (req)
57111 +               reply_handle(req, flags, 0, NULL);
57112 +       return -1;
57113 +}
57114 +
57115 +// Parse a raw request (packet,length) sent to a nameserver port (port) from
57116 +// a DNS client (addr,addrlen), and if it's well-formed, call the corresponding
57117 +// callback.
57118 +static int
57119 +request_parse(u8 *packet, int length, struct evdns_server_port *port, struct sockaddr *addr, socklen_t addrlen)
57120 +{
57121 +       int j = 0;      // index into packet
57122 +       u16 _t;  // used by the macros
57123 +       char tmp_name[256]; // used by the macros
57124 +
57125 +       int i;
57126 +       u16 trans_id, flags, questions, answers, authority, additional;
57127 +       struct server_request *server_req = NULL;
57128 +
57129 +       // Get the header fields
57130 +       GET16(trans_id);
57131 +       GET16(flags);
57132 +       GET16(questions);
57133 +       GET16(answers);
57134 +       GET16(authority);
57135 +       GET16(additional);
57136 +
57137 +       if (flags & 0x8000) return -1; // Must not be an answer.
57138 +       if (flags & 0x7800) return -1; // only standard queries are supported
57139 +       flags &= 0x0300; // Only TC and RD get preserved.
57140 +
57141 +       server_req = malloc(sizeof(struct server_request));
57142 +       if (server_req == NULL) return -1;
57143 +       memset(server_req, 0, sizeof(struct server_request));
57144 +
57145 +       server_req->trans_id = trans_id;
57146 +       memcpy(&server_req->addr, addr, addrlen);
57147 +       server_req->addrlen = addrlen;
57148 +
57149 +       server_req->base.flags = flags;
57150 +       server_req->base.nquestions = 0;
57151 +       server_req->base.questions = malloc(sizeof(struct evdns_server_question *) * questions);
57152 +       if (server_req->base.questions == NULL)
57153 +               goto err;
57154 +
57155 +       for (i = 0; i < questions; ++i) {
57156 +               u16 type, class;
57157 +               struct evdns_server_question *q;
57158 +               int namelen;
57159 +               if (name_parse(packet, length, &j, tmp_name, sizeof(tmp_name))<0)
57160 +                       goto err;
57161 +               GET16(type);
57162 +               GET16(class);
57163 +               namelen = strlen(tmp_name);
57164 +               q = malloc(sizeof(struct evdns_server_question) + namelen);
57165 +               if (!q)
57166 +                       goto err;
57167 +               q->type = type;
57168 +               q->class = class;
57169 +               memcpy(q->name, tmp_name, namelen+1);
57170 +               server_req->base.questions[server_req->base.nquestions++] = q;
57171 +       }
57172 +
57173 +       // Ignore answers, authority, and additional.
57174 +
57175 +       server_req->port = port;
57176 +       port->refcnt++;
57177 +       port->user_callback(&(server_req->base), port->user_data);
57178 +
57179 +       return 0;
57180 +err:
57181 +       if (server_req) {
57182 +               if (server_req->base.questions) {
57183 +                       for (i = 0; i < server_req->base.nquestions; ++i)
57184 +                               free(server_req->base.questions[i]);
57185 +                       free(server_req->base.questions);
57186 +               }
57187 +               free(server_req);
57188 +       }
57189 +       return -1;
57190 +
57191 +#undef SKIP_NAME
57192 +#undef GET32
57193 +#undef GET16
57194 +#undef GET8
57195 +}
57196 +
57197 +// Try to choose a strong transaction id which isn't already in flight
57198 +static u16
57199 +transaction_id_pick(void) {
57200 +       for (;;) {
57201 +               const struct request *req = req_head, *started_at;
57202 +#ifdef DNS_USE_CPU_CLOCK_FOR_ID
57203 +               struct timespec ts;
57204 +               u16 trans_id;
57205 +#ifdef CLOCK_MONOTONIC
57206 +               if (clock_gettime(CLOCK_MONOTONIC, &ts) == -1)
57207 +#else
57208 +               if (clock_gettime(CLOCK_REALTIME, &ts) == -1)
57209 +#endif
57210 +                       event_err(1, "clock_gettime");
57211 +                trans_id = ts.tv_nsec & 0xffff;
57212 +#endif
57213 +
57214 +#ifdef DNS_USE_GETTIMEOFDAY_FOR_ID
57215 +               struct timeval tv;
57216 +               u16 trans_id;
57217 +               gettimeofday(&tv, NULL);
57218 +                trans_id = tv.tv_usec & 0xffff;
57219 +#endif
57220 +
57221 +#ifdef DNS_USE_OPENSSL_FOR_ID
57222 +               u16 trans_id;
57223 +               if (RAND_pseudo_bytes((u8 *) &trans_id, 2) == -1) {
57224 +                       /* // in the case that the RAND call fails we back
57225 +                       // down to using gettimeofday.
57226 +                       struct timeval tv;
57227 +                       gettimeofday(&tv, NULL);
57228 +                       trans_id = tv.tv_usec & 0xffff; */
57229 +                       abort();
57230 +               }
57231 +#endif
57232 +
57233 +               if (trans_id == 0xffff) continue;
57234 +               // now check to see if that id is already inflight
57235 +               req = started_at = req_head;
57236 +               if (req) {
57237 +                       do {
57238 +                               if (req->trans_id == trans_id) break;
57239 +                               req = req->next;
57240 +                       } while (req != started_at);
57241 +               }
57242 +               // we didn't find it, so this is a good id
57243 +               if (req == started_at) return trans_id;
57244 +       }
57245 +}
57246 +
57247 +// choose a namesever to use. This function will try to ignore
57248 +// nameservers which we think are down and load balance across the rest
57249 +// by updating the server_head global each time.
57250 +static struct nameserver *
57251 +nameserver_pick(void) {
57252 +       struct nameserver *started_at = server_head, *picked;
57253 +       if (!server_head) return NULL;
57254 +
57255 +       // if we don't have any good nameservers then there's no
57256 +       // point in trying to find one.
57257 +       if (!global_good_nameservers) {
57258 +               server_head = server_head->next;
57259 +               return server_head;
57260 +       }
57261 +
57262 +       // remember that nameservers are in a circular list
57263 +       for (;;) {
57264 +               if (server_head->state) {
57265 +                       // we think this server is currently good
57266 +                       picked = server_head;
57267 +                       server_head = server_head->next;
57268 +                       return picked;
57269 +               }
57270 +
57271 +               server_head = server_head->next;
57272 +               if (server_head == started_at) {
57273 +                       // all the nameservers seem to be down
57274 +                       // so we just return this one and hope for the
57275 +                       // best
57276 +                       assert(global_good_nameservers == 0);
57277 +                       picked = server_head;
57278 +                       server_head = server_head->next;
57279 +                       return picked;
57280 +               }
57281 +       }
57282 +}
57283 +
57284 +// this is called when a namesever socket is ready for reading
57285 +static void
57286 +nameserver_read(struct nameserver *ns) {
57287 +       u8 packet[1500];
57288 +
57289 +       for (;;) {
57290 +               const int r = recv(ns->socket, packet, sizeof(packet), 0);
57291 +               if (r < 0) {
57292 +                       int err = last_error(ns->socket);
57293 +                       if (error_is_eagain(err)) return;
57294 +                       nameserver_failed(ns, strerror(err));
57295 +                       return;
57296 +               }
57297 +               ns->timedout = 0;
57298 +               reply_parse(packet, r);
57299 +       }
57300 +}
57301 +
57302 +// Read a packet from a DNS client on a server port s, parse it, and
57303 +// act accordingly.
57304 +static void
57305 +server_port_read(struct evdns_server_port *s) {
57306 +       u8 packet[1500];
57307 +       struct sockaddr_storage addr;
57308 +       socklen_t addrlen;
57309 +       int r;
57310 +
57311 +       for (;;) {
57312 +               addrlen = sizeof(struct sockaddr_storage);
57313 +               r = recvfrom(s->socket, packet, sizeof(packet), 0,
57314 +                                        (struct sockaddr*) &addr, &addrlen);
57315 +               if (r < 0) {
57316 +                       int err = last_error(s->socket);
57317 +                       if (error_is_eagain(err)) return;
57318 +                       log(EVDNS_LOG_WARN, "Error %s (%d) while reading request.",
57319 +                               strerror(err), err);
57320 +                       return;
57321 +               }
57322 +               request_parse(packet, r, s, (struct sockaddr*) &addr, addrlen);
57323 +       }
57324 +}
57325 +
57326 +// Try to write all pending replies on a given DNS server port.
57327 +static void
57328 +server_port_flush(struct evdns_server_port *port)
57329 +{
57330 +       while (port->pending_replies) {
57331 +               struct server_request *req = port->pending_replies;
57332 +               int r = sendto(port->socket, req->response, req->response_len, 0,
57333 +                          (struct sockaddr*) &req->addr, req->addrlen);
57334 +               if (r < 0) {
57335 +                       int err = last_error(port->socket);
57336 +                       if (error_is_eagain(err))
57337 +                               return;
57338 +                       log(EVDNS_LOG_WARN, "Error %s (%d) while writing response to port; dropping", strerror(err), err);
57339 +               }
57340 +               if (server_request_free(req)) {
57341 +                       // we released the last reference to req->port.
57342 +                       return;
57343 +               }
57344 +       }
57345 +
57346 +       // We have no more pending requests; stop listening for 'writeable' events.
57347 +       (void) event_del(&port->event);
57348 +       event_set(&port->event, port->socket, EV_READ | EV_PERSIST,
57349 +                         server_port_ready_callback, port);
57350 +       if (event_add(&port->event, NULL) < 0) {
57351 +               log(EVDNS_LOG_WARN, "Error from libevent when adding event for DNS server.");
57352 +               // ???? Do more?
57353 +       }
57354 +}
57355 +
57356 +// set if we are waiting for the ability to write to this server.
57357 +// if waiting is true then we ask libevent for EV_WRITE events, otherwise
57358 +// we stop these events.
57359 +static void
57360 +nameserver_write_waiting(struct nameserver *ns, char waiting) {
57361 +       if (ns->write_waiting == waiting) return;
57362 +
57363 +       ns->write_waiting = waiting;
57364 +       (void) event_del(&ns->event);
57365 +       event_set(&ns->event, ns->socket, EV_READ | (waiting ? EV_WRITE : 0) | EV_PERSIST,
57366 +                       nameserver_ready_callback, ns);
57367 +       if (event_add(&ns->event, NULL) < 0) {
57368 +          log(EVDNS_LOG_WARN, "Error from libevent when adding event for %s",
57369 +              debug_ntoa(ns->address));
57370 +          // ???? Do more?
57371 +        }
57372 +}
57373 +
57374 +// a callback function. Called by libevent when the kernel says that
57375 +// a nameserver socket is ready for writing or reading
57376 +static void
57377 +nameserver_ready_callback(int fd, short events, void *arg) {
57378 +       struct nameserver *ns = (struct nameserver *) arg;
57379 +        (void)fd;
57380 +
57381 +       if (events & EV_WRITE) {
57382 +               ns->choked = 0;
57383 +               if (!evdns_transmit()) {
57384 +                       nameserver_write_waiting(ns, 0);
57385 +               }
57386 +       }
57387 +       if (events & EV_READ) {
57388 +               nameserver_read(ns);
57389 +       }
57390 +}
57391 +
57392 +// a callback function. Called by libevent when the kernel says that
57393 +// a server socket is ready for writing or reading.
57394 +static void
57395 +server_port_ready_callback(int fd, short events, void *arg) {
57396 +       struct evdns_server_port *port = (struct evdns_server_port *) arg;
57397 +       (void) fd;
57398 +
57399 +       if (events & EV_WRITE) {
57400 +               port->choked = 0;
57401 +               server_port_flush(port);
57402 +       }
57403 +       if (events & EV_READ) {
57404 +               server_port_read(port);
57405 +       }
57406 +}
57407 +
57408 +/* This is an inefficient representation; only use it via the dnslabel_table_*
57409 + * functions, so that is can be safely replaced with something smarter later. */
57410 +#define MAX_LABELS 128
57411 +// Structures used to implement name compression
57412 +struct dnslabel_entry { char *v; int pos; };
57413 +struct dnslabel_table {
57414 +       int n_labels; // number of current entries
57415 +       // map from name to position in message
57416 +       struct dnslabel_entry labels[MAX_LABELS];
57417 +};
57418 +
57419 +// Initialize dnslabel_table.
57420 +static void
57421 +dnslabel_table_init(struct dnslabel_table *table)
57422 +{
57423 +       table->n_labels = 0;
57424 +}
57425 +
57426 +// Free all storage held by table, but not the table itself.
57427 +static void
57428 +dnslabel_clear(struct dnslabel_table *table)
57429 +{
57430 +       int i;
57431 +       for (i = 0; i < table->n_labels; ++i)
57432 +               free(table->labels[i].v);
57433 +       table->n_labels = 0;
57434 +}
57435 +
57436 +// return the position of the label in the current message, or -1 if the label
57437 +// hasn't been used yet.
57438 +static int
57439 +dnslabel_table_get_pos(const struct dnslabel_table *table, const char *label)
57440 +{
57441 +       int i;
57442 +       for (i = 0; i < table->n_labels; ++i) {
57443 +               if (!strcmp(label, table->labels[i].v))
57444 +                       return table->labels[i].pos;
57445 +       }
57446 +       return -1;
57447 +}
57448 +
57449 +// remember that we've used the label at position pos
57450 +static int
57451 +dnslabel_table_add(struct dnslabel_table *table, const char *label, int pos)
57452 +{
57453 +       char *v;
57454 +       int p;
57455 +       if (table->n_labels == MAX_LABELS)
57456 +               return (-1);
57457 +       v = strdup(label);
57458 +       if (v == NULL)
57459 +               return (-1);
57460 +       p = table->n_labels++;
57461 +       table->labels[p].v = v;
57462 +       table->labels[p].pos = pos;
57463 +
57464 +       return (0);
57465 +}
57466 +
57467 +// Converts a string to a length-prefixed set of DNS labels, starting
57468 +// at buf[j]. name and buf must not overlap. name_len should be the length
57469 +// of name.     table is optional, and is used for compression.
57470 +//
57471 +// Input: abc.def
57472 +// Output: <3>abc<3>def<0>
57473 +//
57474 +// Returns the first index after the encoded name, or negative on error.
57475 +//      -1      label was > 63 bytes
57476 +//      -2      name too long to fit in buffer.
57477 +//
57478 +static off_t
57479 +dnsname_to_labels(u8 *const buf, size_t buf_len, off_t j,
57480 +                                 const char *name, const int name_len,
57481 +                                 struct dnslabel_table *table) {
57482 +       const char *end = name + name_len;
57483 +       int ref = 0;
57484 +       u16 _t;
57485 +
57486 +#define APPEND16(x) do {                                                  \
57487 +               if (j + 2 > (off_t)buf_len)                                \
57488 +                       goto overflow;                                             \
57489 +               _t = htons(x);                                                     \
57490 +               memcpy(buf + j, &_t, 2);                                   \
57491 +               j += 2;                                                                    \
57492 +       } while (0)
57493 +#define APPEND32(x) do {                                                  \
57494 +               if (j + 4 > (off_t)buf_len)                                \
57495 +                       goto overflow;                                             \
57496 +               _t32 = htonl(x);                                                   \
57497 +               memcpy(buf + j, &_t32, 4);                                 \
57498 +               j += 4;                                                                    \
57499 +       } while (0)
57500 +
57501 +       if (name_len > 255) return -2;
57502 +
57503 +       for (;;) {
57504 +               const char *const start = name;
57505 +               if (table && (ref = dnslabel_table_get_pos(table, name)) >= 0) {
57506 +                       APPEND16(ref | 0xc000);
57507 +                       return j;
57508 +               }
57509 +               name = strchr(name, '.');
57510 +               if (!name) {
57511 +                       const unsigned int label_len = end - start;
57512 +                       if (label_len > 63) return -1;
57513 +                       if ((size_t)(j+label_len+1) > buf_len) return -2;
57514 +                       if (table) dnslabel_table_add(table, start, j);
57515 +                       buf[j++] = label_len;
57516 +
57517 +                       memcpy(buf + j, start, end - start);
57518 +                       j += end - start;
57519 +                       break;
57520 +               } else {
57521 +                       // append length of the label.
57522 +                       const unsigned int label_len = name - start;
57523 +                       if (label_len > 63) return -1;
57524 +                       if ((size_t)(j+label_len+1) > buf_len) return -2;
57525 +                       if (table) dnslabel_table_add(table, start, j);
57526 +                       buf[j++] = label_len;
57527 +
57528 +                       memcpy(buf + j, start, name - start);
57529 +                       j += name - start;
57530 +                       // hop over the '.'
57531 +                       name++;
57532 +               }
57533 +       }
57534 +
57535 +       // the labels must be terminated by a 0.
57536 +       // It's possible that the name ended in a .
57537 +       // in which case the zero is already there
57538 +       if (!j || buf[j-1]) buf[j++] = 0;
57539 +       return j;
57540 + overflow:
57541 +       return (-2);
57542 +}
57543 +
57544 +// Finds the length of a dns request for a DNS name of the given
57545 +// length. The actual request may be smaller than the value returned
57546 +// here
57547 +static int
57548 +evdns_request_len(const int name_len) {
57549 +       return 96 + // length of the DNS standard header
57550 +               name_len + 2 +
57551 +               4;  // space for the resource type
57552 +}
57553 +
57554 +// build a dns request packet into buf. buf should be at least as long
57555 +// as evdns_request_len told you it should be.
57556 +//
57557 +// Returns the amount of space used. Negative on error.
57558 +static int
57559 +evdns_request_data_build(const char *const name, const int name_len,
57560 +    const u16 trans_id, const u16 type, const u16 class,
57561 +    u8 *const buf, size_t buf_len) {
57562 +       off_t j = 0;  // current offset into buf
57563 +       u16 _t;  // used by the macros
57564 +
57565 +       APPEND16(trans_id);
57566 +       APPEND16(0x0100);  // standard query, recusion needed
57567 +       APPEND16(1);  // one question
57568 +       APPEND16(0);  // no answers
57569 +       APPEND16(0);  // no authority
57570 +       APPEND16(0);  // no additional
57571 +
57572 +       j = dnsname_to_labels(buf, buf_len, j, name, name_len, NULL);
57573 +       if (j < 0) {
57574 +               return (int)j;
57575 +       }
57576 +       
57577 +       APPEND16(type);
57578 +       APPEND16(class);
57579 +
57580 +       return (int)j;
57581 + overflow:
57582 +       return (-1);
57583 +}
57584 +
57585 +// exported function
57586 +struct evdns_server_port *
57587 +evdns_add_server_port(int socket, int is_tcp, evdns_request_callback_fn_type cb, void *user_data)
57588 +{
57589 +       struct evdns_server_port *port;
57590 +       if (!(port = malloc(sizeof(struct evdns_server_port))))
57591 +               return NULL;
57592 +       memset(port, 0, sizeof(struct evdns_server_port));
57593 +
57594 +       assert(!is_tcp); // TCP sockets not yet implemented
57595 +       port->socket = socket;
57596 +       port->refcnt = 1;
57597 +       port->choked = 0;
57598 +       port->closing = 0;
57599 +       port->user_callback = cb;
57600 +       port->user_data = user_data;
57601 +       port->pending_replies = NULL;
57602 +
57603 +       event_set(&port->event, port->socket, EV_READ | EV_PERSIST,
57604 +                         server_port_ready_callback, port);
57605 +       event_add(&port->event, NULL); // check return.
57606 +       return port;
57607 +}
57608 +
57609 +// exported function
57610 +void
57611 +evdns_close_server_port(struct evdns_server_port *port)
57612 +{
57613 +       if (--port->refcnt == 0)
57614 +               server_port_free(port);
57615 +       port->closing = 1;
57616 +}
57617 +
57618 +// exported function
57619 +int
57620 +evdns_server_request_add_reply(struct evdns_server_request *_req, int section, const char *name, int type, int class, int ttl, int datalen, int is_name, const char *data)
57621 +{
57622 +       struct server_request *req = TO_SERVER_REQUEST(_req);
57623 +       struct server_reply_item **itemp, *item;
57624 +       int *countp;
57625 +
57626 +       if (req->response) /* have we already answered? */
57627 +               return (-1);
57628 +
57629 +       switch (section) {
57630 +       case EVDNS_ANSWER_SECTION:
57631 +               itemp = &req->answer;
57632 +               countp = &req->n_answer;
57633 +               break;
57634 +       case EVDNS_AUTHORITY_SECTION:
57635 +               itemp = &req->authority;
57636 +               countp = &req->n_authority;
57637 +               break;
57638 +       case EVDNS_ADDITIONAL_SECTION:
57639 +               itemp = &req->additional;
57640 +               countp = &req->n_additional;
57641 +               break;
57642 +       default:
57643 +               return (-1);
57644 +       }
57645 +       while (*itemp) {
57646 +               itemp = &((*itemp)->next);
57647 +       }
57648 +       item = malloc(sizeof(struct server_reply_item));
57649 +       if (!item)
57650 +               return -1;
57651 +       item->next = NULL;
57652 +       if (!(item->name = strdup(name))) {
57653 +               free(item);
57654 +               return -1;
57655 +       }
57656 +       item->type = type;
57657 +       item->class = class;
57658 +       item->ttl = ttl;
57659 +       item->is_name = is_name != 0;
57660 +       item->datalen = 0;
57661 +       item->data = NULL;
57662 +       if (data) {
57663 +               if (item->is_name) {
57664 +                       if (!(item->data = strdup(data))) {
57665 +                               free(item->name);
57666 +                               free(item);
57667 +                               return -1;
57668 +                       }
57669 +                       item->datalen = -1;
57670 +               } else {
57671 +                       if (!(item->data = malloc(datalen))) {
57672 +                               free(item->name);
57673 +                               free(item);
57674 +                               return -1;
57675 +                       }
57676 +                       item->datalen = datalen;
57677 +                       memcpy(item->data, data, datalen);
57678 +               }
57679 +       }
57680 +
57681 +       *itemp = item;
57682 +       ++(*countp);
57683 +       return 0;
57684 +}
57685 +
57686 +// exported function
57687 +int
57688 +evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl)
57689 +{
57690 +       return evdns_server_request_add_reply(
57691 +                 req, EVDNS_ANSWER_SECTION, name, TYPE_A, CLASS_INET,
57692 +                 ttl, n*4, 0, addrs);
57693 +}
57694 +
57695 +// exported function
57696 +int
57697 +evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl)
57698 +{
57699 +       return evdns_server_request_add_reply(
57700 +                 req, EVDNS_ANSWER_SECTION, name, TYPE_AAAA, CLASS_INET,
57701 +                 ttl, n*16, 0, addrs);
57702 +}
57703 +
57704 +// exported function
57705 +int
57706 +evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char *inaddr_name, const char *hostname, int ttl)
57707 +{
57708 +       u32 a;
57709 +       char buf[32];
57710 +       assert(in || inaddr_name);
57711 +       assert(!(in && inaddr_name));
57712 +       if (in) {
57713 +               a = ntohl(in->s_addr);
57714 +               snprintf(buf, sizeof(buf), "%d.%d.%d.%d.in-addr.arpa",
57715 +                               (int)(u8)((a    )&0xff),
57716 +                               (int)(u8)((a>>8 )&0xff),
57717 +                               (int)(u8)((a>>16)&0xff),
57718 +                               (int)(u8)((a>>24)&0xff));
57719 +               inaddr_name = buf;
57720 +       }
57721 +       return evdns_server_request_add_reply(
57722 +                 req, EVDNS_ANSWER_SECTION, inaddr_name, TYPE_PTR, CLASS_INET,
57723 +                 ttl, -1, 1, hostname);
57724 +}
57725 +
57726 +// exported function
57727 +int
57728 +evdns_server_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char *cname, int ttl)
57729 +{
57730 +       return evdns_server_request_add_reply(
57731 +                 req, EVDNS_ANSWER_SECTION, name, TYPE_A, CLASS_INET,
57732 +                 ttl, -1, 1, cname);
57733 +}
57734 +
57735 +
57736 +static int
57737 +evdns_server_request_format_response(struct server_request *req, int err)
57738 +{
57739 +       unsigned char buf[1500];
57740 +       size_t buf_len = sizeof(buf);
57741 +       off_t j = 0, r;
57742 +       u16 _t;
57743 +       u32 _t32;
57744 +       int i;
57745 +       u16 flags;
57746 +       struct dnslabel_table table;
57747 +
57748 +       if (err < 0 || err > 15) return -1;
57749 +
57750 +       /* Set response bit and error code; copy OPCODE and RD fields from
57751 +        * question; copy RA and AA if set by caller. */
57752 +       flags = req->base.flags;
57753 +       flags |= (0x8000 | err);
57754 +
57755 +       dnslabel_table_init(&table);
57756 +       APPEND16(req->trans_id);
57757 +       APPEND16(flags);
57758 +       APPEND16(req->base.nquestions);
57759 +       APPEND16(req->n_answer);
57760 +       APPEND16(req->n_authority);
57761 +       APPEND16(req->n_additional);
57762 +
57763 +       /* Add questions. */
57764 +       for (i=0; i < req->base.nquestions; ++i) {
57765 +               const char *s = req->base.questions[i]->name;
57766 +               j = dnsname_to_labels(buf, buf_len, j, s, strlen(s), &table);
57767 +               if (j < 0) {
57768 +                       dnslabel_clear(&table);
57769 +                       return (int) j;
57770 +               }
57771 +               APPEND16(req->base.questions[i]->type);
57772 +               APPEND16(req->base.questions[i]->class);
57773 +       }
57774 +
57775 +       /* Add answer, authority, and additional sections. */
57776 +       for (i=0; i<3; ++i) {
57777 +               struct server_reply_item *item;
57778 +               if (i==0)
57779 +                       item = req->answer;
57780 +               else if (i==1)
57781 +                       item = req->authority;
57782 +               else
57783 +                       item = req->additional;
57784 +               while (item) {
57785 +                       r = dnsname_to_labels(buf, buf_len, j, item->name, strlen(item->name), &table);
57786 +                       if (r < 0)
57787 +                               goto overflow;
57788 +                       j = r;
57789 +
57790 +                       APPEND16(item->type);
57791 +                       APPEND16(item->class);
57792 +                       APPEND32(item->ttl);
57793 +                       if (item->is_name) {
57794 +                               off_t len_idx = j, name_start;
57795 +                               j += 2;
57796 +                               name_start = j;
57797 +                               r = dnsname_to_labels(buf, buf_len, j, item->data, strlen(item->data), &table);
57798 +                               if (r < 0)
57799 +                                       goto overflow;
57800 +                               j = r;
57801 +                               _t = htons( (j-name_start) );
57802 +                               memcpy(buf+len_idx, &_t, 2);
57803 +                       } else {
57804 +                               APPEND16(item->datalen);
57805 +                               if (j+item->datalen > (off_t)buf_len)
57806 +                                       goto overflow;
57807 +                               memcpy(buf+j, item->data, item->datalen);
57808 +                               j += item->datalen;
57809 +                       }
57810 +                       item = item->next;
57811 +               }
57812 +       }
57813 +
57814 +       if (j > 512) {
57815 +overflow:
57816 +               j = 512;
57817 +               buf[3] |= 0x02; /* set the truncated bit. */
57818 +       }
57819 +
57820 +       req->response_len = j;
57821 +
57822 +       if (!(req->response = malloc(req->response_len))) {
57823 +               server_request_free_answers(req);
57824 +               dnslabel_clear(&table);
57825 +               return (-1);
57826 +       }
57827 +       memcpy(req->response, buf, req->response_len);
57828 +       server_request_free_answers(req);
57829 +       dnslabel_clear(&table);
57830 +       return (0);
57831 +}
57832 +
57833 +// exported function
57834 +int
57835 +evdns_server_request_respond(struct evdns_server_request *_req, int err)
57836 +{
57837 +       struct server_request *req = TO_SERVER_REQUEST(_req);
57838 +       struct evdns_server_port *port = req->port;
57839 +       int r;
57840 +       if (!req->response) {
57841 +               if ((r = evdns_server_request_format_response(req, err))<0)
57842 +                       return r;
57843 +       }
57844 +
57845 +       r = sendto(port->socket, req->response, req->response_len, 0,
57846 +                          (struct sockaddr*) &req->addr, req->addrlen);
57847 +       if (r<0) {
57848 +               int err = last_error(port->socket);
57849 +               if (! error_is_eagain(err))
57850 +                       return -1;
57851 +
57852 +               if (port->pending_replies) {
57853 +                       req->prev_pending = port->pending_replies->prev_pending;
57854 +                       req->next_pending = port->pending_replies;
57855 +                       req->prev_pending->next_pending =
57856 +                               req->next_pending->prev_pending = req;
57857 +               } else {
57858 +                       req->prev_pending = req->next_pending = req;
57859 +                       port->pending_replies = req;
57860 +                       port->choked = 1;
57861 +
57862 +                       (void) event_del(&port->event);
57863 +                       event_set(&port->event, port->socket, (port->closing?0:EV_READ) | EV_WRITE | EV_PERSIST, server_port_ready_callback, port);
57864 +
57865 +                       if (event_add(&port->event, NULL) < 0) {
57866 +                               log(EVDNS_LOG_WARN, "Error from libevent when adding event for DNS server");
57867 +                       }
57868 +
57869 +               }
57870 +
57871 +               return 1;
57872 +       }
57873 +       if (server_request_free(req))
57874 +               return 0;
57875 +
57876 +       if (port->pending_replies)
57877 +               server_port_flush(port);
57878 +
57879 +       return 0;
57880 +}
57881 +
57882 +// Free all storage held by RRs in req.
57883 +static void
57884 +server_request_free_answers(struct server_request *req)
57885 +{
57886 +       struct server_reply_item *victim, *next, **list;
57887 +       int i;
57888 +       for (i = 0; i < 3; ++i) {
57889 +               if (i==0)
57890 +                       list = &req->answer;
57891 +               else if (i==1)
57892 +                       list = &req->authority;
57893 +               else
57894 +                       list = &req->additional;
57895 +
57896 +               victim = *list;
57897 +               while (victim) {
57898 +                       next = victim->next;
57899 +                       free(victim->name);
57900 +                       if (victim->data)
57901 +                               free(victim->data);
57902 +                       /* XXXX free(victim?) -NM */
57903 +                       victim = next;
57904 +               }
57905 +               *list = NULL;
57906 +       }
57907 +}
57908 +
57909 +// Free all storage held by req, and remove links to it.
57910 +// return true iff we just wound up freeing the server_port.
57911 +static int
57912 +server_request_free(struct server_request *req)
57913 +{
57914 +       int i, rc=1;
57915 +       if (req->base.questions) {
57916 +               for (i = 0; i < req->base.nquestions; ++i)
57917 +                       free(req->base.questions[i]);
57918 +       }
57919 +
57920 +       if (req->port) {
57921 +               if (req->port->pending_replies == req) {
57922 +                       if (req->next_pending)
57923 +                               req->port->pending_replies = req->next_pending;
57924 +                       else
57925 +                               req->port->pending_replies = NULL;
57926 +               }
57927 +               rc = --req->port->refcnt;
57928 +       }
57929 +
57930 +       if (req->response) {
57931 +               free(req->response);
57932 +       }
57933 +
57934 +       server_request_free_answers(req);
57935 +
57936 +       if (req->next_pending && req->next_pending != req) {
57937 +               req->next_pending->prev_pending = req->prev_pending;
57938 +               req->prev_pending->next_pending = req->next_pending;
57939 +       }
57940 +
57941 +       if (rc == 0) {
57942 +               server_port_free(req->port);
57943 +               free(req);
57944 +               return (1);
57945 +       }
57946 +       free(req);
57947 +       return (0);
57948 +}
57949 +
57950 +// Free all storage held by an evdns_server_port.  Only called when 
57951 +static void
57952 +server_port_free(struct evdns_server_port *port)
57953 +{
57954 +       assert(port);
57955 +       assert(!port->refcnt);
57956 +       assert(!port->pending_replies);
57957 +       if (port->socket > 0) {
57958 +               CLOSE_SOCKET(port->socket);
57959 +               port->socket = -1;
57960 +       }
57961 +       (void) event_del(&port->event);
57962 +       // XXXX actually free the port? -NM
57963 +}
57964 +
57965 +// exported function
57966 +int
57967 +evdns_server_request_drop(struct evdns_server_request *_req)
57968 +{
57969 +       struct server_request *req = TO_SERVER_REQUEST(_req);
57970 +       server_request_free(req);
57971 +       return 0;
57972 +}
57973 +
57974 +// exported function
57975 +int
57976 +evdns_server_request_get_requesting_addr(struct evdns_server_request *_req, struct sockaddr *sa, int addr_len)
57977 +{
57978 +       struct server_request *req = TO_SERVER_REQUEST(_req);
57979 +       if (addr_len < (int)req->addrlen)
57980 +               return -1;
57981 +       memcpy(sa, &(req->addr), req->addrlen);
57982 +       return req->addrlen;
57983 +}
57984 +
57985 +#undef APPEND16
57986 +#undef APPEND32
57987 +
57988 +// this is a libevent callback function which is called when a request
57989 +// has timed out.
57990 +static void
57991 +evdns_request_timeout_callback(int fd, short events, void *arg) {
57992 +       struct request *const req = (struct request *) arg;
57993 +        (void) fd;
57994 +        (void) events;
57995 +
57996 +       log(EVDNS_LOG_DEBUG, "Request %lx timed out", (unsigned long) arg);
57997 +
57998 +       req->ns->timedout++;
57999 +       if (req->ns->timedout > global_max_nameserver_timeout) {
58000 +               req->ns->timedout = 0;
58001 +               nameserver_failed(req->ns, "request timed out.");
58002 +       }
58003 +
58004 +       (void) evtimer_del(&req->timeout_event);
58005 +       if (req->tx_count >= global_max_retransmits) {
58006 +               // this request has failed
58007 +               reply_callback(req, 0, DNS_ERR_TIMEOUT, NULL);
58008 +               request_finished(req, &req_head);
58009 +       } else {
58010 +               // retransmit it
58011 +               evdns_request_transmit(req);
58012 +       }
58013 +}
58014 +
58015 +// try to send a request to a given server.
58016 +//
58017 +// return:
58018 +//   0 ok
58019 +//   1 temporary failure
58020 +//   2 other failure
58021 +static int
58022 +evdns_request_transmit_to(struct request *req, struct nameserver *server) {
58023 +       const int r = send(server->socket, req->request, req->request_len, 0);
58024 +       if (r < 0) {
58025 +               int err = last_error(server->socket);
58026 +               if (error_is_eagain(err)) return 1;
58027 +               nameserver_failed(req->ns, strerror(err));
58028 +               return 2;
58029 +       } else if (r != (int)req->request_len) {
58030 +               return 1;  // short write
58031 +       } else {
58032 +               return 0;
58033 +       }
58034 +}
58035 +
58036 +// try to send a request, updating the fields of the request
58037 +// as needed
58038 +//
58039 +// return:
58040 +//   0 ok
58041 +//   1 failed
58042 +static int
58043 +evdns_request_transmit(struct request *req) {
58044 +       int retcode = 0, r;
58045 +
58046 +       // if we fail to send this packet then this flag marks it
58047 +       // for evdns_transmit
58048 +       req->transmit_me = 1;
58049 +       if (req->trans_id == 0xffff) abort();
58050 +
58051 +       if (req->ns->choked) {
58052 +               // don't bother trying to write to a socket
58053 +               // which we have had EAGAIN from
58054 +               return 1;
58055 +       }
58056 +
58057 +       r = evdns_request_transmit_to(req, req->ns);
58058 +       switch (r) {
58059 +       case 1:
58060 +               // temp failure
58061 +               req->ns->choked = 1;
58062 +               nameserver_write_waiting(req->ns, 1);
58063 +               return 1;
58064 +       case 2:
58065 +               // failed in some other way
58066 +               retcode = 1;
58067 +               // fall through
58068 +       default:
58069 +               // all ok
58070 +               log(EVDNS_LOG_DEBUG,
58071 +                   "Setting timeout for request %lx", (unsigned long) req);
58072 +               evtimer_set(&req->timeout_event, evdns_request_timeout_callback, req);
58073 +               if (evtimer_add(&req->timeout_event, &global_timeout) < 0) {
58074 +                  log(EVDNS_LOG_WARN,
58075 +                     "Error from libevent when adding timer for request %lx",
58076 +                      (unsigned long) req);
58077 +                  // ???? Do more?
58078 +                }
58079 +               req->tx_count++;
58080 +               req->transmit_me = 0;
58081 +               return retcode;
58082 +       }
58083 +}
58084 +
58085 +static void
58086 +nameserver_probe_callback(int result, char type, int count, int ttl, void *addresses, void *arg) {
58087 +       struct nameserver *const ns = (struct nameserver *) arg;
58088 +        (void) type;
58089 +        (void) count;
58090 +        (void) ttl;
58091 +        (void) addresses;
58092 +
58093 +       if (result == DNS_ERR_NONE || result == DNS_ERR_NOTEXIST) {
58094 +               // this is a good reply
58095 +               nameserver_up(ns);
58096 +       } else nameserver_probe_failed(ns);
58097 +}
58098 +
58099 +static void
58100 +nameserver_send_probe(struct nameserver *const ns) {
58101 +       struct request *req;
58102 +       // here we need to send a probe to a given nameserver
58103 +       // in the hope that it is up now.
58104 +
58105 +       log(EVDNS_LOG_DEBUG, "Sending probe to %s", debug_ntoa(ns->address));
58106 +
58107 +       req = request_new(TYPE_A, "www.google.com", DNS_QUERY_NO_SEARCH, nameserver_probe_callback, ns);
58108 +        if (!req) return;
58109 +       // we force this into the inflight queue no matter what
58110 +       request_trans_id_set(req, transaction_id_pick());
58111 +       req->ns = ns;
58112 +       request_submit(req);
58113 +}
58114 +
58115 +// returns:
58116 +//   0 didn't try to transmit anything
58117 +//   1 tried to transmit something
58118 +static int
58119 +evdns_transmit(void) {
58120 +       char did_try_to_transmit = 0;
58121 +
58122 +       if (req_head) {
58123 +               struct request *const started_at = req_head, *req = req_head;
58124 +               // first transmit all the requests which are currently waiting
58125 +               do {
58126 +                       if (req->transmit_me) {
58127 +                               did_try_to_transmit = 1;
58128 +                               evdns_request_transmit(req);
58129 +                       }
58130 +
58131 +                       req = req->next;
58132 +               } while (req != started_at);
58133 +       }
58134 +
58135 +       return did_try_to_transmit;
58136 +}
58137 +
58138 +// exported function
58139 +int
58140 +evdns_count_nameservers(void)
58141 +{
58142 +       const struct nameserver *server = server_head;
58143 +       int n = 0;
58144 +       if (!server)
58145 +               return 0;
58146 +       do {
58147 +               ++n;
58148 +               server = server->next;
58149 +       } while (server != server_head);
58150 +       return n;
58151 +}
58152 +
58153 +// exported function
58154 +int
58155 +evdns_clear_nameservers_and_suspend(void)
58156 +{
58157 +       struct nameserver *server = server_head, *started_at = server_head;
58158 +       struct request *req = req_head, *req_started_at = req_head;
58159 +
58160 +       if (!server)
58161 +               return 0;
58162 +       while (1) {
58163 +               struct nameserver *next = server->next;
58164 +               (void) event_del(&server->event);
58165 +               (void) evtimer_del(&server->timeout_event);
58166 +               if (server->socket >= 0)
58167 +                       CLOSE_SOCKET(server->socket);
58168 +               free(server);
58169 +               if (next == started_at)
58170 +                       break;
58171 +               server = next;
58172 +       }
58173 +       server_head = NULL;
58174 +       global_good_nameservers = 0;
58175 +
58176 +       while (req) {
58177 +               struct request *next = req->next;
58178 +               req->tx_count = req->reissue_count = 0;
58179 +               req->ns = NULL;
58180 +               // ???? What to do about searches?
58181 +               (void) evtimer_del(&req->timeout_event);
58182 +               req->trans_id = 0;
58183 +               req->transmit_me = 0;
58184 +
58185 +               global_requests_waiting++;
58186 +               evdns_request_insert(req, &req_waiting_head);
58187 +               /* We want to insert these suspended elements at the front of
58188 +                * the waiting queue, since they were pending before any of
58189 +                * the waiting entries were added.  This is a circular list,
58190 +                * so we can just shift the start back by one.*/
58191 +               req_waiting_head = req_waiting_head->prev;
58192 +
58193 +               if (next == req_started_at)
58194 +                       break;
58195 +               req = next;
58196 +       }
58197 +       req_head = NULL;
58198 +       global_requests_inflight = 0;
58199 +
58200 +       return 0;
58201 +}
58202 +
58203 +
58204 +// exported function
58205 +int
58206 +evdns_resume(void)
58207 +{
58208 +       evdns_requests_pump_waiting_queue();
58209 +       return 0;
58210 +}
58211 +
58212 +static int
58213 +_evdns_nameserver_add_impl(unsigned long int address, int port) {
58214 +       // first check to see if we already have this nameserver
58215 +
58216 +       const struct nameserver *server = server_head, *const started_at = server_head;
58217 +       struct nameserver *ns;
58218 +       struct sockaddr_in sin;
58219 +       int err = 0;
58220 +       if (server) {
58221 +               do {
58222 +                       if (server->address == address) return 3;
58223 +                       server = server->next;
58224 +               } while (server != started_at);
58225 +       }
58226 +
58227 +       ns = (struct nameserver *) malloc(sizeof(struct nameserver));
58228 +        if (!ns) return -1;
58229 +
58230 +       memset(ns, 0, sizeof(struct nameserver));
58231 +
58232 +       ns->socket = socket(PF_INET, SOCK_DGRAM, 0);
58233 +       if (ns->socket < 0) { err = 1; goto out1; }
58234 +#ifdef WIN32
58235 +        {
58236 +               u_long nonblocking = 1;
58237 +               ioctlsocket(ns->socket, FIONBIO, &nonblocking);
58238 +       }
58239 +#else
58240 +        fcntl(ns->socket, F_SETFL, O_NONBLOCK);
58241 +#endif
58242 +       sin.sin_addr.s_addr = address;
58243 +       sin.sin_port = htons(port);
58244 +       sin.sin_family = AF_INET;
58245 +       if (connect(ns->socket, (struct sockaddr *) &sin, sizeof(sin)) != 0) {
58246 +               err = 2;
58247 +               goto out2;
58248 +       }
58249 +
58250 +       ns->address = address;
58251 +       ns->state = 1;
58252 +       event_set(&ns->event, ns->socket, EV_READ | EV_PERSIST, nameserver_ready_callback, ns);
58253 +       if (event_add(&ns->event, NULL) < 0) {
58254 +          err = 2;
58255 +          goto out2;
58256 +        }
58257 +
58258 +       log(EVDNS_LOG_DEBUG, "Added nameserver %s", debug_ntoa(address));
58259 +
58260 +       // insert this nameserver into the list of them
58261 +       if (!server_head) {
58262 +               ns->next = ns->prev = ns;
58263 +               server_head = ns;
58264 +       } else {
58265 +               ns->next = server_head->next;
58266 +               ns->prev = server_head;
58267 +               server_head->next = ns;
58268 +               if (server_head->prev == server_head) {
58269 +                       server_head->prev = ns;
58270 +               }
58271 +       }
58272 +
58273 +       global_good_nameservers++;
58274 +
58275 +       return 0;
58276 +
58277 +out2:
58278 +       CLOSE_SOCKET(ns->socket);
58279 +out1:
58280 +       free(ns);
58281 +       log(EVDNS_LOG_WARN, "Unable to add nameserver %s: error %d", debug_ntoa(address), err);
58282 +       return err;
58283 +}
58284 +
58285 +// exported function
58286 +int
58287 +evdns_nameserver_add(unsigned long int address) {
58288 +       return _evdns_nameserver_add_impl(address, 53);
58289 +}
58290 +
58291 +// exported function
58292 +int
58293 +evdns_nameserver_ip_add(const char *ip_as_string) {
58294 +       struct in_addr ina;
58295 +       int port;
58296 +       char buf[20];
58297 +       const char *cp;
58298 +       cp = strchr(ip_as_string, ':');
58299 +       if (! cp) {
58300 +               cp = ip_as_string;
58301 +               port = 53;
58302 +       } else {
58303 +               port = strtoint(cp+1);
58304 +               if (port < 0 || port > 65535) {
58305 +                       return 4;
58306 +               }
58307 +               if ((cp-ip_as_string) >= (int)sizeof(buf)) {
58308 +                       return 4;
58309 +               }
58310 +               memcpy(buf, ip_as_string, cp-ip_as_string);
58311 +               buf[cp-ip_as_string] = '\0';
58312 +               cp = buf;
58313 +       }
58314 +       if (!inet_aton(cp, &ina)) {
58315 +               return 4;
58316 +       }
58317 +       return _evdns_nameserver_add_impl(ina.s_addr, port);
58318 +}
58319 +
58320 +// insert into the tail of the queue
58321 +static void
58322 +evdns_request_insert(struct request *req, struct request **head) {
58323 +       if (!*head) {
58324 +               *head = req;
58325 +               req->next = req->prev = req;
58326 +               return;
58327 +       }
58328 +
58329 +       req->prev = (*head)->prev;
58330 +       req->prev->next = req;
58331 +       req->next = *head;
58332 +       (*head)->prev = req;
58333 +}
58334 +
58335 +static int
58336 +string_num_dots(const char *s) {
58337 +       int count = 0;
58338 +       while ((s = strchr(s, '.'))) {
58339 +               s++;
58340 +               count++;
58341 +       }
58342 +       return count;
58343 +}
58344 +
58345 +static struct request *
58346 +request_new(int type, const char *name, int flags,
58347 +    evdns_callback_type callback, void *user_ptr) {
58348 +       const char issuing_now =
58349 +           (global_requests_inflight < global_max_requests_inflight) ? 1 : 0;
58350 +
58351 +       const int name_len = strlen(name);
58352 +       const int request_max_len = evdns_request_len(name_len);
58353 +       const u16 trans_id = issuing_now ? transaction_id_pick() : 0xffff;
58354 +       // the request data is alloced in a single block with the header
58355 +       struct request *const req =
58356 +           (struct request *) malloc(sizeof(struct request) + request_max_len);
58357 +       int rlen;
58358 +        (void) flags;
58359 +
58360 +        if (!req) return NULL;
58361 +       memset(req, 0, sizeof(struct request));
58362 +
58363 +       // request data lives just after the header
58364 +       req->request = ((u8 *) req) + sizeof(struct request);
58365 +       // denotes that the request data shouldn't be free()ed
58366 +       req->request_appended = 1;
58367 +       rlen = evdns_request_data_build(name, name_len, trans_id,
58368 +           type, CLASS_INET, req->request, request_max_len);
58369 +       if (rlen < 0)
58370 +               goto err1;
58371 +       req->request_len = rlen;
58372 +       req->trans_id = trans_id;
58373 +       req->tx_count = 0;
58374 +       req->request_type = type;
58375 +       req->user_pointer = user_ptr;
58376 +       req->user_callback = callback;
58377 +       req->ns = issuing_now ? nameserver_pick() : NULL;
58378 +       req->next = req->prev = NULL;
58379 +
58380 +       return req;
58381 +err1:
58382 +       free(req);
58383 +       return NULL;
58384 +}
58385 +
58386 +static void
58387 +request_submit(struct request *const req) {
58388 +       if (req->ns) {
58389 +               // if it has a nameserver assigned then this is going
58390 +               // straight into the inflight queue
58391 +               evdns_request_insert(req, &req_head);
58392 +               global_requests_inflight++;
58393 +               evdns_request_transmit(req);
58394 +       } else {
58395 +               evdns_request_insert(req, &req_waiting_head);
58396 +               global_requests_waiting++;
58397 +       }
58398 +}
58399 +
58400 +// exported function
58401 +int evdns_resolve_ipv4(const char *name, int flags,
58402 +    evdns_callback_type callback, void *ptr) {
58403 +       log(EVDNS_LOG_DEBUG, "Resolve requested for %s", name);
58404 +       if (flags & DNS_QUERY_NO_SEARCH) {
58405 +               struct request *const req =
58406 +                       request_new(TYPE_A, name, flags, callback, ptr);
58407 +               if (req == NULL)
58408 +                       return (1);
58409 +               request_submit(req);
58410 +               return (0);
58411 +       } else {
58412 +               return (search_request_new(TYPE_A, name, flags, callback, ptr));
58413 +       }
58414 +}
58415 +
58416 +// exported function
58417 +int evdns_resolve_ipv6(const char *name, int flags,
58418 +                                          evdns_callback_type callback, void *ptr) {
58419 +       log(EVDNS_LOG_DEBUG, "Resolve requested for %s", name);
58420 +       if (flags & DNS_QUERY_NO_SEARCH) {
58421 +               struct request *const req =
58422 +                       request_new(TYPE_AAAA, name, flags, callback, ptr);
58423 +               if (req == NULL)
58424 +                       return (1);
58425 +               request_submit(req);
58426 +               return (0);
58427 +       } else {
58428 +               return (search_request_new(TYPE_AAAA, name, flags, callback, ptr));
58429 +       }
58430 +}
58431 +
58432 +int evdns_resolve_reverse(struct in_addr *in, int flags, evdns_callback_type callback, void *ptr) {
58433 +       char buf[32];
58434 +       struct request *req;
58435 +       u32 a;
58436 +       assert(in);
58437 +       a = ntohl(in->s_addr);
58438 +       snprintf(buf, sizeof(buf), "%d.%d.%d.%d.in-addr.arpa",
58439 +                       (int)(u8)((a    )&0xff),
58440 +                       (int)(u8)((a>>8 )&0xff),
58441 +                       (int)(u8)((a>>16)&0xff),
58442 +                       (int)(u8)((a>>24)&0xff));
58443 +       log(EVDNS_LOG_DEBUG, "Resolve requested for %s (reverse)", buf);
58444 +       req = request_new(TYPE_PTR, buf, flags, callback, ptr);
58445 +       if (!req) return 1;
58446 +       request_submit(req);
58447 +       return 0;
58448 +}
58449 +
58450 +int evdns_resolve_reverse_ipv6(struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr) {
58451 +       char buf[64];
58452 +       char *cp;
58453 +       struct request *req;
58454 +       int i;
58455 +       assert(in);
58456 +       cp = buf;
58457 +       for (i=15; i >= 0; --i) {
58458 +               u8 byte = in->s6_addr[i];
58459 +               *cp++ = "0123456789abcdef"[byte & 0x0f];
58460 +               *cp++ = '.';
58461 +               *cp++ = "0123456789abcdef"[byte >> 4];
58462 +               *cp++ = '.';
58463 +       }
58464 +       assert(cp + strlen(".ip6.arpa") < buf+sizeof(buf));
58465 +       memcpy(cp, ".ip6.arpa", strlen(".ip6.arpa")+1);
58466 +       log(EVDNS_LOG_DEBUG, "Resolve requested for %s (reverse)", buf);
58467 +       req = request_new(TYPE_PTR, buf, flags, callback, ptr);
58468 +       if (!req) return 1;
58469 +       request_submit(req);
58470 +       return 0;
58471 +}
58472 +
58473 +/////////////////////////////////////////////////////////////////////
58474 +// Search support
58475 +//
58476 +// the libc resolver has support for searching a number of domains
58477 +// to find a name. If nothing else then it takes the single domain
58478 +// from the gethostname() call.
58479 +//
58480 +// It can also be configured via the domain and search options in a
58481 +// resolv.conf.
58482 +//
58483 +// The ndots option controls how many dots it takes for the resolver
58484 +// to decide that a name is non-local and so try a raw lookup first.
58485 +
58486 +struct search_domain {
58487 +       int len;
58488 +       struct search_domain *next;
58489 +       // the text string is appended to this structure
58490 +};
58491 +
58492 +struct search_state {
58493 +       int refcount;
58494 +       int ndots;
58495 +       int num_domains;
58496 +       struct search_domain *head;
58497 +};
58498 +
58499 +static struct search_state *global_search_state = NULL;
58500 +
58501 +static void
58502 +search_state_decref(struct search_state *const state) {
58503 +       if (!state) return;
58504 +       state->refcount--;
58505 +       if (!state->refcount) {
58506 +               struct search_domain *next, *dom;
58507 +               for (dom = state->head; dom; dom = next) {
58508 +                       next = dom->next;
58509 +                       free(dom);
58510 +               }
58511 +               free(state);
58512 +       }
58513 +}
58514 +
58515 +static struct search_state *
58516 +search_state_new(void) {
58517 +       struct search_state *state = (struct search_state *) malloc(sizeof(struct search_state));
58518 +        if (!state) return NULL;
58519 +       memset(state, 0, sizeof(struct search_state));
58520 +       state->refcount = 1;
58521 +       state->ndots = 1;
58522 +
58523 +       return state;
58524 +}
58525 +
58526 +static void
58527 +search_postfix_clear(void) {
58528 +       search_state_decref(global_search_state);
58529 +
58530 +       global_search_state = search_state_new();
58531 +}
58532 +
58533 +// exported function
58534 +void
58535 +evdns_search_clear(void) {
58536 +       search_postfix_clear();
58537 +}
58538 +
58539 +static void
58540 +search_postfix_add(const char *domain) {
58541 +       int domain_len;
58542 +       struct search_domain *sdomain;
58543 +       while (domain[0] == '.') domain++;
58544 +       domain_len = strlen(domain);
58545 +
58546 +       if (!global_search_state) global_search_state = search_state_new();
58547 +        if (!global_search_state) return;
58548 +       global_search_state->num_domains++;
58549 +
58550 +       sdomain = (struct search_domain *) malloc(sizeof(struct search_domain) + domain_len);
58551 +        if (!sdomain) return;
58552 +       memcpy( ((u8 *) sdomain) + sizeof(struct search_domain), domain, domain_len);
58553 +       sdomain->next = global_search_state->head;
58554 +       sdomain->len = domain_len;
58555 +
58556 +       global_search_state->head = sdomain;
58557 +}
58558 +
58559 +// reverse the order of members in the postfix list. This is needed because,
58560 +// when parsing resolv.conf we push elements in the wrong order
58561 +static void
58562 +search_reverse(void) {
58563 +       struct search_domain *cur, *prev = NULL, *next;
58564 +       cur = global_search_state->head;
58565 +       while (cur) {
58566 +               next = cur->next;
58567 +               cur->next = prev;
58568 +               prev = cur;
58569 +               cur = next;
58570 +       }
58571 +
58572 +       global_search_state->head = prev;
58573 +}
58574 +
58575 +// exported function
58576 +void
58577 +evdns_search_add(const char *domain) {
58578 +       search_postfix_add(domain);
58579 +}
58580 +
58581 +// exported function
58582 +void
58583 +evdns_search_ndots_set(const int ndots) {
58584 +       if (!global_search_state) global_search_state = search_state_new();
58585 +        if (!global_search_state) return;
58586 +       global_search_state->ndots = ndots;
58587 +}
58588 +
58589 +static void
58590 +search_set_from_hostname(void) {
58591 +       char hostname[HOST_NAME_MAX + 1], *domainname;
58592 +
58593 +       search_postfix_clear();
58594 +       if (gethostname(hostname, sizeof(hostname))) return;
58595 +       domainname = strchr(hostname, '.');
58596 +       if (!domainname) return;
58597 +       search_postfix_add(domainname);
58598 +}
58599 +
58600 +// warning: returns malloced string
58601 +static char *
58602 +search_make_new(const struct search_state *const state, int n, const char *const base_name) {
58603 +       const int base_len = strlen(base_name);
58604 +       const char need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1;
58605 +       struct search_domain *dom;
58606 +
58607 +       for (dom = state->head; dom; dom = dom->next) {
58608 +               if (!n--) {
58609 +                       // this is the postfix we want
58610 +                       // the actual postfix string is kept at the end of the structure
58611 +                       const u8 *const postfix = ((u8 *) dom) + sizeof(struct search_domain);
58612 +                       const int postfix_len = dom->len;
58613 +                       char *const newname = (char *) malloc(base_len + need_to_append_dot + postfix_len + 1);
58614 +                        if (!newname) return NULL;
58615 +                       memcpy(newname, base_name, base_len);
58616 +                       if (need_to_append_dot) newname[base_len] = '.';
58617 +                       memcpy(newname + base_len + need_to_append_dot, postfix, postfix_len);
58618 +                       newname[base_len + need_to_append_dot + postfix_len] = 0;
58619 +                       return newname;
58620 +               }
58621 +       }
58622 +
58623 +       // we ran off the end of the list and still didn't find the requested string
58624 +       abort();
58625 +       return NULL; /* unreachable; stops warnings in some compilers. */
58626 +}
58627 +
58628 +static int
58629 +search_request_new(int type, const char *const name, int flags, evdns_callback_type user_callback, void *user_arg) {
58630 +       assert(type == TYPE_A || type == TYPE_AAAA);
58631 +       if ( ((flags & DNS_QUERY_NO_SEARCH) == 0) &&
58632 +            global_search_state &&
58633 +                global_search_state->num_domains) {
58634 +               // we have some domains to search
58635 +               struct request *req;
58636 +               if (string_num_dots(name) >= global_search_state->ndots) {
58637 +                       req = request_new(type, name, flags, user_callback, user_arg);
58638 +                       if (!req) return 1;
58639 +                       req->search_index = -1;
58640 +               } else {
58641 +                       char *const new_name = search_make_new(global_search_state, 0, name);
58642 +                        if (!new_name) return 1;
58643 +                       req = request_new(type, new_name, flags, user_callback, user_arg);
58644 +                       free(new_name);
58645 +                       if (!req) return 1;
58646 +                       req->search_index = 0;
58647 +               }
58648 +               req->search_origname = strdup(name);
58649 +               req->search_state = global_search_state;
58650 +               req->search_flags = flags;
58651 +               global_search_state->refcount++;
58652 +               request_submit(req);
58653 +               return 0;
58654 +       } else {
58655 +               struct request *const req = request_new(type, name, flags, user_callback, user_arg);
58656 +               if (!req) return 1;
58657 +               request_submit(req);
58658 +               return 0;
58659 +       }
58660 +}
58661 +
58662 +// this is called when a request has failed to find a name. We need to check
58663 +// if it is part of a search and, if so, try the next name in the list
58664 +// returns:
58665 +//   0 another request has been submitted
58666 +//   1 no more requests needed
58667 +static int
58668 +search_try_next(struct request *const req) {
58669 +       if (req->search_state) {
58670 +               // it is part of a search
58671 +               char *new_name;
58672 +               struct request *newreq;
58673 +               req->search_index++;
58674 +               if (req->search_index >= req->search_state->num_domains) {
58675 +                       // no more postfixes to try, however we may need to try
58676 +                       // this name without a postfix
58677 +                       if (string_num_dots(req->search_origname) < req->search_state->ndots) {
58678 +                               // yep, we need to try it raw
58679 +                               struct request *const newreq = request_new(req->request_type, req->search_origname, req->search_flags, req->user_callback, req->user_pointer);
58680 +                               log(EVDNS_LOG_DEBUG, "Search: trying raw query %s", req->search_origname);
58681 +                               if (newreq) {
58682 +                                       request_submit(newreq);
58683 +                                       return 0;
58684 +                               }
58685 +                       }
58686 +                       return 1;
58687 +               }
58688 +
58689 +               new_name = search_make_new(req->search_state, req->search_index, req->search_origname);
58690 +                if (!new_name) return 1;
58691 +               log(EVDNS_LOG_DEBUG, "Search: now trying %s (%d)", new_name, req->search_index);
58692 +               newreq = request_new(req->request_type, new_name, req->search_flags, req->user_callback, req->user_pointer);
58693 +               free(new_name);
58694 +               if (!newreq) return 1;
58695 +               newreq->search_origname = req->search_origname;
58696 +               req->search_origname = NULL;
58697 +               newreq->search_state = req->search_state;
58698 +               newreq->search_flags = req->search_flags;
58699 +               newreq->search_index = req->search_index;
58700 +               newreq->search_state->refcount++;
58701 +               request_submit(newreq);
58702 +               return 0;
58703 +       }
58704 +       return 1;
58705 +}
58706 +
58707 +static void
58708 +search_request_finished(struct request *const req) {
58709 +       if (req->search_state) {
58710 +               search_state_decref(req->search_state);
58711 +               req->search_state = NULL;
58712 +       }
58713 +       if (req->search_origname) {
58714 +               free(req->search_origname);
58715 +               req->search_origname = NULL;
58716 +       }
58717 +}
58718 +
58719 +/////////////////////////////////////////////////////////////////////
58720 +// Parsing resolv.conf files
58721 +
58722 +static void
58723 +evdns_resolv_set_defaults(int flags) {
58724 +       // if the file isn't found then we assume a local resolver
58725 +       if (flags & DNS_OPTION_SEARCH) search_set_from_hostname();
58726 +       if (flags & DNS_OPTION_NAMESERVERS) evdns_nameserver_ip_add("127.0.0.1");
58727 +}
58728 +
58729 +#ifndef HAVE_STRTOK_R
58730 +static char *
58731 +strtok_r(char *s, const char *delim, char **state) {
58732 +       return strtok(s, delim);
58733 +}
58734 +#endif
58735 +
58736 +// helper version of atoi which returns -1 on error
58737 +static int
58738 +strtoint(const char *const str) {
58739 +       char *endptr;
58740 +       const int r = strtol(str, &endptr, 10);
58741 +       if (*endptr) return -1;
58742 +       return r;
58743 +}
58744 +
58745 +// helper version of atoi that returns -1 on error and clips to bounds.
58746 +static int
58747 +strtoint_clipped(const char *const str, int min, int max)
58748 +{
58749 +       int r = strtoint(str);
58750 +       if (r == -1)
58751 +               return r;
58752 +       else if (r<min)
58753 +               return min;
58754 +       else if (r>max)
58755 +               return max;
58756 +       else
58757 +               return r;
58758 +}
58759 +
58760 +// exported function
58761 +int
58762 +evdns_set_option(const char *option, const char *val, int flags)
58763 +{
58764 +       if (!strncmp(option, "ndots:", 6)) {
58765 +               const int ndots = strtoint(val);
58766 +               if (ndots == -1) return -1;
58767 +               if (!(flags & DNS_OPTION_SEARCH)) return 0;
58768 +               log(EVDNS_LOG_DEBUG, "Setting ndots to %d", ndots);
58769 +               if (!global_search_state) global_search_state = search_state_new();
58770 +               if (!global_search_state) return -1;
58771 +               global_search_state->ndots = ndots;
58772 +       } else if (!strncmp(option, "timeout:", 8)) {
58773 +               const int timeout = strtoint(val);
58774 +               if (timeout == -1) return -1;
58775 +               if (!(flags & DNS_OPTION_MISC)) return 0;
58776 +               log(EVDNS_LOG_DEBUG, "Setting timeout to %d", timeout);
58777 +               global_timeout.tv_sec = timeout;
58778 +       } else if (!strncmp(option, "max-timeouts:", 12)) {
58779 +               const int maxtimeout = strtoint_clipped(val, 1, 255);
58780 +               if (maxtimeout == -1) return -1;
58781 +               if (!(flags & DNS_OPTION_MISC)) return 0;
58782 +               log(EVDNS_LOG_DEBUG, "Setting maximum allowed timeouts to %d",
58783 +                       maxtimeout);
58784 +               global_max_nameserver_timeout = maxtimeout;
58785 +       } else if (!strncmp(option, "max-inflight:", 13)) {
58786 +               const int maxinflight = strtoint_clipped(val, 1, 65000);
58787 +               if (maxinflight == -1) return -1;
58788 +               if (!(flags & DNS_OPTION_MISC)) return 0;
58789 +               log(EVDNS_LOG_DEBUG, "Setting maximum inflight requests to %d",
58790 +                       maxinflight);
58791 +               global_max_requests_inflight = maxinflight;
58792 +       } else if (!strncmp(option, "attempts:", 9)) {
58793 +               int retries = strtoint(val);
58794 +               if (retries == -1) return -1;
58795 +               if (retries > 255) retries = 255;
58796 +               if (!(flags & DNS_OPTION_MISC)) return 0;
58797 +               log(EVDNS_LOG_DEBUG, "Setting retries to %d", retries);
58798 +               global_max_retransmits = retries;
58799 +       }
58800 +       return 0;
58801 +}
58802 +
58803 +static void
58804 +resolv_conf_parse_line(char *const start, int flags) {
58805 +       char *strtok_state;
58806 +       static const char *const delims = " \t";
58807 +#define NEXT_TOKEN strtok_r(NULL, delims, &strtok_state)
58808 +
58809 +       char *const first_token = strtok_r(start, delims, &strtok_state);
58810 +       if (!first_token) return;
58811 +
58812 +       if (!strcmp(first_token, "nameserver") && (flags & DNS_OPTION_NAMESERVERS)) {
58813 +               const char *const nameserver = NEXT_TOKEN;
58814 +               struct in_addr ina;
58815 +
58816 +               if (inet_aton(nameserver, &ina)) {
58817 +                       // address is valid
58818 +                       evdns_nameserver_add(ina.s_addr);
58819 +               }
58820 +       } else if (!strcmp(first_token, "domain") && (flags & DNS_OPTION_SEARCH)) {
58821 +               const char *const domain = NEXT_TOKEN;
58822 +               if (domain) {
58823 +                       search_postfix_clear();
58824 +                       search_postfix_add(domain);
58825 +               }
58826 +       } else if (!strcmp(first_token, "search") && (flags & DNS_OPTION_SEARCH)) {
58827 +               const char *domain;
58828 +               search_postfix_clear();
58829 +
58830 +               while ((domain = NEXT_TOKEN)) {
58831 +                       search_postfix_add(domain);
58832 +               }
58833 +               search_reverse();
58834 +       } else if (!strcmp(first_token, "options")) {
58835 +               const char *option;
58836 +               while ((option = NEXT_TOKEN)) {
58837 +                       const char *val = strchr(option, ':');
58838 +                       evdns_set_option(option, val ? val+1 : "", flags);
58839 +               }
58840 +       }
58841 +#undef NEXT_TOKEN
58842 +}
58843 +
58844 +// exported function
58845 +// returns:
58846 +//   0 no errors
58847 +//   1 failed to open file
58848 +//   2 failed to stat file
58849 +//   3 file too large
58850 +//   4 out of memory
58851 +//   5 short read from file
58852 +int
58853 +evdns_resolv_conf_parse(int flags, const char *const filename) {
58854 +       struct stat st;
58855 +       int fd, n, r;
58856 +       u8 *resolv;
58857 +       char *start;
58858 +       int err = 0;
58859 +
58860 +       log(EVDNS_LOG_DEBUG, "Parsing resolv.conf file %s", filename);
58861 +
58862 +       fd = open(filename, O_RDONLY);
58863 +       if (fd < 0) {
58864 +               evdns_resolv_set_defaults(flags);
58865 +               return 1;
58866 +       }
58867 +
58868 +       if (fstat(fd, &st)) { err = 2; goto out1; }
58869 +       if (!st.st_size) {
58870 +               evdns_resolv_set_defaults(flags);
58871 +               err = (flags & DNS_OPTION_NAMESERVERS) ? 6 : 0;
58872 +               goto out1;
58873 +       }
58874 +       if (st.st_size > 65535) { err = 3; goto out1; }  // no resolv.conf should be any bigger
58875 +
58876 +       resolv = (u8 *) malloc((size_t)st.st_size + 1);
58877 +       if (!resolv) { err = 4; goto out1; }
58878 +
58879 +       n = 0;
58880 +       while ((r = read(fd, resolv+n, (size_t)st.st_size-n)) > 0) {
58881 +               n += r;
58882 +               if (n == st.st_size)
58883 +                       break;
58884 +               assert(n < st.st_size);
58885 +       }
58886 +       if (r < 0) { err = 5; goto out2; }
58887 +       resolv[n] = 0;   // we malloced an extra byte; this should be fine.
58888 +
58889 +       start = (char *) resolv;
58890 +       for (;;) {
58891 +               char *const newline = strchr(start, '\n');
58892 +               if (!newline) {
58893 +                       resolv_conf_parse_line(start, flags);
58894 +                       break;
58895 +               } else {
58896 +                       *newline = 0;
58897 +                       resolv_conf_parse_line(start, flags);
58898 +                       start = newline + 1;
58899 +               }
58900 +       }
58901 +
58902 +       if (!server_head && (flags & DNS_OPTION_NAMESERVERS)) {
58903 +               // no nameservers were configured.
58904 +               evdns_nameserver_ip_add("127.0.0.1");
58905 +               err = 6;
58906 +       }
58907 +       if (flags & DNS_OPTION_SEARCH && (!global_search_state || global_search_state->num_domains == 0)) {
58908 +               search_set_from_hostname();
58909 +       }
58910 +
58911 +out2:
58912 +       free(resolv);
58913 +out1:
58914 +       close(fd);
58915 +       return err;
58916 +}
58917 +
58918 +#ifdef WIN32
58919 +// Add multiple nameservers from a space-or-comma-separated list.
58920 +static int
58921 +evdns_nameserver_ip_add_line(const char *ips) {
58922 +       const char *addr;
58923 +       char *buf;
58924 +       int r;
58925 +       while (*ips) {
58926 +               while (ISSPACE(*ips) || *ips == ',' || *ips == '\t')
58927 +                       ++ips;
58928 +               addr = ips;
58929 +               while (ISDIGIT(*ips) || *ips == '.' || *ips == ':')
58930 +                       ++ips;
58931 +               buf = malloc(ips-addr+1);
58932 +               if (!buf) return 4;
58933 +               memcpy(buf, addr, ips-addr);
58934 +               buf[ips-addr] = '\0';
58935 +               r = evdns_nameserver_ip_add(buf);
58936 +               free(buf);
58937 +               if (r) return r;
58938 +       }
58939 +       return 0;
58940 +}
58941 +
58942 +typedef DWORD(WINAPI *GetNetworkParams_fn_t)(FIXED_INFO *, DWORD*);
58943 +
58944 +// Use the windows GetNetworkParams interface in iphlpapi.dll to
58945 +// figure out what our nameservers are.
58946 +static int
58947 +load_nameservers_with_getnetworkparams(void)
58948 +{
58949 +       // Based on MSDN examples and inspection of  c-ares code.
58950 +       FIXED_INFO *fixed;
58951 +       HMODULE handle = 0;
58952 +       ULONG size = sizeof(FIXED_INFO);
58953 +       void *buf = NULL;
58954 +       int status = 0, r, added_any;
58955 +       IP_ADDR_STRING *ns;
58956 +       GetNetworkParams_fn_t fn;
58957 +
58958 +       if (!(handle = LoadLibrary("iphlpapi.dll"))) {
58959 +               log(EVDNS_LOG_WARN, "Could not open iphlpapi.dll");
58960 +               status = -1;
58961 +               goto done;
58962 +       }
58963 +       if (!(fn = (GetNetworkParams_fn_t) GetProcAddress(handle, "GetNetworkParams"))) {
58964 +               log(EVDNS_LOG_WARN, "Could not get address of function.");
58965 +               status = -1;
58966 +               goto done;
58967 +       }
58968 +
58969 +       buf = malloc(size);
58970 +       if (!buf) { status = 4; goto done; }
58971 +       fixed = buf;
58972 +       r = fn(fixed, &size);
58973 +       if (r != ERROR_SUCCESS && r != ERROR_BUFFER_OVERFLOW) {
58974 +               status = -1;
58975 +               goto done;
58976 +       }
58977 +       if (r != ERROR_SUCCESS) {
58978 +               free(buf);
58979 +               buf = malloc(size);
58980 +               if (!buf) { status = 4; goto done; }
58981 +               fixed = buf;
58982 +               r = fn(fixed, &size);
58983 +               if (r != ERROR_SUCCESS) {
58984 +                       log(EVDNS_LOG_DEBUG, "fn() failed.");
58985 +                       status = -1;
58986 +                       goto done;
58987 +               }
58988 +       }
58989 +
58990 +       assert(fixed);
58991 +       added_any = 0;
58992 +       ns = &(fixed->DnsServerList);
58993 +       while (ns) {
58994 +               r = evdns_nameserver_ip_add_line(ns->IpAddress.String);
58995 +               if (r) {
58996 +                       log(EVDNS_LOG_DEBUG,"Could not add nameserver %s to list,error: %d",
58997 +                               (ns->IpAddress.String),(int)GetLastError());
58998 +                       status = r;
58999 +                       goto done;
59000 +               } else {
59001 +                       log(EVDNS_LOG_DEBUG,"Succesfully added %s as nameserver",ns->IpAddress.String);
59002 +               }
59003 +
59004 +               added_any++;
59005 +               ns = ns->Next;
59006 +       }
59007 +
59008 +       if (!added_any) {
59009 +               log(EVDNS_LOG_DEBUG, "No nameservers added.");
59010 +               status = -1;
59011 +       }
59012 +
59013 + done:
59014 +       if (buf)
59015 +               free(buf);
59016 +       if (handle)
59017 +               FreeLibrary(handle);
59018 +       return status;
59019 +}
59020 +
59021 +static int
59022 +config_nameserver_from_reg_key(HKEY key, const char *subkey)
59023 +{
59024 +       char *buf;
59025 +       DWORD bufsz = 0, type = 0;
59026 +       int status = 0;
59027 +
59028 +       if (RegQueryValueEx(key, subkey, 0, &type, NULL, &bufsz)
59029 +           != ERROR_MORE_DATA)
59030 +               return -1;
59031 +       if (!(buf = malloc(bufsz)))
59032 +               return -1;
59033 +
59034 +       if (RegQueryValueEx(key, subkey, 0, &type, (LPBYTE)buf, &bufsz)
59035 +           == ERROR_SUCCESS && bufsz > 1) {
59036 +               status = evdns_nameserver_ip_add_line(buf);
59037 +       }
59038 +
59039 +       free(buf);
59040 +       return status;
59041 +}
59042 +
59043 +#define SERVICES_KEY "System\\CurrentControlSet\\Services\\"
59044 +#define WIN_NS_9X_KEY  SERVICES_KEY "VxD\\MSTCP"
59045 +#define WIN_NS_NT_KEY  SERVICES_KEY "Tcpip\\Parameters"
59046 +
59047 +static int
59048 +load_nameservers_from_registry(void)
59049 +{
59050 +       int found = 0;
59051 +       int r;
59052 +#define TRY(k, name) \
59053 +       if (!found && config_nameserver_from_reg_key(k,name) == 0) {    \
59054 +               log(EVDNS_LOG_DEBUG,"Found nameservers in %s/%s",#k,name); \
59055 +               found = 1;                                              \
59056 +       } else if (!found) {                                            \
59057 +               log(EVDNS_LOG_DEBUG,"Didn't find nameservers in %s/%s", \
59058 +                   #k,#name);                                          \
59059 +       }
59060 +
59061 +       if (((int)GetVersion()) > 0) { /* NT */
59062 +               HKEY nt_key = 0, interfaces_key = 0;
59063 +
59064 +               if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0,
59065 +                                KEY_READ, &nt_key) != ERROR_SUCCESS) {
59066 +                       log(EVDNS_LOG_DEBUG,"Couldn't open nt key, %d",(int)GetLastError());
59067 +                       return -1;
59068 +               }
59069 +               r = RegOpenKeyEx(nt_key, "Interfaces", 0,
59070 +                            KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS,
59071 +                            &interfaces_key);
59072 +               if (r != ERROR_SUCCESS) {
59073 +                       log(EVDNS_LOG_DEBUG,"Couldn't open interfaces key, %d",(int)GetLastError());
59074 +                       return -1;
59075 +               }
59076 +               TRY(nt_key, "NameServer");
59077 +               TRY(nt_key, "DhcpNameServer");
59078 +               TRY(interfaces_key, "NameServer");
59079 +               TRY(interfaces_key, "DhcpNameServer");
59080 +               RegCloseKey(interfaces_key);
59081 +               RegCloseKey(nt_key);
59082 +       } else {
59083 +               HKEY win_key = 0;
59084 +               if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_9X_KEY, 0,
59085 +                                KEY_READ, &win_key) != ERROR_SUCCESS) {
59086 +                       log(EVDNS_LOG_DEBUG, "Couldn't open registry key, %d", (int)GetLastError());
59087 +                       return -1;
59088 +               }
59089 +               TRY(win_key, "NameServer");
59090 +               RegCloseKey(win_key);
59091 +       }
59092 +
59093 +       if (found == 0) {
59094 +               log(EVDNS_LOG_WARN,"Didn't find any nameservers.");
59095 +       }
59096 +
59097 +       return found ? 0 : -1;
59098 +#undef TRY
59099 +}
59100 +
59101 +int
59102 +evdns_config_windows_nameservers(void)
59103 +{
59104 +       if (load_nameservers_with_getnetworkparams() == 0)
59105 +               return 0;
59106 +       return load_nameservers_from_registry();
59107 +}
59108 +#endif
59109 +
59110 +int
59111 +evdns_init(void)
59112 +{
59113 +       int res = 0;
59114 +#ifdef WIN32
59115 +       evdns_config_windows_nameservers();
59116 +#else
59117 +       res = evdns_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf");
59118 +#endif
59119 +
59120 +       return (res);
59121 +}
59122 +
59123 +const char *
59124 +evdns_err_to_string(int err)
59125 +{
59126 +    switch (err) {
59127 +       case DNS_ERR_NONE: return "no error";
59128 +       case DNS_ERR_FORMAT: return "misformatted query";
59129 +       case DNS_ERR_SERVERFAILED: return "server failed";
59130 +       case DNS_ERR_NOTEXIST: return "name does not exist";
59131 +       case DNS_ERR_NOTIMPL: return "query not implemented";
59132 +       case DNS_ERR_REFUSED: return "refused";
59133 +
59134 +       case DNS_ERR_TRUNCATED: return "reply truncated or ill-formed";
59135 +       case DNS_ERR_UNKNOWN: return "unknown";
59136 +       case DNS_ERR_TIMEOUT: return "request timed out";
59137 +       case DNS_ERR_SHUTDOWN: return "dns subsystem shut down";
59138 +       default: return "[Unknown error code]";
59139 +    }
59140 +}
59141 +
59142 +void
59143 +evdns_shutdown(int fail_requests)
59144 +{
59145 +       struct nameserver *server, *server_next;
59146 +       struct search_domain *dom, *dom_next;
59147 +
59148 +       while (req_head) {
59149 +               if (fail_requests)
59150 +                       reply_callback(req_head, 0, DNS_ERR_SHUTDOWN, NULL);
59151 +               request_finished(req_head, &req_head);
59152 +       }
59153 +       while (req_waiting_head) {
59154 +               if (fail_requests)
59155 +                       reply_callback(req_waiting_head, 0, DNS_ERR_SHUTDOWN, NULL);
59156 +               request_finished(req_waiting_head, &req_waiting_head);
59157 +       }
59158 +       global_requests_inflight = global_requests_waiting = 0;
59159 +
59160 +       for (server = server_head; server; server = server_next) {
59161 +               server_next = server->next;
59162 +               if (server->socket >= 0)
59163 +                       CLOSE_SOCKET(server->socket);
59164 +               (void) event_del(&server->event);
59165 +               if (server->state == 0)
59166 +                        (void) event_del(&server->timeout_event);
59167 +               free(server);
59168 +               if (server_next == server_head)
59169 +                       break;
59170 +       }
59171 +       server_head = NULL;
59172 +       global_good_nameservers = 0;
59173 +
59174 +       if (global_search_state) {
59175 +               for (dom = global_search_state->head; dom; dom = dom_next) {
59176 +                       dom_next = dom->next;
59177 +                       free(dom);
59178 +               }
59179 +               free(global_search_state);
59180 +               global_search_state = NULL;
59181 +       }
59182 +       evdns_log_fn = NULL;
59183 +}
59184 +
59185 +#ifdef EVDNS_MAIN
59186 +void
59187 +main_callback(int result, char type, int count, int ttl,
59188 +                         void *addrs, void *orig) {
59189 +       char *n = (char*)orig;
59190 +       int i;
59191 +       for (i = 0; i < count; ++i) {
59192 +               if (type == DNS_IPv4_A) {
59193 +                       printf("%s: %s\n", n, debug_ntoa(((u32*)addrs)[i]));
59194 +               } else if (type == DNS_PTR) {
59195 +                       printf("%s: %s\n", n, ((char**)addrs)[i]);
59196 +               }
59197 +       }
59198 +       if (!count) {
59199 +               printf("%s: No answer (%d)\n", n, result);
59200 +       }
59201 +       fflush(stdout);
59202 +}
59203 +void
59204 +evdns_server_callback(struct evdns_server_request *req, void *data)
59205 +{
59206 +       int i, r;
59207 +       (void)data;
59208 +       /* dummy; give 192.168.11.11 as an answer for all A questions,
59209 +        *      give foo.bar.example.com as an answer for all PTR questions. */
59210 +       for (i = 0; i < req->nquestions; ++i) {
59211 +               u32 ans = htonl(0xc0a80b0bUL);
59212 +               if (req->questions[i]->type == EVDNS_TYPE_A &&
59213 +                       req->questions[i]->class == EVDNS_CLASS_INET) {
59214 +                       printf(" -- replying for %s (A)\n", req->questions[i]->name);
59215 +                       r = evdns_server_request_add_a_reply(req, req->questions[i]->name,
59216 +                                                                                 1, &ans, 10);
59217 +                       if (r<0)
59218 +                               printf("eeep, didn't work.\n");
59219 +               } else if (req->questions[i]->type == EVDNS_TYPE_PTR &&
59220 +                                  req->questions[i]->class == EVDNS_CLASS_INET) {
59221 +                       printf(" -- replying for %s (PTR)\n", req->questions[i]->name);
59222 +                       r = evdns_server_request_add_ptr_reply(req, NULL, req->questions[i]->name,
59223 +                                                                                       "foo.bar.example.com", 10);
59224 +               } else {
59225 +                       printf(" -- skipping %s [%d %d]\n", req->questions[i]->name,
59226 +                                  req->questions[i]->type, req->questions[i]->class);
59227 +               }
59228 +       }
59229 +
59230 +       r = evdns_request_respond(req, 0);
59231 +       if (r<0)
59232 +               printf("eeek, couldn't send reply.\n");
59233 +}
59234 +
59235 +void
59236 +logfn(int is_warn, const char *msg) {
59237 +  (void) is_warn;
59238 +  fprintf(stderr, "%s\n", msg);
59239 +}
59240 +int
59241 +main(int c, char **v) {
59242 +       int idx;
59243 +       int reverse = 0, verbose = 1, servertest = 0;
59244 +       if (c<2) {
59245 +               fprintf(stderr, "syntax: %s [-x] [-v] hostname\n", v[0]);
59246 +               fprintf(stderr, "syntax: %s [-servertest]\n", v[0]);
59247 +               return 1;
59248 +       }
59249 +       idx = 1;
59250 +       while (idx < c && v[idx][0] == '-') {
59251 +               if (!strcmp(v[idx], "-x"))
59252 +                       reverse = 1;
59253 +               else if (!strcmp(v[idx], "-v"))
59254 +                       verbose = 1;
59255 +               else if (!strcmp(v[idx], "-servertest"))
59256 +                       servertest = 1;
59257 +               else
59258 +                       fprintf(stderr, "Unknown option %s\n", v[idx]);
59259 +               ++idx;
59260 +       }
59261 +       event_init();
59262 +       if (verbose)
59263 +               evdns_set_log_fn(logfn);
59264 +       evdns_resolv_conf_parse(DNS_OPTION_NAMESERVERS, "/etc/resolv.conf");
59265 +       if (servertest) {
59266 +               int sock;
59267 +               struct sockaddr_in my_addr;
59268 +               sock = socket(PF_INET, SOCK_DGRAM, 0);
59269 +               fcntl(sock, F_SETFL, O_NONBLOCK);
59270 +               my_addr.sin_family = AF_INET;
59271 +               my_addr.sin_port = htons(10053);
59272 +               my_addr.sin_addr.s_addr = INADDR_ANY;
59273 +               if (bind(sock, (struct sockaddr*)&my_addr, sizeof(my_addr))<0) {
59274 +                       perror("bind");
59275 +                       exit(1);
59276 +               }
59277 +               evdns_add_server_port(sock, 0, evdns_server_callback, NULL);
59278 +       }
59279 +       for (; idx < c; ++idx) {
59280 +               if (reverse) {
59281 +                       struct in_addr addr;
59282 +                       if (!inet_aton(v[idx], &addr)) {
59283 +                               fprintf(stderr, "Skipping non-IP %s\n", v[idx]);
59284 +                               continue;
59285 +                       }
59286 +                       fprintf(stderr, "resolving %s...\n",v[idx]);
59287 +                       evdns_resolve_reverse(&addr, 0, main_callback, v[idx]);
59288 +               } else {
59289 +                       fprintf(stderr, "resolving (fwd) %s...\n",v[idx]);
59290 +                       evdns_resolve_ipv4(v[idx], 0, main_callback, v[idx]);
59291 +               }
59292 +       }
59293 +       fflush(stdout);
59294 +       event_dispatch();
59295 +       return 0;
59296 +}
59297 +#endif
59298 diff -Nru php-5.2.4.vanilla/libevent/evdns.h php-5.2.4.fpm/libevent/evdns.h
59299 --- php-5.2.4.vanilla/libevent/evdns.h  1970-01-01 03:00:00.000000000 +0300
59300 +++ php-5.2.4.fpm/libevent/evdns.h      2007-08-31 15:47:19.000000000 +0400
59301 @@ -0,0 +1,367 @@
59302 +/*
59303 + * Copyright (c) 2006 Niels Provos <provos@citi.umich.edu>
59304 + * All rights reserved.
59305 + *
59306 + * Redistribution and use in source and binary forms, with or without
59307 + * modification, are permitted provided that the following conditions
59308 + * are met:
59309 + * 1. Redistributions of source code must retain the above copyright
59310 + *    notice, this list of conditions and the following disclaimer.
59311 + * 2. Redistributions in binary form must reproduce the above copyright
59312 + *    notice, this list of conditions and the following disclaimer in the
59313 + *    documentation and/or other materials provided with the distribution.
59314 + * 3. The name of the author may not be used to endorse or promote products
59315 + *    derived from this software without specific prior written permission.
59316 + *
59317 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
59318 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
59319 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
59320 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
59321 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
59322 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
59323 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
59324 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
59325 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
59326 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
59327 + */
59328 +
59329 +/*
59330 + * The original DNS code is due to Adam Langley with heavy
59331 + * modifications by Nick Mathewson.  Adam put his DNS software in the
59332 + * public domain.  You can find his original copyright below.  Please,
59333 + * aware that the code as part of libevent is governed by the 3-clause
59334 + * BSD license above.
59335 + *
59336 + * This software is Public Domain. To view a copy of the public domain dedication,
59337 + * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
59338 + * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
59339 + *
59340 + * I ask and expect, but do not require, that all derivative works contain an
59341 + * attribution similar to:
59342 + *     Parts developed by Adam Langley <agl@imperialviolet.org>
59343 + *
59344 + * You may wish to replace the word "Parts" with something else depending on
59345 + * the amount of original code.
59346 + *
59347 + * (Derivative works does not include programs which link against, run or include
59348 + * the source verbatim in their source distributions)
59349 + */
59350 +
59351 +/*
59352 + * Welcome, gentle reader
59353 + *
59354 + * Async DNS lookups are really a whole lot harder than they should be,
59355 + * mostly stemming from the fact that the libc resolver has never been
59356 + * very good at them. Before you use this library you should see if libc
59357 + * can do the job for you with the modern async call getaddrinfo_a
59358 + * (see http://www.imperialviolet.org/page25.html#e498). Otherwise,
59359 + * please continue.
59360 + *
59361 + * This code is based on libevent and you must call event_init before
59362 + * any of the APIs in this file. You must also seed the OpenSSL random
59363 + * source if you are using OpenSSL for ids (see below).
59364 + *
59365 + * This library is designed to be included and shipped with your source
59366 + * code. You statically link with it. You should also test for the
59367 + * existence of strtok_r and define HAVE_STRTOK_R if you have it.
59368 + *
59369 + * The DNS protocol requires a good source of id numbers and these
59370 + * numbers should be unpredictable for spoofing reasons. There are
59371 + * three methods for generating them here and you must define exactly
59372 + * one of them. In increasing order of preference:
59373 + *
59374 + * DNS_USE_GETTIMEOFDAY_FOR_ID:
59375 + *   Using the bottom 16 bits of the usec result from gettimeofday. This
59376 + *   is a pretty poor solution but should work anywhere.
59377 + * DNS_USE_CPU_CLOCK_FOR_ID:
59378 + *   Using the bottom 16 bits of the nsec result from the CPU's time
59379 + *   counter. This is better, but may not work everywhere. Requires
59380 + *   POSIX realtime support and you'll need to link against -lrt on
59381 + *   glibc systems at least.
59382 + * DNS_USE_OPENSSL_FOR_ID:
59383 + *   Uses the OpenSSL RAND_bytes call to generate the data. You must
59384 + *   have seeded the pool before making any calls to this library.
59385 + *
59386 + * The library keeps track of the state of nameservers and will avoid
59387 + * them when they go down. Otherwise it will round robin between them.
59388 + *
59389 + * Quick start guide:
59390 + *   #include "evdns.h"
59391 + *   void callback(int result, char type, int count, int ttl,
59392 + *              void *addresses, void *arg);
59393 + *   evdns_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf");
59394 + *   evdns_resolve("www.hostname.com", 0, callback, NULL);
59395 + *
59396 + * When the lookup is complete the callback function is called. The
59397 + * first argument will be one of the DNS_ERR_* defines in evdns.h.
59398 + * Hopefully it will be DNS_ERR_NONE, in which case type will be
59399 + * DNS_IPv4_A, count will be the number of IP addresses, ttl is the time
59400 + * which the data can be cached for (in seconds), addresses will point
59401 + * to an array of uint32_t's and arg will be whatever you passed to
59402 + * evdns_resolve.
59403 + *
59404 + * Searching:
59405 + *
59406 + * In order for this library to be a good replacement for glibc's resolver it
59407 + * supports searching. This involves setting a list of default domains, in
59408 + * which names will be queried for. The number of dots in the query name
59409 + * determines the order in which this list is used.
59410 + *
59411 + * Searching appears to be a single lookup from the point of view of the API,
59412 + * although many DNS queries may be generated from a single call to
59413 + * evdns_resolve. Searching can also drastically slow down the resolution
59414 + * of names.
59415 + *
59416 + * To disable searching:
59417 + *   1. Never set it up. If you never call evdns_resolv_conf_parse or
59418 + *   evdns_search_add then no searching will occur.
59419 + *
59420 + *   2. If you do call evdns_resolv_conf_parse then don't pass
59421 + *   DNS_OPTION_SEARCH (or DNS_OPTIONS_ALL, which implies it).
59422 + *
59423 + *   3. When calling evdns_resolve, pass the DNS_QUERY_NO_SEARCH flag.
59424 + *
59425 + * The order of searches depends on the number of dots in the name. If the
59426 + * number is greater than the ndots setting then the names is first tried
59427 + * globally. Otherwise each search domain is appended in turn.
59428 + *
59429 + * The ndots setting can either be set from a resolv.conf, or by calling
59430 + * evdns_search_ndots_set.
59431 + *
59432 + * For example, with ndots set to 1 (the default) and a search domain list of
59433 + * ["myhome.net"]:
59434 + *  Query: www
59435 + *  Order: www.myhome.net, www.
59436 + *
59437 + *  Query: www.abc
59438 + *  Order: www.abc., www.abc.myhome.net
59439 + *
59440 + * API reference:
59441 + *
59442 + * int evdns_nameserver_add(unsigned long int address)
59443 + *   Add a nameserver. The address should be an IP address in
59444 + *   network byte order. The type of address is chosen so that
59445 + *   it matches in_addr.s_addr.
59446 + *   Returns non-zero on error.
59447 + *
59448 + * int evdns_nameserver_ip_add(const char *ip_as_string)
59449 + *   This wraps the above function by parsing a string as an IP
59450 + *   address and adds it as a nameserver.
59451 + *   Returns non-zero on error
59452 + *
59453 + * int evdns_resolve(const char *name, int flags,
59454 + *                   evdns_callback_type callback,
59455 + *                   void *ptr)
59456 + *   Resolve a name. The name parameter should be a DNS name.
59457 + *   The flags parameter should be 0, or DNS_QUERY_NO_SEARCH
59458 + *   which disables searching for this query. (see defn of
59459 + *   searching above).
59460 + *
59461 + *   The callback argument is a function which is called when
59462 + *   this query completes and ptr is an argument which is passed
59463 + *   to that callback function.
59464 + *
59465 + *   Returns non-zero on error
59466 + *
59467 + * void evdns_search_clear()
59468 + *   Clears the list of search domains
59469 + *
59470 + * void evdns_search_add(const char *domain)
59471 + *   Add a domain to the list of search domains
59472 + *
59473 + * void evdns_search_ndots_set(int ndots)
59474 + *   Set the number of dots which, when found in a name, causes
59475 + *   the first query to be without any search domain.
59476 + *
59477 + * int evdns_count_nameservers(void)
59478 + *   Return the number of configured nameservers (not necessarily the
59479 + *   number of running nameservers).  This is useful for double-checking
59480 + *   whether our calls to the various nameserver configuration functions
59481 + *   have been successful.
59482 + *
59483 + * int evdns_clear_nameservers_and_suspend(void)
59484 + *   Remove all currently configured nameservers, and suspend all pending
59485 + *   resolves.  Resolves will not necessarily be re-attempted until
59486 + *   evdns_resume() is called.
59487 + *
59488 + * int evdns_resume(void)
59489 + *   Re-attempt resolves left in limbo after an earlier call to
59490 + *   evdns_clear_nameservers_and_suspend().
59491 + *
59492 + * int evdns_config_windows_nameservers(void)
59493 + *   Attempt to configure a set of nameservers based on platform settings on
59494 + *   a win32 host.  Preferentially tries to use GetNetworkParams; if that fails,
59495 + *   looks in the registry.  Returns 0 on success, nonzero on failure.
59496 + *
59497 + * int evdns_resolv_conf_parse(int flags, const char *filename)
59498 + *   Parse a resolv.conf like file from the given filename.
59499 + *
59500 + *   See the man page for resolv.conf for the format of this file.
59501 + *   The flags argument determines what information is parsed from
59502 + *   this file:
59503 + *     DNS_OPTION_SEARCH - domain, search and ndots options
59504 + *     DNS_OPTION_NAMESERVERS - nameserver lines
59505 + *     DNS_OPTION_MISC - timeout and attempts options
59506 + *     DNS_OPTIONS_ALL - all of the above
59507 + *   The following directives are not parsed from the file:
59508 + *     sortlist, rotate, no-check-names, inet6, debug
59509 + *
59510 + *   Returns non-zero on error:
59511 + *    0 no errors
59512 + *    1 failed to open file
59513 + *    2 failed to stat file
59514 + *    3 file too large
59515 + *    4 out of memory
59516 + *    5 short read from file
59517 + *    6 no nameservers in file
59518 + *
59519 + * Internals:
59520 + *
59521 + * Requests are kept in two queues. The first is the inflight queue. In
59522 + * this queue requests have an allocated transaction id and nameserver.
59523 + * They will soon be transmitted if they haven't already been.
59524 + *
59525 + * The second is the waiting queue. The size of the inflight ring is
59526 + * limited and all other requests wait in waiting queue for space. This
59527 + * bounds the number of concurrent requests so that we don't flood the
59528 + * nameserver. Several algorithms require a full walk of the inflight
59529 + * queue and so bounding its size keeps thing going nicely under huge
59530 + * (many thousands of requests) loads.
59531 + *
59532 + * If a nameserver loses too many requests it is considered down and we
59533 + * try not to use it. After a while we send a probe to that nameserver
59534 + * (a lookup for google.com) and, if it replies, we consider it working
59535 + * again. If the nameserver fails a probe we wait longer to try again
59536 + * with the next probe.
59537 + */
59538 +
59539 +#ifndef EVENTDNS_H
59540 +#define EVENTDNS_H
59541 +
59542 +#ifdef __cplusplus
59543 +extern "C" {
59544 +#endif
59545 +
59546 +/* Error codes 0-5 are as described in RFC 1035. */
59547 +#define DNS_ERR_NONE 0
59548 +/* The name server was unable to interpret the query */
59549 +#define DNS_ERR_FORMAT 1
59550 +/* The name server was unable to process this query due to a problem with the
59551 + * name server */
59552 +#define DNS_ERR_SERVERFAILED 2
59553 +/* The domain name does not exist */
59554 +#define DNS_ERR_NOTEXIST 3
59555 +/* The name server does not support the requested kind of query */
59556 +#define DNS_ERR_NOTIMPL 4
59557 +/* The name server refuses to reform the specified operation for policy
59558 + * reasons */
59559 +#define DNS_ERR_REFUSED 5
59560 +/* The reply was truncated or ill-formated */
59561 +#define DNS_ERR_TRUNCATED 65
59562 +/* An unknown error occurred */
59563 +#define DNS_ERR_UNKNOWN 66
59564 +/* Communication with the server timed out */
59565 +#define DNS_ERR_TIMEOUT 67
59566 +/* The request was canceled because the DNS subsystem was shut down. */
59567 +#define DNS_ERR_SHUTDOWN 68
59568 +
59569 +#define DNS_IPv4_A 1
59570 +#define DNS_PTR 2
59571 +#define DNS_IPv6_AAAA 3
59572 +
59573 +#define DNS_QUERY_NO_SEARCH 1
59574 +
59575 +#define DNS_OPTION_SEARCH 1
59576 +#define DNS_OPTION_NAMESERVERS 2
59577 +#define DNS_OPTION_MISC 4
59578 +#define DNS_OPTIONS_ALL 7
59579 +
59580 +/* 
59581 + * The callback that contains the results from a lookup.
59582 + * - type is either DNS_IPv4_A or DNS_PTR or DNS_IPv6_AAAA
59583 + * - count contains the number of addresses of form type
59584 + * - ttl is the number of seconds the resolution may be cached for.
59585 + * - addresses needs to be cast according to type
59586 + */
59587 +typedef void (*evdns_callback_type) (int result, char type, int count, int ttl, void *addresses, void *arg);
59588 +
59589 +int evdns_init(void);
59590 +void evdns_shutdown(int fail_requests);
59591 +const char *evdns_err_to_string(int err);
59592 +int evdns_nameserver_add(unsigned long int address);
59593 +int evdns_count_nameservers(void);
59594 +int evdns_clear_nameservers_and_suspend(void);
59595 +int evdns_resume(void);
59596 +int evdns_nameserver_ip_add(const char *ip_as_string);
59597 +int evdns_resolve_ipv4(const char *name, int flags, evdns_callback_type callback, void *ptr);
59598 +int evdns_resolve_ipv6(const char *name, int flags, evdns_callback_type callback, void *ptr);
59599 +struct in_addr;
59600 +struct in6_addr;
59601 +int evdns_resolve_reverse(struct in_addr *in, int flags, evdns_callback_type callback, void *ptr);
59602 +int evdns_resolve_reverse_ipv6(struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr);
59603 +int evdns_set_option(const char *option, const char *val, int flags);
59604 +int evdns_resolv_conf_parse(int flags, const char *);
59605 +#ifdef MS_WINDOWS
59606 +int evdns_config_windows_nameservers(void);
59607 +#endif
59608 +void evdns_search_clear(void);
59609 +void evdns_search_add(const char *domain);
59610 +void evdns_search_ndots_set(const int ndots);
59611 +
59612 +typedef void (*evdns_debug_log_fn_type)(int is_warning, const char *msg);
59613 +void evdns_set_log_fn(evdns_debug_log_fn_type fn);
59614 +
59615 +#define DNS_NO_SEARCH 1
59616 +
59617 +#ifdef __cplusplus
59618 +}
59619 +#endif
59620 +
59621 +/*
59622 + * Structures and functions used to implement a DNS server.
59623 + */
59624 +
59625 +struct evdns_server_request {
59626 +       int flags;
59627 +       int nquestions;
59628 +       struct evdns_server_question **questions;
59629 +};
59630 +struct evdns_server_question {
59631 +       int type;
59632 +       int class;
59633 +       char name[1];
59634 +};
59635 +typedef void (*evdns_request_callback_fn_type)(struct evdns_server_request *, void *);
59636 +#define EVDNS_ANSWER_SECTION 0
59637 +#define EVDNS_AUTHORITY_SECTION 1
59638 +#define EVDNS_ADDITIONAL_SECTION 2
59639 +
59640 +#define EVDNS_TYPE_A      1
59641 +#define EVDNS_TYPE_NS     2
59642 +#define EVDNS_TYPE_CNAME   5
59643 +#define EVDNS_TYPE_SOA    6
59644 +#define EVDNS_TYPE_PTR   12
59645 +#define EVDNS_TYPE_MX    15
59646 +#define EVDNS_TYPE_TXT   16
59647 +#define EVDNS_TYPE_AAAA          28
59648 +
59649 +#define EVDNS_QTYPE_AXFR 252
59650 +#define EVDNS_QTYPE_ALL         255
59651 +
59652 +#define EVDNS_CLASS_INET   1
59653 +
59654 +struct evdns_server_port *evdns_add_server_port(int socket, int is_tcp, evdns_request_callback_fn_type callback, void *user_data);
59655 +void evdns_close_server_port(struct evdns_server_port *port);
59656 +
59657 +int evdns_server_request_add_reply(struct evdns_server_request *req, int section, const char *name, int type, int class, int ttl, int datalen, int is_name, const char *data);
59658 +int evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl);
59659 +int evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl);
59660 +int evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char *inaddr_name, const char *hostname, int ttl);
59661 +int evdns_server_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char *cname, int ttl);
59662 +
59663 +int evdns_server_request_respond(struct evdns_server_request *req, int err);
59664 +int evdns_server_request_drop(struct evdns_server_request *req);
59665 +struct sockaddr;
59666 +int evdns_server_request_get_requesting_addr(struct evdns_server_request *_req, struct sockaddr *sa, int addr_len);
59667 +
59668 +#endif  // !EVENTDNS_H
59669 diff -Nru php-5.2.4.vanilla/libevent/event.3 php-5.2.4.fpm/libevent/event.3
59670 --- php-5.2.4.vanilla/libevent/event.3  1970-01-01 03:00:00.000000000 +0300
59671 +++ php-5.2.4.fpm/libevent/event.3      2007-08-31 15:47:19.000000000 +0400
59672 @@ -0,0 +1,592 @@
59673 +.\"    $OpenBSD: event.3,v 1.4 2002/07/12 18:50:48 provos Exp $
59674 +.\"
59675 +.\" Copyright (c) 2000 Artur Grabowski <art@openbsd.org>
59676 +.\" All rights reserved.
59677 +.\"
59678 +.\" Redistribution and use in source and binary forms, with or without
59679 +.\" modification, are permitted provided that the following conditions
59680 +.\" are met:
59681 +.\"
59682 +.\" 1. Redistributions of source code must retain the above copyright
59683 +.\"    notice, this list of conditions and the following disclaimer.
59684 +.\" 2. Redistributions in binary form must reproduce the above copyright
59685 +.\"    notice, this list of conditions and the following disclaimer in the
59686 +.\"    documentation and/or other materials provided with the distribution.
59687 +.\" 3. The name of the author may not be used to endorse or promote products
59688 +.\"    derived from this software without specific prior written permission.
59689 +.\"
59690 +.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
59691 +.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
59692 +.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
59693 +.\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
59694 +.\" EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLUDING, BUT NOT LIMITED TO,
59695 +.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
59696 +.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
59697 +.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
59698 +.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
59699 +.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
59700 +.\"
59701 +.Dd August 8, 2000
59702 +.Dt EVENT 3
59703 +.Os
59704 +.Sh NAME
59705 +.Nm event_init ,
59706 +.Nm event_dispatch ,
59707 +.Nm event_loop ,
59708 +.Nm event_loopexit ,
59709 +.Nm event_set ,
59710 +.Nm event_base_dispatch ,
59711 +.Nm event_base_loop ,
59712 +.Nm event_base_loopexit ,
59713 +.Nm event_base_set ,
59714 +.Nm event_base_free ,
59715 +.Nm event_add ,
59716 +.Nm event_del ,
59717 +.Nm event_once ,
59718 +.Nm event_base_once ,
59719 +.Nm event_pending ,
59720 +.Nm event_initialized ,
59721 +.Nm event_priority_init ,
59722 +.Nm event_priority_set ,
59723 +.Nm evtimer_set ,
59724 +.Nm evtimer_add ,
59725 +.Nm evtimer_del ,
59726 +.Nm evtimer_pending ,
59727 +.Nm evtimer_initialized ,
59728 +.Nm signal_set ,
59729 +.Nm signal_add ,
59730 +.Nm signal_del ,
59731 +.Nm signal_pending ,
59732 +.Nm signal_initialized ,
59733 +.Nm bufferevent_new ,
59734 +.Nm bufferevent_free ,
59735 +.Nm bufferevent_write ,
59736 +.Nm bufferevent_write_buffer ,
59737 +.Nm bufferevent_read ,
59738 +.Nm bufferevent_enable ,
59739 +.Nm bufferevent_disable ,
59740 +.Nm bufferevent_settimeout ,
59741 +.Nm bufferevent_base_set ,
59742 +.Nm evbuffer_new ,
59743 +.Nm evbuffer_free ,
59744 +.Nm evbuffer_add ,
59745 +.Nm evbuffer_add_buffer ,
59746 +.Nm evbuffer_add_printf ,
59747 +.Nm evbuffer_add_vprintf ,
59748 +.Nm evbuffer_drain ,
59749 +.Nm evbuffer_write ,
59750 +.Nm evbuffer_read ,
59751 +.Nm evbuffer_find ,
59752 +.Nm evbuffer_readline ,
59753 +.Nm evhttp_start ,
59754 +.Nm evhttp_free
59755 +.Nd execute a function when a specific event occurs
59756 +.Sh SYNOPSIS
59757 +.Fd #include <sys/time.h>
59758 +.Fd #include <event.h>
59759 +.Ft "struct event_base *"
59760 +.Fn "event_init" "void"
59761 +.Ft int
59762 +.Fn "event_dispatch" "void"
59763 +.Ft int
59764 +.Fn "event_loop" "int flags"
59765 +.Ft int
59766 +.Fn "event_loopexit" "struct timeval *tv"
59767 +.Ft void
59768 +.Fn "event_set" "struct event *ev" "int fd" "short event" "void (*fn)(int, short, void *)" "void *arg"
59769 +.Ft int
59770 +.Fn "event_base_dispatch" "struct event_base *base"
59771 +.Ft int
59772 +.Fn "event_base_loop" "struct event_base *base" "int flags"
59773 +.Ft int
59774 +.Fn "event_base_loopexit" "struct event_base *base" "struct timeval *tv"
59775 +.Ft int
59776 +.Fn "event_base_set" "struct event_base *base" "struct event *"
59777 +.Ft void
59778 +.Fn "event_base_free" "struct event_base *base"
59779 +.Ft int
59780 +.Fn "event_add" "struct event *ev" "struct timeval *tv"
59781 +.Ft int
59782 +.Fn "event_del" "struct event *ev"
59783 +.Ft int
59784 +.Fn "event_once" "int fd" "short event" "void (*fn)(int, short, void *)" "void *arg" "struct timeval *tv"
59785 +.Ft int
59786 +.Fn "event_base_once" "struct event_base *base" "int fd" "short event" "void (*fn)(int, short, void *)" "void *arg" "struct timeval *tv"
59787 +.Ft int
59788 +.Fn "event_pending" "struct event *ev" "short event" "struct timeval *tv"
59789 +.Ft int
59790 +.Fn "event_initialized" "struct event *ev"
59791 +.Ft int
59792 +.Fn "event_priority_init" "int npriorities"
59793 +.Ft int
59794 +.Fn "event_priority_set" "struct event *ev" "int priority"
59795 +.Ft void
59796 +.Fn "evtimer_set" "struct event *ev" "void (*fn)(int, short, void *)" "void *arg"
59797 +.Ft void
59798 +.Fn "evtimer_add" "struct event *ev" "struct timeval *"
59799 +.Ft void
59800 +.Fn "evtimer_del" "struct event *ev"
59801 +.Ft int
59802 +.Fn "evtimer_pending" "struct event *ev" "struct timeval *tv"
59803 +.Ft int
59804 +.Fn "evtimer_initialized" "struct event *ev"
59805 +.Ft void
59806 +.Fn "signal_set" "struct event *ev" "int signal" "void (*fn)(int, short, void *)" "void *arg"
59807 +.Ft void
59808 +.Fn "signal_add" "struct event *ev" "struct timeval *"
59809 +.Ft void
59810 +.Fn "signal_del" "struct event *ev"
59811 +.Ft int
59812 +.Fn "signal_pending" "struct event *ev" "struct timeval *tv"
59813 +.Ft int
59814 +.Fn "signal_initialized" "struct event *ev"
59815 +.Ft "struct bufferevent *"
59816 +.Fn "bufferevent_new" "int fd" "evbuffercb readcb" "evbuffercb writecb" "everrorcb" "void *cbarg"
59817 +.Ft void
59818 +.Fn "bufferevent_free" "struct bufferevent *bufev"
59819 +.Ft int
59820 +.Fn "bufferevent_write" "struct bufferevent *bufev" "void *data" "size_t size"
59821 +.Ft int
59822 +.Fn "bufferevent_write_buffer" "struct bufferevent *bufev" "struct evbuffer *buf"
59823 +.Ft size_t
59824 +.Fn "bufferevent_read" "struct bufferevent *bufev" "void *data" "size_t size"
59825 +.Ft int
59826 +.Fn "bufferevent_enable" "struct bufferevent *bufev" "short event"
59827 +.Ft int
59828 +.Fn "bufferevent_disable" "struct bufferevent *bufev" "short event"
59829 +.Ft void
59830 +.Fn "bufferevent_settimeout" "struct bufferevent *bufev" "int timeout_read" "int timeout_write"
59831 +.Ft int
59832 +.Fn "bufferevent_base_set" "struct event_base *base" "struct bufferevent *bufev"
59833 +.Ft "struct evbuffer *"
59834 +.Fn "evbuffer_new" "void"
59835 +.Ft void
59836 +.Fn "evbuffer_free" "struct evbuffer *buf"
59837 +.Ft int
59838 +.Fn "evbuffer_add" "struct evbuffer *buf" "const void *data" "size_t size"
59839 +.Ft int
59840 +.Fn "evbuffer_add_buffer" "struct evbuffer *dst" "struct evbuffer *src"
59841 +.Ft int
59842 +.Fn "evbuffer_add_printf" "struct evbuffer *buf" "const char *fmt" "..."
59843 +.Ft int
59844 +.Fn "evbuffer_add_vprintf" "struct evbuffer *buf" "const char *fmt" "va_list ap"
59845 +.Ft void
59846 +.Fn "evbuffer_drain" "struct evbuffer *buf" "size_t size"
59847 +.Ft int
59848 +.Fn "evbuffer_write" "struct evbuffer *buf" "int fd"
59849 +.Ft int
59850 +.Fn "evbuffer_read" "struct evbuffer *buf" "int fd" "int size"
59851 +.Ft "u_char *"
59852 +.Fn "evbuffer_find" "struct evbuffer *buf" "const u_char *data" "size_t size"
59853 +.Ft "char *"
59854 +.Fn "evbuffer_readline" "struct evbuffer *buf"
59855 +.Ft "struct evhttp *"
59856 +.Fn "evhttp_start" "const char *address" "u_short port"
59857 +.Ft "void"
59858 +.Fn "evhttp_free" "struct evhttp* http"
59859 +.Ft int
59860 +.Fa (*event_sigcb)(void) ;
59861 +.Ft volatile sig_atomic_t
59862 +.Fa event_gotsig ;
59863 +.Sh DESCRIPTION
59864 +The
59865 +.Nm event
59866 +API provides a mechanism to execute a function when a specific event
59867 +on a file descriptor occurs or after a given time has passed.
59868 +.Pp
59869 +The
59870 +.Nm event
59871 +API needs to be initialized with
59872 +.Fn event_init
59873 +before it can be used.
59874 +.Pp
59875 +In order to process events, an application needs to call
59876 +.Fn event_dispatch .
59877 +This function only returns on error, and should replace the event core
59878 +of the application program.
59879 +.Pp
59880 +In order to avoid races in signal handlers, the
59881 +.Nm event
59882 +API provides two variables:
59883 +.Va event_sigcb
59884 +and
59885 +.Va event_gotsig .
59886 +A signal handler
59887 +sets
59888 +.Va event_gotsig
59889 +to indicate that a signal has been received.
59890 +The application sets
59891 +.Va event_sigcb
59892 +to a callback function.
59893 +After the signal handler sets
59894 +.Va event_gotsig ,
59895 +.Nm event_dispatch
59896 +will execute the callback function to process received signals.
59897 +The callback returns 1 when no events are registered any more.
59898 +It can return \-1 to indicate an error to the
59899 +.Nm event
59900 +library, causing
59901 +.Fn event_dispatch
59902 +to terminate with
59903 +.Va errno
59904 +set to
59905 +.Er EINTR .
59906 +.Pp
59907 +The
59908 +.Nm event_loop
59909 +function provides an interface for single pass execution of pending
59910 +events.
59911 +The flags
59912 +.Va EVLOOP_ONCE
59913 +and
59914 +.Va EVLOOP_NONBLOCK
59915 +are recognized.
59916 +The
59917 +.Nm event_loopexit
59918 +function allows the loop to be terminated after some amount of time
59919 +has passed.
59920 +The parameter indicates the time after which the loop should terminate.
59921 +.Pp
59922 +It is the responsibility of the caller to provide these functions with
59923 +pre-allocated event structures.
59924 +.Pp
59925 +The function
59926 +.Fn event_set
59927 +prepares the event structure
59928 +.Fa ev
59929 +to be used in future calls to
59930 +.Fn event_add
59931 +and
59932 +.Fn event_del .
59933 +The event will be prepared to call the function specified by the
59934 +.Fa fn
59935 +argument with an
59936 +.Fa int
59937 +argument indicating the file descriptor, a
59938 +.Fa short
59939 +argument indicating the type of event, and a
59940 +.Fa void *
59941 +argument given in the
59942 +.Fa arg
59943 +argument.
59944 +The
59945 +.Fa fd
59946 +indicates the file descriptor that should be monitored for events.
59947 +The events can be either
59948 +.Va EV_READ ,
59949 +.Va EV_WRITE ,
59950 +or both,
59951 +indicating that an application can read or write from the file descriptor
59952 +respectively without blocking.
59953 +.Pp
59954 +The function
59955 +.Fa fn
59956 +will be called with the file descriptor that triggered the event and
59957 +the type of event which will be either
59958 +.Va EV_TIMEOUT ,
59959 +.Va EV_SIGNAL ,
59960 +.Va EV_READ ,
59961 +or
59962 +.Va EV_WRITE .
59963 +The additional flag
59964 +.Va EV_PERSIST
59965 +makes an
59966 +.Fn event_add
59967 +persistent until
59968 +.Fn event_del
59969 +has been called.
59970 +.Pp
59971 +Once initialized, the
59972 +.Fa ev
59973 +structure can be used repeatedly with
59974 +.Fn event_add
59975 +and
59976 +.Fn event_del
59977 +and does not need to be reinitialized unless the function called and/or
59978 +the argument to it are to be changed.
59979 +However, when an
59980 +.Fa ev
59981 +structure has been added to libevent using
59982 +.Fn event_add
59983 +the structure must persist until the event occurs (assuming
59984 +.Fa EV_PERSIST
59985 +is not set) or is removed
59986 +using
59987 +.Fn event_del .
59988 +You may not reuse the same
59989 +.Fa ev
59990 +structure for multiple monitored descriptors; each descriptor
59991 +needs its own
59992 +.Fa ev .
59993 +.Pp
59994 +The function
59995 +.Fn event_add
59996 +schedules the execution of the
59997 +.Fa ev
59998 +event when the event specified in
59999 +.Fn event_set
60000 +occurs or in at least the time specified in the
60001 +.Fa tv .
60002 +If
60003 +.Fa tv
60004 +is
60005 +.Dv NULL ,
60006 +no timeout occurs and the function will only be called
60007 +if a matching event occurs on the file descriptor.
60008 +The event in the
60009 +.Fa ev
60010 +argument must be already initialized by
60011 +.Fn event_set
60012 +and may not be used in calls to
60013 +.Fn event_set
60014 +until it has timed out or been removed with
60015 +.Fn event_del .
60016 +If the event in the
60017 +.Fa ev
60018 +argument already has a scheduled timeout, the old timeout will be
60019 +replaced by the new one.
60020 +.Pp
60021 +The function
60022 +.Fn event_del
60023 +will cancel the event in the argument
60024 +.Fa ev .
60025 +If the event has already executed or has never been added
60026 +the call will have no effect.
60027 +.Pp
60028 +The function
60029 +.Fn event_once
60030 +is similar to
60031 +.Fn event_set .
60032 +However, it schedules a callback to be called exactly once and does not
60033 +require the caller to prepare an
60034 +.Fa event
60035 +structure.
60036 +This function supports
60037 +.Fa EV_TIMEOUT ,
60038 +.Fa EV_READ ,
60039 +and
60040 +.Fa EV_WRITE .
60041 +.Pp
60042 +The
60043 +.Fn event_pending
60044 +function can be used to check if the event specified by
60045 +.Fa event
60046 +is pending to run.
60047 +If
60048 +.Va EV_TIMEOUT
60049 +was specified and
60050 +.Fa tv
60051 +is not
60052 +.Dv NULL ,
60053 +the expiration time of the event will be returned in
60054 +.Fa tv .
60055 +.Pp
60056 +The
60057 +.Fn event_initialized
60058 +macro can be used to check if an event has been initialized.
60059 +.Pp
60060 +The functions
60061 +.Fn evtimer_set ,
60062 +.Fn evtimer_add ,
60063 +.Fn evtimer_del ,
60064 +.Fn evtimer_initialized ,
60065 +and
60066 +.Fn evtimer_pending
60067 +are abbreviations for common situations where only a timeout is required.
60068 +The file descriptor passed will be \-1, and the event type will be
60069 +.Va EV_TIMEOUT .
60070 +.Pp
60071 +The functions
60072 +.Fn signal_set ,
60073 +.Fn signal_add ,
60074 +.Fn signal_del ,
60075 +.Fn signal_initialized ,
60076 +and
60077 +.Fn signal_pending
60078 +are abbreviations.
60079 +The event type will be a persistent
60080 +.Va EV_SIGNAL .
60081 +That means
60082 +.Fn signal_set
60083 +adds
60084 +.Va EV_PERSIST .
60085 +.Pp
60086 +It is possible to disable support for
60087 +.Va epoll , kqueue , devpoll , poll
60088 +or
60089 +.Va select
60090 +by setting the environment variable
60091 +.Va EVENT_NOEPOLL , EVENT_NOKQUEUE , EVENT_NODEVPOLL , EVENT_NOPOLL
60092 +or
60093 +.Va EVENT_NOSELECT ,
60094 +respectively.
60095 +By setting the environment variable
60096 +.Va EVENT_SHOW_METHOD ,
60097 +.Nm libevent
60098 +displays the kernel notification method that it uses.
60099 +.Sh EVENT PRIORITIES
60100 +By default
60101 +.Nm libevent
60102 +schedules all active events with the same priority.
60103 +However, sometimes it is desirable to process some events with a higher
60104 +priority than others.
60105 +For that reason,
60106 +.Nm libevent
60107 +supports strict priority queues.
60108 +Active events with a lower priority are always processed before events
60109 +with a higher priority.
60110 +.Pp
60111 +The number of different priorities can be set initially with the
60112 +.Fn event_priority_init
60113 +function.
60114 +This function should be called before the first call to
60115 +.Fn event_dispatch .
60116 +The
60117 +.Fn event_priority_set
60118 +function can be used to assign a priority to an event.
60119 +By default,
60120 +.Nm libevent
60121 +assigns the middle priority to all events unless their priority
60122 +is explicitly set.
60123 +.Sh THREAD SAFE EVENTS
60124 +.Nm Libevent
60125 +has experimental support for thread-safe events.
60126 +When initializing the library via
60127 +.Fn event_init ,
60128 +an event base is returned.
60129 +This event base can be used in conjunction with calls to
60130 +.Fn event_base_set ,
60131 +.Fn event_base_dispatch ,
60132 +.Fn event_base_loop ,
60133 +.Fn event_base_loopexit ,
60134 +.Fn bufferevent_base_set
60135 +and
60136 +.Fn event_base_free .
60137 +.Fn event_base_set
60138 +should be called after preparing an event with
60139 +.Fn event_set ,
60140 +as
60141 +.Fn event_set
60142 +assigns the provided event to the most recently created event base.
60143 +.Fn bufferevent_base_set
60144 +should be called after preparing a bufferevent with
60145 +.Fn bufferevent_new .
60146 +.Fn event_base_free
60147 +should be used to free memory associated with the event base
60148 +when it is no longer needed.
60149 +.Sh BUFFERED EVENTS
60150 +.Nm libevent
60151 +provides an abstraction on top of the regular event callbacks.
60152 +This abstraction is called a
60153 +.Va "buffered event" .
60154 +A buffered event provides input and output buffers that get filled
60155 +and drained automatically.
60156 +The user of a buffered event no longer deals directly with the IO,
60157 +but instead is reading from input and writing to output buffers.
60158 +.Pp
60159 +A new bufferevent is created by
60160 +.Fn bufferevent_new .
60161 +The parameter
60162 +.Fa fd
60163 +specifies the file descriptor from which data is read and written to.
60164 +This file descriptor is not allowed to be a
60165 +.Xr pipe 2 .
60166 +The next three parameters are callbacks.
60167 +The read and write callback have the following form:
60168 +.Ft void
60169 +.Fn "(*cb)" "struct bufferevent *bufev" "void *arg" .
60170 +The error callback has the following form:
60171 +.Ft void
60172 +.Fn "(*cb)" "struct bufferevent *bufev" "short what" "void *arg" .
60173 +The argument is specified by the fourth parameter
60174 +.Fa "cbarg" .
60175 +A
60176 +.Fa bufferevent struct
60177 +pointer is returned on success, NULL on error.
60178 +Both the read and the write callback may be NULL.
60179 +The error callback has to be always provided.
60180 +.Pp
60181 +Once initialized, the bufferevent structure can be used repeatedly with
60182 +bufferevent_enable() and bufferevent_disable().
60183 +The flags parameter can be a combination of
60184 +.Va EV_READ
60185 +and
60186 +.Va EV_WRITE .
60187 +When read enabled the bufferevent will try to read from the file
60188 +descriptor and call the read callback.
60189 +The write callback is executed
60190 +whenever the output buffer is drained below the write low watermark,
60191 +which is
60192 +.Va 0
60193 +by default.
60194 +.Pp
60195 +The
60196 +.Fn bufferevent_write
60197 +function can be used to write data to the file descriptor.
60198 +The data is appended to the output buffer and written to the descriptor
60199 +automatically as it becomes available for writing.
60200 +.Fn bufferevent_write
60201 +returns 0 on success or \-1 on failure.
60202 +The
60203 +.Fn bufferevent_read
60204 +function is used to read data from the input buffer,
60205 +returning the amount of data read.
60206 +.Pp
60207 +If multiple bases are in use, bufferevent_base_set() must be called before
60208 +enabling the bufferevent for the first time.
60209 +.Sh NON-BLOCKING HTTP SUPPORT
60210 +.Nm libevent
60211 +provides a very thin HTTP layer that can be used both to host an HTTP
60212 +server and also to make HTTP requests.
60213 +An HTTP server can be created by calling
60214 +.Fn evhttp_start .
60215 +When the HTTP server is no longer used, it can be freed via
60216 +.Fn evhttp_free .
60217 +.Pp
60218 +To be notified of HTTP requests, a user needs to register callbacks with the
60219 +HTTP server.
60220 +This can be done by calling
60221 +.Fn evhttp_set_cb .
60222 +The second argument is the URI for which a callback is being registered.
60223 +The corresponding callback will receive an
60224 +.Va struct evhttp_request
60225 +object that contains all information about the request.
60226 +.Pp
60227 +This section does not document all the possible function calls; please
60228 +check
60229 +.Va event.h
60230 +for the public interfaces.
60231 +.Sh RETURN VALUES
60232 +Upon successful completion
60233 +.Fn event_add
60234 +and
60235 +.Fn event_del
60236 +return 0.
60237 +Otherwise, \-1 is returned and the global variable errno is
60238 +set to indicate the error.
60239 +.Sh SEE ALSO
60240 +.Xr kqueue 2 ,
60241 +.Xr poll 2 ,
60242 +.Xr select 2 ,
60243 +.Xr evdns 3 ,
60244 +.Xr timeout 9
60245 +.Sh HISTORY
60246 +The
60247 +.Nm event
60248 +API manpage is based on the
60249 +.Xr timeout 9
60250 +manpage by Artur Grabowski.
60251 +The port of
60252 +.Nm libevent
60253 +to Windows is due to Michael A. Davis.
60254 +Support for real-time signals is due to Taral.
60255 +.Sh AUTHORS
60256 +The
60257 +.Nm event
60258 +library was written by Niels Provos.
60259 +.Sh BUGS
60260 +This documentation is neither complete nor authoritative.
60261 +If you are in doubt about the usage of this API then
60262 +check the source code to find out how it works, write
60263 +up the missing piece of documentation and send it to
60264 +me for inclusion in this man page.
60265 diff -Nru php-5.2.4.vanilla/libevent/event.c php-5.2.4.fpm/libevent/event.c
60266 --- php-5.2.4.vanilla/libevent/event.c  1970-01-01 03:00:00.000000000 +0300
60267 +++ php-5.2.4.fpm/libevent/event.c      2007-08-31 15:47:19.000000000 +0400
60268 @@ -0,0 +1,883 @@
60269 +/*
60270 + * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu>
60271 + * All rights reserved.
60272 + *
60273 + * Redistribution and use in source and binary forms, with or without
60274 + * modification, are permitted provided that the following conditions
60275 + * are met:
60276 + * 1. Redistributions of source code must retain the above copyright
60277 + *    notice, this list of conditions and the following disclaimer.
60278 + * 2. Redistributions in binary form must reproduce the above copyright
60279 + *    notice, this list of conditions and the following disclaimer in the
60280 + *    documentation and/or other materials provided with the distribution.
60281 + * 3. The name of the author may not be used to endorse or promote products
60282 + *    derived from this software without specific prior written permission.
60283 + *
60284 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
60285 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
60286 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
60287 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
60288 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
60289 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
60290 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
60291 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
60292 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
60293 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
60294 + */
60295 +#ifdef HAVE_CONFIG_H
60296 +#include "config.h"
60297 +#endif
60298 +
60299 +#ifdef WIN32
60300 +#define WIN32_LEAN_AND_MEAN
60301 +#include <windows.h>
60302 +#undef WIN32_LEAN_AND_MEAN
60303 +#include "misc.h"
60304 +#endif
60305 +#include <sys/types.h>
60306 +#include <sys/tree.h>
60307 +#ifdef HAVE_SYS_TIME_H
60308 +#include <sys/time.h>
60309 +#else 
60310 +#include <sys/_time.h>
60311 +#endif
60312 +#include <sys/queue.h>
60313 +#include <stdio.h>
60314 +#include <stdlib.h>
60315 +#ifndef WIN32
60316 +#include <unistd.h>
60317 +#endif
60318 +#include <errno.h>
60319 +#include <signal.h>
60320 +#include <string.h>
60321 +#include <assert.h>
60322 +
60323 +#include "event.h"
60324 +#include "event-internal.h"
60325 +#include "log.h"
60326 +
60327 +#ifdef HAVE_EVENT_PORTS
60328 +extern const struct eventop evportops;
60329 +#endif
60330 +#ifdef HAVE_SELECT
60331 +extern const struct eventop selectops;
60332 +#endif
60333 +#ifdef HAVE_POLL
60334 +extern const struct eventop pollops;
60335 +#endif
60336 +#ifdef HAVE_RTSIG
60337 +extern const struct eventop rtsigops;
60338 +#endif
60339 +#ifdef HAVE_EPOLL
60340 +extern const struct eventop epollops;
60341 +#endif
60342 +#ifdef HAVE_WORKING_KQUEUE
60343 +extern const struct eventop kqops;
60344 +#endif
60345 +#ifdef HAVE_DEVPOLL
60346 +extern const struct eventop devpollops;
60347 +#endif
60348 +#ifdef WIN32
60349 +extern const struct eventop win32ops;
60350 +#endif
60351 +
60352 +/* In order of preference */
60353 +const struct eventop *eventops[] = {
60354 +#ifdef HAVE_EVENT_PORTS
60355 +       &evportops,
60356 +#endif
60357 +#ifdef HAVE_WORKING_KQUEUE
60358 +       &kqops,
60359 +#endif
60360 +#ifdef HAVE_EPOLL
60361 +       &epollops,
60362 +#endif
60363 +#ifdef HAVE_DEVPOLL
60364 +       &devpollops,
60365 +#endif
60366 +#ifdef HAVE_RTSIG
60367 +       &rtsigops,
60368 +#endif
60369 +#ifdef HAVE_POLL
60370 +       &pollops,
60371 +#endif
60372 +#ifdef HAVE_SELECT
60373 +       &selectops,
60374 +#endif
60375 +#ifdef WIN32
60376 +       &win32ops,
60377 +#endif
60378 +       NULL
60379 +};
60380 +
60381 +/* Global state */
60382 +struct event_base *current_base = NULL;
60383 +extern struct event_base *evsignal_base;
60384 +
60385 +/* Handle signals - This is a deprecated interface */
60386 +int (*event_sigcb)(void);              /* Signal callback when gotsig is set */
60387 +volatile sig_atomic_t event_gotsig;    /* Set in signal handler */
60388 +
60389 +/* Prototypes */
60390 +static void    event_queue_insert(struct event_base *, struct event *, int);
60391 +static void    event_queue_remove(struct event_base *, struct event *, int);
60392 +static int     event_haveevents(struct event_base *);
60393 +
60394 +static void    event_process_active(struct event_base *);
60395 +
60396 +static int     timeout_next(struct event_base *, struct timeval *);
60397 +static void    timeout_process(struct event_base *);
60398 +static void    timeout_correct(struct event_base *, struct timeval *);
60399 +
60400 +static int
60401 +compare(struct event *a, struct event *b)
60402 +{
60403 +       if (timercmp(&a->ev_timeout, &b->ev_timeout, <))
60404 +               return (-1);
60405 +       else if (timercmp(&a->ev_timeout, &b->ev_timeout, >))
60406 +               return (1);
60407 +       if (a < b)
60408 +               return (-1);
60409 +       else if (a > b)
60410 +               return (1);
60411 +       return (0);
60412 +}
60413 +
60414 +static int
60415 +gettime(struct timeval *tp)
60416 +{
60417 +#ifdef HAVE_CLOCK_GETTIME
60418 +       struct timespec ts;
60419 +
60420 +#ifdef HAVE_CLOCK_MONOTONIC      
60421 +       if (clock_gettime(CLOCK_MONOTONIC, &ts) == -1)
60422 +#else
60423 +       if (clock_gettime(CLOCK_REALTIME, &ts) == -1)
60424 +#endif
60425 +               return (-1);
60426 +       tp->tv_sec = ts.tv_sec;
60427 +       tp->tv_usec = ts.tv_nsec / 1000;
60428 +#else
60429 +       gettimeofday(tp, NULL);
60430 +#endif
60431 +
60432 +       return (0);
60433 +}
60434 +
60435 +RB_PROTOTYPE(event_tree, event, ev_timeout_node, compare);
60436 +
60437 +RB_GENERATE(event_tree, event, ev_timeout_node, compare);
60438 +
60439 +
60440 +void *
60441 +event_init(void)
60442 +{
60443 +       int i;
60444 +       struct event_base *base;
60445 +
60446 +       if ((base = calloc(1, sizeof(struct event_base))) == NULL)
60447 +               event_err(1, "%s: calloc");
60448 +
60449 +       event_sigcb = NULL;
60450 +       event_gotsig = 0;
60451 +       gettime(&base->event_tv);
60452 +       
60453 +       RB_INIT(&base->timetree);
60454 +       TAILQ_INIT(&base->eventqueue);
60455 +       TAILQ_INIT(&base->sig.signalqueue);
60456 +       base->sig.ev_signal_pair[0] = -1;
60457 +       base->sig.ev_signal_pair[1] = -1;
60458 +       
60459 +       base->evbase = NULL;
60460 +       for (i = 0; eventops[i] && !base->evbase; i++) {
60461 +               base->evsel = eventops[i];
60462 +
60463 +               base->evbase = base->evsel->init(base);
60464 +       }
60465 +
60466 +       if (base->evbase == NULL)
60467 +               event_errx(1, "%s: no event mechanism available", __func__);
60468 +
60469 +       if (getenv("EVENT_SHOW_METHOD")) 
60470 +               event_msgx("libevent using: %s\n",
60471 +                          base->evsel->name);
60472 +
60473 +       /* allocate a single active event queue */
60474 +       event_base_priority_init(base, 1);
60475 +
60476 +       current_base = base;
60477 +       return (base);
60478 +}
60479 +
60480 +void
60481 +event_base_free(struct event_base *base)
60482 +{
60483 +       int i;
60484 +
60485 +       if (base == NULL && current_base)
60486 +               base = current_base;
60487 +        if (base == current_base)
60488 +               current_base = NULL;
60489 +
60490 +       assert(base);
60491 +
60492 +       if (base->evsel->dealloc != NULL)
60493 +               base->evsel->dealloc(base, base->evbase);
60494 +
60495 +       for (i = 0; i < base->nactivequeues; ++i)
60496 +               free(base->activequeues[i]);
60497 +       free(base->activequeues);
60498 +
60499 +       free(base);
60500 +}
60501 +
60502 +int
60503 +event_priority_init(int npriorities)
60504 +{
60505 +  return event_base_priority_init(current_base, npriorities);
60506 +}
60507 +
60508 +int
60509 +event_base_priority_init(struct event_base *base, int npriorities)
60510 +{
60511 +       int i;
60512 +
60513 +       if (base->event_count_active)
60514 +               return (-1);
60515 +
60516 +       if (base->nactivequeues && npriorities != base->nactivequeues) {
60517 +               for (i = 0; i < base->nactivequeues; ++i) {
60518 +                       free(base->activequeues[i]);
60519 +               }
60520 +               free(base->activequeues);
60521 +       }
60522 +
60523 +       /* Allocate our priority queues */
60524 +       base->nactivequeues = npriorities;
60525 +       base->activequeues = (struct event_list **)calloc(base->nactivequeues,
60526 +           npriorities * sizeof(struct event_list *));
60527 +       if (base->activequeues == NULL)
60528 +               event_err(1, "%s: calloc", __func__);
60529 +
60530 +       for (i = 0; i < base->nactivequeues; ++i) {
60531 +               base->activequeues[i] = malloc(sizeof(struct event_list));
60532 +               if (base->activequeues[i] == NULL)
60533 +                       event_err(1, "%s: malloc", __func__);
60534 +               TAILQ_INIT(base->activequeues[i]);
60535 +       }
60536 +
60537 +       return (0);
60538 +}
60539 +
60540 +int
60541 +event_haveevents(struct event_base *base)
60542 +{
60543 +       return (base->event_count > 0);
60544 +}
60545 +
60546 +/*
60547 + * Active events are stored in priority queues.  Lower priorities are always
60548 + * process before higher priorities.  Low priority events can starve high
60549 + * priority ones.
60550 + */
60551 +
60552 +static void
60553 +event_process_active(struct event_base *base)
60554 +{
60555 +       struct event *ev;
60556 +       struct event_list *activeq = NULL;
60557 +       int i;
60558 +       short ncalls;
60559 +
60560 +       if (!base->event_count_active)
60561 +               return;
60562 +
60563 +       for (i = 0; i < base->nactivequeues; ++i) {
60564 +               if (TAILQ_FIRST(base->activequeues[i]) != NULL) {
60565 +                       activeq = base->activequeues[i];
60566 +                       break;
60567 +               }
60568 +       }
60569 +
60570 +       assert(activeq != NULL);
60571 +
60572 +       for (ev = TAILQ_FIRST(activeq); ev; ev = TAILQ_FIRST(activeq)) {
60573 +               event_queue_remove(base, ev, EVLIST_ACTIVE);
60574 +               
60575 +               /* Allows deletes to work */
60576 +               ncalls = ev->ev_ncalls;
60577 +               ev->ev_pncalls = &ncalls;
60578 +               while (ncalls) {
60579 +                       ncalls--;
60580 +                       ev->ev_ncalls = ncalls;
60581 +                       (*ev->ev_callback)((int)ev->ev_fd, ev->ev_res, ev->ev_arg);
60582 +                       if (event_gotsig || base->event_gotterm)
60583 +                               return;
60584 +               }
60585 +       }
60586 +}
60587 +
60588 +/*
60589 + * Wait continously for events.  We exit only if no events are left.
60590 + */
60591 +
60592 +int
60593 +event_dispatch(void)
60594 +{
60595 +       return (event_loop(0));
60596 +}
60597 +
60598 +int
60599 +event_base_dispatch(struct event_base *event_base)
60600 +{
60601 +  return (event_base_loop(event_base, 0));
60602 +}
60603 +
60604 +/* not thread safe */
60605 +int
60606 +event_loopexit(struct timeval *tv)
60607 +{
60608 +       current_base->event_gotterm = 1;
60609 +
60610 +       return 0;
60611 +}
60612 +
60613 +int
60614 +event_base_loopexit(struct event_base *event_base, struct timeval *tv)
60615 +{
60616 +       event_base->event_gotterm = 1;
60617 +
60618 +       return 0;
60619 +}
60620 +
60621 +/* not thread safe */
60622 +
60623 +int
60624 +event_loop(int flags)
60625 +{
60626 +       return event_base_loop(current_base, flags);
60627 +}
60628 +
60629 +int
60630 +event_base_loop(struct event_base *base, int flags)
60631 +{
60632 +       const struct eventop *evsel = base->evsel;
60633 +       void *evbase = base->evbase;
60634 +       struct timeval tv;
60635 +       int res, done;
60636 +
60637 +       if(!TAILQ_EMPTY(&base->sig.signalqueue))
60638 +               evsignal_base = base;
60639 +       done = 0;
60640 +       while (!done) {
60641 +               /* Calculate the initial events that we are waiting for */
60642 +               if (evsel->recalc(base, evbase, 0) == -1)
60643 +                       return (-1);
60644 +
60645 +               /* Terminate the loop if we have been asked to */
60646 +               if (base->event_gotterm) {
60647 +                       base->event_gotterm = 0;
60648 +                       break;
60649 +               }
60650 +
60651 +               /* You cannot use this interface for multi-threaded apps */
60652 +               while (event_gotsig) {
60653 +                       event_gotsig = 0;
60654 +                       if (event_sigcb) {
60655 +                               res = (*event_sigcb)();
60656 +                               if (res == -1) {
60657 +                                       errno = EINTR;
60658 +                                       return (-1);
60659 +                               }
60660 +                       }
60661 +               }
60662 +
60663 +               /* Check if time is running backwards */
60664 +               gettime(&tv);
60665 +               if (timercmp(&tv, &base->event_tv, <)) {
60666 +                       struct timeval off;
60667 +                       event_debug(("%s: time is running backwards, corrected",
60668 +                                   __func__));
60669 +                       timersub(&base->event_tv, &tv, &off);
60670 +                       timeout_correct(base, &off);
60671 +               }
60672 +               base->event_tv = tv;
60673 +
60674 +               if (!base->event_count_active && !(flags & EVLOOP_NONBLOCK))
60675 +                       timeout_next(base, &tv);
60676 +               else
60677 +                       timerclear(&tv);
60678 +               
60679 +               /* If we have no events, we just exit */
60680 +               if (!event_haveevents(base)) {
60681 +                       event_debug(("%s: no events registered.", __func__));
60682 +                       return (1);
60683 +               }
60684 +
60685 +               res = evsel->dispatch(base, evbase, &tv);
60686 +
60687 +
60688 +               if (res == -1)
60689 +                       return (-1);
60690 +
60691 +               timeout_process(base);
60692 +
60693 +               if (base->event_count_active) {
60694 +                       event_process_active(base);
60695 +                       if (!base->event_count_active && (flags & EVLOOP_ONCE))
60696 +                               done = 1;
60697 +               } else if (flags & EVLOOP_NONBLOCK)
60698 +                       done = 1;
60699 +       }
60700 +
60701 +       event_debug(("%s: asked to terminate loop.", __func__));
60702 +       return (0);
60703 +}
60704 +
60705 +/* Sets up an event for processing once */
60706 +
60707 +struct event_once {
60708 +       struct event ev;
60709 +
60710 +       void (*cb)(int, short, void *);
60711 +       void *arg;
60712 +};
60713 +
60714 +/* One-time callback, it deletes itself */
60715 +
60716 +static void
60717 +event_once_cb(int fd, short events, void *arg)
60718 +{
60719 +       struct event_once *eonce = arg;
60720 +
60721 +       (*eonce->cb)(fd, events, eonce->arg);
60722 +       free(eonce);
60723 +}
60724 +
60725 +/* not threadsafe, event scheduled once. */
60726 +int
60727 +event_once(int fd, short events,
60728 +    void (*callback)(int, short, void *), void *arg, struct timeval *tv)
60729 +{
60730 +       return event_base_once(current_base, fd, events, callback, arg, tv);
60731 +}
60732 +
60733 +/* Schedules an event once */
60734 +int
60735 +event_base_once(struct event_base *base, int fd, short events,
60736 +    void (*callback)(int, short, void *), void *arg, struct timeval *tv)
60737 +{
60738 +       struct event_once *eonce;
60739 +       struct timeval etv;
60740 +       int res;
60741 +
60742 +       /* We cannot support signals that just fire once */
60743 +       if (events & EV_SIGNAL)
60744 +               return (-1);
60745 +
60746 +       if ((eonce = calloc(1, sizeof(struct event_once))) == NULL)
60747 +               return (-1);
60748 +
60749 +       eonce->cb = callback;
60750 +       eonce->arg = arg;
60751 +
60752 +       if (events == EV_TIMEOUT) {
60753 +               if (tv == NULL) {
60754 +                       timerclear(&etv);
60755 +                       tv = &etv;
60756 +               }
60757 +
60758 +               evtimer_set(&eonce->ev, event_once_cb, eonce);
60759 +       } else if (events & (EV_READ|EV_WRITE)) {
60760 +               events &= EV_READ|EV_WRITE;
60761 +
60762 +               event_set(&eonce->ev, fd, events, event_once_cb, eonce);
60763 +       } else {
60764 +               /* Bad event combination */
60765 +               free(eonce);
60766 +               return (-1);
60767 +       }
60768 +
60769 +       res = event_base_set(base, &eonce->ev);
60770 +       if (res == 0)
60771 +               res = event_add(&eonce->ev, tv);
60772 +       if (res != 0) {
60773 +               free(eonce);
60774 +               return (res);
60775 +       }
60776 +
60777 +       return (0);
60778 +}
60779 +
60780 +void
60781 +event_set(struct event *ev, int fd, short events,
60782 +         void (*callback)(int, short, void *), void *arg)
60783 +{
60784 +       /* Take the current base - caller needs to set the real base later */
60785 +       ev->ev_base = current_base;
60786 +
60787 +       ev->ev_callback = callback;
60788 +       ev->ev_arg = arg;
60789 +       ev->ev_fd = fd;
60790 +       ev->ev_events = events;
60791 +       ev->ev_flags = EVLIST_INIT;
60792 +       ev->ev_ncalls = 0;
60793 +       ev->ev_pncalls = NULL;
60794 +
60795 +       /* by default, we put new events into the middle priority */
60796 +       if(current_base)
60797 +               ev->ev_pri = current_base->nactivequeues/2;
60798 +}
60799 +
60800 +int
60801 +event_base_set(struct event_base *base, struct event *ev)
60802 +{
60803 +       /* Only innocent events may be assigned to a different base */
60804 +       if (ev->ev_flags != EVLIST_INIT)
60805 +               return (-1);
60806 +
60807 +       ev->ev_base = base;
60808 +       ev->ev_pri = base->nactivequeues/2;
60809 +
60810 +       return (0);
60811 +}
60812 +
60813 +/*
60814 + * Set's the priority of an event - if an event is already scheduled
60815 + * changing the priority is going to fail.
60816 + */
60817 +
60818 +int
60819 +event_priority_set(struct event *ev, int pri)
60820 +{
60821 +       if (ev->ev_flags & EVLIST_ACTIVE)
60822 +               return (-1);
60823 +       if (pri < 0 || pri >= ev->ev_base->nactivequeues)
60824 +               return (-1);
60825 +
60826 +       ev->ev_pri = pri;
60827 +
60828 +       return (0);
60829 +}
60830 +
60831 +/*
60832 + * Checks if a specific event is pending or scheduled.
60833 + */
60834 +
60835 +int
60836 +event_pending(struct event *ev, short event, struct timeval *tv)
60837 +{
60838 +       struct timeval  now, res;
60839 +       int flags = 0;
60840 +
60841 +       if (ev->ev_flags & EVLIST_INSERTED)
60842 +               flags |= (ev->ev_events & (EV_READ|EV_WRITE));
60843 +       if (ev->ev_flags & EVLIST_ACTIVE)
60844 +               flags |= ev->ev_res;
60845 +       if (ev->ev_flags & EVLIST_TIMEOUT)
60846 +               flags |= EV_TIMEOUT;
60847 +       if (ev->ev_flags & EVLIST_SIGNAL)
60848 +               flags |= EV_SIGNAL;
60849 +
60850 +       event &= (EV_TIMEOUT|EV_READ|EV_WRITE|EV_SIGNAL);
60851 +
60852 +       /* See if there is a timeout that we should report */
60853 +       if (tv != NULL && (flags & event & EV_TIMEOUT)) {
60854 +               gettime(&now);
60855 +               timersub(&ev->ev_timeout, &now, &res);
60856 +               /* correctly remap to real time */
60857 +               gettimeofday(&now, NULL);
60858 +               timeradd(&now, &res, tv);
60859 +       }
60860 +
60861 +       return (flags & event);
60862 +}
60863 +
60864 +int
60865 +event_add(struct event *ev, struct timeval *tv)
60866 +{
60867 +       struct event_base *base = ev->ev_base;
60868 +       const struct eventop *evsel = base->evsel;
60869 +       void *evbase = base->evbase;
60870 +
60871 +       event_debug((
60872 +                "event_add: event: %p, %s%s%scall %p",
60873 +                ev,
60874 +                ev->ev_events & EV_READ ? "EV_READ " : " ",
60875 +                ev->ev_events & EV_WRITE ? "EV_WRITE " : " ",
60876 +                tv ? "EV_TIMEOUT " : " ",
60877 +                ev->ev_callback));
60878 +
60879 +       assert(!(ev->ev_flags & ~EVLIST_ALL));
60880 +
60881 +       if (tv != NULL) {
60882 +               struct timeval now;
60883 +
60884 +               if (ev->ev_flags & EVLIST_TIMEOUT)
60885 +                       event_queue_remove(base, ev, EVLIST_TIMEOUT);
60886 +
60887 +               /* Check if it is active due to a timeout.  Rescheduling
60888 +                * this timeout before the callback can be executed
60889 +                * removes it from the active list. */
60890 +               if ((ev->ev_flags & EVLIST_ACTIVE) &&
60891 +                   (ev->ev_res & EV_TIMEOUT)) {
60892 +                       /* See if we are just active executing this
60893 +                        * event in a loop
60894 +                        */
60895 +                       if (ev->ev_ncalls && ev->ev_pncalls) {
60896 +                               /* Abort loop */
60897 +                               *ev->ev_pncalls = 0;
60898 +                       }
60899 +                       
60900 +                       event_queue_remove(base, ev, EVLIST_ACTIVE);
60901 +               }
60902 +
60903 +               gettime(&now);
60904 +               timeradd(&now, tv, &ev->ev_timeout);
60905 +
60906 +               event_debug((
60907 +                        "event_add: timeout in %d seconds, call %p",
60908 +                        tv->tv_sec, ev->ev_callback));
60909 +
60910 +               event_queue_insert(base, ev, EVLIST_TIMEOUT);
60911 +       }
60912 +
60913 +       if ((ev->ev_events & (EV_READ|EV_WRITE)) &&
60914 +           !(ev->ev_flags & (EVLIST_INSERTED|EVLIST_ACTIVE))) {
60915 +               event_queue_insert(base, ev, EVLIST_INSERTED);
60916 +
60917 +               return (evsel->add(evbase, ev));
60918 +       } else if ((ev->ev_events & EV_SIGNAL) &&
60919 +           !(ev->ev_flags & EVLIST_SIGNAL)) {
60920 +               event_queue_insert(base, ev, EVLIST_SIGNAL);
60921 +
60922 +               return (evsel->add(evbase, ev));
60923 +       }
60924 +
60925 +       return (0);
60926 +}
60927 +
60928 +int
60929 +event_del(struct event *ev)
60930 +{
60931 +       struct event_base *base;
60932 +       const struct eventop *evsel;
60933 +       void *evbase;
60934 +
60935 +       event_debug(("event_del: %p, callback %p",
60936 +                ev, ev->ev_callback));
60937 +
60938 +       /* An event without a base has not been added */
60939 +       if (ev->ev_base == NULL)
60940 +               return (-1);
60941 +
60942 +       base = ev->ev_base;
60943 +       evsel = base->evsel;
60944 +       evbase = base->evbase;
60945 +
60946 +       assert(!(ev->ev_flags & ~EVLIST_ALL));
60947 +
60948 +       /* See if we are just active executing this event in a loop */
60949 +       if (ev->ev_ncalls && ev->ev_pncalls) {
60950 +               /* Abort loop */
60951 +               *ev->ev_pncalls = 0;
60952 +       }
60953 +
60954 +       if (ev->ev_flags & EVLIST_TIMEOUT)
60955 +               event_queue_remove(base, ev, EVLIST_TIMEOUT);
60956 +
60957 +       if (ev->ev_flags & EVLIST_ACTIVE)
60958 +               event_queue_remove(base, ev, EVLIST_ACTIVE);
60959 +
60960 +       if (ev->ev_flags & EVLIST_INSERTED) {
60961 +               event_queue_remove(base, ev, EVLIST_INSERTED);
60962 +               return (evsel->del(evbase, ev));
60963 +       } else if (ev->ev_flags & EVLIST_SIGNAL) {
60964 +               event_queue_remove(base, ev, EVLIST_SIGNAL);
60965 +               return (evsel->del(evbase, ev));
60966 +       }
60967 +
60968 +       return (0);
60969 +}
60970 +
60971 +void
60972 +event_active(struct event *ev, int res, short ncalls)
60973 +{
60974 +       /* We get different kinds of events, add them together */
60975 +       if (ev->ev_flags & EVLIST_ACTIVE) {
60976 +               ev->ev_res |= res;
60977 +               return;
60978 +       }
60979 +
60980 +       ev->ev_res = res;
60981 +       ev->ev_ncalls = ncalls;
60982 +       ev->ev_pncalls = NULL;
60983 +       event_queue_insert(ev->ev_base, ev, EVLIST_ACTIVE);
60984 +}
60985 +
60986 +int
60987 +timeout_next(struct event_base *base, struct timeval *tv)
60988 +{
60989 +       struct timeval dflt = TIMEOUT_DEFAULT;
60990 +
60991 +       struct timeval now;
60992 +       struct event *ev;
60993 +
60994 +       if ((ev = RB_MIN(event_tree, &base->timetree)) == NULL) {
60995 +               *tv = dflt;
60996 +               return (0);
60997 +       }
60998 +
60999 +       if (gettime(&now) == -1)
61000 +               return (-1);
61001 +
61002 +       if (timercmp(&ev->ev_timeout, &now, <=)) {
61003 +               timerclear(tv);
61004 +               return (0);
61005 +       }
61006 +
61007 +       timersub(&ev->ev_timeout, &now, tv);
61008 +
61009 +       assert(tv->tv_sec >= 0);
61010 +       assert(tv->tv_usec >= 0);
61011 +
61012 +       event_debug(("timeout_next: in %d seconds", tv->tv_sec));
61013 +       return (0);
61014 +}
61015 +
61016 +static void
61017 +timeout_correct(struct event_base *base, struct timeval *off)
61018 +{
61019 +       struct event *ev;
61020 +
61021 +       /*
61022 +        * We can modify the key element of the node without destroying
61023 +        * the key, beause we apply it to all in the right order.
61024 +        */
61025 +       RB_FOREACH(ev, event_tree, &base->timetree)
61026 +               timersub(&ev->ev_timeout, off, &ev->ev_timeout);
61027 +}
61028 +
61029 +void
61030 +timeout_process(struct event_base *base)
61031 +{
61032 +       struct timeval now;
61033 +       struct event *ev, *next;
61034 +
61035 +       gettime(&now);
61036 +
61037 +       for (ev = RB_MIN(event_tree, &base->timetree); ev; ev = next) {
61038 +               if (timercmp(&ev->ev_timeout, &now, >))
61039 +                       break;
61040 +               next = RB_NEXT(event_tree, &base->timetree, ev);
61041 +
61042 +               event_queue_remove(base, ev, EVLIST_TIMEOUT);
61043 +
61044 +               /* delete this event from the I/O queues */
61045 +               event_del(ev);
61046 +
61047 +               event_debug(("timeout_process: call %p",
61048 +                        ev->ev_callback));
61049 +               event_active(ev, EV_TIMEOUT, 1);
61050 +       }
61051 +}
61052 +
61053 +void
61054 +event_queue_remove(struct event_base *base, struct event *ev, int queue)
61055 +{
61056 +       int docount = 1;
61057 +
61058 +       if (!(ev->ev_flags & queue))
61059 +               event_errx(1, "%s: %p(fd %d) not on queue %x", __func__,
61060 +                          ev, ev->ev_fd, queue);
61061 +
61062 +       if (ev->ev_flags & EVLIST_INTERNAL)
61063 +               docount = 0;
61064 +
61065 +       if (docount)
61066 +               base->event_count--;
61067 +
61068 +       ev->ev_flags &= ~queue;
61069 +       switch (queue) {
61070 +       case EVLIST_ACTIVE:
61071 +               if (docount)
61072 +                       base->event_count_active--;
61073 +               TAILQ_REMOVE(base->activequeues[ev->ev_pri],
61074 +                   ev, ev_active_next);
61075 +               break;
61076 +       case EVLIST_SIGNAL:
61077 +               TAILQ_REMOVE(&base->sig.signalqueue, ev, ev_signal_next);
61078 +               break;
61079 +       case EVLIST_TIMEOUT:
61080 +               RB_REMOVE(event_tree, &base->timetree, ev);
61081 +               break;
61082 +       case EVLIST_INSERTED:
61083 +               TAILQ_REMOVE(&base->eventqueue, ev, ev_next);
61084 +               break;
61085 +       default:
61086 +               event_errx(1, "%s: unknown queue %x", __func__, queue);
61087 +       }
61088 +}
61089 +
61090 +void
61091 +event_queue_insert(struct event_base *base, struct event *ev, int queue)
61092 +{
61093 +       int docount = 1;
61094 +
61095 +       if (ev->ev_flags & queue) {
61096 +               /* Double insertion is possible for active events */
61097 +               if (queue & EVLIST_ACTIVE)
61098 +                       return;
61099 +
61100 +               event_errx(1, "%s: %p(fd %d) already on queue %x", __func__,
61101 +                          ev, ev->ev_fd, queue);
61102 +       }
61103 +
61104 +       if (ev->ev_flags & EVLIST_INTERNAL)
61105 +               docount = 0;
61106 +
61107 +       if (docount)
61108 +               base->event_count++;
61109 +
61110 +       ev->ev_flags |= queue;
61111 +       switch (queue) {
61112 +       case EVLIST_ACTIVE:
61113 +               if (docount)
61114 +                       base->event_count_active++;
61115 +               TAILQ_INSERT_TAIL(base->activequeues[ev->ev_pri],
61116 +                   ev,ev_active_next);
61117 +               break;
61118 +       case EVLIST_SIGNAL:
61119 +               TAILQ_INSERT_TAIL(&base->sig.signalqueue, ev, ev_signal_next);
61120 +               break;
61121 +       case EVLIST_TIMEOUT: {
61122 +               struct event *tmp = RB_INSERT(event_tree, &base->timetree, ev);
61123 +               assert(tmp == NULL);
61124 +               break;
61125 +       }
61126 +       case EVLIST_INSERTED:
61127 +               TAILQ_INSERT_TAIL(&base->eventqueue, ev, ev_next);
61128 +               break;
61129 +       default:
61130 +               event_errx(1, "%s: unknown queue %x", __func__, queue);
61131 +       }
61132 +}
61133 +
61134 +/* Functions for debugging */
61135 +
61136 +const char *
61137 +event_get_version(void)
61138 +{
61139 +       return (VERSION);
61140 +}
61141 +
61142 +/* 
61143 + * No thread-safe interface needed - the information should be the same
61144 + * for all threads.
61145 + */
61146 +
61147 +const char *
61148 +event_get_method(void)
61149 +{
61150 +       return (current_base->evsel->name);
61151 +}
61152 diff -Nru php-5.2.4.vanilla/libevent/event.h php-5.2.4.fpm/libevent/event.h
61153 --- php-5.2.4.vanilla/libevent/event.h  1970-01-01 03:00:00.000000000 +0300
61154 +++ php-5.2.4.fpm/libevent/event.h      2007-08-31 15:47:19.000000000 +0400
61155 @@ -0,0 +1,354 @@
61156 +/*
61157 + * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu>
61158 + * All rights reserved.
61159 + *
61160 + * Redistribution and use in source and binary forms, with or without
61161 + * modification, are permitted provided that the following conditions
61162 + * are met:
61163 + * 1. Redistributions of source code must retain the above copyright
61164 + *    notice, this list of conditions and the following disclaimer.
61165 + * 2. Redistributions in binary form must reproduce the above copyright
61166 + *    notice, this list of conditions and the following disclaimer in the
61167 + *    documentation and/or other materials provided with the distribution.
61168 + * 3. The name of the author may not be used to endorse or promote products
61169 + *    derived from this software without specific prior written permission.
61170 + *
61171 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
61172 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
61173 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
61174 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
61175 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
61176 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
61177 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
61178 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
61179 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
61180 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61181 + */
61182 +#ifndef _EVENT_H_
61183 +#define _EVENT_H_
61184 +
61185 +#ifdef __cplusplus
61186 +extern "C" {
61187 +#endif
61188 +
61189 +#if defined(HAVE_INTTYPES_H)
61190 +#include <inttypes.h>
61191 +#else
61192 +#if defined(HAVE_STDINT_H)
61193 +#include <stdint.h>
61194 +#else
61195 +typedef unsigned int uint32_t;
61196 +typedef unsigned short uint16_t;
61197 +typedef unsigned char uint8_t;
61198 +#endif
61199 +#endif
61200 +
61201 +#include <stdarg.h>
61202 +
61203 +#ifdef WIN32
61204 +#define WIN32_LEAN_AND_MEAN
61205 +#include <windows.h>
61206 +#undef WIN32_LEAN_AND_MEAN
61207 +typedef unsigned char u_char;
61208 +typedef unsigned short u_short;
61209 +#endif
61210 +
61211 +#define EVLIST_TIMEOUT 0x01
61212 +#define EVLIST_INSERTED        0x02
61213 +#define EVLIST_SIGNAL  0x04
61214 +#define EVLIST_ACTIVE  0x08
61215 +#define EVLIST_INTERNAL        0x10
61216 +#define EVLIST_INIT    0x80
61217 +
61218 +/* EVLIST_X_ Private space: 0x1000-0xf000 */
61219 +#define EVLIST_ALL     (0xf000 | 0x9f)
61220 +
61221 +#define EV_TIMEOUT     0x01
61222 +#define EV_READ                0x02
61223 +#define EV_WRITE       0x04
61224 +#define EV_SIGNAL      0x08
61225 +#define EV_PERSIST     0x10    /* Persistant event */
61226 +
61227 +/* Fix so that ppl dont have to run with <sys/queue.h> */
61228 +#ifndef TAILQ_ENTRY
61229 +#define _EVENT_DEFINED_TQENTRY
61230 +#define TAILQ_ENTRY(type)                                              \
61231 +struct {                                                               \
61232 +       struct type *tqe_next;  /* next element */                      \
61233 +       struct type **tqe_prev; /* address of previous next element */  \
61234 +}
61235 +#endif /* !TAILQ_ENTRY */
61236 +#ifndef RB_ENTRY
61237 +#define _EVENT_DEFINED_RBENTRY
61238 +#define RB_ENTRY(type)                                                 \
61239 +struct {                                                               \
61240 +       struct type *rbe_left;          /* left element */              \
61241 +       struct type *rbe_right;         /* right element */             \
61242 +       struct type *rbe_parent;        /* parent element */            \
61243 +       int rbe_color;                  /* node color */                \
61244 +}
61245 +#endif /* !RB_ENTRY */
61246 +
61247 +struct event_base;
61248 +struct event {
61249 +       TAILQ_ENTRY (event) ev_next;
61250 +       TAILQ_ENTRY (event) ev_active_next;
61251 +       TAILQ_ENTRY (event) ev_signal_next;
61252 +       RB_ENTRY (event) ev_timeout_node;
61253 +
61254 +       struct event_base *ev_base;
61255 +       int ev_fd;
61256 +       short ev_events;
61257 +       short ev_ncalls;
61258 +       short *ev_pncalls;      /* Allows deletes in callback */
61259 +
61260 +       struct timeval ev_timeout;
61261 +
61262 +       int ev_pri;             /* smaller numbers are higher priority */
61263 +
61264 +       void (*ev_callback)(int, short, void *arg);
61265 +       void *ev_arg;
61266 +
61267 +       int ev_res;             /* result passed to event callback */
61268 +       int ev_flags;
61269 +};
61270 +
61271 +#define EVENT_SIGNAL(ev)       (int)(ev)->ev_fd
61272 +#define EVENT_FD(ev)           (int)(ev)->ev_fd
61273 +
61274 +/*
61275 + * Key-Value pairs.  Can be used for HTTP headers but also for
61276 + * query argument parsing.
61277 + */
61278 +struct evkeyval {
61279 +       TAILQ_ENTRY(evkeyval) next;
61280 +
61281 +       char *key;
61282 +       char *value;
61283 +};
61284 +
61285 +#ifdef _EVENT_DEFINED_TQENTRY
61286 +#undef TAILQ_ENTRY
61287 +struct event_list;
61288 +struct evkeyvalq;
61289 +#undef _EVENT_DEFINED_TQENTRY
61290 +#else
61291 +TAILQ_HEAD (event_list, event);
61292 +TAILQ_HEAD (evkeyvalq, evkeyval);
61293 +#endif /* _EVENT_DEFINED_TQENTRY */
61294 +#ifdef _EVENT_DEFINED_RBENTRY
61295 +#undef RB_ENTRY
61296 +#undef _EVENT_DEFINED_RBENTRY
61297 +#endif /* _EVENT_DEFINED_RBENTRY */
61298 +
61299 +struct eventop {
61300 +       char *name;
61301 +       void *(*init)(struct event_base *);
61302 +       int (*add)(void *, struct event *);
61303 +       int (*del)(void *, struct event *);
61304 +       int (*recalc)(struct event_base *, void *, int);
61305 +       int (*dispatch)(struct event_base *, void *, struct timeval *);
61306 +       void (*dealloc)(struct event_base *, void *);
61307 +};
61308 +
61309 +#define TIMEOUT_DEFAULT        {5, 0}
61310 +
61311 +void *event_init(void);
61312 +int event_dispatch(void);
61313 +int event_base_dispatch(struct event_base *);
61314 +void event_base_free(struct event_base *);
61315 +
61316 +#define _EVENT_LOG_DEBUG 0
61317 +#define _EVENT_LOG_MSG   1
61318 +#define _EVENT_LOG_WARN  2
61319 +#define _EVENT_LOG_ERR   3
61320 +typedef void (*event_log_cb)(int severity, const char *msg);
61321 +void event_set_log_callback(event_log_cb cb);
61322 +
61323 +/* Associate a different event base with an event */
61324 +int event_base_set(struct event_base *, struct event *);
61325 +
61326 +#define EVLOOP_ONCE    0x01
61327 +#define EVLOOP_NONBLOCK        0x02
61328 +int event_loop(int);
61329 +int event_base_loop(struct event_base *, int);
61330 +int event_loopexit(struct timeval *);  /* Causes the loop to exit */
61331 +int event_base_loopexit(struct event_base *, struct timeval *);
61332 +
61333 +#define evtimer_add(ev, tv)            event_add(ev, tv)
61334 +#define evtimer_set(ev, cb, arg)       event_set(ev, -1, 0, cb, arg)
61335 +#define evtimer_del(ev)                        event_del(ev)
61336 +#define evtimer_pending(ev, tv)                event_pending(ev, EV_TIMEOUT, tv)
61337 +#define evtimer_initialized(ev)                ((ev)->ev_flags & EVLIST_INIT)
61338 +
61339 +#define timeout_add(ev, tv)            event_add(ev, tv)
61340 +#define timeout_set(ev, cb, arg)       event_set(ev, -1, 0, cb, arg)
61341 +#define timeout_del(ev)                        event_del(ev)
61342 +#define timeout_pending(ev, tv)                event_pending(ev, EV_TIMEOUT, tv)
61343 +#define timeout_initialized(ev)                ((ev)->ev_flags & EVLIST_INIT)
61344 +
61345 +#define signal_add(ev, tv)             event_add(ev, tv)
61346 +#define signal_set(ev, x, cb, arg)     \
61347 +       event_set(ev, x, EV_SIGNAL|EV_PERSIST, cb, arg)
61348 +#define signal_del(ev)                 event_del(ev)
61349 +#define signal_pending(ev, tv)         event_pending(ev, EV_SIGNAL, tv)
61350 +#define signal_initialized(ev)         ((ev)->ev_flags & EVLIST_INIT)
61351 +
61352 +void event_set(struct event *, int, short, void (*)(int, short, void *), void *);
61353 +int event_once(int, short, void (*)(int, short, void *), void *, struct timeval *);
61354 +int event_base_once(struct event_base *, int, short, void (*)(int, short, void *), void *, struct timeval *);
61355 +
61356 +int event_add(struct event *, struct timeval *);
61357 +int event_del(struct event *);
61358 +void event_active(struct event *, int, short);
61359 +
61360 +int event_pending(struct event *, short, struct timeval *);
61361 +
61362 +#ifdef WIN32
61363 +#define event_initialized(ev)          ((ev)->ev_flags & EVLIST_INIT && (ev)->ev_fd != (int)INVALID_HANDLE_VALUE)
61364 +#else
61365 +#define event_initialized(ev)          ((ev)->ev_flags & EVLIST_INIT)
61366 +#endif
61367 +
61368 +/* Some simple debugging functions */
61369 +const char *event_get_version(void);
61370 +const char *event_get_method(void);
61371 +
61372 +/* These functions deal with event priorities */
61373 +
61374 +int    event_priority_init(int);
61375 +int    event_base_priority_init(struct event_base *, int);
61376 +int    event_priority_set(struct event *, int);
61377 +
61378 +/* These functions deal with buffering input and output */
61379 +
61380 +struct evbuffer {
61381 +       u_char *buffer;
61382 +       u_char *orig_buffer;
61383 +
61384 +       size_t misalign;
61385 +       size_t totallen;
61386 +       size_t off;
61387 +
61388 +       void (*cb)(struct evbuffer *, size_t, size_t, void *);
61389 +       void *cbarg;
61390 +};
61391 +
61392 +/* Just for error reporting - use other constants otherwise */
61393 +#define EVBUFFER_READ          0x01
61394 +#define EVBUFFER_WRITE         0x02
61395 +#define EVBUFFER_EOF           0x10
61396 +#define EVBUFFER_ERROR         0x20
61397 +#define EVBUFFER_TIMEOUT       0x40
61398 +
61399 +struct bufferevent;
61400 +typedef void (*evbuffercb)(struct bufferevent *, void *);
61401 +typedef void (*everrorcb)(struct bufferevent *, short what, void *);
61402 +
61403 +struct event_watermark {
61404 +       size_t low;
61405 +       size_t high;
61406 +};
61407 +
61408 +struct bufferevent {
61409 +       struct event ev_read;
61410 +       struct event ev_write;
61411 +
61412 +       struct evbuffer *input;
61413 +       struct evbuffer *output;
61414 +
61415 +       struct event_watermark wm_read;
61416 +       struct event_watermark wm_write;
61417 +
61418 +       evbuffercb readcb;
61419 +       evbuffercb writecb;
61420 +       everrorcb errorcb;
61421 +       void *cbarg;
61422 +
61423 +       int timeout_read;       /* in seconds */
61424 +       int timeout_write;      /* in seconds */
61425 +
61426 +       short enabled;  /* events that are currently enabled */
61427 +};
61428 +
61429 +struct bufferevent *bufferevent_new(int fd,
61430 +    evbuffercb readcb, evbuffercb writecb, everrorcb errorcb, void *cbarg);
61431 +int bufferevent_base_set(struct event_base *base, struct bufferevent *bufev);
61432 +int bufferevent_priority_set(struct bufferevent *bufev, int pri);
61433 +void bufferevent_free(struct bufferevent *bufev);
61434 +int bufferevent_write(struct bufferevent *bufev, void *data, size_t size);
61435 +int bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer *buf);
61436 +size_t bufferevent_read(struct bufferevent *bufev, void *data, size_t size);
61437 +int bufferevent_enable(struct bufferevent *bufev, short event);
61438 +int bufferevent_disable(struct bufferevent *bufev, short event);
61439 +void bufferevent_settimeout(struct bufferevent *bufev,
61440 +    int timeout_read, int timeout_write);
61441 +
61442 +#define EVBUFFER_LENGTH(x)     (x)->off
61443 +#define EVBUFFER_DATA(x)       (x)->buffer
61444 +#define EVBUFFER_INPUT(x)      (x)->input
61445 +#define EVBUFFER_OUTPUT(x)     (x)->output
61446 +
61447 +struct evbuffer *evbuffer_new(void);
61448 +void evbuffer_free(struct evbuffer *);
61449 +int evbuffer_expand(struct evbuffer *, size_t);
61450 +int evbuffer_add(struct evbuffer *, const void *, size_t);
61451 +int evbuffer_remove(struct evbuffer *, void *, size_t);
61452 +char *evbuffer_readline(struct evbuffer *);
61453 +int evbuffer_add_buffer(struct evbuffer *, struct evbuffer *);
61454 +int evbuffer_add_printf(struct evbuffer *, const char *fmt, ...);
61455 +int evbuffer_add_vprintf(struct evbuffer *, const char *fmt, va_list ap);
61456 +void evbuffer_drain(struct evbuffer *, size_t);
61457 +int evbuffer_write(struct evbuffer *, int);
61458 +int evbuffer_read(struct evbuffer *, int, int);
61459 +u_char *evbuffer_find(struct evbuffer *, const u_char *, size_t);
61460 +void evbuffer_setcb(struct evbuffer *, void (*)(struct evbuffer *, size_t, size_t, void *), void *);
61461 +
61462 +/* 
61463 + * Marshaling tagged data - We assume that all tags are inserted in their
61464 + * numeric order - so that unknown tags will always be higher than the
61465 + * known ones - and we can just ignore the end of an event buffer.
61466 + */
61467 +
61468 +void evtag_init(void);
61469 +
61470 +void evtag_marshal(struct evbuffer *evbuf, uint8_t tag, const void *data,
61471 +    uint32_t len);
61472 +
61473 +void encode_int(struct evbuffer *evbuf, uint32_t number);
61474 +
61475 +void evtag_marshal_int(struct evbuffer *evbuf, uint8_t tag,
61476 +    uint32_t integer);
61477 +
61478 +void evtag_marshal_string(struct evbuffer *buf, uint8_t tag,
61479 +    const char *string);
61480 +
61481 +void evtag_marshal_timeval(struct evbuffer *evbuf, uint8_t tag,
61482 +    struct timeval *tv);
61483 +
61484 +void evtag_test(void);
61485 +
61486 +int evtag_unmarshal(struct evbuffer *src, uint8_t *ptag,
61487 +    struct evbuffer *dst);
61488 +int evtag_peek(struct evbuffer *evbuf, uint8_t *ptag);
61489 +int evtag_peek_length(struct evbuffer *evbuf, uint32_t *plength);
61490 +int evtag_payload_length(struct evbuffer *evbuf, uint32_t *plength);
61491 +int evtag_consume(struct evbuffer *evbuf);
61492 +
61493 +int evtag_unmarshal_int(struct evbuffer *evbuf, uint8_t need_tag,
61494 +    uint32_t *pinteger);
61495 +
61496 +int evtag_unmarshal_fixed(struct evbuffer *src, uint8_t need_tag, void *data,
61497 +    size_t len);
61498 +
61499 +int evtag_unmarshal_string(struct evbuffer *evbuf, uint8_t need_tag,
61500 +    char **pstring);
61501 +
61502 +int evtag_unmarshal_timeval(struct evbuffer *evbuf, uint8_t need_tag,
61503 +    struct timeval *ptv);
61504 +
61505 +#ifdef __cplusplus
61506 +}
61507 +#endif
61508 +
61509 +#endif /* _EVENT_H_ */
61510 diff -Nru php-5.2.4.vanilla/libevent/event-internal.h php-5.2.4.fpm/libevent/event-internal.h
61511 --- php-5.2.4.vanilla/libevent/event-internal.h 1970-01-01 03:00:00.000000000 +0300
61512 +++ php-5.2.4.fpm/libevent/event-internal.h     2007-08-31 15:47:19.000000000 +0400
61513 @@ -0,0 +1,61 @@
61514 +/*
61515 + * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu>
61516 + * All rights reserved.
61517 + *
61518 + * Redistribution and use in source and binary forms, with or without
61519 + * modification, are permitted provided that the following conditions
61520 + * are met:
61521 + * 1. Redistributions of source code must retain the above copyright
61522 + *    notice, this list of conditions and the following disclaimer.
61523 + * 2. Redistributions in binary form must reproduce the above copyright
61524 + *    notice, this list of conditions and the following disclaimer in the
61525 + *    documentation and/or other materials provided with the distribution.
61526 + * 3. The name of the author may not be used to endorse or promote products
61527 + *    derived from this software without specific prior written permission.
61528 + *
61529 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
61530 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
61531 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
61532 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
61533 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
61534 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
61535 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
61536 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
61537 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
61538 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61539 + */
61540 +#ifndef _EVENT_INTERNAL_H_
61541 +#define _EVENT_INTERNAL_H_
61542 +
61543 +#ifdef __cplusplus
61544 +extern "C" {
61545 +#endif
61546 +
61547 +#include "evsignal.h"
61548 +
61549 +struct event_base {
61550 +       const struct eventop *evsel;
61551 +       void *evbase;
61552 +       int event_count;                /* counts number of total events */
61553 +       int event_count_active; /* counts number of active events */
61554 +
61555 +       int event_gotterm;              /* Set to terminate loop */
61556 +
61557 +       /* active event management */
61558 +       struct event_list **activequeues;
61559 +       int nactivequeues;
61560 +
61561 +       /* signal handling info */
61562 +       struct evsignal_info sig;
61563 +
61564 +       struct event_list eventqueue;
61565 +       struct timeval event_tv;
61566 +
61567 +       RB_HEAD(event_tree, event) timetree;
61568 +};
61569 +
61570 +#ifdef __cplusplus
61571 +}
61572 +#endif
61573 +
61574 +#endif /* _EVENT_INTERNAL_H_ */
61575 diff -Nru php-5.2.4.vanilla/libevent/event_rpcgen.py php-5.2.4.fpm/libevent/event_rpcgen.py
61576 --- php-5.2.4.vanilla/libevent/event_rpcgen.py  1970-01-01 03:00:00.000000000 +0300
61577 +++ php-5.2.4.fpm/libevent/event_rpcgen.py      2007-08-31 15:47:19.000000000 +0400
61578 @@ -0,0 +1,1394 @@
61579 +#!/usr/bin/env python
61580 +#
61581 +# Copyright (c) 2005 Niels Provos <provos@citi.umich.edu>
61582 +# All rights reserved.
61583 +#
61584 +# Generates marshaling code based on libevent.
61585 +
61586 +import sys
61587 +import re
61588 +
61589 +#
61590 +_NAME = "event_rpcgen.py"
61591 +_VERSION = "0.1"
61592 +_STRUCT_RE = '[a-z][a-z_0-9]*'
61593 +
61594 +# Globals
61595 +line_count = 0
61596 +
61597 +white = re.compile(r'^\s+')
61598 +cppcomment = re.compile(r'\/\/.*$')
61599 +headerdirect = []
61600 +cppdirect = []
61601 +
61602 +# Holds everything that makes a struct
61603 +class Struct:
61604 +    def __init__(self, name):
61605 +        self._name = name
61606 +        self._entries = []
61607 +        self._tags = {}
61608 +        print >>sys.stderr, '  Created struct: %s' % name
61609 +
61610 +    def AddEntry(self, entry):
61611 +        if self._tags.has_key(entry.Tag()):
61612 +            print >>sys.stderr, ( 'Entry "%s" duplicates tag number '
61613 +                                  '%d from "%s" around line %d' ) % (
61614 +                entry.Name(), entry.Tag(),
61615 +                self._tags[entry.Tag()], line_count)
61616 +            sys.exit(1)
61617 +        self._entries.append(entry)
61618 +        self._tags[entry.Tag()] = entry.Name()
61619 +        print >>sys.stderr, '    Added entry: %s' % entry.Name()
61620 +
61621 +    def Name(self):
61622 +        return self._name
61623 +
61624 +    def EntryTagName(self, entry):
61625 +        """Creates the name inside an enumeration for distinguishing data
61626 +        types."""
61627 +        name = "%s_%s" % (self._name, entry.Name())
61628 +        return name.upper()
61629 +
61630 +    def PrintIdented(self, file, ident, code):
61631 +        """Takes an array, add indentation to each entry and prints it."""
61632 +        for entry in code:
61633 +            print >>file, '%s%s' % (ident, entry)
61634 +
61635 +    def PrintTags(self, file):
61636 +        """Prints the tag definitions for a structure."""
61637 +        print >>file, '/* Tag definition for %s */' % self._name
61638 +        print >>file, 'enum %s_ {' % self._name.lower()
61639 +        for entry in self._entries:
61640 +            print >>file, '  %s=%d,' % (self.EntryTagName(entry),
61641 +                                        entry.Tag())
61642 +        print >>file, '  %s_MAX_TAGS' % (self._name.upper())
61643 +        print >>file, '};\n'
61644 +
61645 +    def PrintForwardDeclaration(self, file):
61646 +        print >>file, 'struct %s;' % self._name
61647 +
61648 +    def PrintDeclaration(self, file):
61649 +        print >>file, '/* Structure declaration for %s */' % self._name
61650 +        print >>file, 'struct %s {' % self._name
61651 +        for entry in self._entries:
61652 +            dcl = entry.Declaration()
61653 +            dcl.extend(
61654 +                entry.AssignDeclaration('(*%s_assign)' % entry.Name()))
61655 +            dcl.extend(
61656 +                entry.GetDeclaration('(*%s_get)' % entry.Name()))
61657 +            if entry.Array():
61658 +                dcl.extend(
61659 +                    entry.AddDeclaration('(*%s_add)' % entry.Name()))
61660 +            self.PrintIdented(file, '  ', dcl)
61661 +        print >>file, ''
61662 +        for entry in self._entries:
61663 +            print >>file, '  u_int8_t %s_set;' % entry.Name()
61664 +        print >>file, '};\n'
61665 +
61666 +        print >>file, (
61667 +            'struct %s *%s_new();\n' % (self._name, self._name) +
61668 +            'void %s_free(struct %s *);\n' % (self._name, self._name) +
61669 +            'void %s_clear(struct %s *);\n' % (self._name, self._name) +
61670 +            'void %s_marshal(struct evbuffer *, const struct %s *);\n' % (
61671 +            self._name, self._name) +
61672 +            'int %s_unmarshal(struct %s *, struct evbuffer *);\n' % (
61673 +            self._name, self._name) +
61674 +            'int %s_complete(struct %s *);' % (self._name, self._name)
61675 +            )
61676 +        print >>file, ('void evtag_marshal_%s(struct evbuffer *, u_int8_t, '
61677 +                       'const struct %s *);') % ( self._name, self._name)
61678 +        print >>file, ('int evtag_unmarshal_%s(struct evbuffer *, u_int8_t, '
61679 +                       'struct %s *);') % ( self._name, self._name)
61680 +
61681 +        # Write a setting function of every variable
61682 +        for entry in self._entries:
61683 +            self.PrintIdented(file, '', entry.AssignDeclaration(
61684 +                entry.AssignFuncName()))
61685 +            self.PrintIdented(file, '', entry.GetDeclaration(
61686 +                entry.GetFuncName()))
61687 +            if entry.Array():
61688 +                self.PrintIdented(file, '', entry.AddDeclaration(
61689 +                    entry.AddFuncName()))
61690 +
61691 +        print >>file, '/* --- %s done --- */\n' % self._name
61692 +
61693 +    def PrintCode(self, file):
61694 +        print >>file, ('/*\n'
61695 +                       ' * Implementation of %s\n'
61696 +                       ' */\n') % self._name
61697 +
61698 +        # Creation
61699 +        print >>file, ( 'struct %s *\n' % self._name +
61700 +                        '%s_new()\n' % self._name +
61701 +                        '{\n'
61702 +                        '  struct %s *tmp;\n' % self._name +
61703 +                        '  if ((tmp = malloc(sizeof(struct %s))) == NULL) {\n'
61704 +                        '    event_warn("%%s: malloc", __func__);\n'
61705 +                        '    return (NULL);\n' % self._name +
61706 +                        '  }'
61707 +                        )
61708 +        for entry in self._entries:
61709 +            self.PrintIdented(file, '  ', entry.CodeNew('tmp'))
61710 +            print >>file, '  tmp->%s_set = 0;\n' % entry.Name()
61711 +
61712 +        print >>file, ('  return (tmp);\n'
61713 +                       '}\n')
61714 +
61715 +        # Adding
61716 +        for entry in self._entries:
61717 +            if entry.Array():
61718 +                self.PrintIdented(file, '', entry.CodeAdd())
61719 +            print >>file, ''
61720 +            
61721 +        # Assigning
61722 +        for entry in self._entries:
61723 +            self.PrintIdented(file, '', entry.CodeAssign())
61724 +            print >>file, ''
61725 +
61726 +        # Getting
61727 +        for entry in self._entries:
61728 +            self.PrintIdented(file, '', entry.CodeGet())
61729 +            print >>file, ''
61730 +            
61731 +        # Clearing
61732 +        print >>file, ( 'void\n'
61733 +                        '%s_clear(struct %s *tmp)\n' % (
61734 +            self._name, self._name)+
61735 +                        '{'
61736 +                        )
61737 +        for entry in self._entries:
61738 +            self.PrintIdented(file, '  ', entry.CodeClear('tmp'))
61739 +
61740 +        print >>file, '}\n'
61741 +
61742 +        # Freeing
61743 +        print >>file, ( 'void\n'
61744 +                        '%s_free(struct %s *tmp)\n' % (
61745 +            self._name, self._name)+
61746 +                        '{'
61747 +                        )
61748 +        for entry in self._entries:
61749 +            self.PrintIdented(file, '  ', entry.CodeFree('tmp'))
61750 +
61751 +        print >>file, ('  free(tmp);\n'
61752 +                       '}\n')
61753 +
61754 +        # Marshaling
61755 +        print >>file, ('void\n'
61756 +                       '%s_marshal(struct evbuffer *evbuf, '
61757 +                       'const struct %s *tmp)' % (self._name, self._name) +
61758 +                       '{')
61759 +        for entry in self._entries:
61760 +            indent = '  '
61761 +            # Optional entries do not have to be set
61762 +            if entry.Optional():
61763 +                indent += '  '
61764 +                print >>file, '  if (tmp->%s_set) {' % entry.Name()
61765 +            self.PrintIdented(
61766 +                file, indent,
61767 +                entry.CodeMarshal('evbuf', self.EntryTagName(entry), 'tmp'))
61768 +            if entry.Optional():
61769 +                print >>file, '  }'
61770 +
61771 +        print >>file, '}\n'
61772 +                       
61773 +        # Unmarshaling
61774 +        print >>file, ('int\n'
61775 +                       '%s_unmarshal(struct %s *tmp, '
61776 +                       ' struct evbuffer *evbuf)\n' % (
61777 +            self._name, self._name) +
61778 +                       '{\n'
61779 +                       '  u_int8_t tag;\n'
61780 +                       '  while (EVBUFFER_LENGTH(evbuf) > 0) {\n'
61781 +                       '    if (evtag_peek(evbuf, &tag) == -1)\n'
61782 +                       '      return (-1);\n'
61783 +                       '    switch (tag) {\n'
61784 +                       )
61785 +        for entry in self._entries:
61786 +            print >>file, '      case %s:\n' % self.EntryTagName(entry)
61787 +            if not entry.Array():
61788 +                print >>file, (
61789 +                    '        if (tmp->%s_set)\n'
61790 +                    '          return (-1);'
61791 +                    ) % (entry.Name())
61792 +
61793 +            self.PrintIdented(
61794 +                file, '        ',
61795 +                entry.CodeUnmarshal('evbuf',
61796 +                                    self.EntryTagName(entry), 'tmp'))
61797 +
61798 +            print >>file, ( '        tmp->%s_set = 1;\n' % entry.Name() +
61799 +                            '        break;\n' )
61800 +        print >>file, ( '      default:\n'
61801 +                        '        return -1;\n'
61802 +                        '    }\n'
61803 +                        '  }\n' )
61804 +        # Check if it was decoded completely
61805 +        print >>file, ( '  if (%s_complete(tmp) == -1)\n' % self._name +
61806 +                        '    return (-1);')
61807 +
61808 +        # Successfully decoded
61809 +        print >>file, ( '  return (0);\n'
61810 +                        '}\n')
61811 +
61812 +        # Checking if a structure has all the required data
61813 +        print >>file, (
61814 +            'int\n'
61815 +            '%s_complete(struct %s *msg)\n' % (self._name, self._name) +
61816 +            '{' )
61817 +        for entry in self._entries:
61818 +            self.PrintIdented(
61819 +                file, '  ',
61820 +                entry.CodeComplete('msg'))
61821 +        print >>file, (
61822 +            '  return (0);\n'
61823 +            '}\n' )
61824 +
61825 +        # Complete message unmarshaling
61826 +        print >>file, (
61827 +            'int\n'
61828 +            'evtag_unmarshal_%s(struct evbuffer *evbuf, u_int8_t need_tag, '
61829 +            ' struct %s *msg)'
61830 +            ) % (self._name, self._name)
61831 +        print >>file, (
61832 +            '{\n'
61833 +            '  u_int8_t tag;\n'
61834 +            '  int res = -1;\n'
61835 +            '\n'
61836 +            '  struct evbuffer *tmp = evbuffer_new();\n'
61837 +            '\n'
61838 +            '  if (evtag_unmarshal(evbuf, &tag, tmp) == -1'
61839 +            ' || tag != need_tag)\n'
61840 +            '    goto error;\n'
61841 +            '\n'
61842 +            '  if (%s_unmarshal(msg, tmp) == -1)\n'
61843 +            '    goto error;\n'
61844 +            '\n'
61845 +            '  res = 0;\n'
61846 +            '\n'
61847 +            ' error:\n'
61848 +            '  evbuffer_free(tmp);\n'
61849 +            '  return (res);\n'
61850 +            '}\n' ) % self._name
61851 +
61852 +        # Complete message marshaling
61853 +        print >>file, (
61854 +            'void\n'
61855 +            'evtag_marshal_%s(struct evbuffer *evbuf, u_int8_t tag, '
61856 +            'const struct %s *msg)\n' % (self._name, self._name) +
61857 +            '{\n'
61858 +            '  struct evbuffer *_buf = evbuffer_new();\n'
61859 +            '  assert(_buf != NULL);\n'
61860 +            '  evbuffer_drain(_buf, -1);\n'
61861 +            '  %s_marshal(_buf, msg);\n' % self._name +
61862 +            '  evtag_marshal(evbuf, tag, EVBUFFER_DATA(_buf), '
61863 +            'EVBUFFER_LENGTH(_buf));\n'
61864 +            '  evbuffer_free(_buf);\n'
61865 +            '}\n' )
61866 +
61867 +class Entry:
61868 +    def __init__(self, type, name, tag):
61869 +        self._type = type
61870 +        self._name = name
61871 +        self._tag = int(tag)
61872 +        self._ctype = type
61873 +        self._optional = 0
61874 +        self._can_be_array = 0
61875 +        self._array = 0
61876 +        self._line_count = -1
61877 +        self._struct = None
61878 +
61879 +    def SetStruct(self, struct):
61880 +        self._struct = struct
61881 +
61882 +    def LineCount(self):
61883 +        assert self._line_count != -1
61884 +        return self._line_count
61885 +
61886 +    def SetLineCount(self, number):
61887 +        self._line_count = number
61888 +
61889 +    def Array(self):
61890 +        return self._array
61891 +
61892 +    def Optional(self):
61893 +        return self._optional
61894 +
61895 +    def Tag(self):
61896 +        return self._tag
61897 +
61898 +    def Name(self):
61899 +        return self._name
61900 +
61901 +    def Type(self):
61902 +        return self._type
61903 +
61904 +    def MakeArray(self, yes=1):
61905 +        self._array = yes
61906 +        
61907 +    def MakeOptional(self):
61908 +        self._optional = 1
61909 +
61910 +    def GetFuncName(self):
61911 +        return '%s_%s_get' % (self._struct.Name(), self._name)
61912 +    
61913 +    def GetDeclaration(self, funcname):
61914 +        code = [ 'int %s(struct %s *, %s *);' % (
61915 +            funcname, self._struct.Name(), self._ctype ) ]
61916 +        return code
61917 +
61918 +    def CodeGet(self):
61919 +        code = [ 'int',
61920 +                 '%s_%s_get(struct %s *msg, %s *value)' % (
61921 +            self._struct.Name(), self._name,
61922 +            self._struct.Name(), self._ctype),
61923 +                 '{',
61924 +                 '  if (msg->%s_set != 1)' % self._name,
61925 +                 '    return (-1);',
61926 +                 '  *value = msg->%s_data;' % self._name,
61927 +                 '  return (0);',
61928 +                 '}' ]
61929 +        return code
61930 +        
61931 +    def AssignFuncName(self):
61932 +        return '%s_%s_assign' % (self._struct.Name(), self._name)
61933 +    
61934 +    def AddFuncName(self):
61935 +        return '%s_%s_add' % (self._struct.Name(), self._name)
61936 +    
61937 +    def AssignDeclaration(self, funcname):
61938 +        code = [ 'int %s(struct %s *, const %s);' % (
61939 +            funcname, self._struct.Name(), self._ctype ) ]
61940 +        return code
61941 +
61942 +    def CodeAssign(self):
61943 +        code = [ 'int',
61944 +                 '%s_%s_assign(struct %s *msg, const %s value)' % (
61945 +            self._struct.Name(), self._name,
61946 +            self._struct.Name(), self._ctype),
61947 +                 '{',
61948 +                 '  msg->%s_set = 1;' % self._name,
61949 +                 '  msg->%s_data = value;' % self._name,
61950 +                 '  return (0);',
61951 +                 '}' ]
61952 +        return code
61953 +
61954 +    def CodeClear(self, structname):
61955 +        code = [ '%s->%s_set = 0;' % (structname, self.Name()) ]
61956 +
61957 +        return code
61958 +        
61959 +    def CodeComplete(self, structname):
61960 +        if self.Optional():
61961 +            return []
61962 +        
61963 +        code = [ 'if (!%s->%s_set)' % (structname, self.Name()),
61964 +                 '  return (-1);' ]
61965 +
61966 +        return code
61967 +
61968 +    def CodeFree(self, name):
61969 +        return []
61970 +
61971 +    def CodeNew(self, name):
61972 +        code = [ '%s->%s_assign = %s_%s_assign;' % (
61973 +            name, self._name, self._struct.Name(), self._name ),
61974 +                 '%s->%s_get = %s_%s_get;' % (
61975 +            name, self._name, self._struct.Name(), self._name ),
61976 +        ]
61977 +        if self.Array():
61978 +            code.append(
61979 +                '%s->%s_add = %s_%s_add;' % (
61980 +                name, self._name, self._struct.Name(), self._name ) )
61981 +        return code
61982 +
61983 +    def Verify(self):
61984 +        if self.Array() and not self._can_be_array:
61985 +            print >>sys.stderr, (
61986 +                'Entry "%s" cannot be created as an array '
61987 +                'around line %d' ) % (self._name, self.LineCount())
61988 +            sys.exit(1)
61989 +        if not self._struct:
61990 +            print >>sys.stderr, (
61991 +                'Entry "%s" does not know which struct it belongs to '
61992 +                'around line %d' ) % (self._name, self.LineCount())
61993 +            sys.exit(1)
61994 +        if self._optional and self._array:
61995 +            print >>sys.stderr,  ( 'Entry "%s" has illegal combination of '
61996 +                                   'optional and array around line %d' ) % (
61997 +                self._name, self.LineCount() )
61998 +            sys.exit(1)
61999 +
62000 +class EntryBytes(Entry):
62001 +    def __init__(self, type, name, tag, length):
62002 +        # Init base class
62003 +        Entry.__init__(self, type, name, tag)
62004 +
62005 +        self._length = length
62006 +        self._ctype = 'u_int8_t'
62007 +
62008 +    def GetDeclaration(self, funcname):
62009 +        code = [ 'int %s(struct %s *, %s **);' % (
62010 +            funcname, self._struct.Name(), self._ctype ) ]
62011 +        return code
62012 +        
62013 +    def AssignDeclaration(self, funcname):
62014 +        code = [ 'int %s(struct %s *, const %s *);' % (
62015 +            funcname, self._struct.Name(), self._ctype ) ]
62016 +        return code
62017 +        
62018 +    def Declaration(self):
62019 +        dcl  = ['u_int8_t %s_data[%s];' % (self._name, self._length)]
62020 +        
62021 +        return dcl
62022 +
62023 +    def CodeGet(self):
62024 +        name = self._name
62025 +        code = [ 'int',
62026 +                 '%s_%s_get(struct %s *msg, %s **value)' % (
62027 +            self._struct.Name(), name,
62028 +            self._struct.Name(), self._ctype),
62029 +                 '{',
62030 +                 '  if (msg->%s_set != 1)' % name,
62031 +                 '    return (-1);',
62032 +                 '  *value = msg->%s_data;' % name,
62033 +                 '  return (0);',
62034 +                 '}' ]
62035 +        return code
62036 +        
62037 +    def CodeAssign(self):
62038 +        name = self._name
62039 +        code = [ 'int',
62040 +                 '%s_%s_assign(struct %s *msg, const %s *value)' % (
62041 +            self._struct.Name(), name,
62042 +            self._struct.Name(), self._ctype),
62043 +                 '{',
62044 +                 '  msg->%s_set = 1;' % name,
62045 +                 '  memcpy(msg->%s_data, value, %s);' % (
62046 +            name, self._length),
62047 +                 '  return (0);',
62048 +                 '}' ]
62049 +        return code
62050 +        
62051 +    def CodeUnmarshal(self, buf, tag_name, var_name):
62052 +        code = [  'if (evtag_unmarshal_fixed(%s, %s, ' % (buf, tag_name) +
62053 +                  '%s->%s_data, ' % (var_name, self._name) +
62054 +                  'sizeof(%s->%s_data)) == -1) {' % (
62055 +            var_name, self._name),
62056 +                  '  event_warnx("%%s: failed to unmarshal %s", __func__);' % (
62057 +            self._name ),
62058 +                  '  return (-1);',
62059 +                  '}'
62060 +                  ]
62061 +        return code
62062 +
62063 +    def CodeMarshal(self, buf, tag_name, var_name):
62064 +        code = ['evtag_marshal(%s, %s, %s->%s_data, sizeof(%s->%s_data));' % (
62065 +            buf, tag_name, var_name, self._name, var_name, self._name )]
62066 +        return code
62067 +
62068 +    def CodeClear(self, structname):
62069 +        code = [ '%s->%s_set = 0;' % (structname, self.Name()),
62070 +                 'memset(%s->%s_data, 0, sizeof(%s->%s_data));' % (
62071 +            structname, self._name, structname, self._name)]
62072 +
62073 +        return code
62074 +        
62075 +    def CodeNew(self, name):
62076 +        code  = ['memset(%s->%s_data, 0, sizeof(%s->%s_data));' % (
62077 +            name, self._name, name, self._name)]
62078 +        code.extend(Entry.CodeNew(self, name))
62079 +        return code
62080 +
62081 +    def Verify(self):
62082 +        if not self._length:
62083 +            print >>sys.stderr, 'Entry "%s" needs a length around line %d' % (
62084 +                self._name, self.LineCount() )
62085 +            sys.exit(1)
62086 +
62087 +        Entry.Verify(self)
62088 +
62089 +class EntryInt(Entry):
62090 +    def __init__(self, type, name, tag):
62091 +        # Init base class
62092 +        Entry.__init__(self, type, name, tag)
62093 +
62094 +        self._ctype = 'u_int32_t'
62095 +
62096 +    def CodeUnmarshal(self, buf, tag_name, var_name):
62097 +        code = ['if (evtag_unmarshal_int(%s, %s, &%s->%s_data) == -1) {' % (
62098 +            buf, tag_name, var_name, self._name),
62099 +                  '  event_warnx("%%s: failed to unmarshal %s", __func__);' % (
62100 +            self._name ),
62101 +                '  return (-1);',
62102 +                '}' ] 
62103 +        return code
62104 +
62105 +    def CodeMarshal(self, buf, tag_name, var_name):
62106 +        code = ['evtag_marshal_int(%s, %s, %s->%s_data);' % (
62107 +            buf, tag_name, var_name, self._name)]
62108 +        return code
62109 +
62110 +    def Declaration(self):
62111 +        dcl  = ['u_int32_t %s_data;' % self._name]
62112 +
62113 +        return dcl
62114 +
62115 +class EntryString(Entry):
62116 +    def __init__(self, type, name, tag):
62117 +        # Init base class
62118 +        Entry.__init__(self, type, name, tag)
62119 +
62120 +        self._ctype = 'char *'
62121 +
62122 +    def CodeAssign(self):
62123 +        name = self._name
62124 +        code = [ 'int',
62125 +                 '%s_%s_assign(struct %s *msg, const %s value)' % (
62126 +            self._struct.Name(), name,
62127 +            self._struct.Name(), self._ctype),
62128 +                 '{',
62129 +                 '  if (msg->%s_data != NULL)' % name,
62130 +                 '    free(msg->%s_data);' % name,
62131 +                 '  if ((msg->%s_data = strdup(value)) == NULL)' % name,
62132 +                 '    return (-1);',
62133 +                 '  msg->%s_set = 1;' % name,
62134 +                 '  return (0);',
62135 +                 '}' ]
62136 +        return code
62137 +        
62138 +    def CodeUnmarshal(self, buf, tag_name, var_name):
62139 +        code = ['if (evtag_unmarshal_string(%s, %s, &%s->%s_data) == -1) {' % (
62140 +            buf, tag_name, var_name, self._name),
62141 +                '  event_warnx("%%s: failed to unmarshal %s", __func__);' % (
62142 +            self._name ),
62143 +                '  return (-1);',
62144 +                '}'
62145 +                ]
62146 +        return code
62147 +
62148 +    def CodeMarshal(self, buf, tag_name, var_name):
62149 +        code = ['evtag_marshal_string(%s, %s, %s->%s_data);' % (
62150 +            buf, tag_name, var_name, self._name)]
62151 +        return code
62152 +
62153 +    def CodeClear(self, structname):
62154 +        code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()),
62155 +                 '  free (%s->%s_data);' % (structname, self.Name()),
62156 +                 '  %s->%s_data = NULL;' % (structname, self.Name()),
62157 +                 '  %s->%s_set = 0;' % (structname, self.Name()),
62158 +                 '}'
62159 +                 ]
62160 +
62161 +        return code
62162 +        
62163 +    def CodeNew(self, name):
62164 +        code  = ['%s->%s_data = NULL;' % (name, self._name)]
62165 +        code.extend(Entry.CodeNew(self, name))
62166 +        return code
62167 +
62168 +    def CodeFree(self, name):
62169 +        code  = ['if (%s->%s_data != NULL)' % (name, self._name),
62170 +                 '    free (%s->%s_data); ' % (name, self._name)]
62171 +
62172 +        return code
62173 +
62174 +    def Declaration(self):
62175 +        dcl  = ['char *%s_data;' % self._name]
62176 +
62177 +        return dcl
62178 +
62179 +class EntryStruct(Entry):
62180 +    def __init__(self, type, name, tag, refname):
62181 +        # Init base class
62182 +        Entry.__init__(self, type, name, tag)
62183 +
62184 +        self._can_be_array = 1
62185 +        self._refname = refname
62186 +        self._ctype = 'struct %s' % refname
62187 +
62188 +    def GetDeclaration(self, funcname):
62189 +        code = [ 'int %s(struct %s *, %s **);' % (
62190 +            funcname, self._struct.Name(), self._ctype ) ]
62191 +        return code
62192 +        
62193 +    def AssignDeclaration(self, funcname):
62194 +        code = [ 'int %s(struct %s *, const %s *);' % (
62195 +            funcname, self._struct.Name(), self._ctype ) ]
62196 +        return code
62197 +        
62198 +    def CodeGet(self):
62199 +        name = self._name
62200 +        code = [ 'int',
62201 +                 '%s_%s_get(struct %s *msg, %s **value)' % (
62202 +            self._struct.Name(), name,
62203 +            self._struct.Name(), self._ctype),
62204 +                 '{',
62205 +                 '  if (msg->%s_set != 1) {' % name,
62206 +                 '    msg->%s_data = %s_new();' % (name, self._refname),
62207 +                 '    if (msg->%s_data == NULL)' % name,
62208 +                 '      return (-1);',
62209 +                 '    msg->%s_set = 1;' % name,
62210 +                 '  }',
62211 +                 '  *value = msg->%s_data;' % name,
62212 +                 '  return (0);',
62213 +                 '}' ]
62214 +        return code
62215 +        
62216 +    def CodeAssign(self):
62217 +        name = self._name
62218 +        code = [ 'int',
62219 +                 '%s_%s_assign(struct %s *msg, const %s *value)' % (
62220 +            self._struct.Name(), name,
62221 +            self._struct.Name(), self._ctype),
62222 +                 '{',
62223 +                 '  struct evbuffer *tmp = NULL;',
62224 +                 '  if (msg->%s_set) {' % name,
62225 +                 '    %s_clear(msg->%s_data);' % (self._refname, name),
62226 +                 '    msg->%s_set = 0;' % name,
62227 +                 '  } else {',
62228 +                 '    msg->%s_data = %s_new();' % (name, self._refname),
62229 +                 '    if (msg->%s_data == NULL) {' % name,
62230 +                 '      event_warn("%%s: %s_new()", __func__);' % (
62231 +            self._refname),
62232 +                 '      goto error;',
62233 +                 '    }',
62234 +                 '  }',
62235 +                 '  if ((tmp = evbuffer_new()) == NULL) {',
62236 +                 '    event_warn("%s: evbuffer_new()", __func__);',
62237 +                 '    goto error;',
62238 +                 '  }',
62239 +                 '  %s_marshal(tmp, value); ' % self._refname,
62240 +                 '  if (%s_unmarshal(msg->%s_data, tmp) == -1) {' % (
62241 +            self._refname, name ),
62242 +                 '    event_warnx("%%s: %s_unmarshal", __func__);' % (
62243 +            self._refname),
62244 +                 '    goto error;',
62245 +                 '  }',
62246 +                 '  msg->%s_set = 1;' % name,
62247 +                 '  evbuffer_free(tmp);',
62248 +                 '  return (0);',
62249 +                 ' error:',
62250 +                 '  if (tmp != NULL)',
62251 +                 '    evbuffer_free(tmp);',
62252 +                 '  if (msg->%s_data != NULL) {' % name,
62253 +                 '    %s_free(msg->%s_data);' % (self._refname, name),
62254 +                 '    msg->%s_data = NULL;' % name,
62255 +                 '  }',
62256 +                 '  return (-1);',
62257 +                 '}' ]
62258 +        return code
62259 +        
62260 +    def CodeComplete(self, structname):
62261 +        if self.Optional():
62262 +            code = [ 'if (%s->%s_set && %s_complete(%s->%s_data) == -1)' % (
62263 +                structname, self.Name(),
62264 +                self._refname, structname, self.Name()),
62265 +                     '  return (-1);' ]
62266 +        else:
62267 +            code = [ 'if (%s_complete(%s->%s_data) == -1)' % (
62268 +                self._refname, structname, self.Name()),
62269 +                     '  return (-1);' ]
62270 +
62271 +        return code
62272 +    
62273 +    def CodeUnmarshal(self, buf, tag_name, var_name):
62274 +        code = ['%s->%s_data = %s_new();' % (
62275 +            var_name, self._name, self._refname),
62276 +                'if (%s->%s_data == NULL)' % (var_name, self._name),
62277 +                '  return (-1);',
62278 +                'if (evtag_unmarshal_%s(%s, %s, %s->%s_data) == -1) {' % (
62279 +            self._refname, buf, tag_name, var_name, self._name),
62280 +                  '  event_warnx("%%s: failed to unmarshal %s", __func__);' % (
62281 +            self._name ),
62282 +                '  return (-1);',
62283 +                '}'
62284 +                ]
62285 +        return code
62286 +
62287 +    def CodeMarshal(self, buf, tag_name, var_name):
62288 +        code = ['evtag_marshal_%s(%s, %s, %s->%s_data);' % (
62289 +            self._refname, buf, tag_name, var_name, self._name)]
62290 +        return code
62291 +
62292 +    def CodeClear(self, structname):
62293 +        code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()),
62294 +                 '  %s_free(%s->%s_data);' % (
62295 +            self._refname, structname, self.Name()),
62296 +                 '  %s->%s_data = NULL;' % (structname, self.Name()),
62297 +                 '  %s->%s_set = 0;' % (structname, self.Name()),
62298 +                 '}'
62299 +                 ]
62300 +
62301 +        return code
62302 +        
62303 +    def CodeNew(self, name):
62304 +        code  = ['%s->%s_data = NULL;' % (name, self._name)]
62305 +        code.extend(Entry.CodeNew(self, name))
62306 +        return code
62307 +
62308 +    def CodeFree(self, name):
62309 +        code  = ['if (%s->%s_data != NULL)' % (name, self._name),
62310 +                 '    %s_free(%s->%s_data); ' % (
62311 +            self._refname, name, self._name)]
62312 +
62313 +        return code
62314 +
62315 +    def Declaration(self):
62316 +        dcl  = ['struct %s *%s_data;' % (self._refname, self._name)]
62317 +
62318 +        return dcl
62319 +
62320 +class EntryVarBytes(Entry):
62321 +    def __init__(self, type, name, tag):
62322 +        # Init base class
62323 +        Entry.__init__(self, type, name, tag)
62324 +
62325 +        self._ctype = 'u_int8_t *'
62326 +
62327 +    def GetDeclaration(self, funcname):
62328 +        code = [ 'int %s(struct %s *, %s *, u_int32_t *);' % (
62329 +            funcname, self._struct.Name(), self._ctype ) ]
62330 +        return code
62331 +        
62332 +    def AssignDeclaration(self, funcname):
62333 +        code = [ 'int %s(struct %s *, const %s, u_int32_t);' % (
62334 +            funcname, self._struct.Name(), self._ctype ) ]
62335 +        return code
62336 +        
62337 +    def CodeAssign(self):
62338 +        name = self._name
62339 +        code = [ 'int',
62340 +                 '%s_%s_assign(struct %s *msg, '
62341 +                 'const %s value, u_int32_t len)' % (
62342 +            self._struct.Name(), name,
62343 +            self._struct.Name(), self._ctype),
62344 +                 '{',
62345 +                 '  if (msg->%s_data != NULL)' % name,
62346 +                 '    free (msg->%s_data);' % name,
62347 +                 '  msg->%s_data = malloc(len);' % name,
62348 +                 '  if (msg->%s_data == NULL)' % name,
62349 +                 '    return (-1);',
62350 +                 '  msg->%s_set = 1;' % name,
62351 +                 '  msg->%s_length = len;' % name,
62352 +                 '  memcpy(msg->%s_data, value, len);' % name,
62353 +                 '  return (0);',
62354 +                 '}' ]
62355 +        return code
62356 +        
62357 +    def CodeGet(self):
62358 +        name = self._name
62359 +        code = [ 'int',
62360 +                 '%s_%s_get(struct %s *msg, %s *value, u_int32_t *plen)' % (
62361 +            self._struct.Name(), name,
62362 +            self._struct.Name(), self._ctype),
62363 +                 '{',
62364 +                 '  if (msg->%s_set != 1)' % name,
62365 +                 '    return (-1);',
62366 +                 '  *value = msg->%s_data;' % name,
62367 +                 '  *plen = msg->%s_length;' % name,
62368 +                 '  return (0);',
62369 +                 '}' ]
62370 +        return code
62371 +
62372 +    def CodeUnmarshal(self, buf, tag_name, var_name):
62373 +        code = ['if (evtag_payload_length(%s, &%s->%s_length) == -1)' % (
62374 +            buf, var_name, self._name),
62375 +                '  return (-1);',
62376 +                # We do not want DoS opportunities
62377 +                'if (%s->%s_length > EVBUFFER_LENGTH(%s))' % (
62378 +            var_name, self._name, buf),
62379 +                '  return (-1);',
62380 +                'if ((%s->%s_data = malloc(%s->%s_length)) == NULL)' % (
62381 +            var_name, self._name, var_name, self._name),
62382 +                '  return (-1);',
62383 +                'if (evtag_unmarshal_fixed(%s, %s, %s->%s_data, '
62384 +                '%s->%s_length) == -1) {' % (
62385 +            buf, tag_name, var_name, self._name, var_name, self._name),
62386 +                '  event_warnx("%%s: failed to unmarshal %s", __func__);' % (
62387 +            self._name ),
62388 +                '  return (-1);',
62389 +                '}'
62390 +                ]
62391 +        return code
62392 +
62393 +    def CodeMarshal(self, buf, tag_name, var_name):
62394 +        code = ['evtag_marshal(%s, %s, %s->%s_data, %s->%s_length);' % (
62395 +            buf, tag_name, var_name, self._name, var_name, self._name)]
62396 +        return code
62397 +
62398 +    def CodeClear(self, structname):
62399 +        code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()),
62400 +                 '  free (%s->%s_data);' % (structname, self.Name()),
62401 +                 '  %s->%s_data = NULL;' % (structname, self.Name()),
62402 +                 '  %s->%s_length = 0;' % (structname, self.Name()),
62403 +                 '  %s->%s_set = 0;' % (structname, self.Name()),
62404 +                 '}'
62405 +                 ]
62406 +
62407 +        return code
62408 +        
62409 +    def CodeNew(self, name):
62410 +        code  = ['%s->%s_data = NULL;' % (name, self._name),
62411 +                 '%s->%s_length = 0;' % (name, self._name) ]
62412 +        code.extend(Entry.CodeNew(self, name))
62413 +        return code
62414 +
62415 +    def CodeFree(self, name):
62416 +        code  = ['if (%s->%s_data != NULL)' % (name, self._name),
62417 +                 '    free (%s->%s_data); ' % (name, self._name)]
62418 +
62419 +        return code
62420 +
62421 +    def Declaration(self):
62422 +        dcl  = ['u_int8_t *%s_data;' % self._name,
62423 +                'u_int32_t %s_length;' % self._name]
62424 +
62425 +        return dcl
62426 +
62427 +class EntryArray(Entry):
62428 +    def __init__(self, entry):
62429 +        # Init base class
62430 +        Entry.__init__(self, entry._type, entry._name, entry._tag)
62431 +
62432 +        self._entry = entry
62433 +        self._refname = entry._refname
62434 +        self._ctype = 'struct %s' % self._refname
62435 +
62436 +    def GetDeclaration(self, funcname):
62437 +        """Allows direct access to elements of the array."""
62438 +        code = [ 'int %s(struct %s *, int, %s **);' % (
62439 +            funcname, self._struct.Name(), self._ctype ) ]
62440 +        return code
62441 +        
62442 +    def AssignDeclaration(self, funcname):
62443 +        code = [ 'int %s(struct %s *, int, const %s *);' % (
62444 +            funcname, self._struct.Name(), self._ctype ) ]
62445 +        return code
62446 +        
62447 +    def AddDeclaration(self, funcname):
62448 +        code = [ '%s *%s(struct %s *);' % (
62449 +            self._ctype, funcname, self._struct.Name() ) ]
62450 +        return code
62451 +        
62452 +    def CodeGet(self):
62453 +        name = self._name
62454 +        code = [ 'int',
62455 +                 '%s_%s_get(struct %s *msg, int offset, %s **value)' % (
62456 +            self._struct.Name(), name,
62457 +            self._struct.Name(), self._ctype),
62458 +                 '{',
62459 +                 '  if (msg->%s_set != 1)' % name,
62460 +                 '    return (-1);',
62461 +                 '  if (offset >= msg->%s_length)' % name,
62462 +                 '    return (-1);',
62463 +                 '  *value = msg->%s_data[offset];' % name,
62464 +                 '  return (0);',
62465 +                 '}' ]
62466 +        return code
62467 +        
62468 +    def CodeAssign(self):
62469 +        name = self._name
62470 +        code = [ 'int',
62471 +                 '%s_%s_assign(struct %s *msg, int off, const %s *value)' % (
62472 +            self._struct.Name(), name,
62473 +            self._struct.Name(), self._ctype),
62474 +                 '{',
62475 +                 '  struct evbuffer *tmp = NULL;',
62476 +                 '  if (msg->%s_set != 1)' % name,
62477 +                 '    return (-1);',
62478 +                 '  if (off >= msg->%s_length)' % name,
62479 +                 '    return (-1);',
62480 +                 '',
62481 +                 '  %s_clear(msg->%s_data[off]);' % (self._refname, name),
62482 +                 '  if ((tmp = evbuffer_new()) == NULL) {',
62483 +                 '    event_warn("%s: evbuffer_new()", __func__);',
62484 +                 '    goto error;',
62485 +                 '  }',
62486 +                 '  %s_marshal(tmp, value); ' % self._refname,
62487 +                 '  if (%s_unmarshal(msg->%s_data[off], tmp) == -1) {' % (
62488 +            self._refname, name ),
62489 +                 '    event_warnx("%%s: %s_unmarshal", __func__);' % (
62490 +            self._refname),
62491 +                 '    goto error;',
62492 +                 '  }',
62493 +                 '  evbuffer_free(tmp);',
62494 +                 '  return (0);',
62495 +                 ' error:',
62496 +                 '  if (tmp != NULL)',
62497 +                 '    evbuffer_free(tmp);',
62498 +                 '  %s_clear(msg->%s_data[off]);' % (self._refname, name),
62499 +                 '  return (-1);',
62500 +                 '}' ]
62501 +        return code
62502 +        
62503 +    def CodeAdd(self):
62504 +        name = self._name
62505 +        code = [
62506 +            '%s *' % self._ctype, 
62507 +            '%s_%s_add(struct %s *msg)' % (
62508 +            self._struct.Name(), name, self._struct.Name()),
62509 +            '{',
62510 +            '  msg->%s_length++;' % name,
62511 +            '  msg->%s_data = (struct %s**)realloc(msg->%s_data, '
62512 +            '  msg->%s_length * sizeof(struct %s*));' % (
62513 +            name, self._refname, name, name, self._refname ),
62514 +            '  if (msg->%s_data == NULL)' % name,
62515 +            '    return (NULL);',
62516 +            '  msg->%s_data[msg->%s_length - 1] = %s_new();' % (
62517 +            name, name, self._refname),
62518 +            '  if (msg->%s_data[msg->%s_length - 1] == NULL) {' % (name, name),
62519 +            '    msg->%s_length--; ' % name,
62520 +            '    return (NULL);',
62521 +            '  }',
62522 +            '  msg->%s_set = 1;' % name,
62523 +            '  return (msg->%s_data[msg->%s_length - 1]);' % (name, name),
62524 +            '}'
62525 +            ]
62526 +        return code
62527 +        
62528 +    def CodeComplete(self, structname):
62529 +        code = []
62530 +        if self.Optional():
62531 +            code.append( 'if (%s->%s_set)'  % (structname, self.Name()))
62532 +
62533 +        code.extend(['{',
62534 +                     '  int i;',
62535 +                     '  for (i = 0; i < %s->%s_length; ++i) {' % (
62536 +                structname, self.Name()),
62537 +                     '    if (%s_complete(%s->%s_data[i]) == -1)' % (
62538 +                self._refname, structname, self.Name()),
62539 +                     '      return (-1);',
62540 +                     '  }',
62541 +                     '}'
62542 +                     ])
62543 +
62544 +        return code
62545 +    
62546 +    def CodeUnmarshal(self, buf, tag_name, var_name):
62547 +        code = ['if (%s_%s_add(%s) == NULL)' % (
62548 +            self._struct.Name(), self._name, var_name),
62549 +                '  return (-1);',
62550 +                'if (evtag_unmarshal_%s(%s, %s, '
62551 +                '%s->%s_data[%s->%s_length - 1]) == -1) {' % (
62552 +            self._refname, buf, tag_name, var_name, self._name,
62553 +            var_name, self._name),
62554 +                '  %s->%s_length--; ' % (var_name, self._name),
62555 +                '  event_warnx("%%s: failed to unmarshal %s", __func__);' % (
62556 +            self._name ),
62557 +                '  return (-1);',
62558 +                '}'
62559 +                ]
62560 +        return code
62561 +
62562 +    def CodeMarshal(self, buf, tag_name, var_name):
62563 +        code = ['{',
62564 +                '  int i;',
62565 +                '  for (i = 0; i < %s->%s_length; ++i) {' % (
62566 +            var_name, self._name),
62567 +                '    evtag_marshal_%s(%s, %s, %s->%s_data[i]);' % (
62568 +            self._refname, buf, tag_name, var_name, self._name),
62569 +                '  }',
62570 +                '}'
62571 +                ]
62572 +        return code
62573 +
62574 +    def CodeClear(self, structname):
62575 +        code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()),
62576 +                 '  int i;',
62577 +                 '  for (i = 0; i < %s->%s_length; ++i) {' % (
62578 +            structname, self.Name()),
62579 +                 '    %s_free(%s->%s_data[i]);' % (
62580 +            self._refname, structname, self.Name()),
62581 +                 '  }',
62582 +                 '  free(%s->%s_data);' % (structname, self.Name()),
62583 +                 '  %s->%s_data = NULL;' % (structname, self.Name()),
62584 +                 '  %s->%s_set = 0;' % (structname, self.Name()),
62585 +                 '  %s->%s_length = 0;' % (structname, self.Name()),
62586 +                 '}'
62587 +                 ]
62588 +
62589 +        return code
62590 +        
62591 +    def CodeNew(self, name):
62592 +        code  = ['%s->%s_data = NULL;' % (name, self._name),
62593 +                 '%s->%s_length = 0;' % (name, self._name)]
62594 +        code.extend(Entry.CodeNew(self, name))
62595 +        return code
62596 +
62597 +    def CodeFree(self, name):
62598 +        code  = ['if (%s->%s_data != NULL) {' % (name, self._name),
62599 +                 '  int i;',
62600 +                 '  for (i = 0; i < %s->%s_length; ++i) {' % (
62601 +            name, self._name),
62602 +                 '    %s_free(%s->%s_data[i]); ' % (
62603 +            self._refname, name, self._name),
62604 +                 '    %s->%s_data[i] = NULL;' % (name, self._name),
62605 +                 '  }',
62606 +                 '  free(%s->%s_data);' % (name, self._name),
62607 +                 '  %s->%s_data = NULL;' % (name, self._name),
62608 +                 '  %s->%s_length = 0;' % (name, self._name),
62609 +                 '}'
62610 +                 ]
62611 +
62612 +        return code
62613 +
62614 +    def Declaration(self):
62615 +        dcl  = ['struct %s **%s_data;' % (self._refname, self._name),
62616 +                'int %s_length;' % self._name]
62617 +
62618 +        return dcl
62619 +
62620 +def NormalizeLine(line):
62621 +    global white
62622 +    global cppcomment
62623 +    
62624 +    line = cppcomment.sub('', line)
62625 +    line = line.strip()
62626 +    line = white.sub(' ', line)
62627 +
62628 +    return line
62629 +
62630 +def ProcessOneEntry(newstruct, entry):
62631 +    optional = 0
62632 +    array = 0
62633 +    entry_type = ''
62634 +    name = ''
62635 +    tag = ''
62636 +    tag_set = None
62637 +    separator = ''
62638 +    fixed_length = ''
62639 +
62640 +    tokens = entry.split(' ')
62641 +    while tokens:
62642 +        token = tokens[0]
62643 +        tokens = tokens[1:]
62644 +
62645 +        if not entry_type:
62646 +            if not optional and token == 'optional':
62647 +                optional = 1
62648 +                continue
62649 +
62650 +            if not array and token == 'array':
62651 +                array = 1
62652 +                continue
62653 +
62654 +        if not entry_type:
62655 +            entry_type = token
62656 +            continue
62657 +
62658 +        if not name:
62659 +            res = re.match(r'^([^\[\]]+)(\[.*\])?$', token)
62660 +            if not res:
62661 +                print >>sys.stderr, 'Cannot parse name: \"%s\" around %d' % (
62662 +                    entry, line_count)
62663 +                sys.exit(1)
62664 +            name = res.group(1)
62665 +            fixed_length = res.group(2)
62666 +            if fixed_length:
62667 +                fixed_length = fixed_length[1:-1]
62668 +            continue
62669 +
62670 +        if not separator:
62671 +            separator = token
62672 +            if separator != '=':
62673 +                print >>sys.stderr, 'Expected "=" after name \"%s\" got %s' % (
62674 +                    name, token)
62675 +                sys.exit(1)
62676 +            continue
62677 +
62678 +        if not tag_set:
62679 +            tag_set = 1
62680 +            if not re.match(r'^[0-9]+$', token):
62681 +                print >>sys.stderr, 'Expected tag number: \"%s\"' % entry
62682 +                sys.exit(1)
62683 +            tag = int(token)
62684 +            continue
62685 +
62686 +        print >>sys.stderr, 'Cannot parse \"%s\"' % entry
62687 +        sys.exit(1)
62688 +
62689 +    if not tag_set:
62690 +        print >>sys.stderr, 'Need tag number: \"%s\"' % entry
62691 +        sys.exit(1)
62692 +
62693 +    # Create the right entry
62694 +    if entry_type == 'bytes':
62695 +        if fixed_length:
62696 +            newentry = EntryBytes(entry_type, name, tag, fixed_length)
62697 +        else:
62698 +            newentry = EntryVarBytes(entry_type, name, tag)
62699 +    elif entry_type == 'int' and not fixed_length:
62700 +        newentry = EntryInt(entry_type, name, tag)
62701 +    elif entry_type == 'string' and not fixed_length:
62702 +        newentry = EntryString(entry_type, name, tag)
62703 +    else:
62704 +        res = re.match(r'^struct\[(%s)\]$' % _STRUCT_RE,
62705 +                       entry_type, re.IGNORECASE)
62706 +        if res:
62707 +            # References another struct defined in our file
62708 +            newentry = EntryStruct(entry_type, name, tag, res.group(1))
62709 +        else:
62710 +            print >>sys.stderr, 'Bad type: "%s" in "%s"' % (entry_type, entry)
62711 +            sys.exit(1)
62712 +
62713 +    structs = []
62714 +        
62715 +    if optional:
62716 +        newentry.MakeOptional()
62717 +    if array:
62718 +        newentry.MakeArray()
62719 +
62720 +    newentry.SetStruct(newstruct)
62721 +    newentry.SetLineCount(line_count)
62722 +    newentry.Verify()
62723 +
62724 +    if array:
62725 +        # We need to encapsulate this entry into a struct
62726 +        newname = newentry.Name()+ '_array'
62727 +
62728 +        # Now borgify the new entry.
62729 +        newentry = EntryArray(newentry)
62730 +        newentry.SetStruct(newstruct)
62731 +        newentry.SetLineCount(line_count)
62732 +        newentry.MakeArray()
62733 +
62734 +    newstruct.AddEntry(newentry)
62735 +
62736 +    return structs
62737 +
62738 +def ProcessStruct(data):
62739 +    tokens = data.split(' ')
62740 +
62741 +    # First three tokens are: 'struct' 'name' '{'
62742 +    newstruct = Struct(tokens[1])
62743 +
62744 +    inside = ' '.join(tokens[3:-1])
62745 +
62746 +    tokens = inside.split(';')
62747 +
62748 +    structs = []
62749 +
62750 +    for entry in tokens:
62751 +        entry = NormalizeLine(entry)
62752 +        if not entry:
62753 +            continue
62754 +
62755 +        # It's possible that new structs get defined in here
62756 +        structs.extend(ProcessOneEntry(newstruct, entry))
62757 +
62758 +    structs.append(newstruct)
62759 +    return structs
62760 +
62761 +def GetNextStruct(file):
62762 +    global line_count
62763 +    global cppdirect
62764 +
62765 +    got_struct = 0
62766 +
62767 +    processed_lines = []
62768 +
62769 +    have_c_comment = 0
62770 +    data = ''
62771 +    while 1:
62772 +        line = file.readline()
62773 +        if not line:
62774 +            break
62775 +        
62776 +        line_count += 1
62777 +        line = line[:-1]
62778 +
62779 +        if not have_c_comment and re.search(r'/\*', line):
62780 +            if re.search(r'/\*.*\*/', line):
62781 +                line = re.sub(r'/\*.*\*/', '', line)
62782 +            else:
62783 +                line = re.sub(r'/\*.*$', '', line)
62784 +                have_c_comment = 1
62785 +
62786 +        if have_c_comment:
62787 +            if not re.search(r'\*/', line):
62788 +                continue
62789 +            have_c_comment = 0
62790 +            line = re.sub(r'^.*\*/', '', line)
62791 +
62792 +        line = NormalizeLine(line)
62793 +
62794 +        if not line:
62795 +            continue
62796 +
62797 +        if not got_struct:
62798 +            if re.match(r'#include ["<].*[>"]', line):
62799 +                cppdirect.append(line)
62800 +                continue
62801 +            
62802 +            if re.match(r'^#(if( |def)|endif)', line):
62803 +                cppdirect.append(line)
62804 +                continue
62805 +
62806 +            if re.match(r'^#define', line):
62807 +                headerdirect.append(line)
62808 +                continue
62809 +
62810 +            if not re.match(r'^struct %s {$' % _STRUCT_RE,
62811 +                            line, re.IGNORECASE):
62812 +                print >>sys.stderr, 'Missing struct on line %d: %s' % (
62813 +                    line_count, line)
62814 +                sys.exit(1)
62815 +            else:
62816 +                got_struct = 1
62817 +                data += line
62818 +            continue
62819 +
62820 +        # We are inside the struct
62821 +        tokens = line.split('}')
62822 +        if len(tokens) == 1:
62823 +            data += ' ' + line
62824 +            continue
62825 +
62826 +        if len(tokens[1]):
62827 +            print >>sys.stderr, 'Trailing garbage after struct on line %d' % (
62828 +                line_count )
62829 +            sys.exit(1)
62830 +
62831 +        # We found the end of the struct
62832 +        data += ' %s}' % tokens[0]
62833 +        break
62834 +
62835 +    # Remove any comments, that might be in there
62836 +    data = re.sub(r'/\*.*\*/', '', data)
62837 +    
62838 +    return data
62839 +        
62840 +
62841 +def Parse(file):
62842 +    """
62843 +    Parses the input file and returns C code and corresponding header file.
62844 +    """
62845 +
62846 +    entities = []
62847 +
62848 +    while 1:
62849 +        # Just gets the whole struct nicely formatted
62850 +        data = GetNextStruct(file)
62851 +
62852 +        if not data:
62853 +            break
62854 +
62855 +        entities.extend(ProcessStruct(data))
62856 +
62857 +    return entities
62858 +
62859 +def GuardName(name):
62860 +    name = '_'.join(name.split('.'))
62861 +    name = '_'.join(name.split('/'))
62862 +    guard = '_'+name.upper()+'_'
62863 +
62864 +    return guard
62865 +
62866 +def HeaderPreamble(name):
62867 +    guard = GuardName(name)
62868 +    pre = (
62869 +        '/*\n'
62870 +        ' * Automatically generated from %s\n'
62871 +        ' */\n\n'
62872 +        '#ifndef %s\n'
62873 +        '#define %s\n\n' ) % (
62874 +        name, guard, guard)
62875 +
62876 +    for statement in headerdirect:
62877 +        pre += '%s\n' % statement
62878 +    if headerdirect:
62879 +        pre += '\n'
62880 +
62881 +    pre += (
62882 +        '#define EVTAG_HAS(msg, member) ((msg)->member##_set == 1)\n'
62883 +        '#define EVTAG_ASSIGN(msg, member, args...) '
62884 +        '(*(msg)->member##_assign)(msg, ## args)\n'
62885 +        '#define EVTAG_GET(msg, member, args...) '
62886 +        '(*(msg)->member##_get)(msg, ## args)\n'
62887 +        '#define EVTAG_ADD(msg, member) (*(msg)->member##_add)(msg)\n'
62888 +        '#define EVTAG_LEN(msg, member) ((msg)->member##_length)\n'
62889 +        )
62890 +
62891 +    return pre
62892 +     
62893 +
62894 +def HeaderPostamble(name):
62895 +    guard = GuardName(name)
62896 +    return '#endif  /* %s */' % guard
62897 +
62898 +def BodyPreamble(name):
62899 +    global _NAME
62900 +    global _VERSION
62901 +    
62902 +    header_file = '.'.join(name.split('.')[:-1]) + '.gen.h'
62903 +
62904 +    pre = ( '/*\n'
62905 +            ' * Automatically generated from %s\n'
62906 +            ' * by %s/%s.  DO NOT EDIT THIS FILE.\n'
62907 +            ' */\n\n' ) % (name, _NAME, _VERSION)
62908 +    pre += ( '#include <sys/types.h>\n'
62909 +             '#include <sys/time.h>\n'
62910 +             '#include <stdlib.h>\n'
62911 +             '#include <string.h>\n'
62912 +             '#include <assert.h>\n'
62913 +             '#include <event.h>\n\n' )
62914 +
62915 +    for statement in cppdirect:
62916 +        pre += '%s\n' % statement
62917 +    
62918 +    pre += '\n#include "%s"\n\n' % header_file
62919 +
62920 +    pre += 'void event_err(int eval, const char *fmt, ...);\n'
62921 +    pre += 'void event_warn(const char *fmt, ...);\n'
62922 +    pre += 'void event_errx(int eval, const char *fmt, ...);\n'
62923 +    pre += 'void event_warnx(const char *fmt, ...);\n\n'
62924 +
62925 +    return pre
62926 +
62927 +def main(argv):
62928 +    if len(argv) < 2 or not argv[1]:
62929 +        print >>sys.stderr, 'Need RPC description file as first argument.'
62930 +        sys.exit(1)
62931 +
62932 +    filename = argv[1]
62933 +
62934 +    ext = filename.split('.')[-1]
62935 +    if ext != 'rpc':
62936 +        print >>sys.stderr, 'Unrecognized file extension: %s' % ext
62937 +        sys.exit(1)
62938 +
62939 +    print >>sys.stderr, 'Reading \"%s\"' % filename
62940 +
62941 +    fp = open(filename, 'r')
62942 +    entities = Parse(fp)
62943 +    fp.close()
62944 +
62945 +    header_file = '.'.join(filename.split('.')[:-1]) + '.gen.h'
62946 +    impl_file = '.'.join(filename.split('.')[:-1]) + '.gen.c'
62947 +
62948 +    print >>sys.stderr, '... creating "%s"' % header_file
62949 +    header_fp = open(header_file, 'w')
62950 +    print >>header_fp, HeaderPreamble(filename)
62951 +
62952 +    # Create forward declarations: allows other structs to reference
62953 +    # each other
62954 +    for entry in entities:
62955 +        entry.PrintForwardDeclaration(header_fp)
62956 +    print >>header_fp, ''
62957 +
62958 +    for entry in entities:
62959 +        entry.PrintTags(header_fp)
62960 +        entry.PrintDeclaration(header_fp)
62961 +    print >>header_fp, HeaderPostamble(filename)
62962 +    header_fp.close()
62963 +
62964 +    print >>sys.stderr, '... creating "%s"' % impl_file
62965 +    impl_fp = open(impl_file, 'w')
62966 +    print >>impl_fp, BodyPreamble(filename)
62967 +    for entry in entities:
62968 +        entry.PrintCode(impl_fp)
62969 +    impl_fp.close()
62970 +
62971 +if __name__ == '__main__':
62972 +    main(sys.argv)
62973 diff -Nru php-5.2.4.vanilla/libevent/event_tagging.c php-5.2.4.fpm/libevent/event_tagging.c
62974 --- php-5.2.4.vanilla/libevent/event_tagging.c  1970-01-01 03:00:00.000000000 +0300
62975 +++ php-5.2.4.fpm/libevent/event_tagging.c      2007-08-31 15:47:19.000000000 +0400
62976 @@ -0,0 +1,372 @@
62977 +/*
62978 + * Copyright (c) 2003, 2004 Niels Provos <provos@citi.umich.edu>
62979 + * All rights reserved.
62980 + *
62981 + * Redistribution and use in source and binary forms, with or without
62982 + * modification, are permitted provided that the following conditions
62983 + * are met:
62984 + * 1. Redistributions of source code must retain the above copyright
62985 + *    notice, this list of conditions and the following disclaimer.
62986 + * 2. Redistributions in binary form must reproduce the above copyright
62987 + *    notice, this list of conditions and the following disclaimer in the
62988 + *    documentation and/or other materials provided with the distribution.
62989 + * 3. The name of the author may not be used to endorse or promote products
62990 + *    derived from this software without specific prior written permission.
62991 + *
62992 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
62993 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
62994 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
62995 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
62996 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
62997 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
62998 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
62999 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
63000 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
63001 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63002 + */
63003 +
63004 +#include <sys/types.h>
63005 +#include <sys/param.h>
63006 +
63007 +#ifdef HAVE_CONFIG_H
63008 +#include "config.h"
63009 +#endif
63010 +
63011 +#ifdef WIN32
63012 +#define WIN32_LEAN_AND_MEAN
63013 +#include <windows.h>
63014 +#undef WIN32_LEAN_AND_MEAN
63015 +#else
63016 +#include <sys/ioctl.h>
63017 +#endif
63018 +
63019 +#include <sys/tree.h>
63020 +#include <sys/queue.h>
63021 +#ifdef HAVE_SYS_TIME_H
63022 +#include <sys/time.h>
63023 +#endif
63024 +
63025 +#include <errno.h>
63026 +#include <stdio.h>
63027 +#include <stdlib.h>
63028 +#include <string.h>
63029 +#ifndef WIN32
63030 +#include <syslog.h>
63031 +#endif
63032 +#include <unistd.h>
63033 +
63034 +#include "event.h"
63035 +#include "log.h"
63036 +
63037 +int decode_int(uint32_t *pnumber, struct evbuffer *evbuf);
63038 +
63039 +static struct evbuffer *_buf;  /* not thread safe */
63040 +
63041 +void
63042 +evtag_init()
63043 +{
63044 +       if (_buf != NULL)
63045 +               return;
63046 +
63047 +       if ((_buf = evbuffer_new()) == NULL)
63048 +               event_err(1, "%s: malloc", __func__);
63049 +}
63050 +
63051 +/* 
63052 + * We encode integer's by nibbles; the first nibble contains the number
63053 + * of significant nibbles - 1;  this allows us to encode up to 64-bit
63054 + * integers.  This function is byte-order independent.
63055 + */
63056 +
63057 +void
63058 +encode_int(struct evbuffer *evbuf, uint32_t number)
63059 +{
63060 +       int off = 1, nibbles = 0;
63061 +       uint8_t data[5];
63062 +
63063 +       memset(data, 0, sizeof(data));
63064 +       while (number) {
63065 +               if (off & 0x1)
63066 +                       data[off/2] = (data[off/2] & 0xf0) | (number & 0x0f);
63067 +               else
63068 +                       data[off/2] = (data[off/2] & 0x0f) |
63069 +                           ((number & 0x0f) << 4);
63070 +               number >>= 4;
63071 +               off++;
63072 +       }
63073 +
63074 +       if (off > 2)
63075 +               nibbles = off - 2;
63076 +
63077 +       /* Off - 1 is the number of encoded nibbles */
63078 +       data[0] = (data[0] & 0x0f) | ((nibbles & 0x0f) << 4);
63079 +
63080 +       evbuffer_add(evbuf, data, (off + 1) / 2);
63081 +}
63082 +
63083 +/*
63084 + * Marshal a data type, the general format is as follows:
63085 + *
63086 + * tag number: one byte; length: var bytes; payload: var bytes
63087 + */
63088 +
63089 +void
63090 +evtag_marshal(struct evbuffer *evbuf, uint8_t tag,
63091 +    const void *data, uint32_t len)
63092 +{
63093 +       evbuffer_add(evbuf, &tag, sizeof(tag));
63094 +       encode_int(evbuf, len);
63095 +       evbuffer_add(evbuf, (void *)data, len);
63096 +}
63097 +
63098 +/* Marshaling for integers */
63099 +void
63100 +evtag_marshal_int(struct evbuffer *evbuf, uint8_t tag, uint32_t integer)
63101 +{
63102 +       evbuffer_drain(_buf, EVBUFFER_LENGTH(_buf));
63103 +       encode_int(_buf, integer);
63104 +
63105 +       evbuffer_add(evbuf, &tag, sizeof(tag));
63106 +       encode_int(evbuf, EVBUFFER_LENGTH(_buf));
63107 +       evbuffer_add_buffer(evbuf, _buf);
63108 +}
63109 +
63110 +void
63111 +evtag_marshal_string(struct evbuffer *buf, uint8_t tag, const char *string)
63112 +{
63113 +       evtag_marshal(buf, tag, string, strlen(string));
63114 +}
63115 +
63116 +void
63117 +evtag_marshal_timeval(struct evbuffer *evbuf, uint8_t tag, struct timeval *tv)
63118 +{
63119 +       evbuffer_drain(_buf, EVBUFFER_LENGTH(_buf));
63120 +
63121 +       encode_int(_buf, tv->tv_sec);
63122 +       encode_int(_buf, tv->tv_usec);
63123 +
63124 +       evtag_marshal(evbuf, tag, EVBUFFER_DATA(_buf),
63125 +           EVBUFFER_LENGTH(_buf));
63126 +}
63127 +
63128 +static int inline
63129 +decode_int_internal(uint32_t *pnumber, struct evbuffer *evbuf, int dodrain)
63130 +{
63131 +       uint32_t number = 0;
63132 +       uint8_t *data = EVBUFFER_DATA(evbuf);
63133 +       int len = EVBUFFER_LENGTH(evbuf);
63134 +       int nibbles = 0, off;
63135 +
63136 +       if (!len)
63137 +               return (-1);
63138 +
63139 +       nibbles = ((data[0] & 0xf0) >> 4) + 1;
63140 +       if (nibbles > 8 || (nibbles >> 1) > len - 1)
63141 +               return (-1);
63142 +
63143 +       off = nibbles;
63144 +       while (off > 0) {
63145 +               number <<= 4;
63146 +               if (off & 0x1)
63147 +                       number |= data[off >> 1] & 0x0f;
63148 +               else
63149 +                       number |= (data[off >> 1] & 0xf0) >> 4;
63150 +               off--;
63151 +       }
63152 +
63153 +       len = (nibbles >> 1) + 1;
63154 +       if (dodrain)
63155 +               evbuffer_drain(evbuf, len);
63156 +
63157 +       *pnumber = number;
63158 +
63159 +       return (len);
63160 +}
63161 +
63162 +int
63163 +decode_int(uint32_t *pnumber, struct evbuffer *evbuf)
63164 +{
63165 +       return (decode_int_internal(pnumber, evbuf, 1) == -1 ? -1 : 0);
63166 +}
63167 +
63168 +int
63169 +evtag_peek(struct evbuffer *evbuf, uint8_t *ptag)
63170 +{
63171 +       if (EVBUFFER_LENGTH(evbuf) < 2)
63172 +               return (-1);
63173 +       *ptag = EVBUFFER_DATA(evbuf)[0];
63174 +
63175 +       return (0);
63176 +}
63177 +
63178 +int
63179 +evtag_peek_length(struct evbuffer *evbuf, uint32_t *plength)
63180 +{
63181 +       struct evbuffer tmp;
63182 +       int res;
63183 +
63184 +       if (EVBUFFER_LENGTH(evbuf) < 2)
63185 +               return (-1);
63186 +
63187 +       tmp = *evbuf;
63188 +       tmp.buffer += 1;
63189 +       tmp.off -= 1;
63190 +
63191 +       res = decode_int_internal(plength, &tmp, 0);
63192 +       if (res == -1)
63193 +               return (-1);
63194 +
63195 +       *plength += res + 1;
63196 +
63197 +       return (0);
63198 +}
63199 +
63200 +int
63201 +evtag_payload_length(struct evbuffer *evbuf, uint32_t *plength)
63202 +{
63203 +       struct evbuffer tmp;
63204 +       int res;
63205 +
63206 +       if (EVBUFFER_LENGTH(evbuf) < 2)
63207 +               return (-1);
63208 +
63209 +       tmp = *evbuf;
63210 +       tmp.buffer += 1;
63211 +       tmp.off -= 1;
63212 +
63213 +       res = decode_int_internal(plength, &tmp, 0);
63214 +       if (res == -1)
63215 +               return (-1);
63216 +
63217 +       return (0);
63218 +}
63219 +
63220 +int
63221 +evtag_consume(struct evbuffer *evbuf)
63222 +{
63223 +       uint32_t len;
63224 +       evbuffer_drain(evbuf, 1);
63225 +       if (decode_int(&len, evbuf) == -1)
63226 +               return (-1);
63227 +       evbuffer_drain(evbuf, len);
63228 +
63229 +       return (0);
63230 +}
63231 +
63232 +/* Reads the data type from an event buffer */
63233 +
63234 +int
63235 +evtag_unmarshal(struct evbuffer *src, uint8_t *ptag, struct evbuffer *dst)
63236 +{
63237 +       uint8_t tag;
63238 +       uint32_t len;
63239 +       uint32_t integer;
63240 +
63241 +       if (evbuffer_remove(src, &tag, sizeof(tag)) != sizeof(tag))
63242 +               return (-1);
63243 +       if (decode_int(&integer, src) == -1)
63244 +               return (-1);
63245 +       len = integer;
63246 +
63247 +       if (EVBUFFER_LENGTH(src) < len)
63248 +               return (-1);
63249 +
63250 +       if (evbuffer_add(dst, EVBUFFER_DATA(src), len) == -1)
63251 +               return (-1);
63252 +
63253 +       evbuffer_drain(src, len);
63254 +
63255 +       *ptag = tag;
63256 +       return (len);
63257 +}
63258 +
63259 +/* Marshaling for integers */
63260 +
63261 +int
63262 +evtag_unmarshal_int(struct evbuffer *evbuf, uint8_t need_tag,
63263 +    uint32_t *pinteger)
63264 +{
63265 +       uint8_t tag;
63266 +       uint32_t len;
63267 +       uint32_t integer;
63268 +
63269 +       if (evbuffer_remove(evbuf, &tag, sizeof(tag)) != sizeof(tag) ||
63270 +           tag != need_tag)
63271 +               return (-1);
63272 +       if (decode_int(&integer, evbuf) == -1)
63273 +               return (-1);
63274 +       len = integer;
63275 +
63276 +       if (EVBUFFER_LENGTH(evbuf) < len)
63277 +               return (-1);
63278 +       
63279 +       evbuffer_drain(_buf, EVBUFFER_LENGTH(_buf));
63280 +       if (evbuffer_add(_buf, EVBUFFER_DATA(evbuf), len) == -1)
63281 +               return (-1);
63282 +
63283 +       evbuffer_drain(evbuf, len);
63284 +
63285 +       return (decode_int(pinteger, _buf));
63286 +}
63287 +
63288 +/* Unmarshal a fixed length tag */
63289 +
63290 +int
63291 +evtag_unmarshal_fixed(struct evbuffer *src, uint8_t need_tag, void *data,
63292 +    size_t len)
63293 +{
63294 +       uint8_t tag;
63295 +
63296 +       /* Initialize this event buffer so that we can read into it */
63297 +       evbuffer_drain(_buf, EVBUFFER_LENGTH(_buf));
63298 +
63299 +       /* Now unmarshal a tag and check that it matches the tag we want */
63300 +       if (evtag_unmarshal(src, &tag, _buf) == -1 || tag != need_tag)
63301 +               return (-1);
63302 +
63303 +       if (EVBUFFER_LENGTH(_buf) != len)
63304 +               return (-1);
63305 +
63306 +       memcpy(data, EVBUFFER_DATA(_buf), len);
63307 +       return (0);
63308 +}
63309 +
63310 +int
63311 +evtag_unmarshal_string(struct evbuffer *evbuf, uint8_t need_tag,
63312 +    char **pstring)
63313 +{
63314 +       uint8_t tag;
63315 +
63316 +       evbuffer_drain(_buf, EVBUFFER_LENGTH(_buf));
63317 +
63318 +       if (evtag_unmarshal(evbuf, &tag, _buf) == -1 || tag != need_tag)
63319 +               return (-1);
63320 +
63321 +       *pstring = calloc(EVBUFFER_LENGTH(_buf) + 1, 1);
63322 +       if (*pstring == NULL)
63323 +               event_err(1, "%s: calloc", __func__);
63324 +       evbuffer_remove(_buf, *pstring, EVBUFFER_LENGTH(_buf));
63325 +
63326 +       return (0);
63327 +}
63328 +
63329 +int
63330 +evtag_unmarshal_timeval(struct evbuffer *evbuf, uint8_t need_tag,
63331 +    struct timeval *ptv)
63332 +{
63333 +       uint8_t tag;
63334 +       uint32_t integer;
63335 +
63336 +       evbuffer_drain(_buf, EVBUFFER_LENGTH(_buf));
63337 +       if (evtag_unmarshal(evbuf, &tag, _buf) == -1 || tag != need_tag)
63338 +               return (-1);
63339 +
63340 +       if (decode_int(&integer, _buf) == -1)
63341 +               return (-1);
63342 +       ptv->tv_sec = integer;
63343 +       if (decode_int(&integer, _buf) == -1)
63344 +               return (-1);
63345 +       ptv->tv_usec = integer;
63346 +
63347 +       return (0);
63348 +}
63349 diff -Nru php-5.2.4.vanilla/libevent/evhttp.h php-5.2.4.fpm/libevent/evhttp.h
63350 --- php-5.2.4.vanilla/libevent/evhttp.h 1970-01-01 03:00:00.000000000 +0300
63351 +++ php-5.2.4.fpm/libevent/evhttp.h     2007-08-31 15:47:19.000000000 +0400
63352 @@ -0,0 +1,219 @@
63353 +/*
63354 + * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu>
63355 + * All rights reserved.
63356 + *
63357 + * Redistribution and use in source and binary forms, with or without
63358 + * modification, are permitted provided that the following conditions
63359 + * are met:
63360 + * 1. Redistributions of source code must retain the above copyright
63361 + *    notice, this list of conditions and the following disclaimer.
63362 + * 2. Redistributions in binary form must reproduce the above copyright
63363 + *    notice, this list of conditions and the following disclaimer in the
63364 + *    documentation and/or other materials provided with the distribution.
63365 + * 3. The name of the author may not be used to endorse or promote products
63366 + *    derived from this software without specific prior written permission.
63367 + *
63368 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
63369 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
63370 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
63371 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
63372 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
63373 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
63374 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
63375 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
63376 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
63377 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63378 + */
63379 +#ifndef _EVHTTP_H_
63380 +#define _EVHTTP_H_
63381 +
63382 +#ifdef __cplusplus
63383 +extern "C" {
63384 +#endif
63385 +
63386 +#ifdef WIN32
63387 +#define WIN32_LEAN_AND_MEAN
63388 +#include <windows.h>
63389 +#include <winsock2.h>
63390 +#undef WIN32_LEAN_AND_MEAN
63391 +#endif
63392 +
63393 +/*
63394 + * Basic support for HTTP serving.
63395 + *
63396 + * As libevent is a library for dealing with event notification and most
63397 + * interesting applications are networked today, I have often found the
63398 + * need to write HTTP code.  The following prototypes and definitions provide
63399 + * an application with a minimal interface for making HTTP requests and for
63400 + * creating a very simple HTTP server.
63401 + */
63402 +
63403 +/* Response codes */
63404 +#define HTTP_OK                        200
63405 +#define HTTP_NOCONTENT         204
63406 +#define HTTP_MOVEPERM          301
63407 +#define HTTP_MOVETEMP          302
63408 +#define HTTP_NOTMODIFIED       304
63409 +#define HTTP_BADREQUEST                400
63410 +#define HTTP_NOTFOUND          404
63411 +#define HTTP_SERVUNAVAIL       503
63412 +
63413 +struct evhttp;
63414 +struct evhttp_request;
63415 +struct evkeyvalq;
63416 +
63417 +/* Start an HTTP server on the specified address and port */
63418 +struct evhttp *evhttp_start(const char *address, u_short port);
63419 +
63420 +/*
63421 + * Free the previously create HTTP server.  Works only if no requests are
63422 + * currently being served.
63423 + */
63424 +void evhttp_free(struct evhttp* http);
63425 +
63426 +/* Set a callback for a specified URI */
63427 +void evhttp_set_cb(struct evhttp *, const char *,
63428 +    void (*)(struct evhttp_request *, void *), void *);
63429 +
63430 +/* Removes the callback for a specified URI */
63431 +int evhttp_del_cb(struct evhttp *, const char *);
63432 +
63433 +/* Set a callback for all requests that are not caught by specific callbacks */
63434 +void evhttp_set_gencb(struct evhttp *,
63435 +    void (*)(struct evhttp_request *, void *), void *);
63436 +
63437 +void evhttp_set_timeout(struct evhttp *, int timeout_in_secs);
63438 +
63439 +/* Request/Response functionality */
63440 +
63441 +void evhttp_send_error(struct evhttp_request *, int, const char *);
63442 +void evhttp_send_reply(struct evhttp_request *, int, const char *,
63443 +    struct evbuffer *);
63444 +
63445 +/* Low-level response interface, for streaming/chunked replies */
63446 +void evhttp_send_reply_start(struct evhttp_request *, int, const char *);
63447 +void evhttp_send_reply_chunk(struct evhttp_request *, struct evbuffer *);
63448 +void evhttp_send_reply_end(struct evhttp_request *);
63449 +       
63450 +/* Interfaces for making requests */
63451 +enum evhttp_cmd_type { EVHTTP_REQ_GET, EVHTTP_REQ_POST, EVHTTP_REQ_HEAD };
63452 +
63453 +enum evhttp_request_kind { EVHTTP_REQUEST, EVHTTP_RESPONSE };
63454 +
63455 +/* 
63456 + * the request structure that a server receives.
63457 + * WARNING: expect this structure to change.  I will try to provide
63458 + * reasonable accessors.
63459 + */
63460 +struct evhttp_request {
63461 +       TAILQ_ENTRY(evhttp_request) next;
63462 +
63463 +       /* the connection object that this request belongs to */
63464 +       struct evhttp_connection *evcon;
63465 +       int flags;
63466 +#define EVHTTP_REQ_OWN_CONNECTION      0x0001  
63467 +#define EVHTTP_PROXY_REQUEST           0x0002
63468 +       
63469 +       struct evkeyvalq *input_headers;
63470 +       struct evkeyvalq *output_headers;
63471 +
63472 +       /* address of the remote host and the port connection came from */
63473 +       char *remote_host;
63474 +       u_short remote_port;
63475 +
63476 +       enum evhttp_request_kind kind;
63477 +       enum evhttp_cmd_type type;
63478 +
63479 +       char *uri;                      /* uri after HTTP request was parsed */
63480 +
63481 +       char major;                     /* HTTP Major number */
63482 +       char minor;                     /* HTTP Minor number */
63483 +       
63484 +       int got_firstline;
63485 +       int response_code;              /* HTTP Response code */
63486 +       char *response_code_line;       /* Readable response */
63487 +
63488 +       struct evbuffer *input_buffer;  /* read data */
63489 +       int ntoread;
63490 +       int chunked;
63491 +
63492 +       struct evbuffer *output_buffer; /* outgoing post or data */
63493 +
63494 +       /* Callback */
63495 +       void (*cb)(struct evhttp_request *, void *);
63496 +       void *cb_arg;
63497 +
63498 +       /* 
63499 +        * Chunked data callback - call for each completed chunk if
63500 +        * specified.  If not specified, all the data is delivered via
63501 +        * the regular callback.
63502 +        */
63503 +       void (*chunk_cb)(struct evhttp_request *, void *);
63504 +};
63505 +
63506 +/* 
63507 + * Creates a new request object that needs to be filled in with the request
63508 + * parameters.  The callback is executed when the request completed or an
63509 + * error occurred.
63510 + */
63511 +struct evhttp_request *evhttp_request_new(
63512 +       void (*cb)(struct evhttp_request *, void *), void *arg);
63513 +
63514 +/* enable delivery of chunks to requestor */
63515 +void evhttp_request_set_chunked_cb(struct evhttp_request *,
63516 +    void (*cb)(struct evhttp_request *, void *));
63517 +
63518 +/* Frees the request object and removes associated events. */
63519 +void evhttp_request_free(struct evhttp_request *req);
63520 +
63521 +/*
63522 + * A connection object that can be used to for making HTTP requests.  The
63523 + * connection object tries to establish the connection when it is given an
63524 + * http request object.
63525 + */
63526 +struct evhttp_connection *evhttp_connection_new(
63527 +       const char *address, unsigned short port);
63528 +
63529 +/* Frees an http connection */
63530 +void evhttp_connection_free(struct evhttp_connection *evcon);
63531 +
63532 +/* Sets the timeout for events related to this connection */
63533 +void evhttp_connection_set_timeout(struct evhttp_connection *evcon,
63534 +    int timeout_in_secs);
63535 +
63536 +/* Sets the retry limit for this connection - -1 repeats indefnitely */
63537 +void evhttp_connection_set_retries(struct evhttp_connection *evcon,
63538 +    int retry_max);
63539 +
63540 +/* Set a callback for connection close. */
63541 +void evhttp_connection_set_closecb(struct evhttp_connection *evcon,
63542 +    void (*)(struct evhttp_connection *, void *), void *);
63543 +
63544 +/* Get the remote address and port associated with this connection. */
63545 +void evhttp_connection_get_peer(struct evhttp_connection *evcon,
63546 +    char **address, u_short *port);
63547 +
63548 +/* The connection gets ownership of the request */
63549 +int evhttp_make_request(struct evhttp_connection *evcon,
63550 +    struct evhttp_request *req,
63551 +    enum evhttp_cmd_type type, const char *uri);
63552 +
63553 +const char *evhttp_request_uri(struct evhttp_request *req);
63554 +
63555 +/* Interfaces for dealing with HTTP headers */
63556 +
63557 +const char *evhttp_find_header(const struct evkeyvalq *, const char *);
63558 +int evhttp_remove_header(struct evkeyvalq *, const char *);
63559 +int evhttp_add_header(struct evkeyvalq *, const char *, const char *);
63560 +void evhttp_clear_headers(struct evkeyvalq *);
63561 +
63562 +/* Miscellaneous utility functions */
63563 +char *evhttp_encode_uri(const char *uri);
63564 +char *evhttp_decode_uri(const char *uri);
63565 +void evhttp_parse_query(const char *uri, struct evkeyvalq *);
63566 +char *evhttp_htmlescape(const char *html);
63567 +#ifdef __cplusplus
63568 +}
63569 +#endif
63570 +
63571 +#endif /* _EVHTTP_H_ */
63572 diff -Nru php-5.2.4.vanilla/libevent/evport.c php-5.2.4.fpm/libevent/evport.c
63573 --- php-5.2.4.vanilla/libevent/evport.c 1970-01-01 03:00:00.000000000 +0300
63574 +++ php-5.2.4.fpm/libevent/evport.c     2007-08-31 15:47:19.000000000 +0400
63575 @@ -0,0 +1,512 @@
63576 +/*
63577 + * Submitted by David Pacheco (dp.spambait@gmail.com)
63578 + *
63579 + * Redistribution and use in source and binary forms, with or without
63580 + * modification, are permitted provided that the following conditions
63581 + * are met:
63582 + * 1. Redistributions of source code must retain the above copyright
63583 + *    notice, this list of conditions and the following disclaimer.
63584 + * 2. Redistributions in binary form must reproduce the above copyright
63585 + *    notice, this list of conditions and the following disclaimer in the
63586 + *    documentation and/or other materials provided with the distribution.
63587 + * 3. The name of the author may not be used to endorse or promote products
63588 + *    derived from this software without specific prior written permission.
63589 + *
63590 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
63591 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
63592 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
63593 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
63594 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
63595 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
63596 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
63597 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
63598 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
63599 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63600 + */
63601 +
63602 +/*
63603 + * Copyright (c) 2006 Sun Microsystems. All rights reserved.
63604 + * Use is subject to license terms.
63605 + */
63606 +
63607 +/*
63608 + * evport.c: event backend using Solaris 10 event ports. See port_create(3C).
63609 + * This implementation is loosely modeled after the one used for select(2) (in
63610 + * select.c).
63611 + *
63612 + * The outstanding events are tracked in a data structure called evport_data.
63613 + * Each entry in the ed_fds array corresponds to a file descriptor, and contains
63614 + * pointers to the read and write events that correspond to that fd. (That is,
63615 + * when the file is readable, the "read" event should handle it, etc.)
63616 + *
63617 + * evport_add and evport_del update this data structure. evport_dispatch uses it
63618 + * to determine where to callback when an event occurs (which it gets from
63619 + * port_getn). 
63620 + *
63621 + * Helper functions are used: grow() grows the file descriptor array as
63622 + * necessary when large fd's come in. reassociate() takes care of maintaining
63623 + * the proper file-descriptor/event-port associations.
63624 + *
63625 + * As in the select(2) implementation, signals are handled by evsignal, and
63626 + * evport_recalc does almost nothing.
63627 + */
63628 +
63629 +#ifdef HAVE_CONFIG_H
63630 +#include "config.h"
63631 +#endif
63632 +
63633 +#ifdef HAVE_SYS_TIME_H
63634 +#include <sys/time.h>
63635 +#else
63636 +#include <sys/_time.h>
63637 +#endif
63638 +#include <assert.h>
63639 +#include <sys/queue.h>
63640 +#include <sys/tree.h>
63641 +#include <errno.h>
63642 +#include <poll.h>
63643 +#include <port.h>
63644 +#include <signal.h>
63645 +#include <stdio.h>
63646 +#include <stdlib.h>
63647 +#include <string.h>
63648 +#include <time.h>
63649 +#include <unistd.h>
63650 +#ifdef CHECK_INVARIANTS
63651 +#include <assert.h>
63652 +#endif
63653 +
63654 +#include "event.h"
63655 +#include "event-internal.h"
63656 +#include "log.h"
63657 +#include "evsignal.h"
63658 +
63659 +
63660 +/*
63661 + * Default value for ed_nevents, which is the maximum file descriptor number we
63662 + * can handle. If an event comes in for a file descriptor F > nevents, we will
63663 + * grow the array of file descriptors, doubling its size.
63664 + */
63665 +#define DEFAULT_NFDS   16
63666 +
63667 +
63668 +/*
63669 + * EVENTS_PER_GETN is the maximum number of events to retrieve from port_getn on
63670 + * any particular call. You can speed things up by increasing this, but it will
63671 + * (obviously) require more memory.
63672 + */
63673 +#define EVENTS_PER_GETN 8
63674 +
63675 +/*
63676 + * Per-file-descriptor information about what events we're subscribed to. These
63677 + * fields are NULL if no event is subscribed to either of them.
63678 + */
63679 +
63680 +struct fd_info {
63681 +       struct event* fdi_revt; /* the event responsible for the "read"  */
63682 +       struct event* fdi_wevt; /* the event responsible for the "write" */
63683 +};
63684 +
63685 +#define FDI_HAS_READ(fdi)  ((fdi)->fdi_revt != NULL)
63686 +#define FDI_HAS_WRITE(fdi) ((fdi)->fdi_wevt != NULL)
63687 +#define FDI_HAS_EVENTS(fdi) (FDI_HAS_READ(fdi) || FDI_HAS_WRITE(fdi))
63688 +#define FDI_TO_SYSEVENTS(fdi) (FDI_HAS_READ(fdi) ? POLLIN : 0) | \
63689 +    (FDI_HAS_WRITE(fdi) ? POLLOUT : 0)
63690 +
63691 +struct evport_data {
63692 +       int             ed_port;        /* event port for system events  */
63693 +       int             ed_nevents;     /* number of allocated fdi's     */
63694 +       struct fd_info *ed_fds;         /* allocated fdi table           */
63695 +       /* fdi's that we need to reassoc */
63696 +       struct fd_info *ed_pending[EVENTS_PER_GETN];
63697 +};
63698 +
63699 +static void*   evport_init     (struct event_base *);
63700 +static int     evport_add      (void *, struct event *);
63701 +static int     evport_del      (void *, struct event *);
63702 +static int     evport_recalc   (struct event_base *, void *, int);
63703 +static int     evport_dispatch (struct event_base *, void *, struct timeval *);
63704 +static void    evport_dealloc  (struct event_base *, void *);
63705 +
63706 +const struct eventop evportops = {
63707 +       "event ports",
63708 +       evport_init,
63709 +       evport_add,
63710 +       evport_del,
63711 +       evport_recalc,
63712 +       evport_dispatch,
63713 +       evport_dealloc
63714 +};
63715 +
63716 +/*
63717 + * Initialize the event port implementation.
63718 + */
63719 +
63720 +static void*
63721 +evport_init(struct event_base *base)
63722 +{
63723 +       struct evport_data *evpd;
63724 +       /*
63725 +        * Disable event ports when this environment variable is set 
63726 +        */
63727 +       if (getenv("EVENT_NOEVPORT"))
63728 +               return (NULL);
63729 +
63730 +       if (!(evpd = calloc(1, sizeof(struct evport_data))))
63731 +               return (NULL);
63732 +
63733 +       if ((evpd->ed_port = port_create()) == -1) {
63734 +               free(evpd);
63735 +               return (NULL);
63736 +       }
63737 +
63738 +       /*
63739 +        * Initialize file descriptor structure
63740 +        */
63741 +       evpd->ed_fds = calloc(DEFAULT_NFDS, sizeof(struct fd_info));
63742 +       if (evpd->ed_fds == NULL) {
63743 +               close(evpd->ed_port);
63744 +               free(evpd);
63745 +               return (NULL);
63746 +       }
63747 +       evpd->ed_nevents = DEFAULT_NFDS;
63748 +       memset(&evpd->ed_pending, 0, EVENTS_PER_GETN * sizeof(struct fd_info*));
63749 +
63750 +       evsignal_init(base);
63751 +
63752 +       return (evpd);
63753 +}
63754 +
63755 +#ifdef CHECK_INVARIANTS
63756 +/*
63757 + * Checks some basic properties about the evport_data structure. Because it
63758 + * checks all file descriptors, this function can be expensive when the maximum
63759 + * file descriptor ever used is rather large.
63760 + */
63761 +
63762 +static void
63763 +check_evportop(struct evport_data *evpd)
63764 +{
63765 +       assert(evpd);
63766 +       assert(evpd->ed_nevents > 0);
63767 +       assert(evpd->ed_port > 0);
63768 +       assert(evpd->ed_fds > 0);
63769 +
63770 +       /*
63771 +        * Verify the integrity of the fd_info struct as well as the events to
63772 +        * which it points (at least, that they're valid references and correct
63773 +        * for their position in the structure).
63774 +        */
63775 +       int i;
63776 +       for (i = 0; i < evpd->ed_nevents; ++i) {
63777 +               struct event    *ev;
63778 +               struct fd_info  *fdi;
63779 +
63780 +               fdi = &evpd->ed_fds[i];
63781 +               if ((ev = fdi->fdi_revt) != NULL) {
63782 +                       assert(ev->ev_fd == i);
63783 +               }
63784 +               if ((ev = fdi->fdi_wevt) != NULL) {
63785 +                       assert(ev->ev_fd == i);
63786 +               }
63787 +       }
63788 +}
63789 +
63790 +/*
63791 + * Verifies very basic integrity of a given port_event.
63792 + */
63793 +static void
63794 +check_event(port_event_t* pevt)
63795 +{
63796 +       /*
63797 +        * We've only registered for PORT_SOURCE_FD events. The only
63798 +        * other thing we can legitimately receive is PORT_SOURCE_ALERT,
63799 +        * but since we're not using port_alert either, we can assume
63800 +        * PORT_SOURCE_FD.
63801 +        */
63802 +       assert(pevt->portev_source == PORT_SOURCE_FD);
63803 +       assert(pevt->portev_user == NULL);
63804 +}
63805 +
63806 +#else
63807 +#define check_evportop(epop)
63808 +#define check_event(pevt)
63809 +#endif /* CHECK_INVARIANTS */
63810 +
63811 +/*
63812 + * Doubles the size of the allocated file descriptor array.
63813 + */
63814 +static int
63815 +grow(struct evport_data *epdp, int factor)
63816 +{
63817 +       struct fd_info *tmp;
63818 +       int oldsize = epdp->ed_nevents;
63819 +       int newsize = factor * oldsize;
63820 +       assert(factor > 1);
63821 +
63822 +       check_evportop(epdp);
63823 +
63824 +       tmp = realloc(epdp->ed_fds, sizeof(struct fd_info) * newsize);
63825 +       if (NULL == tmp)
63826 +               return -1;
63827 +       epdp->ed_fds = tmp;
63828 +       memset((char*) (epdp->ed_fds + oldsize), 0, 
63829 +           (newsize - oldsize)*sizeof(struct fd_info));
63830 +       epdp->ed_nevents = newsize;
63831 +
63832 +       check_evportop(epdp);
63833 +
63834 +       return 0;
63835 +}
63836 +
63837 +
63838 +/*
63839 + * (Re)associates the given file descriptor with the event port. The OS events
63840 + * are specified (implicitly) from the fd_info struct.
63841 + */
63842 +static int
63843 +reassociate(struct evport_data *epdp, struct fd_info *fdip, int fd)
63844 +{
63845 +       int sysevents = FDI_TO_SYSEVENTS(fdip);
63846 +
63847 +       if (sysevents != 0) {
63848 +               if ((-1 == port_associate(epdp->ed_port, PORT_SOURCE_FD,
63849 +                   fd, sysevents, NULL))) {
63850 +                       perror("port_associate");
63851 +                       return (-1);
63852 +               }
63853 +       } else {
63854 +               if (-1 == port_dissociate(epdp->ed_port, PORT_SOURCE_FD, fd)) {
63855 +                       perror("port_dissociate");
63856 +                       return (-1);
63857 +               }
63858 +       }
63859 +
63860 +       check_evportop(epdp);
63861 +
63862 +       return (0);
63863 +}
63864 +
63865 +/*
63866 + * Main event loop - polls port_getn for some number of events, and processes
63867 + * them.
63868 + */
63869 +
63870 +static int
63871 +evport_dispatch(struct event_base *base, void *arg, struct timeval *tv)
63872 +{
63873 +       int i, res;
63874 +       struct evport_data *epdp = arg;
63875 +       port_event_t pevtlist[EVENTS_PER_GETN];
63876 +
63877 +       /*
63878 +        * port_getn will block until it has at least nevents events. It will
63879 +        * also return how many it's given us (which may be more than we asked
63880 +        * for, as long as it's less than our maximum (EVENTS_PER_GETN)) in
63881 +        * nevents.
63882 +        */
63883 +       int nevents = 1;
63884 +
63885 +       /*
63886 +        * We have to convert a struct timeval to a struct timespec
63887 +        * (only difference is nanoseconds vs. microseconds)
63888 +        */
63889 +       struct timespec ts = {tv->tv_sec, tv->tv_usec * 1000};
63890 +
63891 +       /*
63892 +        * Before doing anything else, we need to reassociate the events we hit
63893 +        * last time which need reassociation. See comment at the end of the
63894 +        * loop below.
63895 +        */
63896 +       for (i = 0; i < EVENTS_PER_GETN; ++i) {
63897 +               struct fd_info *fdi = epdp->ed_pending[i];
63898 +
63899 +               if (fdi != NULL && FDI_HAS_EVENTS(fdi)) {
63900 +                       int fd = FDI_HAS_READ(fdi) ? fdi->fdi_revt->ev_fd : 
63901 +                           fdi->fdi_wevt->ev_fd;
63902 +                       reassociate(epdp, fdi, fd);
63903 +                       epdp->ed_pending[i] = NULL;
63904 +               }
63905 +       }
63906 +
63907 +       if ((res = port_getn(epdp->ed_port, pevtlist, EVENTS_PER_GETN, 
63908 +                   (unsigned int *) &nevents, &ts)) == -1) {
63909 +               if (errno == EINTR) {
63910 +                       evsignal_process(base);
63911 +                       return (0);
63912 +               } else if (errno == ETIME) {
63913 +                       if (nevents == 0)
63914 +                               return (0);
63915 +               } else {
63916 +                       perror("port_getn");
63917 +                       return (-1);
63918 +               }
63919 +       } else if (base->sig.evsignal_caught) {
63920 +               evsignal_process(base);
63921 +       }
63922 +       
63923 +       event_debug(("%s: port_getn reports %d events", __func__, nevents));
63924 +
63925 +       for (i = 0; i < nevents; ++i) {
63926 +               struct event *ev;
63927 +               struct fd_info *fdi;
63928 +               port_event_t *pevt = &pevtlist[i];
63929 +               int fd = (int) pevt->portev_object;
63930 +
63931 +               check_evportop(epdp);
63932 +               check_event(pevt);
63933 +
63934 +               /*
63935 +                * Figure out what kind of event it was 
63936 +                * (because we have to pass this to the callback)
63937 +                */
63938 +               res = 0;
63939 +               if (pevt->portev_events & POLLIN)
63940 +                       res |= EV_READ;
63941 +               if (pevt->portev_events & POLLOUT)
63942 +                       res |= EV_WRITE;
63943 +
63944 +               assert(epdp->ed_nevents > fd);
63945 +               fdi = &(epdp->ed_fds[fd]);
63946 +
63947 +               /*
63948 +                * We now check for each of the possible events (READ or WRITE).
63949 +                * If the event is not persistent, then we delete it. Then, we
63950 +                * activate the event (which will cause its callback to be
63951 +                * executed).
63952 +                */
63953 +
63954 +               if ((res & EV_READ) && ((ev = fdi->fdi_revt) != NULL)) {
63955 +                       if (!(ev->ev_events & EV_PERSIST))
63956 +                               event_del(ev);
63957 +                       event_active(ev, res, 1);
63958 +               }
63959 +
63960 +               if ((res & EV_WRITE) && ((ev = fdi->fdi_wevt) != NULL)) {
63961 +                       if (!(ev->ev_events & EV_PERSIST))
63962 +                               event_del(ev);
63963 +                       event_active(ev, res, 1);
63964 +               }
63965 +
63966 +               /*
63967 +                * If there are still events (they haven't been deleted), then
63968 +                * we must reassociate the port, since the event port interface
63969 +                * dissociates them automatically. 
63970 +                *
63971 +                * But we can't do it right away, because the event hasn't
63972 +                * handled this event yet, so of course there's still data
63973 +                * waiting!
63974 +                */
63975 +               if(FDI_HAS_EVENTS(fdi)) {
63976 +                       epdp->ed_pending[i] = fdi;
63977 +               }
63978 +       } /* end of all events gotten */
63979 +
63980 +       check_evportop(epdp);
63981 +
63982 +       return (0);
63983 +}
63984 +
63985 +
63986 +/*
63987 + * Copied from the version in select.c
63988 + */
63989 +
63990 +static int
63991 +evport_recalc(struct event_base *base, void *arg, int max)
63992 +{
63993 +       struct evport_data *evpd = arg;
63994 +       check_evportop(evpd);
63995 +       return (0);
63996 +}
63997 +
63998 +
63999 +/*
64000 + * Adds the given event (so that you will be notified when it happens via
64001 + * the callback function).
64002 + */
64003 +
64004 +static int
64005 +evport_add(void *arg, struct event *ev)
64006 +{
64007 +       struct evport_data *evpd = arg;
64008 +       struct fd_info *fdi;
64009 +       int factor;
64010 +
64011 +       check_evportop(evpd);
64012 +
64013 +       /*
64014 +        * Delegate, if it's not ours to handle.
64015 +        */
64016 +       if (ev->ev_events & EV_SIGNAL)
64017 +               return (evsignal_add(ev));
64018 +
64019 +       /*
64020 +        * If necessary, grow the file descriptor info table
64021 +        */
64022 +
64023 +       factor = 1;
64024 +       while (ev->ev_fd >= factor * evpd->ed_nevents)
64025 +               factor *= 2;
64026 +
64027 +       if (factor > 1) {
64028 +               if (-1 == grow(evpd, factor)) {
64029 +                       return (-1);
64030 +               }
64031 +       }
64032 +
64033 +       fdi = &evpd->ed_fds[ev->ev_fd];
64034 +       if (ev->ev_events & EV_READ)
64035 +               fdi->fdi_revt = ev;
64036 +       if (ev->ev_events & EV_WRITE)
64037 +               fdi->fdi_wevt = ev;
64038 +
64039 +       return reassociate(evpd, fdi, ev->ev_fd);
64040 +}
64041 +
64042 +/*
64043 + * Removes the given event from the list of events to wait for.
64044 + */
64045 +
64046 +static int
64047 +evport_del(void *arg, struct event *ev)
64048 +{
64049 +       struct evport_data *evpd = arg;
64050 +       struct fd_info *fdi;
64051 +
64052 +       check_evportop(evpd);
64053 +
64054 +       /*
64055 +        * Delegate, if it's not ours to handle
64056 +        */
64057 +       if (ev->ev_events & EV_SIGNAL) {
64058 +               return (evsignal_del(ev));
64059 +       }
64060 +
64061 +       if (evpd->ed_nevents < ev->ev_fd) {
64062 +               return (-1);
64063 +       }
64064 +
64065 +
64066 +       fdi = &evpd->ed_fds[ev->ev_fd];
64067 +       if (ev->ev_events & EV_READ)
64068 +               fdi->fdi_revt = NULL;
64069 +       if (ev->ev_events & EV_WRITE)
64070 +               fdi->fdi_wevt = NULL;
64071 +
64072 +       return reassociate(evpd, fdi, ev->ev_fd);
64073 +}
64074 +
64075 +
64076 +static void
64077 +evport_dealloc(struct event_base *base, void *arg)
64078 +{
64079 +       struct evport_data *evpd = arg;
64080 +
64081 +       evsignal_dealloc(base);
64082 +
64083 +       close(evpd->ed_port);
64084 +
64085 +       if (evpd->ed_fds) free(evpd->ed_fds);
64086 +       free(evpd);
64087 +}
64088 diff -Nru php-5.2.4.vanilla/libevent/evrpc.c php-5.2.4.fpm/libevent/evrpc.c
64089 --- php-5.2.4.vanilla/libevent/evrpc.c  1970-01-01 03:00:00.000000000 +0300
64090 +++ php-5.2.4.fpm/libevent/evrpc.c      2007-08-31 15:47:19.000000000 +0400
64091 @@ -0,0 +1,511 @@
64092 +/*
64093 + * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu>
64094 + * All rights reserved.
64095 + *
64096 + * Redistribution and use in source and binary forms, with or without
64097 + * modification, are permitted provided that the following conditions
64098 + * are met:
64099 + * 1. Redistributions of source code must retain the above copyright
64100 + *    notice, this list of conditions and the following disclaimer.
64101 + * 2. Redistributions in binary form must reproduce the above copyright
64102 + *    notice, this list of conditions and the following disclaimer in the
64103 + *    documentation and/or other materials provided with the distribution.
64104 + * 3. The name of the author may not be used to endorse or promote products
64105 + *    derived from this software without specific prior written permission.
64106 + *
64107 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
64108 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
64109 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
64110 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
64111 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
64112 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
64113 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
64114 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
64115 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
64116 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64117 + */
64118 +#ifdef HAVE_CONFIG_H
64119 +#include "config.h"
64120 +#endif
64121 +
64122 +#ifdef WIN32
64123 +#define WIN32_LEAN_AND_MEAN
64124 +#include <windows.h>
64125 +#include <winsock2.h>
64126 +#undef WIN32_LEAN_AND_MEAN
64127 +#include "misc.h"
64128 +#endif
64129 +
64130 +#include <sys/types.h>
64131 +#include <sys/tree.h>
64132 +#ifndef WIN32
64133 +#include <sys/socket.h>
64134 +#endif
64135 +#ifdef HAVE_SYS_TIME_H
64136 +#include <sys/time.h>
64137 +#else
64138 +#include <sys/_time.h>
64139 +#endif
64140 +#include <sys/queue.h>
64141 +#include <stdio.h>
64142 +#include <stdlib.h>
64143 +#ifndef WIN32
64144 +#include <unistd.h>
64145 +#endif
64146 +#include <errno.h>
64147 +#include <signal.h>
64148 +#include <string.h>
64149 +#include <assert.h>
64150 +
64151 +#include "event.h"
64152 +#include "evrpc.h"
64153 +#include "evrpc-internal.h"
64154 +#include "evhttp.h"
64155 +#include "log.h"
64156 +
64157 +struct evrpc_base *
64158 +evrpc_init(struct evhttp *http_server)
64159 +{
64160 +       struct evrpc_base* base = calloc(1, sizeof(struct evrpc_base));
64161 +       if (base == NULL)
64162 +               return (NULL);
64163 +
64164 +       /* we rely on the tagging sub system */
64165 +       evtag_init();
64166 +
64167 +       TAILQ_INIT(&base->registered_rpcs);
64168 +       base->http_server = http_server;
64169 +
64170 +       return (base);
64171 +}
64172 +
64173 +void
64174 +evrpc_free(struct evrpc_base *base)
64175 +{
64176 +       struct evrpc *rpc;
64177 +       
64178 +       while ((rpc = TAILQ_FIRST(&base->registered_rpcs)) != NULL) {
64179 +               assert(evrpc_unregister_rpc(base, rpc->uri));
64180 +       }
64181 +
64182 +       free(base);
64183 +}
64184 +
64185 +static void evrpc_pool_schedule(struct evrpc_pool *pool);
64186 +static void evrpc_request_cb(struct evhttp_request *, void *);
64187 +void evrpc_request_done(struct evrpc_req_generic*);
64188 +
64189 +/*
64190 + * Registers a new RPC with the HTTP server.   The evrpc object is expected
64191 + * to have been filled in via the EVRPC_REGISTER_OBJECT macro which in turn
64192 + * calls this function.
64193 + */
64194 +
64195 +char *
64196 +evrpc_construct_uri(const char *uri)
64197 +{
64198 +       char *constructed_uri;
64199 +       int constructed_uri_len;
64200 +
64201 +       constructed_uri_len = strlen(EVRPC_URI_PREFIX) + strlen(uri) + 1;
64202 +       if ((constructed_uri = malloc(constructed_uri_len)) == NULL)
64203 +               event_err(1, "%s: failed to register rpc at %s",
64204 +                   __func__, uri);
64205 +       memcpy(constructed_uri, EVRPC_URI_PREFIX, strlen(EVRPC_URI_PREFIX));
64206 +       memcpy(constructed_uri + strlen(EVRPC_URI_PREFIX), uri, strlen(uri));
64207 +       constructed_uri[constructed_uri_len - 1] = '\0';
64208 +
64209 +       return (constructed_uri);
64210 +}
64211 +
64212 +int
64213 +evrpc_register_rpc(struct evrpc_base *base, struct evrpc *rpc,
64214 +    void (*cb)(struct evrpc_req_generic *, void *), void *cb_arg)
64215 +{
64216 +       char *constructed_uri = evrpc_construct_uri(rpc->uri);
64217 +
64218 +       rpc->cb = cb;
64219 +       rpc->cb_arg = cb_arg;
64220 +
64221 +       TAILQ_INSERT_TAIL(&base->registered_rpcs, rpc, next);
64222 +
64223 +       evhttp_set_cb(base->http_server,
64224 +           constructed_uri,
64225 +           evrpc_request_cb,
64226 +           rpc);
64227 +       
64228 +       free(constructed_uri);
64229 +
64230 +       return (0);
64231 +}
64232 +
64233 +int
64234 +evrpc_unregister_rpc(struct evrpc_base *base, const char *name)
64235 +{
64236 +       char *registered_uri = NULL;
64237 +       struct evrpc *rpc;
64238 +
64239 +       /* find the right rpc; linear search might be slow */
64240 +       TAILQ_FOREACH(rpc, &base->registered_rpcs, next) {
64241 +               if (strcmp(rpc->uri, name) == 0)
64242 +                       break;
64243 +       }
64244 +       if (rpc == NULL) {
64245 +               /* We did not find an RPC with this name */
64246 +               return (-1);
64247 +       }
64248 +       TAILQ_REMOVE(&base->registered_rpcs, rpc, next);
64249 +       
64250 +       free((char *)rpc->uri);
64251 +       free(rpc);
64252 +
64253 +        registered_uri = evrpc_construct_uri(name);
64254 +
64255 +       /* remove the http server callback */
64256 +       assert(evhttp_del_cb(base->http_server, registered_uri) == 0);
64257 +
64258 +       free(registered_uri);
64259 +       return (0);
64260 +}
64261 +
64262 +static void
64263 +evrpc_request_cb(struct evhttp_request *req, void *arg)
64264 +{
64265 +       struct evrpc *rpc = arg;
64266 +       struct evrpc_req_generic *rpc_state = NULL;
64267 +
64268 +       /* let's verify the outside parameters */
64269 +       if (req->type != EVHTTP_REQ_POST ||
64270 +           EVBUFFER_LENGTH(req->input_buffer) <= 0)
64271 +               goto error;
64272 +
64273 +       rpc_state = calloc(1, sizeof(struct evrpc_req_generic));
64274 +       if (rpc_state == NULL)
64275 +               goto error;
64276 +
64277 +       /* let's check that we can parse the request */
64278 +       rpc_state->request = rpc->request_new();
64279 +       if (rpc_state->request == NULL)
64280 +               goto error;
64281 +
64282 +       rpc_state->rpc = rpc;
64283 +
64284 +       if (rpc->request_unmarshal(
64285 +                   rpc_state->request, req->input_buffer) == -1) {
64286 +               /* we failed to parse the request; that's a bummer */
64287 +               goto error;
64288 +       }
64289 +
64290 +       /* at this point, we have a well formed request, prepare the reply */
64291 +
64292 +       rpc_state->reply = rpc->reply_new();
64293 +       if (rpc_state->reply == NULL)
64294 +               goto error;
64295 +
64296 +       rpc_state->http_req = req;
64297 +       rpc_state->done = evrpc_request_done;
64298 +
64299 +       /* give the rpc to the user; they can deal with it */
64300 +       rpc->cb(rpc_state, rpc->cb_arg);
64301 +
64302 +       return;
64303 +
64304 +error:
64305 +       evrpc_reqstate_free(rpc_state);
64306 +       evhttp_send_error(req, HTTP_SERVUNAVAIL, "Service Error");
64307 +       return;
64308 +}
64309 +
64310 +void
64311 +evrpc_reqstate_free(struct evrpc_req_generic* rpc_state)
64312 +{
64313 +       /* clean up all memory */
64314 +       if (rpc_state != NULL) {
64315 +               struct evrpc *rpc = rpc_state->rpc;
64316 +
64317 +               if (rpc_state->request != NULL)
64318 +                       rpc->request_free(rpc_state->request);
64319 +               if (rpc_state->reply != NULL)
64320 +                       rpc->reply_free(rpc_state->reply);
64321 +               free(rpc_state);
64322 +       }
64323 +}
64324 +
64325 +void
64326 +evrpc_request_done(struct evrpc_req_generic* rpc_state)
64327 +{
64328 +       struct evhttp_request *req = rpc_state->http_req;
64329 +       struct evrpc *rpc = rpc_state->rpc;
64330 +       struct evbuffer* data;
64331 +
64332 +       if (rpc->reply_complete(rpc_state->reply) == -1) {
64333 +               /* the reply was not completely filled in.  error out */
64334 +               goto error;
64335 +       }
64336 +
64337 +       if ((data = evbuffer_new()) == NULL) {
64338 +               /* out of memory */
64339 +               goto error;
64340 +       }
64341 +
64342 +       /* serialize the reply */
64343 +       rpc->reply_marshal(data, rpc_state->reply);
64344 +
64345 +       evhttp_send_reply(req, HTTP_OK, "OK", data);
64346 +
64347 +       evbuffer_free(data);
64348 +
64349 +       evrpc_reqstate_free(rpc_state);
64350 +
64351 +       return;
64352 +
64353 +error:
64354 +       evrpc_reqstate_free(rpc_state);
64355 +       evhttp_send_error(req, HTTP_SERVUNAVAIL, "Service Error");
64356 +       return;
64357 +}
64358 +
64359 +/* Client implementation of RPC site */
64360 +
64361 +static int evrpc_schedule_request(struct evhttp_connection *connection,
64362 +    struct evrpc_request_wrapper *ctx);
64363 +
64364 +struct evrpc_pool *
64365 +evrpc_pool_new()
64366 +{
64367 +       struct evrpc_pool *pool = calloc(1, sizeof(struct evrpc_pool));
64368 +       if (pool == NULL)
64369 +               return (NULL);
64370 +
64371 +       TAILQ_INIT(&pool->connections);
64372 +       TAILQ_INIT(&pool->requests);
64373 +
64374 +       pool->timeout = -1;
64375 +
64376 +       return (pool);
64377 +}
64378 +
64379 +static void
64380 +evrpc_request_wrapper_free(struct evrpc_request_wrapper *request)
64381 +{
64382 +       free(request->name);
64383 +       free(request);
64384 +}
64385 +
64386 +void
64387 +evrpc_pool_free(struct evrpc_pool *pool)
64388 +{
64389 +       struct evhttp_connection *connection;
64390 +       struct evrpc_request_wrapper *request;
64391 +
64392 +       while ((request = TAILQ_FIRST(&pool->requests)) != NULL) {
64393 +               TAILQ_REMOVE(&pool->requests, request, next);
64394 +               /* if this gets more complicated we need our own function */
64395 +               evrpc_request_wrapper_free(request);
64396 +       }
64397 +
64398 +       while ((connection = TAILQ_FIRST(&pool->connections)) != NULL) {
64399 +               TAILQ_REMOVE(&pool->connections, connection, next);
64400 +               evhttp_connection_free(connection);
64401 +       }
64402 +
64403 +       free(pool);
64404 +}
64405 +
64406 +/*
64407 + * Add a connection to the RPC pool.   A request scheduled on the pool
64408 + * may use any available connection.
64409 + */
64410 +
64411 +void
64412 +evrpc_pool_add_connection(struct evrpc_pool *pool,
64413 +    struct evhttp_connection *connection) {
64414 +       assert(connection->http_server == NULL);
64415 +       TAILQ_INSERT_TAIL(&pool->connections, connection, next);
64416 +
64417 +       /* 
64418 +        * unless a timeout was specifically set for a connection,
64419 +        * the connection inherits the timeout from the pool.
64420 +        */
64421 +       if (connection->timeout == -1)
64422 +               connection->timeout = pool->timeout;
64423 +
64424 +       /* 
64425 +        * if we have any requests pending, schedule them with the new
64426 +        * connections.
64427 +        */
64428 +
64429 +       if (TAILQ_FIRST(&pool->requests) != NULL) {
64430 +               struct evrpc_request_wrapper *request = 
64431 +                   TAILQ_FIRST(&pool->requests);
64432 +               TAILQ_REMOVE(&pool->requests, request, next);
64433 +               evrpc_schedule_request(connection, request);
64434 +       }
64435 +}
64436 +
64437 +void
64438 +evrpc_pool_set_timeout(struct evrpc_pool *pool, int timeout_in_secs)
64439 +{
64440 +       struct evhttp_connection *evcon;
64441 +       TAILQ_FOREACH(evcon, &pool->connections, next) {
64442 +               evcon->timeout = timeout_in_secs;
64443 +       }
64444 +       pool->timeout = timeout_in_secs;
64445 +}
64446 +
64447 +
64448 +static void evrpc_reply_done(struct evhttp_request *, void *);
64449 +static void evrpc_request_timeout(int, short, void *);
64450 +
64451 +/*
64452 + * Finds a connection object associated with the pool that is currently
64453 + * idle and can be used to make a request.
64454 + */
64455 +static struct evhttp_connection *
64456 +evrpc_pool_find_connection(struct evrpc_pool *pool)
64457 +{
64458 +       struct evhttp_connection *connection;
64459 +       TAILQ_FOREACH(connection, &pool->connections, next) {
64460 +               if (TAILQ_FIRST(&connection->requests) == NULL)
64461 +                       return (connection);
64462 +       }
64463 +
64464 +       return (NULL);
64465 +}
64466 +
64467 +/*
64468 + * We assume that the ctx is no longer queued on the pool.
64469 + */
64470 +static int
64471 +evrpc_schedule_request(struct evhttp_connection *connection,
64472 +    struct evrpc_request_wrapper *ctx)
64473 +{
64474 +       struct evhttp_request *req = NULL;
64475 +       struct evrpc_pool *pool = ctx->pool;
64476 +       struct evrpc_status status;
64477 +       char *uri = NULL;
64478 +       int res = 0;
64479 +
64480 +       if ((req = evhttp_request_new(evrpc_reply_done, ctx)) == NULL)
64481 +               goto error;
64482 +
64483 +       /* serialize the request data into the output buffer */
64484 +       ctx->request_marshal(req->output_buffer, ctx->request);
64485 +
64486 +       uri = evrpc_construct_uri(ctx->name);
64487 +       if (uri == NULL)
64488 +               goto error;
64489 +
64490 +       /* we need to know the connection that we might have to abort */
64491 +       ctx->evcon = connection;
64492 +
64493 +       if (pool->timeout > 0) {
64494 +               /* 
64495 +                * a timeout after which the whole rpc is going to be aborted.
64496 +                */
64497 +               struct timeval tv;
64498 +               timerclear(&tv);
64499 +               tv.tv_sec = pool->timeout;
64500 +               evtimer_add(&ctx->ev_timeout, &tv);
64501 +       }
64502 +
64503 +       /* start the request over the connection */
64504 +       res = evhttp_make_request(connection, req, EVHTTP_REQ_POST, uri);
64505 +       free(uri);
64506 +
64507 +       if (res == -1)
64508 +               goto error;
64509 +
64510 +       return (0);
64511 +
64512 +error:
64513 +       memset(&status, 0, sizeof(status));
64514 +       status.error = EVRPC_STATUS_ERR_UNSTARTED;
64515 +       (*ctx->cb)(&status, ctx->request, ctx->reply, ctx->cb_arg);
64516 +       evrpc_request_wrapper_free(ctx);
64517 +       return (-1);
64518 +}
64519 +
64520 +int
64521 +evrpc_make_request(struct evrpc_request_wrapper *ctx)
64522 +{
64523 +       struct evrpc_pool *pool = ctx->pool;
64524 +
64525 +       /* initialize the event structure for this rpc */
64526 +       evtimer_set(&ctx->ev_timeout, evrpc_request_timeout, ctx);
64527 +
64528 +       /* we better have some available connections on the pool */
64529 +       assert(TAILQ_FIRST(&pool->connections) != NULL);
64530 +
64531 +       /* 
64532 +        * if no connection is available, we queue the request on the pool,
64533 +        * the next time a connection is empty, the rpc will be send on that.
64534 +        */
64535 +       TAILQ_INSERT_TAIL(&pool->requests, ctx, next);
64536 +
64537 +       evrpc_pool_schedule(pool);
64538 +
64539 +       return (0);
64540 +}
64541 +
64542 +static void
64543 +evrpc_reply_done(struct evhttp_request *req, void *arg)
64544 +{
64545 +       struct evrpc_request_wrapper *ctx = arg;
64546 +       struct evrpc_pool *pool = ctx->pool;
64547 +       struct evrpc_status status;
64548 +       int res = -1;
64549 +       
64550 +       /* cancel any timeout we might have scheduled */
64551 +       event_del(&ctx->ev_timeout);
64552 +
64553 +       memset(&status, 0, sizeof(status));
64554 +       /* we need to get the reply now */
64555 +       if (req != NULL) {
64556 +               res = ctx->reply_unmarshal(ctx->reply, req->input_buffer);
64557 +               if (res == -1) {
64558 +                       status.error = EVRPC_STATUS_ERR_BADPAYLOAD;
64559 +               }
64560 +       } else {
64561 +               status.error = EVRPC_STATUS_ERR_TIMEOUT;
64562 +       }
64563 +       if (res == -1) {
64564 +               /* clear everything that we might have written previously */
64565 +               ctx->reply_clear(ctx->reply);
64566 +       }
64567 +
64568 +       (*ctx->cb)(&status, ctx->request, ctx->reply, ctx->cb_arg);
64569 +       
64570 +       evrpc_request_wrapper_free(ctx);
64571 +
64572 +       /* the http layer owns the request structure */
64573 +
64574 +       /* see if we can schedule another request */
64575 +       evrpc_pool_schedule(pool);
64576 +}
64577 +
64578 +static void
64579 +evrpc_pool_schedule(struct evrpc_pool *pool)
64580 +{
64581 +       struct evrpc_request_wrapper *ctx = TAILQ_FIRST(&pool->requests);
64582 +       struct evhttp_connection *evcon;
64583 +
64584 +       /* if no requests are pending, we have no work */
64585 +       if (ctx == NULL)
64586 +               return;
64587 +
64588 +       if ((evcon = evrpc_pool_find_connection(pool)) != NULL) {
64589 +               TAILQ_REMOVE(&pool->requests, ctx, next);
64590 +               evrpc_schedule_request(evcon, ctx);
64591 +       }
64592 +}
64593 +
64594 +static void
64595 +evrpc_request_timeout(int fd, short what, void *arg)
64596 +{
64597 +       struct evrpc_request_wrapper *ctx = arg;
64598 +       struct evhttp_connection *evcon = ctx->evcon;
64599 +       assert(evcon != NULL);
64600 +
64601 +       evhttp_connection_fail(evcon, EVCON_HTTP_TIMEOUT);
64602 +}
64603 diff -Nru php-5.2.4.vanilla/libevent/evrpc.h php-5.2.4.fpm/libevent/evrpc.h
64604 --- php-5.2.4.vanilla/libevent/evrpc.h  1970-01-01 03:00:00.000000000 +0300
64605 +++ php-5.2.4.fpm/libevent/evrpc.h      2007-08-31 15:47:19.000000000 +0400
64606 @@ -0,0 +1,320 @@
64607 +/*
64608 + * Copyright (c) 2006 Niels Provos <provos@citi.umich.edu>
64609 + * All rights reserved.
64610 + *
64611 + * Redistribution and use in source and binary forms, with or without
64612 + * modification, are permitted provided that the following conditions
64613 + * are met:
64614 + * 1. Redistributions of source code must retain the above copyright
64615 + *    notice, this list of conditions and the following disclaimer.
64616 + * 2. Redistributions in binary form must reproduce the above copyright
64617 + *    notice, this list of conditions and the following disclaimer in the
64618 + *    documentation and/or other materials provided with the distribution.
64619 + * 3. The name of the author may not be used to endorse or promote products
64620 + *    derived from this software without specific prior written permission.
64621 + *
64622 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
64623 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
64624 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
64625 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
64626 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
64627 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
64628 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
64629 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
64630 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
64631 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64632 + */
64633 +#ifndef _EVRPC_H_
64634 +#define _EVRPC_H_
64635 +
64636 +#ifdef __cplusplus
64637 +extern "C" {
64638 +#endif
64639 +
64640 +/*
64641 + * This header files provides basic support for an RPC server and client.
64642 + *
64643 + * To support RPCs in a server, every supported RPC command needs to be
64644 + * defined and registered.
64645 + *
64646 + * EVRPC_HEADER(SendCommand, Request, Reply);
64647 + *
64648 + *  SendCommand is the name of the RPC command.
64649 + *  Request is the name of a structure generated by event_rpcgen.py.
64650 + *    It contains all parameters relating to the SendCommand RPC.  The
64651 + *    server needs to fill in the Reply structure.
64652 + *  Reply is the name of a structure generated by event_rpcgen.py.  It
64653 + *    contains the answer to the RPC.
64654 + *
64655 + * To register an RPC with an HTTP server, you need to first create an RPC
64656 + * base with:
64657 + *
64658 + *   struct evrpc_base *base = evrpc_init(http);
64659 + *
64660 + * A specific RPC can then be registered with
64661 + *
64662 + * EVRPC_REGISTER(base, SendCommand, Request, Reply,  FunctionCB, arg);
64663 + *
64664 + * when the server receives an appropriately formatted RPC, the user callback
64665 + * is invokved.   The callback needs to fill in the reply structure.
64666 + *
64667 + * void FunctionCB(EVRPC_STRUCT(SendCommand)* rpc, void *arg);
64668 + *
64669 + * To send the reply, call EVRPC_REQUEST_DONE(rpc);
64670 + *
64671 + * See the regression test for an example.
64672 + */
64673 +
64674 +struct evbuffer;
64675 +struct evrpc_req_generic;
64676 +
64677 +/* Encapsulates a request */
64678 +struct evrpc {
64679 +       TAILQ_ENTRY(evrpc) next;
64680 +
64681 +       /* the URI at which the request handler lives */
64682 +       const char* uri;
64683 +
64684 +       /* creates a new request structure */
64685 +       void *(*request_new)(void);
64686 +
64687 +       /* frees the request structure */
64688 +       void (*request_free)(void *);
64689 +
64690 +       /* unmarshals the buffer into the proper request structure */
64691 +       int (*request_unmarshal)(void *, struct evbuffer *);
64692 +
64693 +       /* creates a new reply structure */
64694 +       void *(*reply_new)(void);
64695 +
64696 +       /* creates a new reply structure */
64697 +       void (*reply_free)(void *);
64698 +
64699 +       /* verifies that the reply is valid */
64700 +       int (*reply_complete)(void *);
64701 +       
64702 +       /* marshals the reply into a buffer */
64703 +       void (*reply_marshal)(struct evbuffer*, void *);
64704 +
64705 +       /* the callback invoked for each received rpc */
64706 +       void (*cb)(struct evrpc_req_generic *, void *);
64707 +       void *cb_arg;
64708 +};
64709 +
64710 +#define EVRPC_STRUCT(rpcname) struct evrpc_req__##rpcname
64711 +
64712 +struct evhttp_request;
64713 +struct evrpc_status;
64714 +
64715 +/* We alias the RPC specific structs to this voided one */
64716 +struct evrpc_req_generic {
64717 +       /* the unmarshaled request object */
64718 +       void *request;
64719 +
64720 +       /* the empty reply object that needs to be filled in */
64721 +       void *reply;
64722 +
64723 +       /* 
64724 +        * the static structure for this rpc; that can be used to
64725 +        * automatically unmarshal and marshal the http buffers.
64726 +        */
64727 +       struct evrpc *rpc;
64728 +
64729 +       /*
64730 +        * the http request structure on which we need to answer.
64731 +        */
64732 +       struct evhttp_request* http_req;
64733 +
64734 +       /*
64735 +        * callback to reply and finish answering this rpc
64736 +        */
64737 +       void (*done)(struct evrpc_req_generic* rpc); 
64738 +};
64739 +
64740 +/*
64741 + * You need to use EVRPC_HEADER to create structures and function prototypes
64742 + * needed by the server and client implementation.
64743 + */
64744 +#define EVRPC_HEADER(rpcname, reqstruct, rplystruct) \
64745 +EVRPC_STRUCT(rpcname) {        \
64746 +       struct reqstruct* request; \
64747 +       struct rplystruct* reply; \
64748 +       struct evrpc* rpc; \
64749 +       void (*done)(struct evrpc_status *, \
64750 +           struct evrpc* rpc, void *request, void *reply);          \
64751 +};                                                                  \
64752 +int evrpc_send_request_##rpcname(struct evrpc_pool *, \
64753 +    struct reqstruct *, struct rplystruct *, \
64754 +    void (*)(struct evrpc_status *, \
64755 +       struct reqstruct *, struct rplystruct *, void *cbarg),  \
64756 +    void *);
64757 +
64758 +#define EVRPC_GENERATE(rpcname, reqstruct, rplystruct) \
64759 +int evrpc_send_request_##rpcname(struct evrpc_pool *pool, \
64760 +    struct reqstruct *request, struct rplystruct *reply, \
64761 +    void (*cb)(struct evrpc_status *, \
64762 +       struct reqstruct *, struct rplystruct *, void *cbarg),  \
64763 +    void *cbarg) { \
64764 +       struct evrpc_status status;                                 \
64765 +       struct evrpc_request_wrapper *ctx;                          \
64766 +       ctx = (struct evrpc_request_wrapper *) \
64767 +           malloc(sizeof(struct evrpc_request_wrapper));           \
64768 +       if (ctx == NULL)                                            \
64769 +               goto error;                                         \
64770 +       ctx->pool = pool;                                           \
64771 +       ctx->evcon = NULL;                                          \
64772 +       ctx->name = strdup(#rpcname);                               \
64773 +       if (ctx->name == NULL) {                                    \
64774 +               free(ctx);                                          \
64775 +               goto error;                                         \
64776 +       }                                                           \
64777 +       ctx->cb = (void (*)(struct evrpc_status *, \
64778 +               void *, void *, void *))cb;                         \
64779 +       ctx->cb_arg = cbarg;                                        \
64780 +       ctx->request = (void *)request;                             \
64781 +       ctx->reply = (void *)reply;                                 \
64782 +       ctx->request_marshal = (void (*)(struct evbuffer *, void *))reqstruct##_marshal; \
64783 +       ctx->reply_clear = (void (*)(void *))rplystruct##_clear;    \
64784 +       ctx->reply_unmarshal = (int (*)(void *, struct evbuffer *))rplystruct##_unmarshal; \
64785 +       return (evrpc_make_request(ctx));                           \
64786 +error:                                                             \
64787 +       memset(&status, 0, sizeof(status));                         \
64788 +       status.error = EVRPC_STATUS_ERR_UNSTARTED;                  \
64789 +       (*(cb))(&status, request, reply, cbarg);                    \
64790 +       return (-1);                                                \
64791 +}
64792 +
64793 +
64794 +/* 
64795 + * EVRPC_REQUEST_DONE is used to answer a request; the reply is expected
64796 + * to have been filled in.  The request and reply pointers become invalid
64797 + * after this call has finished.
64798 + */
64799 +#define EVRPC_REQUEST_DONE(rpc_req) do { \
64800 +  struct evrpc_req_generic *_req = (struct evrpc_req_generic *)(rpc_req); \
64801 +  _req->done(_req); \
64802 +} while (0)
64803 +  
64804 +
64805 +/* Takes a request object and fills it in with the right magic */
64806 +#define EVRPC_REGISTER_OBJECT(rpc, name, request, reply) \
64807 +  do { \
64808 +    (rpc)->uri = strdup(#name); \
64809 +    if ((rpc)->uri == NULL) {                   \
64810 +      fprintf(stderr, "failed to register object\n");  \
64811 +      exit(1);                                         \
64812 +    } \
64813 +    (rpc)->request_new = (void *(*)(void))request##_new; \
64814 +    (rpc)->request_free = (void (*)(void *))request##_free; \
64815 +    (rpc)->request_unmarshal = (int (*)(void *, struct evbuffer *))request##_unmarshal; \
64816 +    (rpc)->reply_new = (void *(*)(void))reply##_new; \
64817 +    (rpc)->reply_free = (void (*)(void *))reply##_free; \
64818 +    (rpc)->reply_complete = (int (*)(void *))reply##_complete; \
64819 +    (rpc)->reply_marshal = (void (*)(struct evbuffer*, void *))reply##_marshal; \
64820 +  } while (0)
64821 +
64822 +struct evrpc_base;
64823 +struct evhttp;
64824 +
64825 +/* functions to start up the rpc system */
64826 +struct evrpc_base *evrpc_init(struct evhttp *server);
64827 +
64828 +/* frees the base - for now, you are responsible for making sure that no rpcs are ongoing */
64829 +void evrpc_free(struct evrpc_base *);
64830 +
64831 +/* this macro is used to register RPCs with the HTTP Server */
64832 +#define EVRPC_REGISTER(base, name, request, reply, callback, cbarg) \
64833 +  do { \
64834 +    struct evrpc* rpc = (struct evrpc *)calloc(1, sizeof(struct evrpc)); \
64835 +    EVRPC_REGISTER_OBJECT(rpc, name, request, reply); \
64836 +    evrpc_register_rpc(base, rpc, \
64837 +       (void (*)(struct evrpc_req_generic*, void *))callback, cbarg);  \
64838 +  } while (0)
64839 +
64840 +int evrpc_register_rpc(struct evrpc_base *, struct evrpc *,
64841 +    void (*)(struct evrpc_req_generic*, void *), void *);
64842 +
64843 +/* Takes the named RPCs and tried to unregister it */
64844 +#define EVRPC_UNREGISTER(base, name) evrpc_unregister_rpc(base, #name)
64845 +
64846 +int evrpc_unregister_rpc(struct evrpc_base *, const char *name);
64847 +
64848 +/*
64849 + * Client-side RPC support
64850 + */
64851 +
64852 +struct evrpc_pool;
64853 +struct evhttp_connection;
64854 +
64855 +struct evrpc_status {
64856 +#define EVRPC_STATUS_ERR_NONE          0
64857 +#define EVRPC_STATUS_ERR_TIMEOUT       1
64858 +#define EVRPC_STATUS_ERR_BADPAYLOAD    2
64859 +#define EVRPC_STATUS_ERR_UNSTARTED     3
64860 +       int error;
64861 +};
64862 +
64863 +struct evrpc_request_wrapper {
64864 +       TAILQ_ENTRY(evrpc_request_wrapper) next;
64865 +
64866 +        /* pool on which this rpc request is being made */
64867 +        struct evrpc_pool *pool;
64868 +
64869 +        /* connection on which the request is being sent */
64870 +       struct evhttp_connection *evcon;
64871 +
64872 +       /* event for implementing request timeouts */
64873 +       struct event ev_timeout;
64874 +
64875 +       /* the name of the rpc */
64876 +       char *name;
64877 +
64878 +       /* callback */
64879 +       void (*cb)(struct evrpc_status*, void *request, void *reply, void *arg);
64880 +       void *cb_arg;
64881 +
64882 +       void *request;
64883 +       void *reply;
64884 +
64885 +       /* unmarshals the buffer into the proper request structure */
64886 +       void (*request_marshal)(struct evbuffer *, void *);
64887 +
64888 +       /* removes all stored state in the reply */
64889 +       void (*reply_clear)(void *);
64890 +
64891 +       /* marshals the reply into a buffer */
64892 +       int (*reply_unmarshal)(void *, struct evbuffer*);
64893 +};
64894 +
64895 +#define EVRPC_MAKE_REQUEST(name, pool, request, reply, cb, cbarg)      \
64896 +       evrpc_send_request_##name(pool, request, reply, cb, cbarg)
64897 +
64898 +int evrpc_make_request(struct evrpc_request_wrapper *);
64899 +
64900 +/* 
64901 + * a pool has a number of connections associated with it.
64902 + * rpc requests are always made via a pool.
64903 + */
64904 +struct evrpc_pool *evrpc_pool_new();
64905 +void evrpc_pool_free(struct evrpc_pool *);
64906 +void evrpc_pool_add_connection(struct evrpc_pool *, 
64907 +    struct evhttp_connection *);
64908 +
64909 +/*
64910 + * Sets the timeout in secs after which a request has to complete.  The
64911 + * RPC is completely aborted if it does not complete by then.  Setting
64912 + * the timeout to 0 means that it never timeouts and can be used to
64913 + * implement callback type RPCs.
64914 + *
64915 + * Any connection already in the pool will be updated with the new
64916 + * timeout.  Connections added to the pool after set_timeout has be
64917 + * called receive the pool timeout only if no timeout has been set
64918 + * for the connection itself.
64919 + */
64920 +void evrpc_pool_set_timeout(struct evrpc_pool *, int timeout_in_secs);
64921 +
64922 +#ifdef __cplusplus
64923 +}
64924 +#endif
64925 +
64926 +#endif /* _EVRPC_H_ */
64927 diff -Nru php-5.2.4.vanilla/libevent/evrpc-internal.h php-5.2.4.fpm/libevent/evrpc-internal.h
64928 --- php-5.2.4.vanilla/libevent/evrpc-internal.h 1970-01-01 03:00:00.000000000 +0300
64929 +++ php-5.2.4.fpm/libevent/evrpc-internal.h     2007-08-31 15:47:19.000000000 +0400
64930 @@ -0,0 +1,57 @@
64931 +/*
64932 + * Copyright (c) 2006 Niels Provos <provos@citi.umich.edu>
64933 + * All rights reserved.
64934 + *
64935 + * Redistribution and use in source and binary forms, with or without
64936 + * modification, are permitted provided that the following conditions
64937 + * are met:
64938 + * 1. Redistributions of source code must retain the above copyright
64939 + *    notice, this list of conditions and the following disclaimer.
64940 + * 2. Redistributions in binary form must reproduce the above copyright
64941 + *    notice, this list of conditions and the following disclaimer in the
64942 + *    documentation and/or other materials provided with the distribution.
64943 + * 3. The name of the author may not be used to endorse or promote products
64944 + *    derived from this software without specific prior written permission.
64945 + *
64946 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
64947 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
64948 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
64949 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
64950 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
64951 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
64952 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
64953 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
64954 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
64955 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64956 + */
64957 +#ifndef _EVRPC_INTERNAL_H_
64958 +#define _EVRPC_INTERNAL_H_
64959 +
64960 +#include "http-internal.h"
64961 +
64962 +struct evrpc;
64963 +
64964 +#define EVRPC_URI_PREFIX "/.rpc."
64965 +
64966 +struct evrpc_base {
64967 +       /* the HTTP server under which we register our RPC calls */
64968 +       struct evhttp* http_server;
64969 +
64970 +       /* a list of all RPCs registered with us */
64971 +       TAILQ_HEAD(evrpc_list, evrpc) registered_rpcs;
64972 +};
64973 +
64974 +struct evrpc_req_generic;
64975 +void evrpc_reqstate_free(struct evrpc_req_generic* rpc_state);
64976 +
64977 +/* A pool for holding evhttp_connection objects */
64978 +struct evrpc_pool {
64979 +       struct evconq connections;
64980 +
64981 +       int timeout;
64982 +
64983 +       TAILQ_HEAD(evrpc_requestq, evrpc_request_wrapper) requests;
64984 +};
64985 +
64986 +
64987 +#endif /* _EVRPC_INTERNAL_H_ */
64988 diff -Nru php-5.2.4.vanilla/libevent/evsignal.h php-5.2.4.fpm/libevent/evsignal.h
64989 --- php-5.2.4.vanilla/libevent/evsignal.h       1970-01-01 03:00:00.000000000 +0300
64990 +++ php-5.2.4.fpm/libevent/evsignal.h   2007-08-31 15:47:19.000000000 +0400
64991 @@ -0,0 +1,44 @@
64992 +/*
64993 + * Copyright 2000-2002 Niels Provos <provos@citi.umich.edu>
64994 + * All rights reserved.
64995 + *
64996 + * Redistribution and use in source and binary forms, with or without
64997 + * modification, are permitted provided that the following conditions
64998 + * are met:
64999 + * 1. Redistributions of source code must retain the above copyright
65000 + *    notice, this list of conditions and the following disclaimer.
65001 + * 2. Redistributions in binary form must reproduce the above copyright
65002 + *    notice, this list of conditions and the following disclaimer in the
65003 + *    documentation and/or other materials provided with the distribution.
65004 + * 3. The name of the author may not be used to endorse or promote products
65005 + *    derived from this software without specific prior written permission.
65006 + *
65007 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
65008 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
65009 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
65010 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
65011 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
65012 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
65013 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
65014 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
65015 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
65016 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
65017 + */
65018 +#ifndef _EVSIGNAL_H_
65019 +#define _EVSIGNAL_H_
65020 +
65021 +struct evsignal_info {
65022 +       struct event_list signalqueue;
65023 +       struct event ev_signal;
65024 +       int ev_signal_pair[2];
65025 +       int ev_signal_added;
65026 +       volatile sig_atomic_t evsignal_caught;
65027 +       sig_atomic_t evsigcaught[NSIG];
65028 +};
65029 +void evsignal_init(struct event_base *);
65030 +void evsignal_process(struct event_base *);
65031 +int evsignal_add(struct event *);
65032 +int evsignal_del(struct event *);
65033 +void evsignal_dealloc(struct event_base *);
65034 +
65035 +#endif /* _EVSIGNAL_H_ */
65036 diff -Nru php-5.2.4.vanilla/libevent/http.c php-5.2.4.fpm/libevent/http.c
65037 --- php-5.2.4.vanilla/libevent/http.c   1970-01-01 03:00:00.000000000 +0300
65038 +++ php-5.2.4.fpm/libevent/http.c       2007-08-31 15:47:19.000000000 +0400
65039 @@ -0,0 +1,2329 @@
65040 +/*
65041 + * Copyright (c) 2002-2006 Niels Provos <provos@citi.umich.edu>
65042 + * All rights reserved.
65043 + *
65044 + * Redistribution and use in source and binary forms, with or without
65045 + * modification, are permitted provided that the following conditions
65046 + * are met:
65047 + * 1. Redistributions of source code must retain the above copyright
65048 + *    notice, this list of conditions and the following disclaimer.
65049 + * 2. Redistributions in binary form must reproduce the above copyright
65050 + *    notice, this list of conditions and the following disclaimer in the
65051 + *    documentation and/or other materials provided with the distribution.
65052 + * 3. The name of the author may not be used to endorse or promote products
65053 + *    derived from this software without specific prior written permission.
65054 + *
65055 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
65056 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
65057 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
65058 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
65059 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
65060 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
65061 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
65062 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
65063 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
65064 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
65065 + */
65066 +
65067 +#include <sys/param.h>
65068 +#include <sys/types.h>
65069 +
65070 +#ifdef HAVE_CONFIG_H
65071 +#include "config.h"
65072 +#endif
65073 +
65074 +#ifdef HAVE_SYS_TIME_H
65075 +#include <sys/time.h>
65076 +#endif
65077 +#ifdef HAVE_SYS_IOCCOM_H
65078 +#include <sys/ioccom.h>
65079 +#endif
65080 +
65081 +#ifndef WIN32
65082 +#include <sys/resource.h>
65083 +#include <sys/socket.h>
65084 +#include <sys/stat.h>
65085 +#include <sys/wait.h>
65086 +#endif
65087 +
65088 +#include <sys/tree.h>
65089 +#include <sys/queue.h>
65090 +
65091 +#ifndef WIN32
65092 +#include <netinet/in.h>
65093 +#include <netdb.h>
65094 +#endif
65095 +
65096 +#include <assert.h>
65097 +#include <ctype.h>
65098 +#include <errno.h>
65099 +#include <stdio.h>
65100 +#include <stdlib.h>
65101 +#include <string.h>
65102 +#ifndef WIN32
65103 +#include <syslog.h>
65104 +#endif
65105 +#include <signal.h>
65106 +#ifdef HAVE_TIME_H
65107 +#include <time.h>
65108 +#endif
65109 +#include <unistd.h>
65110 +#include <fcntl.h>
65111 +
65112 +#undef timeout_pending
65113 +#undef timeout_initialized
65114 +
65115 +#include "strlcpy-internal.h"
65116 +#include "event.h"
65117 +#include "evhttp.h"
65118 +#include "log.h"
65119 +#include "http-internal.h"
65120 +
65121 +#ifndef HAVE_GETADDRINFO
65122 +struct addrinfo {
65123 +       int ai_family;
65124 +       int ai_socktype;
65125 +       int ai_protocol;
65126 +       size_t ai_addrlen;
65127 +       struct sockaddr *ai_addr;
65128 +       struct addrinfo *ai_next;
65129 +};
65130 +static int
65131 +fake_getaddrinfo(const char *hostname, struct addrinfo *ai)
65132 +{
65133 +       struct hostent *he;
65134 +       he = gethostbyname(hostname);
65135 +       if (!he)
65136 +               return (-1);
65137 +       ai->ai_family = he->h_addrtype;
65138 +       ai->ai_socktype = SOCK_STREAM;
65139 +       ai->ai_protocol = 0;
65140 +       ai->ai_addrlen = he->h_length;
65141 +       if (NULL == (ai->ai_addr = malloc(ai->ai_addrlen)))
65142 +               return (-1);
65143 +       memcpy(ai->ai_addr, &he->h_addr_list[0], ai->ai_addrlen);
65144 +       ai->ai_next = NULL;
65145 +       return (0);
65146 +}
65147 +static void
65148 +fake_freeaddrinfo(struct addrinfo *ai)
65149 +{
65150 +       free(ai->ai_addr);
65151 +}
65152 +#endif
65153 +
65154 +#ifndef MIN
65155 +#define MIN(a,b) (((a)<(b))?(a):(b))
65156 +#endif
65157 +
65158 +static int
65159 +event_make_socket_nonblocking(int fd)
65160 +{
65161 +
65162 +#ifdef WIN32
65163 +       {
65164 +               unsigned long nonblocking = 1;
65165 +               ioctlsocket(fd, FIONBIO, (unsigned long*) &nonblocking);
65166 +       }
65167 +#else
65168 +       if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1) {
65169 +               event_warn("fcntl(O_NONBLOCK)");
65170 +               return -1;
65171 +       }
65172 +#endif
65173 +       return 0;
65174 +}
65175 +
65176 +extern int debug;
65177 +
65178 +static int make_socket_ai(int should_bind, struct addrinfo *);
65179 +static int make_socket(int should_bind, const char *, u_short);
65180 +static void name_from_addr(struct sockaddr *, socklen_t, char **, char **);
65181 +static int evhttp_associate_new_request_with_connection(
65182 +       struct evhttp_connection *evcon);
65183 +static void evhttp_connection_start_detectclose(
65184 +       struct evhttp_connection *evcon);
65185 +static void evhttp_connection_stop_detectclose(
65186 +       struct evhttp_connection *evcon);
65187 +static void evhttp_request_dispatch(struct evhttp_connection* evcon);
65188 +
65189 +void evhttp_read(int, short, void *);
65190 +void evhttp_write(int, short, void *);
65191 +
65192 +#ifndef HAVE_STRSEP
65193 +static char *
65194 +strsep(char **s, const char *del)
65195 +{
65196 +       char *d, *tok;
65197 +       if (!s || !*s)
65198 +               return NULL;
65199 +       tok = *s;
65200 +       d = strstr(tok, del);
65201 +       if (d)
65202 +               *s = d + strlen(del);
65203 +       else
65204 +               *s = NULL;
65205 +       return tok;
65206 +}
65207 +#endif
65208 +
65209 +static const char *
65210 +html_replace(char ch)
65211 +{
65212 +       static char buf[2];
65213 +       
65214 +       switch (ch) {
65215 +       case '<':
65216 +               return "&lt;";
65217 +       case '>':
65218 +               return "&gt;";
65219 +       case '"':
65220 +               return "&quot;";
65221 +       case '\'':
65222 +               return "&#039;";
65223 +       case '&':
65224 +               return "&amp;";
65225 +       default:
65226 +               break;
65227 +       }
65228 +
65229 +       /* Echo the character back */
65230 +       buf[0] = ch;
65231 +       buf[1] = '\0';
65232 +       
65233 +       return buf;
65234 +}
65235 +
65236 +/*
65237 + * Replaces <, >, ", ' and & with &lt;, &gt;, &quot;,
65238 + * &#039; and &amp; correspondingly.
65239 + *
65240 + * The returned string needs to be freed by the caller.
65241 + */
65242 +
65243 +char *
65244 +evhttp_htmlescape(const char *html)
65245 +{
65246 +       int i, new_size = 0, old_size = strlen(html);
65247 +       char *escaped_html, *p;
65248 +       
65249 +       for (i = 0; i < old_size; ++i)
65250 +               new_size += strlen(html_replace(html[i]));
65251 +
65252 +       p = escaped_html = malloc(new_size + 1);
65253 +       if (escaped_html == NULL)
65254 +               event_err(1, "%s: malloc(%d)", __func__, new_size + 1);
65255 +       for (i = 0; i < old_size; ++i) {
65256 +               const char *replaced = html_replace(html[i]);
65257 +               /* this is length checked */
65258 +               strcpy(p, replaced);
65259 +               p += strlen(replaced);
65260 +       }
65261 +
65262 +       *p = '\0';
65263 +
65264 +       return (escaped_html);
65265 +}
65266 +
65267 +const char *
65268 +evhttp_method(enum evhttp_cmd_type type)
65269 +{
65270 +       const char *method;
65271 +
65272 +       switch (type) {
65273 +       case EVHTTP_REQ_GET:
65274 +               method = "GET";
65275 +               break;
65276 +       case EVHTTP_REQ_POST:
65277 +               method = "POST";
65278 +               break;
65279 +       case EVHTTP_REQ_HEAD:
65280 +               method = "HEAD";
65281 +               break;
65282 +       default:
65283 +               method = NULL;
65284 +               break;
65285 +       }
65286 +
65287 +       return (method);
65288 +}
65289 +
65290 +static void
65291 +evhttp_add_event(struct event *ev, int timeout, int default_timeout)
65292 +{
65293 +       if (timeout != 0) {
65294 +               struct timeval tv;
65295 +               
65296 +               timerclear(&tv);
65297 +               tv.tv_sec = timeout != -1 ? timeout : default_timeout;
65298 +               event_add(ev, &tv);
65299 +       } else {
65300 +               event_add(ev, NULL);
65301 +       }
65302 +}
65303 +
65304 +void
65305 +evhttp_write_buffer(struct evhttp_connection *evcon,
65306 +    void (*cb)(struct evhttp_connection *, void *), void *arg)
65307 +{
65308 +       event_debug(("%s: preparing to write buffer\n", __func__));
65309 +
65310 +       /* Set call back */
65311 +       evcon->cb = cb;
65312 +       evcon->cb_arg = arg;
65313 +
65314 +       /* check if the event is already pending */
65315 +       if (event_pending(&evcon->ev, EV_WRITE|EV_TIMEOUT, NULL))
65316 +               event_del(&evcon->ev);
65317 +
65318 +       event_set(&evcon->ev, evcon->fd, EV_WRITE, evhttp_write, evcon);
65319 +       evhttp_add_event(&evcon->ev, evcon->timeout, HTTP_WRITE_TIMEOUT);
65320 +}
65321 +
65322 +/*
65323 + * Create the headers need for an HTTP reply
65324 + */
65325 +static void
65326 +evhttp_make_header_request(struct evhttp_connection *evcon,
65327 +    struct evhttp_request *req)
65328 +{
65329 +       static char line[1024];
65330 +       const char *method;
65331 +       
65332 +       evhttp_remove_header(req->output_headers, "Accept-Encoding");
65333 +       evhttp_remove_header(req->output_headers, "Proxy-Connection");
65334 +
65335 +       /* Generate request line */
65336 +       method = evhttp_method(req->type);
65337 +       snprintf(line, sizeof(line), "%s %s HTTP/%d.%d\r\n",
65338 +           method, req->uri, req->major, req->minor);
65339 +       evbuffer_add(evcon->output_buffer, line, strlen(line));
65340 +
65341 +       /* Add the content length on a post request if missing */
65342 +       if (req->type == EVHTTP_REQ_POST &&
65343 +           evhttp_find_header(req->output_headers, "Content-Length") == NULL){
65344 +               char size[12];
65345 +               snprintf(size, sizeof(size), "%ld",
65346 +                        (long)EVBUFFER_LENGTH(req->output_buffer));
65347 +               evhttp_add_header(req->output_headers, "Content-Length", size);
65348 +       }
65349 +}
65350 +
65351 +static int
65352 +evhttp_is_connection_close(int flags, struct evkeyvalq* headers)
65353 +{
65354 +       if (flags & EVHTTP_PROXY_REQUEST) {
65355 +               /* proxy connection */
65356 +               const char *connection = evhttp_find_header(headers, "Proxy-Connection");
65357 +               return (connection == NULL || strcasecmp(connection, "keep-alive") != 0);
65358 +       } else {
65359 +               const char *connection = evhttp_find_header(headers, "Connection");
65360 +               return (connection != NULL && strcasecmp(connection, "close") == 0);
65361 +       }
65362 +}
65363 +
65364 +static int
65365 +evhttp_is_connection_keepalive(struct evkeyvalq* headers)
65366 +{
65367 +       const char *connection = evhttp_find_header(headers, "Connection");
65368 +       return (connection != NULL 
65369 +           && strncasecmp(connection, "keep-alive", 10) == 0);
65370 +}
65371 +
65372 +/*
65373 + * Create the headers needed for an HTTP reply
65374 + */
65375 +static void
65376 +evhttp_make_header_response(struct evhttp_connection *evcon,
65377 +    struct evhttp_request *req)
65378 +{
65379 +       static char line[1024];
65380 +       snprintf(line, sizeof(line), "HTTP/%d.%d %d %s\r\n",
65381 +           req->major, req->minor, req->response_code,
65382 +           req->response_code_line);
65383 +       evbuffer_add(evcon->output_buffer, line, strlen(line));
65384 +
65385 +       /* Potentially add headers for unidentified content. */
65386 +       if (EVBUFFER_LENGTH(req->output_buffer)) {
65387 +               if (evhttp_find_header(req->output_headers,
65388 +                       "Content-Type") == NULL) {
65389 +                       evhttp_add_header(req->output_headers,
65390 +                           "Content-Type", "text/html; charset=ISO-8859-1");
65391 +               }
65392 +
65393 +               /* 
65394 +                * we need to add the content length if the user did
65395 +                * not give it, this is required for persistent
65396 +                * connections to work.
65397 +                */
65398 +               if (evhttp_find_header(req->output_headers,
65399 +                       "Transfer-Encoding") == NULL &&
65400 +                   evhttp_find_header(req->output_headers,
65401 +                       "Content-Length") == NULL) {
65402 +                       static char len[12];
65403 +                       snprintf(len, sizeof(len), "%ld",
65404 +                           (long)EVBUFFER_LENGTH(req->output_buffer));
65405 +                       evhttp_add_header(req->output_headers,
65406 +                           "Content-Length", len);
65407 +               }
65408 +       }
65409 +
65410 +       /* if the request asked for a close, we send a close, too */
65411 +       if (evhttp_is_connection_close(req->flags, req->input_headers)) {
65412 +               evhttp_remove_header(req->output_headers, "Connection");
65413 +               if (!(req->flags & EVHTTP_PROXY_REQUEST))
65414 +                   evhttp_add_header(req->output_headers, "Connection", "close");
65415 +               evhttp_remove_header(req->output_headers, "Proxy-Connection");
65416 +       }
65417 +}
65418 +
65419 +void
65420 +evhttp_make_header(struct evhttp_connection *evcon, struct evhttp_request *req)
65421 +{
65422 +       static char line[1024];
65423 +       struct evkeyval *header;
65424 +
65425 +       /*
65426 +        * Depending if this is a HTTP request or response, we might need to
65427 +        * add some new headers or remove existing headers.
65428 +        */
65429 +       if (req->kind == EVHTTP_REQUEST) {
65430 +               evhttp_make_header_request(evcon, req);
65431 +       } else {
65432 +               evhttp_make_header_response(evcon, req);
65433 +       }
65434 +
65435 +       TAILQ_FOREACH(header, req->output_headers, next) {
65436 +               snprintf(line, sizeof(line), "%s: %s\r\n",
65437 +                   header->key, header->value);
65438 +               evbuffer_add(evcon->output_buffer, line, strlen(line));
65439 +       }
65440 +       evbuffer_add(evcon->output_buffer, "\r\n", 2);
65441 +
65442 +       if (EVBUFFER_LENGTH(req->output_buffer) >= 0) {
65443 +               /*
65444 +                * For a request, we add the POST data, for a reply, this
65445 +                * is the regular data.
65446 +                */
65447 +               evbuffer_add_buffer(evcon->output_buffer, req->output_buffer);
65448 +       }
65449 +}
65450 +
65451 +/* Separated host, port and file from URI */
65452 +
65453 +int
65454 +evhttp_hostportfile(char *url, char **phost, u_short *pport, char **pfile)
65455 +{
65456 +       static char host[1024];
65457 +       static char file[1024];
65458 +       char *p, *p2;
65459 +       int len;
65460 +       u_short port;
65461 +
65462 +       len = strlen(HTTP_PREFIX);
65463 +       if (strncasecmp(url, HTTP_PREFIX, len))
65464 +               return (-1);
65465 +
65466 +       url += len;
65467 +
65468 +       /* We might overrun */
65469 +       if (strlcpy(host, url, sizeof (host)) >= sizeof(host))
65470 +               return (-1);
65471 +
65472 +       p = strchr(host, '/');
65473 +       if (p != NULL) {
65474 +               *p = '\0';
65475 +               p2 = p + 1;
65476 +       } else
65477 +               p2 = NULL;
65478 +
65479 +       if (pfile != NULL) {
65480 +               /* Generate request file */
65481 +               if (p2 == NULL)
65482 +                       p2 = "";
65483 +               snprintf(file, sizeof(file), "/%s", p2);
65484 +       }
65485 +
65486 +       p = strchr(host, ':');
65487 +       if (p != NULL) {
65488 +               *p = '\0';
65489 +               port = atoi(p + 1);
65490 +
65491 +               if (port == 0)
65492 +                       return (-1);
65493 +       } else
65494 +               port = HTTP_DEFAULTPORT;
65495 +
65496 +       if (phost != NULL)
65497 +               *phost = host;
65498 +       if (pport != NULL)
65499 +               *pport = port;
65500 +       if (pfile != NULL)
65501 +               *pfile = file;
65502 +
65503 +       return (0);
65504 +}
65505 +
65506 +static int
65507 +evhttp_connection_incoming_fail(struct evhttp_request *req,
65508 +    enum evhttp_connection_error error)
65509 +{
65510 +       switch (error) {
65511 +       case EVCON_HTTP_TIMEOUT:
65512 +       case EVCON_HTTP_EOF:
65513 +               /* 
65514 +                * these are cases in which we probably should just
65515 +                * close the connection and not send a reply.  this
65516 +                * case may happen when a browser keeps a persistent
65517 +                * connection open and we timeout on the read.
65518 +                */
65519 +               return (-1);
65520 +       case EVCON_HTTP_INVALID_HEADER:
65521 +       default:        /* xxx: probably should just error on default */
65522 +               /* the callback looks at the uri to determine errors */
65523 +               if (req->uri) {
65524 +                       free(req->uri);
65525 +                       req->uri = NULL;
65526 +               }
65527 +
65528 +               /* 
65529 +                * the callback needs to send a reply, once the reply has
65530 +                * been send, the connection should get freed.
65531 +                */
65532 +               (*req->cb)(req, req->cb_arg);
65533 +       }
65534 +       
65535 +       return (0);
65536 +}
65537 +
65538 +void
65539 +evhttp_connection_fail(struct evhttp_connection *evcon,
65540 +    enum evhttp_connection_error error)
65541 +{
65542 +       struct evhttp_request* req = TAILQ_FIRST(&evcon->requests);
65543 +       assert(req != NULL);
65544 +       
65545 +       if (evcon->flags & EVHTTP_CON_INCOMING) {
65546 +               /* 
65547 +                * for incoming requests, there are two different
65548 +                * failure cases.  it's either a network level error
65549 +                * or an http layer error. for problems on the network
65550 +                * layer like timeouts we just drop the connections.
65551 +                * For HTTP problems, we might have to send back a
65552 +                * reply before the connection can be freed.
65553 +                */
65554 +               if (evhttp_connection_incoming_fail(req, error) == -1)
65555 +                       evhttp_connection_free(evcon);
65556 +               return;
65557 +       }
65558 +
65559 +
65560 +       if (req->cb != NULL)
65561 +               (*req->cb)(NULL, req->cb_arg);
65562 +
65563 +       TAILQ_REMOVE(&evcon->requests, req, next);
65564 +       evhttp_request_free(req);
65565 +
65566 +       /* xxx: maybe we should fail all requests??? */
65567 +
65568 +       /* reset the connection */
65569 +       evhttp_connection_reset(evcon);
65570 +       
65571 +       /* We are trying the next request that was queued on us */
65572 +       if (TAILQ_FIRST(&evcon->requests) != NULL)
65573 +               evhttp_connection_connect(evcon);
65574 +}
65575 +
65576 +void
65577 +evhttp_write(int fd, short what, void *arg)
65578 +{
65579 +       struct evhttp_connection *evcon = arg;
65580 +       int n;
65581 +
65582 +       if (what == EV_TIMEOUT) {
65583 +               evhttp_connection_fail(evcon, EVCON_HTTP_TIMEOUT);
65584 +               return;
65585 +       }
65586 +
65587 +       n = evbuffer_write(evcon->output_buffer, fd);
65588 +       if (n == -1) {
65589 +               event_warn("%s: evbuffer_write", __func__);
65590 +               evhttp_connection_fail(evcon, EVCON_HTTP_EOF);
65591 +               return;
65592 +       }
65593 +
65594 +       if (n == 0) {
65595 +               event_warnx("%s: write nothing", __func__);
65596 +               evhttp_connection_fail(evcon, EVCON_HTTP_EOF);
65597 +               return;
65598 +       }
65599 +
65600 +       if (EVBUFFER_LENGTH(evcon->output_buffer) != 0) {
65601 +               evhttp_add_event(&evcon->ev, 
65602 +                   evcon->timeout, HTTP_WRITE_TIMEOUT);
65603 +               return;
65604 +       }
65605 +
65606 +       /* Activate our call back */
65607 +       if (evcon->cb != NULL)
65608 +               (*evcon->cb)(evcon, evcon->cb_arg);
65609 +}
65610 +
65611 +void
65612 +evhttp_connection_done(struct evhttp_connection *evcon)
65613 +{
65614 +       struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
65615 +       int con_outgoing = evcon->flags & EVHTTP_CON_OUTGOING;
65616 +    
65617 +       /*
65618 +        * if this is an incoming connection, we need to leave the request
65619 +        * on the connection, so that we can reply to it.
65620 +        */
65621 +       if (con_outgoing) {
65622 +               int need_close;
65623 +               TAILQ_REMOVE(&evcon->requests, req, next);
65624 +               req->evcon = NULL;
65625 +
65626 +               need_close = 
65627 +                   evhttp_is_connection_close(req->flags, req->input_headers) ||
65628 +                   evhttp_is_connection_close(req->flags, req->output_headers);
65629 +
65630 +               /* check if we got asked to close the connection */
65631 +               if (need_close)
65632 +                       evhttp_connection_reset(evcon);
65633 +
65634 +               if (TAILQ_FIRST(&evcon->requests) != NULL) {
65635 +                       /*
65636 +                        * We have more requests; reset the connection
65637 +                        * and deal with the next request.  xxx: no
65638 +                        * persistent connection right now
65639 +                        */
65640 +                       if (evcon->state != EVCON_CONNECTED)
65641 +                               evhttp_connection_connect(evcon);
65642 +                       else
65643 +                               evhttp_request_dispatch(evcon);
65644 +               } else if (!need_close) {
65645 +                       /*
65646 +                        * The connection is going to be persistent, but we
65647 +                        * need to detect if the other side closes it.
65648 +                        */
65649 +                       evhttp_connection_start_detectclose(evcon);
65650 +               }
65651 +       }
65652 +
65653 +       /* notify the user of the request */
65654 +       (*req->cb)(req, req->cb_arg);
65655 +
65656 +       /* if this was an outgoing request, we own and it's done. so free it */
65657 +       if (con_outgoing) {
65658 +               evhttp_request_free(req);
65659 +       }
65660 +}
65661 +
65662 +/*
65663 + * Handles reading from a chunked request.
65664 + * return 1: all data has been read
65665 + * return 0: more data is expected
65666 + * return -1: data is corrupted
65667 + */
65668 +
65669 +static int
65670 +evhttp_handle_chunked_read(struct evhttp_request *req, struct evbuffer *buf)
65671 +{
65672 +       int len;
65673 +
65674 +       while ((len = EVBUFFER_LENGTH(buf)) > 0) {
65675 +               if (req->ntoread < 0) {
65676 +                       /* Read chunk size */
65677 +                       char *p = evbuffer_readline(buf);
65678 +                       char *endp;
65679 +                       int error;
65680 +                       if (p == NULL)
65681 +                               break;
65682 +                       /* the last chunk is on a new line? */
65683 +                       if (strlen(p) == 0)
65684 +                               continue;
65685 +                       req->ntoread = strtol(p, &endp, 16);
65686 +                       error = *p == '\0' || (*endp != '\0' && *endp != ' ');
65687 +                       free(p);
65688 +                       if (error) {
65689 +                               /* could not get chunk size */
65690 +                               return (-1);
65691 +                       }
65692 +                       if (req->ntoread == 0) {
65693 +                               /* Last chunk */
65694 +                               return (1);
65695 +                       }
65696 +                       continue;
65697 +               }
65698 +
65699 +               /* don't have enough to complete a chunk; wait for more */
65700 +               if (len < req->ntoread)
65701 +                       return (0);
65702 +
65703 +               /* Completed chunk */
65704 +               evbuffer_add(req->input_buffer,
65705 +                   EVBUFFER_DATA(buf), req->ntoread);
65706 +               evbuffer_drain(buf, req->ntoread);
65707 +               req->ntoread = -1;
65708 +               if (req->chunk_cb != NULL) {
65709 +                       (*req->chunk_cb)(req, req->cb_arg);
65710 +                       evbuffer_drain(req->input_buffer,
65711 +                           EVBUFFER_LENGTH(req->input_buffer));
65712 +               }
65713 +       }
65714 +
65715 +       return (0);
65716 +}
65717 +
65718 +void
65719 +evhttp_read_body(struct evhttp_connection *evcon, struct evhttp_request *req)
65720 +{
65721 +       struct evbuffer *buf = evcon->input_buffer;
65722 +       
65723 +       if (req->chunked) {
65724 +               int res = evhttp_handle_chunked_read(req, buf);
65725 +               if (res == 1) {
65726 +                       /* finished last chunk */
65727 +                       evhttp_connection_done(evcon);
65728 +                       return;
65729 +               } else if (res == -1) {
65730 +                       /* corrupted data */
65731 +                       evhttp_connection_fail(evcon,
65732 +                           EVCON_HTTP_INVALID_HEADER);
65733 +                       return;
65734 +               }
65735 +       } else if (req->ntoread < 0) {
65736 +               /* Read until connection close. */
65737 +               evbuffer_add_buffer(req->input_buffer, buf);
65738 +       } else if (EVBUFFER_LENGTH(buf) >= req->ntoread) {
65739 +               /* Completed content length */
65740 +               evbuffer_add(req->input_buffer, EVBUFFER_DATA(buf),
65741 +                   req->ntoread);
65742 +               evbuffer_drain(buf, req->ntoread);
65743 +               req->ntoread = 0;
65744 +               evhttp_connection_done(evcon);
65745 +               return;
65746 +       }
65747 +       /* Read more! */
65748 +       event_set(&evcon->ev, evcon->fd, EV_READ, evhttp_read, evcon);
65749 +       evhttp_add_event(&evcon->ev, evcon->timeout, HTTP_READ_TIMEOUT);
65750 +}
65751 +
65752 +/*
65753 + * Reads data into a buffer structure until no more data
65754 + * can be read on the file descriptor or we have read all
65755 + * the data that we wanted to read.
65756 + * Execute callback when done.
65757 + */
65758 +
65759 +void
65760 +evhttp_read(int fd, short what, void *arg)
65761 +{
65762 +       struct evhttp_connection *evcon = arg;
65763 +       struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
65764 +       struct evbuffer *buf = evcon->input_buffer;
65765 +       int n, len;
65766 +
65767 +       if (what == EV_TIMEOUT) {
65768 +               evhttp_connection_fail(evcon, EVCON_HTTP_TIMEOUT);
65769 +               return;
65770 +       }
65771 +       n = evbuffer_read(buf, fd, -1);
65772 +       len = EVBUFFER_LENGTH(buf);
65773 +       event_debug(("%s: got %d on %d\n", __func__, n, fd));
65774 +       
65775 +       if (n == -1) {
65776 +               event_warn("%s: evbuffer_read", __func__);
65777 +               evhttp_connection_fail(evcon, EVCON_HTTP_EOF);
65778 +               return;
65779 +       } else if (n == 0) {
65780 +               /* Connection closed */
65781 +               evhttp_connection_done(evcon);
65782 +               return;
65783 +       }
65784 +       evhttp_read_body(evcon, req);
65785 +}
65786 +
65787 +void
65788 +evhttp_write_connectioncb(struct evhttp_connection *evcon, void *arg)
65789 +{
65790 +       /* This is after writing the request to the server */
65791 +       struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
65792 +       assert(req != NULL);
65793 +
65794 +       /* We are done writing our header and are now expecting the response */
65795 +       req->kind = EVHTTP_RESPONSE;
65796 +
65797 +       evhttp_start_read(evcon);
65798 +}
65799 +
65800 +/*
65801 + * Clean up a connection object
65802 + */
65803 +
65804 +void
65805 +evhttp_connection_free(struct evhttp_connection *evcon)
65806 +{
65807 +       struct evhttp_request *req;
65808 +
65809 +       /* notify interested parties that this connection is going down */
65810 +       if (evcon->fd != -1) {
65811 +               if (evcon->state == EVCON_CONNECTED && evcon->closecb != NULL)
65812 +                       (*evcon->closecb)(evcon, evcon->closecb_arg);
65813 +       }
65814 +
65815 +       /* remove all requests that might be queued on this connection */
65816 +       while ((req = TAILQ_FIRST(&evcon->requests)) != NULL) {
65817 +               TAILQ_REMOVE(&evcon->requests, req, next);
65818 +               evhttp_request_free(req);
65819 +       }
65820 +
65821 +       if (evcon->http_server != NULL) {
65822 +               struct evhttp *http = evcon->http_server;
65823 +               TAILQ_REMOVE(&http->connections, evcon, next);
65824 +       }
65825 +
65826 +       if (event_initialized(&evcon->close_ev))
65827 +               event_del(&evcon->close_ev);
65828 +
65829 +       if (event_initialized(&evcon->ev))
65830 +               event_del(&evcon->ev);
65831 +       
65832 +       if (evcon->fd != -1)
65833 +               close(evcon->fd);
65834 +
65835 +       if (evcon->address != NULL)
65836 +               free(evcon->address);
65837 +
65838 +       if (evcon->input_buffer != NULL)
65839 +               evbuffer_free(evcon->input_buffer);
65840 +
65841 +       if (evcon->output_buffer != NULL)
65842 +               evbuffer_free(evcon->output_buffer);
65843 +
65844 +       free(evcon);
65845 +}
65846 +
65847 +static void
65848 +evhttp_request_dispatch(struct evhttp_connection* evcon)
65849 +{
65850 +       struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
65851 +       
65852 +       /* this should not usually happy but it's possible */
65853 +       if (req == NULL)
65854 +               return;
65855 +
65856 +       /* delete possible close detection events */
65857 +       evhttp_connection_stop_detectclose(evcon);
65858 +       
65859 +       /* we assume that the connection is connected already */
65860 +       assert(evcon->state == EVCON_CONNECTED);
65861 +
65862 +       /* Create the header from the store arguments */
65863 +       evhttp_make_header(evcon, req);
65864 +
65865 +       evhttp_write_buffer(evcon, evhttp_write_connectioncb, NULL);
65866 +}
65867 +
65868 +/* Reset our connection state */
65869 +void
65870 +evhttp_connection_reset(struct evhttp_connection *evcon)
65871 +{
65872 +       if (event_initialized(&evcon->ev))
65873 +               event_del(&evcon->ev);
65874 +
65875 +       if (evcon->fd != -1) {
65876 +               /* inform interested parties about connection close */
65877 +               if (evcon->state == EVCON_CONNECTED && evcon->closecb != NULL)
65878 +                       (*evcon->closecb)(evcon, evcon->closecb_arg);
65879 +
65880 +               close(evcon->fd);
65881 +               evcon->fd = -1;
65882 +       }
65883 +       evcon->state = EVCON_DISCONNECTED;
65884 +
65885 +       /* remove unneeded flags */
65886 +       evcon->flags &= ~EVHTTP_CON_CLOSEDETECT;
65887 +}
65888 +
65889 +static void
65890 +evhttp_detect_close_cb(int fd, short what, void *arg)
65891 +{
65892 +       struct evhttp_connection *evcon = arg;
65893 +       evhttp_connection_reset(evcon);
65894 +}
65895 +
65896 +static void
65897 +evhttp_connection_start_detectclose(struct evhttp_connection *evcon)
65898 +{
65899 +       evcon->flags |= EVHTTP_CON_CLOSEDETECT;
65900 +
65901 +       if (event_initialized(&evcon->close_ev))
65902 +               event_del(&evcon->close_ev);
65903 +       event_set(&evcon->close_ev, evcon->fd, EV_READ,
65904 +           evhttp_detect_close_cb, evcon);
65905 +       event_add(&evcon->close_ev, NULL);
65906 +}
65907 +
65908 +static void
65909 +evhttp_connection_stop_detectclose(struct evhttp_connection *evcon)
65910 +{
65911 +       evcon->flags &= ~EVHTTP_CON_CLOSEDETECT;
65912 +       event_del(&evcon->close_ev);
65913 +}
65914 +
65915 +static void
65916 +evhttp_connection_retry(int fd, short what, void *arg)
65917 +{
65918 +       struct evhttp_connection *evcon = arg;
65919 +
65920 +       evcon->state = EVCON_DISCONNECTED;
65921 +       evhttp_connection_connect(evcon);
65922 +}
65923 +
65924 +/*
65925 + * Call back for asynchronous connection attempt.
65926 + */
65927 +
65928 +static void
65929 +evhttp_connectioncb(int fd, short what, void *arg)
65930 +{
65931 +       struct evhttp_connection *evcon = arg;
65932 +       int error;
65933 +       socklen_t errsz = sizeof(error);
65934 +               
65935 +       if (what == EV_TIMEOUT) {
65936 +               event_warnx("%s: connection timeout for \"%s:%d\" on %d",
65937 +                   __func__, evcon->address, evcon->port, evcon->fd);
65938 +               goto cleanup;
65939 +       }
65940 +
65941 +       /* Check if the connection completed */
65942 +       if (getsockopt(evcon->fd, SOL_SOCKET, SO_ERROR, (void*)&error,
65943 +                      &errsz) == -1) {
65944 +               event_warn("%s: getsockopt for \"%s:%d\" on %d",
65945 +                   __func__, evcon->address, evcon->port, evcon->fd);
65946 +               goto cleanup;
65947 +       }
65948 +
65949 +       if (error) {
65950 +               event_warnx("%s: connect failed for \"%s:%d\" on %d: %s",
65951 +                   __func__, evcon->address, evcon->port, evcon->fd,
65952 +                   strerror(error));
65953 +               goto cleanup;
65954 +       }
65955 +
65956 +       /* We are connected to the server now */
65957 +       event_debug(("%s: connected to \"%s:%d\" on %d\n",
65958 +                       __func__, evcon->address, evcon->port, evcon->fd));
65959 +
65960 +       /* Reset the retry count as we were successful in connecting */
65961 +       evcon->retry_cnt = 0;
65962 +       evcon->state = EVCON_CONNECTED;
65963 +
65964 +       /* try to start requests that have queued up on this connection */
65965 +       evhttp_request_dispatch(evcon);
65966 +       return;
65967 +
65968 + cleanup:
65969 +       if (evcon->retry_max < 0 || evcon->retry_cnt < evcon->retry_max) {
65970 +               evtimer_set(&evcon->ev, evhttp_connection_retry, evcon);
65971 +               evhttp_add_event(&evcon->ev, MIN(3600, 2 << evcon->retry_cnt),
65972 +                   HTTP_CONNECT_TIMEOUT);
65973 +               evcon->retry_cnt++;
65974 +               return;
65975 +       }
65976 +       evhttp_connection_reset(evcon);
65977 +
65978 +       /* for now, we just signal all requests by executing their callbacks */
65979 +       while (TAILQ_FIRST(&evcon->requests) != NULL) {
65980 +               struct evhttp_request *request = TAILQ_FIRST(&evcon->requests);
65981 +               TAILQ_REMOVE(&evcon->requests, request, next);
65982 +               request->evcon = NULL;
65983 +
65984 +               /* we might want to set an error here */
65985 +               request->cb(request, request->cb_arg);
65986 +       }
65987 +}
65988 +
65989 +/*
65990 + * Check if we got a valid response code.
65991 + */
65992 +
65993 +int
65994 +evhttp_valid_response_code(int code)
65995 +{
65996 +       if (code == 0)
65997 +               return (0);
65998 +
65999 +       return (1);
66000 +}
66001 +
66002 +/* Parses the status line of a web server */
66003 +
66004 +int
66005 +evhttp_parse_response_line(struct evhttp_request *req, char *line)
66006 +{
66007 +       char *protocol;
66008 +       char *number;
66009 +       char *readable;
66010 +
66011 +       protocol = strsep(&line, " ");
66012 +       if (line == NULL)
66013 +               return (-1);
66014 +       number = strsep(&line, " ");
66015 +       if (line == NULL)
66016 +               return (-1);
66017 +       readable = line;
66018 +
66019 +       if (strcmp(protocol, "HTTP/1.0") == 0) {
66020 +               req->major = 1;
66021 +               req->minor = 0;
66022 +       } else if (strcmp(protocol, "HTTP/1.1") == 0) {
66023 +               req->major = 1;
66024 +               req->minor = 1;
66025 +       } else {
66026 +               event_warnx("%s: bad protocol \"%s\"",
66027 +                   __func__, protocol);
66028 +               return (-1);
66029 +       }
66030 +
66031 +       req->response_code = atoi(number);
66032 +       if (!evhttp_valid_response_code(req->response_code)) {
66033 +               event_warnx("%s: bad response code \"%s\"",
66034 +                   __func__, number);
66035 +               return (-1);
66036 +       }
66037 +
66038 +       if ((req->response_code_line = strdup(readable)) == NULL)
66039 +               event_err(1, "%s: strdup", __func__);
66040 +
66041 +       return (0);
66042 +}
66043 +
66044 +/* Parse the first line of a HTTP request */
66045 +
66046 +int
66047 +evhttp_parse_request_line(struct evhttp_request *req, char *line)
66048 +{
66049 +       char *method;
66050 +       char *uri;
66051 +       char *version;
66052 +
66053 +       /* Parse the request line */
66054 +       method = strsep(&line, " ");
66055 +       if (line == NULL)
66056 +               return (-1);
66057 +       uri = strsep(&line, " ");
66058 +       if (line == NULL)
66059 +               return (-1);
66060 +       version = strsep(&line, " ");
66061 +       if (line != NULL)
66062 +               return (-1);
66063 +
66064 +       /* First line */
66065 +       if (strcmp(method, "GET") == 0) {
66066 +               req->type = EVHTTP_REQ_GET;
66067 +       } else if (strcmp(method, "POST") == 0) {
66068 +               req->type = EVHTTP_REQ_POST;
66069 +       } else if (strcmp(method, "HEAD") == 0) {
66070 +               req->type = EVHTTP_REQ_HEAD;
66071 +       } else {
66072 +               event_warnx("%s: bad method %s on request %p from %s",
66073 +                   __func__, method, req, req->remote_host);
66074 +               return (-1);
66075 +       }
66076 +
66077 +       if (strcmp(version, "HTTP/1.0") == 0) {
66078 +               req->major = 1;
66079 +               req->minor = 0;
66080 +       } else if (strcmp(version, "HTTP/1.1") == 0) {
66081 +               req->major = 1;
66082 +               req->minor = 1;
66083 +       } else {
66084 +               event_warnx("%s: bad version %s on request %p from %s",
66085 +                   __func__, version, req, req->remote_host);
66086 +               return (-1);
66087 +       }
66088 +
66089 +       if ((req->uri = strdup(uri)) == NULL) {
66090 +               event_warn("%s: evhttp_decode_uri", __func__);
66091 +               return (-1);
66092 +       }
66093 +
66094 +       /* determine if it's a proxy request */
66095 +       if (strlen(req->uri) > 0 && req->uri[0] != '/')
66096 +               req->flags |= EVHTTP_PROXY_REQUEST;
66097 +
66098 +       return (0);
66099 +}
66100 +
66101 +const char *
66102 +evhttp_find_header(const struct evkeyvalq *headers, const char *key)
66103 +{
66104 +       struct evkeyval *header;
66105 +
66106 +       TAILQ_FOREACH(header, headers, next) {
66107 +               if (strcasecmp(header->key, key) == 0)
66108 +                       return (header->value);
66109 +       }
66110 +
66111 +       return (NULL);
66112 +}
66113 +
66114 +void
66115 +evhttp_clear_headers(struct evkeyvalq *headers)
66116 +{
66117 +       struct evkeyval *header;
66118 +
66119 +       for (header = TAILQ_FIRST(headers);
66120 +           header != NULL;
66121 +           header = TAILQ_FIRST(headers)) {
66122 +               TAILQ_REMOVE(headers, header, next);
66123 +               free(header->key);
66124 +               free(header->value);
66125 +               free(header);
66126 +       }
66127 +}
66128 +
66129 +/*
66130 + * Returns 0,  if the header was successfully removed.
66131 + * Returns -1, if the header could not be found.
66132 + */
66133 +
66134 +int
66135 +evhttp_remove_header(struct evkeyvalq *headers, const char *key)
66136 +{
66137 +       struct evkeyval *header;
66138 +
66139 +       TAILQ_FOREACH(header, headers, next) {
66140 +               if (strcasecmp(header->key, key) == 0)
66141 +                       break;
66142 +       }
66143 +
66144 +       if (header == NULL)
66145 +               return (-1);
66146 +
66147 +       /* Free and remove the header that we found */
66148 +       TAILQ_REMOVE(headers, header, next);
66149 +       free(header->key);
66150 +       free(header->value);
66151 +       free(header);
66152 +
66153 +       return (0);
66154 +}
66155 +
66156 +int
66157 +evhttp_add_header(struct evkeyvalq *headers, const char *key, const char *value)
66158 +{
66159 +       struct evkeyval *header;
66160 +
66161 +       header = calloc(1, sizeof(struct evkeyval));
66162 +       if (header == NULL) {
66163 +               event_warn("%s: calloc", __func__);
66164 +               return (-1);
66165 +       }
66166 +       if ((header->key = strdup(key)) == NULL) {
66167 +               free(header);
66168 +               event_warn("%s: strdup", __func__);
66169 +               return (-1);
66170 +       }
66171 +       if ((header->value = strdup(value)) == NULL) {
66172 +               free(header->key);
66173 +               free(header);
66174 +               event_warn("%s: strdup", __func__);
66175 +               return (-1);
66176 +       }
66177 +
66178 +       TAILQ_INSERT_TAIL(headers, header, next);
66179 +
66180 +       return (0);
66181 +}
66182 +
66183 +/*
66184 + * Parses header lines from a request or a response into the specified
66185 + * request object given an event buffer.
66186 + *
66187 + * Returns
66188 + *   -1  on error
66189 + *    0  when we need to read more headers
66190 + *    1  when all headers have been read.
66191 + */
66192 +
66193 +int
66194 +evhttp_parse_lines(struct evhttp_request *req, struct evbuffer* buffer)
66195 +{
66196 +       u_char *endp;
66197 +       int done = 0;
66198 +
66199 +       struct evkeyvalq* headers = req->input_headers;
66200 +       while ((endp = evbuffer_find(buffer, (u_char *)"\r\n", 2)) != NULL) {
66201 +               char *skey, *svalue;
66202 +
66203 +               if (strncmp((char *)EVBUFFER_DATA(buffer), "\r\n", 2) == 0) {
66204 +                       evbuffer_drain(buffer, 2);
66205 +                       /* Last header - Done */
66206 +                       done = 1;
66207 +                       break;
66208 +               }
66209 +
66210 +               *endp = '\0';
66211 +               endp += 2;
66212 +
66213 +               /* Processing of header lines */
66214 +               if (req->got_firstline == 0) {
66215 +                       switch (req->kind) {
66216 +                       case EVHTTP_REQUEST:
66217 +                               if (evhttp_parse_request_line(req,
66218 +                                       (char *)EVBUFFER_DATA(buffer)) == -1)
66219 +                                       return (-1);
66220 +                               break;
66221 +                       case EVHTTP_RESPONSE:
66222 +                               if (evhttp_parse_response_line(req,
66223 +                                       (char *)EVBUFFER_DATA(buffer)) == -1)
66224 +                                       return (-1);
66225 +                               break;
66226 +                       default:
66227 +                               return (-1);
66228 +                       }
66229 +                       req->got_firstline = 1;
66230 +               } else {
66231 +                       /* Regular header */
66232 +                       svalue = (char *)EVBUFFER_DATA(buffer);
66233 +                       skey = strsep(&svalue, ":");
66234 +                       if (svalue == NULL)
66235 +                               return (-1);
66236 +
66237 +                       svalue += strspn(svalue, " ");
66238 +
66239 +                       if (evhttp_add_header(headers, skey, svalue) == -1)
66240 +                               return (-1);
66241 +               }
66242 +
66243 +               /* Move the uncompleted headers forward */
66244 +               evbuffer_drain(buffer, endp - EVBUFFER_DATA(buffer));
66245 +       }
66246 +
66247 +       return (done);
66248 +}
66249 +
66250 +static int
66251 +evhttp_get_body_length(struct evhttp_request *req)
66252 +{
66253 +       struct evkeyvalq *headers = req->input_headers;
66254 +       const char *content_length;
66255 +       const char *connection;
66256 +
66257 +       content_length = evhttp_find_header(headers, "Content-Length");
66258 +       connection = evhttp_find_header(headers, "Connection");
66259 +               
66260 +       if (content_length == NULL && connection == NULL)
66261 +               req->ntoread = -1;
66262 +       else if (content_length == NULL &&
66263 +           strcasecmp(connection, "Close") != 0) {
66264 +               /* Bad combination, we don't know when it will end */
66265 +               event_warnx("%s: we got no content length, but the "
66266 +                   "server wants to keep the connection open: %s.",
66267 +                   __func__, connection);
66268 +               return (-1);
66269 +       } else if (content_length == NULL) {
66270 +               req->ntoread = -1;
66271 +       } else {
66272 +               char *endp;
66273 +               req->ntoread = strtol(content_length, &endp, 10);
66274 +               if (*content_length == '\0' || *endp != '\0') {
66275 +                       event_warnx("%s: illegal content length: %s",
66276 +                           __func__, content_length);
66277 +                       return (-1);
66278 +               }
66279 +       }
66280 +               
66281 +       event_debug(("%s: bytes to read: %d (in buffer %d)\n",
66282 +               __func__, req->ntoread,
66283 +               EVBUFFER_LENGTH(evcon->input_buffer)));
66284 +
66285 +       return (0);
66286 +}
66287 +
66288 +static void
66289 +evhttp_get_body(struct evhttp_connection *evcon, struct evhttp_request *req)
66290 +{
66291 +       const char *xfer_enc;
66292 +       
66293 +       /* If this is a request without a body, then we are done */
66294 +       if (req->kind == EVHTTP_REQUEST && req->type != EVHTTP_REQ_POST) {
66295 +               evhttp_connection_done(evcon);
66296 +               return;
66297 +       }
66298 +       xfer_enc = evhttp_find_header(req->input_headers, "Transfer-Encoding");
66299 +       if (xfer_enc != NULL && strcasecmp(xfer_enc, "chunked") == 0) {
66300 +               req->chunked = 1;
66301 +               req->ntoread = -1;
66302 +       } else {
66303 +               if (evhttp_get_body_length(req) == -1) {
66304 +                       evhttp_connection_fail(evcon,
66305 +                           EVCON_HTTP_INVALID_HEADER);
66306 +                       return;
66307 +               }
66308 +       }
66309 +       evhttp_read_body(evcon, req);
66310 +}
66311 +
66312 +void
66313 +evhttp_read_header(int fd, short what, void *arg)
66314 +{
66315 +       struct evhttp_connection *evcon = arg;
66316 +       struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
66317 +       int n, res;
66318 +
66319 +       if (what == EV_TIMEOUT) {
66320 +               event_debug(("%s: timeout on %d\n", __func__, fd));
66321 +               evhttp_connection_fail(evcon, EVCON_HTTP_TIMEOUT);
66322 +               return;
66323 +       }
66324 +
66325 +       n = evbuffer_read(evcon->input_buffer, fd, -1);
66326 +       if (n == 0) {
66327 +               event_warnx("%s: no more data on %d", __func__, fd);
66328 +               evhttp_connection_fail(evcon, EVCON_HTTP_EOF);
66329 +               return;
66330 +       }
66331 +       if (n == -1) {
66332 +               event_warnx("%s: bad read on %d", __func__, fd);
66333 +               evhttp_connection_fail(evcon, EVCON_HTTP_EOF);
66334 +               return;
66335 +       }
66336 +
66337 +       res = evhttp_parse_lines(req, evcon->input_buffer);
66338 +       if (res == -1) {
66339 +               /* Error while reading, terminate */
66340 +               event_debug(("%s: bad header lines on %d\n", __func__, fd));
66341 +               evhttp_connection_fail(evcon, EVCON_HTTP_INVALID_HEADER);
66342 +               return;
66343 +       } else if (res == 0) {
66344 +               /* Need more header lines */
66345 +               evhttp_add_event(&evcon->ev, 
66346 +                   evcon->timeout, HTTP_READ_TIMEOUT);
66347 +               return;
66348 +       }
66349 +
66350 +       /* Done reading headers, do the real work */
66351 +       switch (req->kind) {
66352 +       case EVHTTP_REQUEST:
66353 +               event_debug(("%s: checking for post data on %d\n",
66354 +                               __func__, fd));
66355 +               evhttp_get_body(evcon, req);
66356 +               break;
66357 +
66358 +       case EVHTTP_RESPONSE:
66359 +               if (req->response_code == HTTP_NOCONTENT ||
66360 +                   req->response_code == HTTP_NOTMODIFIED ||
66361 +                   (req->response_code >= 100 && req->response_code < 200)) {
66362 +                       event_debug(("%s: skipping body for code %d\n",
66363 +                                       __func__, req->response_code));
66364 +                       evhttp_connection_done(evcon);
66365 +               } else {
66366 +                       event_debug(("%s: start of read body for %s on %d\n",
66367 +                               __func__, req->remote_host, fd));
66368 +                       evhttp_get_body(evcon, req);
66369 +               }
66370 +               break;
66371 +
66372 +       default:
66373 +               event_warnx("%s: bad header on %d", __func__, fd);
66374 +               evhttp_connection_fail(evcon, EVCON_HTTP_INVALID_HEADER);
66375 +               break;
66376 +       }
66377 +}
66378 +
66379 +/*
66380 + * Creates a TCP connection to the specified port and executes a callback
66381 + * when finished.  Failure or sucess is indicate by the passed connection
66382 + * object.
66383 + *
66384 + * Although this interface accepts a hostname, it is intended to take
66385 + * only numeric hostnames so that non-blocking DNS resolution can
66386 + * happen elsewhere.
66387 + */
66388 +
66389 +struct evhttp_connection *
66390 +evhttp_connection_new(const char *address, unsigned short port)
66391 +{
66392 +       struct evhttp_connection *evcon = NULL;
66393 +       
66394 +       event_debug(("Attempting connection to %s:%d\n", address, port));
66395 +
66396 +       if ((evcon = calloc(1, sizeof(struct evhttp_connection))) == NULL) {
66397 +               event_warn("%s: calloc failed", __func__);
66398 +               goto error;
66399 +       }
66400 +
66401 +       evcon->fd = -1;
66402 +       evcon->port = port;
66403 +
66404 +       evcon->timeout = -1;
66405 +       evcon->retry_cnt = evcon->retry_max = 0;
66406 +
66407 +       if ((evcon->address = strdup(address)) == NULL) {
66408 +               event_warn("%s: strdup failed", __func__);
66409 +               goto error;
66410 +       }
66411 +
66412 +       if ((evcon->input_buffer = evbuffer_new()) == NULL) {
66413 +               event_warn("%s: evbuffer_new failed", __func__);
66414 +               goto error;
66415 +       }
66416 +
66417 +       if ((evcon->output_buffer = evbuffer_new()) == NULL) {
66418 +               event_warn("%s: evbuffer_new failed", __func__);
66419 +               goto error;
66420 +       }
66421 +       
66422 +       evcon->state = EVCON_DISCONNECTED;
66423 +       TAILQ_INIT(&evcon->requests);
66424 +
66425 +       return (evcon);
66426 +       
66427 + error:
66428 +       if (evcon != NULL)
66429 +               evhttp_connection_free(evcon);
66430 +       return (NULL);
66431 +}
66432 +
66433 +void
66434 +evhttp_connection_set_timeout(struct evhttp_connection *evcon,
66435 +    int timeout_in_secs)
66436 +{
66437 +       evcon->timeout = timeout_in_secs;
66438 +}
66439 +
66440 +void
66441 +evhttp_connection_set_retries(struct evhttp_connection *evcon,
66442 +    int retry_max)
66443 +{
66444 +       evcon->retry_max = retry_max;
66445 +}
66446 +
66447 +void
66448 +evhttp_connection_set_closecb(struct evhttp_connection *evcon,
66449 +    void (*cb)(struct evhttp_connection *, void *), void *cbarg)
66450 +{
66451 +       evcon->closecb = cb;
66452 +       evcon->closecb_arg = cbarg;
66453 +}
66454 +
66455 +void
66456 +evhttp_connection_get_peer(struct evhttp_connection *evcon,
66457 +    char **address, u_short *port)
66458 +{
66459 +       *address = evcon->address;
66460 +       *port = evcon->port;
66461 +}
66462 +
66463 +int
66464 +evhttp_connection_connect(struct evhttp_connection *evcon)
66465 +{
66466 +       if (evcon->state == EVCON_CONNECTING)
66467 +               return (0);
66468 +       
66469 +       evhttp_connection_reset(evcon);
66470 +
66471 +       assert(!(evcon->flags & EVHTTP_CON_INCOMING));
66472 +       evcon->flags |= EVHTTP_CON_OUTGOING;
66473 +       
66474 +       /* Do async connection to HTTP server */
66475 +       if ((evcon->fd = make_socket(
66476 +                    0, evcon->address, evcon->port)) == -1) {
66477 +               event_warn("%s: failed to connect to \"%s:%d\"",
66478 +                   __func__, evcon->address, evcon->port);
66479 +               return (-1);
66480 +       }
66481 +
66482 +       /* Set up a callback for successful connection setup */
66483 +       event_set(&evcon->ev, evcon->fd, EV_WRITE, evhttp_connectioncb, evcon);
66484 +       evhttp_add_event(&evcon->ev, evcon->timeout, HTTP_CONNECT_TIMEOUT);
66485 +
66486 +       evcon->state = EVCON_CONNECTING;
66487 +       
66488 +       return (0);
66489 +}
66490 +
66491 +/*
66492 + * Starts an HTTP request on the provided evhttp_connection object.
66493 + * If the connection object is not connected to the web server already,
66494 + * this will start the connection.
66495 + */
66496 +
66497 +int
66498 +evhttp_make_request(struct evhttp_connection *evcon,
66499 +    struct evhttp_request *req,
66500 +    enum evhttp_cmd_type type, const char *uri)
66501 +{
66502 +       /* We are making a request */
66503 +       req->kind = EVHTTP_REQUEST;
66504 +       req->type = type;
66505 +       if (req->uri != NULL)
66506 +               free(req->uri);
66507 +       if ((req->uri = strdup(uri)) == NULL)
66508 +               event_err(1, "%s: strdup", __func__);
66509 +
66510 +       /* Set the protocol version if it is not supplied */
66511 +       if (!req->major && !req->minor) {
66512 +               req->major = 1;
66513 +               req->minor = 1;
66514 +       }
66515 +       
66516 +       assert(req->evcon == NULL);
66517 +       req->evcon = evcon;
66518 +       assert(!(req->flags & EVHTTP_REQ_OWN_CONNECTION));
66519 +       
66520 +       TAILQ_INSERT_TAIL(&evcon->requests, req, next);
66521 +
66522 +       /* If the connection object is not connected; make it so */
66523 +       if (evcon->state != EVCON_CONNECTED)
66524 +               return (evhttp_connection_connect(evcon));
66525 +
66526 +       /*
66527 +        * If it's connected already and we are the first in the queue,
66528 +        * then we can dispatch this request immediately.  Otherwise, it
66529 +        * will be dispatched once the pending requests are completed.
66530 +        */
66531 +       if (TAILQ_FIRST(&evcon->requests) == req)
66532 +               evhttp_request_dispatch(evcon);
66533 +
66534 +       return (0);
66535 +}
66536 +
66537 +/*
66538 + * Reads data from file descriptor into request structure
66539 + * Request structure needs to be set up correctly.
66540 + */
66541 +
66542 +void
66543 +evhttp_start_read(struct evhttp_connection *evcon)
66544 +{
66545 +       /* Set up an event to read the headers */
66546 +       if (event_initialized(&evcon->ev))
66547 +               event_del(&evcon->ev);
66548 +       event_set(&evcon->ev, evcon->fd, EV_READ, evhttp_read_header, evcon);
66549 +       
66550 +       evhttp_add_event(&evcon->ev, evcon->timeout, HTTP_READ_TIMEOUT);
66551 +}
66552 +
66553 +void
66554 +evhttp_send_done(struct evhttp_connection *evcon, void *arg)
66555 +{
66556 +       int need_close;
66557 +       struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
66558 +       TAILQ_REMOVE(&evcon->requests, req, next);
66559 +
66560 +       /* delete possible close detection events */
66561 +       evhttp_connection_stop_detectclose(evcon);
66562 +       
66563 +       need_close =
66564 +           (req->minor == 0 &&
66565 +               !evhttp_is_connection_keepalive(req->input_headers))||
66566 +           evhttp_is_connection_close(req->flags, req->input_headers) ||
66567 +           evhttp_is_connection_close(req->flags, req->output_headers);
66568 +
66569 +       assert(req->flags & EVHTTP_REQ_OWN_CONNECTION);
66570 +       evhttp_request_free(req);
66571 +
66572 +       if (need_close) {
66573 +               evhttp_connection_free(evcon);
66574 +               return;
66575 +       } 
66576 +
66577 +       /* we have a persistent connection; try to accept another request. */
66578 +       if (evhttp_associate_new_request_with_connection(evcon) == -1)
66579 +               evhttp_connection_free(evcon);
66580 +}
66581 +
66582 +/*
66583 + * Returns an error page.
66584 + */
66585 +
66586 +void
66587 +evhttp_send_error(struct evhttp_request *req, int error, const char *reason)
66588 +{
66589 +       char *fmt = "<HTML><HEAD>\n"
66590 +           "<TITLE>%d %s</TITLE>\n"
66591 +           "</HEAD><BODY>\n"
66592 +           "<H1>Method Not Implemented</H1>\n"
66593 +           "Invalid method in request<P>\n"
66594 +           "</BODY></HTML>\n";
66595 +
66596 +       struct evbuffer *buf = evbuffer_new();
66597 +
66598 +       /* close the connection on error */
66599 +       evhttp_add_header(req->output_headers, "Connection", "close");
66600 +
66601 +       evhttp_response_code(req, error, reason);
66602 +
66603 +       evbuffer_add_printf(buf, fmt, error, reason);
66604 +
66605 +       evhttp_send_page(req, buf);
66606 +
66607 +       evbuffer_free(buf);
66608 +}
66609 +
66610 +/* Requires that headers and response code are already set up */
66611 +
66612 +static inline void
66613 +evhttp_send(struct evhttp_request *req, struct evbuffer *databuf)
66614 +{
66615 +       struct evhttp_connection *evcon = req->evcon;
66616 +
66617 +       assert(TAILQ_FIRST(&evcon->requests) == req);
66618 +
66619 +       /* xxx: not sure if we really should expose the data buffer this way */
66620 +       if (databuf != NULL)
66621 +               evbuffer_add_buffer(req->output_buffer, databuf);
66622 +       
66623 +       /* Adds headers to the response */
66624 +       evhttp_make_header(evcon, req);
66625 +
66626 +       evhttp_write_buffer(evcon, evhttp_send_done, NULL);
66627 +}
66628 +
66629 +void
66630 +evhttp_send_reply(struct evhttp_request *req, int code, const char *reason,
66631 +    struct evbuffer *databuf)
66632 +{
66633 +       /* set up to watch for client close */
66634 +       evhttp_connection_start_detectclose(req->evcon);
66635 +       evhttp_response_code(req, code, reason);
66636 +       
66637 +       evhttp_send(req, databuf);
66638 +}
66639 +
66640 +void
66641 +evhttp_send_reply_start(struct evhttp_request *req, int code,
66642 +    const char *reason)
66643 +{
66644 +       /* set up to watch for client close */
66645 +       evhttp_connection_start_detectclose(req->evcon);
66646 +       evhttp_response_code(req, code, reason);
66647 +       if (req->major == 1 && req->minor == 1) {
66648 +               /* use chunked encoding for HTTP/1.1 */
66649 +               evhttp_add_header(req->output_headers, "Transfer-Encoding",
66650 +                   "chunked");
66651 +               req->chunked = 1;
66652 +       }
66653 +       evhttp_make_header(req->evcon, req);
66654 +       evhttp_write_buffer(req->evcon, NULL, NULL);
66655 +}
66656 +
66657 +void
66658 +evhttp_send_reply_chunk(struct evhttp_request *req, struct evbuffer *databuf)
66659 +{
66660 +       if (req->chunked) {
66661 +               evbuffer_add_printf(req->evcon->output_buffer, "%x\r\n",
66662 +                   EVBUFFER_LENGTH(databuf));
66663 +       }
66664 +       evbuffer_add_buffer(req->evcon->output_buffer, databuf);
66665 +       evhttp_write_buffer(req->evcon, NULL, NULL);
66666 +}
66667 +
66668 +void
66669 +evhttp_send_reply_end(struct evhttp_request *req)
66670 +{
66671 +       struct evhttp_connection *evcon = req->evcon;
66672 +
66673 +       if (req->chunked) {
66674 +               evbuffer_add(req->evcon->output_buffer, "0\r\n\r\n", 5);
66675 +               evhttp_write_buffer(req->evcon, evhttp_send_done, NULL);
66676 +               req->chunked = 0;
66677 +       } else if (!event_pending(&evcon->ev, EV_WRITE|EV_TIMEOUT, NULL)) {
66678 +               /* let the connection know that we are done with the request */
66679 +               evhttp_send_done(evcon, NULL);
66680 +       } else {
66681 +               /* make the callback execute after all data has been written */
66682 +               evcon->cb = evhttp_send_done;
66683 +               evcon->cb_arg = NULL;
66684 +       }
66685 +}
66686 +
66687 +void
66688 +evhttp_response_code(struct evhttp_request *req, int code, const char *reason)
66689 +{
66690 +       req->kind = EVHTTP_RESPONSE;
66691 +       req->response_code = code;
66692 +       if (req->response_code_line != NULL)
66693 +               free(req->response_code_line);
66694 +       req->response_code_line = strdup(reason);
66695 +}
66696 +
66697 +void
66698 +evhttp_send_page(struct evhttp_request *req, struct evbuffer *databuf)
66699 +{
66700 +       if (!req->major || !req->minor) {
66701 +               req->major = 1;
66702 +               req->minor = 1;
66703 +       }
66704 +       
66705 +       if (req->kind != EVHTTP_RESPONSE)
66706 +               evhttp_response_code(req, 200, "OK");
66707 +
66708 +       evhttp_clear_headers(req->output_headers);
66709 +       evhttp_add_header(req->output_headers, "Content-Type", "text/html");
66710 +       evhttp_add_header(req->output_headers, "Connection", "close");
66711 +
66712 +       evhttp_send(req, databuf);
66713 +}
66714 +
66715 +static const char uri_chars[256] = {
66716 +       0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,
66717 +       0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,
66718 +       0, 1, 0, 0, 1, 0, 0, 1,   1, 1, 1, 1, 1, 1, 1, 1,
66719 +       1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 0, 0, 1, 0, 0,
66720 +       /* 64 */
66721 +       1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,
66722 +       1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 0, 0, 0, 0, 1,
66723 +       0, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,
66724 +       1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 0, 0, 0, 1, 0,
66725 +       /* 128 */
66726 +       0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,
66727 +       0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,
66728 +       0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,
66729 +       0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,
66730 +       /* 192 */
66731 +       0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,
66732 +       0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,
66733 +       0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,
66734 +       0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,
66735 +};
66736 +
66737 +/*
66738 + * Helper functions to encode/decode a URI.
66739 + * The returned string must be freed by the caller.
66740 + */
66741 +char *
66742 +evhttp_encode_uri(const char *uri)
66743 +{
66744 +       struct evbuffer *buf = evbuffer_new();
66745 +       char *p;
66746 +
66747 +       for (p = (char *)uri; *p != '\0'; p++) {
66748 +               if (uri_chars[(u_char)(*p)]) {
66749 +                       evbuffer_add(buf, p, 1);
66750 +               } else {
66751 +                       evbuffer_add_printf(buf, "%%%02X", (u_char)(*p));
66752 +               }
66753 +       }
66754 +       evbuffer_add(buf, "", 1);
66755 +       p = strdup((char *)EVBUFFER_DATA(buf));
66756 +       evbuffer_free(buf);
66757 +       
66758 +       return (p);
66759 +}
66760 +
66761 +char *
66762 +evhttp_decode_uri(const char *uri)
66763 +{
66764 +       char c, *ret;
66765 +       int i, j, in_query = 0;
66766 +       
66767 +       ret = malloc(strlen(uri) + 1);
66768 +       if (ret == NULL)
66769 +               event_err(1, "%s: malloc(%d)", __func__, strlen(uri) + 1);
66770 +
66771 +       for (i = j = 0; uri[i] != '\0'; i++) {
66772 +               c = uri[i];
66773 +               if (c == '?') {
66774 +                       in_query = 1;
66775 +               } else if (c == '+' && in_query) {
66776 +                       c = ' ';
66777 +               } else if (c == '%' && isxdigit(uri[i+1]) &&
66778 +                   isxdigit(uri[i+2])) {
66779 +                       char tmp[] = { uri[i+1], uri[i+2], '\0' };
66780 +                       c = (char)strtol(tmp, NULL, 16);
66781 +                       i += 2;
66782 +               }
66783 +               ret[j++] = c;
66784 +       }
66785 +       ret[j] = '\0';
66786 +       
66787 +       return (ret);
66788 +}
66789 +
66790 +/* 
66791 + * Helper function to parse out arguments in a query.
66792 + * The arguments are separated by key and value.
66793 + * URI should already be decoded.
66794 + */
66795 +
66796 +void
66797 +evhttp_parse_query(const char *uri, struct evkeyvalq *headers)
66798 +{
66799 +       char *line;
66800 +       char *argument;
66801 +       char *p;
66802 +
66803 +       TAILQ_INIT(headers);
66804 +
66805 +       /* No arguments - we are done */
66806 +       if (strchr(uri, '?') == NULL)
66807 +               return;
66808 +
66809 +       if ((line = strdup(uri)) == NULL)
66810 +               event_err(1, "%s: strdup", __func__);
66811 +
66812 +
66813 +       argument = line;
66814 +
66815 +       /* We already know that there has to be a ? */
66816 +       strsep(&argument, "?");
66817 +
66818 +       p = argument;
66819 +       while (p != NULL && *p != '\0') {
66820 +               char *key, *value;
66821 +               argument = strsep(&p, "&");
66822 +
66823 +               value = argument;
66824 +               key = strsep(&value, "=");
66825 +               if (value == NULL)
66826 +                       goto error;
66827 +
66828 +               value = evhttp_decode_uri(value);
66829 +               event_debug(("Query Param: %s -> %s\n", key, value));
66830 +               evhttp_add_header(headers, key, value);
66831 +               free(value);
66832 +       }
66833 +
66834 + error:
66835 +       free(line);
66836 +}
66837 +
66838 +static struct evhttp_cb *
66839 +evhttp_dispatch_callback(struct httpcbq *callbacks, struct evhttp_request *req)
66840 +{
66841 +       struct evhttp_cb *cb;
66842 +
66843 +       /* Test for different URLs */
66844 +       char *p = strchr(req->uri, '?');
66845 +       TAILQ_FOREACH(cb, callbacks, next) {
66846 +               int res;
66847 +               if (p == NULL)
66848 +                       res = strcmp(cb->what, req->uri) == 0;
66849 +               else
66850 +                       res = strncmp(cb->what, req->uri,
66851 +                           (size_t)(p - req->uri)) == 0;
66852 +               if (res)
66853 +                       return (cb);
66854 +       }
66855 +
66856 +       return (NULL);
66857 +}
66858 +
66859 +void
66860 +evhttp_handle_request(struct evhttp_request *req, void *arg)
66861 +{
66862 +       struct evhttp *http = arg;
66863 +       struct evhttp_cb *cb = NULL;
66864 +
66865 +       if (req->uri == NULL) {
66866 +               evhttp_send_error(req, HTTP_BADREQUEST, "Bad Request");
66867 +               return;
66868 +       }
66869 +
66870 +       if ((cb = evhttp_dispatch_callback(&http->callbacks, req)) != NULL) {
66871 +               (*cb->cb)(req, cb->cbarg);
66872 +               return;
66873 +       }
66874 +
66875 +       /* Generic call back */
66876 +       if (http->gencb) {
66877 +               (*http->gencb)(req, http->gencbarg);
66878 +               return;
66879 +       } else {
66880 +               /* We need to send a 404 here */
66881 +               char *fmt = "<html><head>"
66882 +                   "<title>404 Not Found</title>"
66883 +                   "</head><body>"
66884 +                   "<h1>Not Found</h1>"
66885 +                   "<p>The requested URL %s was not found on this server.</p>"
66886 +                   "</body></html>\n";
66887 +
66888 +               char *escaped_html = evhttp_htmlescape(req->uri);
66889 +               struct evbuffer *buf = evbuffer_new();
66890 +
66891 +               evhttp_response_code(req, HTTP_NOTFOUND, "Not Found");
66892 +
66893 +               evbuffer_add_printf(buf, fmt, escaped_html);
66894 +
66895 +               free(escaped_html);
66896 +               
66897 +               evhttp_send_page(req, buf);
66898 +
66899 +               evbuffer_free(buf);
66900 +       }
66901 +}
66902 +
66903 +static void
66904 +accept_socket(int fd, short what, void *arg)
66905 +{
66906 +       struct evhttp *http = arg;
66907 +       struct sockaddr_storage ss;
66908 +       socklen_t addrlen = sizeof(ss);
66909 +       int nfd;
66910 +
66911 +       if ((nfd = accept(fd, (struct sockaddr *)&ss, &addrlen)) == -1) {
66912 +               event_warn("%s: bad accept", __func__);
66913 +               return;
66914 +       }
66915 +        if (event_make_socket_nonblocking(nfd) < 0)
66916 +                return;
66917 +
66918 +       evhttp_get_request(http, nfd, (struct sockaddr *)&ss, addrlen);
66919 +}
66920 +
66921 +static int
66922 +bind_socket(struct evhttp *http, const char *address, u_short port)
66923 +{
66924 +       struct event *ev = &http->bind_ev;
66925 +       int fd;
66926 +
66927 +       if ((fd = make_socket(1, address, port)) == -1)
66928 +               return (-1);
66929 +
66930 +       if (listen(fd, 10) == -1) {
66931 +               event_warn("%s: listen", __func__);
66932 +               return (-1);
66933 +       }
66934 +
66935 +       /* Schedule the socket for accepting */
66936 +       event_set(ev, fd, EV_READ | EV_PERSIST, accept_socket, http);
66937 +       event_add(ev, NULL);
66938 +
66939 +       event_debug(("Bound to port %d - Awaiting connections ... ", port));
66940 +
66941 +       return (0);
66942 +}
66943 +
66944 +/*
66945 + * Start a web server on the specified address and port.
66946 + */
66947 +
66948 +struct evhttp *
66949 +evhttp_start(const char *address, u_short port)
66950 +{
66951 +       struct evhttp *http;
66952 +
66953 +       if ((http = calloc(1, sizeof(struct evhttp))) == NULL) {
66954 +               event_warn("%s: calloc", __func__);
66955 +               return (NULL);
66956 +       }
66957 +
66958 +       http->timeout = -1;
66959 +
66960 +       TAILQ_INIT(&http->callbacks);
66961 +       TAILQ_INIT(&http->connections);
66962 +
66963 +       if (bind_socket(http, address, port) == -1) {
66964 +               free(http);
66965 +               return (NULL);
66966 +       }
66967 +
66968 +       return (http);
66969 +}
66970 +
66971 +void
66972 +evhttp_free(struct evhttp* http)
66973 +{
66974 +       struct evhttp_cb *http_cb;
66975 +       struct evhttp_connection *evcon;
66976 +       int fd = http->bind_ev.ev_fd;
66977 +
66978 +       /* Remove the accepting part */
66979 +       event_del(&http->bind_ev);
66980 +       close(fd);
66981 +
66982 +       while ((evcon = TAILQ_FIRST(&http->connections)) != NULL) {
66983 +               /* evhttp_connection_free removes the connection */
66984 +               evhttp_connection_free(evcon);
66985 +       }
66986 +
66987 +       while ((http_cb = TAILQ_FIRST(&http->callbacks)) != NULL) {
66988 +               TAILQ_REMOVE(&http->callbacks, http_cb, next);
66989 +               free(http_cb->what);
66990 +               free(http_cb);
66991 +       }
66992 +       
66993 +       free(http);
66994 +}
66995 +
66996 +void
66997 +evhttp_set_timeout(struct evhttp* http, int timeout_in_secs)
66998 +{
66999 +       http->timeout = timeout_in_secs;
67000 +}
67001 +
67002 +void
67003 +evhttp_set_cb(struct evhttp *http, const char *uri,
67004 +    void (*cb)(struct evhttp_request *, void *), void *cbarg)
67005 +{
67006 +       struct evhttp_cb *http_cb;
67007 +
67008 +       if ((http_cb = calloc(1, sizeof(struct evhttp_cb))) == NULL)
67009 +               event_err(1, "%s: calloc", __func__);
67010 +
67011 +       http_cb->what = strdup(uri);
67012 +       http_cb->cb = cb;
67013 +       http_cb->cbarg = cbarg;
67014 +
67015 +       TAILQ_INSERT_TAIL(&http->callbacks, http_cb, next);
67016 +}
67017 +
67018 +int
67019 +evhttp_del_cb(struct evhttp *http, const char *uri)
67020 +{
67021 +       struct evhttp_cb *http_cb;
67022 +
67023 +       TAILQ_FOREACH(http_cb, &http->callbacks, next) {
67024 +               if (strcmp(http_cb->what, uri) == 0)
67025 +                       break;
67026 +       }
67027 +       if (http_cb == NULL)
67028 +               return (-1);
67029 +
67030 +       TAILQ_REMOVE(&http->callbacks, http_cb, next);
67031 +       free(http_cb->what);
67032 +       free(http_cb);
67033 +
67034 +       return (0);
67035 +}
67036 +
67037 +void
67038 +evhttp_set_gencb(struct evhttp *http,
67039 +    void (*cb)(struct evhttp_request *, void *), void *cbarg)
67040 +{
67041 +       http->gencb = cb;
67042 +       http->gencbarg = cbarg;
67043 +}
67044 +
67045 +/*
67046 + * Request related functions
67047 + */
67048 +
67049 +struct evhttp_request *
67050 +evhttp_request_new(void (*cb)(struct evhttp_request *, void *), void *arg)
67051 +{
67052 +       struct evhttp_request *req = NULL;
67053 +
67054 +       /* Allocate request structure */
67055 +       if ((req = calloc(1, sizeof(struct evhttp_request))) == NULL) {
67056 +               event_warn("%s: calloc", __func__);
67057 +               goto error;
67058 +       }
67059 +
67060 +       req->kind = EVHTTP_RESPONSE;
67061 +       req->input_headers = calloc(1, sizeof(struct evkeyvalq));
67062 +       if (req->input_headers == NULL) {
67063 +               event_warn("%s: calloc", __func__);
67064 +               goto error;
67065 +       }
67066 +       TAILQ_INIT(req->input_headers);
67067 +
67068 +       req->output_headers = calloc(1, sizeof(struct evkeyvalq));
67069 +       if (req->output_headers == NULL) {
67070 +               event_warn("%s: calloc", __func__);
67071 +               goto error;
67072 +       }
67073 +       TAILQ_INIT(req->output_headers);
67074 +
67075 +       if ((req->input_buffer = evbuffer_new()) == NULL) {
67076 +               event_warn("%s: evbuffer_new", __func__);
67077 +               goto error;
67078 +       }
67079 +
67080 +       if ((req->output_buffer = evbuffer_new()) == NULL) {
67081 +               event_warn("%s: evbuffer_new", __func__);
67082 +               goto error;
67083 +       }
67084 +
67085 +       req->cb = cb;
67086 +       req->cb_arg = arg;
67087 +
67088 +       return (req);
67089 +
67090 + error:
67091 +       if (req != NULL)
67092 +               evhttp_request_free(req);
67093 +       return (NULL);
67094 +}
67095 +
67096 +void
67097 +evhttp_request_free(struct evhttp_request *req)
67098 +{
67099 +       if (req->remote_host != NULL)
67100 +               free(req->remote_host);
67101 +       if (req->uri != NULL)
67102 +               free(req->uri);
67103 +       if (req->response_code_line != NULL)
67104 +               free(req->response_code_line);
67105 +
67106 +       evhttp_clear_headers(req->input_headers);
67107 +       free(req->input_headers);
67108 +
67109 +       evhttp_clear_headers(req->output_headers);
67110 +       free(req->output_headers);
67111 +
67112 +       if (req->input_buffer != NULL)
67113 +               evbuffer_free(req->input_buffer);
67114 +
67115 +       if (req->output_buffer != NULL)
67116 +               evbuffer_free(req->output_buffer);
67117 +
67118 +       free(req);
67119 +}
67120 +
67121 +void
67122 +evhttp_request_set_chunked_cb(struct evhttp_request *req,
67123 +    void (*cb)(struct evhttp_request *, void *))
67124 +{
67125 +       req->chunk_cb = cb;
67126 +}
67127 +
67128 +/*
67129 + * Allows for inspection of the request URI
67130 + */
67131 +
67132 +const char *
67133 +evhttp_request_uri(struct evhttp_request *req) {
67134 +       if (req->uri == NULL)
67135 +               event_debug(("%s: request %p has no uri\n", req));
67136 +       return (req->uri);
67137 +}
67138 +
67139 +/*
67140 + * Takes a file descriptor to read a request from.
67141 + * The callback is executed once the whole request has been read.
67142 + */
67143 +
67144 +static struct evhttp_connection*
67145 +evhttp_get_request_connection(
67146 +       int fd, struct sockaddr *sa, socklen_t salen)
67147 +{
67148 +       struct evhttp_connection *evcon;
67149 +       char *hostname, *portname;
67150 +
67151 +       name_from_addr(sa, salen, &hostname, &portname);
67152 +       event_debug(("%s: new request from %s:%s on %d\n",
67153 +                       __func__, hostname, portname, fd));
67154 +
67155 +       /* we need a connection object to put the http request on */
67156 +       if ((evcon = evhttp_connection_new(hostname, atoi(portname))) == NULL)
67157 +               return (NULL);
67158 +       evcon->flags |= EVHTTP_CON_INCOMING;
67159 +       evcon->state = EVCON_CONNECTED;
67160 +       
67161 +       evcon->fd = fd;
67162 +
67163 +       return (evcon);
67164 +}
67165 +
67166 +static int
67167 +evhttp_associate_new_request_with_connection(struct evhttp_connection *evcon)
67168 +{
67169 +       struct evhttp *http = evcon->http_server;
67170 +       struct evhttp_request *req;
67171 +       if ((req = evhttp_request_new(evhttp_handle_request, http)) == NULL)
67172 +               return (-1);
67173 +
67174 +       req->evcon = evcon;     /* the request ends up owning the connection */
67175 +       req->flags |= EVHTTP_REQ_OWN_CONNECTION;
67176 +       
67177 +       TAILQ_INSERT_TAIL(&evcon->requests, req, next);
67178 +       
67179 +       req->kind = EVHTTP_REQUEST;
67180 +       
67181 +       if ((req->remote_host = strdup(evcon->address)) == NULL)
67182 +               event_err(1, "%s: strdup", __func__);
67183 +       req->remote_port = evcon->port;
67184 +
67185 +       evhttp_start_read(evcon);
67186 +       
67187 +       return (0);
67188 +}
67189 +
67190 +void
67191 +evhttp_get_request(struct evhttp *http, int fd,
67192 +    struct sockaddr *sa, socklen_t salen)
67193 +{
67194 +       struct evhttp_connection *evcon;
67195 +
67196 +       evcon = evhttp_get_request_connection(fd, sa, salen);
67197 +       if (evcon == NULL)
67198 +               return;
67199 +
67200 +       /* the timeout can be used by the server to close idle connections */
67201 +       if (http->timeout != -1)
67202 +               evhttp_connection_set_timeout(evcon, http->timeout);
67203 +
67204 +       /* 
67205 +        * if we want to accept more than one request on a connection,
67206 +        * we need to know which http server it belongs to.
67207 +        */
67208 +       evcon->http_server = http;
67209 +       TAILQ_INSERT_TAIL(&http->connections, evcon, next);
67210 +       
67211 +       if (evhttp_associate_new_request_with_connection(evcon) == -1)
67212 +               evhttp_connection_free(evcon);
67213 +}
67214 +
67215 +
67216 +/*
67217 + * Network helper functions that we do not want to export to the rest of
67218 + * the world.
67219 + */
67220 +
67221 +static struct addrinfo *
67222 +addr_from_name(char *address)
67223 +{
67224 +#ifdef HAVE_GETADDRINFO
67225 +        struct addrinfo ai, *aitop;
67226 +        int ai_result;
67227 +
67228 +        memset(&ai, 0, sizeof (ai));
67229 +        ai.ai_family = AF_INET;
67230 +        ai.ai_socktype = SOCK_RAW;
67231 +        ai.ai_flags = 0;
67232 +        if ((ai_result = getaddrinfo(address, NULL, &ai, &aitop)) != 0) {
67233 +                if ( ai_result == EAI_SYSTEM )
67234 +                        event_warn("getaddrinfo");
67235 +                else
67236 +                        event_warnx("getaddrinfo: %s", gai_strerror(ai_result));
67237 +        }
67238 +
67239 +       return (aitop);
67240 +#else
67241 +       assert(0);
67242 +       return NULL; // XXXXX Use gethostbyname, if this function is ever used.
67243 +#endif
67244 +}
67245 +
67246 +static void
67247 +name_from_addr(struct sockaddr *sa, socklen_t salen,
67248 +    char **phost, char **pport)
67249 +{
67250 +#ifdef HAVE_GETNAMEINFO
67251 +       static char ntop[NI_MAXHOST];
67252 +       static char strport[NI_MAXSERV];
67253 +       int ni_result;
67254 +
67255 +       if ((ni_result = getnameinfo(sa, salen,
67256 +               ntop, sizeof(ntop), strport, sizeof(strport),
67257 +               NI_NUMERICHOST|NI_NUMERICSERV)) != 0) {
67258 +               if (ni_result == EAI_SYSTEM)
67259 +                       event_err(1, "getnameinfo failed");
67260 +               else
67261 +                       event_errx(1, "getnameinfo failed: %s", gai_strerror(ni_result));
67262 +       }
67263
67264 +       *phost = ntop;
67265 +       *pport = strport;
67266 +#else
67267 +       // XXXX
67268 +#endif
67269 +}
67270 +
67271 +/* Either connect or bind */
67272 +
67273 +static int
67274 +make_socket_ai(int should_bind, struct addrinfo *ai)
67275 +{
67276 +        struct linger linger;
67277 +        int fd, on = 1, r;
67278 +       int serrno;
67279 +
67280 +        /* Create listen socket */
67281 +        fd = socket(AF_INET, SOCK_STREAM, 0);
67282 +        if (fd == -1) {
67283 +                event_warn("socket");
67284 +                return (-1);
67285 +        }
67286 +
67287 +        if (event_make_socket_nonblocking(fd) < 0)
67288 +                goto out;
67289 +
67290 +#ifndef WIN32
67291 +        if (fcntl(fd, F_SETFD, 1) == -1) {
67292 +                event_warn("fcntl(F_SETFD)");
67293 +                goto out;
67294 +        }
67295 +#endif
67296 +
67297 +        setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&on, sizeof(on));
67298 +        setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on));
67299 +        linger.l_onoff = 1;
67300 +        linger.l_linger = 5;
67301 +        setsockopt(fd, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof(linger));
67302 +
67303 +       if (should_bind)
67304 +               r = bind(fd, ai->ai_addr, ai->ai_addrlen);
67305 +       else
67306 +               r = connect(fd, ai->ai_addr, ai->ai_addrlen);
67307 +       if (r == -1) {
67308 +#ifdef WIN32
67309 +               int tmp_error = WSAGetLastError();
67310 +               if (tmp_error != WSAEWOULDBLOCK && tmp_error != WSAEINVAL &&
67311 +                   tmp_error != WSAEINPROGRESS) {
67312 +                       goto out;
67313 +               }
67314 +#else
67315 +               if (errno != EINPROGRESS) {
67316 +                       goto out;
67317 +               }
67318 +#endif
67319 +       }
67320 +
67321 +       return (fd);
67322 +
67323 + out:
67324 +       serrno = errno;
67325 +       close(fd);
67326 +       errno = serrno;
67327 +       return (-1);
67328 +}
67329 +
67330 +static int
67331 +make_socket(int should_bind, const char *address, u_short port)
67332 +{
67333 +       int fd;
67334 +        struct addrinfo ai, *aitop = NULL;
67335 +#ifdef HAVE_GETADDRINFO
67336 +        char strport[NI_MAXSERV];
67337 +        int ai_result;
67338 +
67339 +        memset(&ai, 0, sizeof (ai));
67340 +        ai.ai_family = AF_INET;
67341 +        ai.ai_socktype = SOCK_STREAM;
67342 +        ai.ai_flags = should_bind ? AI_PASSIVE : 0;
67343 +        snprintf(strport, sizeof (strport), "%d", port);
67344 +        if ((ai_result = getaddrinfo(address, strport, &ai, &aitop)) != 0) {
67345 +                if ( ai_result == EAI_SYSTEM )
67346 +                        event_warn("getaddrinfo");
67347 +                else
67348 +                        event_warnx("getaddrinfo: %s", gai_strerror(ai_result));
67349 +               return (-1);
67350 +        }
67351 +#else
67352 +       if (fake_getaddrinfo(address, &ai) < 0) {
67353 +               event_warn("fake_getaddrinfo");
67354 +               return (-1);
67355 +       }
67356 +       aitop = &ai;
67357 +#endif
67358 +
67359 +       fd = make_socket_ai(should_bind, aitop);
67360 +
67361 +#ifdef HAVE_GETADDRINFO
67362 +       freeaddrinfo(aitop);
67363 +#else
67364 +       fake_freeaddrinfo(aitop);
67365 +#endif
67366 +
67367 +       return (fd);
67368 +}
67369 diff -Nru php-5.2.4.vanilla/libevent/http-internal.h php-5.2.4.fpm/libevent/http-internal.h
67370 --- php-5.2.4.vanilla/libevent/http-internal.h  1970-01-01 03:00:00.000000000 +0300
67371 +++ php-5.2.4.fpm/libevent/http-internal.h      2007-08-31 15:47:19.000000000 +0400
67372 @@ -0,0 +1,125 @@
67373 +/*
67374 + * Copyright 2001 Niels Provos <provos@citi.umich.edu>
67375 + * All rights reserved.
67376 + *
67377 + * This header file contains definitions for dealing with HTTP requests
67378 + * that are internal to libevent.  As user of the library, you should not
67379 + * need to know about these.
67380 + */
67381 +
67382 +#ifndef _HTTP_H_
67383 +#define _HTTP_H_
67384 +
67385 +#define HTTP_CONNECT_TIMEOUT   45
67386 +#define HTTP_WRITE_TIMEOUT     50
67387 +#define HTTP_READ_TIMEOUT      50
67388 +
67389 +#define HTTP_PREFIX            "http://"
67390 +#define HTTP_DEFAULTPORT       80
67391 +
67392 +enum evhttp_connection_error {
67393 +       EVCON_HTTP_TIMEOUT,
67394 +       EVCON_HTTP_EOF,
67395 +       EVCON_HTTP_INVALID_HEADER
67396 +};
67397 +
67398 +struct evbuffer;
67399 +struct addrinfo;
67400 +struct evhttp_request;
67401 +
67402 +/* A stupid connection object - maybe make this a bufferevent later */
67403 +
67404 +enum evhttp_connection_state {
67405 +       EVCON_DISCONNECTED,     /* not currently connected not trying either */
67406 +       EVCON_CONNECTING,       /* tries to currently connect */
67407 +       EVCON_CONNECTED         /* connection is established */
67408 +};
67409 +
67410 +struct evhttp_connection {
67411 +       /* we use tailq only if they were created for an http server */
67412 +       TAILQ_ENTRY(evhttp_connection) next;
67413 +
67414 +       int fd;
67415 +       struct event ev;
67416 +       struct event close_ev;
67417 +       struct evbuffer *input_buffer;
67418 +       struct evbuffer *output_buffer;
67419 +       
67420 +       char *address;
67421 +       u_short port;
67422 +
67423 +       int flags;
67424 +#define EVHTTP_CON_INCOMING    0x0001  /* only one request on it ever */
67425 +#define EVHTTP_CON_OUTGOING    0x0002  /* multiple requests possible */
67426 +#define EVHTTP_CON_CLOSEDETECT  0x0004  /* detecting if persistent close */
67427 +
67428 +       int timeout;                    /* timeout in seconds for events */
67429 +       int retry_cnt;                  /* retry count */
67430 +       int retry_max;                  /* maximum number of retries */
67431 +       
67432 +       enum evhttp_connection_state state;
67433 +
67434 +       /* for server connections, the http server they are connected with */
67435 +       struct evhttp *http_server;
67436 +
67437 +       TAILQ_HEAD(evcon_requestq, evhttp_request) requests;
67438 +       
67439 +       void (*cb)(struct evhttp_connection *, void *);
67440 +       void *cb_arg;
67441 +       
67442 +       void (*closecb)(struct evhttp_connection *, void *);
67443 +       void *closecb_arg;
67444 +};
67445 +
67446 +struct evhttp_cb {
67447 +       TAILQ_ENTRY(evhttp_cb) next;
67448 +
67449 +       char *what;
67450 +
67451 +       void (*cb)(struct evhttp_request *req, void *);
67452 +       void *cbarg;
67453 +};
67454 +
67455 +/* both the http server as well as the rpc system need to queue connections */
67456 +TAILQ_HEAD(evconq, evhttp_connection);
67457 +
67458 +struct evhttp {
67459 +       struct event bind_ev;
67460 +
67461 +       TAILQ_HEAD(httpcbq, evhttp_cb) callbacks;
67462 +        struct evconq connections;
67463 +
67464 +        int timeout;
67465 +
67466 +       void (*gencb)(struct evhttp_request *req, void *);
67467 +       void *gencbarg;
67468 +};
67469 +
67470 +/* resets the connection; can be reused for more requests */
67471 +void evhttp_connection_reset(struct evhttp_connection *);
67472 +
67473 +/* connects if necessary */
67474 +int evhttp_connection_connect(struct evhttp_connection *);
67475 +
67476 +/* notifies the current request that it failed; resets connection */
67477 +void evhttp_connection_fail(struct evhttp_connection *,
67478 +    enum evhttp_connection_error error);
67479 +
67480 +void evhttp_get_request(struct evhttp *, int, struct sockaddr *, socklen_t);
67481 +
67482 +int evhttp_hostportfile(char *, char **, u_short *, char **);
67483 +
67484 +int evhttp_parse_lines(struct evhttp_request *, struct evbuffer*);
67485 +
67486 +void evhttp_start_read(struct evhttp_connection *);
67487 +void evhttp_read_header(int, short, void *);
67488 +void evhttp_make_header(struct evhttp_connection *, struct evhttp_request *);
67489 +
67490 +void evhttp_write_buffer(struct evhttp_connection *,
67491 +    void (*)(struct evhttp_connection *, void *), void *);
67492 +
67493 +/* response sending HTML the data in the buffer */
67494 +void evhttp_response_code(struct evhttp_request *, int, const char *);
67495 +void evhttp_send_page(struct evhttp_request *, struct evbuffer *);
67496 +
67497 +#endif /* _HTTP_H */
67498 diff -Nru php-5.2.4.vanilla/libevent/install-sh php-5.2.4.fpm/libevent/install-sh
67499 --- php-5.2.4.vanilla/libevent/install-sh       1970-01-01 03:00:00.000000000 +0300
67500 +++ php-5.2.4.fpm/libevent/install-sh   2007-08-31 15:47:19.000000000 +0400
67501 @@ -0,0 +1,238 @@
67502 +#! /bin/sh
67503 +#
67504 +# install - install a program, script, or datafile
67505 +# This comes from X11R5.
67506 +#
67507 +# Calling this script install-sh is preferred over install.sh, to prevent
67508 +# `make' implicit rules from creating a file called install from it
67509 +# when there is no Makefile.
67510 +#
67511 +# This script is compatible with the BSD install script, but was written
67512 +# from scratch.
67513 +#
67514 +
67515 +
67516 +# set DOITPROG to echo to test this script
67517 +
67518 +# Don't use :- since 4.3BSD and earlier shells don't like it.
67519 +doit="${DOITPROG-}"
67520 +
67521 +
67522 +# put in absolute paths if you don't have them in your path; or use env. vars.
67523 +
67524 +mvprog="${MVPROG-mv}"
67525 +cpprog="${CPPROG-cp}"
67526 +chmodprog="${CHMODPROG-chmod}"
67527 +chownprog="${CHOWNPROG-chown}"
67528 +chgrpprog="${CHGRPPROG-chgrp}"
67529 +stripprog="${STRIPPROG-strip}"
67530 +rmprog="${RMPROG-rm}"
67531 +mkdirprog="${MKDIRPROG-mkdir}"
67532 +
67533 +tranformbasename=""
67534 +transform_arg=""
67535 +instcmd="$mvprog"
67536 +chmodcmd="$chmodprog 0755"
67537 +chowncmd=""
67538 +chgrpcmd=""
67539 +stripcmd=""
67540 +rmcmd="$rmprog -f"
67541 +mvcmd="$mvprog"
67542 +src=""
67543 +dst=""
67544 +dir_arg=""
67545 +
67546 +while [ x"$1" != x ]; do
67547 +    case $1 in
67548 +       -c) instcmd="$cpprog"
67549 +           shift
67550 +           continue;;
67551 +
67552 +       -d) dir_arg=true
67553 +           shift
67554 +           continue;;
67555 +
67556 +       -m) chmodcmd="$chmodprog $2"
67557 +           shift
67558 +           shift
67559 +           continue;;
67560 +
67561 +       -o) chowncmd="$chownprog $2"
67562 +           shift
67563 +           shift
67564 +           continue;;
67565 +
67566 +       -g) chgrpcmd="$chgrpprog $2"
67567 +           shift
67568 +           shift
67569 +           continue;;
67570 +
67571 +       -s) stripcmd="$stripprog"
67572 +           shift
67573 +           continue;;
67574 +
67575 +       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
67576 +           shift
67577 +           continue;;
67578 +
67579 +       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
67580 +           shift
67581 +           continue;;
67582 +
67583 +       *)  if [ x"$src" = x ]
67584 +           then
67585 +               src=$1
67586 +           else
67587 +               # this colon is to work around a 386BSD /bin/sh bug
67588 +               :
67589 +               dst=$1
67590 +           fi
67591 +           shift
67592 +           continue;;
67593 +    esac
67594 +done
67595 +
67596 +if [ x"$src" = x ]
67597 +then
67598 +       echo "install:  no input file specified"
67599 +       exit 1
67600 +else
67601 +       true
67602 +fi
67603 +
67604 +if [ x"$dir_arg" != x ]; then
67605 +       dst=$src
67606 +       src=""
67607 +       
67608 +       if [ -d $dst ]; then
67609 +               instcmd=:
67610 +       else
67611 +               instcmd=mkdir
67612 +       fi
67613 +else
67614 +
67615 +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
67616 +# might cause directories to be created, which would be especially bad 
67617 +# if $src (and thus $dsttmp) contains '*'.
67618 +
67619 +       if [ -f $src -o -d $src ]
67620 +       then
67621 +               true
67622 +       else
67623 +               echo "install:  $src does not exist"
67624 +               exit 1
67625 +       fi
67626 +       
67627 +       if [ x"$dst" = x ]
67628 +       then
67629 +               echo "install:  no destination specified"
67630 +               exit 1
67631 +       else
67632 +               true
67633 +       fi
67634 +
67635 +# If destination is a directory, append the input filename; if your system
67636 +# does not like double slashes in filenames, you may need to add some logic
67637 +
67638 +       if [ -d $dst ]
67639 +       then
67640 +               dst="$dst"/`basename $src`
67641 +       else
67642 +               true
67643 +       fi
67644 +fi
67645 +
67646 +## this sed command emulates the dirname command
67647 +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
67648 +
67649 +# Make sure that the destination directory exists.
67650 +#  this part is taken from Noah Friedman's mkinstalldirs script
67651 +
67652 +# Skip lots of stat calls in the usual case.
67653 +if [ ! -d "$dstdir" ]; then
67654 +defaultIFS='   
67655 +'
67656 +IFS="${IFS-${defaultIFS}}"
67657 +
67658 +oIFS="${IFS}"
67659 +# Some sh's can't handle IFS=/ for some reason.
67660 +IFS='%'
67661 +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
67662 +IFS="${oIFS}"
67663 +
67664 +pathcomp=''
67665 +
67666 +while [ $# -ne 0 ] ; do
67667 +       pathcomp="${pathcomp}${1}"
67668 +       shift
67669 +
67670 +       if [ ! -d "${pathcomp}" ] ;
67671 +        then
67672 +               $mkdirprog "${pathcomp}"
67673 +       else
67674 +               true
67675 +       fi
67676 +
67677 +       pathcomp="${pathcomp}/"
67678 +done
67679 +fi
67680 +
67681 +if [ x"$dir_arg" != x ]
67682 +then
67683 +       $doit $instcmd $dst &&
67684 +
67685 +       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
67686 +       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
67687 +       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
67688 +       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
67689 +else
67690 +
67691 +# If we're going to rename the final executable, determine the name now.
67692 +
67693 +       if [ x"$transformarg" = x ] 
67694 +       then
67695 +               dstfile=`basename $dst`
67696 +       else
67697 +               dstfile=`basename $dst $transformbasename | 
67698 +                       sed $transformarg`$transformbasename
67699 +       fi
67700 +
67701 +# don't allow the sed command to completely eliminate the filename
67702 +
67703 +       if [ x"$dstfile" = x ] 
67704 +       then
67705 +               dstfile=`basename $dst`
67706 +       else
67707 +               true
67708 +       fi
67709 +
67710 +# Make a temp file name in the proper directory.
67711 +
67712 +       dsttmp=$dstdir/#inst.$$#
67713 +
67714 +# Move or copy the file name to the temp name
67715 +
67716 +       $doit $instcmd $src $dsttmp &&
67717 +
67718 +       trap "rm -f ${dsttmp}" 0 &&
67719 +
67720 +# and set any options; do chmod last to preserve setuid bits
67721 +
67722 +# If any of these fail, we abort the whole thing.  If we want to
67723 +# ignore errors from any of these, just make sure not to ignore
67724 +# errors from the above "$doit $instcmd $src $dsttmp" command.
67725 +
67726 +       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
67727 +       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
67728 +       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
67729 +       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
67730 +
67731 +# Now rename the file to the real destination.
67732 +
67733 +       $doit $rmcmd -f $dstdir/$dstfile &&
67734 +       $doit $mvcmd $dsttmp $dstdir/$dstfile 
67735 +
67736 +fi &&
67737 +
67738 +
67739 +exit 0
67740 diff -Nru php-5.2.4.vanilla/libevent/kqueue.c php-5.2.4.fpm/libevent/kqueue.c
67741 --- php-5.2.4.vanilla/libevent/kqueue.c 1970-01-01 03:00:00.000000000 +0300
67742 +++ php-5.2.4.fpm/libevent/kqueue.c     2007-08-31 15:47:19.000000000 +0400
67743 @@ -0,0 +1,419 @@
67744 +/*     $OpenBSD: kqueue.c,v 1.5 2002/07/10 14:41:31 art Exp $  */
67745 +
67746 +/*
67747 + * Copyright 2000-2002 Niels Provos <provos@citi.umich.edu>
67748 + * All rights reserved.
67749 + *
67750 + * Redistribution and use in source and binary forms, with or without
67751 + * modification, are permitted provided that the following conditions
67752 + * are met:
67753 + * 1. Redistributions of source code must retain the above copyright
67754 + *    notice, this list of conditions and the following disclaimer.
67755 + * 2. Redistributions in binary form must reproduce the above copyright
67756 + *    notice, this list of conditions and the following disclaimer in the
67757 + *    documentation and/or other materials provided with the distribution.
67758 + * 3. The name of the author may not be used to endorse or promote products
67759 + *    derived from this software without specific prior written permission.
67760 + *
67761 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
67762 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
67763 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
67764 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
67765 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
67766 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
67767 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
67768 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
67769 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
67770 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
67771 + */
67772 +#ifdef HAVE_CONFIG_H
67773 +#include "config.h"
67774 +#endif
67775 +
67776 +#include <sys/types.h>
67777 +#ifdef HAVE_SYS_TIME_H
67778 +#include <sys/time.h>
67779 +#else
67780 +#include <sys/_time.h>
67781 +#endif
67782 +#include <sys/queue.h>
67783 +#include <sys/event.h>
67784 +#include <signal.h>
67785 +#include <stdio.h>
67786 +#include <stdlib.h>
67787 +#include <string.h>
67788 +#include <unistd.h>
67789 +#include <errno.h>
67790 +#ifdef HAVE_INTTYPES_H
67791 +#include <inttypes.h>
67792 +#endif
67793 +
67794 +#if defined(HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__)
67795 +#define INTPTR(x)      (intptr_t)x
67796 +#else
67797 +#define INTPTR(x)      x
67798 +#endif
67799 +
67800 +#include "event.h"
67801 +#include "log.h"
67802 +
67803 +#define EVLIST_X_KQINKERNEL    0x1000
67804 +
67805 +#define NEVENT         64
67806 +
67807 +struct kqop {
67808 +       struct kevent *changes;
67809 +       int nchanges;
67810 +       struct kevent *events;
67811 +       int nevents;
67812 +       int kq;
67813 +       pid_t pid;
67814 +};
67815 +
67816 +void *kq_init  (struct event_base *);
67817 +int kq_add     (void *, struct event *);
67818 +int kq_del     (void *, struct event *);
67819 +int kq_recalc  (struct event_base *, void *, int);
67820 +int kq_dispatch        (struct event_base *, void *, struct timeval *);
67821 +int kq_insert  (struct kqop *, struct kevent *);
67822 +void kq_dealloc (struct event_base *, void *);
67823 +
67824 +const struct eventop kqops = {
67825 +       "kqueue",
67826 +       kq_init,
67827 +       kq_add,
67828 +       kq_del,
67829 +       kq_recalc,
67830 +       kq_dispatch,
67831 +       kq_dealloc
67832 +};
67833 +
67834 +void *
67835 +kq_init(struct event_base *base)
67836 +{
67837 +       int kq;
67838 +       struct kqop *kqueueop;
67839 +
67840 +       /* Disable kqueue when this environment variable is set */
67841 +       if (getenv("EVENT_NOKQUEUE"))
67842 +               return (NULL);
67843 +
67844 +       if (!(kqueueop = calloc(1, sizeof(struct kqop))))
67845 +               return (NULL);
67846 +
67847 +       /* Initalize the kernel queue */
67848 +       
67849 +       if ((kq = kqueue()) == -1) {
67850 +               event_warn("kqueue");
67851 +               free (kqueueop);
67852 +               return (NULL);
67853 +       }
67854 +
67855 +       kqueueop->kq = kq;
67856 +
67857 +       kqueueop->pid = getpid();
67858 +
67859 +       /* Initalize fields */
67860 +       kqueueop->changes = malloc(NEVENT * sizeof(struct kevent));
67861 +       if (kqueueop->changes == NULL) {
67862 +               free (kqueueop);
67863 +               return (NULL);
67864 +       }
67865 +       kqueueop->events = malloc(NEVENT * sizeof(struct kevent));
67866 +       if (kqueueop->events == NULL) {
67867 +               free (kqueueop->changes);
67868 +               free (kqueueop);
67869 +               return (NULL);
67870 +       }
67871 +       kqueueop->nevents = NEVENT;
67872 +
67873 +       /* Check for Mac OS X kqueue bug. */
67874 +       kqueueop->changes[0].ident = -1;
67875 +       kqueueop->changes[0].filter = EVFILT_READ;
67876 +       kqueueop->changes[0].flags = EV_ADD;
67877 +       /* 
67878 +        * If kqueue works, then kevent will succeed, and it will
67879 +        * stick an error in events[0].  If kqueue is broken, then
67880 +        * kevent will fail.
67881 +        */
67882 +       if (kevent(kq,
67883 +               kqueueop->changes, 1, kqueueop->events, NEVENT, NULL) != 1 ||
67884 +           kqueueop->events[0].ident != -1 ||
67885 +           kqueueop->events[0].flags != EV_ERROR) {
67886 +               event_warn("%s: detected broken kqueue; not using.", __func__);
67887 +               free(kqueueop->changes);
67888 +               free(kqueueop->events);
67889 +               free(kqueueop);
67890 +               close(kq);
67891 +               return (NULL);
67892 +       }
67893 +
67894 +       return (kqueueop);
67895 +}
67896 +
67897 +int
67898 +kq_recalc(struct event_base *base, void *arg, int max)
67899 +{
67900 +       return (0);
67901 +}
67902 +
67903 +int
67904 +kq_insert(struct kqop *kqop, struct kevent *kev)
67905 +{
67906 +       int nevents = kqop->nevents;
67907 +
67908 +       if (kqop->nchanges == nevents) {
67909 +               struct kevent *newchange;
67910 +               struct kevent *newresult;
67911 +
67912 +               nevents *= 2;
67913 +
67914 +               newchange = realloc(kqop->changes,
67915 +                                   nevents * sizeof(struct kevent));
67916 +               if (newchange == NULL) {
67917 +                       event_warn("%s: malloc", __func__);
67918 +                       return (-1);
67919 +               }
67920 +               kqop->changes = newchange;
67921 +
67922 +               newresult = realloc(kqop->events,
67923 +                                   nevents * sizeof(struct kevent));
67924 +
67925 +               /*
67926 +                * If we fail, we don't have to worry about freeing,
67927 +                * the next realloc will pick it up.
67928 +                */
67929 +               if (newresult == NULL) {
67930 +                       event_warn("%s: malloc", __func__);
67931 +                       return (-1);
67932 +               }
67933 +               kqop->events = newresult;
67934 +
67935 +               kqop->nevents = nevents;
67936 +       }
67937 +
67938 +       memcpy(&kqop->changes[kqop->nchanges++], kev, sizeof(struct kevent));
67939 +
67940 +       event_debug(("%s: fd %d %s%s",
67941 +                __func__, kev->ident, 
67942 +                kev->filter == EVFILT_READ ? "EVFILT_READ" : "EVFILT_WRITE",
67943 +                kev->flags == EV_DELETE ? " (del)" : ""));
67944 +
67945 +       return (0);
67946 +}
67947 +
67948 +static void
67949 +kq_sighandler(int sig)
67950 +{
67951 +       /* Do nothing here */
67952 +}
67953 +
67954 +int
67955 +kq_dispatch(struct event_base *base, void *arg, struct timeval *tv)
67956 +{
67957 +       struct kqop *kqop = arg;
67958 +       struct kevent *changes = kqop->changes;
67959 +       struct kevent *events = kqop->events;
67960 +       struct event *ev;
67961 +       struct timespec ts;
67962 +       int i, res;
67963 +
67964 +       TIMEVAL_TO_TIMESPEC(tv, &ts);
67965 +
67966 +       res = kevent(kqop->kq, changes, kqop->nchanges,
67967 +           events, kqop->nevents, &ts);
67968 +       kqop->nchanges = 0;
67969 +       if (res == -1) {
67970 +               if (errno != EINTR) {
67971 +                        event_warn("kevent");
67972 +                       return (-1);
67973 +               }
67974 +
67975 +               return (0);
67976 +       }
67977 +
67978 +       event_debug(("%s: kevent reports %d", __func__, res));
67979 +
67980 +       for (i = 0; i < res; i++) {
67981 +               int which = 0;
67982 +
67983 +               if (events[i].flags & EV_ERROR) {
67984 +                       /* 
67985 +                        * Error messages that can happen, when a delete fails.
67986 +                        *   EBADF happens when the file discriptor has been
67987 +                        *   closed,
67988 +                        *   ENOENT when the file discriptor was closed and
67989 +                        *   then reopened.
67990 +                        *   EINVAL for some reasons not understood; EINVAL
67991 +                        *   should not be returned ever; but FreeBSD does :-\
67992 +                        * An error is also indicated when a callback deletes
67993 +                        * an event we are still processing.  In that case
67994 +                        * the data field is set to ENOENT.
67995 +                        */
67996 +                       if (events[i].data == EBADF ||
67997 +                           events[i].data == EINVAL ||
67998 +                           events[i].data == ENOENT)
67999 +                               continue;
68000 +                       errno = events[i].data;
68001 +                       return (-1);
68002 +               }
68003 +
68004 +               ev = (struct event *)events[i].udata;
68005 +
68006 +               if (events[i].filter == EVFILT_READ) {
68007 +                       which |= EV_READ;
68008 +               } else if (events[i].filter == EVFILT_WRITE) {
68009 +                       which |= EV_WRITE;
68010 +               } else if (events[i].filter == EVFILT_SIGNAL) {
68011 +                       which |= EV_SIGNAL;
68012 +               }
68013 +
68014 +               if (!which)
68015 +                       continue;
68016 +
68017 +               if (!(ev->ev_events & EV_PERSIST))
68018 +                       event_del(ev);
68019 +
68020 +               event_active(ev, which,
68021 +                   ev->ev_events & EV_SIGNAL ? events[i].data : 1);
68022 +       }
68023 +
68024 +       return (0);
68025 +}
68026 +
68027 +
68028 +int
68029 +kq_add(void *arg, struct event *ev)
68030 +{
68031 +       struct kqop *kqop = arg;
68032 +       struct kevent kev;
68033 +
68034 +       if (ev->ev_events & EV_SIGNAL) {
68035 +               int nsignal = EVENT_SIGNAL(ev);
68036 +
68037 +               memset(&kev, 0, sizeof(kev));
68038 +               kev.ident = nsignal;
68039 +               kev.filter = EVFILT_SIGNAL;
68040 +               kev.flags = EV_ADD;
68041 +               if (!(ev->ev_events & EV_PERSIST))
68042 +                       kev.flags |= EV_ONESHOT;
68043 +               kev.udata = INTPTR(ev);
68044 +               
68045 +               if (kq_insert(kqop, &kev) == -1)
68046 +                       return (-1);
68047 +
68048 +               if (signal(nsignal, kq_sighandler) == SIG_ERR)
68049 +                       return (-1);
68050 +
68051 +               ev->ev_flags |= EVLIST_X_KQINKERNEL;
68052 +               return (0);
68053 +       }
68054 +
68055 +       if (ev->ev_events & EV_READ) {
68056 +               memset(&kev, 0, sizeof(kev));
68057 +               kev.ident = ev->ev_fd;
68058 +               kev.filter = EVFILT_READ;
68059 +#ifdef NOTE_EOF
68060 +               /* Make it behave like select() and poll() */
68061 +               kev.fflags = NOTE_EOF;
68062 +#endif
68063 +               kev.flags = EV_ADD;
68064 +               if (!(ev->ev_events & EV_PERSIST))
68065 +                       kev.flags |= EV_ONESHOT;
68066 +               kev.udata = INTPTR(ev);
68067 +               
68068 +               if (kq_insert(kqop, &kev) == -1)
68069 +                       return (-1);
68070 +
68071 +               ev->ev_flags |= EVLIST_X_KQINKERNEL;
68072 +       }
68073 +
68074 +       if (ev->ev_events & EV_WRITE) {
68075 +               memset(&kev, 0, sizeof(kev));
68076 +               kev.ident = ev->ev_fd;
68077 +               kev.filter = EVFILT_WRITE;
68078 +               kev.flags = EV_ADD;
68079 +               if (!(ev->ev_events & EV_PERSIST))
68080 +                       kev.flags |= EV_ONESHOT;
68081 +               kev.udata = INTPTR(ev);
68082 +               
68083 +               if (kq_insert(kqop, &kev) == -1)
68084 +                       return (-1);
68085 +
68086 +               ev->ev_flags |= EVLIST_X_KQINKERNEL;
68087 +       }
68088 +
68089 +       return (0);
68090 +}
68091 +
68092 +int
68093 +kq_del(void *arg, struct event *ev)
68094 +{
68095 +       struct kqop *kqop = arg;
68096 +       struct kevent kev;
68097 +
68098 +       if (!(ev->ev_flags & EVLIST_X_KQINKERNEL))
68099 +               return (0);
68100 +
68101 +       if (ev->ev_events & EV_SIGNAL) {
68102 +               int nsignal = EVENT_SIGNAL(ev);
68103 +
68104 +               memset(&kev, 0, sizeof(kev));
68105 +               kev.ident = nsignal;
68106 +               kev.filter = EVFILT_SIGNAL;
68107 +               kev.flags = EV_DELETE;
68108 +               
68109 +               if (kq_insert(kqop, &kev) == -1)
68110 +                       return (-1);
68111 +
68112 +               if (signal(nsignal, SIG_DFL) == SIG_ERR)
68113 +                       return (-1);
68114 +
68115 +               ev->ev_flags &= ~EVLIST_X_KQINKERNEL;
68116 +               return (0);
68117 +       }
68118 +
68119 +       if (ev->ev_events & EV_READ) {
68120 +               memset(&kev, 0, sizeof(kev));
68121 +               kev.ident = ev->ev_fd;
68122 +               kev.filter = EVFILT_READ;
68123 +               kev.flags = EV_DELETE;
68124 +               
68125 +               if (kq_insert(kqop, &kev) == -1)
68126 +                       return (-1);
68127 +
68128 +               ev->ev_flags &= ~EVLIST_X_KQINKERNEL;
68129 +       }
68130 +
68131 +       if (ev->ev_events & EV_WRITE) {
68132 +               memset(&kev, 0, sizeof(kev));
68133 +               kev.ident = ev->ev_fd;
68134 +               kev.filter = EVFILT_WRITE;
68135 +               kev.flags = EV_DELETE;
68136 +               
68137 +               if (kq_insert(kqop, &kev) == -1)
68138 +                       return (-1);
68139 +
68140 +               ev->ev_flags &= ~EVLIST_X_KQINKERNEL;
68141 +       }
68142 +
68143 +       return (0);
68144 +}
68145 +
68146 +void
68147 +kq_dealloc(struct event_base *base, void *arg)
68148 +{
68149 +       struct kqop *kqop = arg;
68150 +
68151 +       if (kqop->changes)
68152 +               free(kqop->changes);
68153 +       if (kqop->events)
68154 +               free(kqop->events);
68155 +
68156 +       /* kqueue fd does not get inherited on fork() so we must not close() it in child processes
68157 +               yes, this is a bad hack, but it works */
68158 +       if (kqop->kq >= 0 && kqop->pid == getpid())
68159 +               close(kqop->kq);
68160 +       memset(kqop, 0, sizeof(struct kqop));
68161 +       free(kqop);
68162 +}
68163 diff -Nru php-5.2.4.vanilla/libevent/log.c php-5.2.4.fpm/libevent/log.c
68164 --- php-5.2.4.vanilla/libevent/log.c    1970-01-01 03:00:00.000000000 +0300
68165 +++ php-5.2.4.fpm/libevent/log.c        2007-08-31 15:47:19.000000000 +0400
68166 @@ -0,0 +1,219 @@
68167 +/*     $OpenBSD: err.c,v 1.2 2002/06/25 15:50:15 mickey Exp $  */
68168 +
68169 +/*
68170 + * log.c
68171 + *
68172 + * Based on err.c, which was adapted from OpenBSD libc *err* *warn* code.
68173 + *
68174 + * Copyright (c) 2005 Nick Mathewson <nickm@freehaven.net>
68175 + *
68176 + * Copyright (c) 2000 Dug Song <dugsong@monkey.org>
68177 + *
68178 + * Copyright (c) 1993
68179 + *     The Regents of the University of California.  All rights reserved.
68180 + *
68181 + * Redistribution and use in source and binary forms, with or without
68182 + * modification, are permitted provided that the following conditions
68183 + * are met:
68184 + * 1. Redistributions of source code must retain the above copyright
68185 + *    notice, this list of conditions and the following disclaimer.
68186 + * 2. Redistributions in binary form must reproduce the above copyright
68187 + *    notice, this list of conditions and the following disclaimer in the
68188 + *    documentation and/or other materials provided with the distribution.
68189 + * 3. Neither the name of the University nor the names of its contributors
68190 + *    may be used to endorse or promote products derived from this software
68191 + *    without specific prior written permission.
68192 + *
68193 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
68194 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
68195 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
68196 + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
68197 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
68198 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
68199 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
68200 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
68201 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
68202 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
68203 + * SUCH DAMAGE.
68204 + */
68205 +
68206 +#ifdef HAVE_CONFIG_H
68207 +#include "config.h"
68208 +#endif
68209 +
68210 +#ifdef WIN32
68211 +#define WIN32_LEAN_AND_MEAN
68212 +#include <windows.h>
68213 +#undef WIN32_LEAN_AND_MEAN
68214 +#include "misc.h"
68215 +#endif
68216 +#include <sys/types.h>
68217 +#include <sys/tree.h>
68218 +#ifdef HAVE_SYS_TIME_H
68219 +#include <sys/time.h>
68220 +#else
68221 +#include <sys/_time.h>
68222 +#endif
68223 +#include <stdio.h>
68224 +#include <stdlib.h>
68225 +#include <stdarg.h>
68226 +#include <string.h>
68227 +#include <errno.h>
68228 +#include "event.h"
68229 +
68230 +#include "log.h"
68231 +
68232 +static void _warn_helper(int severity, int log_errno, const char *fmt,
68233 +                         va_list ap);
68234 +static void event_log(int severity, const char *msg);
68235 +
68236 +static int
68237 +event_vsnprintf(char *str, size_t size, const char *format, va_list args)
68238 +{
68239 +       int r;
68240 +       if (size == 0)
68241 +               return -1;
68242 +#ifdef WIN32
68243 +       r = _vsnprintf(str, size, format, args);
68244 +#else
68245 +       r = vsnprintf(str, size, format, args);
68246 +#endif
68247 +       str[size-1] = '\0';
68248 +       if (r < 0 || ((size_t)r) >= size) {
68249 +               /* different platforms behave differently on overflow;
68250 +                * handle both kinds. */
68251 +               return -1;
68252 +       }
68253 +       return r;
68254 +}
68255 +
68256 +static int
68257 +event_snprintf(char *str, size_t size, const char *format, ...)
68258 +{
68259 +    va_list ap;
68260 +    int r;
68261 +    va_start(ap, format);
68262 +    r = event_vsnprintf(str, size, format, ap);
68263 +    va_end(ap);
68264 +    return r;
68265 +}
68266 +
68267 +void
68268 +event_err(int eval, const char *fmt, ...)
68269 +{
68270 +       va_list ap;
68271 +       
68272 +       va_start(ap, fmt);
68273 +       _warn_helper(_EVENT_LOG_ERR, errno, fmt, ap);
68274 +       va_end(ap);
68275 +       exit(eval);
68276 +}
68277 +
68278 +void
68279 +event_warn(const char *fmt, ...)
68280 +{
68281 +       va_list ap;
68282 +       
68283 +       va_start(ap, fmt);
68284 +       _warn_helper(_EVENT_LOG_WARN, errno, fmt, ap);
68285 +       va_end(ap);
68286 +}
68287 +
68288 +void
68289 +event_errx(int eval, const char *fmt, ...)
68290 +{
68291 +       va_list ap;
68292 +       
68293 +       va_start(ap, fmt);
68294 +       _warn_helper(_EVENT_LOG_ERR, -1, fmt, ap);
68295 +       va_end(ap);
68296 +       exit(eval);
68297 +}
68298 +
68299 +void
68300 +event_warnx(const char *fmt, ...)
68301 +{
68302 +       va_list ap;
68303 +       
68304 +       va_start(ap, fmt);
68305 +       _warn_helper(_EVENT_LOG_WARN, -1, fmt, ap);
68306 +       va_end(ap);
68307 +}
68308 +
68309 +void
68310 +event_msgx(const char *fmt, ...)
68311 +{
68312 +       va_list ap;
68313 +       
68314 +       va_start(ap, fmt);
68315 +       _warn_helper(_EVENT_LOG_MSG, -1, fmt, ap);
68316 +       va_end(ap);
68317 +}
68318 +
68319 +void
68320 +_event_debugx(const char *fmt, ...)
68321 +{
68322 +       va_list ap;
68323 +       
68324 +       va_start(ap, fmt);
68325 +       _warn_helper(_EVENT_LOG_DEBUG, -1, fmt, ap);
68326 +       va_end(ap);
68327 +}
68328 +
68329 +static void
68330 +_warn_helper(int severity, int log_errno, const char *fmt, va_list ap)
68331 +{
68332 +       char buf[1024];
68333 +       size_t len;
68334 +
68335 +       if (fmt != NULL)
68336 +               event_vsnprintf(buf, sizeof(buf), fmt, ap);
68337 +       else
68338 +               buf[0] = '\0';
68339 +
68340 +       if (log_errno >= 0) {
68341 +               len = strlen(buf);
68342 +               if (len < sizeof(buf) - 3) {
68343 +                       event_snprintf(buf + len, sizeof(buf) - len, ": %s",
68344 +                           strerror(log_errno));
68345 +               }
68346 +       }
68347 +
68348 +       event_log(severity, buf);
68349 +}
68350 +
68351 +static event_log_cb log_fn = NULL;
68352 +
68353 +void
68354 +event_set_log_callback(event_log_cb cb)
68355 +{
68356 +       log_fn = cb;
68357 +}
68358 +
68359 +static void
68360 +event_log(int severity, const char *msg)
68361 +{
68362 +       if (log_fn)
68363 +               log_fn(severity, msg);
68364 +       else {
68365 +               const char *severity_str;
68366 +               switch (severity) {
68367 +               case _EVENT_LOG_DEBUG:
68368 +                       severity_str = "debug";
68369 +                       break;
68370 +               case _EVENT_LOG_MSG:
68371 +                       severity_str = "msg";
68372 +                       break;
68373 +               case _EVENT_LOG_WARN:
68374 +                       severity_str = "warn";
68375 +                       break;
68376 +               case _EVENT_LOG_ERR:
68377 +                       severity_str = "err";
68378 +                       break;
68379 +               default:
68380 +                       severity_str = "???";
68381 +                       break;
68382 +               }
68383 +               (void)fprintf(stderr, "[%s] %s\n", severity_str, msg);
68384 +       }
68385 +}
68386 diff -Nru php-5.2.4.vanilla/libevent/log.h php-5.2.4.fpm/libevent/log.h
68387 --- php-5.2.4.vanilla/libevent/log.h    1970-01-01 03:00:00.000000000 +0300
68388 +++ php-5.2.4.fpm/libevent/log.h        2007-08-31 15:47:19.000000000 +0400
68389 @@ -0,0 +1,43 @@
68390 +/*
68391 + * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu>
68392 + * All rights reserved.
68393 + *
68394 + * Redistribution and use in source and binary forms, with or without
68395 + * modification, are permitted provided that the following conditions
68396 + * are met:
68397 + * 1. Redistributions of source code must retain the above copyright
68398 + *    notice, this list of conditions and the following disclaimer.
68399 + * 2. Redistributions in binary form must reproduce the above copyright
68400 + *    notice, this list of conditions and the following disclaimer in the
68401 + *    documentation and/or other materials provided with the distribution.
68402 + * 3. The name of the author may not be used to endorse or promote products
68403 + *    derived from this software without specific prior written permission.
68404 + *
68405 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
68406 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
68407 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
68408 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
68409 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
68410 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
68411 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
68412 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
68413 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
68414 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
68415 + */
68416 +#ifndef _LOG_H_
68417 +#define _LOG_H_
68418 +
68419 +void event_err(int eval, const char *fmt, ...);
68420 +void event_warn(const char *fmt, ...);
68421 +void event_errx(int eval, const char *fmt, ...);
68422 +void event_warnx(const char *fmt, ...);
68423 +void event_msgx(const char *fmt, ...);
68424 +void _event_debugx(const char *fmt, ...);
68425 +
68426 +#ifdef USE_DEBUG
68427 +#define event_debug(x) _event_debugx x
68428 +#else
68429 +#define event_debug(x) do {;} while (0)
68430 +#endif
68431 +
68432 +#endif
68433 diff -Nru php-5.2.4.vanilla/libevent/ltmain.sh php-5.2.4.fpm/libevent/ltmain.sh
68434 --- php-5.2.4.vanilla/libevent/ltmain.sh        1970-01-01 03:00:00.000000000 +0300
68435 +++ php-5.2.4.fpm/libevent/ltmain.sh    2007-08-31 15:47:19.000000000 +0400
68436 @@ -0,0 +1,6460 @@
68437 +# ltmain.sh - Provide generalized library-building support services.
68438 +# NOTE: Changing this file will not affect anything until you rerun configure.
68439 +#
68440 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
68441 +# Free Software Foundation, Inc.
68442 +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
68443 +#
68444 +# This program is free software; you can redistribute it and/or modify
68445 +# it under the terms of the GNU General Public License as published by
68446 +# the Free Software Foundation; either version 2 of the License, or
68447 +# (at your option) any later version.
68448 +#
68449 +# This program is distributed in the hope that it will be useful, but
68450 +# WITHOUT ANY WARRANTY; without even the implied warranty of
68451 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
68452 +# General Public License for more details.
68453 +#
68454 +# You should have received a copy of the GNU General Public License
68455 +# along with this program; if not, write to the Free Software
68456 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
68457 +#
68458 +# As a special exception to the GNU General Public License, if you
68459 +# distribute this file as part of a program that contains a
68460 +# configuration script generated by Autoconf, you may include it under
68461 +# the same distribution terms that you use for the rest of that program.
68462 +
68463 +basename="s,^.*/,,g"
68464 +
68465 +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
68466 +# is ksh but when the shell is invoked as "sh" and the current value of
68467 +# the _XPG environment variable is not equal to 1 (one), the special
68468 +# positional parameter $0, within a function call, is the name of the
68469 +# function.
68470 +progpath="$0"
68471 +
68472 +# The name of this program:
68473 +progname=`echo "$progpath" | $SED $basename`
68474 +modename="$progname"
68475 +
68476 +# Global variables:
68477 +EXIT_SUCCESS=0
68478 +EXIT_FAILURE=1
68479 +
68480 +PROGRAM=ltmain.sh
68481 +PACKAGE=libtool
68482 +VERSION=1.5.14
68483 +TIMESTAMP=" (1.1220.2.195 2005/02/12 12:12:33)"
68484 +
68485 +# See if we are running on zsh, and set the options which allow our
68486 +# commands through without removal of \ escapes.
68487 +if test -n "${ZSH_VERSION+set}" ; then
68488 +  setopt NO_GLOB_SUBST
68489 +fi
68490 +
68491 +# Check that we have a working $echo.
68492 +if test "X$1" = X--no-reexec; then
68493 +  # Discard the --no-reexec flag, and continue.
68494 +  shift
68495 +elif test "X$1" = X--fallback-echo; then
68496 +  # Avoid inline document here, it may be left over
68497 +  :
68498 +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
68499 +  # Yippee, $echo works!
68500 +  :
68501 +else
68502 +  # Restart under the correct shell, and then maybe $echo will work.
68503 +  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
68504 +fi
68505 +
68506 +if test "X$1" = X--fallback-echo; then
68507 +  # used as fallback echo
68508 +  shift
68509 +  cat <<EOF
68510 +$*
68511 +EOF
68512 +  exit $EXIT_SUCCESS
68513 +fi
68514 +
68515 +default_mode=
68516 +help="Try \`$progname --help' for more information."
68517 +magic="%%%MAGIC variable%%%"
68518 +mkdir="mkdir"
68519 +mv="mv -f"
68520 +rm="rm -f"
68521 +
68522 +# Sed substitution that helps us do robust quoting.  It backslashifies
68523 +# metacharacters that are still active within double-quoted strings.
68524 +Xsed="${SED}"' -e 1s/^X//'
68525 +sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
68526 +# test EBCDIC or ASCII
68527 +case `echo A|tr A '\301'` in
68528 + A) # EBCDIC based system
68529 +  SP2NL="tr '\100' '\n'"
68530 +  NL2SP="tr '\r\n' '\100\100'"
68531 +  ;;
68532 + *) # Assume ASCII based system
68533 +  SP2NL="tr '\040' '\012'"
68534 +  NL2SP="tr '\015\012' '\040\040'"
68535 +  ;;
68536 +esac
68537 +
68538 +# NLS nuisances.
68539 +# Only set LANG and LC_ALL to C if already set.
68540 +# These must not be set unconditionally because not all systems understand
68541 +# e.g. LANG=C (notably SCO).
68542 +# We save the old values to restore during execute mode.
68543 +if test "${LC_ALL+set}" = set; then
68544 +  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
68545 +fi
68546 +if test "${LANG+set}" = set; then
68547 +  save_LANG="$LANG"; LANG=C; export LANG
68548 +fi
68549 +
68550 +# Make sure IFS has a sensible default
68551 +: ${IFS="      
68552 +"}
68553 +
68554 +if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
68555 +  $echo "$modename: not configured to build any kind of library" 1>&2
68556 +  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
68557 +  exit $EXIT_FAILURE
68558 +fi
68559 +
68560 +# Global variables.
68561 +mode=$default_mode
68562 +nonopt=
68563 +prev=
68564 +prevopt=
68565 +run=
68566 +show="$echo"
68567 +show_help=
68568 +execute_dlfiles=
68569 +lo2o="s/\\.lo\$/.${objext}/"
68570 +o2lo="s/\\.${objext}\$/.lo/"
68571 +quote_scanset='[[~#^*{};<>?'"'"'       ]'
68572 +
68573 +#####################################
68574 +# Shell function definitions:
68575 +# This seems to be the best place for them
68576 +
68577 +# func_win32_libid arg
68578 +# return the library type of file 'arg'
68579 +#
68580 +# Need a lot of goo to handle *both* DLLs and import libs
68581 +# Has to be a shell function in order to 'eat' the argument
68582 +# that is supplied when $file_magic_command is called.
68583 +func_win32_libid ()
68584 +{
68585 +  win32_libid_type="unknown"
68586 +  win32_fileres=`file -L $1 2>/dev/null`
68587 +  case $win32_fileres in
68588 +  *ar\ archive\ import\ library*) # definitely import
68589 +    win32_libid_type="x86 archive import"
68590 +    ;;
68591 +  *ar\ archive*) # could be an import, or static
68592 +    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
68593 +      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
68594 +      win32_nmres=`eval $NM -f posix -A $1 | \
68595 +       sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
68596 +      if test "X$win32_nmres" = "Ximport" ; then
68597 +        win32_libid_type="x86 archive import"
68598 +      else
68599 +        win32_libid_type="x86 archive static"
68600 +      fi
68601 +    fi
68602 +    ;;
68603 +  *DLL*)
68604 +    win32_libid_type="x86 DLL"
68605 +    ;;
68606 +  *executable*) # but shell scripts are "executable" too...
68607 +    case $win32_fileres in
68608 +    *MS\ Windows\ PE\ Intel*)
68609 +      win32_libid_type="x86 DLL"
68610 +      ;;
68611 +    esac
68612 +    ;;
68613 +  esac
68614 +  $echo $win32_libid_type
68615 +}
68616 +
68617 +
68618 +# func_infer_tag arg
68619 +# Infer tagged configuration to use if any are available and
68620 +# if one wasn't chosen via the "--tag" command line option.
68621 +# Only attempt this if the compiler in the base compile
68622 +# command doesn't match the default compiler.
68623 +# arg is usually of the form 'gcc ...'
68624 +func_infer_tag ()
68625 +{
68626 +    if test -n "$available_tags" && test -z "$tagname"; then
68627 +      CC_quoted=
68628 +      for arg in $CC; do
68629 +       case $arg in
68630 +         *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
68631 +         arg="\"$arg\""
68632 +         ;;
68633 +       esac
68634 +       CC_quoted="$CC_quoted $arg"
68635 +      done
68636 +      case $@ in
68637 +      # Blanks in the command may have been stripped by the calling shell,
68638 +      # but not from the CC environment variable when configure was run.
68639 +      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
68640 +      # Blanks at the start of $base_compile will cause this to fail
68641 +      # if we don't check for them as well.
68642 +      *)
68643 +       for z in $available_tags; do
68644 +         if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
68645 +           # Evaluate the configuration.
68646 +           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
68647 +           CC_quoted=
68648 +           for arg in $CC; do
68649 +           # Double-quote args containing other shell metacharacters.
68650 +           case $arg in
68651 +             *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
68652 +             arg="\"$arg\""
68653 +             ;;
68654 +           esac
68655 +           CC_quoted="$CC_quoted $arg"
68656 +         done
68657 +           case "$@ " in
68658 +             " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
68659 +             # The compiler in the base compile command matches
68660 +             # the one in the tagged configuration.
68661 +             # Assume this is the tagged configuration we want.
68662 +             tagname=$z
68663 +             break
68664 +             ;;
68665 +           esac
68666 +         fi
68667 +       done
68668 +       # If $tagname still isn't set, then no tagged configuration
68669 +       # was found and let the user know that the "--tag" command
68670 +       # line option must be used.
68671 +       if test -z "$tagname"; then
68672 +         $echo "$modename: unable to infer tagged configuration"
68673 +         $echo "$modename: specify a tag with \`--tag'" 1>&2
68674 +         exit $EXIT_FAILURE
68675 +#        else
68676 +#          $echo "$modename: using $tagname tagged configuration"
68677 +       fi
68678 +       ;;
68679 +      esac
68680 +    fi
68681 +}
68682 +
68683 +
68684 +# func_extract_an_archive dir oldlib
68685 +func_extract_an_archive ()
68686 +{
68687 +    f_ex_an_ar_dir="$1"; shift
68688 +    f_ex_an_ar_oldlib="$1"
68689 +    f_ex_an_ar_lib=`$echo "X$f_ex_an_ar_oldlib" | $Xsed -e 's%^.*/%%'`
68690 +
68691 +    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
68692 +    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
68693 +    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
68694 +     :
68695 +    else
68696 +      $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
68697 +      $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
68698 +      $show "cp $f_ex_an_ar_oldlib $f_ex_an_ar_dir/$f_ex_an_ar_lib"
68699 +      $run eval "cp \$f_ex_an_ar_oldlib \$f_ex_an_ar_dir/\$f_ex_an_ar_lib"
68700 +      $AR t "$f_ex_an_ar_oldlib" | sort | uniq -c \
68701 +       | $EGREP -v '^[         ]*1[    ]' | while read count name
68702 +      do
68703 +       i=1
68704 +       while test "$i" -le "$count"
68705 +         do
68706 +         # Put our $i before any first dot (extension)
68707 +         # Never overwrite any file
68708 +         name_to="$name"
68709 +         while test "X$name_to" = "X$name" || test -f "$f_ex_an_ar_dir/$name_to"
68710 +           do
68711 +           name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
68712 +         done
68713 +         $show "(cd $f_ex_an_ar_dir && $AR x  $f_ex_an_ar_lib '$name' && $mv '$name' '$name_to')"
68714 +         $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_lib '$name' && $mv '$name' '$name_to' && $AR -d \$f_ex_an_ar_lib '$name')" || exit $?
68715 +         i=`expr $i + 1`
68716 +       done
68717 +      done
68718 +      $show "$rm $f_ex_an_ar_dir/$f_ex_an_ar_lib"
68719 +      $run eval "$rm \$f_ex_an_ar_dir/\$f_ex_an_ar_lib"
68720 +    fi
68721 +}
68722 +
68723 +# func_extract_archives gentop oldlib ...
68724 +func_extract_archives ()
68725 +{
68726 +    my_gentop="$1"; shift
68727 +    my_oldlibs=${1+"$@"}
68728 +    my_oldobjs=""
68729 +    my_xlib=""
68730 +    my_xabs=""
68731 +    my_xdir=""
68732 +    my_status=""
68733 +
68734 +    $show "${rm}r $my_gentop"
68735 +    $run ${rm}r "$my_gentop"
68736 +    $show "$mkdir $my_gentop"
68737 +    $run $mkdir "$my_gentop"
68738 +    my_status=$?
68739 +    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
68740 +      exit $my_status
68741 +    fi
68742 +
68743 +    for my_xlib in $my_oldlibs; do
68744 +      # Extract the objects.
68745 +      case $my_xlib in
68746 +       [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
68747 +       *) my_xabs=`pwd`"/$my_xlib" ;;
68748 +      esac
68749 +      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
68750 +      my_xdir="$my_gentop/$my_xlib"
68751 +
68752 +      $show "${rm}r $my_xdir"
68753 +      $run ${rm}r "$my_xdir"
68754 +      $show "$mkdir $my_xdir"
68755 +      $run $mkdir "$my_xdir"
68756 +      status=$?
68757 +      if test "$status" -ne 0 && test ! -d "$my_xdir"; then
68758 +       exit $status
68759 +      fi
68760 +      case $host in
68761 +      *-darwin*)
68762 +       $show "Extracting $my_xabs"
68763 +       # Do not bother doing anything if just a dry run
68764 +       if test -z "$run"; then
68765 +         darwin_orig_dir=`pwd`
68766 +         cd $my_xdir || exit $?
68767 +         darwin_archive=$my_xabs
68768 +         darwin_curdir=`pwd`
68769 +         darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
68770 +         darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
68771 +         if test -n "$darwin_arches"; then 
68772 +           darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
68773 +           darwin_arch=
68774 +           $show "$darwin_base_archive has multiple architectures $darwin_arches"
68775 +           for darwin_arch in  $darwin_arches ; do
68776 +             mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
68777 +             lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
68778 +             cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
68779 +             func_extract_an_archive "`pwd`" "${darwin_base_archive}"
68780 +             cd "$darwin_curdir"
68781 +             $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
68782 +           done # $darwin_arches
68783 +      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
68784 +           darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
68785 +           darwin_file=
68786 +           darwin_files=
68787 +           for darwin_file in $darwin_filelist; do
68788 +             darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
68789 +             lipo -create -output "$darwin_file" $darwin_files
68790 +           done # $darwin_filelist
68791 +           ${rm}r unfat-$$
68792 +           cd "$darwin_orig_dir"
68793 +         else
68794 +           cd "$darwin_orig_dir"
68795 +           func_extract_an_archive "$my_xdir" "$my_xabs"
68796 +         fi # $darwin_arches
68797 +       fi # $run
68798 +      ;;
68799 +      *)
68800 +        func_extract_an_archive "$my_xdir" "$my_xabs"
68801 +        ;;
68802 +      esac
68803 +      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
68804 +    done
68805 +    func_extract_archives_result="$my_oldobjs"
68806 +}
68807 +# End of Shell function definitions
68808 +#####################################
68809 +
68810 +# Darwin sucks
68811 +eval std_shrext=\"$shrext_cmds\"
68812 +
68813 +# Parse our command line options once, thoroughly.
68814 +while test "$#" -gt 0
68815 +do
68816 +  arg="$1"
68817 +  shift
68818 +
68819 +  case $arg in
68820 +  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
68821 +  *) optarg= ;;
68822 +  esac
68823 +
68824 +  # If the previous option needs an argument, assign it.
68825 +  if test -n "$prev"; then
68826 +    case $prev in
68827 +    execute_dlfiles)
68828 +      execute_dlfiles="$execute_dlfiles $arg"
68829 +      ;;
68830 +    tag)
68831 +      tagname="$arg"
68832 +      preserve_args="${preserve_args}=$arg"
68833 +
68834 +      # Check whether tagname contains only valid characters
68835 +      case $tagname in
68836 +      *[!-_A-Za-z0-9,/]*)
68837 +       $echo "$progname: invalid tag name: $tagname" 1>&2
68838 +       exit $EXIT_FAILURE
68839 +       ;;
68840 +      esac
68841 +
68842 +      case $tagname in
68843 +      CC)
68844 +       # Don't test for the "default" C tag, as we know, it's there, but
68845 +       # not specially marked.
68846 +       ;;
68847 +      *)
68848 +       if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
68849 +         taglist="$taglist $tagname"
68850 +         # Evaluate the configuration.
68851 +         eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
68852 +       else
68853 +         $echo "$progname: ignoring unknown tag $tagname" 1>&2
68854 +       fi
68855 +       ;;
68856 +      esac
68857 +      ;;
68858 +    *)
68859 +      eval "$prev=\$arg"
68860 +      ;;
68861 +    esac
68862 +
68863 +    prev=
68864 +    prevopt=
68865 +    continue
68866 +  fi
68867 +
68868 +  # Have we seen a non-optional argument yet?
68869 +  case $arg in
68870 +  --help)
68871 +    show_help=yes
68872 +    ;;
68873 +
68874 +  --version)
68875 +    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
68876 +    $echo
68877 +    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
68878 +    $echo "This is free software; see the source for copying conditions.  There is NO"
68879 +    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
68880 +    exit $?
68881 +    ;;
68882 +
68883 +  --config)
68884 +    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
68885 +    # Now print the configurations for the tags.
68886 +    for tagname in $taglist; do
68887 +      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
68888 +    done
68889 +    exit $?
68890 +    ;;
68891 +
68892 +  --debug)
68893 +    $echo "$progname: enabling shell trace mode"
68894 +    set -x
68895 +    preserve_args="$preserve_args $arg"
68896 +    ;;
68897 +
68898 +  --dry-run | -n)
68899 +    run=:
68900 +    ;;
68901 +
68902 +  --features)
68903 +    $echo "host: $host"
68904 +    if test "$build_libtool_libs" = yes; then
68905 +      $echo "enable shared libraries"
68906 +    else
68907 +      $echo "disable shared libraries"
68908 +    fi
68909 +    if test "$build_old_libs" = yes; then
68910 +      $echo "enable static libraries"
68911 +    else
68912 +      $echo "disable static libraries"
68913 +    fi
68914 +    exit $?
68915 +    ;;
68916 +
68917 +  --finish) mode="finish" ;;
68918 +
68919 +  --mode) prevopt="--mode" prev=mode ;;
68920 +  --mode=*) mode="$optarg" ;;
68921 +
68922 +  --preserve-dup-deps) duplicate_deps="yes" ;;
68923 +
68924 +  --quiet | --silent)
68925 +    show=:
68926 +    preserve_args="$preserve_args $arg"
68927 +    ;;
68928 +
68929 +  --tag) prevopt="--tag" prev=tag ;;
68930 +  --tag=*)
68931 +    set tag "$optarg" ${1+"$@"}
68932 +    shift
68933 +    prev=tag
68934 +    preserve_args="$preserve_args --tag"
68935 +    ;;
68936 +
68937 +  -dlopen)
68938 +    prevopt="-dlopen"
68939 +    prev=execute_dlfiles
68940 +    ;;
68941 +
68942 +  -*)
68943 +    $echo "$modename: unrecognized option \`$arg'" 1>&2
68944 +    $echo "$help" 1>&2
68945 +    exit $EXIT_FAILURE
68946 +    ;;
68947 +
68948 +  *)
68949 +    nonopt="$arg"
68950 +    break
68951 +    ;;
68952 +  esac
68953 +done
68954 +
68955 +if test -n "$prevopt"; then
68956 +  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
68957 +  $echo "$help" 1>&2
68958 +  exit $EXIT_FAILURE
68959 +fi
68960 +
68961 +# If this variable is set in any of the actions, the command in it
68962 +# will be execed at the end.  This prevents here-documents from being
68963 +# left over by shells.
68964 +exec_cmd=
68965 +
68966 +if test -z "$show_help"; then
68967 +
68968 +  # Infer the operation mode.
68969 +  if test -z "$mode"; then
68970 +    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
68971 +    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
68972 +    case $nonopt in
68973 +    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
68974 +      mode=link
68975 +      for arg
68976 +      do
68977 +       case $arg in
68978 +       -c)
68979 +          mode=compile
68980 +          break
68981 +          ;;
68982 +       esac
68983 +      done
68984 +      ;;
68985 +    *db | *dbx | *strace | *truss)
68986 +      mode=execute
68987 +      ;;
68988 +    *install*|cp|mv)
68989 +      mode=install
68990 +      ;;
68991 +    *rm)
68992 +      mode=uninstall
68993 +      ;;
68994 +    *)
68995 +      # If we have no mode, but dlfiles were specified, then do execute mode.
68996 +      test -n "$execute_dlfiles" && mode=execute
68997 +
68998 +      # Just use the default operation mode.
68999 +      if test -z "$mode"; then
69000 +       if test -n "$nonopt"; then
69001 +         $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
69002 +       else
69003 +         $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
69004 +       fi
69005 +      fi
69006 +      ;;
69007 +    esac
69008 +  fi
69009 +
69010 +  # Only execute mode is allowed to have -dlopen flags.
69011 +  if test -n "$execute_dlfiles" && test "$mode" != execute; then
69012 +    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
69013 +    $echo "$help" 1>&2
69014 +    exit $EXIT_FAILURE
69015 +  fi
69016 +
69017 +  # Change the help message to a mode-specific one.
69018 +  generic_help="$help"
69019 +  help="Try \`$modename --help --mode=$mode' for more information."
69020 +
69021 +  # These modes are in order of execution frequency so that they run quickly.
69022 +  case $mode in
69023 +  # libtool compile mode
69024 +  compile)
69025 +    modename="$modename: compile"
69026 +    # Get the compilation command and the source file.
69027 +    base_compile=
69028 +    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
69029 +    suppress_opt=yes
69030 +    suppress_output=
69031 +    arg_mode=normal
69032 +    libobj=
69033 +    later=
69034 +
69035 +    for arg
69036 +    do
69037 +      case "$arg_mode" in
69038 +      arg  )
69039 +       # do not "continue".  Instead, add this to base_compile
69040 +       lastarg="$arg"
69041 +       arg_mode=normal
69042 +       ;;
69043 +
69044 +      target )
69045 +       libobj="$arg"
69046 +       arg_mode=normal
69047 +       continue
69048 +       ;;
69049 +
69050 +      normal )
69051 +       # Accept any command-line options.
69052 +       case $arg in
69053 +       -o)
69054 +         if test -n "$libobj" ; then
69055 +           $echo "$modename: you cannot specify \`-o' more than once" 1>&2
69056 +           exit $EXIT_FAILURE
69057 +         fi
69058 +         arg_mode=target
69059 +         continue
69060 +         ;;
69061 +
69062 +       -static | -prefer-pic | -prefer-non-pic)
69063 +         later="$later $arg"
69064 +         continue
69065 +         ;;
69066 +
69067 +       -no-suppress)
69068 +         suppress_opt=no
69069 +         continue
69070 +         ;;
69071 +
69072 +       -Xcompiler)
69073 +         arg_mode=arg  #  the next one goes into the "base_compile" arg list
69074 +         continue      #  The current "srcfile" will either be retained or
69075 +         ;;            #  replaced later.  I would guess that would be a bug.
69076 +
69077 +       -Wc,*)
69078 +         args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
69079 +         lastarg=
69080 +         save_ifs="$IFS"; IFS=','
69081 +         for arg in $args; do
69082 +           IFS="$save_ifs"
69083 +
69084 +           # Double-quote args containing other shell metacharacters.
69085 +           # Many Bourne shells cannot handle close brackets correctly
69086 +           # in scan sets, so we specify it separately.
69087 +           case $arg in
69088 +             *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
69089 +             arg="\"$arg\""
69090 +             ;;
69091 +           esac
69092 +           lastarg="$lastarg $arg"
69093 +         done
69094 +         IFS="$save_ifs"
69095 +         lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
69096 +
69097 +         # Add the arguments to base_compile.
69098 +         base_compile="$base_compile $lastarg"
69099 +         continue
69100 +         ;;
69101 +
69102 +       * )
69103 +         # Accept the current argument as the source file.
69104 +         # The previous "srcfile" becomes the current argument.
69105 +         #
69106 +         lastarg="$srcfile"
69107 +         srcfile="$arg"
69108 +         ;;
69109 +       esac  #  case $arg
69110 +       ;;
69111 +      esac    #  case $arg_mode
69112 +
69113 +      # Aesthetically quote the previous argument.
69114 +      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
69115 +
69116 +      case $lastarg in
69117 +      # Double-quote args containing other shell metacharacters.
69118 +      # Many Bourne shells cannot handle close brackets correctly
69119 +      # in scan sets, and some SunOS ksh mistreat backslash-escaping
69120 +      # in scan sets (worked around with variable expansion),
69121 +      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
69122 +      # at all, so we specify them separately.
69123 +      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
69124 +       lastarg="\"$lastarg\""
69125 +       ;;
69126 +      esac
69127 +
69128 +      base_compile="$base_compile $lastarg"
69129 +    done # for arg
69130 +
69131 +    case $arg_mode in
69132 +    arg)
69133 +      $echo "$modename: you must specify an argument for -Xcompile"
69134 +      exit $EXIT_FAILURE
69135 +      ;;
69136 +    target)
69137 +      $echo "$modename: you must specify a target with \`-o'" 1>&2
69138 +      exit $EXIT_FAILURE
69139 +      ;;
69140 +    *)
69141 +      # Get the name of the library object.
69142 +      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
69143 +      ;;
69144 +    esac
69145 +
69146 +    # Recognize several different file suffixes.
69147 +    # If the user specifies -o file.o, it is replaced with file.lo
69148 +    xform='[cCFSifmso]'
69149 +    case $libobj in
69150 +    *.ada) xform=ada ;;
69151 +    *.adb) xform=adb ;;
69152 +    *.ads) xform=ads ;;
69153 +    *.asm) xform=asm ;;
69154 +    *.c++) xform=c++ ;;
69155 +    *.cc) xform=cc ;;
69156 +    *.ii) xform=ii ;;
69157 +    *.class) xform=class ;;
69158 +    *.cpp) xform=cpp ;;
69159 +    *.cxx) xform=cxx ;;
69160 +    *.f90) xform=f90 ;;
69161 +    *.for) xform=for ;;
69162 +    *.java) xform=java ;;
69163 +    esac
69164 +
69165 +    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
69166 +
69167 +    case $libobj in
69168 +    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
69169 +    *)
69170 +      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
69171 +      exit $EXIT_FAILURE
69172 +      ;;
69173 +    esac
69174 +
69175 +    func_infer_tag $base_compile
69176 +
69177 +    for arg in $later; do
69178 +      case $arg in
69179 +      -static)
69180 +       build_old_libs=yes
69181 +       continue
69182 +       ;;
69183 +
69184 +      -prefer-pic)
69185 +       pic_mode=yes
69186 +       continue
69187 +       ;;
69188 +
69189 +      -prefer-non-pic)
69190 +       pic_mode=no
69191 +       continue
69192 +       ;;
69193 +      esac
69194 +    done
69195 +
69196 +    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
69197 +    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
69198 +    if test "X$xdir" = "X$obj"; then
69199 +      xdir=
69200 +    else
69201 +      xdir=$xdir/
69202 +    fi
69203 +    lobj=${xdir}$objdir/$objname
69204 +
69205 +    if test -z "$base_compile"; then
69206 +      $echo "$modename: you must specify a compilation command" 1>&2
69207 +      $echo "$help" 1>&2
69208 +      exit $EXIT_FAILURE
69209 +    fi
69210 +
69211 +    # Delete any leftover library objects.
69212 +    if test "$build_old_libs" = yes; then
69213 +      removelist="$obj $lobj $libobj ${libobj}T"
69214 +    else
69215 +      removelist="$lobj $libobj ${libobj}T"
69216 +    fi
69217 +
69218 +    $run $rm $removelist
69219 +    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
69220 +
69221 +    # On Cygwin there's no "real" PIC flag so we must build both object types
69222 +    case $host_os in
69223 +    cygwin* | mingw* | pw32* | os2*)
69224 +      pic_mode=default
69225 +      ;;
69226 +    esac
69227 +    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
69228 +      # non-PIC code in shared libraries is not supported
69229 +      pic_mode=default
69230 +    fi
69231 +
69232 +    # Calculate the filename of the output object if compiler does
69233 +    # not support -o with -c
69234 +    if test "$compiler_c_o" = no; then
69235 +      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
69236 +      lockfile="$output_obj.lock"
69237 +      removelist="$removelist $output_obj $lockfile"
69238 +      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
69239 +    else
69240 +      output_obj=
69241 +      need_locks=no
69242 +      lockfile=
69243 +    fi
69244 +
69245 +    # Lock this critical section if it is needed
69246 +    # We use this script file to make the link, it avoids creating a new file
69247 +    if test "$need_locks" = yes; then
69248 +      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
69249 +       $show "Waiting for $lockfile to be removed"
69250 +       sleep 2
69251 +      done
69252 +    elif test "$need_locks" = warn; then
69253 +      if test -f "$lockfile"; then
69254 +       $echo "\
69255 +*** ERROR, $lockfile exists and contains:
69256 +`cat $lockfile 2>/dev/null`
69257 +
69258 +This indicates that another process is trying to use the same
69259 +temporary object file, and libtool could not work around it because
69260 +your compiler does not support \`-c' and \`-o' together.  If you
69261 +repeat this compilation, it may succeed, by chance, but you had better
69262 +avoid parallel builds (make -j) in this platform, or get a better
69263 +compiler."
69264 +
69265 +       $run $rm $removelist
69266 +       exit $EXIT_FAILURE
69267 +      fi
69268 +      $echo $srcfile > "$lockfile"
69269 +    fi
69270 +
69271 +    if test -n "$fix_srcfile_path"; then
69272 +      eval srcfile=\"$fix_srcfile_path\"
69273 +    fi
69274 +
69275 +    $run $rm "$libobj" "${libobj}T"
69276 +
69277 +    # Create a libtool object file (analogous to a ".la" file),
69278 +    # but don't create it if we're doing a dry run.
69279 +    test -z "$run" && cat > ${libobj}T <<EOF
69280 +# $libobj - a libtool object file
69281 +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
69282 +#
69283 +# Please DO NOT delete this file!
69284 +# It is necessary for linking the library.
69285 +
69286 +# Name of the PIC object.
69287 +EOF
69288 +
69289 +    # Only build a PIC object if we are building libtool libraries.
69290 +    if test "$build_libtool_libs" = yes; then
69291 +      # Without this assignment, base_compile gets emptied.
69292 +      fbsd_hideous_sh_bug=$base_compile
69293 +
69294 +      if test "$pic_mode" != no; then
69295 +       command="$base_compile $srcfile $pic_flag"
69296 +      else
69297 +       # Don't build PIC code
69298 +       command="$base_compile $srcfile"
69299 +      fi
69300 +
69301 +      if test ! -d "${xdir}$objdir"; then
69302 +       $show "$mkdir ${xdir}$objdir"
69303 +       $run $mkdir ${xdir}$objdir
69304 +       status=$?
69305 +       if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
69306 +         exit $status
69307 +       fi
69308 +      fi
69309 +
69310 +      if test -z "$output_obj"; then
69311 +       # Place PIC objects in $objdir
69312 +       command="$command -o $lobj"
69313 +      fi
69314 +
69315 +      $run $rm "$lobj" "$output_obj"
69316 +
69317 +      $show "$command"
69318 +      if $run eval "$command"; then :
69319 +      else
69320 +       test -n "$output_obj" && $run $rm $removelist
69321 +       exit $EXIT_FAILURE
69322 +      fi
69323 +
69324 +      if test "$need_locks" = warn &&
69325 +        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
69326 +       $echo "\
69327 +*** ERROR, $lockfile contains:
69328 +`cat $lockfile 2>/dev/null`
69329 +
69330 +but it should contain:
69331 +$srcfile
69332 +
69333 +This indicates that another process is trying to use the same
69334 +temporary object file, and libtool could not work around it because
69335 +your compiler does not support \`-c' and \`-o' together.  If you
69336 +repeat this compilation, it may succeed, by chance, but you had better
69337 +avoid parallel builds (make -j) in this platform, or get a better
69338 +compiler."
69339 +
69340 +       $run $rm $removelist
69341 +       exit $EXIT_FAILURE
69342 +      fi
69343 +
69344 +      # Just move the object if needed, then go on to compile the next one
69345 +      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
69346 +       $show "$mv $output_obj $lobj"
69347 +       if $run $mv $output_obj $lobj; then :
69348 +       else
69349 +         error=$?
69350 +         $run $rm $removelist
69351 +         exit $error
69352 +       fi
69353 +      fi
69354 +
69355 +      # Append the name of the PIC object to the libtool object file.
69356 +      test -z "$run" && cat >> ${libobj}T <<EOF
69357 +pic_object='$objdir/$objname'
69358 +
69359 +EOF
69360 +
69361 +      # Allow error messages only from the first compilation.
69362 +      if test "$suppress_opt" = yes; then
69363 +        suppress_output=' >/dev/null 2>&1'
69364 +      fi
69365 +    else
69366 +      # No PIC object so indicate it doesn't exist in the libtool
69367 +      # object file.
69368 +      test -z "$run" && cat >> ${libobj}T <<EOF
69369 +pic_object=none
69370 +
69371 +EOF
69372 +    fi
69373 +
69374 +    # Only build a position-dependent object if we build old libraries.
69375 +    if test "$build_old_libs" = yes; then
69376 +      if test "$pic_mode" != yes; then
69377 +       # Don't build PIC code
69378 +       command="$base_compile $srcfile"
69379 +      else
69380 +       command="$base_compile $srcfile $pic_flag"
69381 +      fi
69382 +      if test "$compiler_c_o" = yes; then
69383 +       command="$command -o $obj"
69384 +      fi
69385 +
69386 +      # Suppress compiler output if we already did a PIC compilation.
69387 +      command="$command$suppress_output"
69388 +      $run $rm "$obj" "$output_obj"
69389 +      $show "$command"
69390 +      if $run eval "$command"; then :
69391 +      else
69392 +       $run $rm $removelist
69393 +       exit $EXIT_FAILURE
69394 +      fi
69395 +
69396 +      if test "$need_locks" = warn &&
69397 +        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
69398 +       $echo "\
69399 +*** ERROR, $lockfile contains:
69400 +`cat $lockfile 2>/dev/null`
69401 +
69402 +but it should contain:
69403 +$srcfile
69404 +
69405 +This indicates that another process is trying to use the same
69406 +temporary object file, and libtool could not work around it because
69407 +your compiler does not support \`-c' and \`-o' together.  If you
69408 +repeat this compilation, it may succeed, by chance, but you had better
69409 +avoid parallel builds (make -j) in this platform, or get a better
69410 +compiler."
69411 +
69412 +       $run $rm $removelist
69413 +       exit $EXIT_FAILURE
69414 +      fi
69415 +
69416 +      # Just move the object if needed
69417 +      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
69418 +       $show "$mv $output_obj $obj"
69419 +       if $run $mv $output_obj $obj; then :
69420 +       else
69421 +         error=$?
69422 +         $run $rm $removelist
69423 +         exit $error
69424 +       fi
69425 +      fi
69426 +
69427 +      # Append the name of the non-PIC object the libtool object file.
69428 +      # Only append if the libtool object file exists.
69429 +      test -z "$run" && cat >> ${libobj}T <<EOF
69430 +# Name of the non-PIC object.
69431 +non_pic_object='$objname'
69432 +
69433 +EOF
69434 +    else
69435 +      # Append the name of the non-PIC object the libtool object file.
69436 +      # Only append if the libtool object file exists.
69437 +      test -z "$run" && cat >> ${libobj}T <<EOF
69438 +# Name of the non-PIC object.
69439 +non_pic_object=none
69440 +
69441 +EOF
69442 +    fi
69443 +
69444 +    $run $mv "${libobj}T" "${libobj}"
69445 +
69446 +    # Unlock the critical section if it was locked
69447 +    if test "$need_locks" != no; then
69448 +      $run $rm "$lockfile"
69449 +    fi
69450 +
69451 +    exit $EXIT_SUCCESS
69452 +    ;;
69453 +
69454 +  # libtool link mode
69455 +  link | relink)
69456 +    modename="$modename: link"
69457 +    case $host in
69458 +    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
69459 +      # It is impossible to link a dll without this setting, and
69460 +      # we shouldn't force the makefile maintainer to figure out
69461 +      # which system we are compiling for in order to pass an extra
69462 +      # flag for every libtool invocation.
69463 +      # allow_undefined=no
69464 +
69465 +      # FIXME: Unfortunately, there are problems with the above when trying
69466 +      # to make a dll which has undefined symbols, in which case not
69467 +      # even a static library is built.  For now, we need to specify
69468 +      # -no-undefined on the libtool link line when we can be certain
69469 +      # that all symbols are satisfied, otherwise we get a static library.
69470 +      allow_undefined=yes
69471 +      ;;
69472 +    *)
69473 +      allow_undefined=yes
69474 +      ;;
69475 +    esac
69476 +    libtool_args="$nonopt"
69477 +    base_compile="$nonopt $@"
69478 +    compile_command="$nonopt"
69479 +    finalize_command="$nonopt"
69480 +
69481 +    compile_rpath=
69482 +    finalize_rpath=
69483 +    compile_shlibpath=
69484 +    finalize_shlibpath=
69485 +    convenience=
69486 +    old_convenience=
69487 +    deplibs=
69488 +    old_deplibs=
69489 +    compiler_flags=
69490 +    linker_flags=
69491 +    dllsearchpath=
69492 +    lib_search_path=`pwd`
69493 +    inst_prefix_dir=
69494 +
69495 +    avoid_version=no
69496 +    dlfiles=
69497 +    dlprefiles=
69498 +    dlself=no
69499 +    export_dynamic=no
69500 +    export_symbols=
69501 +    export_symbols_regex=
69502 +    generated=
69503 +    libobjs=
69504 +    ltlibs=
69505 +    module=no
69506 +    no_install=no
69507 +    objs=
69508 +    non_pic_objects=
69509 +    precious_files_regex=
69510 +    prefer_static_libs=no
69511 +    preload=no
69512 +    prev=
69513 +    prevarg=
69514 +    release=
69515 +    rpath=
69516 +    xrpath=
69517 +    perm_rpath=
69518 +    temp_rpath=
69519 +    thread_safe=no
69520 +    vinfo=
69521 +    vinfo_number=no
69522 +
69523 +    func_infer_tag $base_compile
69524 +
69525 +    # We need to know -static, to get the right output filenames.
69526 +    for arg
69527 +    do
69528 +      case $arg in
69529 +      -all-static | -static)
69530 +       if test "X$arg" = "X-all-static"; then
69531 +         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
69532 +           $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
69533 +         fi
69534 +         if test -n "$link_static_flag"; then
69535 +           dlopen_self=$dlopen_self_static
69536 +         fi
69537 +       else
69538 +         if test -z "$pic_flag" && test -n "$link_static_flag"; then
69539 +           dlopen_self=$dlopen_self_static
69540 +         fi
69541 +       fi
69542 +       build_libtool_libs=no
69543 +       build_old_libs=yes
69544 +       prefer_static_libs=yes
69545 +       break
69546 +       ;;
69547 +      esac
69548 +    done
69549 +
69550 +    # See if our shared archives depend on static archives.
69551 +    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
69552 +
69553 +    # Go through the arguments, transforming them on the way.
69554 +    while test "$#" -gt 0; do
69555 +      arg="$1"
69556 +      shift
69557 +      case $arg in
69558 +      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
69559 +       qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
69560 +       ;;
69561 +      *) qarg=$arg ;;
69562 +      esac
69563 +      libtool_args="$libtool_args $qarg"
69564 +
69565 +      # If the previous option needs an argument, assign it.
69566 +      if test -n "$prev"; then
69567 +       case $prev in
69568 +       output)
69569 +         compile_command="$compile_command @OUTPUT@"
69570 +         finalize_command="$finalize_command @OUTPUT@"
69571 +         ;;
69572 +       esac
69573 +
69574 +       case $prev in
69575 +       dlfiles|dlprefiles)
69576 +         if test "$preload" = no; then
69577 +           # Add the symbol object into the linking commands.
69578 +           compile_command="$compile_command @SYMFILE@"
69579 +           finalize_command="$finalize_command @SYMFILE@"
69580 +           preload=yes
69581 +         fi
69582 +         case $arg in
69583 +         *.la | *.lo) ;;  # We handle these cases below.
69584 +         force)
69585 +           if test "$dlself" = no; then
69586 +             dlself=needless
69587 +             export_dynamic=yes
69588 +           fi
69589 +           prev=
69590 +           continue
69591 +           ;;
69592 +         self)
69593 +           if test "$prev" = dlprefiles; then
69594 +             dlself=yes
69595 +           elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
69596 +             dlself=yes
69597 +           else
69598 +             dlself=needless
69599 +             export_dynamic=yes
69600 +           fi
69601 +           prev=
69602 +           continue
69603 +           ;;
69604 +         *)
69605 +           if test "$prev" = dlfiles; then
69606 +             dlfiles="$dlfiles $arg"
69607 +           else
69608 +             dlprefiles="$dlprefiles $arg"
69609 +           fi
69610 +           prev=
69611 +           continue
69612 +           ;;
69613 +         esac
69614 +         ;;
69615 +       expsyms)
69616 +         export_symbols="$arg"
69617 +         if test ! -f "$arg"; then
69618 +           $echo "$modename: symbol file \`$arg' does not exist"
69619 +           exit $EXIT_FAILURE
69620 +         fi
69621 +         prev=
69622 +         continue
69623 +         ;;
69624 +       expsyms_regex)
69625 +         export_symbols_regex="$arg"
69626 +         prev=
69627 +         continue
69628 +         ;;
69629 +       inst_prefix)
69630 +         inst_prefix_dir="$arg"
69631 +         prev=
69632 +         continue
69633 +         ;;
69634 +       precious_regex)
69635 +         precious_files_regex="$arg"
69636 +         prev=
69637 +         continue
69638 +         ;;
69639 +       release)
69640 +         release="-$arg"
69641 +         prev=
69642 +         continue
69643 +         ;;
69644 +       objectlist)
69645 +         if test -f "$arg"; then
69646 +           save_arg=$arg
69647 +           moreargs=
69648 +           for fil in `cat $save_arg`
69649 +           do
69650 +#            moreargs="$moreargs $fil"
69651 +             arg=$fil
69652 +             # A libtool-controlled object.
69653 +
69654 +             # Check to see that this really is a libtool object.
69655 +             if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
69656 +               pic_object=
69657 +               non_pic_object=
69658 +
69659 +               # Read the .lo file
69660 +               # If there is no directory component, then add one.
69661 +               case $arg in
69662 +               */* | *\\*) . $arg ;;
69663 +               *) . ./$arg ;;
69664 +               esac
69665 +
69666 +               if test -z "$pic_object" || \
69667 +                  test -z "$non_pic_object" ||
69668 +                  test "$pic_object" = none && \
69669 +                  test "$non_pic_object" = none; then
69670 +                 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
69671 +                 exit $EXIT_FAILURE
69672 +               fi
69673 +
69674 +               # Extract subdirectory from the argument.
69675 +               xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
69676 +               if test "X$xdir" = "X$arg"; then
69677 +                 xdir=
69678 +               else
69679 +                 xdir="$xdir/"
69680 +               fi
69681 +
69682 +               if test "$pic_object" != none; then
69683 +                 # Prepend the subdirectory the object is found in.
69684 +                 pic_object="$xdir$pic_object"
69685 +
69686 +                 if test "$prev" = dlfiles; then
69687 +                   if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
69688 +                     dlfiles="$dlfiles $pic_object"
69689 +                     prev=
69690 +                     continue
69691 +                   else
69692 +                     # If libtool objects are unsupported, then we need to preload.
69693 +                     prev=dlprefiles
69694 +                   fi
69695 +                 fi
69696 +
69697 +                 # CHECK ME:  I think I busted this.  -Ossama
69698 +                 if test "$prev" = dlprefiles; then
69699 +                   # Preload the old-style object.
69700 +                   dlprefiles="$dlprefiles $pic_object"
69701 +                   prev=
69702 +                 fi
69703 +
69704 +                 # A PIC object.
69705 +                 libobjs="$libobjs $pic_object"
69706 +                 arg="$pic_object"
69707 +               fi
69708 +
69709 +               # Non-PIC object.
69710 +               if test "$non_pic_object" != none; then
69711 +                 # Prepend the subdirectory the object is found in.
69712 +                 non_pic_object="$xdir$non_pic_object"
69713 +
69714 +                 # A standard non-PIC object
69715 +                 non_pic_objects="$non_pic_objects $non_pic_object"
69716 +                 if test -z "$pic_object" || test "$pic_object" = none ; then
69717 +                   arg="$non_pic_object"
69718 +                 fi
69719 +               fi
69720 +             else
69721 +               # Only an error if not doing a dry-run.
69722 +               if test -z "$run"; then
69723 +                 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
69724 +                 exit $EXIT_FAILURE
69725 +               else
69726 +                 # Dry-run case.
69727 +
69728 +                 # Extract subdirectory from the argument.
69729 +                 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
69730 +                 if test "X$xdir" = "X$arg"; then
69731 +                   xdir=
69732 +                 else
69733 +                   xdir="$xdir/"
69734 +                 fi
69735 +
69736 +                 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
69737 +                 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
69738 +                 libobjs="$libobjs $pic_object"
69739 +                 non_pic_objects="$non_pic_objects $non_pic_object"
69740 +               fi
69741 +             fi
69742 +           done
69743 +         else
69744 +           $echo "$modename: link input file \`$save_arg' does not exist"
69745 +           exit $EXIT_FAILURE
69746 +         fi
69747 +         arg=$save_arg
69748 +         prev=
69749 +         continue
69750 +         ;;
69751 +       rpath | xrpath)
69752 +         # We need an absolute path.
69753 +         case $arg in
69754 +         [\\/]* | [A-Za-z]:[\\/]*) ;;
69755 +         *)
69756 +           $echo "$modename: only absolute run-paths are allowed" 1>&2
69757 +           exit $EXIT_FAILURE
69758 +           ;;
69759 +         esac
69760 +         if test "$prev" = rpath; then
69761 +           case "$rpath " in
69762 +           *" $arg "*) ;;
69763 +           *) rpath="$rpath $arg" ;;
69764 +           esac
69765 +         else
69766 +           case "$xrpath " in
69767 +           *" $arg "*) ;;
69768 +           *) xrpath="$xrpath $arg" ;;
69769 +           esac
69770 +         fi
69771 +         prev=
69772 +         continue
69773 +         ;;
69774 +       xcompiler)
69775 +         compiler_flags="$compiler_flags $qarg"
69776 +         prev=
69777 +         compile_command="$compile_command $qarg"
69778 +         finalize_command="$finalize_command $qarg"
69779 +         continue
69780 +         ;;
69781 +       xlinker)
69782 +         linker_flags="$linker_flags $qarg"
69783 +         compiler_flags="$compiler_flags $wl$qarg"
69784 +         prev=
69785 +         compile_command="$compile_command $wl$qarg"
69786 +         finalize_command="$finalize_command $wl$qarg"
69787 +         continue
69788 +         ;;
69789 +       xcclinker)
69790 +         linker_flags="$linker_flags $qarg"
69791 +         compiler_flags="$compiler_flags $qarg"
69792 +         prev=
69793 +         compile_command="$compile_command $qarg"
69794 +         finalize_command="$finalize_command $qarg"
69795 +         continue
69796 +         ;;
69797 +       shrext)
69798 +         shrext_cmds="$arg"
69799 +         prev=
69800 +         continue
69801 +         ;;
69802 +        darwin_framework)
69803 +         compiler_flags="$compiler_flags $arg"
69804 +         prev=
69805 +         continue
69806 +         ;;
69807 +       *)
69808 +         eval "$prev=\"\$arg\""
69809 +         prev=
69810 +         continue
69811 +         ;;
69812 +       esac
69813 +      fi # test -n "$prev"
69814 +
69815 +      prevarg="$arg"
69816 +
69817 +      case $arg in
69818 +      -all-static)
69819 +       if test -n "$link_static_flag"; then
69820 +         compile_command="$compile_command $link_static_flag"
69821 +         finalize_command="$finalize_command $link_static_flag"
69822 +       fi
69823 +       continue
69824 +       ;;
69825 +
69826 +      -allow-undefined)
69827 +       # FIXME: remove this flag sometime in the future.
69828 +       $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
69829 +       continue
69830 +       ;;
69831 +
69832 +      -avoid-version)
69833 +       avoid_version=yes
69834 +       continue
69835 +       ;;
69836 +
69837 +      -dlopen)
69838 +       prev=dlfiles
69839 +       continue
69840 +       ;;
69841 +
69842 +      -dlpreopen)
69843 +       prev=dlprefiles
69844 +       continue
69845 +       ;;
69846 +
69847 +      -export-dynamic)
69848 +       export_dynamic=yes
69849 +       continue
69850 +       ;;
69851 +
69852 +      -export-symbols | -export-symbols-regex)
69853 +       if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
69854 +         $echo "$modename: more than one -exported-symbols argument is not allowed"
69855 +         exit $EXIT_FAILURE
69856 +       fi
69857 +       if test "X$arg" = "X-export-symbols"; then
69858 +         prev=expsyms
69859 +       else
69860 +         prev=expsyms_regex
69861 +       fi
69862 +       continue
69863 +       ;;
69864 +
69865 +      -framework)
69866 +        prev=darwin_framework
69867 +        compiler_flags="$compiler_flags $arg"
69868 +        continue
69869 +        ;;
69870 +
69871 +      -inst-prefix-dir)
69872 +       prev=inst_prefix
69873 +       continue
69874 +       ;;
69875 +
69876 +      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
69877 +      # so, if we see these flags be careful not to treat them like -L
69878 +      -L[A-Z][A-Z]*:*)
69879 +       case $with_gcc/$host in
69880 +       no/*-*-irix* | /*-*-irix*)
69881 +         compile_command="$compile_command $arg"
69882 +         finalize_command="$finalize_command $arg"
69883 +         ;;
69884 +       esac
69885 +       continue
69886 +       ;;
69887 +
69888 +      -L*)
69889 +       dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
69890 +       # We need an absolute path.
69891 +       case $dir in
69892 +       [\\/]* | [A-Za-z]:[\\/]*) ;;
69893 +       *)
69894 +         absdir=`cd "$dir" && pwd`
69895 +         if test -z "$absdir"; then
69896 +           $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
69897 +           exit $EXIT_FAILURE
69898 +         fi
69899 +         dir="$absdir"
69900 +         ;;
69901 +       esac
69902 +       case "$deplibs " in
69903 +       *" -L$dir "*) ;;
69904 +       *)
69905 +         deplibs="$deplibs -L$dir"
69906 +         lib_search_path="$lib_search_path $dir"
69907 +         ;;
69908 +       esac
69909 +       case $host in
69910 +       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
69911 +         case :$dllsearchpath: in
69912 +         *":$dir:"*) ;;
69913 +         *) dllsearchpath="$dllsearchpath:$dir";;
69914 +         esac
69915 +         ;;
69916 +       esac
69917 +       continue
69918 +       ;;
69919 +
69920 +      -l*)
69921 +       if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
69922 +         case $host in
69923 +         *-*-cygwin* | *-*-pw32* | *-*-beos*)
69924 +           # These systems don't actually have a C or math library (as such)
69925 +           continue
69926 +           ;;
69927 +         *-*-mingw* | *-*-os2*)
69928 +           # These systems don't actually have a C library (as such)
69929 +           test "X$arg" = "X-lc" && continue
69930 +           ;;
69931 +         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
69932 +           # Do not include libc due to us having libc/libc_r.
69933 +           test "X$arg" = "X-lc" && continue
69934 +           ;;
69935 +         *-*-rhapsody* | *-*-darwin1.[012])
69936 +           # Rhapsody C and math libraries are in the System framework
69937 +           deplibs="$deplibs -framework System"
69938 +           continue
69939 +         esac
69940 +       elif test "X$arg" = "X-lc_r"; then
69941 +        case $host in
69942 +        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
69943 +          # Do not include libc_r directly, use -pthread flag.
69944 +          continue
69945 +          ;;
69946 +        esac
69947 +       fi
69948 +       deplibs="$deplibs $arg"
69949 +       continue
69950 +       ;;
69951 +
69952 +      # Tru64 UNIX uses -model [arg] to determine the layout of C++
69953 +      # classes, name mangling, and exception handling.
69954 +      -model)
69955 +       compile_command="$compile_command $arg"
69956 +       compiler_flags="$compiler_flags $arg"
69957 +       finalize_command="$finalize_command $arg"
69958 +       prev=xcompiler
69959 +       continue
69960 +       ;;
69961 +
69962 +     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
69963 +       compiler_flags="$compiler_flags $arg"
69964 +       compile_command="$compile_command $arg"
69965 +       finalize_command="$finalize_command $arg"
69966 +       continue
69967 +       ;;
69968 +
69969 +      -module)
69970 +       module=yes
69971 +       continue
69972 +       ;;
69973 +
69974 +      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
69975 +      # -r[0-9][0-9]* specifies the processor on the SGI compiler
69976 +      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
69977 +      # +DA*, +DD* enable 64-bit mode on the HP compiler
69978 +      # -q* pass through compiler args for the IBM compiler
69979 +      # -m* pass through architecture-specific compiler args for GCC
69980 +      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
69981 +
69982 +       # Unknown arguments in both finalize_command and compile_command need
69983 +       # to be aesthetically quoted because they are evaled later.
69984 +       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
69985 +       case $arg in
69986 +       *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
69987 +         arg="\"$arg\""
69988 +         ;;
69989 +       esac
69990 +        compile_command="$compile_command $arg"
69991 +        finalize_command="$finalize_command $arg"
69992 +        if test "$with_gcc" = "yes" ; then
69993 +          compiler_flags="$compiler_flags $arg"
69994 +        fi
69995 +        continue
69996 +        ;;
69997 +
69998 +      -shrext)
69999 +       prev=shrext
70000 +       continue
70001 +       ;;
70002 +
70003 +      -no-fast-install)
70004 +       fast_install=no
70005 +       continue
70006 +       ;;
70007 +
70008 +      -no-install)
70009 +       case $host in
70010 +       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
70011 +         # The PATH hackery in wrapper scripts is required on Windows
70012 +         # in order for the loader to find any dlls it needs.
70013 +         $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
70014 +         $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
70015 +         fast_install=no
70016 +         ;;
70017 +       *) no_install=yes ;;
70018 +       esac
70019 +       continue
70020 +       ;;
70021 +
70022 +      -no-undefined)
70023 +       allow_undefined=no
70024 +       continue
70025 +       ;;
70026 +
70027 +      -objectlist)
70028 +       prev=objectlist
70029 +       continue
70030 +       ;;
70031 +
70032 +      -o) prev=output ;;
70033 +
70034 +      -precious-files-regex)
70035 +       prev=precious_regex
70036 +       continue
70037 +       ;;
70038 +
70039 +      -release)
70040 +       prev=release
70041 +       continue
70042 +       ;;
70043 +
70044 +      -rpath)
70045 +       prev=rpath
70046 +       continue
70047 +       ;;
70048 +
70049 +      -R)
70050 +       prev=xrpath
70051 +       continue
70052 +       ;;
70053 +
70054 +      -R*)
70055 +       dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
70056 +       # We need an absolute path.
70057 +       case $dir in
70058 +       [\\/]* | [A-Za-z]:[\\/]*) ;;
70059 +       *)
70060 +         $echo "$modename: only absolute run-paths are allowed" 1>&2
70061 +         exit $EXIT_FAILURE
70062 +         ;;
70063 +       esac
70064 +       case "$xrpath " in
70065 +       *" $dir "*) ;;
70066 +       *) xrpath="$xrpath $dir" ;;
70067 +       esac
70068 +       continue
70069 +       ;;
70070 +
70071 +      -static)
70072 +       # The effects of -static are defined in a previous loop.
70073 +       # We used to do the same as -all-static on platforms that
70074 +       # didn't have a PIC flag, but the assumption that the effects
70075 +       # would be equivalent was wrong.  It would break on at least
70076 +       # Digital Unix and AIX.
70077 +       continue
70078 +       ;;
70079 +
70080 +      -thread-safe)
70081 +       thread_safe=yes
70082 +       continue
70083 +       ;;
70084 +
70085 +      -version-info)
70086 +       prev=vinfo
70087 +       continue
70088 +       ;;
70089 +      -version-number)
70090 +       prev=vinfo
70091 +       vinfo_number=yes
70092 +       continue
70093 +       ;;
70094 +
70095 +      -Wc,*)
70096 +       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
70097 +       arg=
70098 +       save_ifs="$IFS"; IFS=','
70099 +       for flag in $args; do
70100 +         IFS="$save_ifs"
70101 +         case $flag in
70102 +           *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
70103 +           flag="\"$flag\""
70104 +           ;;
70105 +         esac
70106 +         arg="$arg $wl$flag"
70107 +         compiler_flags="$compiler_flags $flag"
70108 +       done
70109 +       IFS="$save_ifs"
70110 +       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
70111 +       ;;
70112 +
70113 +      -Wl,*)
70114 +       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
70115 +       arg=
70116 +       save_ifs="$IFS"; IFS=','
70117 +       for flag in $args; do
70118 +         IFS="$save_ifs"
70119 +         case $flag in
70120 +           *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
70121 +           flag="\"$flag\""
70122 +           ;;
70123 +         esac
70124 +         arg="$arg $wl$flag"
70125 +         compiler_flags="$compiler_flags $wl$flag"
70126 +         linker_flags="$linker_flags $flag"
70127 +       done
70128 +       IFS="$save_ifs"
70129 +       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
70130 +       ;;
70131 +
70132 +      -Xcompiler)
70133 +       prev=xcompiler
70134 +       continue
70135 +       ;;
70136 +
70137 +      -Xlinker)
70138 +       prev=xlinker
70139 +       continue
70140 +       ;;
70141 +
70142 +      -XCClinker)
70143 +       prev=xcclinker
70144 +       continue
70145 +       ;;
70146 +
70147 +      # Some other compiler flag.
70148 +      -* | +*)
70149 +       # Unknown arguments in both finalize_command and compile_command need
70150 +       # to be aesthetically quoted because they are evaled later.
70151 +       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
70152 +       case $arg in
70153 +       *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
70154 +         arg="\"$arg\""
70155 +         ;;
70156 +       esac
70157 +       ;;
70158 +
70159 +      *.$objext)
70160 +       # A standard object.
70161 +       objs="$objs $arg"
70162 +       ;;
70163 +
70164 +      *.lo)
70165 +       # A libtool-controlled object.
70166 +
70167 +       # Check to see that this really is a libtool object.
70168 +       if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
70169 +         pic_object=
70170 +         non_pic_object=
70171 +
70172 +         # Read the .lo file
70173 +         # If there is no directory component, then add one.
70174 +         case $arg in
70175 +         */* | *\\*) . $arg ;;
70176 +         *) . ./$arg ;;
70177 +         esac
70178 +
70179 +         if test -z "$pic_object" || \
70180 +            test -z "$non_pic_object" ||
70181 +            test "$pic_object" = none && \
70182 +            test "$non_pic_object" = none; then
70183 +           $echo "$modename: cannot find name of object for \`$arg'" 1>&2
70184 +           exit $EXIT_FAILURE
70185 +         fi
70186 +
70187 +         # Extract subdirectory from the argument.
70188 +         xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
70189 +         if test "X$xdir" = "X$arg"; then
70190 +           xdir=
70191 +         else
70192 +           xdir="$xdir/"
70193 +         fi
70194 +
70195 +         if test "$pic_object" != none; then
70196 +           # Prepend the subdirectory the object is found in.
70197 +           pic_object="$xdir$pic_object"
70198 +
70199 +           if test "$prev" = dlfiles; then
70200 +             if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
70201 +               dlfiles="$dlfiles $pic_object"
70202 +               prev=
70203 +               continue
70204 +             else
70205 +               # If libtool objects are unsupported, then we need to preload.
70206 +               prev=dlprefiles
70207 +             fi
70208 +           fi
70209 +
70210 +           # CHECK ME:  I think I busted this.  -Ossama
70211 +           if test "$prev" = dlprefiles; then
70212 +             # Preload the old-style object.
70213 +             dlprefiles="$dlprefiles $pic_object"
70214 +             prev=
70215 +           fi
70216 +
70217 +           # A PIC object.
70218 +           libobjs="$libobjs $pic_object"
70219 +           arg="$pic_object"
70220 +         fi
70221 +
70222 +         # Non-PIC object.
70223 +         if test "$non_pic_object" != none; then
70224 +           # Prepend the subdirectory the object is found in.
70225 +           non_pic_object="$xdir$non_pic_object"
70226 +
70227 +           # A standard non-PIC object
70228 +           non_pic_objects="$non_pic_objects $non_pic_object"
70229 +           if test -z "$pic_object" || test "$pic_object" = none ; then
70230 +             arg="$non_pic_object"
70231 +           fi
70232 +         fi
70233 +       else
70234 +         # Only an error if not doing a dry-run.
70235 +         if test -z "$run"; then
70236 +           $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
70237 +           exit $EXIT_FAILURE
70238 +         else
70239 +           # Dry-run case.
70240 +
70241 +           # Extract subdirectory from the argument.
70242 +           xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
70243 +           if test "X$xdir" = "X$arg"; then
70244 +             xdir=
70245 +           else
70246 +             xdir="$xdir/"
70247 +           fi
70248 +
70249 +           pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
70250 +           non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
70251 +           libobjs="$libobjs $pic_object"
70252 +           non_pic_objects="$non_pic_objects $non_pic_object"
70253 +         fi
70254 +       fi
70255 +       ;;
70256 +
70257 +      *.$libext)
70258 +       # An archive.
70259 +       deplibs="$deplibs $arg"
70260 +       old_deplibs="$old_deplibs $arg"
70261 +       continue
70262 +       ;;
70263 +
70264 +      *.la)
70265 +       # A libtool-controlled library.
70266 +
70267 +       if test "$prev" = dlfiles; then
70268 +         # This library was specified with -dlopen.
70269 +         dlfiles="$dlfiles $arg"
70270 +         prev=
70271 +       elif test "$prev" = dlprefiles; then
70272 +         # The library was specified with -dlpreopen.
70273 +         dlprefiles="$dlprefiles $arg"
70274 +         prev=
70275 +       else
70276 +         deplibs="$deplibs $arg"
70277 +       fi
70278 +       continue
70279 +       ;;
70280 +
70281 +      # Some other compiler argument.
70282 +      *)
70283 +       # Unknown arguments in both finalize_command and compile_command need
70284 +       # to be aesthetically quoted because they are evaled later.
70285 +       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
70286 +       case $arg in
70287 +       *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
70288 +         arg="\"$arg\""
70289 +         ;;
70290 +       esac
70291 +       ;;
70292 +      esac # arg
70293 +
70294 +      # Now actually substitute the argument into the commands.
70295 +      if test -n "$arg"; then
70296 +       compile_command="$compile_command $arg"
70297 +       finalize_command="$finalize_command $arg"
70298 +      fi
70299 +    done # argument parsing loop
70300 +
70301 +    if test -n "$prev"; then
70302 +      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
70303 +      $echo "$help" 1>&2
70304 +      exit $EXIT_FAILURE
70305 +    fi
70306 +
70307 +    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
70308 +      eval arg=\"$export_dynamic_flag_spec\"
70309 +      compile_command="$compile_command $arg"
70310 +      finalize_command="$finalize_command $arg"
70311 +    fi
70312 +
70313 +    oldlibs=
70314 +    # calculate the name of the file, without its directory
70315 +    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
70316 +    libobjs_save="$libobjs"
70317 +
70318 +    if test -n "$shlibpath_var"; then
70319 +      # get the directories listed in $shlibpath_var
70320 +      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
70321 +    else
70322 +      shlib_search_path=
70323 +    fi
70324 +    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
70325 +    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
70326 +
70327 +    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
70328 +    if test "X$output_objdir" = "X$output"; then
70329 +      output_objdir="$objdir"
70330 +    else
70331 +      output_objdir="$output_objdir/$objdir"
70332 +    fi
70333 +    # Create the object directory.
70334 +    if test ! -d "$output_objdir"; then
70335 +      $show "$mkdir $output_objdir"
70336 +      $run $mkdir $output_objdir
70337 +      status=$?
70338 +      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
70339 +       exit $status
70340 +      fi
70341 +    fi
70342 +
70343 +    # Determine the type of output
70344 +    case $output in
70345 +    "")
70346 +      $echo "$modename: you must specify an output file" 1>&2
70347 +      $echo "$help" 1>&2
70348 +      exit $EXIT_FAILURE
70349 +      ;;
70350 +    *.$libext) linkmode=oldlib ;;
70351 +    *.lo | *.$objext) linkmode=obj ;;
70352 +    *.la) linkmode=lib ;;
70353 +    *) linkmode=prog ;; # Anything else should be a program.
70354 +    esac
70355 +
70356 +    case $host in
70357 +    *cygwin* | *mingw* | *pw32*)
70358 +      # don't eliminate duplications in $postdeps and $predeps
70359 +      duplicate_compiler_generated_deps=yes
70360 +      ;;
70361 +    *)
70362 +      duplicate_compiler_generated_deps=$duplicate_deps
70363 +      ;;
70364 +    esac
70365 +    specialdeplibs=
70366 +
70367 +    libs=
70368 +    # Find all interdependent deplibs by searching for libraries
70369 +    # that are linked more than once (e.g. -la -lb -la)
70370 +    for deplib in $deplibs; do
70371 +      if test "X$duplicate_deps" = "Xyes" ; then
70372 +       case "$libs " in
70373 +       *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
70374 +       esac
70375 +      fi
70376 +      libs="$libs $deplib"
70377 +    done
70378 +
70379 +    if test "$linkmode" = lib; then
70380 +      libs="$predeps $libs $compiler_lib_search_path $postdeps"
70381 +
70382 +      # Compute libraries that are listed more than once in $predeps
70383 +      # $postdeps and mark them as special (i.e., whose duplicates are
70384 +      # not to be eliminated).
70385 +      pre_post_deps=
70386 +      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
70387 +       for pre_post_dep in $predeps $postdeps; do
70388 +         case "$pre_post_deps " in
70389 +         *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
70390 +         esac
70391 +         pre_post_deps="$pre_post_deps $pre_post_dep"
70392 +       done
70393 +      fi
70394 +      pre_post_deps=
70395 +    fi
70396 +
70397 +    deplibs=
70398 +    newdependency_libs=
70399 +    newlib_search_path=
70400 +    need_relink=no # whether we're linking any uninstalled libtool libraries
70401 +    notinst_deplibs= # not-installed libtool libraries
70402 +    notinst_path= # paths that contain not-installed libtool libraries
70403 +    case $linkmode in
70404 +    lib)
70405 +       passes="conv link"
70406 +       for file in $dlfiles $dlprefiles; do
70407 +         case $file in
70408 +         *.la) ;;
70409 +         *)
70410 +           $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
70411 +           exit $EXIT_FAILURE
70412 +           ;;
70413 +         esac
70414 +       done
70415 +       ;;
70416 +    prog)
70417 +       compile_deplibs=
70418 +       finalize_deplibs=
70419 +       alldeplibs=no
70420 +       newdlfiles=
70421 +       newdlprefiles=
70422 +       passes="conv scan dlopen dlpreopen link"
70423 +       ;;
70424 +    *)  passes="conv"
70425 +       ;;
70426 +    esac
70427 +    for pass in $passes; do
70428 +      if test "$linkmode,$pass" = "lib,link" ||
70429 +        test "$linkmode,$pass" = "prog,scan"; then
70430 +       libs="$deplibs"
70431 +       deplibs=
70432 +      fi
70433 +      if test "$linkmode" = prog; then
70434 +       case $pass in
70435 +       dlopen) libs="$dlfiles" ;;
70436 +       dlpreopen) libs="$dlprefiles" ;;
70437 +       link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
70438 +       esac
70439 +      fi
70440 +      if test "$pass" = dlopen; then
70441 +       # Collect dlpreopened libraries
70442 +       save_deplibs="$deplibs"
70443 +       deplibs=
70444 +      fi
70445 +      for deplib in $libs; do
70446 +       lib=
70447 +       found=no
70448 +       case $deplib in
70449 +       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
70450 +         if test "$linkmode,$pass" = "prog,link"; then
70451 +           compile_deplibs="$deplib $compile_deplibs"
70452 +           finalize_deplibs="$deplib $finalize_deplibs"
70453 +         else
70454 +           compiler_flags="$compiler_flags $deplib"
70455 +         fi
70456 +         continue
70457 +         ;;
70458 +       -l*)
70459 +         if test "$linkmode" != lib && test "$linkmode" != prog; then
70460 +           $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
70461 +           continue
70462 +         fi
70463 +         name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
70464 +         for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
70465 +           for search_ext in .la $std_shrext .so .a; do
70466 +             # Search the libtool library
70467 +             lib="$searchdir/lib${name}${search_ext}"
70468 +             if test -f "$lib"; then
70469 +               if test "$search_ext" = ".la"; then
70470 +                 found=yes
70471 +               else
70472 +                 found=no
70473 +               fi
70474 +               break 2
70475 +             fi
70476 +           done
70477 +         done
70478 +         if test "$found" != yes; then
70479 +           # deplib doesn't seem to be a libtool library
70480 +           if test "$linkmode,$pass" = "prog,link"; then
70481 +             compile_deplibs="$deplib $compile_deplibs"
70482 +             finalize_deplibs="$deplib $finalize_deplibs"
70483 +           else
70484 +             deplibs="$deplib $deplibs"
70485 +             test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
70486 +           fi
70487 +           continue
70488 +         else # deplib is a libtool library
70489 +           # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
70490 +           # We need to do some special things here, and not later.
70491 +           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
70492 +             case " $predeps $postdeps " in
70493 +             *" $deplib "*)
70494 +               if (${SED} -e '2q' $lib |
70495 +                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
70496 +                 library_names=
70497 +                 old_library=
70498 +                 case $lib in
70499 +                 */* | *\\*) . $lib ;;
70500 +                 *) . ./$lib ;;
70501 +                 esac
70502 +                 for l in $old_library $library_names; do
70503 +                   ll="$l"
70504 +                 done
70505 +                 if test "X$ll" = "X$old_library" ; then # only static version available
70506 +                   found=no
70507 +                   ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
70508 +                   test "X$ladir" = "X$lib" && ladir="."
70509 +                   lib=$ladir/$old_library
70510 +                   if test "$linkmode,$pass" = "prog,link"; then
70511 +                     compile_deplibs="$deplib $compile_deplibs"
70512 +                     finalize_deplibs="$deplib $finalize_deplibs"
70513 +                   else
70514 +                     deplibs="$deplib $deplibs"
70515 +                     test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
70516 +                   fi
70517 +                   continue
70518 +                 fi
70519 +               fi
70520 +               ;;
70521 +             *) ;;
70522 +             esac
70523 +           fi
70524 +         fi
70525 +         ;; # -l
70526 +       -L*)
70527 +         case $linkmode in
70528 +         lib)
70529 +           deplibs="$deplib $deplibs"
70530 +           test "$pass" = conv && continue
70531 +           newdependency_libs="$deplib $newdependency_libs"
70532 +           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
70533 +           ;;
70534 +         prog)
70535 +           if test "$pass" = conv; then
70536 +             deplibs="$deplib $deplibs"
70537 +             continue
70538 +           fi
70539 +           if test "$pass" = scan; then
70540 +             deplibs="$deplib $deplibs"
70541 +           else
70542 +             compile_deplibs="$deplib $compile_deplibs"
70543 +             finalize_deplibs="$deplib $finalize_deplibs"
70544 +           fi
70545 +           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
70546 +           ;;
70547 +         *)
70548 +           $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
70549 +           ;;
70550 +         esac # linkmode
70551 +         continue
70552 +         ;; # -L
70553 +       -R*)
70554 +         if test "$pass" = link; then
70555 +           dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
70556 +           # Make sure the xrpath contains only unique directories.
70557 +           case "$xrpath " in
70558 +           *" $dir "*) ;;
70559 +           *) xrpath="$xrpath $dir" ;;
70560 +           esac
70561 +         fi
70562 +         deplibs="$deplib $deplibs"
70563 +         continue
70564 +         ;;
70565 +       *.la) lib="$deplib" ;;
70566 +       *.$libext)
70567 +         if test "$pass" = conv; then
70568 +           deplibs="$deplib $deplibs"
70569 +           continue
70570 +         fi
70571 +         case $linkmode in
70572 +         lib)
70573 +           valid_a_lib=no
70574 +           case $deplibs_check_method in
70575 +             match_pattern*)
70576 +               set dummy $deplibs_check_method
70577 +               match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
70578 +               if eval $echo \"$deplib\" 2>/dev/null \
70579 +                   | $SED 10q \
70580 +                   | $EGREP "$match_pattern_regex" > /dev/null; then
70581 +                 valid_a_lib=yes
70582 +               fi
70583 +               ;;
70584 +             pass_all)
70585 +               valid_a_lib=yes
70586 +               ;;
70587 +            esac
70588 +           if test "$valid_a_lib" != yes; then
70589 +             $echo
70590 +             $echo "*** Warning: Trying to link with static lib archive $deplib."
70591 +             $echo "*** I have the capability to make that library automatically link in when"
70592 +             $echo "*** you link to this library.  But I can only do this if you have a"
70593 +             $echo "*** shared version of the library, which you do not appear to have"
70594 +             $echo "*** because the file extensions .$libext of this argument makes me believe"
70595 +             $echo "*** that it is just a static archive that I should not used here."
70596 +           else
70597 +             $echo
70598 +             $echo "*** Warning: Linking the shared library $output against the"
70599 +             $echo "*** static library $deplib is not portable!"
70600 +             deplibs="$deplib $deplibs"
70601 +           fi
70602 +           continue
70603 +           ;;
70604 +         prog)
70605 +           if test "$pass" != link; then
70606 +             deplibs="$deplib $deplibs"
70607 +           else
70608 +             compile_deplibs="$deplib $compile_deplibs"
70609 +             finalize_deplibs="$deplib $finalize_deplibs"
70610 +           fi
70611 +           continue
70612 +           ;;
70613 +         esac # linkmode
70614 +         ;; # *.$libext
70615 +       *.lo | *.$objext)
70616 +         if test "$pass" = conv; then
70617 +           deplibs="$deplib $deplibs"
70618 +         elif test "$linkmode" = prog; then
70619 +           if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
70620 +             # If there is no dlopen support or we're linking statically,
70621 +             # we need to preload.
70622 +             newdlprefiles="$newdlprefiles $deplib"
70623 +             compile_deplibs="$deplib $compile_deplibs"
70624 +             finalize_deplibs="$deplib $finalize_deplibs"
70625 +           else
70626 +             newdlfiles="$newdlfiles $deplib"
70627 +           fi
70628 +         fi
70629 +         continue
70630 +         ;;
70631 +       %DEPLIBS%)
70632 +         alldeplibs=yes
70633 +         continue
70634 +         ;;
70635 +       esac # case $deplib
70636 +       if test "$found" = yes || test -f "$lib"; then :
70637 +       else
70638 +         $echo "$modename: cannot find the library \`$lib'" 1>&2
70639 +         exit $EXIT_FAILURE
70640 +       fi
70641 +
70642 +       # Check to see that this really is a libtool archive.
70643 +       if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
70644 +       else
70645 +         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
70646 +         exit $EXIT_FAILURE
70647 +       fi
70648 +
70649 +       ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
70650 +       test "X$ladir" = "X$lib" && ladir="."
70651 +
70652 +       dlname=
70653 +       dlopen=
70654 +       dlpreopen=
70655 +       libdir=
70656 +       library_names=
70657 +       old_library=
70658 +       # If the library was installed with an old release of libtool,
70659 +       # it will not redefine variables installed, or shouldnotlink
70660 +       installed=yes
70661 +       shouldnotlink=no
70662 +       avoidtemprpath=
70663 +
70664 +
70665 +       # Read the .la file
70666 +       case $lib in
70667 +       */* | *\\*) . $lib ;;
70668 +       *) . ./$lib ;;
70669 +       esac
70670 +
70671 +       if test "$linkmode,$pass" = "lib,link" ||
70672 +          test "$linkmode,$pass" = "prog,scan" ||
70673 +          { test "$linkmode" != prog && test "$linkmode" != lib; }; then
70674 +         test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
70675 +         test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
70676 +       fi
70677 +
70678 +       if test "$pass" = conv; then
70679 +         # Only check for convenience libraries
70680 +         deplibs="$lib $deplibs"
70681 +         if test -z "$libdir"; then
70682 +           if test -z "$old_library"; then
70683 +             $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
70684 +             exit $EXIT_FAILURE
70685 +           fi
70686 +           # It is a libtool convenience library, so add in its objects.
70687 +           convenience="$convenience $ladir/$objdir/$old_library"
70688 +           old_convenience="$old_convenience $ladir/$objdir/$old_library"
70689 +           tmp_libs=
70690 +           for deplib in $dependency_libs; do
70691 +             deplibs="$deplib $deplibs"
70692 +              if test "X$duplicate_deps" = "Xyes" ; then
70693 +               case "$tmp_libs " in
70694 +               *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
70695 +               esac
70696 +              fi
70697 +             tmp_libs="$tmp_libs $deplib"
70698 +           done
70699 +         elif test "$linkmode" != prog && test "$linkmode" != lib; then
70700 +           $echo "$modename: \`$lib' is not a convenience library" 1>&2
70701 +           exit $EXIT_FAILURE
70702 +         fi
70703 +         continue
70704 +       fi # $pass = conv
70705 +
70706 +
70707 +       # Get the name of the library we link against.
70708 +       linklib=
70709 +       for l in $old_library $library_names; do
70710 +         linklib="$l"
70711 +       done
70712 +       if test -z "$linklib"; then
70713 +         $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
70714 +         exit $EXIT_FAILURE
70715 +       fi
70716 +
70717 +       # This library was specified with -dlopen.
70718 +       if test "$pass" = dlopen; then
70719 +         if test -z "$libdir"; then
70720 +           $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
70721 +           exit $EXIT_FAILURE
70722 +         fi
70723 +         if test -z "$dlname" ||
70724 +            test "$dlopen_support" != yes ||
70725 +            test "$build_libtool_libs" = no; then
70726 +           # If there is no dlname, no dlopen support or we're linking
70727 +           # statically, we need to preload.  We also need to preload any
70728 +           # dependent libraries so libltdl's deplib preloader doesn't
70729 +           # bomb out in the load deplibs phase.
70730 +           dlprefiles="$dlprefiles $lib $dependency_libs"
70731 +         else
70732 +           newdlfiles="$newdlfiles $lib"
70733 +         fi
70734 +         continue
70735 +       fi # $pass = dlopen
70736 +
70737 +       # We need an absolute path.
70738 +       case $ladir in
70739 +       [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
70740 +       *)
70741 +         abs_ladir=`cd "$ladir" && pwd`
70742 +         if test -z "$abs_ladir"; then
70743 +           $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
70744 +           $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
70745 +           abs_ladir="$ladir"
70746 +         fi
70747 +         ;;
70748 +       esac
70749 +       laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
70750 +
70751 +       # Find the relevant object directory and library name.
70752 +       if test "X$installed" = Xyes; then
70753 +         if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
70754 +           $echo "$modename: warning: library \`$lib' was moved." 1>&2
70755 +           dir="$ladir"
70756 +           absdir="$abs_ladir"
70757 +           libdir="$abs_ladir"
70758 +         else
70759 +           dir="$libdir"
70760 +           absdir="$libdir"
70761 +         fi
70762 +         test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
70763 +       else
70764 +         if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
70765 +           dir="$ladir"
70766 +           absdir="$abs_ladir"
70767 +           # Remove this search path later
70768 +           notinst_path="$notinst_path $abs_ladir"
70769 +         else
70770 +           dir="$ladir/$objdir"
70771 +           absdir="$abs_ladir/$objdir"
70772 +           # Remove this search path later
70773 +           notinst_path="$notinst_path $abs_ladir"
70774 +         fi
70775 +       fi # $installed = yes
70776 +       name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
70777 +
70778 +       # This library was specified with -dlpreopen.
70779 +       if test "$pass" = dlpreopen; then
70780 +         if test -z "$libdir"; then
70781 +           $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
70782 +           exit $EXIT_FAILURE
70783 +         fi
70784 +         # Prefer using a static library (so that no silly _DYNAMIC symbols
70785 +         # are required to link).
70786 +         if test -n "$old_library"; then
70787 +           newdlprefiles="$newdlprefiles $dir/$old_library"
70788 +         # Otherwise, use the dlname, so that lt_dlopen finds it.
70789 +         elif test -n "$dlname"; then
70790 +           newdlprefiles="$newdlprefiles $dir/$dlname"
70791 +         else
70792 +           newdlprefiles="$newdlprefiles $dir/$linklib"
70793 +         fi
70794 +       fi # $pass = dlpreopen
70795 +
70796 +       if test -z "$libdir"; then
70797 +         # Link the convenience library
70798 +         if test "$linkmode" = lib; then
70799 +           deplibs="$dir/$old_library $deplibs"
70800 +         elif test "$linkmode,$pass" = "prog,link"; then
70801 +           compile_deplibs="$dir/$old_library $compile_deplibs"
70802 +           finalize_deplibs="$dir/$old_library $finalize_deplibs"
70803 +         else
70804 +           deplibs="$lib $deplibs" # used for prog,scan pass
70805 +         fi
70806 +         continue
70807 +       fi
70808 +
70809 +
70810 +       if test "$linkmode" = prog && test "$pass" != link; then
70811 +         newlib_search_path="$newlib_search_path $ladir"
70812 +         deplibs="$lib $deplibs"
70813 +
70814 +         linkalldeplibs=no
70815 +         if test "$link_all_deplibs" != no || test -z "$library_names" ||
70816 +            test "$build_libtool_libs" = no; then
70817 +           linkalldeplibs=yes
70818 +         fi
70819 +
70820 +         tmp_libs=
70821 +         for deplib in $dependency_libs; do
70822 +           case $deplib in
70823 +           -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
70824 +           esac
70825 +           # Need to link against all dependency_libs?
70826 +           if test "$linkalldeplibs" = yes; then
70827 +             deplibs="$deplib $deplibs"
70828 +           else
70829 +             # Need to hardcode shared library paths
70830 +             # or/and link against static libraries
70831 +             newdependency_libs="$deplib $newdependency_libs"
70832 +           fi
70833 +           if test "X$duplicate_deps" = "Xyes" ; then
70834 +             case "$tmp_libs " in
70835 +             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
70836 +             esac
70837 +           fi
70838 +           tmp_libs="$tmp_libs $deplib"
70839 +         done # for deplib
70840 +         continue
70841 +       fi # $linkmode = prog...
70842 +
70843 +       if test "$linkmode,$pass" = "prog,link"; then
70844 +         if test -n "$library_names" &&
70845 +            { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
70846 +           # We need to hardcode the library path
70847 +           if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
70848 +             # Make sure the rpath contains only unique directories.
70849 +             case "$temp_rpath " in
70850 +             *" $dir "*) ;;
70851 +             *" $absdir "*) ;;
70852 +             *) temp_rpath="$temp_rpath $dir" ;;
70853 +             esac
70854 +           fi
70855 +
70856 +           # Hardcode the library path.
70857 +           # Skip directories that are in the system default run-time
70858 +           # search path.
70859 +           case " $sys_lib_dlsearch_path " in
70860 +           *" $absdir "*) ;;
70861 +           *)
70862 +             case "$compile_rpath " in
70863 +             *" $absdir "*) ;;
70864 +             *) compile_rpath="$compile_rpath $absdir"
70865 +             esac
70866 +             ;;
70867 +           esac
70868 +           case " $sys_lib_dlsearch_path " in
70869 +           *" $libdir "*) ;;
70870 +           *)
70871 +             case "$finalize_rpath " in
70872 +             *" $libdir "*) ;;
70873 +             *) finalize_rpath="$finalize_rpath $libdir"
70874 +             esac
70875 +             ;;
70876 +           esac
70877 +         fi # $linkmode,$pass = prog,link...
70878 +
70879 +         if test "$alldeplibs" = yes &&
70880 +            { test "$deplibs_check_method" = pass_all ||
70881 +              { test "$build_libtool_libs" = yes &&
70882 +                test -n "$library_names"; }; }; then
70883 +           # We only need to search for static libraries
70884 +           continue
70885 +         fi
70886 +       fi
70887 +
70888 +       link_static=no # Whether the deplib will be linked statically
70889 +       if test -n "$library_names" &&
70890 +          { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
70891 +         if test "$installed" = no; then
70892 +           notinst_deplibs="$notinst_deplibs $lib"
70893 +           need_relink=yes
70894 +         fi
70895 +         # This is a shared library
70896 +
70897 +         # Warn about portability, can't link against -module's on
70898 +         # some systems (darwin)
70899 +         if test "$shouldnotlink" = yes && test "$pass" = link ; then
70900 +           $echo
70901 +           if test "$linkmode" = prog; then
70902 +             $echo "*** Warning: Linking the executable $output against the loadable module"
70903 +           else
70904 +             $echo "*** Warning: Linking the shared library $output against the loadable module"
70905 +           fi
70906 +           $echo "*** $linklib is not portable!"
70907 +         fi
70908 +         if test "$linkmode" = lib &&
70909 +            test "$hardcode_into_libs" = yes; then
70910 +           # Hardcode the library path.
70911 +           # Skip directories that are in the system default run-time
70912 +           # search path.
70913 +           case " $sys_lib_dlsearch_path " in
70914 +           *" $absdir "*) ;;
70915 +           *)
70916 +             case "$compile_rpath " in
70917 +             *" $absdir "*) ;;
70918 +             *) compile_rpath="$compile_rpath $absdir"
70919 +             esac
70920 +             ;;
70921 +           esac
70922 +           case " $sys_lib_dlsearch_path " in
70923 +           *" $libdir "*) ;;
70924 +           *)
70925 +             case "$finalize_rpath " in
70926 +             *" $libdir "*) ;;
70927 +             *) finalize_rpath="$finalize_rpath $libdir"
70928 +             esac
70929 +             ;;
70930 +           esac
70931 +         fi
70932 +
70933 +         if test -n "$old_archive_from_expsyms_cmds"; then
70934 +           # figure out the soname
70935 +           set dummy $library_names
70936 +           realname="$2"
70937 +           shift; shift
70938 +           libname=`eval \\$echo \"$libname_spec\"`
70939 +           # use dlname if we got it. it's perfectly good, no?
70940 +           if test -n "$dlname"; then
70941 +             soname="$dlname"
70942 +           elif test -n "$soname_spec"; then
70943 +             # bleh windows
70944 +             case $host in
70945 +             *cygwin* | mingw*)
70946 +               major=`expr $current - $age`
70947 +               versuffix="-$major"
70948 +               ;;
70949 +             esac
70950 +             eval soname=\"$soname_spec\"
70951 +           else
70952 +             soname="$realname"
70953 +           fi
70954 +
70955 +           # Make a new name for the extract_expsyms_cmds to use
70956 +           soroot="$soname"
70957 +           soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
70958 +           newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
70959 +
70960 +           # If the library has no export list, then create one now
70961 +           if test -f "$output_objdir/$soname-def"; then :
70962 +           else
70963 +             $show "extracting exported symbol list from \`$soname'"
70964 +             save_ifs="$IFS"; IFS='~'
70965 +             cmds=$extract_expsyms_cmds
70966 +             for cmd in $cmds; do
70967 +               IFS="$save_ifs"
70968 +               eval cmd=\"$cmd\"
70969 +               $show "$cmd"
70970 +               $run eval "$cmd" || exit $?
70971 +             done
70972 +             IFS="$save_ifs"
70973 +           fi
70974 +
70975 +           # Create $newlib
70976 +           if test -f "$output_objdir/$newlib"; then :; else
70977 +             $show "generating import library for \`$soname'"
70978 +             save_ifs="$IFS"; IFS='~'
70979 +             cmds=$old_archive_from_expsyms_cmds
70980 +             for cmd in $cmds; do
70981 +               IFS="$save_ifs"
70982 +               eval cmd=\"$cmd\"
70983 +               $show "$cmd"
70984 +               $run eval "$cmd" || exit $?
70985 +             done
70986 +             IFS="$save_ifs"
70987 +           fi
70988 +           # make sure the library variables are pointing to the new library
70989 +           dir=$output_objdir
70990 +           linklib=$newlib
70991 +         fi # test -n "$old_archive_from_expsyms_cmds"
70992 +
70993 +         if test "$linkmode" = prog || test "$mode" != relink; then
70994 +           add_shlibpath=
70995 +           add_dir=
70996 +           add=
70997 +           lib_linked=yes
70998 +           case $hardcode_action in
70999 +           immediate | unsupported)
71000 +             if test "$hardcode_direct" = no; then
71001 +               add="$dir/$linklib"
71002 +               case $host in
71003 +                 *-*-sco3.2v5* ) add_dir="-L$dir" ;;
71004 +                 *-*-darwin* )
71005 +                   # if the lib is a module then we can not link against
71006 +                   # it, someone is ignoring the new warnings I added
71007 +                   if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
71008 +                     $echo "** Warning, lib $linklib is a module, not a shared library"
71009 +                     if test -z "$old_library" ; then
71010 +                       $echo
71011 +                       $echo "** And there doesn't seem to be a static archive available"
71012 +                       $echo "** The link will probably fail, sorry"
71013 +                     else
71014 +                       add="$dir/$old_library"
71015 +                     fi
71016 +                   fi
71017 +               esac
71018 +             elif test "$hardcode_minus_L" = no; then
71019 +               case $host in
71020 +               *-*-sunos*) add_shlibpath="$dir" ;;
71021 +               esac
71022 +               add_dir="-L$dir"
71023 +               add="-l$name"
71024 +             elif test "$hardcode_shlibpath_var" = no; then
71025 +               add_shlibpath="$dir"
71026 +               add="-l$name"
71027 +             else
71028 +               lib_linked=no
71029 +             fi
71030 +             ;;
71031 +           relink)
71032 +             if test "$hardcode_direct" = yes; then
71033 +               add="$dir/$linklib"
71034 +             elif test "$hardcode_minus_L" = yes; then
71035 +               add_dir="-L$dir"
71036 +               # Try looking first in the location we're being installed to.
71037 +               if test -n "$inst_prefix_dir"; then
71038 +                 case "$libdir" in
71039 +                   [\\/]*)
71040 +                     add_dir="$add_dir -L$inst_prefix_dir$libdir"
71041 +                     ;;
71042 +                 esac
71043 +               fi
71044 +               add="-l$name"
71045 +             elif test "$hardcode_shlibpath_var" = yes; then
71046 +               add_shlibpath="$dir"
71047 +               add="-l$name"
71048 +             else
71049 +               lib_linked=no
71050 +             fi
71051 +             ;;
71052 +           *) lib_linked=no ;;
71053 +           esac
71054 +
71055 +           if test "$lib_linked" != yes; then
71056 +             $echo "$modename: configuration error: unsupported hardcode properties"
71057 +             exit $EXIT_FAILURE
71058 +           fi
71059 +
71060 +           if test -n "$add_shlibpath"; then
71061 +             case :$compile_shlibpath: in
71062 +             *":$add_shlibpath:"*) ;;
71063 +             *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
71064 +             esac
71065 +           fi
71066 +           if test "$linkmode" = prog; then
71067 +             test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
71068 +             test -n "$add" && compile_deplibs="$add $compile_deplibs"
71069 +           else
71070 +             test -n "$add_dir" && deplibs="$add_dir $deplibs"
71071 +             test -n "$add" && deplibs="$add $deplibs"
71072 +             if test "$hardcode_direct" != yes && \
71073 +                test "$hardcode_minus_L" != yes && \
71074 +                test "$hardcode_shlibpath_var" = yes; then
71075 +               case :$finalize_shlibpath: in
71076 +               *":$libdir:"*) ;;
71077 +               *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
71078 +               esac
71079 +             fi
71080 +           fi
71081 +         fi
71082 +
71083 +         if test "$linkmode" = prog || test "$mode" = relink; then
71084 +           add_shlibpath=
71085 +           add_dir=
71086 +           add=
71087 +           # Finalize command for both is simple: just hardcode it.
71088 +           if test "$hardcode_direct" = yes; then
71089 +             add="$libdir/$linklib"
71090 +           elif test "$hardcode_minus_L" = yes; then
71091 +             add_dir="-L$libdir"
71092 +             add="-l$name"
71093 +           elif test "$hardcode_shlibpath_var" = yes; then
71094 +             case :$finalize_shlibpath: in
71095 +             *":$libdir:"*) ;;
71096 +             *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
71097 +             esac
71098 +             add="-l$name"
71099 +           elif test "$hardcode_automatic" = yes; then
71100 +             if test -n "$inst_prefix_dir" &&
71101 +                test -f "$inst_prefix_dir$libdir/$linklib" ; then
71102 +               add="$inst_prefix_dir$libdir/$linklib"
71103 +             else
71104 +               add="$libdir/$linklib"
71105 +             fi
71106 +           else
71107 +             # We cannot seem to hardcode it, guess we'll fake it.
71108 +             add_dir="-L$libdir"
71109 +             # Try looking first in the location we're being installed to.
71110 +             if test -n "$inst_prefix_dir"; then
71111 +               case "$libdir" in
71112 +                 [\\/]*)
71113 +                   add_dir="$add_dir -L$inst_prefix_dir$libdir"
71114 +                   ;;
71115 +               esac
71116 +             fi
71117 +             add="-l$name"
71118 +           fi
71119 +
71120 +           if test "$linkmode" = prog; then
71121 +             test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
71122 +             test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
71123 +           else
71124 +             test -n "$add_dir" && deplibs="$add_dir $deplibs"
71125 +             test -n "$add" && deplibs="$add $deplibs"
71126 +           fi
71127 +         fi
71128 +       elif test "$linkmode" = prog; then
71129 +         # Here we assume that one of hardcode_direct or hardcode_minus_L
71130 +         # is not unsupported.  This is valid on all known static and
71131 +         # shared platforms.
71132 +         if test "$hardcode_direct" != unsupported; then
71133 +           test -n "$old_library" && linklib="$old_library"
71134 +           compile_deplibs="$dir/$linklib $compile_deplibs"
71135 +           finalize_deplibs="$dir/$linklib $finalize_deplibs"
71136 +         else
71137 +           compile_deplibs="-l$name -L$dir $compile_deplibs"
71138 +           finalize_deplibs="-l$name -L$dir $finalize_deplibs"
71139 +         fi
71140 +       elif test "$build_libtool_libs" = yes; then
71141 +         # Not a shared library
71142 +         if test "$deplibs_check_method" != pass_all; then
71143 +           # We're trying link a shared library against a static one
71144 +           # but the system doesn't support it.
71145 +
71146 +           # Just print a warning and add the library to dependency_libs so
71147 +           # that the program can be linked against the static library.
71148 +           $echo
71149 +           $echo "*** Warning: This system can not link to static lib archive $lib."
71150 +           $echo "*** I have the capability to make that library automatically link in when"
71151 +           $echo "*** you link to this library.  But I can only do this if you have a"
71152 +           $echo "*** shared version of the library, which you do not appear to have."
71153 +           if test "$module" = yes; then
71154 +             $echo "*** But as you try to build a module library, libtool will still create "
71155 +             $echo "*** a static module, that should work as long as the dlopening application"
71156 +             $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
71157 +             if test -z "$global_symbol_pipe"; then
71158 +               $echo
71159 +               $echo "*** However, this would only work if libtool was able to extract symbol"
71160 +               $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
71161 +               $echo "*** not find such a program.  So, this module is probably useless."
71162 +               $echo "*** \`nm' from GNU binutils and a full rebuild may help."
71163 +             fi
71164 +             if test "$build_old_libs" = no; then
71165 +               build_libtool_libs=module
71166 +               build_old_libs=yes
71167 +             else
71168 +               build_libtool_libs=no
71169 +             fi
71170 +           fi
71171 +         else
71172 +           convenience="$convenience $dir/$old_library"
71173 +           old_convenience="$old_convenience $dir/$old_library"
71174 +           deplibs="$dir/$old_library $deplibs"
71175 +           link_static=yes
71176 +         fi
71177 +       fi # link shared/static library?
71178 +
71179 +       if test "$linkmode" = lib; then
71180 +         if test -n "$dependency_libs" &&
71181 +            { test "$hardcode_into_libs" != yes ||
71182 +              test "$build_old_libs" = yes ||
71183 +              test "$link_static" = yes; }; then
71184 +           # Extract -R from dependency_libs
71185 +           temp_deplibs=
71186 +           for libdir in $dependency_libs; do
71187 +             case $libdir in
71188 +             -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
71189 +                  case " $xrpath " in
71190 +                  *" $temp_xrpath "*) ;;
71191 +                  *) xrpath="$xrpath $temp_xrpath";;
71192 +                  esac;;
71193 +             *) temp_deplibs="$temp_deplibs $libdir";;
71194 +             esac
71195 +           done
71196 +           dependency_libs="$temp_deplibs"
71197 +         fi
71198 +
71199 +         newlib_search_path="$newlib_search_path $absdir"
71200 +         # Link against this library
71201 +         test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
71202 +         # ... and its dependency_libs
71203 +         tmp_libs=
71204 +         for deplib in $dependency_libs; do
71205 +           newdependency_libs="$deplib $newdependency_libs"
71206 +           if test "X$duplicate_deps" = "Xyes" ; then
71207 +             case "$tmp_libs " in
71208 +             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
71209 +             esac
71210 +           fi
71211 +           tmp_libs="$tmp_libs $deplib"
71212 +         done
71213 +
71214 +         if test "$link_all_deplibs" != no; then
71215 +           # Add the search paths of all dependency libraries
71216 +           for deplib in $dependency_libs; do
71217 +             case $deplib in
71218 +             -L*) path="$deplib" ;;
71219 +             *.la)
71220 +               dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
71221 +               test "X$dir" = "X$deplib" && dir="."
71222 +               # We need an absolute path.
71223 +               case $dir in
71224 +               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
71225 +               *)
71226 +                 absdir=`cd "$dir" && pwd`
71227 +                 if test -z "$absdir"; then
71228 +                   $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
71229 +                   absdir="$dir"
71230 +                 fi
71231 +                 ;;
71232 +               esac
71233 +               if grep "^installed=no" $deplib > /dev/null; then
71234 +                 path="$absdir/$objdir"
71235 +               else
71236 +                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
71237 +                 if test -z "$libdir"; then
71238 +                   $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
71239 +                   exit $EXIT_FAILURE
71240 +                 fi
71241 +                 if test "$absdir" != "$libdir"; then
71242 +                   $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
71243 +                 fi
71244 +                 path="$absdir"
71245 +               fi
71246 +               depdepl=
71247 +               case $host in
71248 +               *-*-darwin*)
71249 +                 # we do not want to link against static libs,
71250 +                 # but need to link against shared
71251 +                 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
71252 +                 if test -n "$deplibrary_names" ; then
71253 +                   for tmp in $deplibrary_names ; do
71254 +                     depdepl=$tmp
71255 +                   done
71256 +                   if test -f "$path/$depdepl" ; then
71257 +                     depdepl="$path/$depdepl"
71258 +                   fi
71259 +                   # do not add paths which are already there
71260 +                   case " $newlib_search_path " in
71261 +                   *" $path "*) ;;
71262 +                   *) newlib_search_path="$newlib_search_path $path";;
71263 +                   esac
71264 +                 fi
71265 +                 path=""
71266 +                 ;;
71267 +               *)
71268 +                 path="-L$path"
71269 +                 ;;
71270 +               esac
71271 +               ;;
71272 +             -l*)
71273 +               case $host in
71274 +               *-*-darwin*)
71275 +                 # Again, we only want to link against shared libraries
71276 +                 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
71277 +                 for tmp in $newlib_search_path ; do
71278 +                   if test -f "$tmp/lib$tmp_libs.dylib" ; then
71279 +                     eval depdepl="$tmp/lib$tmp_libs.dylib"
71280 +                     break
71281 +                   fi
71282 +                 done
71283 +                 path=""
71284 +                 ;;
71285 +               *) continue ;;
71286 +               esac
71287 +               ;;
71288 +             *) continue ;;
71289 +             esac
71290 +             case " $deplibs " in
71291 +             *" $depdepl "*) ;;
71292 +             *) deplibs="$depdepl $deplibs" ;;
71293 +             esac
71294 +             case " $deplibs " in
71295 +             *" $path "*) ;;
71296 +             *) deplibs="$deplibs $path" ;;
71297 +             esac
71298 +           done
71299 +         fi # link_all_deplibs != no
71300 +       fi # linkmode = lib
71301 +      done # for deplib in $libs
71302 +      dependency_libs="$newdependency_libs"
71303 +      if test "$pass" = dlpreopen; then
71304 +       # Link the dlpreopened libraries before other libraries
71305 +       for deplib in $save_deplibs; do
71306 +         deplibs="$deplib $deplibs"
71307 +       done
71308 +      fi
71309 +      if test "$pass" != dlopen; then
71310 +       if test "$pass" != conv; then
71311 +         # Make sure lib_search_path contains only unique directories.
71312 +         lib_search_path=
71313 +         for dir in $newlib_search_path; do
71314 +           case "$lib_search_path " in
71315 +           *" $dir "*) ;;
71316 +           *) lib_search_path="$lib_search_path $dir" ;;
71317 +           esac
71318 +         done
71319 +         newlib_search_path=
71320 +       fi
71321 +
71322 +       if test "$linkmode,$pass" != "prog,link"; then
71323 +         vars="deplibs"
71324 +       else
71325 +         vars="compile_deplibs finalize_deplibs"
71326 +       fi
71327 +       for var in $vars dependency_libs; do
71328 +         # Add libraries to $var in reverse order
71329 +         eval tmp_libs=\"\$$var\"
71330 +         new_libs=
71331 +         for deplib in $tmp_libs; do
71332 +           # FIXME: Pedantically, this is the right thing to do, so
71333 +           #        that some nasty dependency loop isn't accidentally
71334 +           #        broken:
71335 +           #new_libs="$deplib $new_libs"
71336 +           # Pragmatically, this seems to cause very few problems in
71337 +           # practice:
71338 +           case $deplib in
71339 +           -L*) new_libs="$deplib $new_libs" ;;
71340 +           -R*) ;;
71341 +           *)
71342 +             # And here is the reason: when a library appears more
71343 +             # than once as an explicit dependence of a library, or
71344 +             # is implicitly linked in more than once by the
71345 +             # compiler, it is considered special, and multiple
71346 +             # occurrences thereof are not removed.  Compare this
71347 +             # with having the same library being listed as a
71348 +             # dependency of multiple other libraries: in this case,
71349 +             # we know (pedantically, we assume) the library does not
71350 +             # need to be listed more than once, so we keep only the
71351 +             # last copy.  This is not always right, but it is rare
71352 +             # enough that we require users that really mean to play
71353 +             # such unportable linking tricks to link the library
71354 +             # using -Wl,-lname, so that libtool does not consider it
71355 +             # for duplicate removal.
71356 +             case " $specialdeplibs " in
71357 +             *" $deplib "*) new_libs="$deplib $new_libs" ;;
71358 +             *)
71359 +               case " $new_libs " in
71360 +               *" $deplib "*) ;;
71361 +               *) new_libs="$deplib $new_libs" ;;
71362 +               esac
71363 +               ;;
71364 +             esac
71365 +             ;;
71366 +           esac
71367 +         done
71368 +         tmp_libs=
71369 +         for deplib in $new_libs; do
71370 +           case $deplib in
71371 +           -L*)
71372 +             case " $tmp_libs " in
71373 +             *" $deplib "*) ;;
71374 +             *) tmp_libs="$tmp_libs $deplib" ;;
71375 +             esac
71376 +             ;;
71377 +           *) tmp_libs="$tmp_libs $deplib" ;;
71378 +           esac
71379 +         done
71380 +         eval $var=\"$tmp_libs\"
71381 +       done # for var
71382 +      fi
71383 +      # Last step: remove runtime libs from dependency_libs
71384 +      # (they stay in deplibs)
71385 +      tmp_libs=
71386 +      for i in $dependency_libs ; do
71387 +       case " $predeps $postdeps $compiler_lib_search_path " in
71388 +       *" $i "*)
71389 +         i=""
71390 +         ;;
71391 +       esac
71392 +       if test -n "$i" ; then
71393 +         tmp_libs="$tmp_libs $i"
71394 +       fi
71395 +      done
71396 +      dependency_libs=$tmp_libs
71397 +    done # for pass
71398 +    if test "$linkmode" = prog; then
71399 +      dlfiles="$newdlfiles"
71400 +      dlprefiles="$newdlprefiles"
71401 +    fi
71402 +
71403 +    case $linkmode in
71404 +    oldlib)
71405 +      if test -n "$deplibs"; then
71406 +       $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
71407 +      fi
71408 +
71409 +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
71410 +       $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
71411 +      fi
71412 +
71413 +      if test -n "$rpath"; then
71414 +       $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
71415 +      fi
71416 +
71417 +      if test -n "$xrpath"; then
71418 +       $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
71419 +      fi
71420 +
71421 +      if test -n "$vinfo"; then
71422 +       $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
71423 +      fi
71424 +
71425 +      if test -n "$release"; then
71426 +       $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
71427 +      fi
71428 +
71429 +      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
71430 +       $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
71431 +      fi
71432 +
71433 +      # Now set the variables for building old libraries.
71434 +      build_libtool_libs=no
71435 +      oldlibs="$output"
71436 +      objs="$objs$old_deplibs"
71437 +      ;;
71438 +
71439 +    lib)
71440 +      # Make sure we only generate libraries of the form `libNAME.la'.
71441 +      case $outputname in
71442 +      lib*)
71443 +       name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
71444 +       eval shared_ext=\"$shrext_cmds\"
71445 +       eval libname=\"$libname_spec\"
71446 +       ;;
71447 +      *)
71448 +       if test "$module" = no; then
71449 +         $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
71450 +         $echo "$help" 1>&2
71451 +         exit $EXIT_FAILURE
71452 +       fi
71453 +       if test "$need_lib_prefix" != no; then
71454 +         # Add the "lib" prefix for modules if required
71455 +         name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
71456 +         eval shared_ext=\"$shrext_cmds\"
71457 +         eval libname=\"$libname_spec\"
71458 +       else
71459 +         libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
71460 +       fi
71461 +       ;;
71462 +      esac
71463 +
71464 +      if test -n "$objs"; then
71465 +       if test "$deplibs_check_method" != pass_all; then
71466 +         $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
71467 +         exit $EXIT_FAILURE
71468 +       else
71469 +         $echo
71470 +         $echo "*** Warning: Linking the shared library $output against the non-libtool"
71471 +         $echo "*** objects $objs is not portable!"
71472 +         libobjs="$libobjs $objs"
71473 +       fi
71474 +      fi
71475 +
71476 +      if test "$dlself" != no; then
71477 +       $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
71478 +      fi
71479 +
71480 +      set dummy $rpath
71481 +      if test "$#" -gt 2; then
71482 +       $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
71483 +      fi
71484 +      install_libdir="$2"
71485 +
71486 +      oldlibs=
71487 +      if test -z "$rpath"; then
71488 +       if test "$build_libtool_libs" = yes; then
71489 +         # Building a libtool convenience library.
71490 +         # Some compilers have problems with a `.al' extension so
71491 +         # convenience libraries should have the same extension an
71492 +         # archive normally would.
71493 +         oldlibs="$output_objdir/$libname.$libext $oldlibs"
71494 +         build_libtool_libs=convenience
71495 +         build_old_libs=yes
71496 +       fi
71497 +
71498 +       if test -n "$vinfo"; then
71499 +         $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
71500 +       fi
71501 +
71502 +       if test -n "$release"; then
71503 +         $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
71504 +       fi
71505 +      else
71506 +
71507 +       # Parse the version information argument.
71508 +       save_ifs="$IFS"; IFS=':'
71509 +       set dummy $vinfo 0 0 0
71510 +       IFS="$save_ifs"
71511 +
71512 +       if test -n "$8"; then
71513 +         $echo "$modename: too many parameters to \`-version-info'" 1>&2
71514 +         $echo "$help" 1>&2
71515 +         exit $EXIT_FAILURE
71516 +       fi
71517 +
71518 +       # convert absolute version numbers to libtool ages
71519 +       # this retains compatibility with .la files and attempts
71520 +       # to make the code below a bit more comprehensible
71521 +
71522 +       case $vinfo_number in
71523 +       yes)
71524 +         number_major="$2"
71525 +         number_minor="$3"
71526 +         number_revision="$4"
71527 +         #
71528 +         # There are really only two kinds -- those that
71529 +         # use the current revision as the major version
71530 +         # and those that subtract age and use age as
71531 +         # a minor version.  But, then there is irix
71532 +         # which has an extra 1 added just for fun
71533 +         #
71534 +         case $version_type in
71535 +         darwin|linux|osf|windows)
71536 +           current=`expr $number_major + $number_minor`
71537 +           age="$number_minor"
71538 +           revision="$number_revision"
71539 +           ;;
71540 +         freebsd-aout|freebsd-elf|sunos)
71541 +           current="$number_major"
71542 +           revision="$number_minor"
71543 +           age="0"
71544 +           ;;
71545 +         irix|nonstopux)
71546 +           current=`expr $number_major + $number_minor - 1`
71547 +           age="$number_minor"
71548 +           revision="$number_minor"
71549 +           ;;
71550 +         esac
71551 +         ;;
71552 +       no)
71553 +         current="$2"
71554 +         revision="$3"
71555 +         age="$4"
71556 +         ;;
71557 +       esac
71558 +
71559 +       # Check that each of the things are valid numbers.
71560 +       case $current in
71561 +       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
71562 +       *)
71563 +         $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
71564 +         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
71565 +         exit $EXIT_FAILURE
71566 +         ;;
71567 +       esac
71568 +
71569 +       case $revision in
71570 +       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
71571 +       *)
71572 +         $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
71573 +         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
71574 +         exit $EXIT_FAILURE
71575 +         ;;
71576 +       esac
71577 +
71578 +       case $age in
71579 +       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
71580 +       *)
71581 +         $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
71582 +         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
71583 +         exit $EXIT_FAILURE
71584 +         ;;
71585 +       esac
71586 +
71587 +       if test "$age" -gt "$current"; then
71588 +         $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
71589 +         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
71590 +         exit $EXIT_FAILURE
71591 +       fi
71592 +
71593 +       # Calculate the version variables.
71594 +       major=
71595 +       versuffix=
71596 +       verstring=
71597 +       case $version_type in
71598 +       none) ;;
71599 +
71600 +       darwin)
71601 +         # Like Linux, but with the current version available in
71602 +         # verstring for coding it into the library header
71603 +         major=.`expr $current - $age`
71604 +         versuffix="$major.$age.$revision"
71605 +         # Darwin ld doesn't like 0 for these options...
71606 +         minor_current=`expr $current + 1`
71607 +         verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
71608 +         ;;
71609 +
71610 +       freebsd-aout)
71611 +         major=".$current"
71612 +         versuffix=".$current.$revision";
71613 +         ;;
71614 +
71615 +       freebsd-elf)
71616 +         major=".$current"
71617 +         versuffix=".$current";
71618 +         ;;
71619 +
71620 +       irix | nonstopux)
71621 +         major=`expr $current - $age + 1`
71622 +
71623 +         case $version_type in
71624 +           nonstopux) verstring_prefix=nonstopux ;;
71625 +           *)         verstring_prefix=sgi ;;
71626 +         esac
71627 +         verstring="$verstring_prefix$major.$revision"
71628 +
71629 +         # Add in all the interfaces that we are compatible with.
71630 +         loop=$revision
71631 +         while test "$loop" -ne 0; do
71632 +           iface=`expr $revision - $loop`
71633 +           loop=`expr $loop - 1`
71634 +           verstring="$verstring_prefix$major.$iface:$verstring"
71635 +         done
71636 +
71637 +         # Before this point, $major must not contain `.'.
71638 +         major=.$major
71639 +         versuffix="$major.$revision"
71640 +         ;;
71641 +
71642 +       linux)
71643 +         major=.`expr $current - $age`
71644 +         versuffix="$major.$age.$revision"
71645 +         ;;
71646 +
71647 +       osf)
71648 +         major=.`expr $current - $age`
71649 +         versuffix=".$current.$age.$revision"
71650 +         verstring="$current.$age.$revision"
71651 +
71652 +         # Add in all the interfaces that we are compatible with.
71653 +         loop=$age
71654 +         while test "$loop" -ne 0; do
71655 +           iface=`expr $current - $loop`
71656 +           loop=`expr $loop - 1`
71657 +           verstring="$verstring:${iface}.0"
71658 +         done
71659 +
71660 +         # Make executables depend on our current version.
71661 +         verstring="$verstring:${current}.0"
71662 +         ;;
71663 +
71664 +       sunos)
71665 +         major=".$current"
71666 +         versuffix=".$current.$revision"
71667 +         ;;
71668 +
71669 +       windows)
71670 +         # Use '-' rather than '.', since we only want one
71671 +         # extension on DOS 8.3 filesystems.
71672 +         major=`expr $current - $age`
71673 +         versuffix="-$major"
71674 +         ;;
71675 +
71676 +       *)
71677 +         $echo "$modename: unknown library version type \`$version_type'" 1>&2
71678 +         $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
71679 +         exit $EXIT_FAILURE
71680 +         ;;
71681 +       esac
71682 +
71683 +       # Clear the version info if we defaulted, and they specified a release.
71684 +       if test -z "$vinfo" && test -n "$release"; then
71685 +         major=
71686 +         case $version_type in
71687 +         darwin)
71688 +           # we can't check for "0.0" in archive_cmds due to quoting
71689 +           # problems, so we reset it completely
71690 +           verstring=
71691 +           ;;
71692 +         *)
71693 +           verstring="0.0"
71694 +           ;;
71695 +         esac
71696 +         if test "$need_version" = no; then
71697 +           versuffix=
71698 +         else
71699 +           versuffix=".0.0"
71700 +         fi
71701 +       fi
71702 +
71703 +       # Remove version info from name if versioning should be avoided
71704 +       if test "$avoid_version" = yes && test "$need_version" = no; then
71705 +         major=
71706 +         versuffix=
71707 +         verstring=""
71708 +       fi
71709 +
71710 +       # Check to see if the archive will have undefined symbols.
71711 +       if test "$allow_undefined" = yes; then
71712 +         if test "$allow_undefined_flag" = unsupported; then
71713 +           $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
71714 +           build_libtool_libs=no
71715 +           build_old_libs=yes
71716 +         fi
71717 +       else
71718 +         # Don't allow undefined symbols.
71719 +         allow_undefined_flag="$no_undefined_flag"
71720 +       fi
71721 +      fi
71722 +
71723 +      if test "$mode" != relink; then
71724 +       # Remove our outputs, but don't remove object files since they
71725 +       # may have been created when compiling PIC objects.
71726 +       removelist=
71727 +       tempremovelist=`$echo "$output_objdir/*"`
71728 +       for p in $tempremovelist; do
71729 +         case $p in
71730 +           *.$objext)
71731 +              ;;
71732 +           $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
71733 +              if test "X$precious_files_regex" != "X"; then
71734 +                if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
71735 +                then
71736 +                  continue
71737 +                fi
71738 +              fi
71739 +              removelist="$removelist $p"
71740 +              ;;
71741 +           *) ;;
71742 +         esac
71743 +       done
71744 +       if test -n "$removelist"; then
71745 +         $show "${rm}r $removelist"
71746 +         $run ${rm}r $removelist
71747 +       fi
71748 +      fi
71749 +
71750 +      # Now set the variables for building old libraries.
71751 +      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
71752 +       oldlibs="$oldlibs $output_objdir/$libname.$libext"
71753 +
71754 +       # Transform .lo files to .o files.
71755 +       oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
71756 +      fi
71757 +
71758 +      # Eliminate all temporary directories.
71759 +      for path in $notinst_path; do
71760 +       lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
71761 +       deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
71762 +       dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
71763 +      done
71764 +
71765 +      if test -n "$xrpath"; then
71766 +       # If the user specified any rpath flags, then add them.
71767 +       temp_xrpath=
71768 +       for libdir in $xrpath; do
71769 +         temp_xrpath="$temp_xrpath -R$libdir"
71770 +         case "$finalize_rpath " in
71771 +         *" $libdir "*) ;;
71772 +         *) finalize_rpath="$finalize_rpath $libdir" ;;
71773 +         esac
71774 +       done
71775 +       if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
71776 +         dependency_libs="$temp_xrpath $dependency_libs"
71777 +       fi
71778 +      fi
71779 +
71780 +      # Make sure dlfiles contains only unique files that won't be dlpreopened
71781 +      old_dlfiles="$dlfiles"
71782 +      dlfiles=
71783 +      for lib in $old_dlfiles; do
71784 +       case " $dlprefiles $dlfiles " in
71785 +       *" $lib "*) ;;
71786 +       *) dlfiles="$dlfiles $lib" ;;
71787 +       esac
71788 +      done
71789 +
71790 +      # Make sure dlprefiles contains only unique files
71791 +      old_dlprefiles="$dlprefiles"
71792 +      dlprefiles=
71793 +      for lib in $old_dlprefiles; do
71794 +       case "$dlprefiles " in
71795 +       *" $lib "*) ;;
71796 +       *) dlprefiles="$dlprefiles $lib" ;;
71797 +       esac
71798 +      done
71799 +
71800 +      if test "$build_libtool_libs" = yes; then
71801 +       if test -n "$rpath"; then
71802 +         case $host in
71803 +         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
71804 +           # these systems don't actually have a c library (as such)!
71805 +           ;;
71806 +         *-*-rhapsody* | *-*-darwin1.[012])
71807 +           # Rhapsody C library is in the System framework
71808 +           deplibs="$deplibs -framework System"
71809 +           ;;
71810 +         *-*-netbsd*)
71811 +           # Don't link with libc until the a.out ld.so is fixed.
71812 +           ;;
71813 +         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
71814 +           # Do not include libc due to us having libc/libc_r.
71815 +           test "X$arg" = "X-lc" && continue
71816 +           ;;
71817 +         *)
71818 +           # Add libc to deplibs on all other systems if necessary.
71819 +           if test "$build_libtool_need_lc" = "yes"; then
71820 +             deplibs="$deplibs -lc"
71821 +           fi
71822 +           ;;
71823 +         esac
71824 +       fi
71825 +
71826 +       # Transform deplibs into only deplibs that can be linked in shared.
71827 +       name_save=$name
71828 +       libname_save=$libname
71829 +       release_save=$release
71830 +       versuffix_save=$versuffix
71831 +       major_save=$major
71832 +       # I'm not sure if I'm treating the release correctly.  I think
71833 +       # release should show up in the -l (ie -lgmp5) so we don't want to
71834 +       # add it in twice.  Is that correct?
71835 +       release=""
71836 +       versuffix=""
71837 +       major=""
71838 +       newdeplibs=
71839 +       droppeddeps=no
71840 +       case $deplibs_check_method in
71841 +       pass_all)
71842 +         # Don't check for shared/static.  Everything works.
71843 +         # This might be a little naive.  We might want to check
71844 +         # whether the library exists or not.  But this is on
71845 +         # osf3 & osf4 and I'm not really sure... Just
71846 +         # implementing what was already the behavior.
71847 +         newdeplibs=$deplibs
71848 +         ;;
71849 +       test_compile)
71850 +         # This code stresses the "libraries are programs" paradigm to its
71851 +         # limits. Maybe even breaks it.  We compile a program, linking it
71852 +         # against the deplibs as a proxy for the library.  Then we can check
71853 +         # whether they linked in statically or dynamically with ldd.
71854 +         $rm conftest.c
71855 +         cat > conftest.c <<EOF
71856 +         int main() { return 0; }
71857 +EOF
71858 +         $rm conftest
71859 +         $LTCC -o conftest conftest.c $deplibs
71860 +         if test "$?" -eq 0 ; then
71861 +           ldd_output=`ldd conftest`
71862 +           for i in $deplibs; do
71863 +             name="`expr $i : '-l\(.*\)'`"
71864 +             # If $name is empty we are operating on a -L argument.
71865 +              if test "$name" != "" && test "$name" -ne "0"; then
71866 +               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
71867 +                 case " $predeps $postdeps " in
71868 +                 *" $i "*)
71869 +                   newdeplibs="$newdeplibs $i"
71870 +                   i=""
71871 +                   ;;
71872 +                 esac
71873 +               fi
71874 +               if test -n "$i" ; then
71875 +                 libname=`eval \\$echo \"$libname_spec\"`
71876 +                 deplib_matches=`eval \\$echo \"$library_names_spec\"`
71877 +                 set dummy $deplib_matches
71878 +                 deplib_match=$2
71879 +                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
71880 +                   newdeplibs="$newdeplibs $i"
71881 +                 else
71882 +                   droppeddeps=yes
71883 +                   $echo
71884 +                   $echo "*** Warning: dynamic linker does not accept needed library $i."
71885 +                   $echo "*** I have the capability to make that library automatically link in when"
71886 +                   $echo "*** you link to this library.  But I can only do this if you have a"
71887 +                   $echo "*** shared version of the library, which I believe you do not have"
71888 +                   $echo "*** because a test_compile did reveal that the linker did not use it for"
71889 +                   $echo "*** its dynamic dependency list that programs get resolved with at runtime."
71890 +                 fi
71891 +               fi
71892 +             else
71893 +               newdeplibs="$newdeplibs $i"
71894 +             fi
71895 +           done
71896 +         else
71897 +           # Error occurred in the first compile.  Let's try to salvage
71898 +           # the situation: Compile a separate program for each library.
71899 +           for i in $deplibs; do
71900 +             name="`expr $i : '-l\(.*\)'`"
71901 +             # If $name is empty we are operating on a -L argument.
71902 +              if test "$name" != "" && test "$name" != "0"; then
71903 +               $rm conftest
71904 +               $LTCC -o conftest conftest.c $i
71905 +               # Did it work?
71906 +               if test "$?" -eq 0 ; then
71907 +                 ldd_output=`ldd conftest`
71908 +                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
71909 +                   case " $predeps $postdeps " in
71910 +                   *" $i "*)
71911 +                     newdeplibs="$newdeplibs $i"
71912 +                     i=""
71913 +                     ;;
71914 +                   esac
71915 +                 fi
71916 +                 if test -n "$i" ; then
71917 +                   libname=`eval \\$echo \"$libname_spec\"`
71918 +                   deplib_matches=`eval \\$echo \"$library_names_spec\"`
71919 +                   set dummy $deplib_matches
71920 +                   deplib_match=$2
71921 +                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
71922 +                     newdeplibs="$newdeplibs $i"
71923 +                   else
71924 +                     droppeddeps=yes
71925 +                     $echo
71926 +                     $echo "*** Warning: dynamic linker does not accept needed library $i."
71927 +                     $echo "*** I have the capability to make that library automatically link in when"
71928 +                     $echo "*** you link to this library.  But I can only do this if you have a"
71929 +                     $echo "*** shared version of the library, which you do not appear to have"
71930 +                     $echo "*** because a test_compile did reveal that the linker did not use this one"
71931 +                     $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
71932 +                   fi
71933 +                 fi
71934 +               else
71935 +                 droppeddeps=yes
71936 +                 $echo
71937 +                 $echo "*** Warning!  Library $i is needed by this library but I was not able to"
71938 +                 $echo "***  make it link in!  You will probably need to install it or some"
71939 +                 $echo "*** library that it depends on before this library will be fully"
71940 +                 $echo "*** functional.  Installing it before continuing would be even better."
71941 +               fi
71942 +             else
71943 +               newdeplibs="$newdeplibs $i"
71944 +             fi
71945 +           done
71946 +         fi
71947 +         ;;
71948 +       file_magic*)
71949 +         set dummy $deplibs_check_method
71950 +         file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
71951 +         for a_deplib in $deplibs; do
71952 +           name="`expr $a_deplib : '-l\(.*\)'`"
71953 +           # If $name is empty we are operating on a -L argument.
71954 +            if test "$name" != "" && test  "$name" != "0"; then
71955 +             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
71956 +               case " $predeps $postdeps " in
71957 +               *" $a_deplib "*)
71958 +                 newdeplibs="$newdeplibs $a_deplib"
71959 +                 a_deplib=""
71960 +                 ;;
71961 +               esac
71962 +             fi
71963 +             if test -n "$a_deplib" ; then
71964 +               libname=`eval \\$echo \"$libname_spec\"`
71965 +               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
71966 +                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
71967 +                 for potent_lib in $potential_libs; do
71968 +                     # Follow soft links.
71969 +                     if ls -lLd "$potent_lib" 2>/dev/null \
71970 +                        | grep " -> " >/dev/null; then
71971 +                       continue
71972 +                     fi
71973 +                     # The statement above tries to avoid entering an
71974 +                     # endless loop below, in case of cyclic links.
71975 +                     # We might still enter an endless loop, since a link
71976 +                     # loop can be closed while we follow links,
71977 +                     # but so what?
71978 +                     potlib="$potent_lib"
71979 +                     while test -h "$potlib" 2>/dev/null; do
71980 +                       potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
71981 +                       case $potliblink in
71982 +                       [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
71983 +                       *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
71984 +                       esac
71985 +                     done
71986 +                     if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
71987 +                        | ${SED} 10q \
71988 +                        | $EGREP "$file_magic_regex" > /dev/null; then
71989 +                       newdeplibs="$newdeplibs $a_deplib"
71990 +                       a_deplib=""
71991 +                       break 2
71992 +                     fi
71993 +                 done
71994 +               done
71995 +             fi
71996 +             if test -n "$a_deplib" ; then
71997 +               droppeddeps=yes
71998 +               $echo
71999 +               $echo "*** Warning: linker path does not have real file for library $a_deplib."
72000 +               $echo "*** I have the capability to make that library automatically link in when"
72001 +               $echo "*** you link to this library.  But I can only do this if you have a"
72002 +               $echo "*** shared version of the library, which you do not appear to have"
72003 +               $echo "*** because I did check the linker path looking for a file starting"
72004 +               if test -z "$potlib" ; then
72005 +                 $echo "*** with $libname but no candidates were found. (...for file magic test)"
72006 +               else
72007 +                 $echo "*** with $libname and none of the candidates passed a file format test"
72008 +                 $echo "*** using a file magic. Last file checked: $potlib"
72009 +               fi
72010 +             fi
72011 +           else
72012 +             # Add a -L argument.
72013 +             newdeplibs="$newdeplibs $a_deplib"
72014 +           fi
72015 +         done # Gone through all deplibs.
72016 +         ;;
72017 +       match_pattern*)
72018 +         set dummy $deplibs_check_method
72019 +         match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
72020 +         for a_deplib in $deplibs; do
72021 +           name="`expr $a_deplib : '-l\(.*\)'`"
72022 +           # If $name is empty we are operating on a -L argument.
72023 +           if test -n "$name" && test "$name" != "0"; then
72024 +             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
72025 +               case " $predeps $postdeps " in
72026 +               *" $a_deplib "*)
72027 +                 newdeplibs="$newdeplibs $a_deplib"
72028 +                 a_deplib=""
72029 +                 ;;
72030 +               esac
72031 +             fi
72032 +             if test -n "$a_deplib" ; then
72033 +               libname=`eval \\$echo \"$libname_spec\"`
72034 +               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
72035 +                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
72036 +                 for potent_lib in $potential_libs; do
72037 +                   potlib="$potent_lib" # see symlink-check above in file_magic test
72038 +                   if eval $echo \"$potent_lib\" 2>/dev/null \
72039 +                       | ${SED} 10q \
72040 +                       | $EGREP "$match_pattern_regex" > /dev/null; then
72041 +                     newdeplibs="$newdeplibs $a_deplib"
72042 +                     a_deplib=""
72043 +                     break 2
72044 +                   fi
72045 +                 done
72046 +               done
72047 +             fi
72048 +             if test -n "$a_deplib" ; then
72049 +               droppeddeps=yes
72050 +               $echo
72051 +               $echo "*** Warning: linker path does not have real file for library $a_deplib."
72052 +               $echo "*** I have the capability to make that library automatically link in when"
72053 +               $echo "*** you link to this library.  But I can only do this if you have a"
72054 +               $echo "*** shared version of the library, which you do not appear to have"
72055 +               $echo "*** because I did check the linker path looking for a file starting"
72056 +               if test -z "$potlib" ; then
72057 +                 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
72058 +               else
72059 +                 $echo "*** with $libname and none of the candidates passed a file format test"
72060 +                 $echo "*** using a regex pattern. Last file checked: $potlib"
72061 +               fi
72062 +             fi
72063 +           else
72064 +             # Add a -L argument.
72065 +             newdeplibs="$newdeplibs $a_deplib"
72066 +           fi
72067 +         done # Gone through all deplibs.
72068 +         ;;
72069 +       none | unknown | *)
72070 +         newdeplibs=""
72071 +         tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
72072 +           -e 's/ -[LR][^ ]*//g'`
72073 +         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
72074 +           for i in $predeps $postdeps ; do
72075 +             # can't use Xsed below, because $i might contain '/'
72076 +             tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
72077 +           done
72078 +         fi
72079 +         if $echo "X $tmp_deplibs" | $Xsed -e 's/[     ]//g' \
72080 +           | grep . >/dev/null; then
72081 +           $echo
72082 +           if test "X$deplibs_check_method" = "Xnone"; then
72083 +             $echo "*** Warning: inter-library dependencies are not supported in this platform."
72084 +           else
72085 +             $echo "*** Warning: inter-library dependencies are not known to be supported."
72086 +           fi
72087 +           $echo "*** All declared inter-library dependencies are being dropped."
72088 +           droppeddeps=yes
72089 +         fi
72090 +         ;;
72091 +       esac
72092 +       versuffix=$versuffix_save
72093 +       major=$major_save
72094 +       release=$release_save
72095 +       libname=$libname_save
72096 +       name=$name_save
72097 +
72098 +       case $host in
72099 +       *-*-rhapsody* | *-*-darwin1.[012])
72100 +         # On Rhapsody replace the C library is the System framework
72101 +         newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
72102 +         ;;
72103 +       esac
72104 +
72105 +       if test "$droppeddeps" = yes; then
72106 +         if test "$module" = yes; then
72107 +           $echo
72108 +           $echo "*** Warning: libtool could not satisfy all declared inter-library"
72109 +           $echo "*** dependencies of module $libname.  Therefore, libtool will create"
72110 +           $echo "*** a static module, that should work as long as the dlopening"
72111 +           $echo "*** application is linked with the -dlopen flag."
72112 +           if test -z "$global_symbol_pipe"; then
72113 +             $echo
72114 +             $echo "*** However, this would only work if libtool was able to extract symbol"
72115 +             $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
72116 +             $echo "*** not find such a program.  So, this module is probably useless."
72117 +             $echo "*** \`nm' from GNU binutils and a full rebuild may help."
72118 +           fi
72119 +           if test "$build_old_libs" = no; then
72120 +             oldlibs="$output_objdir/$libname.$libext"
72121 +             build_libtool_libs=module
72122 +             build_old_libs=yes
72123 +           else
72124 +             build_libtool_libs=no
72125 +           fi
72126 +         else
72127 +           $echo "*** The inter-library dependencies that have been dropped here will be"
72128 +           $echo "*** automatically added whenever a program is linked with this library"
72129 +           $echo "*** or is declared to -dlopen it."
72130 +
72131 +           if test "$allow_undefined" = no; then
72132 +             $echo
72133 +             $echo "*** Since this library must not contain undefined symbols,"
72134 +             $echo "*** because either the platform does not support them or"
72135 +             $echo "*** it was explicitly requested with -no-undefined,"
72136 +             $echo "*** libtool will only create a static version of it."
72137 +             if test "$build_old_libs" = no; then
72138 +               oldlibs="$output_objdir/$libname.$libext"
72139 +               build_libtool_libs=module
72140 +               build_old_libs=yes
72141 +             else
72142 +               build_libtool_libs=no
72143 +             fi
72144 +           fi
72145 +         fi
72146 +       fi
72147 +       # Done checking deplibs!
72148 +       deplibs=$newdeplibs
72149 +      fi
72150 +
72151 +      # All the library-specific variables (install_libdir is set above).
72152 +      library_names=
72153 +      old_library=
72154 +      dlname=
72155 +
72156 +      # Test again, we may have decided not to build it any more
72157 +      if test "$build_libtool_libs" = yes; then
72158 +       if test "$hardcode_into_libs" = yes; then
72159 +         # Hardcode the library paths
72160 +         hardcode_libdirs=
72161 +         dep_rpath=
72162 +         rpath="$finalize_rpath"
72163 +         test "$mode" != relink && rpath="$compile_rpath$rpath"
72164 +         for libdir in $rpath; do
72165 +           if test -n "$hardcode_libdir_flag_spec"; then
72166 +             if test -n "$hardcode_libdir_separator"; then
72167 +               if test -z "$hardcode_libdirs"; then
72168 +                 hardcode_libdirs="$libdir"
72169 +               else
72170 +                 # Just accumulate the unique libdirs.
72171 +                 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
72172 +                 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
72173 +                   ;;
72174 +                 *)
72175 +                   hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
72176 +                   ;;
72177 +                 esac
72178 +               fi
72179 +             else
72180 +               eval flag=\"$hardcode_libdir_flag_spec\"
72181 +               dep_rpath="$dep_rpath $flag"
72182 +             fi
72183 +           elif test -n "$runpath_var"; then
72184 +             case "$perm_rpath " in
72185 +             *" $libdir "*) ;;
72186 +             *) perm_rpath="$perm_rpath $libdir" ;;
72187 +             esac
72188 +           fi
72189 +         done
72190 +         # Substitute the hardcoded libdirs into the rpath.
72191 +         if test -n "$hardcode_libdir_separator" &&
72192 +            test -n "$hardcode_libdirs"; then
72193 +           libdir="$hardcode_libdirs"
72194 +           if test -n "$hardcode_libdir_flag_spec_ld"; then
72195 +             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
72196 +           else
72197 +             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
72198 +           fi
72199 +         fi
72200 +         if test -n "$runpath_var" && test -n "$perm_rpath"; then
72201 +           # We should set the runpath_var.
72202 +           rpath=
72203 +           for dir in $perm_rpath; do
72204 +             rpath="$rpath$dir:"
72205 +           done
72206 +           eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
72207 +         fi
72208 +         test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
72209 +       fi
72210 +
72211 +       shlibpath="$finalize_shlibpath"
72212 +       test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
72213 +       if test -n "$shlibpath"; then
72214 +         eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
72215 +       fi
72216 +
72217 +       # Get the real and link names of the library.
72218 +       eval shared_ext=\"$shrext_cmds\"
72219 +       eval library_names=\"$library_names_spec\"
72220 +       set dummy $library_names
72221 +       realname="$2"
72222 +       shift; shift
72223 +
72224 +       if test -n "$soname_spec"; then
72225 +         eval soname=\"$soname_spec\"
72226 +       else
72227 +         soname="$realname"
72228 +       fi
72229 +       if test -z "$dlname"; then
72230 +         dlname=$soname
72231 +       fi
72232 +
72233 +       lib="$output_objdir/$realname"
72234 +       for link
72235 +       do
72236 +         linknames="$linknames $link"
72237 +       done
72238 +
72239 +       # Use standard objects if they are pic
72240 +       test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
72241 +
72242 +       # Prepare the list of exported symbols
72243 +       if test -z "$export_symbols"; then
72244 +         if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
72245 +           $show "generating symbol list for \`$libname.la'"
72246 +           export_symbols="$output_objdir/$libname.exp"
72247 +           $run $rm $export_symbols
72248 +           cmds=$export_symbols_cmds
72249 +           save_ifs="$IFS"; IFS='~'
72250 +           for cmd in $cmds; do
72251 +             IFS="$save_ifs"
72252 +             eval cmd=\"$cmd\"
72253 +             if len=`expr "X$cmd" : ".*"` &&
72254 +              test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
72255 +               $show "$cmd"
72256 +               $run eval "$cmd" || exit $?
72257 +               skipped_export=false
72258 +             else
72259 +               # The command line is too long to execute in one step.
72260 +               $show "using reloadable object file for export list..."
72261 +               skipped_export=:
72262 +             fi
72263 +           done
72264 +           IFS="$save_ifs"
72265 +           if test -n "$export_symbols_regex"; then
72266 +             $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
72267 +             $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
72268 +             $show "$mv \"${export_symbols}T\" \"$export_symbols\""
72269 +             $run eval '$mv "${export_symbols}T" "$export_symbols"'
72270 +           fi
72271 +         fi
72272 +       fi
72273 +
72274 +       if test -n "$export_symbols" && test -n "$include_expsyms"; then
72275 +         $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
72276 +       fi
72277 +
72278 +       tmp_deplibs=
72279 +       for test_deplib in $deplibs; do
72280 +               case " $convenience " in
72281 +               *" $test_deplib "*) ;;
72282 +               *)
72283 +                       tmp_deplibs="$tmp_deplibs $test_deplib"
72284 +                       ;;
72285 +               esac
72286 +       done
72287 +       deplibs="$tmp_deplibs"
72288 +
72289 +       if test -n "$convenience"; then
72290 +         if test -n "$whole_archive_flag_spec"; then
72291 +           save_libobjs=$libobjs
72292 +           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
72293 +         else
72294 +           gentop="$output_objdir/${outputname}x"
72295 +           generated="$generated $gentop"
72296 +
72297 +           func_extract_archives $gentop $convenience
72298 +           libobjs="$libobjs $func_extract_archives_result"
72299 +         fi
72300 +       fi
72301 +       
72302 +       if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
72303 +         eval flag=\"$thread_safe_flag_spec\"
72304 +         linker_flags="$linker_flags $flag"
72305 +       fi
72306 +
72307 +       # Make a backup of the uninstalled library when relinking
72308 +       if test "$mode" = relink; then
72309 +         $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
72310 +       fi
72311 +
72312 +       # Do each of the archive commands.
72313 +       if test "$module" = yes && test -n "$module_cmds" ; then
72314 +         if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
72315 +           eval test_cmds=\"$module_expsym_cmds\"
72316 +           cmds=$module_expsym_cmds
72317 +         else
72318 +           eval test_cmds=\"$module_cmds\"
72319 +           cmds=$module_cmds
72320 +         fi
72321 +       else
72322 +       if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
72323 +         eval test_cmds=\"$archive_expsym_cmds\"
72324 +         cmds=$archive_expsym_cmds
72325 +       else
72326 +         eval test_cmds=\"$archive_cmds\"
72327 +         cmds=$archive_cmds
72328 +         fi
72329 +       fi
72330 +
72331 +       if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
72332 +          test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
72333 +         :
72334 +       else
72335 +         # The command line is too long to link in one step, link piecewise.
72336 +         $echo "creating reloadable object files..."
72337 +
72338 +         # Save the value of $output and $libobjs because we want to
72339 +         # use them later.  If we have whole_archive_flag_spec, we
72340 +         # want to use save_libobjs as it was before
72341 +         # whole_archive_flag_spec was expanded, because we can't
72342 +         # assume the linker understands whole_archive_flag_spec.
72343 +         # This may have to be revisited, in case too many
72344 +         # convenience libraries get linked in and end up exceeding
72345 +         # the spec.
72346 +         if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
72347 +           save_libobjs=$libobjs
72348 +         fi
72349 +         save_output=$output
72350 +         output_la=`$echo "X$output" | $Xsed -e "$basename"`
72351 +
72352 +         # Clear the reloadable object creation command queue and
72353 +         # initialize k to one.
72354 +         test_cmds=
72355 +         concat_cmds=
72356 +         objlist=
72357 +         delfiles=
72358 +         last_robj=
72359 +         k=1
72360 +         output=$output_objdir/$output_la-${k}.$objext
72361 +         # Loop over the list of objects to be linked.
72362 +         for obj in $save_libobjs
72363 +         do
72364 +           eval test_cmds=\"$reload_cmds $objlist $last_robj\"
72365 +           if test "X$objlist" = X ||
72366 +              { len=`expr "X$test_cmds" : ".*"` &&
72367 +                test "$len" -le "$max_cmd_len"; }; then
72368 +             objlist="$objlist $obj"
72369 +           else
72370 +             # The command $test_cmds is almost too long, add a
72371 +             # command to the queue.
72372 +             if test "$k" -eq 1 ; then
72373 +               # The first file doesn't have a previous command to add.
72374 +               eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
72375 +             else
72376 +               # All subsequent reloadable object files will link in
72377 +               # the last one created.
72378 +               eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
72379 +             fi
72380 +             last_robj=$output_objdir/$output_la-${k}.$objext
72381 +             k=`expr $k + 1`
72382 +             output=$output_objdir/$output_la-${k}.$objext
72383 +             objlist=$obj
72384 +             len=1
72385 +           fi
72386 +         done
72387 +         # Handle the remaining objects by creating one last
72388 +         # reloadable object file.  All subsequent reloadable object
72389 +         # files will link in the last one created.
72390 +         test -z "$concat_cmds" || concat_cmds=$concat_cmds~
72391 +         eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
72392 +
72393 +         if ${skipped_export-false}; then
72394 +           $show "generating symbol list for \`$libname.la'"
72395 +           export_symbols="$output_objdir/$libname.exp"
72396 +           $run $rm $export_symbols
72397 +           libobjs=$output
72398 +           # Append the command to create the export file.
72399 +           eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
72400 +          fi
72401 +
72402 +         # Set up a command to remove the reloadable object files
72403 +         # after they are used.
72404 +         i=0
72405 +         while test "$i" -lt "$k"
72406 +         do
72407 +           i=`expr $i + 1`
72408 +           delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
72409 +         done
72410 +
72411 +         $echo "creating a temporary reloadable object file: $output"
72412 +
72413 +         # Loop through the commands generated above and execute them.
72414 +         save_ifs="$IFS"; IFS='~'
72415 +         for cmd in $concat_cmds; do
72416 +           IFS="$save_ifs"
72417 +           $show "$cmd"
72418 +           $run eval "$cmd" || exit $?
72419 +         done
72420 +         IFS="$save_ifs"
72421 +
72422 +         libobjs=$output
72423 +         # Restore the value of output.
72424 +         output=$save_output
72425 +
72426 +         if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
72427 +           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
72428 +         fi
72429 +         # Expand the library linking commands again to reset the
72430 +         # value of $libobjs for piecewise linking.
72431 +
72432 +         # Do each of the archive commands.
72433 +         if test "$module" = yes && test -n "$module_cmds" ; then
72434 +           if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
72435 +             cmds=$module_expsym_cmds
72436 +           else
72437 +             cmds=$module_cmds
72438 +           fi
72439 +         else
72440 +         if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
72441 +           cmds=$archive_expsym_cmds
72442 +         else
72443 +           cmds=$archive_cmds
72444 +           fi
72445 +         fi
72446 +
72447 +         # Append the command to remove the reloadable object files
72448 +         # to the just-reset $cmds.
72449 +         eval cmds=\"\$cmds~\$rm $delfiles\"
72450 +       fi
72451 +       save_ifs="$IFS"; IFS='~'
72452 +       for cmd in $cmds; do
72453 +         IFS="$save_ifs"
72454 +         eval cmd=\"$cmd\"
72455 +         $show "$cmd"
72456 +         $run eval "$cmd" || exit $?
72457 +       done
72458 +       IFS="$save_ifs"
72459 +
72460 +       # Restore the uninstalled library and exit
72461 +       if test "$mode" = relink; then
72462 +         $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
72463 +         exit $EXIT_SUCCESS
72464 +       fi
72465 +
72466 +       # Create links to the real library.
72467 +       for linkname in $linknames; do
72468 +         if test "$realname" != "$linkname"; then
72469 +           $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
72470 +           $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
72471 +         fi
72472 +       done
72473 +
72474 +       # If -module or -export-dynamic was specified, set the dlname.
72475 +       if test "$module" = yes || test "$export_dynamic" = yes; then
72476 +         # On all known operating systems, these are identical.
72477 +         dlname="$soname"
72478 +       fi
72479 +      fi
72480 +      ;;
72481 +
72482 +    obj)
72483 +      if test -n "$deplibs"; then
72484 +       $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
72485 +      fi
72486 +
72487 +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
72488 +       $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
72489 +      fi
72490 +
72491 +      if test -n "$rpath"; then
72492 +       $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
72493 +      fi
72494 +
72495 +      if test -n "$xrpath"; then
72496 +       $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
72497 +      fi
72498 +
72499 +      if test -n "$vinfo"; then
72500 +       $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
72501 +      fi
72502 +
72503 +      if test -n "$release"; then
72504 +       $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
72505 +      fi
72506 +
72507 +      case $output in
72508 +      *.lo)
72509 +       if test -n "$objs$old_deplibs"; then
72510 +         $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
72511 +         exit $EXIT_FAILURE
72512 +       fi
72513 +       libobj="$output"
72514 +       obj=`$echo "X$output" | $Xsed -e "$lo2o"`
72515 +       ;;
72516 +      *)
72517 +       libobj=
72518 +       obj="$output"
72519 +       ;;
72520 +      esac
72521 +
72522 +      # Delete the old objects.
72523 +      $run $rm $obj $libobj
72524 +
72525 +      # Objects from convenience libraries.  This assumes
72526 +      # single-version convenience libraries.  Whenever we create
72527 +      # different ones for PIC/non-PIC, this we'll have to duplicate
72528 +      # the extraction.
72529 +      reload_conv_objs=
72530 +      gentop=
72531 +      # reload_cmds runs $LD directly, so let us get rid of
72532 +      # -Wl from whole_archive_flag_spec
72533 +      wl=
72534 +
72535 +      if test -n "$convenience"; then
72536 +       if test -n "$whole_archive_flag_spec"; then
72537 +         eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
72538 +       else
72539 +         gentop="$output_objdir/${obj}x"
72540 +         generated="$generated $gentop"
72541 +
72542 +         func_extract_archives $gentop $convenience
72543 +         reload_conv_objs="$reload_objs $func_extract_archives_result"
72544 +       fi
72545 +      fi
72546 +
72547 +      # Create the old-style object.
72548 +      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
72549 +
72550 +      output="$obj"
72551 +      cmds=$reload_cmds
72552 +      save_ifs="$IFS"; IFS='~'
72553 +      for cmd in $cmds; do
72554 +       IFS="$save_ifs"
72555 +       eval cmd=\"$cmd\"
72556 +       $show "$cmd"
72557 +       $run eval "$cmd" || exit $?
72558 +      done
72559 +      IFS="$save_ifs"
72560 +
72561 +      # Exit if we aren't doing a library object file.
72562 +      if test -z "$libobj"; then
72563 +       if test -n "$gentop"; then
72564 +         $show "${rm}r $gentop"
72565 +         $run ${rm}r $gentop
72566 +       fi
72567 +
72568 +       exit $EXIT_SUCCESS
72569 +      fi
72570 +
72571 +      if test "$build_libtool_libs" != yes; then
72572 +       if test -n "$gentop"; then
72573 +         $show "${rm}r $gentop"
72574 +         $run ${rm}r $gentop
72575 +       fi
72576 +
72577 +       # Create an invalid libtool object if no PIC, so that we don't
72578 +       # accidentally link it into a program.
72579 +       # $show "echo timestamp > $libobj"
72580 +       # $run eval "echo timestamp > $libobj" || exit $?
72581 +       exit $EXIT_SUCCESS
72582 +      fi
72583 +
72584 +      if test -n "$pic_flag" || test "$pic_mode" != default; then
72585 +       # Only do commands if we really have different PIC objects.
72586 +       reload_objs="$libobjs $reload_conv_objs"
72587 +       output="$libobj"
72588 +       cmds=$reload_cmds
72589 +       save_ifs="$IFS"; IFS='~'
72590 +       for cmd in $cmds; do
72591 +         IFS="$save_ifs"
72592 +         eval cmd=\"$cmd\"
72593 +         $show "$cmd"
72594 +         $run eval "$cmd" || exit $?
72595 +       done
72596 +       IFS="$save_ifs"
72597 +      fi
72598 +
72599 +      if test -n "$gentop"; then
72600 +       $show "${rm}r $gentop"
72601 +       $run ${rm}r $gentop
72602 +      fi
72603 +
72604 +      exit $EXIT_SUCCESS
72605 +      ;;
72606 +
72607 +    prog)
72608 +      case $host in
72609 +       *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
72610 +      esac
72611 +      if test -n "$vinfo"; then
72612 +       $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
72613 +      fi
72614 +
72615 +      if test -n "$release"; then
72616 +       $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
72617 +      fi
72618 +
72619 +      if test "$preload" = yes; then
72620 +       if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
72621 +          test "$dlopen_self_static" = unknown; then
72622 +         $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
72623 +       fi
72624 +      fi
72625 +
72626 +      case $host in
72627 +      *-*-rhapsody* | *-*-darwin1.[012])
72628 +       # On Rhapsody replace the C library is the System framework
72629 +       compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
72630 +       finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
72631 +       ;;
72632 +      esac
72633 +
72634 +      case $host in
72635 +      *darwin*)
72636 +        # Don't allow lazy linking, it breaks C++ global constructors
72637 +        if test "$tagname" = CXX ; then
72638 +        compile_command="$compile_command ${wl}-bind_at_load"
72639 +        finalize_command="$finalize_command ${wl}-bind_at_load"
72640 +        fi
72641 +        ;;
72642 +      esac
72643 +
72644 +      compile_command="$compile_command $compile_deplibs"
72645 +      finalize_command="$finalize_command $finalize_deplibs"
72646 +
72647 +      if test -n "$rpath$xrpath"; then
72648 +       # If the user specified any rpath flags, then add them.
72649 +       for libdir in $rpath $xrpath; do
72650 +         # This is the magic to use -rpath.
72651 +         case "$finalize_rpath " in
72652 +         *" $libdir "*) ;;
72653 +         *) finalize_rpath="$finalize_rpath $libdir" ;;
72654 +         esac
72655 +       done
72656 +      fi
72657 +
72658 +      # Now hardcode the library paths
72659 +      rpath=
72660 +      hardcode_libdirs=
72661 +      for libdir in $compile_rpath $finalize_rpath; do
72662 +       if test -n "$hardcode_libdir_flag_spec"; then
72663 +         if test -n "$hardcode_libdir_separator"; then
72664 +           if test -z "$hardcode_libdirs"; then
72665 +             hardcode_libdirs="$libdir"
72666 +           else
72667 +             # Just accumulate the unique libdirs.
72668 +             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
72669 +             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
72670 +               ;;
72671 +             *)
72672 +               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
72673 +               ;;
72674 +             esac
72675 +           fi
72676 +         else
72677 +           eval flag=\"$hardcode_libdir_flag_spec\"
72678 +           rpath="$rpath $flag"
72679 +         fi
72680 +       elif test -n "$runpath_var"; then
72681 +         case "$perm_rpath " in
72682 +         *" $libdir "*) ;;
72683 +         *) perm_rpath="$perm_rpath $libdir" ;;
72684 +         esac
72685 +       fi
72686 +       case $host in
72687 +       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
72688 +         case :$dllsearchpath: in
72689 +         *":$libdir:"*) ;;
72690 +         *) dllsearchpath="$dllsearchpath:$libdir";;
72691 +         esac
72692 +         ;;
72693 +       esac
72694 +      done
72695 +      # Substitute the hardcoded libdirs into the rpath.
72696 +      if test -n "$hardcode_libdir_separator" &&
72697 +        test -n "$hardcode_libdirs"; then
72698 +       libdir="$hardcode_libdirs"
72699 +       eval rpath=\" $hardcode_libdir_flag_spec\"
72700 +      fi
72701 +      compile_rpath="$rpath"
72702 +
72703 +      rpath=
72704 +      hardcode_libdirs=
72705 +      for libdir in $finalize_rpath; do
72706 +       if test -n "$hardcode_libdir_flag_spec"; then
72707 +         if test -n "$hardcode_libdir_separator"; then
72708 +           if test -z "$hardcode_libdirs"; then
72709 +             hardcode_libdirs="$libdir"
72710 +           else
72711 +             # Just accumulate the unique libdirs.
72712 +             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
72713 +             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
72714 +               ;;
72715 +             *)
72716 +               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
72717 +               ;;
72718 +             esac
72719 +           fi
72720 +         else
72721 +           eval flag=\"$hardcode_libdir_flag_spec\"
72722 +           rpath="$rpath $flag"
72723 +         fi
72724 +       elif test -n "$runpath_var"; then
72725 +         case "$finalize_perm_rpath " in
72726 +         *" $libdir "*) ;;
72727 +         *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
72728 +         esac
72729 +       fi
72730 +      done
72731 +      # Substitute the hardcoded libdirs into the rpath.
72732 +      if test -n "$hardcode_libdir_separator" &&
72733 +        test -n "$hardcode_libdirs"; then
72734 +       libdir="$hardcode_libdirs"
72735 +       eval rpath=\" $hardcode_libdir_flag_spec\"
72736 +      fi
72737 +      finalize_rpath="$rpath"
72738 +
72739 +      if test -n "$libobjs" && test "$build_old_libs" = yes; then
72740 +       # Transform all the library objects into standard objects.
72741 +       compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
72742 +       finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
72743 +      fi
72744 +
72745 +      dlsyms=
72746 +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
72747 +       if test -n "$NM" && test -n "$global_symbol_pipe"; then
72748 +         dlsyms="${outputname}S.c"
72749 +       else
72750 +         $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
72751 +       fi
72752 +      fi
72753 +
72754 +      if test -n "$dlsyms"; then
72755 +       case $dlsyms in
72756 +       "") ;;
72757 +       *.c)
72758 +         # Discover the nlist of each of the dlfiles.
72759 +         nlist="$output_objdir/${outputname}.nm"
72760 +
72761 +         $show "$rm $nlist ${nlist}S ${nlist}T"
72762 +         $run $rm "$nlist" "${nlist}S" "${nlist}T"
72763 +
72764 +         # Parse the name list into a source file.
72765 +         $show "creating $output_objdir/$dlsyms"
72766 +
72767 +         test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
72768 +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
72769 +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
72770 +
72771 +#ifdef __cplusplus
72772 +extern \"C\" {
72773 +#endif
72774 +
72775 +/* Prevent the only kind of declaration conflicts we can make. */
72776 +#define lt_preloaded_symbols some_other_symbol
72777 +
72778 +/* External symbol declarations for the compiler. */\
72779 +"
72780 +
72781 +         if test "$dlself" = yes; then
72782 +           $show "generating symbol list for \`$output'"
72783 +
72784 +           test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
72785 +
72786 +           # Add our own program objects to the symbol list.
72787 +           progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
72788 +           for arg in $progfiles; do
72789 +             $show "extracting global C symbols from \`$arg'"
72790 +             $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
72791 +           done
72792 +
72793 +           if test -n "$exclude_expsyms"; then
72794 +             $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
72795 +             $run eval '$mv "$nlist"T "$nlist"'
72796 +           fi
72797 +
72798 +           if test -n "$export_symbols_regex"; then
72799 +             $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
72800 +             $run eval '$mv "$nlist"T "$nlist"'
72801 +           fi
72802 +
72803 +           # Prepare the list of exported symbols
72804 +           if test -z "$export_symbols"; then
72805 +             export_symbols="$output_objdir/$outputname.exp"
72806 +             $run $rm $export_symbols
72807 +             $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
72808 +           else
72809 +             $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
72810 +             $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
72811 +             $run eval 'mv "$nlist"T "$nlist"'
72812 +           fi
72813 +         fi
72814 +
72815 +         for arg in $dlprefiles; do
72816 +           $show "extracting global C symbols from \`$arg'"
72817 +           name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
72818 +           $run eval '$echo ": $name " >> "$nlist"'
72819 +           $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
72820 +         done
72821 +
72822 +         if test -z "$run"; then
72823 +           # Make sure we have at least an empty file.
72824 +           test -f "$nlist" || : > "$nlist"
72825 +
72826 +           if test -n "$exclude_expsyms"; then
72827 +             $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
72828 +             $mv "$nlist"T "$nlist"
72829 +           fi
72830 +
72831 +           # Try sorting and uniquifying the output.
72832 +           if grep -v "^: " < "$nlist" |
72833 +               if sort -k 3 </dev/null >/dev/null 2>&1; then
72834 +                 sort -k 3
72835 +               else
72836 +                 sort +2
72837 +               fi |
72838 +               uniq > "$nlist"S; then
72839 +             :
72840 +           else
72841 +             grep -v "^: " < "$nlist" > "$nlist"S
72842 +           fi
72843 +
72844 +           if test -f "$nlist"S; then
72845 +             eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
72846 +           else
72847 +             $echo '/* NONE */' >> "$output_objdir/$dlsyms"
72848 +           fi
72849 +
72850 +           $echo >> "$output_objdir/$dlsyms" "\
72851 +
72852 +#undef lt_preloaded_symbols
72853 +
72854 +#if defined (__STDC__) && __STDC__
72855 +# define lt_ptr void *
72856 +#else
72857 +# define lt_ptr char *
72858 +# define const
72859 +#endif
72860 +
72861 +/* The mapping between symbol names and symbols. */
72862 +"
72863 +
72864 +           case $host in
72865 +           *cygwin* | *mingw* )
72866 +         $echo >> "$output_objdir/$dlsyms" "\
72867 +/* DATA imports from DLLs on WIN32 can't be const, because
72868 +   runtime relocations are performed -- see ld's documentation
72869 +   on pseudo-relocs */
72870 +struct {
72871 +"
72872 +             ;;
72873 +           * )
72874 +         $echo >> "$output_objdir/$dlsyms" "\
72875 +const struct {
72876 +"
72877 +             ;;
72878 +           esac
72879 +
72880 +
72881 +         $echo >> "$output_objdir/$dlsyms" "\
72882 +  const char *name;
72883 +  lt_ptr address;
72884 +}
72885 +lt_preloaded_symbols[] =
72886 +{\
72887 +"
72888 +
72889 +           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
72890 +
72891 +           $echo >> "$output_objdir/$dlsyms" "\
72892 +  {0, (lt_ptr) 0}
72893 +};
72894 +
72895 +/* This works around a problem in FreeBSD linker */
72896 +#ifdef FREEBSD_WORKAROUND
72897 +static const void *lt_preloaded_setup() {
72898 +  return lt_preloaded_symbols;
72899 +}
72900 +#endif
72901 +
72902 +#ifdef __cplusplus
72903 +}
72904 +#endif\
72905 +"
72906 +         fi
72907 +
72908 +         pic_flag_for_symtable=
72909 +         case $host in
72910 +         # compiling the symbol table file with pic_flag works around
72911 +         # a FreeBSD bug that causes programs to crash when -lm is
72912 +         # linked before any other PIC object.  But we must not use
72913 +         # pic_flag when linking with -static.  The problem exists in
72914 +         # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
72915 +         *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
72916 +           case "$compile_command " in
72917 +           *" -static "*) ;;
72918 +           *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
72919 +           esac;;
72920 +         *-*-hpux*)
72921 +           case "$compile_command " in
72922 +           *" -static "*) ;;
72923 +           *) pic_flag_for_symtable=" $pic_flag";;
72924 +           esac
72925 +         esac
72926 +
72927 +         # Now compile the dynamic symbol file.
72928 +         $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
72929 +         $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
72930 +
72931 +         # Clean up the generated files.
72932 +         $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
72933 +         $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
72934 +
72935 +         # Transform the symbol file into the correct name.
72936 +         compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
72937 +         finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
72938 +         ;;
72939 +       *)
72940 +         $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
72941 +         exit $EXIT_FAILURE
72942 +         ;;
72943 +       esac
72944 +      else
72945 +       # We keep going just in case the user didn't refer to
72946 +       # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
72947 +       # really was required.
72948 +
72949 +       # Nullify the symbol file.
72950 +       compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
72951 +       finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
72952 +      fi
72953 +
72954 +      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
72955 +       # Replace the output file specification.
72956 +       compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
72957 +       link_command="$compile_command$compile_rpath"
72958 +
72959 +       # We have no uninstalled library dependencies, so finalize right now.
72960 +       $show "$link_command"
72961 +       $run eval "$link_command"
72962 +       status=$?
72963 +
72964 +       # Delete the generated files.
72965 +       if test -n "$dlsyms"; then
72966 +         $show "$rm $output_objdir/${outputname}S.${objext}"
72967 +         $run $rm "$output_objdir/${outputname}S.${objext}"
72968 +       fi
72969 +
72970 +       exit $status
72971 +      fi
72972 +
72973 +      if test -n "$shlibpath_var"; then
72974 +       # We should set the shlibpath_var
72975 +       rpath=
72976 +       for dir in $temp_rpath; do
72977 +         case $dir in
72978 +         [\\/]* | [A-Za-z]:[\\/]*)
72979 +           # Absolute path.
72980 +           rpath="$rpath$dir:"
72981 +           ;;
72982 +         *)
72983 +           # Relative path: add a thisdir entry.
72984 +           rpath="$rpath\$thisdir/$dir:"
72985 +           ;;
72986 +         esac
72987 +       done
72988 +       temp_rpath="$rpath"
72989 +      fi
72990 +
72991 +      if test -n "$compile_shlibpath$finalize_shlibpath"; then
72992 +       compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
72993 +      fi
72994 +      if test -n "$finalize_shlibpath"; then
72995 +       finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
72996 +      fi
72997 +
72998 +      compile_var=
72999 +      finalize_var=
73000 +      if test -n "$runpath_var"; then
73001 +       if test -n "$perm_rpath"; then
73002 +         # We should set the runpath_var.
73003 +         rpath=
73004 +         for dir in $perm_rpath; do
73005 +           rpath="$rpath$dir:"
73006 +         done
73007 +         compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
73008 +       fi
73009 +       if test -n "$finalize_perm_rpath"; then
73010 +         # We should set the runpath_var.
73011 +         rpath=
73012 +         for dir in $finalize_perm_rpath; do
73013 +           rpath="$rpath$dir:"
73014 +         done
73015 +         finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
73016 +       fi
73017 +      fi
73018 +
73019 +      if test "$no_install" = yes; then
73020 +       # We don't need to create a wrapper script.
73021 +       link_command="$compile_var$compile_command$compile_rpath"
73022 +       # Replace the output file specification.
73023 +       link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
73024 +       # Delete the old output file.
73025 +       $run $rm $output
73026 +       # Link the executable and exit
73027 +       $show "$link_command"
73028 +       $run eval "$link_command" || exit $?
73029 +       exit $EXIT_SUCCESS
73030 +      fi
73031 +
73032 +      if test "$hardcode_action" = relink; then
73033 +       # Fast installation is not supported
73034 +       link_command="$compile_var$compile_command$compile_rpath"
73035 +       relink_command="$finalize_var$finalize_command$finalize_rpath"
73036 +
73037 +       $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
73038 +       $echo "$modename: \`$output' will be relinked during installation" 1>&2
73039 +      else
73040 +       if test "$fast_install" != no; then
73041 +         link_command="$finalize_var$compile_command$finalize_rpath"
73042 +         if test "$fast_install" = yes; then
73043 +           relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
73044 +         else
73045 +           # fast_install is set to needless
73046 +           relink_command=
73047 +         fi
73048 +       else
73049 +         link_command="$compile_var$compile_command$compile_rpath"
73050 +         relink_command="$finalize_var$finalize_command$finalize_rpath"
73051 +       fi
73052 +      fi
73053 +
73054 +      # Replace the output file specification.
73055 +      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
73056 +
73057 +      # Delete the old output files.
73058 +      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
73059 +
73060 +      $show "$link_command"
73061 +      $run eval "$link_command" || exit $?
73062 +
73063 +      # Now create the wrapper script.
73064 +      $show "creating $output"
73065 +
73066 +      # Quote the relink command for shipping.
73067 +      if test -n "$relink_command"; then
73068 +       # Preserve any variables that may affect compiler behavior
73069 +       for var in $variables_saved_for_relink; do
73070 +         if eval test -z \"\${$var+set}\"; then
73071 +           relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
73072 +         elif eval var_value=\$$var; test -z "$var_value"; then
73073 +           relink_command="$var=; export $var; $relink_command"
73074 +         else
73075 +           var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
73076 +           relink_command="$var=\"$var_value\"; export $var; $relink_command"
73077 +         fi
73078 +       done
73079 +       relink_command="(cd `pwd`; $relink_command)"
73080 +       relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
73081 +      fi
73082 +
73083 +      # Quote $echo for shipping.
73084 +      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
73085 +       case $progpath in
73086 +       [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
73087 +       *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
73088 +       esac
73089 +       qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
73090 +      else
73091 +       qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
73092 +      fi
73093 +
73094 +      # Only actually do things if our run command is non-null.
73095 +      if test -z "$run"; then
73096 +       # win32 will think the script is a binary if it has
73097 +       # a .exe suffix, so we strip it off here.
73098 +       case $output in
73099 +         *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
73100 +       esac
73101 +       # test for cygwin because mv fails w/o .exe extensions
73102 +       case $host in
73103 +         *cygwin*)
73104 +           exeext=.exe
73105 +           outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
73106 +         *) exeext= ;;
73107 +       esac
73108 +       case $host in
73109 +         *cygwin* | *mingw* )
73110 +           cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
73111 +           cwrapper=`$echo ${output}.exe`
73112 +           $rm $cwrappersource $cwrapper
73113 +           trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
73114 +
73115 +           cat > $cwrappersource <<EOF
73116 +
73117 +/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
73118 +   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
73119 +
73120 +   The $output program cannot be directly executed until all the libtool
73121 +   libraries that it depends on are installed.
73122 +
73123 +   This wrapper executable should never be moved out of the build directory.
73124 +   If it is, it will not operate correctly.
73125 +
73126 +   Currently, it simply execs the wrapper *script* "/bin/sh $output",
73127 +   but could eventually absorb all of the scripts functionality and
73128 +   exec $objdir/$outputname directly.
73129 +*/
73130 +EOF
73131 +           cat >> $cwrappersource<<"EOF"
73132 +#include <stdio.h>
73133 +#include <stdlib.h>
73134 +#include <unistd.h>
73135 +#include <malloc.h>
73136 +#include <stdarg.h>
73137 +#include <assert.h>
73138 +
73139 +#if defined(PATH_MAX)
73140 +# define LT_PATHMAX PATH_MAX
73141 +#elif defined(MAXPATHLEN)
73142 +# define LT_PATHMAX MAXPATHLEN
73143 +#else
73144 +# define LT_PATHMAX 1024
73145 +#endif
73146 +
73147 +#ifndef DIR_SEPARATOR
73148 +#define DIR_SEPARATOR '/'
73149 +#endif
73150 +
73151 +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
73152 +  defined (__OS2__)
73153 +#define HAVE_DOS_BASED_FILE_SYSTEM
73154 +#ifndef DIR_SEPARATOR_2
73155 +#define DIR_SEPARATOR_2 '\\'
73156 +#endif
73157 +#endif
73158 +
73159 +#ifndef DIR_SEPARATOR_2
73160 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
73161 +#else /* DIR_SEPARATOR_2 */
73162 +# define IS_DIR_SEPARATOR(ch) \
73163 +        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
73164 +#endif /* DIR_SEPARATOR_2 */
73165 +
73166 +#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
73167 +#define XFREE(stale) do { \
73168 +  if (stale) { free ((void *) stale); stale = 0; } \
73169 +} while (0)
73170 +
73171 +const char *program_name = NULL;
73172 +
73173 +void * xmalloc (size_t num);
73174 +char * xstrdup (const char *string);
73175 +char * basename (const char *name);
73176 +char * fnqualify(const char *path);
73177 +char * strendzap(char *str, const char *pat);
73178 +void lt_fatal (const char *message, ...);
73179 +
73180 +int
73181 +main (int argc, char *argv[])
73182 +{
73183 +  char **newargz;
73184 +  int i;
73185 +
73186 +  program_name = (char *) xstrdup ((char *) basename (argv[0]));
73187 +  newargz = XMALLOC(char *, argc+2);
73188 +EOF
73189 +
73190 +           cat >> $cwrappersource <<EOF
73191 +  newargz[0] = "$SHELL";
73192 +EOF
73193 +
73194 +           cat >> $cwrappersource <<"EOF"
73195 +  newargz[1] = fnqualify(argv[0]);
73196 +  /* we know the script has the same name, without the .exe */
73197 +  /* so make sure newargz[1] doesn't end in .exe */
73198 +  strendzap(newargz[1],".exe");
73199 +  for (i = 1; i < argc; i++)
73200 +    newargz[i+1] = xstrdup(argv[i]);
73201 +  newargz[argc+1] = NULL;
73202 +EOF
73203 +
73204 +           cat >> $cwrappersource <<EOF
73205 +  execv("$SHELL",newargz);
73206 +EOF
73207 +
73208 +           cat >> $cwrappersource <<"EOF"
73209 +}
73210 +
73211 +void *
73212 +xmalloc (size_t num)
73213 +{
73214 +  void * p = (void *) malloc (num);
73215 +  if (!p)
73216 +    lt_fatal ("Memory exhausted");
73217 +
73218 +  return p;
73219 +}
73220 +
73221 +char *
73222 +xstrdup (const char *string)
73223 +{
73224 +  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
73225 +;
73226 +}
73227 +
73228 +char *
73229 +basename (const char *name)
73230 +{
73231 +  const char *base;
73232 +
73233 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
73234 +  /* Skip over the disk name in MSDOS pathnames. */
73235 +  if (isalpha (name[0]) && name[1] == ':')
73236 +    name += 2;
73237 +#endif
73238 +
73239 +  for (base = name; *name; name++)
73240 +    if (IS_DIR_SEPARATOR (*name))
73241 +      base = name + 1;
73242 +  return (char *) base;
73243 +}
73244 +
73245 +char *
73246 +fnqualify(const char *path)
73247 +{
73248 +  size_t size;
73249 +  char *p;
73250 +  char tmp[LT_PATHMAX + 1];
73251 +
73252 +  assert(path != NULL);
73253 +
73254 +  /* Is it qualified already? */
73255 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
73256 +  if (isalpha (path[0]) && path[1] == ':')
73257 +    return xstrdup (path);
73258 +#endif
73259 +  if (IS_DIR_SEPARATOR (path[0]))
73260 +    return xstrdup (path);
73261 +
73262 +  /* prepend the current directory */
73263 +  /* doesn't handle '~' */
73264 +  if (getcwd (tmp, LT_PATHMAX) == NULL)
73265 +    lt_fatal ("getcwd failed");
73266 +  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
73267 +  p = XMALLOC(char, size);
73268 +  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
73269 +  return p;
73270 +}
73271 +
73272 +char *
73273 +strendzap(char *str, const char *pat)
73274 +{
73275 +  size_t len, patlen;
73276 +
73277 +  assert(str != NULL);
73278 +  assert(pat != NULL);
73279 +
73280 +  len = strlen(str);
73281 +  patlen = strlen(pat);
73282 +
73283 +  if (patlen <= len)
73284 +  {
73285 +    str += len - patlen;
73286 +    if (strcmp(str, pat) == 0)
73287 +      *str = '\0';
73288 +  }
73289 +  return str;
73290 +}
73291 +
73292 +static void
73293 +lt_error_core (int exit_status, const char * mode,
73294 +          const char * message, va_list ap)
73295 +{
73296 +  fprintf (stderr, "%s: %s: ", program_name, mode);
73297 +  vfprintf (stderr, message, ap);
73298 +  fprintf (stderr, ".\n");
73299 +
73300 +  if (exit_status >= 0)
73301 +    exit (exit_status);
73302 +}
73303 +
73304 +void
73305 +lt_fatal (const char *message, ...)
73306 +{
73307 +  va_list ap;
73308 +  va_start (ap, message);
73309 +  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
73310 +  va_end (ap);
73311 +}
73312 +EOF
73313 +         # we should really use a build-platform specific compiler
73314 +         # here, but OTOH, the wrappers (shell script and this C one)
73315 +         # are only useful if you want to execute the "real" binary.
73316 +         # Since the "real" binary is built for $host, then this
73317 +         # wrapper might as well be built for $host, too.
73318 +         $run $LTCC -s -o $cwrapper $cwrappersource
73319 +         ;;
73320 +       esac
73321 +       $rm $output
73322 +       trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
73323 +
73324 +       $echo > $output "\
73325 +#! $SHELL
73326 +
73327 +# $output - temporary wrapper script for $objdir/$outputname
73328 +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
73329 +#
73330 +# The $output program cannot be directly executed until all the libtool
73331 +# libraries that it depends on are installed.
73332 +#
73333 +# This wrapper script should never be moved out of the build directory.
73334 +# If it is, it will not operate correctly.
73335 +
73336 +# Sed substitution that helps us do robust quoting.  It backslashifies
73337 +# metacharacters that are still active within double-quoted strings.
73338 +Xsed='${SED} -e 1s/^X//'
73339 +sed_quote_subst='$sed_quote_subst'
73340 +
73341 +# The HP-UX ksh and POSIX shell print the target directory to stdout
73342 +# if CDPATH is set.
73343 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
73344 +
73345 +relink_command=\"$relink_command\"
73346 +
73347 +# This environment variable determines our operation mode.
73348 +if test \"\$libtool_install_magic\" = \"$magic\"; then
73349 +  # install mode needs the following variable:
73350 +  notinst_deplibs='$notinst_deplibs'
73351 +else
73352 +  # When we are sourced in execute mode, \$file and \$echo are already set.
73353 +  if test \"\$libtool_execute_magic\" != \"$magic\"; then
73354 +    echo=\"$qecho\"
73355 +    file=\"\$0\"
73356 +    # Make sure echo works.
73357 +    if test \"X\$1\" = X--no-reexec; then
73358 +      # Discard the --no-reexec flag, and continue.
73359 +      shift
73360 +    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
73361 +      # Yippee, \$echo works!
73362 +      :
73363 +    else
73364 +      # Restart under the correct shell, and then maybe \$echo will work.
73365 +      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
73366 +    fi
73367 +  fi\
73368 +"
73369 +       $echo >> $output "\
73370 +
73371 +  # Find the directory that this script lives in.
73372 +  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
73373 +  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
73374 +
73375 +  # Follow symbolic links until we get to the real thisdir.
73376 +  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
73377 +  while test -n \"\$file\"; do
73378 +    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
73379 +
73380 +    # If there was a directory component, then change thisdir.
73381 +    if test \"x\$destdir\" != \"x\$file\"; then
73382 +      case \"\$destdir\" in
73383 +      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
73384 +      *) thisdir=\"\$thisdir/\$destdir\" ;;
73385 +      esac
73386 +    fi
73387 +
73388 +    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
73389 +    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
73390 +  done
73391 +
73392 +  # Try to get the absolute directory name.
73393 +  absdir=\`cd \"\$thisdir\" && pwd\`
73394 +  test -n \"\$absdir\" && thisdir=\"\$absdir\"
73395 +"
73396 +
73397 +       if test "$fast_install" = yes; then
73398 +         $echo >> $output "\
73399 +  program=lt-'$outputname'$exeext
73400 +  progdir=\"\$thisdir/$objdir\"
73401 +
73402 +  if test ! -f \"\$progdir/\$program\" || \\
73403 +     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
73404 +       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
73405 +
73406 +    file=\"\$\$-\$program\"
73407 +
73408 +    if test ! -d \"\$progdir\"; then
73409 +      $mkdir \"\$progdir\"
73410 +    else
73411 +      $rm \"\$progdir/\$file\"
73412 +    fi"
73413 +
73414 +         $echo >> $output "\
73415 +
73416 +    # relink executable if necessary
73417 +    if test -n \"\$relink_command\"; then
73418 +      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
73419 +      else
73420 +       $echo \"\$relink_command_output\" >&2
73421 +       $rm \"\$progdir/\$file\"
73422 +       exit $EXIT_FAILURE
73423 +      fi
73424 +    fi
73425 +
73426 +    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
73427 +    { $rm \"\$progdir/\$program\";
73428 +      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
73429 +    $rm \"\$progdir/\$file\"
73430 +  fi"
73431 +       else
73432 +         $echo >> $output "\
73433 +  program='$outputname'
73434 +  progdir=\"\$thisdir/$objdir\"
73435 +"
73436 +       fi
73437 +
73438 +       $echo >> $output "\
73439 +
73440 +  if test -f \"\$progdir/\$program\"; then"
73441 +
73442 +       # Export our shlibpath_var if we have one.
73443 +       if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
73444 +         $echo >> $output "\
73445 +    # Add our own library path to $shlibpath_var
73446 +    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
73447 +
73448 +    # Some systems cannot cope with colon-terminated $shlibpath_var
73449 +    # The second colon is a workaround for a bug in BeOS R4 sed
73450 +    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
73451 +
73452 +    export $shlibpath_var
73453 +"
73454 +       fi
73455 +
73456 +       # fixup the dll searchpath if we need to.
73457 +       if test -n "$dllsearchpath"; then
73458 +         $echo >> $output "\
73459 +    # Add the dll search path components to the executable PATH
73460 +    PATH=$dllsearchpath:\$PATH
73461 +"
73462 +       fi
73463 +
73464 +       $echo >> $output "\
73465 +    if test \"\$libtool_execute_magic\" != \"$magic\"; then
73466 +      # Run the actual program with our arguments.
73467 +"
73468 +       case $host in
73469 +       # Backslashes separate directories on plain windows
73470 +       *-*-mingw | *-*-os2*)
73471 +         $echo >> $output "\
73472 +      exec \$progdir\\\\\$program \${1+\"\$@\"}
73473 +"
73474 +         ;;
73475 +
73476 +       *)
73477 +         $echo >> $output "\
73478 +      exec \$progdir/\$program \${1+\"\$@\"}
73479 +"
73480 +         ;;
73481 +       esac
73482 +       $echo >> $output "\
73483 +      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
73484 +      exit $EXIT_FAILURE
73485 +    fi
73486 +  else
73487 +    # The program doesn't exist.
73488 +    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
73489 +    \$echo \"This script is just a wrapper for \$program.\" 1>&2
73490 +    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
73491 +    exit $EXIT_FAILURE
73492 +  fi
73493 +fi\
73494 +"
73495 +       chmod +x $output
73496 +      fi
73497 +      exit $EXIT_SUCCESS
73498 +      ;;
73499 +    esac
73500 +
73501 +    # See if we need to build an old-fashioned archive.
73502 +    for oldlib in $oldlibs; do
73503 +
73504 +      if test "$build_libtool_libs" = convenience; then
73505 +       oldobjs="$libobjs_save"
73506 +       addlibs="$convenience"
73507 +       build_libtool_libs=no
73508 +      else
73509 +       if test "$build_libtool_libs" = module; then
73510 +         oldobjs="$libobjs_save"
73511 +         build_libtool_libs=no
73512 +       else
73513 +         oldobjs="$old_deplibs $non_pic_objects"
73514 +       fi
73515 +       addlibs="$old_convenience"
73516 +      fi
73517 +
73518 +      if test -n "$addlibs"; then
73519 +       gentop="$output_objdir/${outputname}x"
73520 +       generated="$generated $gentop"
73521 +
73522 +       func_extract_archives $gentop $addlibs
73523 +       oldobjs="$oldobjs $func_extract_archives_result"
73524 +      fi
73525 +
73526 +      # Do each command in the archive commands.
73527 +      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
73528 +       cmds=$old_archive_from_new_cmds
73529 +      else
73530 +       eval cmds=\"$old_archive_cmds\"
73531 +
73532 +       if len=`expr "X$cmds" : ".*"` &&
73533 +            test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
73534 +         cmds=$old_archive_cmds
73535 +       else
73536 +         # the command line is too long to link in one step, link in parts
73537 +         $echo "using piecewise archive linking..."
73538 +         save_RANLIB=$RANLIB
73539 +         RANLIB=:
73540 +         objlist=
73541 +         concat_cmds=
73542 +         save_oldobjs=$oldobjs
73543 +         # GNU ar 2.10+ was changed to match POSIX; thus no paths are
73544 +         # encoded into archives.  This makes 'ar r' malfunction in
73545 +         # this piecewise linking case whenever conflicting object
73546 +         # names appear in distinct ar calls; check, warn and compensate.
73547 +           if (for obj in $save_oldobjs
73548 +           do
73549 +             $echo "X$obj" | $Xsed -e 's%^.*/%%'
73550 +           done | sort | sort -uc >/dev/null 2>&1); then
73551 +           :
73552 +         else
73553 +           $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
73554 +           $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
73555 +           AR_FLAGS=cq
73556 +         fi
73557 +         # Is there a better way of finding the last object in the list?
73558 +         for obj in $save_oldobjs
73559 +         do
73560 +           last_oldobj=$obj
73561 +         done
73562 +         for obj in $save_oldobjs
73563 +         do
73564 +           oldobjs="$objlist $obj"
73565 +           objlist="$objlist $obj"
73566 +           eval test_cmds=\"$old_archive_cmds\"
73567 +           if len=`expr "X$test_cmds" : ".*"` &&
73568 +              test "$len" -le "$max_cmd_len"; then
73569 +             :
73570 +           else
73571 +             # the above command should be used before it gets too long
73572 +             oldobjs=$objlist
73573 +             if test "$obj" = "$last_oldobj" ; then
73574 +               RANLIB=$save_RANLIB
73575 +             fi
73576 +             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
73577 +             eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
73578 +             objlist=
73579 +           fi
73580 +         done
73581 +         RANLIB=$save_RANLIB
73582 +         oldobjs=$objlist
73583 +         if test "X$oldobjs" = "X" ; then
73584 +           eval cmds=\"\$concat_cmds\"
73585 +         else
73586 +           eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
73587 +         fi
73588 +       fi
73589 +      fi
73590 +      save_ifs="$IFS"; IFS='~'
73591 +      for cmd in $cmds; do
73592 +        eval cmd=\"$cmd\"
73593 +       IFS="$save_ifs"
73594 +       $show "$cmd"
73595 +       $run eval "$cmd" || exit $?
73596 +      done
73597 +      IFS="$save_ifs"
73598 +    done
73599 +
73600 +    if test -n "$generated"; then
73601 +      $show "${rm}r$generated"
73602 +      $run ${rm}r$generated
73603 +    fi
73604 +
73605 +    # Now create the libtool archive.
73606 +    case $output in
73607 +    *.la)
73608 +      old_library=
73609 +      test "$build_old_libs" = yes && old_library="$libname.$libext"
73610 +      $show "creating $output"
73611 +
73612 +      # Preserve any variables that may affect compiler behavior
73613 +      for var in $variables_saved_for_relink; do
73614 +       if eval test -z \"\${$var+set}\"; then
73615 +         relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
73616 +       elif eval var_value=\$$var; test -z "$var_value"; then
73617 +         relink_command="$var=; export $var; $relink_command"
73618 +       else
73619 +         var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
73620 +         relink_command="$var=\"$var_value\"; export $var; $relink_command"
73621 +       fi
73622 +      done
73623 +      # Quote the link command for shipping.
73624 +      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
73625 +      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
73626 +      if test "$hardcode_automatic" = yes ; then
73627 +       relink_command=
73628 +      fi
73629 +
73630 +
73631 +      # Only create the output if not a dry run.
73632 +      if test -z "$run"; then
73633 +       for installed in no yes; do
73634 +         if test "$installed" = yes; then
73635 +           if test -z "$install_libdir"; then
73636 +             break
73637 +           fi
73638 +           output="$output_objdir/$outputname"i
73639 +           # Replace all uninstalled libtool libraries with the installed ones
73640 +           newdependency_libs=
73641 +           for deplib in $dependency_libs; do
73642 +             case $deplib in
73643 +             *.la)
73644 +               name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
73645 +               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
73646 +               if test -z "$libdir"; then
73647 +                 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
73648 +                 exit $EXIT_FAILURE
73649 +               fi
73650 +               newdependency_libs="$newdependency_libs $libdir/$name"
73651 +               ;;
73652 +             *) newdependency_libs="$newdependency_libs $deplib" ;;
73653 +             esac
73654 +           done
73655 +           dependency_libs="$newdependency_libs"
73656 +           newdlfiles=
73657 +           for lib in $dlfiles; do
73658 +             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
73659 +             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
73660 +             if test -z "$libdir"; then
73661 +               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
73662 +               exit $EXIT_FAILURE
73663 +             fi
73664 +             newdlfiles="$newdlfiles $libdir/$name"
73665 +           done
73666 +           dlfiles="$newdlfiles"
73667 +           newdlprefiles=
73668 +           for lib in $dlprefiles; do
73669 +             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
73670 +             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
73671 +             if test -z "$libdir"; then
73672 +               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
73673 +               exit $EXIT_FAILURE
73674 +             fi
73675 +             newdlprefiles="$newdlprefiles $libdir/$name"
73676 +           done
73677 +           dlprefiles="$newdlprefiles"
73678 +         else
73679 +           newdlfiles=
73680 +           for lib in $dlfiles; do
73681 +             case $lib in
73682 +               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
73683 +               *) abs=`pwd`"/$lib" ;;
73684 +             esac
73685 +             newdlfiles="$newdlfiles $abs"
73686 +           done
73687 +           dlfiles="$newdlfiles"
73688 +           newdlprefiles=
73689 +           for lib in $dlprefiles; do
73690 +             case $lib in
73691 +               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
73692 +               *) abs=`pwd`"/$lib" ;;
73693 +             esac
73694 +             newdlprefiles="$newdlprefiles $abs"
73695 +           done
73696 +           dlprefiles="$newdlprefiles"
73697 +         fi
73698 +         $rm $output
73699 +         # place dlname in correct position for cygwin
73700 +         tdlname=$dlname
73701 +         case $host,$output,$installed,$module,$dlname in
73702 +           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
73703 +         esac
73704 +         $echo > $output "\
73705 +# $outputname - a libtool library file
73706 +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
73707 +#
73708 +# Please DO NOT delete this file!
73709 +# It is necessary for linking the library.
73710 +
73711 +# The name that we can dlopen(3).
73712 +dlname='$tdlname'
73713 +
73714 +# Names of this library.
73715 +library_names='$library_names'
73716 +
73717 +# The name of the static archive.
73718 +old_library='$old_library'
73719 +
73720 +# Libraries that this one depends upon.
73721 +dependency_libs='$dependency_libs'
73722 +
73723 +# Version information for $libname.
73724 +current=$current
73725 +age=$age
73726 +revision=$revision
73727 +
73728 +# Is this an already installed library?
73729 +installed=$installed
73730 +
73731 +# Should we warn about portability when linking against -modules?
73732 +shouldnotlink=$module
73733 +
73734 +# Files to dlopen/dlpreopen
73735 +dlopen='$dlfiles'
73736 +dlpreopen='$dlprefiles'
73737 +
73738 +# Directory that this library needs to be installed in:
73739 +libdir='$install_libdir'"
73740 +         if test "$installed" = no && test "$need_relink" = yes; then
73741 +           $echo >> $output "\
73742 +relink_command=\"$relink_command\""
73743 +         fi
73744 +       done
73745 +      fi
73746 +
73747 +      # Do a symbolic link so that the libtool archive can be found in
73748 +      # LD_LIBRARY_PATH before the program is installed.
73749 +      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
73750 +      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
73751 +      ;;
73752 +    esac
73753 +    exit $EXIT_SUCCESS
73754 +    ;;
73755 +
73756 +  # libtool install mode
73757 +  install)
73758 +    modename="$modename: install"
73759 +
73760 +    # There may be an optional sh(1) argument at the beginning of
73761 +    # install_prog (especially on Windows NT).
73762 +    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
73763 +       # Allow the use of GNU shtool's install command.
73764 +       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
73765 +      # Aesthetically quote it.
73766 +      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
73767 +      case $arg in
73768 +      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
73769 +       arg="\"$arg\""
73770 +       ;;
73771 +      esac
73772 +      install_prog="$arg "
73773 +      arg="$1"
73774 +      shift
73775 +    else
73776 +      install_prog=
73777 +      arg="$nonopt"
73778 +    fi
73779 +
73780 +    # The real first argument should be the name of the installation program.
73781 +    # Aesthetically quote it.
73782 +    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
73783 +    case $arg in
73784 +    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
73785 +      arg="\"$arg\""
73786 +      ;;
73787 +    esac
73788 +    install_prog="$install_prog$arg"
73789 +
73790 +    # We need to accept at least all the BSD install flags.
73791 +    dest=
73792 +    files=
73793 +    opts=
73794 +    prev=
73795 +    install_type=
73796 +    isdir=no
73797 +    stripme=
73798 +    for arg
73799 +    do
73800 +      if test -n "$dest"; then
73801 +       files="$files $dest"
73802 +       dest="$arg"
73803 +       continue
73804 +      fi
73805 +
73806 +      case $arg in
73807 +      -d) isdir=yes ;;
73808 +      -f) prev="-f" ;;
73809 +      -g) prev="-g" ;;
73810 +      -m) prev="-m" ;;
73811 +      -o) prev="-o" ;;
73812 +      -s)
73813 +       stripme=" -s"
73814 +       continue
73815 +       ;;
73816 +      -*) ;;
73817 +
73818 +      *)
73819 +       # If the previous option needed an argument, then skip it.
73820 +       if test -n "$prev"; then
73821 +         prev=
73822 +       else
73823 +         dest="$arg"
73824 +         continue
73825 +       fi
73826 +       ;;
73827 +      esac
73828 +
73829 +      # Aesthetically quote the argument.
73830 +      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
73831 +      case $arg in
73832 +      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
73833 +       arg="\"$arg\""
73834 +       ;;
73835 +      esac
73836 +      install_prog="$install_prog $arg"
73837 +    done
73838 +
73839 +    if test -z "$install_prog"; then
73840 +      $echo "$modename: you must specify an install program" 1>&2
73841 +      $echo "$help" 1>&2
73842 +      exit $EXIT_FAILURE
73843 +    fi
73844 +
73845 +    if test -n "$prev"; then
73846 +      $echo "$modename: the \`$prev' option requires an argument" 1>&2
73847 +      $echo "$help" 1>&2
73848 +      exit $EXIT_FAILURE
73849 +    fi
73850 +
73851 +    if test -z "$files"; then
73852 +      if test -z "$dest"; then
73853 +       $echo "$modename: no file or destination specified" 1>&2
73854 +      else
73855 +       $echo "$modename: you must specify a destination" 1>&2
73856 +      fi
73857 +      $echo "$help" 1>&2
73858 +      exit $EXIT_FAILURE
73859 +    fi
73860 +
73861 +    # Strip any trailing slash from the destination.
73862 +    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
73863 +
73864 +    # Check to see that the destination is a directory.
73865 +    test -d "$dest" && isdir=yes
73866 +    if test "$isdir" = yes; then
73867 +      destdir="$dest"
73868 +      destname=
73869 +    else
73870 +      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
73871 +      test "X$destdir" = "X$dest" && destdir=.
73872 +      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
73873 +
73874 +      # Not a directory, so check to see that there is only one file specified.
73875 +      set dummy $files
73876 +      if test "$#" -gt 2; then
73877 +       $echo "$modename: \`$dest' is not a directory" 1>&2
73878 +       $echo "$help" 1>&2
73879 +       exit $EXIT_FAILURE
73880 +      fi
73881 +    fi
73882 +    case $destdir in
73883 +    [\\/]* | [A-Za-z]:[\\/]*) ;;
73884 +    *)
73885 +      for file in $files; do
73886 +       case $file in
73887 +       *.lo) ;;
73888 +       *)
73889 +         $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
73890 +         $echo "$help" 1>&2
73891 +         exit $EXIT_FAILURE
73892 +         ;;
73893 +       esac
73894 +      done
73895 +      ;;
73896 +    esac
73897 +
73898 +    # This variable tells wrapper scripts just to set variables rather
73899 +    # than running their programs.
73900 +    libtool_install_magic="$magic"
73901 +
73902 +    staticlibs=
73903 +    future_libdirs=
73904 +    current_libdirs=
73905 +    for file in $files; do
73906 +
73907 +      # Do each installation.
73908 +      case $file in
73909 +      *.$libext)
73910 +       # Do the static libraries later.
73911 +       staticlibs="$staticlibs $file"
73912 +       ;;
73913 +
73914 +      *.la)
73915 +       # Check to see that this really is a libtool archive.
73916 +       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
73917 +       else
73918 +         $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
73919 +         $echo "$help" 1>&2
73920 +         exit $EXIT_FAILURE
73921 +       fi
73922 +
73923 +       library_names=
73924 +       old_library=
73925 +       relink_command=
73926 +       # If there is no directory component, then add one.
73927 +       case $file in
73928 +       */* | *\\*) . $file ;;
73929 +       *) . ./$file ;;
73930 +       esac
73931 +
73932 +       # Add the libdir to current_libdirs if it is the destination.
73933 +       if test "X$destdir" = "X$libdir"; then
73934 +         case "$current_libdirs " in
73935 +         *" $libdir "*) ;;
73936 +         *) current_libdirs="$current_libdirs $libdir" ;;
73937 +         esac
73938 +       else
73939 +         # Note the libdir as a future libdir.
73940 +         case "$future_libdirs " in
73941 +         *" $libdir "*) ;;
73942 +         *) future_libdirs="$future_libdirs $libdir" ;;
73943 +         esac
73944 +       fi
73945 +
73946 +       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
73947 +       test "X$dir" = "X$file/" && dir=
73948 +       dir="$dir$objdir"
73949 +
73950 +       if test -n "$relink_command"; then
73951 +         # Determine the prefix the user has applied to our future dir.
73952 +         inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
73953 +
73954 +         # Don't allow the user to place us outside of our expected
73955 +         # location b/c this prevents finding dependent libraries that
73956 +         # are installed to the same prefix.
73957 +         # At present, this check doesn't affect windows .dll's that
73958 +         # are installed into $libdir/../bin (currently, that works fine)
73959 +         # but it's something to keep an eye on.
73960 +         if test "$inst_prefix_dir" = "$destdir"; then
73961 +           $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
73962 +           exit $EXIT_FAILURE
73963 +         fi
73964 +
73965 +         if test -n "$inst_prefix_dir"; then
73966 +           # Stick the inst_prefix_dir data into the link command.
73967 +           relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
73968 +         else
73969 +           relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
73970 +         fi
73971 +
73972 +         $echo "$modename: warning: relinking \`$file'" 1>&2
73973 +         $show "$relink_command"
73974 +         if $run eval "$relink_command"; then :
73975 +         else
73976 +           $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
73977 +           exit $EXIT_FAILURE
73978 +         fi
73979 +       fi
73980 +
73981 +       # See the names of the shared library.
73982 +       set dummy $library_names
73983 +       if test -n "$2"; then
73984 +         realname="$2"
73985 +         shift
73986 +         shift
73987 +
73988 +         srcname="$realname"
73989 +         test -n "$relink_command" && srcname="$realname"T
73990 +
73991 +         # Install the shared library and build the symlinks.
73992 +         $show "$install_prog $dir/$srcname $destdir/$realname"
73993 +         $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
73994 +         if test -n "$stripme" && test -n "$striplib"; then
73995 +           $show "$striplib $destdir/$realname"
73996 +           $run eval "$striplib $destdir/$realname" || exit $?
73997 +         fi
73998 +
73999 +         if test "$#" -gt 0; then
74000 +           # Delete the old symlinks, and create new ones.
74001 +           for linkname
74002 +           do
74003 +             if test "$linkname" != "$realname"; then
74004 +               $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
74005 +               $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
74006 +             fi
74007 +           done
74008 +         fi
74009 +
74010 +         # Do each command in the postinstall commands.
74011 +         lib="$destdir/$realname"
74012 +         cmds=$postinstall_cmds
74013 +         save_ifs="$IFS"; IFS='~'
74014 +         for cmd in $cmds; do
74015 +           IFS="$save_ifs"
74016 +           eval cmd=\"$cmd\"
74017 +           $show "$cmd"
74018 +           $run eval "$cmd" || exit $?
74019 +         done
74020 +         IFS="$save_ifs"
74021 +       fi
74022 +
74023 +       # Install the pseudo-library for information purposes.
74024 +       name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
74025 +       instname="$dir/$name"i
74026 +       $show "$install_prog $instname $destdir/$name"
74027 +       $run eval "$install_prog $instname $destdir/$name" || exit $?
74028 +
74029 +       # Maybe install the static library, too.
74030 +       test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
74031 +       ;;
74032 +
74033 +      *.lo)
74034 +       # Install (i.e. copy) a libtool object.
74035 +
74036 +       # Figure out destination file name, if it wasn't already specified.
74037 +       if test -n "$destname"; then
74038 +         destfile="$destdir/$destname"
74039 +       else
74040 +         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
74041 +         destfile="$destdir/$destfile"
74042 +       fi
74043 +
74044 +       # Deduce the name of the destination old-style object file.
74045 +       case $destfile in
74046 +       *.lo)
74047 +         staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
74048 +         ;;
74049 +       *.$objext)
74050 +         staticdest="$destfile"
74051 +         destfile=
74052 +         ;;
74053 +       *)
74054 +         $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
74055 +         $echo "$help" 1>&2
74056 +         exit $EXIT_FAILURE
74057 +         ;;
74058 +       esac
74059 +
74060 +       # Install the libtool object if requested.
74061 +       if test -n "$destfile"; then
74062 +         $show "$install_prog $file $destfile"
74063 +         $run eval "$install_prog $file $destfile" || exit $?
74064 +       fi
74065 +
74066 +       # Install the old object if enabled.
74067 +       if test "$build_old_libs" = yes; then
74068 +         # Deduce the name of the old-style object file.
74069 +         staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
74070 +
74071 +         $show "$install_prog $staticobj $staticdest"
74072 +         $run eval "$install_prog \$staticobj \$staticdest" || exit $?
74073 +       fi
74074 +       exit $EXIT_SUCCESS
74075 +       ;;
74076 +
74077 +      *)
74078 +       # Figure out destination file name, if it wasn't already specified.
74079 +       if test -n "$destname"; then
74080 +         destfile="$destdir/$destname"
74081 +       else
74082 +         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
74083 +         destfile="$destdir/$destfile"
74084 +       fi
74085 +
74086 +       # If the file is missing, and there is a .exe on the end, strip it
74087 +       # because it is most likely a libtool script we actually want to
74088 +       # install
74089 +       stripped_ext=""
74090 +       case $file in
74091 +         *.exe)
74092 +           if test ! -f "$file"; then
74093 +             file=`$echo $file|${SED} 's,.exe$,,'`
74094 +             stripped_ext=".exe"
74095 +           fi
74096 +           ;;
74097 +       esac
74098 +
74099 +       # Do a test to see if this is really a libtool program.
74100 +       case $host in
74101 +       *cygwin*|*mingw*)
74102 +           wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
74103 +           ;;
74104 +       *)
74105 +           wrapper=$file
74106 +           ;;
74107 +       esac
74108 +       if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
74109 +         notinst_deplibs=
74110 +         relink_command=
74111 +
74112 +         # To insure that "foo" is sourced, and not "foo.exe",
74113 +         # finese the cygwin/MSYS system by explicitly sourcing "foo."
74114 +         # which disallows the automatic-append-.exe behavior.
74115 +         case $build in
74116 +         *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
74117 +         *) wrapperdot=${wrapper} ;;
74118 +         esac
74119 +         # If there is no directory component, then add one.
74120 +         case $file in
74121 +         */* | *\\*) . ${wrapperdot} ;;
74122 +         *) . ./${wrapperdot} ;;
74123 +         esac
74124 +
74125 +         # Check the variables that should have been set.
74126 +         if test -z "$notinst_deplibs"; then
74127 +           $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
74128 +           exit $EXIT_FAILURE
74129 +         fi
74130 +
74131 +         finalize=yes
74132 +         for lib in $notinst_deplibs; do
74133 +           # Check to see that each library is installed.
74134 +           libdir=
74135 +           if test -f "$lib"; then
74136 +             # If there is no directory component, then add one.
74137 +             case $lib in
74138 +             */* | *\\*) . $lib ;;
74139 +             *) . ./$lib ;;
74140 +             esac
74141 +           fi
74142 +           libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
74143 +           if test -n "$libdir" && test ! -f "$libfile"; then
74144 +             $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
74145 +             finalize=no
74146 +           fi
74147 +         done
74148 +
74149 +         relink_command=
74150 +         # To insure that "foo" is sourced, and not "foo.exe",
74151 +         # finese the cygwin/MSYS system by explicitly sourcing "foo."
74152 +         # which disallows the automatic-append-.exe behavior.
74153 +         case $build in
74154 +         *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
74155 +         *) wrapperdot=${wrapper} ;;
74156 +         esac
74157 +         # If there is no directory component, then add one.
74158 +         case $file in
74159 +         */* | *\\*) . ${wrapperdot} ;;
74160 +         *) . ./${wrapperdot} ;;
74161 +         esac
74162 +
74163 +         outputname=
74164 +         if test "$fast_install" = no && test -n "$relink_command"; then
74165 +           if test "$finalize" = yes && test -z "$run"; then
74166 +             tmpdir="/tmp"
74167 +             test -n "$TMPDIR" && tmpdir="$TMPDIR"
74168 +             tmpdir="$tmpdir/libtool-$$"
74169 +             save_umask=`umask`
74170 +             umask 0077
74171 +             if $mkdir "$tmpdir"; then
74172 +               umask $save_umask
74173 +             else
74174 +               umask $save_umask
74175 +               $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
74176 +               continue
74177 +             fi
74178 +             file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
74179 +             outputname="$tmpdir/$file"
74180 +             # Replace the output file specification.
74181 +             relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
74182 +
74183 +             $show "$relink_command"
74184 +             if $run eval "$relink_command"; then :
74185 +             else
74186 +               $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
74187 +               ${rm}r "$tmpdir"
74188 +               continue
74189 +             fi
74190 +             file="$outputname"
74191 +           else
74192 +             $echo "$modename: warning: cannot relink \`$file'" 1>&2
74193 +           fi
74194 +         else
74195 +           # Install the binary that we compiled earlier.
74196 +           file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
74197 +         fi
74198 +       fi
74199 +
74200 +       # remove .exe since cygwin /usr/bin/install will append another
74201 +       # one anyways
74202 +       case $install_prog,$host in
74203 +       */usr/bin/install*,*cygwin*)
74204 +         case $file:$destfile in
74205 +         *.exe:*.exe)
74206 +           # this is ok
74207 +           ;;
74208 +         *.exe:*)
74209 +           destfile=$destfile.exe
74210 +           ;;
74211 +         *:*.exe)
74212 +           destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
74213 +           ;;
74214 +         esac
74215 +         ;;
74216 +       esac
74217 +       $show "$install_prog$stripme $file $destfile"
74218 +       $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
74219 +       test -n "$outputname" && ${rm}r "$tmpdir"
74220 +       ;;
74221 +      esac
74222 +    done
74223 +
74224 +    for file in $staticlibs; do
74225 +      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
74226 +
74227 +      # Set up the ranlib parameters.
74228 +      oldlib="$destdir/$name"
74229 +
74230 +      $show "$install_prog $file $oldlib"
74231 +      $run eval "$install_prog \$file \$oldlib" || exit $?
74232 +
74233 +      if test -n "$stripme" && test -n "$old_striplib"; then
74234 +       $show "$old_striplib $oldlib"
74235 +       $run eval "$old_striplib $oldlib" || exit $?
74236 +      fi
74237 +
74238 +      # Do each command in the postinstall commands.
74239 +      cmds=$old_postinstall_cmds
74240 +      save_ifs="$IFS"; IFS='~'
74241 +      for cmd in $cmds; do
74242 +       IFS="$save_ifs"
74243 +       eval cmd=\"$cmd\"
74244 +       $show "$cmd"
74245 +       $run eval "$cmd" || exit $?
74246 +      done
74247 +      IFS="$save_ifs"
74248 +    done
74249 +
74250 +    if test -n "$future_libdirs"; then
74251 +      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
74252 +    fi
74253 +
74254 +    if test -n "$current_libdirs"; then
74255 +      # Maybe just do a dry run.
74256 +      test -n "$run" && current_libdirs=" -n$current_libdirs"
74257 +      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
74258 +    else
74259 +      exit $EXIT_SUCCESS
74260 +    fi
74261 +    ;;
74262 +
74263 +  # libtool finish mode
74264 +  finish)
74265 +    modename="$modename: finish"
74266 +    libdirs="$nonopt"
74267 +    admincmds=
74268 +
74269 +    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
74270 +      for dir
74271 +      do
74272 +       libdirs="$libdirs $dir"
74273 +      done
74274 +
74275 +      for libdir in $libdirs; do
74276 +       if test -n "$finish_cmds"; then
74277 +         # Do each command in the finish commands.
74278 +         cmds=$finish_cmds
74279 +         save_ifs="$IFS"; IFS='~'
74280 +         for cmd in $cmds; do
74281 +           IFS="$save_ifs"
74282 +           eval cmd=\"$cmd\"
74283 +           $show "$cmd"
74284 +           $run eval "$cmd" || admincmds="$admincmds
74285 +       $cmd"
74286 +         done
74287 +         IFS="$save_ifs"
74288 +       fi
74289 +       if test -n "$finish_eval"; then
74290 +         # Do the single finish_eval.
74291 +         eval cmds=\"$finish_eval\"
74292 +         $run eval "$cmds" || admincmds="$admincmds
74293 +       $cmds"
74294 +       fi
74295 +      done
74296 +    fi
74297 +
74298 +    # Exit here if they wanted silent mode.
74299 +    test "$show" = : && exit $EXIT_SUCCESS
74300 +
74301 +    $echo "----------------------------------------------------------------------"
74302 +    $echo "Libraries have been installed in:"
74303 +    for libdir in $libdirs; do
74304 +      $echo "   $libdir"
74305 +    done
74306 +    $echo
74307 +    $echo "If you ever happen to want to link against installed libraries"
74308 +    $echo "in a given directory, LIBDIR, you must either use libtool, and"
74309 +    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
74310 +    $echo "flag during linking and do at least one of the following:"
74311 +    if test -n "$shlibpath_var"; then
74312 +      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
74313 +      $echo "     during execution"
74314 +    fi
74315 +    if test -n "$runpath_var"; then
74316 +      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
74317 +      $echo "     during linking"
74318 +    fi
74319 +    if test -n "$hardcode_libdir_flag_spec"; then
74320 +      libdir=LIBDIR
74321 +      eval flag=\"$hardcode_libdir_flag_spec\"
74322 +
74323 +      $echo "   - use the \`$flag' linker flag"
74324 +    fi
74325 +    if test -n "$admincmds"; then
74326 +      $echo "   - have your system administrator run these commands:$admincmds"
74327 +    fi
74328 +    if test -f /etc/ld.so.conf; then
74329 +      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
74330 +    fi
74331 +    $echo
74332 +    $echo "See any operating system documentation about shared libraries for"
74333 +    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
74334 +    $echo "----------------------------------------------------------------------"
74335 +    exit $EXIT_SUCCESS
74336 +    ;;
74337 +
74338 +  # libtool execute mode
74339 +  execute)
74340 +    modename="$modename: execute"
74341 +
74342 +    # The first argument is the command name.
74343 +    cmd="$nonopt"
74344 +    if test -z "$cmd"; then
74345 +      $echo "$modename: you must specify a COMMAND" 1>&2
74346 +      $echo "$help"
74347 +      exit $EXIT_FAILURE
74348 +    fi
74349 +
74350 +    # Handle -dlopen flags immediately.
74351 +    for file in $execute_dlfiles; do
74352 +      if test ! -f "$file"; then
74353 +       $echo "$modename: \`$file' is not a file" 1>&2
74354 +       $echo "$help" 1>&2
74355 +       exit $EXIT_FAILURE
74356 +      fi
74357 +
74358 +      dir=
74359 +      case $file in
74360 +      *.la)
74361 +       # Check to see that this really is a libtool archive.
74362 +       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
74363 +       else
74364 +         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
74365 +         $echo "$help" 1>&2
74366 +         exit $EXIT_FAILURE
74367 +       fi
74368 +
74369 +       # Read the libtool library.
74370 +       dlname=
74371 +       library_names=
74372 +
74373 +       # If there is no directory component, then add one.
74374 +       case $file in
74375 +       */* | *\\*) . $file ;;
74376 +       *) . ./$file ;;
74377 +       esac
74378 +
74379 +       # Skip this library if it cannot be dlopened.
74380 +       if test -z "$dlname"; then
74381 +         # Warn if it was a shared library.
74382 +         test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
74383 +         continue
74384 +       fi
74385 +
74386 +       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
74387 +       test "X$dir" = "X$file" && dir=.
74388 +
74389 +       if test -f "$dir/$objdir/$dlname"; then
74390 +         dir="$dir/$objdir"
74391 +       else
74392 +         $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
74393 +         exit $EXIT_FAILURE
74394 +       fi
74395 +       ;;
74396 +
74397 +      *.lo)
74398 +       # Just add the directory containing the .lo file.
74399 +       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
74400 +       test "X$dir" = "X$file" && dir=.
74401 +       ;;
74402 +
74403 +      *)
74404 +       $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
74405 +       continue
74406 +       ;;
74407 +      esac
74408 +
74409 +      # Get the absolute pathname.
74410 +      absdir=`cd "$dir" && pwd`
74411 +      test -n "$absdir" && dir="$absdir"
74412 +
74413 +      # Now add the directory to shlibpath_var.
74414 +      if eval "test -z \"\$$shlibpath_var\""; then
74415 +       eval "$shlibpath_var=\"\$dir\""
74416 +      else
74417 +       eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
74418 +      fi
74419 +    done
74420 +
74421 +    # This variable tells wrapper scripts just to set shlibpath_var
74422 +    # rather than running their programs.
74423 +    libtool_execute_magic="$magic"
74424 +
74425 +    # Check if any of the arguments is a wrapper script.
74426 +    args=
74427 +    for file
74428 +    do
74429 +      case $file in
74430 +      -*) ;;
74431 +      *)
74432 +       # Do a test to see if this is really a libtool program.
74433 +       if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
74434 +         # If there is no directory component, then add one.
74435 +         case $file in
74436 +         */* | *\\*) . $file ;;
74437 +         *) . ./$file ;;
74438 +         esac
74439 +
74440 +         # Transform arg to wrapped name.
74441 +         file="$progdir/$program"
74442 +       fi
74443 +       ;;
74444 +      esac
74445 +      # Quote arguments (to preserve shell metacharacters).
74446 +      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
74447 +      args="$args \"$file\""
74448 +    done
74449 +
74450 +    if test -z "$run"; then
74451 +      if test -n "$shlibpath_var"; then
74452 +       # Export the shlibpath_var.
74453 +       eval "export $shlibpath_var"
74454 +      fi
74455 +
74456 +      # Restore saved environment variables
74457 +      if test "${save_LC_ALL+set}" = set; then
74458 +       LC_ALL="$save_LC_ALL"; export LC_ALL
74459 +      fi
74460 +      if test "${save_LANG+set}" = set; then
74461 +       LANG="$save_LANG"; export LANG
74462 +      fi
74463 +
74464 +      # Now prepare to actually exec the command.
74465 +      exec_cmd="\"\$cmd\"$args"
74466 +    else
74467 +      # Display what would be done.
74468 +      if test -n "$shlibpath_var"; then
74469 +       eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
74470 +       $echo "export $shlibpath_var"
74471 +      fi
74472 +      eval \$echo \"\$cmd\"$args
74473 +      exit $EXIT_SUCCESS
74474 +    fi
74475 +    ;;
74476 +
74477 +  # libtool clean and uninstall mode
74478 +  clean | uninstall)
74479 +    modename="$modename: $mode"
74480 +    rm="$nonopt"
74481 +    files=
74482 +    rmforce=
74483 +    exit_status=0
74484 +
74485 +    # This variable tells wrapper scripts just to set variables rather
74486 +    # than running their programs.
74487 +    libtool_install_magic="$magic"
74488 +
74489 +    for arg
74490 +    do
74491 +      case $arg in
74492 +      -f) rm="$rm $arg"; rmforce=yes ;;
74493 +      -*) rm="$rm $arg" ;;
74494 +      *) files="$files $arg" ;;
74495 +      esac
74496 +    done
74497 +
74498 +    if test -z "$rm"; then
74499 +      $echo "$modename: you must specify an RM program" 1>&2
74500 +      $echo "$help" 1>&2
74501 +      exit $EXIT_FAILURE
74502 +    fi
74503 +
74504 +    rmdirs=
74505 +
74506 +    origobjdir="$objdir"
74507 +    for file in $files; do
74508 +      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
74509 +      if test "X$dir" = "X$file"; then
74510 +       dir=.
74511 +       objdir="$origobjdir"
74512 +      else
74513 +       objdir="$dir/$origobjdir"
74514 +      fi
74515 +      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
74516 +      test "$mode" = uninstall && objdir="$dir"
74517 +
74518 +      # Remember objdir for removal later, being careful to avoid duplicates
74519 +      if test "$mode" = clean; then
74520 +       case " $rmdirs " in
74521 +         *" $objdir "*) ;;
74522 +         *) rmdirs="$rmdirs $objdir" ;;
74523 +       esac
74524 +      fi
74525 +
74526 +      # Don't error if the file doesn't exist and rm -f was used.
74527 +      if (test -L "$file") >/dev/null 2>&1 \
74528 +       || (test -h "$file") >/dev/null 2>&1 \
74529 +       || test -f "$file"; then
74530 +       :
74531 +      elif test -d "$file"; then
74532 +       exit_status=1
74533 +       continue
74534 +      elif test "$rmforce" = yes; then
74535 +       continue
74536 +      fi
74537 +
74538 +      rmfiles="$file"
74539 +
74540 +      case $name in
74541 +      *.la)
74542 +       # Possibly a libtool archive, so verify it.
74543 +       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
74544 +         . $dir/$name
74545 +
74546 +         # Delete the libtool libraries and symlinks.
74547 +         for n in $library_names; do
74548 +           rmfiles="$rmfiles $objdir/$n"
74549 +         done
74550 +         test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
74551 +         test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
74552 +
74553 +         if test "$mode" = uninstall; then
74554 +           if test -n "$library_names"; then
74555 +             # Do each command in the postuninstall commands.
74556 +             cmds=$postuninstall_cmds
74557 +             save_ifs="$IFS"; IFS='~'
74558 +             for cmd in $cmds; do
74559 +               IFS="$save_ifs"
74560 +               eval cmd=\"$cmd\"
74561 +               $show "$cmd"
74562 +               $run eval "$cmd"
74563 +               if test "$?" -ne 0 && test "$rmforce" != yes; then
74564 +                 exit_status=1
74565 +               fi
74566 +             done
74567 +             IFS="$save_ifs"
74568 +           fi
74569 +
74570 +           if test -n "$old_library"; then
74571 +             # Do each command in the old_postuninstall commands.
74572 +             cmds=$old_postuninstall_cmds
74573 +             save_ifs="$IFS"; IFS='~'
74574 +             for cmd in $cmds; do
74575 +               IFS="$save_ifs"
74576 +               eval cmd=\"$cmd\"
74577 +               $show "$cmd"
74578 +               $run eval "$cmd"
74579 +               if test "$?" -ne 0 && test "$rmforce" != yes; then
74580 +                 exit_status=1
74581 +               fi
74582 +             done
74583 +             IFS="$save_ifs"
74584 +           fi
74585 +           # FIXME: should reinstall the best remaining shared library.
74586 +         fi
74587 +       fi
74588 +       ;;
74589 +
74590 +      *.lo)
74591 +       # Possibly a libtool object, so verify it.
74592 +       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
74593 +
74594 +         # Read the .lo file
74595 +         . $dir/$name
74596 +
74597 +         # Add PIC object to the list of files to remove.
74598 +         if test -n "$pic_object" \
74599 +            && test "$pic_object" != none; then
74600 +           rmfiles="$rmfiles $dir/$pic_object"
74601 +         fi
74602 +
74603 +         # Add non-PIC object to the list of files to remove.
74604 +         if test -n "$non_pic_object" \
74605 +            && test "$non_pic_object" != none; then
74606 +           rmfiles="$rmfiles $dir/$non_pic_object"
74607 +         fi
74608 +       fi
74609 +       ;;
74610 +
74611 +      *)
74612 +       if test "$mode" = clean ; then
74613 +         noexename=$name
74614 +         case $file in
74615 +         *.exe)
74616 +           file=`$echo $file|${SED} 's,.exe$,,'`
74617 +           noexename=`$echo $name|${SED} 's,.exe$,,'`
74618 +           # $file with .exe has already been added to rmfiles,
74619 +           # add $file without .exe
74620 +           rmfiles="$rmfiles $file"
74621 +           ;;
74622 +         esac
74623 +         # Do a test to see if this is a libtool program.
74624 +         if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
74625 +           relink_command=
74626 +           . $dir/$noexename
74627 +
74628 +           # note $name still contains .exe if it was in $file originally
74629 +           # as does the version of $file that was added into $rmfiles
74630 +           rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
74631 +           if test "$fast_install" = yes && test -n "$relink_command"; then
74632 +             rmfiles="$rmfiles $objdir/lt-$name"
74633 +           fi
74634 +           if test "X$noexename" != "X$name" ; then
74635 +             rmfiles="$rmfiles $objdir/lt-${noexename}.c"
74636 +           fi
74637 +         fi
74638 +       fi
74639 +       ;;
74640 +      esac
74641 +      $show "$rm $rmfiles"
74642 +      $run $rm $rmfiles || exit_status=1
74643 +    done
74644 +    objdir="$origobjdir"
74645 +
74646 +    # Try to remove the ${objdir}s in the directories where we deleted files
74647 +    for dir in $rmdirs; do
74648 +      if test -d "$dir"; then
74649 +       $show "rmdir $dir"
74650 +       $run rmdir $dir >/dev/null 2>&1
74651 +      fi
74652 +    done
74653 +
74654 +    exit $exit_status
74655 +    ;;
74656 +
74657 +  "")
74658 +    $echo "$modename: you must specify a MODE" 1>&2
74659 +    $echo "$generic_help" 1>&2
74660 +    exit $EXIT_FAILURE
74661 +    ;;
74662 +  esac
74663 +
74664 +  if test -z "$exec_cmd"; then
74665 +    $echo "$modename: invalid operation mode \`$mode'" 1>&2
74666 +    $echo "$generic_help" 1>&2
74667 +    exit $EXIT_FAILURE
74668 +  fi
74669 +fi # test -z "$show_help"
74670 +
74671 +if test -n "$exec_cmd"; then
74672 +  eval exec $exec_cmd
74673 +  exit $EXIT_FAILURE
74674 +fi
74675 +
74676 +# We need to display help for each of the modes.
74677 +case $mode in
74678 +"") $echo \
74679 +"Usage: $modename [OPTION]... [MODE-ARG]...
74680 +
74681 +Provide generalized library-building support services.
74682 +
74683 +    --config          show all configuration variables
74684 +    --debug           enable verbose shell tracing
74685 +-n, --dry-run         display commands without modifying any files
74686 +    --features        display basic configuration information and exit
74687 +    --finish          same as \`--mode=finish'
74688 +    --help            display this help message and exit
74689 +    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
74690 +    --quiet           same as \`--silent'
74691 +    --silent          don't print informational messages
74692 +    --tag=TAG         use configuration variables from tag TAG
74693 +    --version         print version information
74694 +
74695 +MODE must be one of the following:
74696 +
74697 +      clean           remove files from the build directory
74698 +      compile         compile a source file into a libtool object
74699 +      execute         automatically set library path, then run a program
74700 +      finish          complete the installation of libtool libraries
74701 +      install         install libraries or executables
74702 +      link            create a library or an executable
74703 +      uninstall       remove libraries from an installed directory
74704 +
74705 +MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
74706 +a more detailed description of MODE.
74707 +
74708 +Report bugs to <bug-libtool@gnu.org>."
74709 +  exit $EXIT_SUCCESS
74710 +  ;;
74711 +
74712 +clean)
74713 +  $echo \
74714 +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
74715 +
74716 +Remove files from the build directory.
74717 +
74718 +RM is the name of the program to use to delete files associated with each FILE
74719 +(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
74720 +to RM.
74721 +
74722 +If FILE is a libtool library, object or program, all the files associated
74723 +with it are deleted. Otherwise, only FILE itself is deleted using RM."
74724 +  ;;
74725 +
74726 +compile)
74727 +  $echo \
74728 +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
74729 +
74730 +Compile a source file into a libtool library object.
74731 +
74732 +This mode accepts the following additional options:
74733 +
74734 +  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
74735 +  -prefer-pic       try to building PIC objects only
74736 +  -prefer-non-pic   try to building non-PIC objects only
74737 +  -static           always build a \`.o' file suitable for static linking
74738 +
74739 +COMPILE-COMMAND is a command to be used in creating a \`standard' object file
74740 +from the given SOURCEFILE.
74741 +
74742 +The output file name is determined by removing the directory component from
74743 +SOURCEFILE, then substituting the C source code suffix \`.c' with the
74744 +library object suffix, \`.lo'."
74745 +  ;;
74746 +
74747 +execute)
74748 +  $echo \
74749 +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
74750 +
74751 +Automatically set library path, then run a program.
74752 +
74753 +This mode accepts the following additional options:
74754 +
74755 +  -dlopen FILE      add the directory containing FILE to the library path
74756 +
74757 +This mode sets the library path environment variable according to \`-dlopen'
74758 +flags.
74759 +
74760 +If any of the ARGS are libtool executable wrappers, then they are translated
74761 +into their corresponding uninstalled binary, and any of their required library
74762 +directories are added to the library path.
74763 +
74764 +Then, COMMAND is executed, with ARGS as arguments."
74765 +  ;;
74766 +
74767 +finish)
74768 +  $echo \
74769 +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
74770 +
74771 +Complete the installation of libtool libraries.
74772 +
74773 +Each LIBDIR is a directory that contains libtool libraries.
74774 +
74775 +The commands that this mode executes may require superuser privileges.  Use
74776 +the \`--dry-run' option if you just want to see what would be executed."
74777 +  ;;
74778 +
74779 +install)
74780 +  $echo \
74781 +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
74782 +
74783 +Install executables or libraries.
74784 +
74785 +INSTALL-COMMAND is the installation command.  The first component should be
74786 +either the \`install' or \`cp' program.
74787 +
74788 +The rest of the components are interpreted as arguments to that command (only
74789 +BSD-compatible install options are recognized)."
74790 +  ;;
74791 +
74792 +link)
74793 +  $echo \
74794 +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
74795 +
74796 +Link object files or libraries together to form another library, or to
74797 +create an executable program.
74798 +
74799 +LINK-COMMAND is a command using the C compiler that you would use to create
74800 +a program from several object files.
74801 +
74802 +The following components of LINK-COMMAND are treated specially:
74803 +
74804 +  -all-static       do not do any dynamic linking at all
74805 +  -avoid-version    do not add a version suffix if possible
74806 +  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
74807 +  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
74808 +  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
74809 +  -export-symbols SYMFILE
74810 +                   try to export only the symbols listed in SYMFILE
74811 +  -export-symbols-regex REGEX
74812 +                   try to export only the symbols matching REGEX
74813 +  -LLIBDIR          search LIBDIR for required installed libraries
74814 +  -lNAME            OUTPUT-FILE requires the installed library libNAME
74815 +  -module           build a library that can dlopened
74816 +  -no-fast-install  disable the fast-install mode
74817 +  -no-install       link a not-installable executable
74818 +  -no-undefined     declare that a library does not refer to external symbols
74819 +  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
74820 +  -objectlist FILE  Use a list of object files found in FILE to specify objects
74821 +  -precious-files-regex REGEX
74822 +                    don't remove output files matching REGEX
74823 +  -release RELEASE  specify package release information
74824 +  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
74825 +  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
74826 +  -static           do not do any dynamic linking of libtool libraries
74827 +  -version-info CURRENT[:REVISION[:AGE]]
74828 +                   specify library version info [each variable defaults to 0]
74829 +
74830 +All other options (arguments beginning with \`-') are ignored.
74831 +
74832 +Every other argument is treated as a filename.  Files ending in \`.la' are
74833 +treated as uninstalled libtool libraries, other files are standard or library
74834 +object files.
74835 +
74836 +If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
74837 +only library objects (\`.lo' files) may be specified, and \`-rpath' is
74838 +required, except when creating a convenience library.
74839 +
74840 +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
74841 +using \`ar' and \`ranlib', or on Windows using \`lib'.
74842 +
74843 +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
74844 +is created, otherwise an executable program is created."
74845 +  ;;
74846 +
74847 +uninstall)
74848 +  $echo \
74849 +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
74850 +
74851 +Remove libraries from an installation directory.
74852 +
74853 +RM is the name of the program to use to delete files associated with each FILE
74854 +(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
74855 +to RM.
74856 +
74857 +If FILE is a libtool library, all the files associated with it are deleted.
74858 +Otherwise, only FILE itself is deleted using RM."
74859 +  ;;
74860 +
74861 +*)
74862 +  $echo "$modename: invalid operation mode \`$mode'" 1>&2
74863 +  $echo "$help" 1>&2
74864 +  exit $EXIT_FAILURE
74865 +  ;;
74866 +esac
74867 +
74868 +$echo
74869 +$echo "Try \`$modename --help' for more information about other modes."
74870 +
74871 +exit $?
74872 +
74873 +# The TAGs below are defined such that we never get into a situation
74874 +# in which we disable both kinds of libraries.  Given conflicting
74875 +# choices, we go for a static library, that is the most portable,
74876 +# since we can't tell whether shared libraries were disabled because
74877 +# the user asked for that or because the platform doesn't support
74878 +# them.  This is particularly important on AIX, because we don't
74879 +# support having both static and shared libraries enabled at the same
74880 +# time on that platform, so we default to a shared-only configuration.
74881 +# If a disable-shared tag is given, we'll fallback to a static-only
74882 +# configuration.  But we'll never go from static-only to shared-only.
74883 +
74884 +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
74885 +build_libtool_libs=no
74886 +build_old_libs=yes
74887 +# ### END LIBTOOL TAG CONFIG: disable-shared
74888 +
74889 +# ### BEGIN LIBTOOL TAG CONFIG: disable-static
74890 +build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
74891 +# ### END LIBTOOL TAG CONFIG: disable-static
74892 +
74893 +# Local Variables:
74894 +# mode:shell-script
74895 +# sh-indentation:2
74896 +# End:
74897 diff -Nru php-5.2.4.vanilla/libevent/Makefile.am php-5.2.4.fpm/libevent/Makefile.am
74898 --- php-5.2.4.vanilla/libevent/Makefile.am      1970-01-01 03:00:00.000000000 +0300
74899 +++ php-5.2.4.fpm/libevent/Makefile.am  2007-08-31 15:47:19.000000000 +0400
74900 @@ -0,0 +1,27 @@
74901 +
74902 +bin_SCRIPTS = event_rpcgen.py
74903 +
74904 +EXTRA_DIST = acconfig.h event.h event-internal.h log.h evsignal.h evdns.3 \
74905 +       evrpc.h evrpc-internal.h \
74906 +       event.3 \
74907 +       kqueue.c epoll_sub.c epoll.c select.c rtsig.c poll.c signal.c \
74908 +       evport.c devpoll.c event_rpcgen.py \
74909 +       compat/sys/queue.h compat/sys/tree.h compat/sys/_time.h
74910 +
74911 +lib_LTLIBRARIES = libevent.la
74912 +
74913 +libevent_la_SOURCES = event.c buffer.c evbuffer.c log.c event_tagging.c \
74914 +       http.c evhttp.h http-internal.h evdns.c evdns.h evrpc.c strlcpy.c \
74915 +       strlcpy-internal.h evrpc.h evrpc-internal.h strlcpy-internal.h \
74916 +       $(SYS_SRC)
74917 +
74918 +libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
74919 +libevent_la_LDFLAGS = -release @VERSION@ -version-info 1:3:0
74920 +
74921 +include_HEADERS = event.h evhttp.h evdns.h evrpc.h
74922 +
74923 +INCLUDES = -I$(top_srcdir)/compat $(SYS_INCLUDES)
74924 +
74925 +man_MANS = event.3 evdns.3
74926 +
74927 +DISTCLEANFILES = *~
74928 diff -Nru php-5.2.4.vanilla/libevent/Makefile.in php-5.2.4.fpm/libevent/Makefile.in
74929 --- php-5.2.4.vanilla/libevent/Makefile.in      1970-01-01 03:00:00.000000000 +0300
74930 +++ php-5.2.4.fpm/libevent/Makefile.in  2007-08-31 15:47:19.000000000 +0400
74931 @@ -0,0 +1,733 @@
74932 +# Makefile.in generated by automake 1.9.5 from Makefile.am.
74933 +# @configure_input@
74934 +
74935 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
74936 +# 2003, 2004, 2005  Free Software Foundation, Inc.
74937 +# This Makefile.in is free software; the Free Software Foundation
74938 +# gives unlimited permission to copy and/or distribute it,
74939 +# with or without modifications, as long as this notice is preserved.
74940 +
74941 +# This program is distributed in the hope that it will be useful,
74942 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
74943 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
74944 +# PARTICULAR PURPOSE.
74945 +
74946 +@SET_MAKE@
74947 +
74948 +
74949 +
74950 +SOURCES = $(libevent_la_SOURCES)
74951 +
74952 +srcdir = @srcdir@
74953 +top_srcdir = @top_srcdir@
74954 +VPATH = @srcdir@
74955 +pkgdatadir = $(datadir)/@PACKAGE@
74956 +pkglibdir = $(libdir)/@PACKAGE@
74957 +pkgincludedir = $(includedir)/@PACKAGE@
74958 +top_builddir = .
74959 +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
74960 +INSTALL = @INSTALL@
74961 +install_sh_DATA = $(install_sh) -c -m 644
74962 +install_sh_PROGRAM = $(install_sh) -c
74963 +install_sh_SCRIPT = $(install_sh) -c
74964 +INSTALL_HEADER = $(INSTALL_DATA)
74965 +transform = $(program_transform_name)
74966 +NORMAL_INSTALL = :
74967 +PRE_INSTALL = :
74968 +POST_INSTALL = :
74969 +NORMAL_UNINSTALL = :
74970 +PRE_UNINSTALL = :
74971 +POST_UNINSTALL = :
74972 +build_triplet = @build@
74973 +host_triplet = @host@
74974 +DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
74975 +       $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
74976 +       $(srcdir)/config.h.in $(top_srcdir)/configure acconfig.h \
74977 +       config.guess config.sub depcomp devpoll.c epoll.c epoll_sub.c \
74978 +       evport.c install-sh kqueue.c ltmain.sh missing mkinstalldirs \
74979 +       poll.c rtsig.c select.c signal.c
74980 +subdir = .
74981 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
74982 +am__aclocal_m4_deps = $(top_srcdir)/configure.in
74983 +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
74984 +       $(ACLOCAL_M4)
74985 +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
74986 + configure.lineno configure.status.lineno
74987 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
74988 +CONFIG_HEADER = config.h
74989 +CONFIG_CLEAN_FILES =
74990 +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
74991 +am__vpath_adj = case $$p in \
74992 +    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
74993 +    *) f=$$p;; \
74994 +  esac;
74995 +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
74996 +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
74997 +       "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(includedir)"
74998 +libLTLIBRARIES_INSTALL = $(INSTALL)
74999 +LTLIBRARIES = $(lib_LTLIBRARIES)
75000 +libevent_la_DEPENDENCIES = @LTLIBOBJS@
75001 +am_libevent_la_OBJECTS = event.lo buffer.lo evbuffer.lo log.lo \
75002 +       event_tagging.lo http.lo evdns.lo evrpc.lo strlcpy.lo
75003 +libevent_la_OBJECTS = $(am_libevent_la_OBJECTS)
75004 +binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
75005 +SCRIPTS = $(bin_SCRIPTS)
75006 +DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
75007 +depcomp = $(SHELL) $(top_srcdir)/depcomp
75008 +am__depfiles_maybe = depfiles
75009 +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
75010 +       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
75011 +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
75012 +       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
75013 +       $(AM_CFLAGS) $(CFLAGS)
75014 +CCLD = $(CC)
75015 +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
75016 +       $(AM_LDFLAGS) $(LDFLAGS) -o $@
75017 +SOURCES = $(libevent_la_SOURCES)
75018 +DIST_SOURCES = $(libevent_la_SOURCES)
75019 +man3dir = $(mandir)/man3
75020 +NROFF = nroff
75021 +MANS = $(man_MANS)
75022 +includeHEADERS_INSTALL = $(INSTALL_HEADER)
75023 +HEADERS = $(include_HEADERS)
75024 +ETAGS = etags
75025 +CTAGS = ctags
75026 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
75027 +distdir = $(PACKAGE)-$(VERSION)
75028 +top_distdir = $(distdir)
75029 +am__remove_distdir = \
75030 +  { test ! -d $(distdir) \
75031 +    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
75032 +         && rm -fr $(distdir); }; }
75033 +DIST_ARCHIVES = $(distdir).tar.gz
75034 +GZIP_ENV = --best
75035 +distuninstallcheck_listfiles = find . -type f -print
75036 +distcleancheck_listfiles = find . -type f -print
75037 +ACLOCAL = @ACLOCAL@
75038 +AMDEP_FALSE = @AMDEP_FALSE@
75039 +AMDEP_TRUE = @AMDEP_TRUE@
75040 +AMTAR = @AMTAR@
75041 +AR = @AR@
75042 +AUTOCONF = @AUTOCONF@
75043 +AUTOHEADER = @AUTOHEADER@
75044 +AUTOMAKE = @AUTOMAKE@
75045 +AWK = @AWK@
75046 +BUILD_WIN32_FALSE = @BUILD_WIN32_FALSE@
75047 +BUILD_WIN32_TRUE = @BUILD_WIN32_TRUE@
75048 +CC = @CC@
75049 +CCDEPMODE = @CCDEPMODE@
75050 +CFLAGS = @CFLAGS@
75051 +CPP = @CPP@
75052 +CPPFLAGS = @CPPFLAGS@
75053 +CXX = @CXX@
75054 +CXXCPP = @CXXCPP@
75055 +CXXDEPMODE = @CXXDEPMODE@
75056 +CXXFLAGS = @CXXFLAGS@
75057 +CYGPATH_W = @CYGPATH_W@
75058 +DEFS = @DEFS@
75059 +DEPDIR = @DEPDIR@
75060 +ECHO = @ECHO@
75061 +ECHO_C = @ECHO_C@
75062 +ECHO_N = @ECHO_N@
75063 +ECHO_T = @ECHO_T@
75064 +EGREP = @EGREP@
75065 +EXEEXT = @EXEEXT@
75066 +F77 = @F77@
75067 +FFLAGS = @FFLAGS@
75068 +INSTALL_DATA = @INSTALL_DATA@
75069 +INSTALL_PROGRAM = @INSTALL_PROGRAM@
75070 +INSTALL_SCRIPT = @INSTALL_SCRIPT@
75071 +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
75072 +LDFLAGS = @LDFLAGS@
75073 +LIBOBJS = @LIBOBJS@
75074 +LIBS = @LIBS@
75075 +LIBTOOL = @LIBTOOL@
75076 +LIBTOOL_DEPS = @LIBTOOL_DEPS@
75077 +LN_S = @LN_S@
75078 +LTLIBOBJS = @LTLIBOBJS@
75079 +MAINT = @MAINT@
75080 +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
75081 +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
75082 +MAKEINFO = @MAKEINFO@
75083 +OBJEXT = @OBJEXT@
75084 +PACKAGE = @PACKAGE@
75085 +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
75086 +PACKAGE_NAME = @PACKAGE_NAME@
75087 +PACKAGE_STRING = @PACKAGE_STRING@
75088 +PACKAGE_TARNAME = @PACKAGE_TARNAME@
75089 +PACKAGE_VERSION = @PACKAGE_VERSION@
75090 +PATH_SEPARATOR = @PATH_SEPARATOR@
75091 +RANLIB = @RANLIB@
75092 +SET_MAKE = @SET_MAKE@
75093 +SHELL = @SHELL@
75094 +STRIP = @STRIP@
75095 +VERSION = @VERSION@
75096 +ac_ct_AR = @ac_ct_AR@
75097 +ac_ct_CC = @ac_ct_CC@
75098 +ac_ct_CXX = @ac_ct_CXX@
75099 +ac_ct_F77 = @ac_ct_F77@
75100 +ac_ct_RANLIB = @ac_ct_RANLIB@
75101 +ac_ct_STRIP = @ac_ct_STRIP@
75102 +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
75103 +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
75104 +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
75105 +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
75106 +am__include = @am__include@
75107 +am__leading_dot = @am__leading_dot@
75108 +am__quote = @am__quote@
75109 +am__tar = @am__tar@
75110 +am__untar = @am__untar@
75111 +bindir = @bindir@
75112 +build = @build@
75113 +build_alias = @build_alias@
75114 +build_cpu = @build_cpu@
75115 +build_os = @build_os@
75116 +build_vendor = @build_vendor@
75117 +datadir = @datadir@
75118 +exec_prefix = @exec_prefix@
75119 +host = @host@
75120 +host_alias = @host_alias@
75121 +host_cpu = @host_cpu@
75122 +host_os = @host_os@
75123 +host_vendor = @host_vendor@
75124 +includedir = @includedir@
75125 +infodir = @infodir@
75126 +install_sh = @install_sh@
75127 +libdir = @libdir@
75128 +libexecdir = @libexecdir@
75129 +localstatedir = @localstatedir@
75130 +mandir = @mandir@
75131 +mkdir_p = @mkdir_p@
75132 +oldincludedir = @oldincludedir@
75133 +prefix = @prefix@
75134 +program_transform_name = @program_transform_name@
75135 +sbindir = @sbindir@
75136 +sharedstatedir = @sharedstatedir@
75137 +sysconfdir = @sysconfdir@
75138 +target_alias = @target_alias@
75139 +bin_SCRIPTS = event_rpcgen.py
75140 +EXTRA_DIST = acconfig.h event.h event-internal.h log.h evsignal.h evdns.3 \
75141 +       evrpc.h evrpc-internal.h \
75142 +       event.3 \
75143 +       kqueue.c epoll_sub.c epoll.c select.c rtsig.c poll.c signal.c \
75144 +       evport.c devpoll.c event_rpcgen.py \
75145 +       compat/sys/queue.h compat/sys/tree.h compat/sys/_time.h
75146 +
75147 +lib_LTLIBRARIES = libevent.la
75148 +libevent_la_SOURCES = event.c buffer.c evbuffer.c log.c event_tagging.c \
75149 +       http.c evhttp.h http-internal.h evdns.c evdns.h evrpc.c strlcpy.c \
75150 +       strlcpy-internal.h evrpc.h evrpc-internal.h strlcpy-internal.h \
75151 +       $(SYS_SRC)
75152 +
75153 +libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
75154 +libevent_la_LDFLAGS = -release @VERSION@ -version-info 1:3:0
75155 +include_HEADERS = event.h evhttp.h evdns.h evrpc.h
75156 +INCLUDES = -I$(top_srcdir)/compat $(SYS_INCLUDES)
75157 +man_MANS = event.3 evdns.3
75158 +DISTCLEANFILES = *~
75159 +all: config.h
75160 +       $(MAKE) $(AM_MAKEFLAGS) all-am
75161 +
75162 +.SUFFIXES:
75163 +.SUFFIXES: .c .lo .o .obj
75164 +am--refresh:
75165 +       @:
75166 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
75167 +       @for dep in $?; do \
75168 +         case '$(am__configure_deps)' in \
75169 +           *$$dep*) \
75170 +             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
75171 +             cd $(srcdir) && $(AUTOMAKE) --foreign  \
75172 +               && exit 0; \
75173 +             exit 1;; \
75174 +         esac; \
75175 +       done; \
75176 +       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
75177 +       cd $(top_srcdir) && \
75178 +         $(AUTOMAKE) --foreign  Makefile
75179 +.PRECIOUS: Makefile
75180 +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
75181 +       @case '$?' in \
75182 +         *config.status*) \
75183 +           echo ' $(SHELL) ./config.status'; \
75184 +           $(SHELL) ./config.status;; \
75185 +         *) \
75186 +           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
75187 +           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
75188 +       esac;
75189 +
75190 +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
75191 +       $(SHELL) ./config.status --recheck
75192 +
75193 +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
75194 +       cd $(srcdir) && $(AUTOCONF)
75195 +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
75196 +       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
75197 +
75198 +config.h: stamp-h1
75199 +       @if test ! -f $@; then \
75200 +         rm -f stamp-h1; \
75201 +         $(MAKE) stamp-h1; \
75202 +       else :; fi
75203 +
75204 +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
75205 +       @rm -f stamp-h1
75206 +       cd $(top_builddir) && $(SHELL) ./config.status config.h
75207 +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(top_srcdir)/acconfig.h
75208 +       cd $(top_srcdir) && $(AUTOHEADER)
75209 +       rm -f stamp-h1
75210 +       touch $@
75211 +
75212 +distclean-hdr:
75213 +       -rm -f config.h stamp-h1
75214 +install-libLTLIBRARIES: $(lib_LTLIBRARIES)
75215 +       @$(NORMAL_INSTALL)
75216 +       test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
75217 +       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
75218 +         if test -f $$p; then \
75219 +           f=$(am__strip_dir) \
75220 +           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
75221 +           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
75222 +         else :; fi; \
75223 +       done
75224 +
75225 +uninstall-libLTLIBRARIES:
75226 +       @$(NORMAL_UNINSTALL)
75227 +       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
75228 +         p=$(am__strip_dir) \
75229 +         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
75230 +         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
75231 +       done
75232 +
75233 +clean-libLTLIBRARIES:
75234 +       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
75235 +       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
75236 +         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
75237 +         test "$$dir" != "$$p" || dir=.; \
75238 +         echo "rm -f \"$${dir}/so_locations\""; \
75239 +         rm -f "$${dir}/so_locations"; \
75240 +       done
75241 +libevent.la: $(libevent_la_OBJECTS) $(libevent_la_DEPENDENCIES) 
75242 +       $(LINK) -rpath $(libdir) $(libevent_la_LDFLAGS) $(libevent_la_OBJECTS) $(libevent_la_LIBADD) $(LIBS)
75243 +install-binSCRIPTS: $(bin_SCRIPTS)
75244 +       @$(NORMAL_INSTALL)
75245 +       test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
75246 +       @list='$(bin_SCRIPTS)'; for p in $$list; do \
75247 +         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
75248 +         if test -f $$d$$p; then \
75249 +           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
75250 +           echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
75251 +           $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
75252 +         else :; fi; \
75253 +       done
75254 +
75255 +uninstall-binSCRIPTS:
75256 +       @$(NORMAL_UNINSTALL)
75257 +       @list='$(bin_SCRIPTS)'; for p in $$list; do \
75258 +         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
75259 +         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
75260 +         rm -f "$(DESTDIR)$(bindir)/$$f"; \
75261 +       done
75262 +
75263 +mostlyclean-compile:
75264 +       -rm -f *.$(OBJEXT)
75265 +
75266 +distclean-compile:
75267 +       -rm -f *.tab.c
75268 +
75269 +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/devpoll.Plo@am__quote@
75270 +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/epoll.Plo@am__quote@
75271 +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/epoll_sub.Plo@am__quote@
75272 +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/evport.Plo@am__quote@
75273 +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kqueue.Plo@am__quote@
75274 +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/poll.Plo@am__quote@
75275 +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/rtsig.Plo@am__quote@
75276 +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/select.Plo@am__quote@
75277 +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/signal.Plo@am__quote@
75278 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@
75279 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evbuffer.Plo@am__quote@
75280 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evdns.Plo@am__quote@
75281 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@
75282 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_tagging.Plo@am__quote@
75283 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evrpc.Plo@am__quote@
75284 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http.Plo@am__quote@
75285 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@
75286 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Plo@am__quote@
75287 +
75288 +.c.o:
75289 +@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
75290 +@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
75291 +@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
75292 +@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
75293 +@am__fastdepCC_FALSE@  $(COMPILE) -c $<
75294 +
75295 +.c.obj:
75296 +@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
75297 +@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
75298 +@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
75299 +@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
75300 +@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
75301 +
75302 +.c.lo:
75303 +@am__fastdepCC_TRUE@   if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
75304 +@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
75305 +@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
75306 +@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
75307 +@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
75308 +
75309 +mostlyclean-libtool:
75310 +       -rm -f *.lo
75311 +
75312 +clean-libtool:
75313 +       -rm -rf .libs _libs
75314 +
75315 +distclean-libtool:
75316 +       -rm -f libtool
75317 +uninstall-info-am:
75318 +install-man3: $(man3_MANS) $(man_MANS)
75319 +       @$(NORMAL_INSTALL)
75320 +       test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)"
75321 +       @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
75322 +       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
75323 +       for i in $$l2; do \
75324 +         case "$$i" in \
75325 +           *.3*) list="$$list $$i" ;; \
75326 +         esac; \
75327 +       done; \
75328 +       for i in $$list; do \
75329 +         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
75330 +         else file=$$i; fi; \
75331 +         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
75332 +         case "$$ext" in \
75333 +           3*) ;; \
75334 +           *) ext='3' ;; \
75335 +         esac; \
75336 +         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
75337 +         inst=`echo $$inst | sed -e 's/^.*\///'`; \
75338 +         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
75339 +         echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
75340 +         $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
75341 +       done
75342 +uninstall-man3:
75343 +       @$(NORMAL_UNINSTALL)
75344 +       @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
75345 +       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
75346 +       for i in $$l2; do \
75347 +         case "$$i" in \
75348 +           *.3*) list="$$list $$i" ;; \
75349 +         esac; \
75350 +       done; \
75351 +       for i in $$list; do \
75352 +         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
75353 +         case "$$ext" in \
75354 +           3*) ;; \
75355 +           *) ext='3' ;; \
75356 +         esac; \
75357 +         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
75358 +         inst=`echo $$inst | sed -e 's/^.*\///'`; \
75359 +         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
75360 +         echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
75361 +         rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
75362 +       done
75363 +install-includeHEADERS: $(include_HEADERS)
75364 +       @$(NORMAL_INSTALL)
75365 +       test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
75366 +       @list='$(include_HEADERS)'; for p in $$list; do \
75367 +         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
75368 +         f=$(am__strip_dir) \
75369 +         echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
75370 +         $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
75371 +       done
75372 +
75373 +uninstall-includeHEADERS:
75374 +       @$(NORMAL_UNINSTALL)
75375 +       @list='$(include_HEADERS)'; for p in $$list; do \
75376 +         f=$(am__strip_dir) \
75377 +         echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
75378 +         rm -f "$(DESTDIR)$(includedir)/$$f"; \
75379 +       done
75380 +
75381 +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
75382 +       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
75383 +       unique=`for i in $$list; do \
75384 +           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
75385 +         done | \
75386 +         $(AWK) '    { files[$$0] = 1; } \
75387 +              END { for (i in files) print i; }'`; \
75388 +       mkid -fID $$unique
75389 +tags: TAGS
75390 +
75391 +TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
75392 +               $(TAGS_FILES) $(LISP)
75393 +       tags=; \
75394 +       here=`pwd`; \
75395 +       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
75396 +       unique=`for i in $$list; do \
75397 +           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
75398 +         done | \
75399 +         $(AWK) '    { files[$$0] = 1; } \
75400 +              END { for (i in files) print i; }'`; \
75401 +       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
75402 +         test -n "$$unique" || unique=$$empty_fix; \
75403 +         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
75404 +           $$tags $$unique; \
75405 +       fi
75406 +ctags: CTAGS
75407 +CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
75408 +               $(TAGS_FILES) $(LISP)
75409 +       tags=; \
75410 +       here=`pwd`; \
75411 +       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
75412 +       unique=`for i in $$list; do \
75413 +           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
75414 +         done | \
75415 +         $(AWK) '    { files[$$0] = 1; } \
75416 +              END { for (i in files) print i; }'`; \
75417 +       test -z "$(CTAGS_ARGS)$$tags$$unique" \
75418 +         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
75419 +            $$tags $$unique
75420 +
75421 +GTAGS:
75422 +       here=`$(am__cd) $(top_builddir) && pwd` \
75423 +         && cd $(top_srcdir) \
75424 +         && gtags -i $(GTAGS_ARGS) $$here
75425 +
75426 +distclean-tags:
75427 +       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
75428 +
75429 +distdir: $(DISTFILES)
75430 +       $(am__remove_distdir)
75431 +       mkdir $(distdir)
75432 +       $(mkdir_p) $(distdir)/compat/sys
75433 +       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
75434 +       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
75435 +       list='$(DISTFILES)'; for file in $$list; do \
75436 +         case $$file in \
75437 +           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
75438 +           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
75439 +         esac; \
75440 +         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
75441 +         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
75442 +         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
75443 +           dir="/$$dir"; \
75444 +           $(mkdir_p) "$(distdir)$$dir"; \
75445 +         else \
75446 +           dir=''; \
75447 +         fi; \
75448 +         if test -d $$d/$$file; then \
75449 +           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
75450 +             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
75451 +           fi; \
75452 +           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
75453 +         else \
75454 +           test -f $(distdir)/$$file \
75455 +           || cp -p $$d/$$file $(distdir)/$$file \
75456 +           || exit 1; \
75457 +         fi; \
75458 +       done
75459 +       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
75460 +         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
75461 +         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
75462 +         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
75463 +       || chmod -R a+r $(distdir)
75464 +dist-gzip: distdir
75465 +       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
75466 +       $(am__remove_distdir)
75467 +
75468 +dist-bzip2: distdir
75469 +       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
75470 +       $(am__remove_distdir)
75471 +
75472 +dist-tarZ: distdir
75473 +       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
75474 +       $(am__remove_distdir)
75475 +
75476 +dist-shar: distdir
75477 +       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
75478 +       $(am__remove_distdir)
75479 +
75480 +dist-zip: distdir
75481 +       -rm -f $(distdir).zip
75482 +       zip -rq $(distdir).zip $(distdir)
75483 +       $(am__remove_distdir)
75484 +
75485 +dist dist-all: distdir
75486 +       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
75487 +       $(am__remove_distdir)
75488 +
75489 +# This target untars the dist file and tries a VPATH configuration.  Then
75490 +# it guarantees that the distribution is self-contained by making another
75491 +# tarfile.
75492 +distcheck: dist
75493 +       case '$(DIST_ARCHIVES)' in \
75494 +       *.tar.gz*) \
75495 +         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
75496 +       *.tar.bz2*) \
75497 +         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
75498 +       *.tar.Z*) \
75499 +         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
75500 +       *.shar.gz*) \
75501 +         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
75502 +       *.zip*) \
75503 +         unzip $(distdir).zip ;;\
75504 +       esac
75505 +       chmod -R a-w $(distdir); chmod a+w $(distdir)
75506 +       mkdir $(distdir)/_build
75507 +       mkdir $(distdir)/_inst
75508 +       chmod a-w $(distdir)
75509 +       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
75510 +         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
75511 +         && cd $(distdir)/_build \
75512 +         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
75513 +           $(DISTCHECK_CONFIGURE_FLAGS) \
75514 +         && $(MAKE) $(AM_MAKEFLAGS) \
75515 +         && $(MAKE) $(AM_MAKEFLAGS) dvi \
75516 +         && $(MAKE) $(AM_MAKEFLAGS) check \
75517 +         && $(MAKE) $(AM_MAKEFLAGS) install \
75518 +         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
75519 +         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
75520 +         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
75521 +               distuninstallcheck \
75522 +         && chmod -R a-w "$$dc_install_base" \
75523 +         && ({ \
75524 +              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
75525 +              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
75526 +              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
75527 +              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
75528 +                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
75529 +             } || { rm -rf "$$dc_destdir"; exit 1; }) \
75530 +         && rm -rf "$$dc_destdir" \
75531 +         && $(MAKE) $(AM_MAKEFLAGS) dist \
75532 +         && rm -rf $(DIST_ARCHIVES) \
75533 +         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
75534 +       $(am__remove_distdir)
75535 +       @(echo "$(distdir) archives ready for distribution: "; \
75536 +         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
75537 +         sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
75538 +distuninstallcheck:
75539 +       @cd $(distuninstallcheck_dir) \
75540 +       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
75541 +          || { echo "ERROR: files left after uninstall:" ; \
75542 +               if test -n "$(DESTDIR)"; then \
75543 +                 echo "  (check DESTDIR support)"; \
75544 +               fi ; \
75545 +               $(distuninstallcheck_listfiles) ; \
75546 +               exit 1; } >&2
75547 +distcleancheck: distclean
75548 +       @if test '$(srcdir)' = . ; then \
75549 +         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
75550 +         exit 1 ; \
75551 +       fi
75552 +       @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
75553 +         || { echo "ERROR: files left in build directory after distclean:" ; \
75554 +              $(distcleancheck_listfiles) ; \
75555 +              exit 1; } >&2
75556 +check-am: all-am
75557 +check: check-am
75558 +all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(HEADERS) config.h
75559 +installdirs:
75560 +       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(includedir)"; do \
75561 +         test -z "$$dir" || $(mkdir_p) "$$dir"; \
75562 +       done
75563 +install: install-am
75564 +install-exec: install-exec-am
75565 +install-data: install-data-am
75566 +uninstall: uninstall-am
75567 +
75568 +install-am: all-am
75569 +       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
75570 +
75571 +installcheck: installcheck-am
75572 +install-strip:
75573 +       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
75574 +         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
75575 +         `test -z '$(STRIP)' || \
75576 +           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
75577 +mostlyclean-generic:
75578 +
75579 +clean-generic:
75580 +
75581 +distclean-generic:
75582 +       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
75583 +       -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
75584 +
75585 +maintainer-clean-generic:
75586 +       @echo "This command is intended for maintainers to use"
75587 +       @echo "it deletes files that may require special tools to rebuild."
75588 +clean: clean-am
75589 +
75590 +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
75591 +       mostlyclean-am
75592 +
75593 +distclean: distclean-am
75594 +       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
75595 +       -rm -rf $(DEPDIR) ./$(DEPDIR)
75596 +       -rm -f Makefile
75597 +distclean-am: clean-am distclean-compile distclean-generic \
75598 +       distclean-hdr distclean-libtool distclean-tags
75599 +
75600 +dvi: dvi-am
75601 +
75602 +dvi-am:
75603 +
75604 +html: html-am
75605 +
75606 +info: info-am
75607 +
75608 +info-am:
75609 +
75610 +install-data-am: install-includeHEADERS install-man
75611 +
75612 +install-exec-am: install-binSCRIPTS install-libLTLIBRARIES
75613 +
75614 +install-info: install-info-am
75615 +
75616 +install-man: install-man3
75617 +
75618 +installcheck-am:
75619 +
75620 +maintainer-clean: maintainer-clean-am
75621 +       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
75622 +       -rm -rf $(top_srcdir)/autom4te.cache
75623 +       -rm -rf $(DEPDIR) ./$(DEPDIR)
75624 +       -rm -f Makefile
75625 +maintainer-clean-am: distclean-am maintainer-clean-generic
75626 +
75627 +mostlyclean: mostlyclean-am
75628 +
75629 +mostlyclean-am: mostlyclean-compile mostlyclean-generic \
75630 +       mostlyclean-libtool
75631 +
75632 +pdf: pdf-am
75633 +
75634 +pdf-am:
75635 +
75636 +ps: ps-am
75637 +
75638 +ps-am:
75639 +
75640 +uninstall-am: uninstall-binSCRIPTS uninstall-includeHEADERS \
75641 +       uninstall-info-am uninstall-libLTLIBRARIES uninstall-man
75642 +
75643 +uninstall-man: uninstall-man3
75644 +
75645 +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
75646 +       clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \
75647 +       dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \
75648 +       distcheck distclean distclean-compile distclean-generic \
75649 +       distclean-hdr distclean-libtool distclean-tags distcleancheck \
75650 +       distdir distuninstallcheck dvi dvi-am html html-am info \
75651 +       info-am install install-am install-binSCRIPTS install-data \
75652 +       install-data-am install-exec install-exec-am \
75653 +       install-includeHEADERS install-info install-info-am \
75654 +       install-libLTLIBRARIES install-man install-man3 install-strip \
75655 +       installcheck installcheck-am installdirs maintainer-clean \
75656 +       maintainer-clean-generic mostlyclean mostlyclean-compile \
75657 +       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
75658 +       tags uninstall uninstall-am uninstall-binSCRIPTS \
75659 +       uninstall-includeHEADERS uninstall-info-am \
75660 +       uninstall-libLTLIBRARIES uninstall-man uninstall-man3
75661 +
75662 +# Tell versions [3.59,3.63) of GNU make to not export all variables.
75663 +# Otherwise a system limit (for SysV at least) may be exceeded.
75664 +.NOEXPORT:
75665 diff -Nru php-5.2.4.vanilla/libevent/missing php-5.2.4.fpm/libevent/missing
75666 --- php-5.2.4.vanilla/libevent/missing  1970-01-01 03:00:00.000000000 +0300
75667 +++ php-5.2.4.fpm/libevent/missing      2007-08-31 15:47:19.000000000 +0400
75668 @@ -0,0 +1,360 @@
75669 +#! /bin/sh
75670 +# Common stub for a few missing GNU programs while installing.
75671 +
75672 +scriptversion=2003-09-02.23
75673 +
75674 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 
75675 +#   Free Software Foundation, Inc.
75676 +# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
75677 +
75678 +# This program is free software; you can redistribute it and/or modify
75679 +# it under the terms of the GNU General Public License as published by
75680 +# the Free Software Foundation; either version 2, or (at your option)
75681 +# any later version.
75682 +
75683 +# This program is distributed in the hope that it will be useful,
75684 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
75685 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
75686 +# GNU General Public License for more details.
75687 +
75688 +# You should have received a copy of the GNU General Public License
75689 +# along with this program; if not, write to the Free Software
75690 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
75691 +# 02111-1307, USA.
75692 +
75693 +# As a special exception to the GNU General Public License, if you
75694 +# distribute this file as part of a program that contains a
75695 +# configuration script generated by Autoconf, you may include it under
75696 +# the same distribution terms that you use for the rest of that program.
75697 +
75698 +if test $# -eq 0; then
75699 +  echo 1>&2 "Try \`$0 --help' for more information"
75700 +  exit 1
75701 +fi
75702 +
75703 +run=:
75704 +
75705 +# In the cases where this matters, `missing' is being run in the
75706 +# srcdir already.
75707 +if test -f configure.ac; then
75708 +  configure_ac=configure.ac
75709 +else
75710 +  configure_ac=configure.in
75711 +fi
75712 +
75713 +msg="missing on your system"
75714 +
75715 +case "$1" in
75716 +--run)
75717 +  # Try to run requested program, and just exit if it succeeds.
75718 +  run=
75719 +  shift
75720 +  "$@" && exit 0
75721 +  # Exit code 63 means version mismatch.  This often happens
75722 +  # when the user try to use an ancient version of a tool on
75723 +  # a file that requires a minimum version.  In this case we
75724 +  # we should proceed has if the program had been absent, or
75725 +  # if --run hadn't been passed.
75726 +  if test $? = 63; then
75727 +    run=:
75728 +    msg="probably too old"
75729 +  fi
75730 +  ;;
75731 +esac
75732 +
75733 +# If it does not exist, or fails to run (possibly an outdated version),
75734 +# try to emulate it.
75735 +case "$1" in
75736 +
75737 +  -h|--h|--he|--hel|--help)
75738 +    echo "\
75739 +$0 [OPTION]... PROGRAM [ARGUMENT]...
75740 +
75741 +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
75742 +error status if there is no known handling for PROGRAM.
75743 +
75744 +Options:
75745 +  -h, --help      display this help and exit
75746 +  -v, --version   output version information and exit
75747 +  --run           try to run the given command, and emulate it if it fails
75748 +
75749 +Supported PROGRAM values:
75750 +  aclocal      touch file \`aclocal.m4'
75751 +  autoconf     touch file \`configure'
75752 +  autoheader   touch file \`config.h.in'
75753 +  automake     touch all \`Makefile.in' files
75754 +  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
75755 +  flex         create \`lex.yy.c', if possible, from existing .c
75756 +  help2man     touch the output file
75757 +  lex          create \`lex.yy.c', if possible, from existing .c
75758 +  makeinfo     touch the output file
75759 +  tar          try tar, gnutar, gtar, then tar without non-portable flags
75760 +  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
75761 +
75762 +Send bug reports to <bug-automake@gnu.org>."
75763 +    ;;
75764 +
75765 +  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
75766 +    echo "missing $scriptversion (GNU Automake)"
75767 +    ;;
75768 +
75769 +  -*)
75770 +    echo 1>&2 "$0: Unknown \`$1' option"
75771 +    echo 1>&2 "Try \`$0 --help' for more information"
75772 +    exit 1
75773 +    ;;
75774 +
75775 +  aclocal*)
75776 +    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
75777 +       # We have it, but it failed.
75778 +       exit 1
75779 +    fi
75780 +
75781 +    echo 1>&2 "\
75782 +WARNING: \`$1' is $msg.  You should only need it if
75783 +         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
75784 +         to install the \`Automake' and \`Perl' packages.  Grab them from
75785 +         any GNU archive site."
75786 +    touch aclocal.m4
75787 +    ;;
75788 +
75789 +  autoconf)
75790 +    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
75791 +       # We have it, but it failed.
75792 +       exit 1
75793 +    fi
75794 +
75795 +    echo 1>&2 "\
75796 +WARNING: \`$1' is $msg.  You should only need it if
75797 +         you modified \`${configure_ac}'.  You might want to install the
75798 +         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
75799 +         archive site."
75800 +    touch configure
75801 +    ;;
75802 +
75803 +  autoheader)
75804 +    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
75805 +       # We have it, but it failed.
75806 +       exit 1
75807 +    fi
75808 +
75809 +    echo 1>&2 "\
75810 +WARNING: \`$1' is $msg.  You should only need it if
75811 +         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
75812 +         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
75813 +         from any GNU archive site."
75814 +    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
75815 +    test -z "$files" && files="config.h"
75816 +    touch_files=
75817 +    for f in $files; do
75818 +      case "$f" in
75819 +      *:*) touch_files="$touch_files "`echo "$f" |
75820 +                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
75821 +      *) touch_files="$touch_files $f.in";;
75822 +      esac
75823 +    done
75824 +    touch $touch_files
75825 +    ;;
75826 +
75827 +  automake*)
75828 +    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
75829 +       # We have it, but it failed.
75830 +       exit 1
75831 +    fi
75832 +
75833 +    echo 1>&2 "\
75834 +WARNING: \`$1' is $msg.  You should only need it if
75835 +         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
75836 +         You might want to install the \`Automake' and \`Perl' packages.
75837 +         Grab them from any GNU archive site."
75838 +    find . -type f -name Makefile.am -print |
75839 +          sed 's/\.am$/.in/' |
75840 +          while read f; do touch "$f"; done
75841 +    ;;
75842 +
75843 +  autom4te)
75844 +    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
75845 +       # We have it, but it failed.
75846 +       exit 1
75847 +    fi
75848 +
75849 +    echo 1>&2 "\
75850 +WARNING: \`$1' is needed, but is $msg.
75851 +         You might have modified some files without having the
75852 +         proper tools for further handling them.
75853 +         You can get \`$1' as part of \`Autoconf' from any GNU
75854 +         archive site."
75855 +
75856 +    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
75857 +    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
75858 +    if test -f "$file"; then
75859 +       touch $file
75860 +    else
75861 +       test -z "$file" || exec >$file
75862 +       echo "#! /bin/sh"
75863 +       echo "# Created by GNU Automake missing as a replacement of"
75864 +       echo "#  $ $@"
75865 +       echo "exit 0"
75866 +       chmod +x $file
75867 +       exit 1
75868 +    fi
75869 +    ;;
75870 +
75871 +  bison|yacc)
75872 +    echo 1>&2 "\
75873 +WARNING: \`$1' $msg.  You should only need it if
75874 +         you modified a \`.y' file.  You may need the \`Bison' package
75875 +         in order for those modifications to take effect.  You can get
75876 +         \`Bison' from any GNU archive site."
75877 +    rm -f y.tab.c y.tab.h
75878 +    if [ $# -ne 1 ]; then
75879 +        eval LASTARG="\${$#}"
75880 +       case "$LASTARG" in
75881 +       *.y)
75882 +           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
75883 +           if [ -f "$SRCFILE" ]; then
75884 +                cp "$SRCFILE" y.tab.c
75885 +           fi
75886 +           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
75887 +           if [ -f "$SRCFILE" ]; then
75888 +                cp "$SRCFILE" y.tab.h
75889 +           fi
75890 +         ;;
75891 +       esac
75892 +    fi
75893 +    if [ ! -f y.tab.h ]; then
75894 +       echo >y.tab.h
75895 +    fi
75896 +    if [ ! -f y.tab.c ]; then
75897 +       echo 'main() { return 0; }' >y.tab.c
75898 +    fi
75899 +    ;;
75900 +
75901 +  lex|flex)
75902 +    echo 1>&2 "\
75903 +WARNING: \`$1' is $msg.  You should only need it if
75904 +         you modified a \`.l' file.  You may need the \`Flex' package
75905 +         in order for those modifications to take effect.  You can get
75906 +         \`Flex' from any GNU archive site."
75907 +    rm -f lex.yy.c
75908 +    if [ $# -ne 1 ]; then
75909 +        eval LASTARG="\${$#}"
75910 +       case "$LASTARG" in
75911 +       *.l)
75912 +           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
75913 +           if [ -f "$SRCFILE" ]; then
75914 +                cp "$SRCFILE" lex.yy.c
75915 +           fi
75916 +         ;;
75917 +       esac
75918 +    fi
75919 +    if [ ! -f lex.yy.c ]; then
75920 +       echo 'main() { return 0; }' >lex.yy.c
75921 +    fi
75922 +    ;;
75923 +
75924 +  help2man)
75925 +    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
75926 +       # We have it, but it failed.
75927 +       exit 1
75928 +    fi
75929 +
75930 +    echo 1>&2 "\
75931 +WARNING: \`$1' is $msg.  You should only need it if
75932 +        you modified a dependency of a manual page.  You may need the
75933 +        \`Help2man' package in order for those modifications to take
75934 +        effect.  You can get \`Help2man' from any GNU archive site."
75935 +
75936 +    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
75937 +    if test -z "$file"; then
75938 +       file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
75939 +    fi
75940 +    if [ -f "$file" ]; then
75941 +       touch $file
75942 +    else
75943 +       test -z "$file" || exec >$file
75944 +       echo ".ab help2man is required to generate this page"
75945 +       exit 1
75946 +    fi
75947 +    ;;
75948 +
75949 +  makeinfo)
75950 +    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
75951 +       # We have makeinfo, but it failed.
75952 +       exit 1
75953 +    fi
75954 +
75955 +    echo 1>&2 "\
75956 +WARNING: \`$1' is $msg.  You should only need it if
75957 +         you modified a \`.texi' or \`.texinfo' file, or any other file
75958 +         indirectly affecting the aspect of the manual.  The spurious
75959 +         call might also be the consequence of using a buggy \`make' (AIX,
75960 +         DU, IRIX).  You might want to install the \`Texinfo' package or
75961 +         the \`GNU make' package.  Grab either from any GNU archive site."
75962 +    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
75963 +    if test -z "$file"; then
75964 +      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
75965 +      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
75966 +    fi
75967 +    touch $file
75968 +    ;;
75969 +
75970 +  tar)
75971 +    shift
75972 +    if test -n "$run"; then
75973 +      echo 1>&2 "ERROR: \`tar' requires --run"
75974 +      exit 1
75975 +    fi
75976 +
75977 +    # We have already tried tar in the generic part.
75978 +    # Look for gnutar/gtar before invocation to avoid ugly error
75979 +    # messages.
75980 +    if (gnutar --version > /dev/null 2>&1); then
75981 +       gnutar "$@" && exit 0
75982 +    fi
75983 +    if (gtar --version > /dev/null 2>&1); then
75984 +       gtar "$@" && exit 0
75985 +    fi
75986 +    firstarg="$1"
75987 +    if shift; then
75988 +       case "$firstarg" in
75989 +       *o*)
75990 +           firstarg=`echo "$firstarg" | sed s/o//`
75991 +           tar "$firstarg" "$@" && exit 0
75992 +           ;;
75993 +       esac
75994 +       case "$firstarg" in
75995 +       *h*)
75996 +           firstarg=`echo "$firstarg" | sed s/h//`
75997 +           tar "$firstarg" "$@" && exit 0
75998 +           ;;
75999 +       esac
76000 +    fi
76001 +
76002 +    echo 1>&2 "\
76003 +WARNING: I can't seem to be able to run \`tar' with the given arguments.
76004 +         You may want to install GNU tar or Free paxutils, or check the
76005 +         command line arguments."
76006 +    exit 1
76007 +    ;;
76008 +
76009 +  *)
76010 +    echo 1>&2 "\
76011 +WARNING: \`$1' is needed, and is $msg.
76012 +         You might have modified some files without having the
76013 +         proper tools for further handling them.  Check the \`README' file,
76014 +         it often tells you about the needed prerequisites for installing
76015 +         this package.  You may also peek at any GNU archive site, in case
76016 +         some other package would contain this missing \`$1' program."
76017 +    exit 1
76018 +    ;;
76019 +esac
76020 +
76021 +exit 0
76022 +
76023 +# Local variables:
76024 +# eval: (add-hook 'write-file-hooks 'time-stamp)
76025 +# time-stamp-start: "scriptversion="
76026 +# time-stamp-format: "%:y-%02m-%02d.%02H"
76027 +# time-stamp-end: "$"
76028 +# End:
76029 diff -Nru php-5.2.4.vanilla/libevent/mkinstalldirs php-5.2.4.fpm/libevent/mkinstalldirs
76030 --- php-5.2.4.vanilla/libevent/mkinstalldirs    1970-01-01 03:00:00.000000000 +0300
76031 +++ php-5.2.4.fpm/libevent/mkinstalldirs        2007-08-31 15:47:19.000000000 +0400
76032 @@ -0,0 +1,40 @@
76033 +#! /bin/sh
76034 +# mkinstalldirs --- make directory hierarchy
76035 +# Author: Noah Friedman <friedman@prep.ai.mit.edu>
76036 +# Created: 1993-05-16
76037 +# Public domain
76038 +
76039 +# $Id$
76040 +
76041 +errstatus=0
76042 +
76043 +for file
76044 +do
76045 +   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
76046 +   shift
76047 +
76048 +   pathcomp=
76049 +   for d
76050 +   do
76051 +     pathcomp="$pathcomp$d"
76052 +     case "$pathcomp" in
76053 +       -* ) pathcomp=./$pathcomp ;;
76054 +     esac
76055 +
76056 +     if test ! -d "$pathcomp"; then
76057 +        echo "mkdir $pathcomp"
76058 +
76059 +        mkdir "$pathcomp" || lasterr=$?
76060 +
76061 +        if test ! -d "$pathcomp"; then
76062 +         errstatus=$lasterr
76063 +        fi
76064 +     fi
76065 +
76066 +     pathcomp="$pathcomp/"
76067 +   done
76068 +done
76069 +
76070 +exit $errstatus
76071 +
76072 +# mkinstalldirs ends here
76073 diff -Nru php-5.2.4.vanilla/libevent/poll.c php-5.2.4.fpm/libevent/poll.c
76074 --- php-5.2.4.vanilla/libevent/poll.c   1970-01-01 03:00:00.000000000 +0300
76075 +++ php-5.2.4.fpm/libevent/poll.c       2007-08-31 15:47:19.000000000 +0400
76076 @@ -0,0 +1,388 @@
76077 +/*     $OpenBSD: poll.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */
76078 +
76079 +/*
76080 + * Copyright 2000-2003 Niels Provos <provos@citi.umich.edu>
76081 + * All rights reserved.
76082 + *
76083 + * Redistribution and use in source and binary forms, with or without
76084 + * modification, are permitted provided that the following conditions
76085 + * are met:
76086 + * 1. Redistributions of source code must retain the above copyright
76087 + *    notice, this list of conditions and the following disclaimer.
76088 + * 2. Redistributions in binary form must reproduce the above copyright
76089 + *    notice, this list of conditions and the following disclaimer in the
76090 + *    documentation and/or other materials provided with the distribution.
76091 + * 3. The name of the author may not be used to endorse or promote products
76092 + *    derived from this software without specific prior written permission.
76093 + *
76094 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
76095 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
76096 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
76097 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
76098 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
76099 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
76100 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
76101 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
76102 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
76103 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
76104 + */
76105 +#ifdef HAVE_CONFIG_H
76106 +#include "config.h"
76107 +#endif
76108 +
76109 +#include <sys/types.h>
76110 +#ifdef HAVE_SYS_TIME_H
76111 +#include <sys/time.h>
76112 +#else
76113 +#include <sys/_time.h>
76114 +#endif
76115 +#include <sys/queue.h>
76116 +#include <sys/tree.h>
76117 +#include <poll.h>
76118 +#include <signal.h>
76119 +#include <stdio.h>
76120 +#include <stdlib.h>
76121 +#include <string.h>
76122 +#include <unistd.h>
76123 +#include <errno.h>
76124 +#ifdef CHECK_INVARIANTS
76125 +#include <assert.h>
76126 +#endif
76127 +
76128 +#include "event.h"
76129 +#include "event-internal.h"
76130 +#include "evsignal.h"
76131 +#include "log.h"
76132 +
76133 +struct pollop {
76134 +       int event_count;                /* Highest number alloc */
76135 +       int nfds;                       /* Size of event_* */
76136 +       int fd_count;                   /* Size of idxplus1_by_fd */
76137 +       struct pollfd *event_set;
76138 +       struct event **event_r_back;
76139 +       struct event **event_w_back;
76140 +       int *idxplus1_by_fd; /* Index into event_set by fd; we add 1 so
76141 +                             * that 0 (which is easy to memset) can mean
76142 +                             * "no entry." */
76143 +};
76144 +
76145 +void *poll_init        (struct event_base *);
76146 +int poll_add           (void *, struct event *);
76147 +int poll_del           (void *, struct event *);
76148 +int poll_recalc                (struct event_base *, void *, int);
76149 +int poll_dispatch      (struct event_base *, void *, struct timeval *);
76150 +void poll_dealloc      (struct event_base *, void *);
76151 +
76152 +const struct eventop pollops = {
76153 +       "poll",
76154 +       poll_init,
76155 +       poll_add,
76156 +       poll_del,
76157 +       poll_recalc,
76158 +       poll_dispatch,
76159 +       poll_dealloc
76160 +};
76161 +
76162 +void *
76163 +poll_init(struct event_base *base)
76164 +{
76165 +       struct pollop *pollop;
76166 +
76167 +       /* Disable poll when this environment variable is set */
76168 +       if (getenv("EVENT_NOPOLL"))
76169 +               return (NULL);
76170 +
76171 +       if (!(pollop = calloc(1, sizeof(struct pollop))))
76172 +               return (NULL);
76173 +
76174 +       evsignal_init(base);
76175 +
76176 +       return (pollop);
76177 +}
76178 +
76179 +/*
76180 + * Called with the highest fd that we know about.  If it is 0, completely
76181 + * recalculate everything.
76182 + */
76183 +
76184 +int
76185 +poll_recalc(struct event_base *base, void *arg, int max)
76186 +{
76187 +       return (0);
76188 +}
76189 +
76190 +#ifdef CHECK_INVARIANTS
76191 +static void
76192 +poll_check_ok(struct pollop *pop)
76193 +{
76194 +       int i, idx;
76195 +       struct event *ev;
76196 +
76197 +       for (i = 0; i < pop->fd_count; ++i) {
76198 +               idx = pop->idxplus1_by_fd[i]-1;
76199 +               if (idx < 0)
76200 +                       continue;
76201 +               assert(pop->event_set[idx].fd == i);
76202 +               if (pop->event_set[idx].events & POLLIN) {
76203 +                       ev = pop->event_r_back[idx];
76204 +                       assert(ev);
76205 +                       assert(ev->ev_events & EV_READ);
76206 +                       assert(ev->ev_fd == i);
76207 +               }
76208 +               if (pop->event_set[idx].events & POLLOUT) {
76209 +                       ev = pop->event_w_back[idx];
76210 +                       assert(ev);
76211 +                       assert(ev->ev_events & EV_WRITE);
76212 +                       assert(ev->ev_fd == i);
76213 +               }
76214 +       }
76215 +       for (i = 0; i < pop->nfds; ++i) {
76216 +               struct pollfd *pfd = &pop->event_set[i];
76217 +               assert(pop->idxplus1_by_fd[pfd->fd] == i+1);
76218 +       }
76219 +}
76220 +#else
76221 +#define poll_check_ok(pop)
76222 +#endif
76223 +
76224 +int
76225 +poll_dispatch(struct event_base *base, void *arg, struct timeval *tv)
76226 +{
76227 +       int res, i, sec, nfds;
76228 +       struct pollop *pop = arg;
76229 +
76230 +       poll_check_ok(pop);
76231 +       sec = tv->tv_sec * 1000 + (tv->tv_usec + 999) / 1000;
76232 +       nfds = pop->nfds;
76233 +       res = poll(pop->event_set, nfds, sec);
76234 +
76235 +       if (res == -1) {
76236 +               if (errno != EINTR) {
76237 +                        event_warn("poll");
76238 +                       return (-1);
76239 +               }
76240 +
76241 +               evsignal_process(base);
76242 +               return (0);
76243 +       } else if (base->sig.evsignal_caught) {
76244 +               evsignal_process(base);
76245 +       }
76246 +
76247 +       event_debug(("%s: poll reports %d", __func__, res));
76248 +
76249 +       if (res == 0)
76250 +               return (0);
76251 +
76252 +       for (i = 0; i < nfds; i++) {
76253 +               int what = pop->event_set[i].revents;
76254 +               struct event *r_ev = NULL, *w_ev = NULL;
76255 +               if (!what)
76256 +                       continue;
76257 +
76258 +               res = 0;
76259 +
76260 +               /* If the file gets closed notify */
76261 +               if (what & (POLLHUP|POLLERR))
76262 +                       what |= POLLIN|POLLOUT;
76263 +               if (what & POLLIN) {
76264 +                       res |= EV_READ;
76265 +                       r_ev = pop->event_r_back[i];
76266 +               }
76267 +               if (what & POLLOUT) {
76268 +                       res |= EV_WRITE;
76269 +                       w_ev = pop->event_w_back[i];
76270 +               }
76271 +               if (res == 0)
76272 +                       continue;
76273 +
76274 +               if (r_ev && (res & r_ev->ev_events)) {
76275 +                       if (!(r_ev->ev_events & EV_PERSIST))
76276 +                               event_del(r_ev);
76277 +                       event_active(r_ev, res & r_ev->ev_events, 1);
76278 +               }
76279 +               if (w_ev && w_ev != r_ev && (res & w_ev->ev_events)) {
76280 +                       if (!(w_ev->ev_events & EV_PERSIST))
76281 +                               event_del(w_ev);
76282 +                       event_active(w_ev, res & w_ev->ev_events, 1);
76283 +               }
76284 +       }
76285 +
76286 +       return (0);
76287 +}
76288 +
76289 +int
76290 +poll_add(void *arg, struct event *ev)
76291 +{
76292 +       struct pollop *pop = arg;
76293 +       struct pollfd *pfd = NULL;
76294 +       int i;
76295 +
76296 +       if (ev->ev_events & EV_SIGNAL)
76297 +               return (evsignal_add(ev));
76298 +       if (!(ev->ev_events & (EV_READ|EV_WRITE)))
76299 +               return (0);
76300 +
76301 +       poll_check_ok(pop);
76302 +       if (pop->nfds + 1 >= pop->event_count) {
76303 +               struct pollfd *tmp_event_set;
76304 +               struct event **tmp_event_r_back;
76305 +               struct event **tmp_event_w_back;
76306 +               int tmp_event_count;
76307 +
76308 +               if (pop->event_count < 32)
76309 +                       tmp_event_count = 32;
76310 +               else
76311 +                       tmp_event_count = pop->event_count * 2;
76312 +
76313 +               /* We need more file descriptors */
76314 +               tmp_event_set = realloc(pop->event_set,
76315 +                                tmp_event_count * sizeof(struct pollfd));
76316 +               if (tmp_event_set == NULL) {
76317 +                       event_warn("realloc");
76318 +                       return (-1);
76319 +               }
76320 +               pop->event_set = tmp_event_set;
76321 +
76322 +               tmp_event_r_back = realloc(pop->event_r_back,
76323 +                           tmp_event_count * sizeof(struct event *));
76324 +               if (tmp_event_r_back == NULL) {
76325 +                       /* event_set overallocated; that's okay. */
76326 +                       event_warn("realloc");
76327 +                       return (-1);
76328 +               }
76329 +               pop->event_r_back = tmp_event_r_back;
76330 +
76331 +               tmp_event_w_back = realloc(pop->event_w_back,
76332 +                           tmp_event_count * sizeof(struct event *));
76333 +               if (tmp_event_w_back == NULL) {
76334 +                       /* event_set and event_r_back overallocated; that's
76335 +                        * okay. */
76336 +                       event_warn("realloc");
76337 +                       return (-1);
76338 +               }
76339 +               pop->event_w_back = tmp_event_w_back;
76340 +
76341 +               pop->event_count = tmp_event_count;
76342 +       }
76343 +       if (ev->ev_fd >= pop->fd_count) {
76344 +               int *tmp_idxplus1_by_fd;
76345 +               int new_count;
76346 +               if (pop->fd_count < 32)
76347 +                       new_count = 32;
76348 +               else
76349 +                       new_count = pop->fd_count * 2;
76350 +               while (new_count <= ev->ev_fd)
76351 +                       new_count *= 2;
76352 +               tmp_idxplus1_by_fd =
76353 +                       realloc(pop->idxplus1_by_fd, new_count * sizeof(int));
76354 +               if (tmp_idxplus1_by_fd == NULL) {
76355 +                       event_warn("realloc");
76356 +                       return (-1);
76357 +               }
76358 +               pop->idxplus1_by_fd = tmp_idxplus1_by_fd;
76359 +               memset(pop->idxplus1_by_fd + pop->fd_count,
76360 +                      0, sizeof(int)*(new_count - pop->fd_count));
76361 +               pop->fd_count = new_count;
76362 +       }
76363 +
76364 +       i = pop->idxplus1_by_fd[ev->ev_fd] - 1;
76365 +       if (i >= 0) {
76366 +               pfd = &pop->event_set[i];
76367 +       } else {
76368 +               i = pop->nfds++;
76369 +               pfd = &pop->event_set[i];
76370 +               pfd->events = 0;
76371 +               pfd->fd = ev->ev_fd;
76372 +               pop->event_w_back[i] = pop->event_r_back[i] = NULL;
76373 +               pop->idxplus1_by_fd[ev->ev_fd] = i + 1;
76374 +       }
76375 +
76376 +       pfd->revents = 0;
76377 +       if (ev->ev_events & EV_WRITE) {
76378 +               pfd->events |= POLLOUT;
76379 +               pop->event_w_back[i] = ev;
76380 +       }
76381 +       if (ev->ev_events & EV_READ) {
76382 +               pfd->events |= POLLIN;
76383 +               pop->event_r_back[i] = ev;
76384 +       }
76385 +       poll_check_ok(pop);
76386 +
76387 +       return (0);
76388 +}
76389 +
76390 +/*
76391 + * Nothing to be done here.
76392 + */
76393 +
76394 +int
76395 +poll_del(void *arg, struct event *ev)
76396 +{
76397 +       struct pollop *pop = arg;
76398 +       struct pollfd *pfd = NULL;
76399 +       int i;
76400 +
76401 +       if (ev->ev_events & EV_SIGNAL)
76402 +               return (evsignal_del(ev));
76403 +
76404 +       if (!(ev->ev_events & (EV_READ|EV_WRITE)))
76405 +               return (0);
76406 +
76407 +       poll_check_ok(pop);
76408 +       i = pop->idxplus1_by_fd[ev->ev_fd] - 1;
76409 +       if (i < 0)
76410 +               return (-1);
76411 +
76412 +       /* Do we still want to read or write? */
76413 +       pfd = &pop->event_set[i];
76414 +       if (ev->ev_events & EV_READ) {
76415 +               pfd->events &= ~POLLIN;
76416 +               pop->event_r_back[i] = NULL;
76417 +       }
76418 +       if (ev->ev_events & EV_WRITE) {
76419 +               pfd->events &= ~POLLOUT;
76420 +               pop->event_w_back[i] = NULL;
76421 +       }
76422 +       poll_check_ok(pop);
76423 +       if (pfd->events)
76424 +               /* Another event cares about that fd. */
76425 +               return (0);
76426 +
76427 +       /* Okay, so we aren't interested in that fd anymore. */
76428 +       pop->idxplus1_by_fd[ev->ev_fd] = 0;
76429 +
76430 +       --pop->nfds;
76431 +       if (i != pop->nfds) {
76432 +               /* 
76433 +                * Shift the last pollfd down into the now-unoccupied
76434 +                * position.
76435 +                */
76436 +               memcpy(&pop->event_set[i], &pop->event_set[pop->nfds],
76437 +                      sizeof(struct pollfd));
76438 +               pop->event_r_back[i] = pop->event_r_back[pop->nfds];
76439 +               pop->event_w_back[i] = pop->event_w_back[pop->nfds];
76440 +               pop->idxplus1_by_fd[pop->event_set[i].fd] = i + 1;
76441 +       }
76442 +
76443 +       poll_check_ok(pop);
76444 +       return (0);
76445 +}
76446 +
76447 +void
76448 +poll_dealloc(struct event_base *base, void *arg)
76449 +{
76450 +       struct pollop *pop = arg;
76451 +
76452 +       evsignal_dealloc(base);
76453 +       if (pop->event_set)
76454 +               free(pop->event_set);
76455 +       if (pop->event_r_back)
76456 +               free(pop->event_r_back);
76457 +       if (pop->event_w_back)
76458 +               free(pop->event_w_back);
76459 +       if (pop->idxplus1_by_fd)
76460 +               free(pop->idxplus1_by_fd);
76461 +
76462 +       memset(pop, 0, sizeof(struct pollop));
76463 +       free(pop);
76464 +}
76465 diff -Nru php-5.2.4.vanilla/libevent/README php-5.2.4.fpm/libevent/README
76466 --- php-5.2.4.vanilla/libevent/README   1970-01-01 03:00:00.000000000 +0300
76467 +++ php-5.2.4.fpm/libevent/README       2007-08-31 15:47:19.000000000 +0400
76468 @@ -0,0 +1,53 @@
76469 +To build libevent, type
76470 +
76471 +$ ./configure && make
76472 +
76473 +Install as root via
76474 +
76475 +# make install
76476 +
76477 +You can run the regression tests by
76478 +
76479 +$ make verify
76480 +
76481 +Before, reporting any problems, please run the regression tests.
76482 +
76483 +To enable the low-level tracing build the library as:
76484 +
76485 +CFLAGS=-DUSE_DEBUG ./configure [...]
76486
76487 +Acknowledgements:
76488 +-----------------
76489 +
76490 +The following people have helped with suggestions, ideas, code or
76491 +fixing bugs:
76492 +
76493 +  Alejo
76494 +  Weston Andros Adamson
76495 +  William Ahern
76496 +  Stas Bekman
76497 +  Andrew Danforth
76498 +  Mike Davis
76499 +  Shie Erlich
76500 +  Alexander von Gernler
76501 +  Artur Grabowski
76502 +  Aaron Hopkins
76503 +  Claudio Jeker
76504 +  Scott Lamb
76505 +  Adam Langley
76506 +  Philip Lewis
76507 +  David Libenzi
76508 +  Nick Mathewson
76509 +  Andrey Matveev
76510 +  Richard Nyberg
76511 +  Jon Oberheide
76512 +  Phil Oleson
76513 +  Dave Pacheco
76514 +  Tassilo von Parseval
76515 +  Pierre Phaneuf
76516 +  Jon Poland
76517 +  Bert JW Regeer
76518 +  Dug Song
76519 +  Taral
76520 +
76521 +If I have forgotten your name, please contact me.
76522 diff -Nru php-5.2.4.vanilla/libevent/rtsig.c php-5.2.4.fpm/libevent/rtsig.c
76523 --- php-5.2.4.vanilla/libevent/rtsig.c  1970-01-01 03:00:00.000000000 +0300
76524 +++ php-5.2.4.fpm/libevent/rtsig.c      2007-08-31 15:47:19.000000000 +0400
76525 @@ -0,0 +1,985 @@
76526 +/*
76527 + * Copyright (c) 2006 Mathew Mills <mathewmills@mac.com>
76528 + * All rights reserved.
76529 + *
76530 + * Redistribution and use in source and binary forms, with or without
76531 + * modification, are permitted provided that the following conditions
76532 + * are met:
76533 + * 1. Redistributions of source code must retain the above copyright
76534 + *    notice, this list of conditions and the following disclaimer.
76535 + * 2. Redistributions in binary form must reproduce the above copyright
76536 + *    notice, this list of conditions and the following disclaimer in the
76537 + *    documentation and/or other materials provided with the distribution.
76538 + * 3. The name of the author may not be used to endorse or promote products
76539 + *    derived from this software without specific prior written permission.
76540 + *
76541 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
76542 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
76543 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
76544 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
76545 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
76546 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
76547 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
76548 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
76549 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
76550 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
76551 + */
76552 +/*
76553 + * Meta-level comments: You know that a kernel interface is wrong if
76554 + * supporting it requires three times more code than any of the other
76555 + * kernel interfaces supported in libevent.  Niels - 2006-02-22
76556 + */
76557 +/**
76558 +
76559 +   "RTSIG" is a shorthand for using O_ASYNC to make descriptors send
76560 +   signals when readable/writable and to use POSIX real-time signals
76561 +   witch are queued unlike normal signals.  At first blush this may
76562 +   seem like a alternative to epoll, but a number of problems arise
76563 +   when attempting to build an eventloop entirely out of rtsig.
76564 +   Still, we can use rtsig in combination with poll() to
76565 +   provide an eventloop that allows for many thousands of sockets
76566 +   without huge overheads implicit with using select() or poll()
76567 +   alone.  epoll and kqueue are far superior to rtsig and should be
76568 +   used where available, but rtsig has been in standard Linux kernels
76569 +   for a long time and have a huge installation base.  epoll requires
76570 +   special patches for 2.4 kernels and 2.6 kernels are not yet nearly
76571 +   so ubiquitous.
76572 +
76573 +   rtsig problems:
76574 +    - O_ASYNC mechanisms work only on sockets - not pipes or tty's
76575 +
76576 +    - O_ASYNC signals are edge-triggered, POLLIN on packet arriving
76577 +   or socket close; POLLOUT when a socket transitions from
76578 +   non-writable to writable.  Being edge-triggered means the
76579 +   event-handler callbacks must transition the level ( reading
76580 +   completely the socket buffer contents ) or it will be unable to
76581 +   reliably receive notification again.
76582 +
76583 +   - rtsig implementations must be intimately involved in how a
76584 +   process dispatches signals.
76585 +
76586 +   - delivering signals per-event can be expensive, CPU-wise, but
76587 +     sigtimedwait() blocks on signals only and means non-sockets
76588 +     cannot be serviced.
76589 +
76590 +   Theory of operation:
76591 +    This libevent module uses rtsig to allow us to manage a set of
76592 +    poll-event descriptors.  We can drop uninteresting fd's from the
76593 +    pollset if the fd will send a signal when it becomes interesting
76594 +    again.
76595 +
76596 +    poll() offers us level-triggering and, when we have verified the
76597 +    level of a socket, we can trust the edge-trigger nature of the
76598 +    ASYNC signal.
76599 +
76600 +    As an eventloop we must poll for external events but leverage
76601 +    kernel functionality to sleep between events ( until the loop's
76602 +    next scheduled timed event ).
76603 +
76604 +    If we are polling on any non-sockets then we simply have no choice
76605 +    about blocking on the poll() call.  If we blocked on the
76606 +    sigtimedwait() call as rtsig papers recommend we will not wake on
76607 +    non-socket state transitions.  As part of libevent, this module
76608 +    must support non-socket polling.
76609 +
76610 +    Many applications, however, do not need to poll on non-sockets and
76611 +    so this module should be able to optimize this case by using
76612 +    sigtimedwait().  For this reason this module can actually trigger
76613 +    events in each of three different ways:
76614 +      - poll() returning ready events from descriptors in the pollset
76615 +
76616 +      - real-time signals dequeued via sigtimedwait()
76617 +
76618 +      - real-time signals that call an installed signal handler which in
76619 +    turn writes the contents of siginfo to one end of a socketpair
76620 +    DGRAM socket.  The other end of the socket is always in the
76621 +    pollset so poll will be guaranteed to return even if the signal is
76622 +    received before entering poll().
76623 +
76624 +    non-socket descriptors force us to block on the poll() for the
76625 +    duration of a dispatch.  In this case we unblock (w/ sigprocmask)
76626 +    the managed signals just before polling.  Each managed signal is
76627 +    handled by signal_handler() which send()'s the contents of siginfo
76628 +    over the socketpair.  Otherwise, we call poll() with a timeout of
76629 +    0ms so it checks the levels of the fd's in the pollset and returns
76630 +    immediately.  Any fd that is a socket and has no active state is
76631 +    removed from the pollset for the next pass -- we will rely on
76632 +    getting a signal for events on these fd's.
76633 +
76634 +    The receiving end of the siginfo socketpair is in the pollset
76635 +    (permanently) so if we are polling on non-sockets, the delivery of
76636 +    signals immediately following sigprocmask( SIG_UNBLOCK...) will
76637 +    result in a readable op->signal_recv_fd which ensures the poll()
76638 +    will return immediately.  If the poll() call is blocking and a
76639 +    signal arrives ( possibly a real-time signal from a socket not in
76640 +    the pollset ) its handler will write the data to the socketpair
76641 +    and interrupt the poll().
76642 +
76643 +    After every poll call we attempt a non-blocking recv from the
76644 +    signal_recv_fd and continue to recv and dispatch the events until
76645 +    recv indicates the socket buffer is empty.
76646 +
76647 +    One might raise concerns about receiving event activations from
76648 +    both poll() and from the rtsig data in the signal_recv_fd.
76649 +    Fortunately, libevent is already structured for event coalescing,
76650 +    so this issue is mitigated ( though we do some work twice for the
76651 +    same event making us less efficient ).  I suspect that the cost of
76652 +    turning off the O_ASYNC flag on fd's in the pollset is more
76653 +    expensive than handling some events twice.  Looking at the
76654 +    kernel's source code for setting O_ASYNC, it looks like it takes a
76655 +    global kernel lock...
76656 +
76657 +    After a poll and recv-loop for the signal_recv_fd, we finally do a
76658 +    sigtimedwait().  sigtimedwait will only block if we haven't
76659 +    blocked in poll() and we have not enqueued events from either the
76660 +    poll or the recv-loop.  Because sigtimedwait blocks all signals
76661 +    that are not in the set of signals to be dequeued, we need to
76662 +    dequeue almost all signals and make sure we dispatch them
76663 +    correctly.  We dequeue any signal that is not blocked as well as
76664 +    all libevent-managed signals.  If we get a signal that is not
76665 +    managed by libevent we lookup the sigaction for the specific
76666 +    signal and call that function ourselves.
76667 +
76668 +    Finally, I should mention that getting a SIGIO signal indicates
76669 +    that the rtsig buffer has overflowed and we have lost events.
76670 +    This forces us to add _every_ descriptor to the pollset to recover.
76671 +
76672 +*/
76673 +
76674 +
76675 +#ifdef HAVE_CONFIG_H
76676 +#include "config.h"
76677 +#endif
76678 +
76679 +/* Enable F_SETSIG and F_SETOWN */
76680 +#define _GNU_SOURCE
76681 +
76682 +#include <sys/types.h>
76683 +#ifdef HAVE_SYS_TIME_H
76684 +#include <sys/time.h>
76685 +#else
76686 +#include <sys/_time.h>
76687 +#endif
76688 +#include <assert.h>
76689 +#include <errno.h>
76690 +#include <fcntl.h>
76691 +#include <signal.h>
76692 +#include <stdio.h>
76693 +#include <stdlib.h>
76694 +#include <string.h>
76695 +#include <sys/poll.h>
76696 +#include <sys/queue.h>
76697 +#include <sys/tree.h>
76698 +#include <unistd.h>
76699 +#include <sys/socket.h>
76700 +
76701 +#include "event.h"
76702 +#include "event-internal.h"
76703 +#include "log.h"
76704 +extern struct event_list signalqueue;
76705 +
76706 +#include <linux/unistd.h>
76707 +#ifndef __NR_gettid
76708 +#define gettid() getpid()
76709 +#else
76710 +
76711 +#if ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 3)))
76712 +_syscall0(pid_t,gettid)
76713 +#endif
76714 +
76715 +#endif
76716 +
76717 +#define EVLIST_NONSOCK   0x1000 /* event is for a non-socket file-descriptor */
76718 +#define EVLIST_DONTDEL   0x2000 /* event should always be in the pollset */
76719 +#define MAXBUFFERSIZE (1024 * 1024 * 2) /* max socketbuffer for signal-spair */
76720 +#define INIT_MAX 16     /* init/min # of fd positions in our pollset */
76721 +
76722 +static int signal_send_fd[_NSIG]; /* the globalend of the signal socketpair */
76723 +static int trouble[_NSIG]; /* 1 when signal-handler cant send to signal_send_fd */
76724 +
76725 +struct rtdata;
76726 +TAILQ_HEAD(rtdata_list, rtdata);
76727 +
76728 +struct rtsigop {
76729 +       sigset_t sigs;        /* signal mask for all _managed_ signals */
76730 +       struct pollfd *poll;  /* poll structures */
76731 +       struct rtdata **ptodat;  /* map poll_position to rtdata */
76732 +       int cur;              /* cur # fd's in a poll set */
76733 +       int max;              /* max # fd's in a poll set, start at 16 and grow as needed */
76734 +       int total;            /* count of fd's we are watching now */
76735 +       int signo;            /* the signo we use for ASYNC fd notifications */
76736 +       int nonsock;          /* number of non-socket fd's we are watching */
76737 +       int highestfd;        /* highest fd accomodated by fdtodat */
76738 +       struct rtdata_list **fdtodat; /* map fd to rtdata ( and thus to event ) */
76739 +       int signal_recv_fd;   /* recv side of the signal_send_fd */
76740 +       int signal_send_fd;   /* recv side of the signal_send_fd */
76741 +       struct event sigfdev; /* our own event structure for the signal fd */
76742 +};
76743 +
76744 +struct rtdata {
76745 +       /* rtdata holds rtsig-private state on each event */
76746 +       TAILQ_ENTRY (rtdata) next;
76747 +       struct event *ev;
76748 +       int poll_position;
76749 +};
76750 +
76751 +void *rtsig_init(struct event_base *);
76752 +int rtsig_add(void *, struct event *);
76753 +int rtsig_del(void *, struct event *);
76754 +int rtsig_recalc(struct event_base *, void *, int);
76755 +int rtsig_dispatch(struct event_base *, void *, struct timeval *);
76756 +
76757 +struct eventop rtsigops = {
76758 +       "rtsig",
76759 +       rtsig_init,
76760 +       rtsig_add,
76761 +       rtsig_del,
76762 +       rtsig_recalc,
76763 +       rtsig_dispatch
76764 +};
76765 +
76766 +static void
76767 +signal_handler(int sig, siginfo_t *info, void *ctx)
76768 +{
76769 +       /*
76770 +        * the signal handler for all libevent-managed signals only
76771 +        * used if we need to do a blocking poll() call due to
76772 +        * non-socket fd's in the pollset.
76773 +        */
76774 +  
76775 +       siginfo_t *i = info;
76776 +       siginfo_t i_local;
76777 +
76778 +       if (trouble[sig - 1]) {
76779 +               i_local.si_signo = SIGIO;
76780 +               i_local.si_errno = 0;
76781 +               i_local.si_code = 0;
76782 +               i = &i_local;
76783 +               trouble[sig - 1] = 0;
76784 +       }
76785 +
76786 +       if (send(signal_send_fd[sig - 1], i, sizeof(*i),
76787 +               MSG_DONTWAIT|MSG_NOSIGNAL) == -1)
76788 +               trouble[sig - 1] = 1;
76789 +}
76790 +
76791 +static void
76792 +donothing(int fd, short event, void *arg)
76793 +{
76794 +       /*
76795 +        * callback for our signal_recv_fd event structure
76796 +        * we don't want to act on these events, we just want to wake the poll()
76797 +        */
76798 +};
76799 +
76800 +static void
76801 +signotset(sigset_t *set)
76802 +{
76803 +       int i, l;
76804 +       l = sizeof(*set) / 4;
76805 +       for (i = 0; i < l; i++) {
76806 +               ((unsigned *)set)[i] = ~((unsigned *)set)[i];
76807 +       }
76808 +}
76809 +
76810 +/*  The next three functions manage our private data about each event struct */
76811 +
76812 +static int
76813 +grow_fdset(struct rtsigop *op, int newhigh)
76814 +{
76815 +       /*
76816 +        * grow the fd -> rtdata array because we have encountered a
76817 +        * new fd too high to fit in the existing array
76818 +        */
76819 +
76820 +       struct rtdata_list **p;
76821 +       struct rtdata_list *datset;
76822 +       int i,x;
76823 +       int newcnt = (newhigh + 1) << 1;
76824 +
76825 +       if (newhigh <= op->highestfd)
76826 +               return (0);
76827 +
76828 +       p = op->fdtodat;
76829 +       p = realloc(op->fdtodat, sizeof(struct rtdata_list *) * newcnt);
76830 +       if (p == NULL)
76831 +               return (-1);
76832 +       op->fdtodat = p;
76833 +
76834 +       datset = calloc(newcnt - (op->highestfd + 1),
76835 +           sizeof(struct rtdata_list));
76836 +       if (datset == NULL)
76837 +               return (-1);
76838 +
76839 +       for (i = op->highestfd + 1, x = 0; i < newcnt; i++, x++) {
76840 +               op->fdtodat[i] = &(datset[x]);
76841 +               TAILQ_INIT(op->fdtodat[i]);
76842 +       }
76843 +
76844 +       op->highestfd = newcnt - 1;
76845 +       return (0);
76846 +}
76847 +
76848 +static struct rtdata *
76849 +ev2dat(struct rtsigop *op, struct event *ev, int create)
76850 +{
76851 +       /*
76852 +        * given an event struct, find the dat structure that
76853 +        * corresponds to it if create is non-zero and the rtdata
76854 +        * structure does not exist, create it return NULL if not
76855 +        * found
76856 +        */
76857 +
76858 +       int found = 0;
76859 +       int fd = ev->ev_fd;
76860 +       struct rtdata *ret = NULL;
76861 +
76862 +       if (op->highestfd < fd && create)
76863 +               if (grow_fdset(op, fd) == -1)
76864 +                       return (NULL);
76865 +  
76866 +       TAILQ_FOREACH(ret, op->fdtodat[fd], next) {
76867 +               if (ret->ev == ev) {
76868 +                       found = 1;
76869 +                       break;
76870 +               }
76871 +       }
76872 +
76873 +       if (!found) {
76874 +               if (!create)
76875 +                       return (NULL);
76876 +
76877 +               ret = calloc(1, sizeof(struct rtdata));
76878 +               if (ret == NULL)
76879 +                       return (NULL);
76880 +               ret->ev = ev;
76881 +               ret->poll_position = -1;
76882 +               TAILQ_INSERT_TAIL(op->fdtodat[fd], ret, next);
76883 +       }
76884 +
76885 +       return (ret);
76886 +}
76887 +
76888 +static void
76889 +dat_del(struct rtsigop *op, struct rtdata *dat)
76890 +{
76891 +       /*
76892 +        * delete our private notes about a given event struct
76893 +        * called from rtsig_del() only
76894 +        */
76895 +       int fd;
76896 +       if (dat == NULL)
76897 +               return;
76898 +       fd = dat->ev->ev_fd;
76899 +
76900 +       TAILQ_REMOVE(op->fdtodat[fd], dat, next);
76901 +       memset(dat, 0, sizeof(*dat));
76902 +       free(dat);
76903 +}
76904 +
76905 +
76906 +static void
76907 +set_sigaction(int sig)
76908 +{
76909 +       /*
76910 +        * set the standard handler for any libevent-managed signal,
76911 +        * including the rtsig used for O_ASYNC notifications
76912 +        */
76913 +       struct sigaction act;
76914 +
76915 +       act.sa_flags = SA_RESTART | SA_SIGINFO;
76916 +       sigfillset(&(act.sa_mask));
76917 +       act.sa_sigaction = &signal_handler;
76918 +       sigaction(sig, &act, NULL);
76919 +}
76920 +
76921 +static int
76922 +find_rt_signal()
76923 +{
76924 +       /* find an unused rtsignal */
76925 +       struct sigaction act;
76926 +       int sig = SIGRTMIN;
76927 +
76928 +       while (sig <= SIGRTMAX) {
76929 +               if (sigaction(sig, NULL, &act) != 0) {
76930 +                       if (errno == EINTR)
76931 +                               continue;
76932 +               } else {
76933 +                       if (act.sa_flags & SA_SIGINFO) {
76934 +                               if (act.sa_sigaction == NULL)
76935 +                                       return (sig);
76936 +                       } else {
76937 +                               if (act.sa_handler == SIG_DFL)
76938 +                                       return (sig);
76939 +                       }
76940 +               }
76941 +               sig++;
76942 +       }
76943 +       return (0);
76944 +}
76945 +
76946 +/*
76947 + * the next three functions manage our pollset and the memory management for 
76948 + * fd -> rtdata -> event -> poll_position maps
76949 + */
76950 +
76951 +static int
76952 +poll_add(struct rtsigop *op, struct event *ev, struct rtdata *dat)
76953 +{
76954 +       struct pollfd *pfd;
76955 +       int newmax = op->max << 1;
76956 +       int pp;
76957 +
76958 +       if (op->poll == NULL)
76959 +               return (0);
76960 +
76961 +       if (dat == NULL)
76962 +               dat = ev2dat(op, ev, 0);
76963 +
76964 +       if (dat == NULL)
76965 +               return (0);
76966 +
76967 +       pp = dat->poll_position;
76968 +
76969 +       if (pp != -1) {
76970 +               pfd = &op->poll[pp];
76971 +               if (ev->ev_events & EV_READ)
76972 +                       pfd->events |= POLLIN;
76973 +    
76974 +               if (ev->ev_events & EV_WRITE)
76975 +                       pfd->events |= POLLOUT;
76976 +    
76977 +               return (0);
76978 +       }
76979 +
76980 +       if (op->cur == op->max) {
76981 +               void *p = realloc(op->poll, sizeof(*op->poll) * newmax);
76982 +               if (p == NULL) {
76983 +                       errno = ENOMEM;
76984 +                       return (-1);
76985 +               }
76986 +               op->poll = p;
76987 +
76988 +               p = realloc(op->ptodat, sizeof(*op->ptodat) * newmax);
76989 +               if (p == NULL) {
76990 +                       /* shrink the pollset back down */
76991 +                       op->poll = realloc(op->poll,
76992 +                           sizeof(*op->poll) * op->max);
76993 +                       errno = ENOMEM;
76994 +                       return (-1);
76995 +               }
76996 +               op->ptodat = p;
76997 +               op->max = newmax;
76998 +       }
76999 +
77000 +       pfd = &op->poll[op->cur];
77001 +       pfd->fd = ev->ev_fd;
77002 +       pfd->revents = 0;
77003 +       pfd->events = 0;
77004 +
77005 +       if (ev->ev_events & EV_READ)
77006 +               pfd->events |= POLLIN;
77007 +  
77008 +       if (ev->ev_events & EV_WRITE)
77009 +               pfd->events |= POLLOUT;
77010 +  
77011 +       op->ptodat[op->cur] = dat;
77012 +       dat->poll_position = op->cur;
77013 +       op->cur++;
77014 +
77015 +       return (0);
77016 +}
77017 +
77018 +static void
77019 +poll_free(struct rtsigop *op, int n)
77020 +{
77021 +  if (op->poll == NULL)
77022 +         return;
77023 +
77024 +  op->cur--;
77025 +
77026 +  if (n < op->cur) {
77027 +    memcpy(&op->poll[n], &op->poll[op->cur], sizeof(*op->poll));
77028 +    op->ptodat[n] = op->ptodat[op->cur];
77029 +    op->ptodat[n]->poll_position = n;
77030 +  }
77031 +
77032 +
77033 +  /* less then half the max in use causes us to shrink */
77034 +  if (op->max > INIT_MAX && op->cur < op->max >> 1) {
77035 +    op->max >>= 1;
77036 +    op->poll = realloc(op->poll, sizeof(*op->poll) * op->max);
77037 +    op->ptodat = realloc(op->ptodat, sizeof(*op->ptodat) * op->max);
77038 +  }
77039 +}
77040 +
77041 +static void
77042 +poll_remove(struct rtsigop *op, struct event *ev, struct rtdata *dat)
77043 +{
77044 +  int pp;
77045 +  if (dat == NULL)
77046 +    dat = ev2dat(op, ev, 0);
77047 +
77048 +  if (dat == NULL) return;
77049 +
77050 +  pp = dat->poll_position;
77051 +  if (pp != -1) {
77052 +    poll_free(op, pp);
77053 +    dat->poll_position = -1;
77054 +  }
77055 +}
77056 +
77057 +static void
77058 +activate(struct event *ev, int flags)
77059 +{
77060 +       /* activate an event, possibly removing one-shot events */
77061 +       if (!(ev->ev_events & EV_PERSIST))
77062 +               event_del(ev);
77063 +       event_active(ev, flags, 1);
77064 +}
77065 +
77066 +#define FD_CLOSEONEXEC(x) do { \
77067 +        if (fcntl(x, F_SETFD, 1) == -1) \
77068 +                event_warn("fcntl(%d, F_SETFD)", x); \
77069 +} while (0)
77070 +
77071 +void *
77072 +rtsig_init(struct event_base *)
77073 +{
77074 +       struct rtsigop *op;
77075 +       int sockets[2];
77076 +       int optarg;
77077 +       struct rtdata *dat;
77078 +       int flags;
77079 +
77080 +       if (getenv("EVENT_NORTSIG"))
77081 +               goto err;
77082 +
77083 +       op = calloc(1, sizeof(*op));
77084 +       if (op == NULL)
77085 +               goto err;
77086 +
77087 +       op->max = INIT_MAX;
77088 +       op->poll = malloc(sizeof(*op->poll) * op->max);
77089 +       if (op->poll == NULL) 
77090 +               goto err_free_op;
77091 +
77092 +       op->signo = find_rt_signal();
77093 +       if (op->signo == 0)
77094 +               goto err_free_poll;
77095 +  
77096 +       op->nonsock = 0;
77097 +
77098 +       if (socketpair(PF_UNIX, SOCK_DGRAM, 0, sockets) != 0)
77099 +               goto err_free_poll;
77100 +
77101 +       FD_CLOSEONEXEC(sockets[0]);
77102 +       FD_CLOSEONEXEC(sockets[1]);
77103 +
77104 +       signal_send_fd[op->signo - 1] = sockets[0];
77105 +       trouble[op->signo - 1] = 0;
77106 +       op->signal_send_fd = sockets[0];
77107 +       op->signal_recv_fd = sockets[1];
77108 +       flags = fcntl(op->signal_recv_fd, F_GETFL);
77109 +       fcntl(op->signal_recv_fd, F_SETFL, flags | O_NONBLOCK);
77110 +
77111 +       optarg = MAXBUFFERSIZE;
77112 +       setsockopt(signal_send_fd[op->signo - 1],
77113 +           SOL_SOCKET, SO_SNDBUF, 
77114 +           &optarg, sizeof(optarg));
77115 +  
77116 +       optarg = MAXBUFFERSIZE;
77117 +       setsockopt(op->signal_recv_fd,
77118 +           SOL_SOCKET, SO_RCVBUF,
77119 +           &optarg, sizeof(optarg));
77120 +
77121 +       op->highestfd = -1;
77122 +       op->fdtodat = NULL;
77123 +       if (grow_fdset(op, 1) == -1)
77124 +               goto err_close_pair;
77125 +
77126 +       op->ptodat = malloc(sizeof(*op->ptodat) * op->max);
77127 +       if (op->ptodat == NULL)
77128 +               goto err_close_pair;
77129 +
77130 +       sigemptyset(&op->sigs);
77131 +       sigaddset(&op->sigs, SIGIO);
77132 +       sigaddset(&op->sigs, op->signo);
77133 +       sigprocmask(SIG_BLOCK, &op->sigs, NULL);
77134 +       set_sigaction(SIGIO);
77135 +       set_sigaction(op->signo);
77136 +
77137 +       event_set(&(op->sigfdev), op->signal_recv_fd, EV_READ|EV_PERSIST,
77138 +           donothing, NULL);
77139 +       op->sigfdev.ev_flags |= EVLIST_DONTDEL;
77140 +       dat = ev2dat(op, &(op->sigfdev), 1);
77141 +       poll_add(op, &(op->sigfdev), dat);
77142 +
77143 +       return (op);
77144 +
77145 + err_close_pair:
77146 +       close(op->signal_recv_fd);
77147 +       close(signal_send_fd[op->signo - 1]);
77148 +
77149 + err_free_poll:
77150 +       free(op->poll);
77151
77152 + err_free_op:
77153 +       free(op);
77154 + err:
77155 +       return (NULL);
77156 +}
77157 +
77158 +int
77159 +rtsig_add(void *arg, struct event *ev)
77160 +{
77161 +       struct rtsigop *op = (struct rtsigop *) arg;
77162 +       int flags, i;
77163 +       struct stat statbuf;
77164 +       struct rtdata *dat;
77165 +
77166 +       if (ev->ev_events & EV_SIGNAL) {
77167 +               int signo = EVENT_SIGNAL(ev);
77168 +  
77169 +               sigaddset(&op->sigs, EVENT_SIGNAL(ev));
77170 +               if (sigprocmask(SIG_BLOCK, &op->sigs, NULL) == -1)
77171 +                       return (-1);
77172 +    
77173 +               set_sigaction(signo);
77174 +    
77175 +               signal_send_fd[signo - 1] = op->signal_send_fd;
77176 +               trouble[signo - 1] = 0;
77177 +
77178 +               return (0);
77179 +       }
77180 +
77181 +       if (!(ev->ev_events & (EV_READ|EV_WRITE))) 
77182 +               return (0);
77183 +
77184 +       if (-1 == fstat(ev->ev_fd, &statbuf))
77185 +               return (-1);
77186 +
77187 +       if (!S_ISSOCK(statbuf.st_mode))
77188 +               ev->ev_flags |= EVLIST_NONSOCK;
77189 +
77190 +       flags = fcntl(ev->ev_fd, F_GETFL);
77191 +       if (flags == -1)
77192 +               return (-1);
77193 +
77194 +       if (!(flags & O_ASYNC)) {
77195 +               if (fcntl(ev->ev_fd, F_SETSIG, op->signo) == -1 ||
77196 +                   fcntl(ev->ev_fd, F_SETOWN, (int) gettid()) == -1)
77197 +                       return (-1);
77198 +    
77199 +               /*
77200 +                * the overhead of always handling writeable edges
77201 +                * isn't going to be that bad...
77202 +                */
77203 +               if (fcntl(ev->ev_fd, F_SETFL, flags | O_ASYNC|O_RDWR)) 
77204 +                       return (-1);
77205 +       }
77206 +
77207 +#ifdef O_ONESIGFD
77208 +       /*
77209 +        * F_SETAUXFL and O_ONESIGFD are defined in a non-standard
77210 +        * linux kernel patch to coalesce events for fds
77211 +        */
77212 +       fcntl(ev->ev_fd, F_SETAUXFL, O_ONESIGFD);
77213 +#endif
77214 +
77215 +       dat = ev2dat(op, ev, 1);
77216 +       if (dat == NULL)
77217 +               return (-1);
77218 +
77219 +       op->total++;
77220 +       if (ev->ev_flags & EVLIST_NONSOCK)
77221 +               op->nonsock++;
77222 +
77223 +       if (poll_add(op, ev, dat) == -1) {
77224 +               /* must check the level of new fd's */
77225 +               i = errno;
77226 +               fcntl(ev->ev_fd, F_SETFL, flags);
77227 +               errno = i;
77228 +               return (-1);
77229 +       }
77230 +
77231 +       return (0);
77232 +}
77233 +
77234 +int
77235 +rtsig_del(void *arg, struct event *ev)
77236 +{
77237 +       struct rtdata *dat;
77238 +       struct rtsigop *op = (struct rtsigop *) arg;
77239 +
77240 +       if (ev->ev_events & EV_SIGNAL) {
77241 +               sigset_t sigs;
77242 +
77243 +               sigdelset(&op->sigs, EVENT_SIGNAL(ev));
77244 +    
77245 +               sigemptyset(&sigs);
77246 +               sigaddset(&sigs, EVENT_SIGNAL(ev));
77247 +               return (sigprocmask(SIG_UNBLOCK, &sigs, NULL));
77248 +       }
77249 +
77250 +       if (!(ev->ev_events & (EV_READ|EV_WRITE)))
77251 +               return (0);
77252 +
77253 +       dat = ev2dat(op, ev, 0);
77254 +       poll_remove(op, ev, dat);
77255 +       dat_del(op, dat);
77256 +       op->total--;
77257 +       if (ev->ev_flags & EVLIST_NONSOCK)
77258 +               op->nonsock--;
77259 +
77260 +       return (0);
77261 +}
77262 +
77263 +int
77264 +rtsig_recalc(struct event_base *base, void *arg, int max)
77265 +{
77266 +       return (0);
77267 +}
77268 +
77269 +/*
77270 + * the following do_X functions implement the different stages of a single
77271 + * eventloop pass: poll(), recv(sigsock), sigtimedwait()
77272 + *
77273 + * do_siginfo_dispatch() is a common factor to both do_sigwait() and
77274 + * do_signals_from_socket().
77275 + */
77276 +
77277 +static inline int
77278 +do_poll(struct rtsigop *op, struct timespec *ts)
77279 +{
77280 +       int res = 0;
77281 +       int i = 0;
77282 +  
77283 +       if (op->cur > 1) {
77284 +               /* non-empty poll set (modulo the signalfd) */
77285 +               if (op->nonsock) {
77286 +                       int timeout = ts->tv_nsec / 1000000 + ts->tv_sec * 1000;
77287 +                       
77288 +                       sigprocmask(SIG_UNBLOCK, &(op->sigs), NULL);
77289 +
77290 +                       res = poll(op->poll, op->cur, timeout);
77291 +                       
77292 +                       sigprocmask(SIG_BLOCK, &(op->sigs), NULL);
77293 +                       
77294 +                       ts->tv_sec = 0;
77295 +                       ts->tv_nsec = 0;
77296 +               } else {
77297 +                       res = poll(op->poll, op->cur, 0);
77298 +               }
77299 +
77300 +               if (res < 0) {
77301 +                       return (errno == EINTR ? 0 : -1);
77302 +               } else if (res) {
77303 +                       ts->tv_sec = 0;
77304 +                       ts->tv_nsec = 0;
77305 +               }
77306 +
77307 +               i = 0;
77308 +               while (i < op->cur) {
77309 +                       struct rtdata *dat = op->ptodat[i];
77310 +                       struct event *ev = dat->ev;
77311 +
77312 +                       if (op->poll[i].revents) {
77313 +                               int flags = 0;
77314 +       
77315 +                               if (op->poll[i].revents & (POLLIN | POLLERR))
77316 +                                       flags |= EV_READ;
77317 +       
77318 +                               if (op->poll[i].revents & POLLOUT)
77319 +                                       flags |= EV_WRITE;
77320 +       
77321 +                               if (!(ev->ev_events & EV_PERSIST)) {
77322 +                                       poll_remove(op, ev, op->ptodat[i]);
77323 +                                       event_del(ev);
77324 +                               } else {
77325 +                                       i++;
77326 +                               }
77327 +       
77328 +                               event_active(ev, flags, 1);
77329 +                       } else {
77330 +                               if (ev->ev_flags & (EVLIST_NONSOCK|EVLIST_DONTDEL)) {
77331 +                                       i++;
77332 +                               } else {
77333 +                                       poll_remove(op, ev, op->ptodat[i]);
77334 +                               }
77335 +                       }
77336 +               }
77337 +       }
77338 +       return (res);
77339 +}
77340 +
77341 +static inline int
77342 +do_siginfo_dispatch(struct event_base *base, struct rtsigop *op,
77343 +    siginfo_t *info)
77344 +{
77345 +       int signum;
77346 +       struct rtdata *dat, *next_dat;
77347 +       struct event *ev, *next_ev;
77348 +
77349 +       if (info == NULL)
77350 +               return (-1);
77351 +
77352 +       signum = info->si_signo;
77353 +       if (signum == op->signo) {
77354 +               int flags, sigok = 0;
77355 +               flags = 0;
77356 +
77357 +               if (info->si_band & (POLLIN|POLLERR))
77358 +                       flags |= EV_READ;
77359 +               if (info->si_band & POLLOUT)
77360 +                       flags |= EV_WRITE;
77361 +
77362 +               if (!flags)
77363 +                       return (0);
77364 +
77365 +               if (info->si_fd > op->highestfd)
77366 +                       return (-1);
77367 +
77368 +               dat = TAILQ_FIRST(op->fdtodat[info->si_fd]);
77369 +               while (dat != TAILQ_END(op->fdtodat[info->si_fd])) {
77370 +                       next_dat = TAILQ_NEXT(dat, next);
77371 +                       if (flags & dat->ev->ev_events) {
77372 +                               ev = dat->ev;
77373 +                               poll_add(op, ev, dat);
77374 +                               activate(ev, flags & ev->ev_events);
77375 +                               sigok = 1;
77376 +                       }
77377 +                       dat = next_dat;
77378 +               }
77379 +       } else if (signum == SIGIO) {
77380 +               TAILQ_FOREACH(ev, &base->eventqueue, ev_next) {
77381 +                       if (ev->ev_events & (EV_READ|EV_WRITE))
77382 +                               poll_add(op, ev, NULL);
77383 +               }
77384 +               return (1); /* 1 means the caller should poll() again */
77385 +    
77386 +       } else if (sigismember(&op->sigs, signum)) {
77387 +               /* managed signals are queued */
77388 +               ev = TAILQ_FIRST(&signalqueue);
77389 +               while (ev != TAILQ_END(&signalqueue)) {
77390 +                       next_ev = TAILQ_NEXT(ev, ev_signal_next);
77391 +                       if (EVENT_SIGNAL(ev) == signum)
77392 +                               activate(ev, EV_SIGNAL);
77393 +                       ev = next_ev;
77394 +               }
77395 +       } else {
77396 +               /* dispatch unmanaged signals immediately */
77397 +               struct sigaction sa;
77398 +               if (sigaction(signum, NULL, &sa) == 0) {
77399 +                       if ((sa.sa_flags & SA_SIGINFO) && sa.sa_sigaction) {
77400 +                               (*sa.sa_sigaction)(signum, info, NULL);
77401 +                       } else if (sa.sa_handler) {
77402 +                               if ((int)sa.sa_handler != 1)
77403 +                                       (*sa.sa_handler)(signum);
77404 +                       } else {
77405 +                               if (signum != SIGCHLD) {
77406 +                                       /* non-blocked SIG_DFL */
77407 +                                       kill(gettid(), signum);
77408 +                               }
77409 +                       }
77410 +               }
77411 +       }
77412 +
77413 +       return (0);
77414 +}
77415 +
77416 +/*
77417 + * return 1 if we should poll again
77418 + * return 0 if we are all set
77419 + * return -1 on error
77420 + */
77421 +static inline int
77422 +do_sigwait(struct event_base *base, struct rtsigop *op, struct timespec *ts,
77423 +    sigset_t *sigs)
77424 +{
77425 +       for (;;) {
77426 +               siginfo_t info;
77427 +               int signum;
77428 +
77429 +               signum = sigtimedwait(sigs, &info, ts);
77430 +
77431 +               ts->tv_sec = 0;
77432 +               ts->tv_nsec = 0;
77433 +
77434 +               if (signum == -1) {
77435 +                       if (errno == EAGAIN || errno == EINTR)
77436 +                               return (0);
77437 +                       return (-1);
77438 +               } else if (1 == do_siginfo_dispatch(base, op, &info)) {
77439 +                       return (1);
77440 +               }
77441 +       }
77442 +
77443 +       /* NOTREACHED */
77444 +}
77445 +
77446 +static inline int
77447 +do_signals_from_socket(struct event_base *base, struct rtsigop *op,
77448 +    struct timespec *ts)
77449 +{
77450 +       int fd = op->signal_recv_fd;
77451 +       siginfo_t info;
77452 +       int res;
77453 +
77454 +       for (;;) {
77455 +               res = recv(fd, &info, sizeof(info), MSG_NOSIGNAL);
77456 +               if (res == -1) {
77457 +                       if (errno == EAGAIN)
77458 +                               return (0);
77459 +                       if (errno == EINTR)
77460 +                               continue;
77461 +                       return (-1);
77462 +               } else {
77463 +                       ts->tv_sec = 0;
77464 +                       ts->tv_nsec = 0;
77465 +                       if (1 == do_siginfo_dispatch(base, op, &info))
77466 +                               return (1);
77467 +               }
77468 +       }
77469 +       /* NOTREACHED */
77470 +}
77471 +
77472 +int
77473 +rtsig_dispatch(struct event_base *base, void *arg, struct timeval *tv)
77474 +{
77475 +       struct rtsigop *op = (struct rtsigop *) arg;
77476 +       struct timespec ts;
77477 +       int res;
77478 +       sigset_t sigs;
77479 +
77480 +       ts.tv_sec = tv->tv_sec;
77481 +       ts.tv_nsec = tv->tv_usec * 1000;
77482 +
77483 + poll_for_level:
77484 +       res = do_poll(op, &ts); /* ts can be modified in do_XXX() */
77485 +
77486 +       res = do_signals_from_socket(base, op, &ts);
77487 +       if (res == 1)
77488 +               goto poll_for_level;
77489 +       else if (res == -1)
77490 +               return (-1);
77491 +
77492 +       /*
77493 +        * the mask = managed_signals | unblocked-signals
77494 +        * MM - if this is not blocking do we need to cast the net this wide?
77495 +        */
77496 +       sigemptyset(&sigs);
77497 +       sigprocmask(SIG_BLOCK, &sigs, &sigs);
77498 +       signotset(&sigs);
77499 +       sigorset(&sigs, &sigs, &op->sigs);
77500 +
77501 +       res = do_sigwait(base, op, &ts, &sigs);
77502 +
77503 +       if (res == 1)
77504 +               goto poll_for_level;
77505 +       else if (res == -1)
77506 +               return (-1);
77507 +
77508 +       return (0);
77509 +}
77510 +
77511 diff -Nru php-5.2.4.vanilla/libevent/select.c php-5.2.4.fpm/libevent/select.c
77512 --- php-5.2.4.vanilla/libevent/select.c 1970-01-01 03:00:00.000000000 +0300
77513 +++ php-5.2.4.fpm/libevent/select.c     2007-08-31 15:47:19.000000000 +0400
77514 @@ -0,0 +1,370 @@
77515 +/*     $OpenBSD: select.c,v 1.2 2002/06/25 15:50:15 mickey Exp $       */
77516 +
77517 +/*
77518 + * Copyright 2000-2002 Niels Provos <provos@citi.umich.edu>
77519 + * All rights reserved.
77520 + *
77521 + * Redistribution and use in source and binary forms, with or without
77522 + * modification, are permitted provided that the following conditions
77523 + * are met:
77524 + * 1. Redistributions of source code must retain the above copyright
77525 + *    notice, this list of conditions and the following disclaimer.
77526 + * 2. Redistributions in binary form must reproduce the above copyright
77527 + *    notice, this list of conditions and the following disclaimer in the
77528 + *    documentation and/or other materials provided with the distribution.
77529 + * 3. The name of the author may not be used to endorse or promote products
77530 + *    derived from this software without specific prior written permission.
77531 + *
77532 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
77533 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
77534 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
77535 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
77536 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
77537 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
77538 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
77539 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
77540 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
77541 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
77542 + */
77543 +#ifdef HAVE_CONFIG_H
77544 +#include "config.h"
77545 +#endif
77546 +
77547 +#include <sys/types.h>
77548 +#ifdef HAVE_SYS_TIME_H
77549 +#include <sys/time.h>
77550 +#else
77551 +#include <sys/_time.h>
77552 +#endif
77553 +#include <sys/queue.h>
77554 +#include <sys/tree.h>
77555 +#include <signal.h>
77556 +#include <stdio.h>
77557 +#include <stdlib.h>
77558 +#include <string.h>
77559 +#include <unistd.h>
77560 +#include <errno.h>
77561 +#ifdef CHECK_INVARIANTS
77562 +#include <assert.h>
77563 +#endif
77564 +
77565 +#include "event.h"
77566 +#include "event-internal.h"
77567 +#include "evsignal.h"
77568 +#include "log.h"
77569 +
77570 +#ifndef howmany
77571 +#define        howmany(x, y)   (((x)+((y)-1))/(y))
77572 +#endif
77573 +
77574 +struct selectop {
77575 +       int event_fds;          /* Highest fd in fd set */
77576 +       int event_fdsz;
77577 +       fd_set *event_readset_in;
77578 +       fd_set *event_writeset_in;
77579 +       fd_set *event_readset_out;
77580 +       fd_set *event_writeset_out;
77581 +       struct event **event_r_by_fd;
77582 +       struct event **event_w_by_fd;
77583 +};
77584 +
77585 +void *select_init      (struct event_base *);
77586 +int select_add         (void *, struct event *);
77587 +int select_del         (void *, struct event *);
77588 +int select_recalc      (struct event_base *, void *, int);
77589 +int select_dispatch    (struct event_base *, void *, struct timeval *);
77590 +void select_dealloc     (struct event_base *, void *);
77591 +
77592 +const struct eventop selectops = {
77593 +       "select",
77594 +       select_init,
77595 +       select_add,
77596 +       select_del,
77597 +       select_recalc,
77598 +       select_dispatch,
77599 +       select_dealloc
77600 +};
77601 +
77602 +static int select_resize(struct selectop *sop, int fdsz);
77603 +
77604 +void *
77605 +select_init(struct event_base *base)
77606 +{
77607 +       struct selectop *sop;
77608 +
77609 +       /* Disable select when this environment variable is set */
77610 +       if (getenv("EVENT_NOSELECT"))
77611 +               return (NULL);
77612 +
77613 +       if (!(sop = calloc(1, sizeof(struct selectop))))
77614 +               return (NULL);
77615 +
77616 +       select_resize(sop, howmany(32 + 1, NFDBITS)*sizeof(fd_mask));
77617 +
77618 +       evsignal_init(base);
77619 +
77620 +       return (sop);
77621 +}
77622 +
77623 +#ifdef CHECK_INVARIANTS
77624 +static void
77625 +check_selectop(struct selectop *sop)
77626 +{
77627 +       int i;
77628 +       for (i = 0; i <= sop->event_fds; ++i) {
77629 +               if (FD_ISSET(i, sop->event_readset_in)) {
77630 +                       assert(sop->event_r_by_fd[i]);
77631 +                       assert(sop->event_r_by_fd[i]->ev_events & EV_READ);
77632 +                       assert(sop->event_r_by_fd[i]->ev_fd == i);
77633 +               } else {
77634 +                       assert(! sop->event_r_by_fd[i]);
77635 +               }
77636 +               if (FD_ISSET(i, sop->event_writeset_in)) {
77637 +                       assert(sop->event_w_by_fd[i]);
77638 +                       assert(sop->event_w_by_fd[i]->ev_events & EV_WRITE);
77639 +                       assert(sop->event_w_by_fd[i]->ev_fd == i);
77640 +               } else {
77641 +                       assert(! sop->event_w_by_fd[i]);
77642 +               }
77643 +       }
77644 +
77645 +}
77646 +#else
77647 +#define check_selectop(sop) do { (void) sop; } while (0)
77648 +#endif
77649 +
77650 +/*
77651 + * Called with the highest fd that we know about.  If it is 0, completely
77652 + * recalculate everything.
77653 + */
77654 +
77655 +int
77656 +select_recalc(struct event_base *base, void *arg, int max)
77657 +{
77658 +       struct selectop *sop = arg;
77659 +
77660 +       check_selectop(sop);
77661 +
77662 +       return (0);
77663 +}
77664 +
77665 +int
77666 +select_dispatch(struct event_base *base, void *arg, struct timeval *tv)
77667 +{
77668 +       int res, i;
77669 +       struct selectop *sop = arg;
77670 +
77671 +       check_selectop(sop);
77672 +
77673 +       memcpy(sop->event_readset_out, sop->event_readset_in,
77674 +              sop->event_fdsz);
77675 +       memcpy(sop->event_writeset_out, sop->event_writeset_in,
77676 +              sop->event_fdsz);
77677 +
77678 +       res = select(sop->event_fds + 1, sop->event_readset_out,
77679 +           sop->event_writeset_out, NULL, tv);
77680 +
77681 +       check_selectop(sop);
77682 +
77683 +       if (res == -1) {
77684 +               if (errno != EINTR) {
77685 +                       event_warn("select");
77686 +                       return (-1);
77687 +               }
77688 +
77689 +               evsignal_process(base);
77690 +               return (0);
77691 +       } else if (base->sig.evsignal_caught) {
77692 +               evsignal_process(base);
77693 +       }
77694 +
77695 +       event_debug(("%s: select reports %d", __func__, res));
77696 +
77697 +       check_selectop(sop);
77698 +       for (i = 0; i <= sop->event_fds; ++i) {
77699 +               struct event *r_ev = NULL, *w_ev = NULL;
77700 +               res = 0;
77701 +               if (FD_ISSET(i, sop->event_readset_out)) {
77702 +                       r_ev = sop->event_r_by_fd[i];
77703 +                       res |= EV_READ;
77704 +               }
77705 +               if (FD_ISSET(i, sop->event_writeset_out)) {
77706 +                       w_ev = sop->event_w_by_fd[i];
77707 +                       res |= EV_WRITE;
77708 +               }
77709 +               if (r_ev && (res & r_ev->ev_events)) {
77710 +                       if (!(r_ev->ev_events & EV_PERSIST))
77711 +                               event_del(r_ev);
77712 +                       event_active(r_ev, res & r_ev->ev_events, 1);
77713 +               }
77714 +               if (w_ev && w_ev != r_ev && (res & w_ev->ev_events)) {
77715 +                       if (!(w_ev->ev_events & EV_PERSIST))
77716 +                               event_del(w_ev);
77717 +                       event_active(w_ev, res & w_ev->ev_events, 1);
77718 +               }
77719 +       }
77720 +       check_selectop(sop);
77721 +
77722 +       return (0);
77723 +}
77724 +
77725 +
77726 +static int
77727 +select_resize(struct selectop *sop, int fdsz)
77728 +{
77729 +       int n_events, n_events_old;
77730 +
77731 +       fd_set *readset_in = NULL;
77732 +       fd_set *writeset_in = NULL;
77733 +       fd_set *readset_out = NULL;
77734 +       fd_set *writeset_out = NULL;
77735 +       struct event **r_by_fd = NULL;
77736 +       struct event **w_by_fd = NULL;
77737 +
77738 +       n_events = (fdsz/sizeof(fd_mask)) * NFDBITS;
77739 +       n_events_old = (sop->event_fdsz/sizeof(fd_mask)) * NFDBITS;
77740 +
77741 +       if (sop->event_readset_in)
77742 +               check_selectop(sop);
77743 +
77744 +       if ((readset_in = realloc(sop->event_readset_in, fdsz)) == NULL)
77745 +               goto error;
77746 +       sop->event_readset_in = readset_in;
77747 +       if ((readset_out = realloc(sop->event_readset_out, fdsz)) == NULL)
77748 +               goto error;
77749 +       sop->event_readset_out = readset_out;
77750 +       if ((writeset_in = realloc(sop->event_writeset_in, fdsz)) == NULL)
77751 +               goto error;
77752 +       sop->event_writeset_in = writeset_in;
77753 +       if ((writeset_out = realloc(sop->event_writeset_out, fdsz)) == NULL)
77754 +               goto error;
77755 +       sop->event_writeset_out = writeset_out;
77756 +       if ((r_by_fd = realloc(sop->event_r_by_fd,
77757 +                n_events*sizeof(struct event*))) == NULL)
77758 +               goto error;
77759 +       sop->event_r_by_fd = r_by_fd;
77760 +       if ((w_by_fd = realloc(sop->event_w_by_fd,
77761 +                n_events * sizeof(struct event*))) == NULL)
77762 +               goto error;
77763 +       sop->event_w_by_fd = w_by_fd;
77764 +
77765 +       memset((char *)sop->event_readset_in + sop->event_fdsz, 0,
77766 +           fdsz - sop->event_fdsz);
77767 +       memset((char *)sop->event_writeset_in + sop->event_fdsz, 0,
77768 +           fdsz - sop->event_fdsz);
77769 +       memset(sop->event_r_by_fd + n_events_old, 0,
77770 +           (n_events-n_events_old) * sizeof(struct event*));
77771 +       memset(sop->event_w_by_fd + n_events_old, 0,
77772 +           (n_events-n_events_old) * sizeof(struct event*));
77773 +
77774 +       sop->event_fdsz = fdsz;
77775 +       check_selectop(sop);
77776 +
77777 +       return (0);
77778 +
77779 + error:
77780 +       event_warn("malloc");
77781 +       return (-1);
77782 +}
77783 +
77784 +
77785 +int
77786 +select_add(void *arg, struct event *ev)
77787 +{
77788 +       struct selectop *sop = arg;
77789 +
77790 +       if (ev->ev_events & EV_SIGNAL)
77791 +               return (evsignal_add(ev));
77792 +
77793 +       check_selectop(sop);
77794 +       /*
77795 +        * Keep track of the highest fd, so that we can calculate the size
77796 +        * of the fd_sets for select(2)
77797 +        */
77798 +       if (sop->event_fds < ev->ev_fd) {
77799 +               int fdsz = sop->event_fdsz;
77800 +
77801 +               if (fdsz < sizeof(fd_mask))
77802 +                       fdsz = sizeof(fd_mask);
77803 +
77804 +               while (fdsz <
77805 +                   (howmany(ev->ev_fd + 1, NFDBITS) * sizeof(fd_mask)))
77806 +                       fdsz *= 2;
77807 +
77808 +               if (fdsz != sop->event_fdsz) {
77809 +                       if (select_resize(sop, fdsz)) {
77810 +                               check_selectop(sop);
77811 +                               return (-1);
77812 +                       }
77813 +               }
77814 +
77815 +               sop->event_fds = ev->ev_fd;
77816 +       }
77817 +
77818 +       if (ev->ev_events & EV_READ) {
77819 +               FD_SET(ev->ev_fd, sop->event_readset_in);
77820 +               sop->event_r_by_fd[ev->ev_fd] = ev;
77821 +       }
77822 +       if (ev->ev_events & EV_WRITE) {
77823 +               FD_SET(ev->ev_fd, sop->event_writeset_in);
77824 +               sop->event_w_by_fd[ev->ev_fd] = ev;
77825 +       }
77826 +       check_selectop(sop);
77827 +
77828 +       return (0);
77829 +}
77830 +
77831 +/*
77832 + * Nothing to be done here.
77833 + */
77834 +
77835 +int
77836 +select_del(void *arg, struct event *ev)
77837 +{
77838 +       struct selectop *sop = arg;
77839 +
77840 +       check_selectop(sop);
77841 +       if (ev->ev_events & EV_SIGNAL)
77842 +               return (evsignal_del(ev));
77843 +
77844 +       if (sop->event_fds < ev->ev_fd) {
77845 +               check_selectop(sop);
77846 +               return (0);
77847 +       }
77848 +
77849 +       if (ev->ev_events & EV_READ) {
77850 +               FD_CLR(ev->ev_fd, sop->event_readset_in);
77851 +               sop->event_r_by_fd[ev->ev_fd] = NULL;
77852 +       }
77853 +
77854 +       if (ev->ev_events & EV_WRITE) {
77855 +               FD_CLR(ev->ev_fd, sop->event_writeset_in);
77856 +               sop->event_w_by_fd[ev->ev_fd] = NULL;
77857 +       }
77858 +
77859 +       check_selectop(sop);
77860 +       return (0);
77861 +}
77862 +
77863 +void
77864 +select_dealloc(struct event_base *base, void *arg)
77865 +{
77866 +       struct selectop *sop = arg;
77867 +
77868 +       evsignal_dealloc(base);
77869 +       if (sop->event_readset_in)
77870 +               free(sop->event_readset_in);
77871 +       if (sop->event_writeset_in)
77872 +               free(sop->event_writeset_in);
77873 +       if (sop->event_readset_out)
77874 +               free(sop->event_readset_out);
77875 +       if (sop->event_writeset_out)
77876 +               free(sop->event_writeset_out);
77877 +       if (sop->event_r_by_fd)
77878 +               free(sop->event_r_by_fd);
77879 +       if (sop->event_w_by_fd)
77880 +               free(sop->event_w_by_fd);
77881 +
77882 +       memset(sop, 0, sizeof(struct selectop));
77883 +       free(sop);
77884 +}
77885 diff -Nru php-5.2.4.vanilla/libevent/signal.c php-5.2.4.fpm/libevent/signal.c
77886 --- php-5.2.4.vanilla/libevent/signal.c 1970-01-01 03:00:00.000000000 +0300
77887 +++ php-5.2.4.fpm/libevent/signal.c     2007-08-31 15:47:19.000000000 +0400
77888 @@ -0,0 +1,195 @@
77889 +/*     $OpenBSD: select.c,v 1.2 2002/06/25 15:50:15 mickey Exp $       */
77890 +
77891 +/*
77892 + * Copyright 2000-2002 Niels Provos <provos@citi.umich.edu>
77893 + * All rights reserved.
77894 + *
77895 + * Redistribution and use in source and binary forms, with or without
77896 + * modification, are permitted provided that the following conditions
77897 + * are met:
77898 + * 1. Redistributions of source code must retain the above copyright
77899 + *    notice, this list of conditions and the following disclaimer.
77900 + * 2. Redistributions in binary form must reproduce the above copyright
77901 + *    notice, this list of conditions and the following disclaimer in the
77902 + *    documentation and/or other materials provided with the distribution.
77903 + * 3. The name of the author may not be used to endorse or promote products
77904 + *    derived from this software without specific prior written permission.
77905 + *
77906 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
77907 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
77908 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
77909 + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
77910 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
77911 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
77912 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
77913 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
77914 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
77915 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
77916 + */
77917 +#ifdef HAVE_CONFIG_H
77918 +#include "config.h"
77919 +#endif
77920 +
77921 +#include <sys/types.h>
77922 +#include <sys/tree.h>
77923 +#ifdef HAVE_SYS_TIME_H
77924 +#include <sys/time.h>
77925 +#else
77926 +#include <sys/_time.h>
77927 +#endif
77928 +#include <sys/queue.h>
77929 +#include <sys/socket.h>
77930 +#include <signal.h>
77931 +#include <stdio.h>
77932 +#include <stdlib.h>
77933 +#include <string.h>
77934 +#include <unistd.h>
77935 +#include <errno.h>
77936 +#ifdef HAVE_FCNTL_H
77937 +#include <fcntl.h>
77938 +#endif
77939 +#include <assert.h>
77940 +
77941 +#include "event.h"
77942 +#include "event-internal.h"
77943 +#include "evsignal.h"
77944 +#include "log.h"
77945 +
77946 +struct event_base *evsignal_base = NULL;
77947 +
77948 +static void evsignal_handler(int sig);
77949 +
77950 +/* Callback for when the signal handler write a byte to our signaling socket */
77951 +static void
77952 +evsignal_cb(int fd, short what, void *arg)
77953 +{
77954 +       static char signals[100];
77955 +       struct event *ev = arg;
77956 +       ssize_t n;
77957 +
77958 +       n = read(fd, signals, sizeof(signals));
77959 +       if (n == -1)
77960 +               event_err(1, "%s: read", __func__);
77961 +       event_add(ev, NULL);
77962 +}
77963 +
77964 +#ifdef HAVE_SETFD
77965 +#define FD_CLOSEONEXEC(x) do { \
77966 +        if (fcntl(x, F_SETFD, 1) == -1) \
77967 +                event_warn("fcntl(%d, F_SETFD)", x); \
77968 +} while (0)
77969 +#else
77970 +#define FD_CLOSEONEXEC(x)
77971 +#endif
77972 +
77973 +void
77974 +evsignal_init(struct event_base *base)
77975 +{
77976 +       /* 
77977 +        * Our signal handler is going to write to one end of the socket
77978 +        * pair to wake up our event loop.  The event loop then scans for
77979 +        * signals that got delivered.
77980 +        */
77981 +       if (socketpair(AF_UNIX, SOCK_STREAM, 0, base->sig.ev_signal_pair) == -1)
77982 +               event_err(1, "%s: socketpair", __func__);
77983 +
77984 +       FD_CLOSEONEXEC(base->sig.ev_signal_pair[0]);
77985 +       FD_CLOSEONEXEC(base->sig.ev_signal_pair[1]);
77986 +       base->sig.evsignal_caught = 0;
77987 +       memset(&base->sig.evsigcaught, 0, sizeof(sig_atomic_t)*NSIG);
77988 +
77989 +       fcntl(base->sig.ev_signal_pair[0], F_SETFL, O_NONBLOCK);
77990 +
77991 +       event_set(&base->sig.ev_signal, base->sig.ev_signal_pair[1], EV_READ,
77992 +           evsignal_cb, &base->sig.ev_signal);
77993 +       base->sig.ev_signal.ev_base = base;
77994 +       base->sig.ev_signal.ev_flags |= EVLIST_INTERNAL;
77995 +}
77996 +
77997 +int
77998 +evsignal_add(struct event *ev)
77999 +{
78000 +       int evsignal;
78001 +       struct sigaction sa;
78002 +       struct event_base *base = ev->ev_base;
78003 +
78004 +       if (ev->ev_events & (EV_READ|EV_WRITE))
78005 +               event_errx(1, "%s: EV_SIGNAL incompatible use", __func__);
78006 +       evsignal = EVENT_SIGNAL(ev);
78007 +
78008 +       memset(&sa, 0, sizeof(sa));
78009 +       sa.sa_handler = evsignal_handler;
78010 +       sigfillset(&sa.sa_mask);
78011 +       sa.sa_flags |= SA_RESTART;
78012 +       /* catch signals if they happen quickly */
78013 +       evsignal_base = base;
78014 +
78015 +       if (sigaction(evsignal, &sa, NULL) == -1)
78016 +               return (-1);
78017 +
78018 +       if (!base->sig.ev_signal_added) {
78019 +               base->sig.ev_signal_added = 1;
78020 +               event_add(&base->sig.ev_signal, NULL);
78021 +       }
78022 +
78023 +       return (0);
78024 +}
78025 +
78026 +int
78027 +evsignal_del(struct event *ev)
78028 +{
78029 +       return (sigaction(EVENT_SIGNAL(ev),(struct sigaction *)SIG_DFL, NULL));
78030 +}
78031 +
78032 +static void
78033 +evsignal_handler(int sig)
78034 +{
78035 +       int save_errno = errno;
78036 +
78037 +       if(evsignal_base == NULL) {
78038 +               event_warn(
78039 +                       "%s: received signal %s, but have no base configured",
78040 +                       __func__, sig);
78041 +               return;
78042 +       }
78043 +
78044 +       evsignal_base->sig.evsigcaught[sig]++;
78045 +       evsignal_base->sig.evsignal_caught = 1;
78046 +
78047 +       /* Wake up our notification mechanism */
78048 +       write(evsignal_base->sig.ev_signal_pair[0], "a", 1);
78049 +       errno = save_errno;
78050 +}
78051 +
78052 +void
78053 +evsignal_process(struct event_base *base)
78054 +{
78055 +       struct event *ev;
78056 +       sig_atomic_t ncalls;
78057 +
78058 +       base->sig.evsignal_caught = 0;
78059 +       TAILQ_FOREACH(ev, &base->sig.signalqueue, ev_signal_next) {
78060 +               ncalls = base->sig.evsigcaught[EVENT_SIGNAL(ev)];
78061 +               if (ncalls) {
78062 +                       if (!(ev->ev_events & EV_PERSIST))
78063 +                               event_del(ev);
78064 +                       event_active(ev, EV_SIGNAL, ncalls);
78065 +                       base->sig.evsigcaught[EVENT_SIGNAL(ev)] = 0;
78066 +               }
78067 +       }
78068 +}
78069 +
78070 +void
78071 +evsignal_dealloc(struct event_base *base)
78072 +{
78073 +       if(base->sig.ev_signal_added) {
78074 +               event_del(&base->sig.ev_signal);
78075 +               base->sig.ev_signal_added = 0;
78076 +       }
78077 +       assert(TAILQ_EMPTY(&base->sig.signalqueue));
78078 +
78079 +       close(base->sig.ev_signal_pair[0]);
78080 +       base->sig.ev_signal_pair[0] = -1;
78081 +       close(base->sig.ev_signal_pair[1]);
78082 +       base->sig.ev_signal_pair[1] = -1;
78083 +}
78084 diff -Nru php-5.2.4.vanilla/libevent/stamp-h.in php-5.2.4.fpm/libevent/stamp-h.in
78085 --- php-5.2.4.vanilla/libevent/stamp-h.in       1970-01-01 03:00:00.000000000 +0300
78086 +++ php-5.2.4.fpm/libevent/stamp-h.in   2007-08-31 15:47:19.000000000 +0400
78087 @@ -0,0 +1 @@
78088 +timestamp
78089 diff -Nru php-5.2.4.vanilla/libevent/strlcpy.c php-5.2.4.fpm/libevent/strlcpy.c
78090 --- php-5.2.4.vanilla/libevent/strlcpy.c        1970-01-01 03:00:00.000000000 +0300
78091 +++ php-5.2.4.fpm/libevent/strlcpy.c    2007-08-31 15:47:19.000000000 +0400
78092 @@ -0,0 +1,76 @@
78093 +/*     $OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $     */
78094 +
78095 +/*
78096 + * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
78097 + * All rights reserved.
78098 + *
78099 + * Redistribution and use in source and binary forms, with or without
78100 + * modification, are permitted provided that the following conditions
78101 + * are met:
78102 + * 1. Redistributions of source code must retain the above copyright
78103 + *    notice, this list of conditions and the following disclaimer.
78104 + * 2. Redistributions in binary form must reproduce the above copyright
78105 + *    notice, this list of conditions and the following disclaimer in the
78106 + *    documentation and/or other materials provided with the distribution.
78107 + * 3. The name of the author may not be used to endorse or promote products
78108 + *    derived from this software without specific prior written permission.
78109 + *
78110 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
78111 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
78112 + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
78113 + * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
78114 + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
78115 + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
78116 + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
78117 + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
78118 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
78119 + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
78120 + */
78121 +
78122 +#if defined(LIBC_SCCS) && !defined(lint)
78123 +static char *rcsid = "$OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $";
78124 +#endif /* LIBC_SCCS and not lint */
78125 +
78126 +#include <sys/types.h>
78127 +
78128 +#ifdef HAVE_CONFIG_H
78129 +#include "config.h"
78130 +#endif /* HAVE_CONFIG_H */
78131 +
78132 +#ifndef HAVE_STRLCPY
78133 +#include "strlcpy-internal.h"
78134 +
78135 +/*
78136 + * Copy src to string dst of size siz.  At most siz-1 characters
78137 + * will be copied.  Always NUL terminates (unless siz == 0).
78138 + * Returns strlen(src); if retval >= siz, truncation occurred.
78139 + */
78140 +size_t
78141 +_event_strlcpy(dst, src, siz)
78142 +       char *dst;
78143 +       const char *src;
78144 +       size_t siz;
78145 +{
78146 +       register char *d = dst;
78147 +       register const char *s = src;
78148 +       register size_t n = siz;
78149 +
78150 +       /* Copy as many bytes as will fit */
78151 +       if (n != 0 && --n != 0) {
78152 +               do {
78153 +                       if ((*d++ = *s++) == 0)
78154 +                               break;
78155 +               } while (--n != 0);
78156 +       }
78157 +
78158 +       /* Not enough room in dst, add NUL and traverse rest of src */
78159 +       if (n == 0) {
78160 +               if (siz != 0)
78161 +                       *d = '\0';              /* NUL-terminate dst */
78162 +               while (*s++)
78163 +                       ;
78164 +       }
78165 +
78166 +       return(s - src - 1);    /* count does not include NUL */
78167 +}
78168 +#endif
78169 diff -Nru php-5.2.4.vanilla/libevent/strlcpy-internal.h php-5.2.4.fpm/libevent/strlcpy-internal.h
78170 --- php-5.2.4.vanilla/libevent/strlcpy-internal.h       1970-01-01 03:00:00.000000000 +0300
78171 +++ php-5.2.4.fpm/libevent/strlcpy-internal.h   2007-08-31 15:47:19.000000000 +0400
78172 @@ -0,0 +1,23 @@
78173 +#ifndef _STRLCPY_INTERNAL_H_
78174 +#define _STRLCPY_INTERNAL_H_
78175 +
78176 +#ifdef __cplusplus
78177 +extern "C" {
78178 +#endif
78179 +
78180 +#ifdef HAVE_CONFIG_H
78181 +#include "config.h"
78182 +#endif /* HAVE_CONFIG_H */
78183 +
78184 +#ifndef HAVE_STRLCPY
78185 +#include <string.h>
78186 +size_t _event_strlcpy(char *dst, const char *src, size_t siz);
78187 +#define strlcpy _event_strlcpy
78188 +#endif
78189 +
78190 +#ifdef __cplusplus
78191 +}
78192 +#endif
78193 +
78194 +#endif
78195 +
78196 diff -Nru php-5.2.4.vanilla/main/php_config.h.in php-5.2.4.fpm/main/php_config.h.in
78197 --- php-5.2.4.vanilla/main/php_config.h.in      2007-08-30 03:39:22.000000000 +0400
78198 +++ php-5.2.4.fpm/main/php_config.h.in  2007-09-11 23:59:34.000000000 +0400
78199 @@ -170,6 +170,9 @@
78200  /* Define if you have the chroot function.  */
78201  #undef HAVE_CHROOT
78202  
78203 +/* Define if you have the clearenv function.  */
78204 +#undef HAVE_CLEARENV
78205 +
78206  /* Define if you have the crypt function.  */
78207  #undef HAVE_CRYPT
78208  
78209 @@ -929,6 +932,9 @@
78210  /*   */
78211  #undef PHP_FASTCGI
78212  
78213 +/* Is experimental fastcgi process manager code activated */
78214 +#undef PHP_FASTCGI_PM
78215 +
78216  /*   */
78217  #undef FORCE_CGI_REDIRECT
78218  
78219 @@ -938,6 +944,9 @@
78220  /*   */
78221  #undef ENABLE_PATHINFO_CHECK
78222  
78223 +/* do we have libxml? */
78224 +#undef HAVE_LIBXML
78225 +
78226  /* Define if system uses EBCDIC */
78227  #undef CHARSET_EBCDIC
78228  
78229 diff -Nru php-5.2.4.vanilla/sapi/cgi/cgi_main.c php-5.2.4.fpm/sapi/cgi/cgi_main.c
78230 --- php-5.2.4.vanilla/sapi/cgi/cgi_main.c       2007-08-09 03:51:57.000000000 +0400
78231 +++ php-5.2.4.fpm/sapi/cgi/cgi_main.c   2007-09-11 22:20:24.000000000 +0400
78232 @@ -55,6 +55,9 @@
78233  #if HAVE_SYS_WAIT_H
78234  #include <sys/wait.h>
78235  #endif
78236 +#if HAVE_FCNTL_H
78237 +#include <fcntl.h>
78238 +#endif
78239  #include "zend.h"
78240  #include "zend_extensions.h"
78241  #include "php_ini.h"
78242 @@ -83,6 +86,10 @@
78243  #if PHP_FASTCGI
78244  #include "fastcgi.h"
78245  
78246 +#if PHP_FASTCGI_PM
78247 +#include "fpm/fpm.h"
78248 +#endif
78249 +
78250  #ifndef PHP_WIN32
78251  /* XXX this will need to change later when threaded fastcgi is
78252     implemented.  shane */
78253 @@ -109,8 +116,12 @@
78254  static pid_t pgroup;
78255  #endif
78256  
78257 +static int request_body_fd;
78258 +
78259  #endif
78260  
78261 +static char *sapi_cgibin_getenv(char *name, size_t name_len TSRMLS_DC);
78262 +
78263  #define PHP_MODE_STANDARD      1
78264  #define PHP_MODE_HIGHLIGHT     2
78265  #define PHP_MODE_INDENT                3
78266 @@ -140,6 +151,10 @@
78267         {'w', 0, "strip"},
78268         {'?', 0, "usage"},/* help alias (both '?' and 'usage') */
78269         {'v', 0, "version"},
78270 +#if PHP_FASTCGI_PM
78271 +       {'x', 0, "fpm"},
78272 +       {'y', 1, "fpm-config"},
78273 +#endif
78274         {'z', 1, "zend-extension"},
78275         {'-', 0, NULL} /* end of args */
78276  };
78277 @@ -160,6 +175,7 @@
78278  # ifdef PHP_WIN32
78279         zend_bool impersonate;
78280  # endif
78281 +       char *error_header;
78282  #endif
78283  } php_cgi_globals_struct;
78284  
78285 @@ -370,7 +386,21 @@
78286  #if PHP_FASTCGI
78287                 if (fcgi_is_fastcgi()) {
78288                         fcgi_request *request = (fcgi_request*) SG(server_context);
78289 -                       tmp_read_bytes = fcgi_read(request, buffer + read_bytes, count_bytes - read_bytes);
78290 +
78291 +                       if (request_body_fd == -1) {
78292 +                               char *request_body_filename = sapi_cgibin_getenv("REQUEST_BODY_FILE", sizeof("REQUEST_BODY_FILE")-1 TSRMLS_CC);
78293 +                               if (request_body_filename && *request_body_filename) {
78294 +                                       request_body_fd = open(request_body_filename, O_RDONLY);
78295 +                               }
78296 +                       }
78297 +
78298 +                       /* If REQUEST_BODY_FILE variable not available - read post body from fastcgi stream */
78299 +                       /* This branch also executes when sapi_deactivate() try to consume all bytes of request input. */
78300 +                       if (request_body_fd < 0) {
78301 +                               tmp_read_bytes = fcgi_read(request, buffer + read_bytes, count_bytes - read_bytes);
78302 +                       } else {
78303 +                               tmp_read_bytes = read(request_body_fd, buffer + read_bytes, count_bytes - read_bytes);
78304 +                       }
78305                 } else {
78306                         tmp_read_bytes = read(0, buffer + read_bytes, count_bytes - read_bytes);
78307                 }
78308 @@ -667,6 +697,11 @@
78309                            "  -s               Display colour syntax highlighted source.\n"
78310                            "  -v               Version number\n"
78311                            "  -w               Display source with stripped comments and whitespace.\n"
78312 +#if PHP_FASTCGI_PM
78313 +                          "  -x, --fpm        Run in FastCGI process manager mode.\n"
78314 +                          "  -y, --fpm-config <file>\n"
78315 +                          "                   Specify alternative path to FastCGI process manager config file.\n"
78316 +#endif
78317                            "  -z <file>        Load Zend extension <file>.\n",
78318                            prog, prog);
78319  }
78320 @@ -1067,6 +1102,7 @@
78321  # ifdef PHP_WIN32
78322         STD_PHP_INI_ENTRY("fastcgi.impersonate",     "0",  PHP_INI_SYSTEM, OnUpdateBool,   impersonate, php_cgi_globals_struct, php_cgi_globals)
78323  # endif
78324 +       STD_PHP_INI_ENTRY("fastcgi.error_header",    NULL, PHP_INI_SYSTEM, OnUpdateString, error_header, php_cgi_globals_struct, php_cgi_globals)
78325  #endif
78326  PHP_INI_END()
78327  
78328 @@ -1089,6 +1125,7 @@
78329  # ifdef PHP_WIN32
78330         php_cgi_globals->impersonate = 0;
78331  # endif
78332 +       php_cgi_globals->error_header = NULL;
78333  #endif
78334  }
78335  /* }}} */
78336 @@ -1124,6 +1161,33 @@
78337  }
78338  /* }}} */
78339  
78340 +#if PHP_FASTCGI
78341 +PHP_FUNCTION(fastcgi_finish_request)
78342 +{
78343 +       fcgi_request *request = (fcgi_request*) SG(server_context);
78344 +
78345 +       if (fcgi_is_fastcgi() && request->fd >= 0) {
78346 +
78347 +               php_end_ob_buffers(1 TSRMLS_CC);
78348 +               php_header(TSRMLS_C);
78349 +
78350 +               fcgi_flush(request, 1);
78351 +               fcgi_close(request, 0, 0);
78352 +               RETURN_TRUE;
78353 +       }
78354 +
78355 +       RETURN_FALSE;
78356 +
78357 +}
78358 +#endif
78359 +
78360 +function_entry cgi_fcgi_sapi_functions[] = {
78361 +#if PHP_FASTCGI
78362 +       PHP_FE(fastcgi_finish_request,                          NULL)
78363 +#endif
78364 +       {NULL, NULL, NULL}
78365 +};
78366 +
78367  static zend_module_entry cgi_module_entry = {
78368         STANDARD_MODULE_HEADER,
78369  #if PHP_FASTCGI
78370 @@ -1131,7 +1195,7 @@
78371  #else
78372         "cgi",
78373  #endif
78374 -       NULL, 
78375 +       cgi_fcgi_sapi_functions, 
78376         PHP_MINIT(cgi), 
78377         PHP_MSHUTDOWN(cgi), 
78378         NULL, 
78379 @@ -1171,6 +1235,8 @@
78380         char *bindpath = NULL;
78381         int fcgi_fd = 0;
78382         fcgi_request request;
78383 +       int fpm = 0;
78384 +       char *fpm_config = NULL;
78385  #ifndef PHP_WIN32
78386         int status = 0;
78387  #endif
78388 @@ -1284,6 +1350,14 @@
78389                         case 's': /* generate highlighted HTML from source */
78390                                 behavior = PHP_MODE_HIGHLIGHT;
78391                                 break;
78392 +#if PHP_FASTCGI_PM
78393 +                       case 'y':
78394 +                               fpm_config = php_optarg;
78395 +                               break;
78396 +                       case 'x':
78397 +                               fpm = 1;
78398 +                               break;
78399 +#endif
78400  
78401                 }
78402  
78403 @@ -1346,6 +1420,19 @@
78404  #endif /* FORCE_CGI_REDIRECT */
78405  
78406  #if PHP_FASTCGI
78407 +#if PHP_FASTCGI_PM
78408 +       if (fpm) {
78409 +               if (0 > fpm_init(argc, argv, fpm_config)) {
78410 +                       return FAILURE;
78411 +               }
78412 +
78413 +               fcgi_fd = fpm_run(&max_requests);
78414 +
78415 +               fcgi_set_is_fastcgi(fastcgi = 1);
78416 +       }
78417 +       else
78418 +#endif
78419 +
78420         if (bindpath) {
78421                 fcgi_fd = fcgi_listen(bindpath, 128);
78422                 if (fcgi_fd < 0) {
78423 @@ -1360,7 +1447,7 @@
78424         
78425         if (fastcgi) {
78426                 /* How many times to run PHP scripts before dying */
78427 -               if (getenv("PHP_FCGI_MAX_REQUESTS")) {
78428 +               if (!fpm && getenv("PHP_FCGI_MAX_REQUESTS")) {
78429                         max_requests = atoi(getenv("PHP_FCGI_MAX_REQUESTS"));
78430                         if (max_requests < 0) {
78431                                 fprintf(stderr, "PHP_FCGI_MAX_REQUESTS is not valid\n");
78432 @@ -1377,7 +1464,7 @@
78433  
78434  #ifndef PHP_WIN32
78435         /* Pre-fork, if required */
78436 -       if (getenv("PHP_FCGI_CHILDREN")) {
78437 +       if (!fpm && getenv("PHP_FCGI_CHILDREN")) {
78438                 children = atoi(getenv("PHP_FCGI_CHILDREN"));
78439                 if (children < 0) {
78440                         fprintf(stderr, "PHP_FCGI_CHILDREN is not valid\n");
78441 @@ -1489,9 +1576,15 @@
78442                 }
78443  #endif
78444                 while (!fastcgi || fcgi_accept_request(&request) >= 0) {
78445 +
78446 +#if PHP_FASTCGI_PM
78447 +               fpm_request_start();
78448 +#endif
78449  #endif
78450  
78451  #if PHP_FASTCGI
78452 +               request_body_fd = -1;
78453 +
78454                 SG(server_context) = (void *) &request;
78455  #else
78456                 SG(server_context) = (void *) 1; /* avoid server_context==NULL checks */
78457 @@ -1831,6 +1924,10 @@
78458  
78459  #if PHP_FASTCGI
78460  fastcgi_request_done:
78461 +
78462 +               if (request_body_fd != -1) close(request_body_fd);
78463 +
78464 +               request_body_fd = -2;
78465  #endif
78466                 {
78467                         char *path_translated;
78468 @@ -1844,11 +1941,25 @@
78469                                 SG(request_info).path_translated = path_translated;
78470                         }
78471  
78472 +                       if (EG(exit_status) == 255) {
78473 +                               if (CGIG(error_header) && *CGIG(error_header)) {
78474 +                                       sapi_header_line ctr = {0};
78475 +
78476 +                                       ctr.line = CGIG(error_header);
78477 +                                       ctr.line_len = strlen(CGIG(error_header));
78478 +                                       sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC);
78479 +                               }
78480 +                       }
78481 +                       
78482                         php_request_shutdown((void *) 0);
78483                         if (exit_status == 0) {
78484                                 exit_status = EG(exit_status);
78485                         }
78486  
78487 +#if PHP_FASTCGI_PM
78488 +                       fpm_request_finish();
78489 +#endif
78490 +
78491                         if (SG(request_info).path_translated) {
78492                                 free(SG(request_info).path_translated);
78493                                 SG(request_info).path_translated = NULL;
78494 diff -Nru php-5.2.4.vanilla/sapi/cgi/config9.m4 php-5.2.4.fpm/sapi/cgi/config9.m4
78495 --- php-5.2.4.vanilla/sapi/cgi/config9.m4       2007-07-12 03:20:36.000000000 +0400
78496 +++ php-5.2.4.fpm/sapi/cgi/config9.m4   2007-08-31 15:47:19.000000000 +0400
78497 @@ -22,6 +22,10 @@
78498  [  --disable-path-info-check CGI: If this is disabled, paths such as
78499                              /info.php/test?a=b will fail to work], yes, no)
78500  
78501 +PHP_ARG_ENABLE(fpm,,
78502 +[  --enable-fpm              FastCGI: If this is enabled, the fastcgi support
78503 +                            will include experimental process manager code], no, no)
78504 +
78505  dnl
78506  dnl CGI setup
78507  dnl
78508 @@ -54,6 +58,20 @@
78509      AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_ENABLE_FASTCGI, [ ])
78510      AC_MSG_RESULT($PHP_FASTCGI)
78511  
78512 +    dnl --enable-fpm
78513 +    if test "$PHP_FASTCGI" = "yes"; then
78514 +      AC_MSG_CHECKING(whether to activate experimental fastcgi process manager code)
78515 +      if test "$PHP_FPM" = "yes"; then
78516 +        PHP_FASTCGI_PM=1
78517 +      else
78518 +        PHP_FASTCGI_PM=0
78519 +      fi
78520 +      AC_MSG_RESULT($PHP_FPM)
78521 +    else
78522 +      PHP_FASTCGI_PM=0
78523 +    fi
78524 +    AC_DEFINE_UNQUOTED(PHP_FASTCGI_PM, $PHP_FASTCGI_PM, [Is experimental fastcgi process manager code activated])
78525 +
78526      dnl --enable-force-cgi-redirect
78527      AC_MSG_CHECKING(whether to force Apache CGI redirect)
78528      if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
78529 @@ -93,10 +111,10 @@
78530          BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
78531          ;;
78532        *darwin*)
78533 -        BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
78534 +        BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(SAPI_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
78535        ;;
78536        *)
78537 -        BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
78538 +        BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(SAPI_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
78539        ;;
78540      esac
78541  
78542 diff -Nru php-5.2.4.vanilla/sapi/cgi/fastcgi.c php-5.2.4.fpm/sapi/cgi/fastcgi.c
78543 --- php-5.2.4.vanilla/sapi/cgi/fastcgi.c        2007-07-09 15:48:39.000000000 +0400
78544 +++ php-5.2.4.fpm/sapi/cgi/fastcgi.c    2007-08-31 15:47:19.000000000 +0400
78545 @@ -240,6 +240,8 @@
78546                 } else {
78547                         return is_fastcgi = 0;
78548                 }
78549 +
78550 +               fcgi_set_allowed_clients(getenv("FCGI_WEB_SERVER_ADDRS"));
78551  #endif
78552         }
78553         return is_fastcgi;
78554 @@ -255,9 +257,19 @@
78555         }
78556  }
78557  
78558 +void fcgi_set_is_fastcgi(int new_value)
78559 +{
78560 +       is_fastcgi = new_value;
78561 +}
78562 +
78563  void fcgi_shutdown(void)
78564  {
78565         is_fastcgi = 0;
78566 +
78567 +       if (allowed_clients) {
78568 +               free(allowed_clients);
78569 +               allowed_clients = 0;
78570 +       }
78571  }
78572  
78573  #ifdef _WIN32
78574 @@ -330,6 +342,41 @@
78575  }
78576  #endif
78577  
78578 +void fcgi_set_allowed_clients(char *ip)
78579 +{
78580 +    char *cur, *end;
78581 +    int n;
78582 +           
78583 +    if (ip) {
78584 +       ip = strdup(ip);
78585 +       cur = ip;
78586 +       n = 0;
78587 +       while (*cur) {
78588 +               if (*cur == ',') n++;
78589 +               cur++;
78590 +       }
78591 +               if (allowed_clients) free(allowed_clients);
78592 +       allowed_clients = malloc(sizeof(in_addr_t) * (n+2));
78593 +       n = 0;
78594 +       cur = ip;
78595 +       while (cur) {
78596 +               end = strchr(cur, ',');
78597 +               if (end) {
78598 +                       *end = 0;
78599 +                       end++;
78600 +               }
78601 +               allowed_clients[n] = inet_addr(cur);
78602 +               if (allowed_clients[n] == INADDR_NONE) {
78603 +                               fprintf(stderr, "Wrong IP address '%s' in FCGI_WEB_SERVER_ADDRS\n", cur);
78604 +               }
78605 +               n++;
78606 +               cur = end;
78607 +       }
78608 +       allowed_clients[n] = INADDR_NONE;
78609 +               free(ip);
78610 +       }
78611 +}
78612 +
78613  static int is_port_number(const char *bindpath)
78614  {
78615         while (*bindpath) {
78616 @@ -458,38 +505,6 @@
78617  
78618         if (!tcp) {
78619                 chmod(path, 0777);
78620 -       } else {
78621 -           char *ip = getenv("FCGI_WEB_SERVER_ADDRS");
78622 -           char *cur, *end;
78623 -           int n;
78624 -           
78625 -           if (ip) {
78626 -               ip = strdup(ip);
78627 -               cur = ip;
78628 -               n = 0;
78629 -               while (*cur) {
78630 -                       if (*cur == ',') n++;
78631 -                       cur++;
78632 -               }
78633 -               allowed_clients = malloc(sizeof(in_addr_t) * (n+2));
78634 -               n = 0;
78635 -               cur = ip;
78636 -               while (cur) {
78637 -                       end = strchr(cur, ',');
78638 -                       if (end) {
78639 -                               *end = 0;
78640 -                               end++;
78641 -                       }
78642 -                       allowed_clients[n] = inet_addr(cur);
78643 -                       if (allowed_clients[n] == INADDR_NONE) {
78644 -                                       fprintf(stderr, "Wrong IP address '%s' in FCGI_WEB_SERVER_ADDRS\n", cur);
78645 -                       }
78646 -                       n++;
78647 -                       cur = end;
78648 -               }
78649 -               allowed_clients[n] = INADDR_NONE;
78650 -                       free(ip);
78651 -               }
78652         }
78653  
78654         if (!is_initialized) {
78655 @@ -817,7 +832,7 @@
78656         return n;
78657  }
78658  
78659 -static inline void fcgi_close(fcgi_request *req, int force, int destroy)
78660 +void fcgi_close(fcgi_request *req, int force, int destroy)
78661  {
78662         if (destroy) {
78663                 zend_hash_destroy(&req->env);
78664 diff -Nru php-5.2.4.vanilla/sapi/cgi/fastcgi.h php-5.2.4.fpm/sapi/cgi/fastcgi.h
78665 --- php-5.2.4.vanilla/sapi/cgi/fastcgi.h        2007-05-21 13:08:13.000000000 +0400
78666 +++ php-5.2.4.fpm/sapi/cgi/fastcgi.h    2007-08-31 15:47:19.000000000 +0400
78667 @@ -114,6 +114,8 @@
78668  int fcgi_init(void);
78669  void fcgi_shutdown(void);
78670  int fcgi_is_fastcgi(void);
78671 +void fcgi_set_is_fastcgi(int);
78672 +void fcgi_set_allowed_clients(char *);
78673  int fcgi_in_shutdown(void);
78674  int fcgi_listen(const char *path, int backlog);
78675  void fcgi_init_request(fcgi_request *req, int listen_socket);
78676 @@ -128,6 +130,8 @@
78677  int fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, int len);
78678  int fcgi_flush(fcgi_request *req, int close);
78679  
78680 +void fcgi_close(fcgi_request *req, int force, int destroy);
78681 +
78682  #ifdef PHP_WIN32
78683  void fcgi_impersonate(void);
78684  #endif
78685 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/acinclude.m4 php-5.2.4.fpm/sapi/cgi/fpm/acinclude.m4
78686 --- php-5.2.4.vanilla/sapi/cgi/fpm/acinclude.m4 1970-01-01 03:00:00.000000000 +0300
78687 +++ php-5.2.4.fpm/sapi/cgi/fpm/acinclude.m4     2007-08-31 15:47:19.000000000 +0400
78688 @@ -0,0 +1,115 @@
78689 +
78690 +AC_DEFUN([AC_FPM_CHECK_FUNC],
78691 +[
78692 +       SAVED_CFLAGS="$CFLAGS"
78693 +       CFLAGS="$CFLAGS $2"
78694 +       SAVED_LIBS="$LIBS"
78695 +       LIBS="$LIBS $3"
78696 +
78697 +       AC_CHECK_FUNC([$1],[$4],[$5])
78698 +
78699 +       CFLAGS="$SAVED_CFLAGS"
78700 +       LIBS="$SAVED_LIBS"
78701 +])
78702 +
78703 +AC_DEFUN([AC_FPM_LIBEVENT],
78704 +[
78705 +       AC_ARG_WITH([libevent],
78706 +       [  --with-libevent=DIR         FPM: libevent install directory])
78707 +
78708 +       LIBEVENT_CFLAGS=""
78709 +       LIBEVENT_LIBS="-levent"
78710 +       LIBEVENT_INCLUDE_PATH=""
78711 +
78712 +       if test "$with_libevent" != "no" -a -n "$with_libevent"; then
78713 +               LIBEVENT_CFLAGS="-I$with_libevent/include"
78714 +               LIBEVENT_LIBS="-L$with_libevent/lib $LIBEVENT_LIBS"
78715 +               LIBEVENT_INCLUDE_PATH="$with_libevent/include"
78716 +       fi
78717 +
78718 +       AC_MSG_CHECKING([for event.h])
78719 +
78720 +       found=no
78721 +
78722 +       for dir in "$LIBEVENT_INCLUDE_PATH" /usr/include ; do
78723 +               if [[ -r "$dir/event.h" ]] ; then
78724 +                       found=yes
78725 +                       break
78726 +               fi
78727 +       done
78728 +
78729 +       AC_MSG_RESULT([$found])
78730 +
78731 +       AC_FPM_CHECK_FUNC([event_set], [$LIBEVENT_CFLAGS], [$LIBEVENT_LIBS], ,
78732 +               [AC_MSG_ERROR([Failed to link with libevent. Perhaps --with-libevent=DIR option could help.])])
78733 +
78734 +       AC_FPM_CHECK_FUNC([event_base_free], [$LIBEVENT_CFLAGS], [$LIBEVENT_LIBS], ,
78735 +               [AC_MSG_ERROR([You have too old version. libevent version >= 1.2 is required.])])
78736 +
78737 +])
78738 +
78739 +AC_DEFUN([AC_FPM_LIBXML],
78740 +[
78741 +       AC_MSG_RESULT([checking for XML configuration])
78742 +
78743 +       AC_ARG_WITH(xml-config,
78744 +       [  --with-xml-config=PATH      FPM: use xml-config in PATH to find libxml],
78745 +               [XMLCONFIG="$withval"],
78746 +               [AC_PATH_PROGS(XMLCONFIG, [xml2-config xml-config], "")]
78747 +       )
78748 +
78749 +       if test "x$XMLCONFIG" = "x"; then
78750 +               AC_MSG_ERROR([XML configuration could not be found])
78751 +       else
78752 +        AC_MSG_CHECKING([for libxml library])
78753 +
78754 +               if test ! -x "$XMLCONFIG"; then
78755 +                       AC_MSG_ERROR([$XMLCONFIG cannot be executed])
78756 +               fi
78757 +
78758 +               LIBXML_LIBS="`$XMLCONFIG --libs`"
78759 +               LIBXML_CFLAGS="`$XMLCONFIG --cflags`"
78760 +               LIBXML_VERSION="`$XMLCONFIG --version`"
78761 +
78762 +        AC_MSG_RESULT([yes, $LIBXML_VERSION])
78763 +
78764 +               AC_FPM_CHECK_FUNC([xmlParseFile], [$LIBXML_CFLAGS], [$LIBXML_LIBS], ,
78765 +                       [AC_MSG_ERROR([Failed to link with libxml])])
78766 +
78767 +               AC_DEFINE(HAVE_LIBXML, 1, [do we have libxml?])
78768 +       fi
78769 +])
78770 +
78771 +AC_DEFUN([AC_FPM_JUDY],
78772 +[
78773 +       AC_ARG_WITH([Judy],
78774 +       [  --with-Judy=DIR             FPM: Judy install directory])
78775 +
78776 +       JUDY_CFLAGS=""
78777 +       JUDY_LIBS="-lJudy"
78778 +       JUDY_INCLUDE_PATH=""
78779 +
78780 +       if test "$with_Judy" != "no" -a -n "$with_Judy"; then
78781 +               JUDY_INCLUDE_PATH="$with_Judy/include"
78782 +               JUDY_CFLAGS="-I$with_Judy/include $JUDY_CFLAGS"
78783 +               JUDY_LIBS="-L$with_Judy/lib $JUDY_LIBS"
78784 +       fi
78785 +
78786 +       AC_MSG_CHECKING([for Judy.h])
78787 +
78788 +       found=no
78789 +
78790 +       for dir in "$JUDY_INCLUDE_PATH" /usr/include ; do
78791 +               if [[ -r "$dir/Judy.h" ]] ; then
78792 +                       found=yes
78793 +                       break
78794 +               fi
78795 +       done
78796 +
78797 +       AC_MSG_RESULT([$found])
78798 +
78799 +       AC_FPM_CHECK_FUNC([JudyLCount], [$JUDY_CFLAGS], [$JUDY_LIBS], ,
78800 +               [AC_MSG_ERROR([Failed to link with Judy])])
78801 +
78802 +])
78803 +
78804 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/conf/php-fpm.conf php-5.2.4.fpm/sapi/cgi/fpm/conf/php-fpm.conf
78805 --- php-5.2.4.vanilla/sapi/cgi/fpm/conf/php-fpm.conf    1970-01-01 03:00:00.000000000 +0300
78806 +++ php-5.2.4.fpm/sapi/cgi/fpm/conf/php-fpm.conf        2007-08-31 15:47:19.000000000 +0400
78807 @@ -0,0 +1,145 @@
78808 +<?xml version="1.0" ?>
78809 +<configuration>
78810 +
78811 +       All relative paths in this config are relative to php's install prefix
78812 +
78813 +       <section name="global_options">
78814 +
78815 +               Pid file
78816 +               <value name="pid_file">logs/php-fpm.pid</value>
78817 +
78818 +               Error log file
78819 +               <value name="error_log">logs/php-fpm.log</value>
78820 +
78821 +               When this amount of php processes exited with SIGSEGV or SIGBUS ...
78822 +               <value name="emergency_restart_threshold">10</value>
78823 +
78824 +               ... in a less than this interval of time, a complete restart will be initiated.
78825 +               Useful to work around accidental curruptions in accelerator's shared memory.
78826 +               <value name="emergency_restart_interval">1m</value>
78827 +
78828 +               Time limit on waiting child's reaction on signals from master
78829 +               <value name="process_control_timeout">5s</value>
78830 +
78831 +               Set to 'no' to debug fpm
78832 +               <value name="daemonize">yes</value>
78833 +
78834 +       </section>
78835 +
78836 +       <workers>
78837 +
78838 +               <section name="pool">
78839 +
78840 +                       Name of pool. Used in logs and stats.
78841 +                       <value name="name">main</value>
78842 +
78843 +                       Address to accept fastcgi requests on.
78844 +                       Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket'
78845 +                       <value name="listen_address">127.0.0.1:9000</value>
78846 +
78847 +                       <value name="listen_options">
78848 +
78849 +                               Set listen(2) backlog
78850 +                               <value name="backlog">-1</value>
78851 +
78852 +                               Set permissions for unix socket, if one used.
78853 +                               In Linux read/write permissions must be set in order to allow connections from web server.
78854 +                               Many BSD-derrived systems allow connections regardless of permissions.
78855 +                               <value name="owner"></value>
78856 +                               <value name="group"></value>
78857 +                               <value name="mode">0666</value>
78858 +                       </value>
78859 +
78860 +                       Additional php.ini defines, specific to this pool of workers.
78861 +                       <value name="php_defines">
78862 +               <!--            <value name="sendmail_path">/usr/sbin/sendmail -t -i</value>            -->
78863 +               <!--            <value name="display_errors">0</value>                                                          -->
78864 +                       </value>
78865 +
78866 +                       Unix user of processes
78867 +                       <value name="user">nobody</value>
78868 +
78869 +                       Unix group of processes
78870 +                       <value name="group">nogroup</value>
78871 +
78872 +                       Process manager settings
78873 +                       <value name="pm">
78874 +
78875 +                               Sets style of controling worker process count.
78876 +                               Valid values are 'static' and 'apache-like'
78877 +                               <value name="style">static</value>
78878 +
78879 +                               Sets the limit on the number of simultaneous requests that will be served.
78880 +                               Equivalent to Apache MaxClients directive.
78881 +                               Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi
78882 +                               Used with any pm_style.
78883 +                               <value name="max_children">5</value>
78884 +
78885 +                               Settings group for 'apache-like' pm style
78886 +                               <value name="apache_like">
78887 +
78888 +                                       Sets the number of server processes created on startup.
78889 +                                       Used only when 'apache-like' pm_style is selected
78890 +                                       <value name="StartServers">20</value>
78891 +
78892 +                                       Sets the desired minimum number of idle server processes.
78893 +                                       Used only when 'apache-like' pm_style is selected
78894 +                                       <value name="MinSpareServers">5</value>
78895 +
78896 +                                       Sets the desired maximum number of idle server processes.
78897 +                                       Used only when 'apache-like' pm_style is selected
78898 +                                       <value name="MaxSpareServers">35</value>
78899 +
78900 +                               </value>
78901 +
78902 +                       </value>
78903 +
78904 +                       Time limit on waiting execution of single request
78905 +                       Should be used when 'max_execution_time' ini option does not terminate execution for some reason
78906 +                       <value name="request_execution_timeout">31s</value>
78907 +
78908 +                       Set open file desc rlimit
78909 +                       <value name="rlimit_files">1024</value>
78910 +
78911 +                       Set max core size rlimit
78912 +                       <value name="rlimit_core">unlimited</value>
78913 +
78914 +                       Chroot to this directory at the start
78915 +                       <value name="chroot"></value>
78916 +
78917 +                       Chdir to this directory at the start
78918 +                       <value name="chdir"></value>
78919 +
78920 +                       Redirect workers' stdout and stderr into main log.
78921 +                       If not set, they will be redirected to /dev/null, according to FastCGI specs
78922 +                       <value name="catch_workers_output">yes</value>
78923 +
78924 +                       How much requests each process should execute before respawn.
78925 +                       Useful to work around memory leaks in 3rd party libraries.
78926 +                       For endless request processing please specify 0
78927 +                       Equivalent to PHP_FCGI_MAX_REQUESTS
78928 +                       <value name="max_requests">500</value>
78929 +
78930 +                       Comma separated list of ipv4 addresses of FastCGI clients that allowed to connect.
78931 +                       Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+)
78932 +                       Makes sense only with AF_INET listening socket.
78933 +                       <value name="allowed_clients">127.0.0.1</value>
78934 +
78935 +                       Pass environment variables like LD_LIBRARY_PATH
78936 +                       All $VARIABLEs are taken from current environment
78937 +                       <value name="environment">
78938 +                               <value name="HOSTNAME">$HOSTNAME</value>
78939 +                               <value name="PATH">/usr/local/bin:/usr/bin:/bin</value>
78940 +                               <value name="TMP">/tmp</value>
78941 +                               <value name="TMPDIR">/tmp</value>
78942 +                               <value name="TEMP">/tmp</value>
78943 +                               <value name="OSTYPE">$OSTYPE</value>
78944 +                               <value name="MACHTYPE">$MACHTYPE</value>
78945 +                               <value name="MALLOC_CHECK_">2</value>
78946 +                       </value>
78947 +
78948 +               </section>
78949 +
78950 +       </workers>
78951 +
78952 +</configuration>
78953 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/config.m4 php-5.2.4.fpm/sapi/cgi/fpm/config.m4
78954 --- php-5.2.4.vanilla/sapi/cgi/fpm/config.m4    1970-01-01 03:00:00.000000000 +0300
78955 +++ php-5.2.4.fpm/sapi/cgi/fpm/config.m4        2007-08-31 15:47:19.000000000 +0400
78956 @@ -0,0 +1,54 @@
78957 +
78958 +dnl AC_FPM_LIBEVENT
78959 +AC_FPM_LIBXML
78960 +dnl AC_FPM_JUDY
78961 +
78962 +LIBEVENT_CFLAGS="-I$abs_srcdir/libevent"
78963 +LIBEVENT_LIBS="$abs_builddir/libevent/libevent.la"
78964 +
78965 +SAPI_EXTRA_DEPS="$LIBEVENT_LIBS"
78966 +
78967 +FPM_SOURCES="fpm.c fpm_conf.c fpm_signals.c fpm_children.c fpm_worker_pool.c fpm_unix.c fpm_cleanup.c \
78968 +       fpm_sockets.c fpm_stdio.c fpm_env.c fpm_events.c fpm_php.c fpm_process_ctl.c fpm_shm.c xml_config.c zlog.c"
78969 +
78970 +FPM_CFLAGS="$LIBEVENT_CFLAGS $LIBXML_CFLAGS $JUDY_CFLAGS"
78971 +SAPI_EXTRA_LIBS="$LIBEVENT_LIBS $LIBXML_LIBS $JUDY_LIBS"
78972 +
78973 +dnl FPM_CFLAGS="$FPM_CFLAGS -DJUDYERROR_NOTEST" # for Judy
78974 +FPM_CFLAGS="$FPM_CFLAGS -I$abs_srcdir/sapi/cgi" # for fastcgi.h
78975 +
78976 +if [[ "x$CC" = "xgcc" ]] ; then
78977 +       FPM_CFLAGS="-W -Wall -Wpointer-arith -Wno-unused-parameter -Wno-unused-function -Wunused-variable -Wunused-value $FPM_CFLAGS"
78978 +fi
78979 +
78980 +PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/fpm/Makefile.frag)
78981 +
78982 +PHP_ADD_SOURCES(sapi/cgi/fpm, $FPM_SOURCES, $FPM_CFLAGS, sapi)
78983 +
78984 +PHP_ADD_BUILD_DIR(sapi/cgi/fpm)
78985 +
78986 +install_fpm="install-fpm"
78987 +
78988 +PHP_CONFIGURE_PART(Configuring libevent)
78989 +
78990 +test -d "$abs_builddir/libevent" || mkdir -p $abs_builddir/libevent
78991 +
78992 +dnl this is a bad hack
78993 +
78994 +chmod +x "$abs_srcdir/libevent/configure" \
78995 +               "$abs_srcdir/libevent/config.guess" \
78996 +               "$abs_srcdir/libevent/config.sub" \
78997 +               "$abs_srcdir/libevent/depcomp" \
78998 +               "$abs_srcdir/libevent/install-sh" \
78999 +               "$abs_srcdir/libevent/missing" \
79000 +               "$abs_srcdir/libevent/mkinstalldirs"
79001 +
79002 +libevent_configure="cd $abs_builddir/libevent ; $abs_srcdir/libevent/configure --disable-shared"
79003 +
79004 +(eval $libevent_configure)
79005 +
79006 +if [[ ! -f "$abs_builddir/libevent/Makefile" ]] ; then
79007 +       echo "Failed to configure libevent" >&2
79008 +       exit 1
79009 +fi
79010 +
79011 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm.c php-5.2.4.fpm/sapi/cgi/fpm/fpm.c
79012 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm.c        1970-01-01 03:00:00.000000000 +0300
79013 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm.c    2007-08-31 15:47:19.000000000 +0400
79014 @@ -0,0 +1,98 @@
79015 +
79016 +       /* $Id$ */
79017 +       /* (c) 2007 Andrei Nigmatulin */
79018 +
79019 +#include "fpm_config.h"
79020 +
79021 +#include <stdlib.h> /* for exit */
79022 +
79023 +#include "fpm.h"
79024 +#include "fpm_children.h"
79025 +#include "fpm_signals.h"
79026 +#include "fpm_env.h"
79027 +#include "fpm_events.h"
79028 +#include "fpm_cleanup.h"
79029 +#include "fpm_php.h"
79030 +#include "fpm_sockets.h"
79031 +#include "fpm_unix.h"
79032 +#include "fpm_process_ctl.h"
79033 +#include "fpm_conf.h"
79034 +#include "fpm_worker_pool.h"
79035 +#include "fpm_stdio.h"
79036 +#include "zlog.h"
79037 +
79038 +struct fpm_globals_s fpm_globals;
79039 +
79040 +int fpm_init(int argc, char **argv, char *config)
79041 +{
79042 +
79043 +       zlog(ZLOG_STUFF, ZLOG_NOTICE, "fpm is initializing");
79044 +
79045 +       if (0 > fpm_stdio_init_main()            ||
79046 +               0 > fpm_conf_init_main(config)       ||
79047 +               0 > fpm_unix_init_main()             ||
79048 +               0 > fpm_env_init_main()              ||
79049 +               0 > fpm_signals_init_main()          ||
79050 +               0 > fpm_pctl_init_main(argc, argv)   ||
79051 +               0 > fpm_children_init_main()         ||
79052 +               0 > fpm_sockets_init_main()          ||
79053 +               0 > fpm_event_init_main()            ||
79054 +               0 > fpm_worker_pool_init_main()      ||
79055 +               0 > fpm_php_init_main()) {
79056 +               return -1;
79057 +       }
79058 +
79059 +       if (0 > fpm_conf_write_pid()) {
79060 +               return -1;
79061 +       }
79062 +
79063 +       zlog(ZLOG_STUFF, ZLOG_NOTICE, "fpm is running, pid %d", (int) getpid());
79064 +
79065 +       return 0;
79066 +}
79067 +
79068 +/*     children: return listening socket
79069 +       parent: never return */
79070 +int fpm_run(int *max_requests)
79071 +{
79072 +       struct fpm_worker_pool_s *wp;
79073 +
79074 +       /* create initial children in all pools */
79075 +       for (wp = fpm_worker_all_pools; wp; wp = wp->next) {
79076 +               int is_parent;
79077 +
79078 +               is_parent = fpm_children_create_initial(wp);
79079 +
79080 +               if (!is_parent) {
79081 +                       goto run_child;
79082 +               }
79083 +       }
79084 +
79085 +       /* run event loop forever */
79086 +       fpm_event_loop();
79087 +
79088 +       if (!fpm_globals.is_child) {
79089 +               fpm_cleanups_run(FPM_CLEANUP_PARENT_EXIT);
79090 +               exit(0);
79091 +       }
79092 +
79093 +run_child: /* all others are worker children */
79094 +
79095 +       fpm_cleanups_run(FPM_CLEANUP_CHILD);
79096 +
79097 +       *max_requests = fpm_globals.max_requests;
79098 +       return fpm_globals.listening_socket;
79099 +}
79100 +
79101 +static int request_in_progress = 0;
79102 +
79103 +void fpm_request_start()
79104 +{
79105 +       request_in_progress = 1;
79106 +}
79107 +
79108 +void fpm_request_finish()
79109 +{
79110 +       request_in_progress = 0;
79111 +}
79112 +
79113 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_children.c php-5.2.4.fpm/sapi/cgi/fpm/fpm_children.c
79114 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_children.c       1970-01-01 03:00:00.000000000 +0300
79115 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_children.c   2007-08-31 15:47:19.000000000 +0400
79116 @@ -0,0 +1,333 @@
79117 +
79118 +       /* $Id$ */
79119 +       /* (c) 2007 Andrei Nigmatulin */
79120 +
79121 +#include "fpm_config.h"
79122 +
79123 +#include <sys/types.h>
79124 +#include <sys/wait.h>
79125 +#include <time.h>
79126 +#include <unistd.h>
79127 +#include <string.h>
79128 +#include <stdio.h>
79129 +
79130 +#include "fpm.h"
79131 +#include "fpm_children.h"
79132 +#include "fpm_signals.h"
79133 +#include "fpm_worker_pool.h"
79134 +#include "fpm_sockets.h"
79135 +#include "fpm_process_ctl.h"
79136 +#include "fpm_php.h"
79137 +#include "fpm_conf.h"
79138 +#include "fpm_cleanup.h"
79139 +#include "fpm_events.h"
79140 +#include "fpm_stdio.h"
79141 +#include "fpm_unix.h"
79142 +#include "fpm_env.h"
79143 +
79144 +#include "zlog.h"
79145 +
79146 +static time_t *last_faults;
79147 +static int fault;
79148 +
79149 +static struct fpm_child_s **fpm_children;
79150 +static int fpm_children_allocated, fpm_children_used;
79151 +
79152 +static int fpm_children_make(struct fpm_worker_pool_s *wp, int in_event_loop);
79153 +
79154 +static void fpm_children_cleanup(int which, void *arg)
79155 +{
79156 +       free(fpm_children);
79157 +       free(last_faults);
79158 +       fpm_children_allocated = fpm_children_used = 0;
79159 +       fpm_children = 0;
79160 +}
79161 +
79162 +static struct fpm_child_s *fpm_child_alloc()
79163 +{
79164 +       struct fpm_child_s *ret;
79165 +
79166 +       if (fpm_children_used == fpm_children_allocated) {
79167 +               int new_size = fpm_children_allocated + 1024;
79168 +               void *new_ptr = realloc(fpm_children, sizeof(struct fpm_child_s *) * new_size);
79169 +
79170 +               if (!new_ptr) return 0;
79171 +
79172 +               fpm_children_allocated = new_size;
79173 +               fpm_children = new_ptr;
79174 +       }
79175 +
79176 +       ret = malloc(sizeof(struct fpm_child_s));
79177 +
79178 +       if (!ret) return 0;
79179 +
79180 +       fpm_children[fpm_children_used++] = ret;
79181 +
79182 +       memset(ret, 0, sizeof(*ret));
79183 +
79184 +       return ret;
79185 +}
79186 +
79187 +static void fpm_child_free(struct fpm_child_s *child, int in_event_loop)
79188 +{
79189 +       int i;
79190 +
79191 +       if (child->fd_stdout != -1) {
79192 +               if (in_event_loop) {
79193 +                       fpm_event_fire(&child->ev_stdout);
79194 +               }
79195 +               if (child->fd_stdout != -1) {
79196 +                       close(child->fd_stdout);
79197 +               }
79198 +       }
79199 +
79200 +       if (child->fd_stderr != -1) {
79201 +               if (in_event_loop) {
79202 +                       fpm_event_fire(&child->ev_stderr);
79203 +               }
79204 +               if (child->fd_stderr != -1) {
79205 +                       close(child->fd_stderr);
79206 +               }
79207 +       }
79208 +
79209 +       for (i = 0; i < fpm_children_used; i++) {
79210 +               if (fpm_children[i] == child) {
79211 +                       if (i < fpm_children_used - 1) {
79212 +                               fpm_children[i] = fpm_children[fpm_children_used - 1];
79213 +                       }
79214 +                       --fpm_children_used;
79215 +                       break;
79216 +               }
79217 +       }
79218 +
79219 +       free(child);
79220 +}
79221 +
79222 +static int fpm_child_add(struct fpm_worker_pool_s *wp, pid_t pid)
79223 +{
79224 +       struct fpm_child_s *child = fpm_child_alloc();
79225 +
79226 +       if (!child) {
79227 +               return -1;
79228 +       }
79229 +
79230 +       child->wp = wp;
79231 +       child->pid = pid;
79232 +       gettimeofday(&child->started, 0);
79233 +       child->fd_stdout = child->fd_stderr = -1;
79234 +
79235 +       fpm_stdio_parent_use_pipes(child);
79236 +
79237 +       ++child->wp->running_children;
79238 +       ++fpm_globals.running_children;
79239 +
79240 +       child->next = child->wp->children;
79241 +       if (child->next) child->next->prev = child;
79242 +       child->prev = 0;
79243 +       child->wp->children = child;
79244 +
79245 +       return 0;
79246 +}
79247 +
79248 +static struct fpm_child_s *fpm_child_remove(pid_t pid)
79249 +{
79250 +       int i;
79251 +       struct fpm_child_s *child = 0;
79252 +
79253 +       for (i = 0; i < fpm_children_used; i++) {
79254 +               if (fpm_children[i]->pid == pid) {
79255 +                       child = fpm_children[i];
79256 +                       break;
79257 +               }
79258 +       }
79259 +
79260 +       if (!child) {
79261 +               return 0;
79262 +       }
79263 +
79264 +       --child->wp->running_children;
79265 +       --fpm_globals.running_children;
79266 +
79267 +       if (child->prev) child->prev->next = child->next;
79268 +       else child->wp->children = child->next;
79269 +       if (child->next) child->next->prev = child->prev;
79270 +
79271 +       return child;
79272 +}
79273 +
79274 +static void fpm_child_init(struct fpm_worker_pool_s *wp)
79275 +{
79276 +       fpm_globals.max_requests = wp->config->max_requests;
79277 +       fpm_stdio_init_child(wp);
79278 +       fpm_unix_init_child(wp);
79279 +       fpm_signals_init_child();
79280 +       fpm_env_init_child(wp);
79281 +       fpm_php_init_child(wp);
79282 +}
79283 +
79284 +int fpm_children_free(struct fpm_child_s *child)
79285 +{
79286 +       struct fpm_child_s *next;
79287 +
79288 +       for (; child; child = next) {
79289 +               next = child->next;
79290 +               fpm_child_free(child, 0 /* in_event_loop */);
79291 +       }
79292 +
79293 +       return 0;
79294 +}
79295 +
79296 +#ifndef WCOREDUMP
79297 +#define WCOREDUMP(x) 0
79298 +#endif
79299 +
79300 +void fpm_children_bury()
79301 +{
79302 +       int status;
79303 +       pid_t pid;
79304 +       struct fpm_child_s *child;
79305 +
79306 +       while ( (pid = waitpid(-1, &status, WNOHANG)) > 0) {
79307 +               char buf[128];
79308 +               int severity = ZLOG_NOTICE;
79309 +
79310 +               if (WIFEXITED(status)) {
79311 +
79312 +                       snprintf(buf, sizeof(buf), "with code %d", WEXITSTATUS(status));
79313 +
79314 +                       if (WEXITSTATUS(status) != 0) {
79315 +                               severity = ZLOG_WARNING;
79316 +                       }
79317 +
79318 +               }
79319 +               else {
79320 +
79321 +                       snprintf(buf, sizeof(buf), "on signal %d %s%s", WTERMSIG(status),
79322 +                                       fpm_signal_names[WTERMSIG(status)] ? fpm_signal_names[WTERMSIG(status)] : "",
79323 +                                       WCOREDUMP(status) ? " (core dumped)" : "");
79324 +
79325 +                       if (WTERMSIG(status) != SIGQUIT) { /* possible request loss */
79326 +                               severity = ZLOG_WARNING;
79327 +                       }
79328 +               }
79329 +
79330 +               child = fpm_child_remove(pid);
79331 +
79332 +               if (child) {
79333 +                       struct fpm_worker_pool_s *wp = child->wp;
79334 +                       struct timeval tv1, tv2;
79335 +
79336 +                       gettimeofday(&tv1, 0);
79337 +
79338 +                       timersub(&tv1, &child->started, &tv2);
79339 +
79340 +                       zlog(ZLOG_STUFF, severity, "child %d (pool %s) exited %s after %ld.%06d seconds", pid,
79341 +                                               child->wp->config->name, buf, tv2.tv_sec, (int) tv2.tv_usec);
79342 +
79343 +                       fpm_child_free(child, 1 /* in event_loop */);
79344 +
79345 +                       fpm_pctl_child_exited();
79346 +
79347 +                       if (last_faults && (WTERMSIG(status) == SIGSEGV || WTERMSIG(status) == SIGBUS)) {
79348 +                               time_t now = tv1.tv_sec;
79349 +                               int restart_condition = 1;
79350 +                               int i;
79351 +
79352 +                               last_faults[fault++] = now;
79353 +
79354 +                               if (fault == fpm_global_options.emergency_restart_threshold) {
79355 +                                       fault = 0;
79356 +                               }
79357 +
79358 +                               for (i = 0; i < fpm_global_options.emergency_restart_threshold; i++) {
79359 +                                       if (now - last_faults[i] > fpm_global_options.emergency_restart_interval) {
79360 +                                               restart_condition = 0;
79361 +                                               break;
79362 +                                       }
79363 +                               }
79364 +
79365 +                               if (restart_condition) {
79366 +
79367 +                                       zlog(ZLOG_STUFF, ZLOG_WARNING, "failed processes threshold (%d in %d sec) is reached, initiating reload",
79368 +                                               fpm_global_options.emergency_restart_threshold, fpm_global_options.emergency_restart_interval);
79369 +
79370 +                                       fpm_pctl(FPM_PCTL_STATE_RELOADING, FPM_PCTL_ACTION_SET);
79371 +                               }
79372 +                       }
79373 +
79374 +                       fpm_children_make(wp, 1 /* in event loop */);
79375 +               }
79376 +               else {
79377 +                       zlog(ZLOG_STUFF, ZLOG_ALERT, "oops, unknown child exited %s", buf);
79378 +               }
79379 +       }
79380 +
79381 +}
79382 +
79383 +static int fpm_children_make(struct fpm_worker_pool_s *wp, int in_event_loop)
79384 +{
79385 +       int enough = 0;
79386 +
79387 +       while (!enough && fpm_pctl_can_spawn_children() && wp->running_children < wp->config->pm->max_children) {
79388 +               pid_t pid;
79389 +
79390 +               if (0 > fpm_stdio_child_prepare_pipes(wp)) {
79391 +                       enough = 1;
79392 +                       break;
79393 +               }
79394 +
79395 +               pid = fork();
79396 +
79397 +               switch (pid) {
79398 +
79399 +                       case 0 :
79400 +                               fpm_globals.is_child = 1;
79401 +                               if (in_event_loop) {
79402 +                                       fpm_event_exit_loop();
79403 +                               }
79404 +                               fpm_child_init(wp);
79405 +                               return 0;
79406 +
79407 +                       case -1 :
79408 +                               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "fork() failed");
79409 +                               enough = 1;
79410 +                               break; /* dont try any more on error */
79411 +
79412 +                       default :
79413 +                               zlog(ZLOG_STUFF, ZLOG_NOTICE, "child %d (pool %s) started", (int) pid, wp->config->name);
79414 +
79415 +                               if (fpm_child_add(wp, pid)) {
79416 +                                       zlog(ZLOG_STUFF, ZLOG_ERROR, "fpm_child_add() failed for pid %d (pool %s)", (int) pid, wp->config->name);
79417 +                                       enough = 1;
79418 +                                       break;
79419 +                               }
79420 +               }
79421 +
79422 +       }
79423 +
79424 +       return 1; /* we are done */
79425 +}
79426 +
79427 +int fpm_children_create_initial(struct fpm_worker_pool_s *wp)
79428 +{
79429 +       return fpm_children_make(wp, 0 /* not in event loop yet */);
79430 +}
79431 +
79432 +int fpm_children_init_main()
79433 +{
79434 +       if (fpm_global_options.emergency_restart_threshold &&
79435 +               fpm_global_options.emergency_restart_interval) {
79436 +
79437 +               last_faults = malloc(sizeof(time_t) * fpm_global_options.emergency_restart_threshold);
79438 +
79439 +               if (!last_faults) {
79440 +                       return -1;
79441 +               }
79442 +
79443 +               memset(last_faults, 0, sizeof(time_t) * fpm_global_options.emergency_restart_threshold);
79444 +       }
79445 +
79446 +       fpm_cleanup_add(FPM_CLEANUP_ALL, fpm_children_cleanup, 0);
79447 +
79448 +       return 0;
79449 +}
79450 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_children.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_children.h
79451 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_children.h       1970-01-01 03:00:00.000000000 +0300
79452 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_children.h   2007-08-31 15:47:19.000000000 +0400
79453 @@ -0,0 +1,30 @@
79454 +
79455 +       /* $Id$ */
79456 +       /* (c) 2007 Andrei Nigmatulin */
79457 +
79458 +#ifndef FPM_CHILDREN_H
79459 +#define FPM_CHILDREN_H 1
79460 +
79461 +#include <sys/time.h>
79462 +#include <sys/types.h>
79463 +#include <event.h>
79464 +
79465 +#include "fpm_worker_pool.h"
79466 +
79467 +int fpm_children_create_initial(struct fpm_worker_pool_s *wp);
79468 +int fpm_children_free(struct fpm_child_s *child);
79469 +void fpm_children_bury();
79470 +int fpm_children_init_main();
79471 +
79472 +struct fpm_child_s;
79473 +
79474 +struct fpm_child_s {
79475 +       struct fpm_child_s *prev, *next;
79476 +       struct timeval started;
79477 +       struct fpm_worker_pool_s *wp;
79478 +       struct event ev_stdout, ev_stderr;
79479 +       int fd_stdout, fd_stderr;
79480 +       pid_t pid;
79481 +};
79482 +
79483 +#endif
79484 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_cleanup.c php-5.2.4.fpm/sapi/cgi/fpm/fpm_cleanup.c
79485 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_cleanup.c        1970-01-01 03:00:00.000000000 +0300
79486 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_cleanup.c    2007-08-31 15:47:19.000000000 +0400
79487 @@ -0,0 +1,56 @@
79488 +
79489 +       /* $Id$ */
79490 +       /* (c) 2007 Andrei Nigmatulin */
79491 +
79492 +#include "fpm_config.h"
79493 +
79494 +#include <stdlib.h>
79495 +
79496 +#include "fpm_cleanup.h"
79497 +#include "zlog.h"
79498 +
79499 +struct cleanup_s {
79500 +       int type;
79501 +       void (*cleanup)(int, void *);
79502 +       void *arg;
79503 +};
79504 +
79505 +static int cleanups_allocated, cleanups_used;
79506 +struct cleanup_s *cleanups;
79507 +
79508 +int fpm_cleanup_add(int type, void (*cleanup)(int, void *), void *arg)
79509 +{
79510 +       if (cleanups_used == cleanups_allocated) {
79511 +               int new_size = cleanups_allocated + 100;
79512 +
79513 +               void *new_ptr = realloc(cleanups, sizeof(struct cleanup_s) * new_size);
79514 +
79515 +               if (!new_ptr) return -1;
79516 +
79517 +               cleanups = new_ptr;
79518 +               cleanups_allocated = new_size;
79519 +       }
79520 +
79521 +       cleanups[cleanups_used].type = type;
79522 +       cleanups[cleanups_used].cleanup = cleanup;
79523 +       cleanups[cleanups_used].arg = arg;
79524 +
79525 +       ++cleanups_used;
79526 +
79527 +       return 0;
79528 +}
79529 +
79530 +void fpm_cleanups_run(int type)
79531 +{
79532 +       int cl = cleanups_used;
79533 +
79534 +       while (cl--) {
79535 +               struct cleanup_s *c = &cleanups[cl];
79536 +               if (c->type & type) {
79537 +                       c->cleanup(type, c->arg);
79538 +               }
79539 +       }
79540 +
79541 +       cleanups_used = 0;
79542 +       free(cleanups);
79543 +}
79544 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_cleanup.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_cleanup.h
79545 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_cleanup.h        1970-01-01 03:00:00.000000000 +0300
79546 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_cleanup.h    2007-08-31 15:47:19.000000000 +0400
79547 @@ -0,0 +1,21 @@
79548 +
79549 +       /* $Id$ */
79550 +       /* (c) 2007 Andrei Nigmatulin */
79551 +
79552 +#ifndef FPM_CLEANUP_H
79553 +#define FPM_CLEANUP_H 1
79554 +
79555 +int fpm_cleanup_add(int type, void (*cleanup)(int, void *), void *);
79556 +void fpm_cleanups_run(int type);
79557 +
79558 +enum {
79559 +       FPM_CLEANUP_CHILD                                       = (1 << 0),
79560 +       FPM_CLEANUP_PARENT_EXIT                         = (1 << 1),
79561 +       FPM_CLEANUP_PARENT_EXIT_MAIN            = (1 << 2),
79562 +       FPM_CLEANUP_PARENT_EXEC                         = (1 << 3),
79563 +       FPM_CLEANUP_PARENT                                      = (1 << 1) | (1 << 2) | (1 << 3),
79564 +       FPM_CLEANUP_ALL                                         = ~0,
79565 +};
79566 +
79567 +#endif
79568 +
79569 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_conf.c php-5.2.4.fpm/sapi/cgi/fpm/fpm_conf.c
79570 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_conf.c   1970-01-01 03:00:00.000000000 +0300
79571 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_conf.c       2007-08-31 15:47:19.000000000 +0400
79572 @@ -0,0 +1,467 @@
79573 +
79574 +       /* $Id$ */
79575 +       /* (c) 2007 Andrei Nigmatulin */
79576 +
79577 +#include "fpm_config.h"
79578 +
79579 +#include <sys/types.h>
79580 +#include <sys/stat.h>
79581 +#include <fcntl.h>
79582 +#include <string.h>
79583 +#include <stdlib.h>
79584 +#include <stddef.h>
79585 +#include <stdint.h>
79586 +#include <stdio.h>
79587 +#include <unistd.h>
79588 +
79589 +#include "fpm.h"
79590 +#include "fpm_conf.h"
79591 +#include "fpm_worker_pool.h"
79592 +#include "fpm_cleanup.h"
79593 +#include "fpm_php.h"
79594 +#include "fpm_sockets.h"
79595 +#include "xml_config.h"
79596 +#include "zlog.h"
79597 +
79598 +
79599 +struct fpm_options_s fpm_global_options;
79600 +
79601 +static void *fpm_global_options_ptr()
79602 +{
79603 +       return &fpm_global_options;
79604 +}
79605 +
79606 +static struct xml_conf_section xml_section_fpm_global_options = {
79607 +       .conf = &fpm_global_options_ptr,
79608 +       .path = "/configuration/global_options",
79609 +       .parsers = {
79610 +               { XML_CONF_SCALAR,      "emergency_restart_threshold",          &xml_conf_set_slot_integer,             offsetof(struct fpm_options_s, emergency_restart_threshold) },
79611 +               { XML_CONF_SCALAR,      "emergency_restart_interval",           &xml_conf_set_slot_time,                offsetof(struct fpm_options_s, emergency_restart_interval) },
79612 +               { XML_CONF_SCALAR,      "process_control_timeout",                      &xml_conf_set_slot_time,                offsetof(struct fpm_options_s, process_control_timeout) },
79613 +               { XML_CONF_SCALAR,      "daemonize",                                            &xml_conf_set_slot_boolean,             offsetof(struct fpm_options_s, daemonize) },
79614 +               { XML_CONF_SCALAR,      "pid_file",                                                     &xml_conf_set_slot_string,              offsetof(struct fpm_options_s, pid_file) },
79615 +               { XML_CONF_SCALAR,      "error_log",                                            &xml_conf_set_slot_string,              offsetof(struct fpm_options_s, error_log) },
79616 +               { 0, 0, 0, 0 }
79617 +       }
79618 +};
79619 +
79620 +static char *fpm_conf_set_pm_style(void **conf, char *name, void *vv, intptr_t offset)
79621 +{
79622 +       char *value = vv;
79623 +       struct fpm_pm_s *c = *conf;
79624 +
79625 +       if (!strcmp(value, "static")) {
79626 +               c->style = PM_STYLE_STATIC;
79627 +       }
79628 +       else if (!strcmp(value, "apache-like")) {
79629 +               c->style = PM_STYLE_APACHE_LIKE;
79630 +       }
79631 +       else {
79632 +               return "invalid value for 'style'";
79633 +       }
79634 +
79635 +       return NULL;
79636 +}
79637 +
79638 +static char *fpm_conf_set_rlimit_core(void **conf, char *name, void *vv, intptr_t offset)
79639 +{
79640 +       char *value = vv;
79641 +       struct fpm_worker_pool_config_s *c = *conf;
79642 +
79643 +       if (!strcmp(value, "unlimited")) {
79644 +               c->rlimit_core = -1;
79645 +       }
79646 +       else {
79647 +               int int_value;
79648 +               void *subconf = &int_value;
79649 +               char *error;
79650 +
79651 +               error = xml_conf_set_slot_integer(&subconf, name, vv, 0);
79652 +
79653 +               if (error) return error;
79654 +
79655 +               if (int_value < 0) return "invalid value for 'rlimit_core'";
79656 +
79657 +               c->rlimit_core = int_value;
79658 +       }
79659 +
79660 +       return NULL;
79661 +}
79662 +
79663 +static char *fpm_conf_set_catch_workers_output(void **conf, char *name, void *vv, intptr_t offset)
79664 +{
79665 +       struct fpm_worker_pool_config_s *c = *conf;
79666 +       int int_value;
79667 +       void *subconf = &int_value;
79668 +       char *error;
79669 +
79670 +       error = xml_conf_set_slot_boolean(&subconf, name, vv, 0);
79671 +
79672 +       if (error) return error;
79673 +
79674 +       c->catch_workers_output = int_value;
79675 +
79676 +       return NULL;
79677 +}
79678 +
79679 +static char *fpm_conf_set_apache_like_subsection(void **conf, char *name, void *xml_node, intptr_t offset)
79680 +{
79681 +       static struct xml_conf_section fpm_conf_set_apache_like_subsection_conf = {
79682 +               .path = "apache_like somewhere", /* fixme */
79683 +               .parsers = {
79684 +                       { XML_CONF_SCALAR, "StartServers",              &xml_conf_set_slot_integer, offsetof(struct fpm_pm_s, options_apache_like.StartServers) },
79685 +                       { XML_CONF_SCALAR, "MinSpareServers",   &xml_conf_set_slot_integer, offsetof(struct fpm_pm_s, options_apache_like.MinSpareServers) },
79686 +                       { XML_CONF_SCALAR, "MaxSpareServers",   &xml_conf_set_slot_integer, offsetof(struct fpm_pm_s, options_apache_like.MaxSpareServers) },
79687 +                       { 0, 0, 0, 0 }
79688 +               }
79689 +       };
79690 +
79691 +       return xml_conf_parse_section(conf, &fpm_conf_set_apache_like_subsection_conf, xml_node);
79692 +}
79693 +
79694 +static char *fpm_conf_set_listen_options_subsection(void **conf, char *name, void *xml_node, intptr_t offset)
79695 +{
79696 +       void *subconf = (char *) *conf + offset;
79697 +       struct fpm_listen_options_s *lo;
79698 +
79699 +       static struct xml_conf_section fpm_conf_set_listen_options_subsection_conf = {
79700 +               .path = "listen options somewhere", /* fixme */
79701 +               .parsers = {
79702 +                       { XML_CONF_SCALAR,              "backlog",              &xml_conf_set_slot_integer,             offsetof(struct fpm_listen_options_s, backlog) },
79703 +                       { XML_CONF_SCALAR,              "owner",                &xml_conf_set_slot_string,              offsetof(struct fpm_listen_options_s, owner) },
79704 +                       { XML_CONF_SCALAR,              "group",                &xml_conf_set_slot_string,              offsetof(struct fpm_listen_options_s, group) },
79705 +                       { XML_CONF_SCALAR,              "mode",                 &xml_conf_set_slot_string,              offsetof(struct fpm_listen_options_s, mode) },
79706 +                       { 0, 0, 0, 0 }
79707 +               }
79708 +       };
79709 +
79710 +       lo = malloc(sizeof(*lo));
79711 +
79712 +       if (!lo) {
79713 +               return "fpm_conf_set_listen_options_subsection(): malloc failed";
79714 +       }
79715 +
79716 +       memset(lo, 0, sizeof(*lo));
79717 +
79718 +       lo->backlog = -1;
79719 +
79720 +       * (struct fpm_listen_options_s **) subconf = lo;
79721 +
79722 +       subconf = lo;
79723 +
79724 +       return xml_conf_parse_section(&subconf, &fpm_conf_set_listen_options_subsection_conf, xml_node);
79725 +}
79726 +
79727 +static char *fpm_conf_set_pm_subsection(void **conf, char *name, void *xml_node, intptr_t offset)
79728 +{
79729 +       void *subconf = (char *) *conf + offset;
79730 +       struct fpm_pm_s *pm;
79731 +
79732 +       static struct xml_conf_section fpm_conf_set_pm_subsection_conf = {
79733 +               .path = "pm settings somewhere", /* fixme */
79734 +               .parsers = {
79735 +                       { XML_CONF_SCALAR,              "style",                                &fpm_conf_set_pm_style,                                         0 },
79736 +                       { XML_CONF_SCALAR,              "max_children",                 &xml_conf_set_slot_integer,                                     offsetof(struct fpm_pm_s, max_children) },
79737 +                       { XML_CONF_SUBSECTION,  "apache_like",                  &fpm_conf_set_apache_like_subsection,           offsetof(struct fpm_pm_s, options_apache_like) },
79738 +                       { 0, 0, 0, 0 }
79739 +               }
79740 +       };
79741 +
79742 +       pm = malloc(sizeof(*pm));
79743 +
79744 +       if (!pm) {
79745 +               return "fpm_conf_set_pm_subsection(): malloc failed";
79746 +       }
79747 +
79748 +       memset(pm, 0, sizeof(*pm));
79749 +
79750 +       * (struct fpm_pm_s **) subconf = pm;
79751 +
79752 +       subconf = pm;
79753 +
79754 +       return xml_conf_parse_section(&subconf, &fpm_conf_set_pm_subsection_conf, xml_node);
79755 +}
79756 +
79757 +static char *xml_conf_set_slot_key_value_pair(void **conf, char *name, void *vv, intptr_t offset)
79758 +{
79759 +       char *value = vv;
79760 +       struct key_value_s *kv;
79761 +       struct key_value_s ***parent = (struct key_value_s ***) conf;
79762 +
79763 +       kv = malloc(sizeof(*kv));
79764 +
79765 +       if (!kv) {
79766 +               return "xml_conf_set_slot_key_value_pair(): malloc() failed";
79767 +       }
79768 +
79769 +       memset(kv, 0, sizeof(*kv));
79770 +
79771 +       kv->key = strdup(name);
79772 +       kv->value = strdup(value);
79773 +
79774 +       if (!kv->key || !kv->value) {
79775 +               return "xml_conf_set_slot_key_value_pair(): strdup() failed";
79776 +       }
79777 +
79778 +       **parent = kv;
79779 +
79780 +       *parent = &kv->next;
79781 +
79782 +       return NULL;
79783 +}
79784 +
79785 +static char *fpm_conf_set_key_value_pairs_subsection(void **conf, char *name, void *xml_node, intptr_t offset)
79786 +{
79787 +       void *next_kv = (char *) *conf + offset;
79788 +
79789 +       static struct xml_conf_section fpm_conf_set_key_value_pairs_subsection_conf = {
79790 +               .path = "key_value_pairs somewhere", /* fixme */
79791 +               .parsers = {
79792 +                       { XML_CONF_SCALAR, 0, &xml_conf_set_slot_key_value_pair, 0 },
79793 +                       { 0, 0, 0, 0 }
79794 +               }
79795 +       };
79796 +
79797 +       return xml_conf_parse_section(&next_kv, &fpm_conf_set_key_value_pairs_subsection_conf, xml_node);
79798 +}
79799 +
79800 +static void *fpm_worker_pool_config_alloc()
79801 +{
79802 +       static struct fpm_worker_pool_s *current_wp = 0;
79803 +       struct fpm_worker_pool_s *wp;
79804 +
79805 +       wp = fpm_worker_pool_alloc();
79806 +
79807 +       if (!wp) return 0;
79808 +
79809 +       wp->config = malloc(sizeof(struct fpm_worker_pool_config_s));
79810 +
79811 +       if (!wp->config) return 0;
79812 +
79813 +       memset(wp->config, 0, sizeof(struct fpm_worker_pool_config_s));
79814 +
79815 +       if (current_wp) current_wp->next = wp;
79816 +
79817 +       current_wp = wp;
79818 +
79819 +       return wp->config;
79820 +}
79821 +
79822 +int fpm_worker_pool_config_free(struct fpm_worker_pool_config_s *wpc)
79823 +{
79824 +       struct key_value_s *kv, *kv_next;
79825 +
79826 +       free(wpc->name);
79827 +       free(wpc->listen_address);
79828 +       if (wpc->listen_options) {
79829 +               free(wpc->listen_options->owner);
79830 +               free(wpc->listen_options->group);
79831 +               free(wpc->listen_options->mode);
79832 +               free(wpc->listen_options);
79833 +       }
79834 +       for (kv = wpc->php_defines; kv; kv = kv_next) {
79835 +               kv_next = kv->next;
79836 +               free(kv->key);
79837 +               free(kv->value);
79838 +               free(kv);
79839 +       }
79840 +       for (kv = wpc->environment; kv; kv = kv_next) {
79841 +               kv_next = kv->next;
79842 +               free(kv->key);
79843 +               free(kv->value);
79844 +               free(kv);
79845 +       }
79846 +       free(wpc->pm);
79847 +       free(wpc->user);
79848 +       free(wpc->group);
79849 +       free(wpc->chroot);
79850 +       free(wpc->chdir);
79851 +       free(wpc->allowed_clients);
79852 +
79853 +       return 0;
79854 +}
79855 +
79856 +static struct xml_conf_section xml_section_fpm_worker_pool_config = {
79857 +       .conf = &fpm_worker_pool_config_alloc,
79858 +       .path = "/configuration/workers/pool",
79859 +       .parsers = {
79860 +               { XML_CONF_SCALAR,              "name",                                                 &xml_conf_set_slot_string,                                      offsetof(struct fpm_worker_pool_config_s, name) },
79861 +               { XML_CONF_SCALAR,              "listen_address",                               &xml_conf_set_slot_string,                                      offsetof(struct fpm_worker_pool_config_s, listen_address) },
79862 +               { XML_CONF_SUBSECTION,  "listen_options",                               &fpm_conf_set_listen_options_subsection,        offsetof(struct fpm_worker_pool_config_s, listen_options) },
79863 +               { XML_CONF_SUBSECTION,  "php_defines",                                  &fpm_conf_set_key_value_pairs_subsection,       offsetof(struct fpm_worker_pool_config_s, php_defines) },
79864 +               { XML_CONF_SCALAR,              "user",                                                 &xml_conf_set_slot_string,                                      offsetof(struct fpm_worker_pool_config_s, user) },
79865 +               { XML_CONF_SCALAR,              "group",                                                &xml_conf_set_slot_string,                                      offsetof(struct fpm_worker_pool_config_s, group) },
79866 +               { XML_CONF_SCALAR,              "chroot",                                               &xml_conf_set_slot_string,                                      offsetof(struct fpm_worker_pool_config_s, chroot) },
79867 +               { XML_CONF_SCALAR,              "chdir",                                                &xml_conf_set_slot_string,                                      offsetof(struct fpm_worker_pool_config_s, chdir) },
79868 +               { XML_CONF_SCALAR,              "allowed_clients",                              &xml_conf_set_slot_string,                                      offsetof(struct fpm_worker_pool_config_s, allowed_clients) },
79869 +               { XML_CONF_SUBSECTION,  "environment",                                  &fpm_conf_set_key_value_pairs_subsection,       offsetof(struct fpm_worker_pool_config_s, environment) },
79870 +               { XML_CONF_SCALAR,              "request_execution_timeout",    &xml_conf_set_slot_time,                                        offsetof(struct fpm_worker_pool_config_s, request_execution_timeout) },
79871 +               { XML_CONF_SCALAR,              "rlimit_files",                                 &xml_conf_set_slot_integer,                                     offsetof(struct fpm_worker_pool_config_s, rlimit_files) },
79872 +               { XML_CONF_SCALAR,              "rlimit_core",                                  &fpm_conf_set_rlimit_core,                                      0 },
79873 +               { XML_CONF_SCALAR,              "max_requests",                                 &xml_conf_set_slot_integer,                                     offsetof(struct fpm_worker_pool_config_s, max_requests) },
79874 +               { XML_CONF_SCALAR,              "catch_workers_output",                 &fpm_conf_set_catch_workers_output,                     0 },
79875 +               { XML_CONF_SUBSECTION,  "pm",                                                   &fpm_conf_set_pm_subsection,                            offsetof(struct fpm_worker_pool_config_s, pm) },
79876 +               { 0, 0, 0, 0 }
79877 +       }
79878 +};
79879 +
79880 +static struct xml_conf_section *fpm_conf_all_sections[] = {
79881 +       &xml_section_fpm_global_options,
79882 +       &xml_section_fpm_worker_pool_config,
79883 +       0
79884 +};
79885 +
79886 +static int fpm_evaluate_full_path(char **path)
79887 +{
79888 +       if (**path != '/') {
79889 +               char *full_path;
79890 +
79891 +               full_path = malloc(sizeof(PHP_PREFIX) + strlen(*path) + 1);
79892 +
79893 +               if (!full_path) return -1;
79894 +
79895 +               sprintf(full_path, "%s/%s", PHP_PREFIX, *path);
79896 +
79897 +               free(*path);
79898 +
79899 +               *path = full_path;
79900 +       }
79901 +
79902 +       return 0;
79903 +}
79904 +
79905 +static int fpm_conf_process_all_pools()
79906 +{
79907 +       struct fpm_worker_pool_s *wp;
79908 +
79909 +       if (!fpm_worker_all_pools) {
79910 +               zlog(ZLOG_STUFF, ZLOG_ERROR, "at least one pool section must be specified in config file");
79911 +               return -1;
79912 +       }
79913 +
79914 +       for (wp = fpm_worker_all_pools; wp; wp = wp->next) {
79915 +
79916 +               if (wp->config->listen_address && *wp->config->listen_address) {
79917 +
79918 +                       wp->listen_address_domain = fpm_sockets_domain_from_address(wp->config->listen_address);
79919 +
79920 +                       if (wp->listen_address_domain == FPM_AF_UNIX && *wp->config->listen_address != '/') {
79921 +                               fpm_evaluate_full_path(&wp->config->listen_address);
79922 +                       }
79923 +
79924 +               }
79925 +               else {
79926 +
79927 +                       wp->is_template = 1;
79928 +
79929 +               }
79930 +       }
79931 +
79932 +       return 0;
79933 +}
79934 +
79935 +int fpm_conf_unlink_pid()
79936 +{
79937 +       if (0 > unlink(fpm_global_options.pid_file)) {
79938 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "unlink(\"%s\") failed", fpm_global_options.pid_file);
79939 +               return -1;
79940 +       }
79941 +
79942 +       return 0;
79943 +}
79944 +
79945 +int fpm_conf_write_pid()
79946 +{
79947 +       int fd;
79948 +
79949 +       if (fpm_global_options.pid_file) {
79950 +               char buf[64];
79951 +               int len;
79952 +
79953 +               unlink(fpm_global_options.pid_file);
79954 +
79955 +               fd = creat(fpm_global_options.pid_file, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
79956 +
79957 +               if (!fd) {
79958 +                       zlog(ZLOG_STUFF, ZLOG_SYSERROR, "creat(\"%s\") failed", fpm_global_options.pid_file);
79959 +                       return -1;
79960 +               }
79961 +
79962 +               len = sprintf(buf, "%d", (int) getpid());
79963 +
79964 +               if (len != write(fd, buf, len)) {
79965 +                       zlog(ZLOG_STUFF, ZLOG_SYSERROR, "write() failed");
79966 +                       return -1;
79967 +               }
79968 +
79969 +               close(fd);
79970 +       }
79971 +
79972 +       return 0;
79973 +}
79974 +
79975 +static int fpm_conf_post_process()
79976 +{
79977 +       int fd;
79978 +
79979 +       if (fpm_global_options.pid_file) {
79980 +               fpm_evaluate_full_path(&fpm_global_options.pid_file);
79981 +       }
79982 +
79983 +       if (!fpm_global_options.error_log) {
79984 +               fpm_global_options.error_log = strdup(PHP_PREFIX "/logs/" FPM_ERROR_LOG_FILENAME);
79985 +       }
79986 +
79987 +       fpm_evaluate_full_path(&fpm_global_options.error_log);
79988 +
79989 +       fd = open(fpm_global_options.error_log, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR);
79990 +
79991 +       if (0 > fd) {
79992 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "open(\"%s\") failed", fpm_global_options.error_log);
79993 +               return -1;
79994 +       }
79995 +
79996 +       fcntl(fd, F_SETFD, FD_CLOEXEC);
79997 +
79998 +       fpm_globals.error_log_fd = fd;
79999 +
80000 +       return fpm_conf_process_all_pools();
80001 +}
80002 +
80003 +static void fpm_conf_cleanup(int which, void *arg)
80004 +{
80005 +       free(fpm_global_options.pid_file);
80006 +       free(fpm_global_options.error_log);
80007 +       fpm_global_options.pid_file = 0;
80008 +       fpm_global_options.error_log = 0;
80009 +}
80010 +
80011 +int fpm_conf_init_main(char *filename)
80012 +{
80013 +       char *err;
80014 +
80015 +       if (0 > xml_conf_sections_register(fpm_conf_all_sections)) {
80016 +               return -1;
80017 +       }
80018 +
80019 +       if (filename == NULL) {
80020 +               filename = PHP_SYSCONFDIR "/" FPM_CONF_FILENAME;
80021 +       }
80022 +
80023 +       err = xml_conf_load_file(filename);
80024 +
80025 +       if (err) {
80026 +               zlog(ZLOG_STUFF, ZLOG_ERROR, "failed to load configuration file: %s", err);
80027 +               return -1;
80028 +       }
80029 +
80030 +       if (0 > fpm_conf_post_process()) {
80031 +               return -1;
80032 +       }
80033 +
80034 +       xml_conf_clean();
80035 +
80036 +       fpm_cleanup_add(FPM_CLEANUP_ALL, fpm_conf_cleanup, 0);
80037 +
80038 +       return 0;
80039 +}
80040 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_conf.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_conf.h
80041 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_conf.h   1970-01-01 03:00:00.000000000 +0300
80042 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_conf.h       2007-08-31 15:47:19.000000000 +0400
80043 @@ -0,0 +1,74 @@
80044 +
80045 +       /* $Id$ */
80046 +       /* (c) 2007 Andrei Nigmatulin */
80047 +
80048 +#ifndef FPM_CONF_H
80049 +#define FPM_CONF_H 1
80050 +
80051 +#define FPM_CONF_FILENAME "php-fpm.conf"
80052 +#define FPM_ERROR_LOG_FILENAME "php-fpm.log"
80053 +
80054 +struct key_value_s;
80055 +
80056 +struct key_value_s {
80057 +       struct key_value_s *next;
80058 +       char *key;
80059 +       char *value;
80060 +};
80061 +
80062 +struct fpm_options_s {
80063 +       int emergency_restart_threshold;
80064 +       int emergency_restart_interval;
80065 +       int process_control_timeout;
80066 +       int daemonize;
80067 +       char *pid_file;
80068 +       char *error_log;
80069 +};
80070 +
80071 +extern struct fpm_options_s fpm_global_options;
80072 +
80073 +struct fpm_pm_s {
80074 +       int style;
80075 +       int max_children;
80076 +       struct {
80077 +               int StartServers;
80078 +               int MinSpareServers;
80079 +               int MaxSpareServers;
80080 +       } options_apache_like;
80081 +};
80082 +
80083 +struct fpm_listen_options_s {
80084 +       int backlog;
80085 +       char *owner;
80086 +       char *group;
80087 +       char *mode;
80088 +};
80089 +
80090 +struct fpm_worker_pool_config_s {
80091 +       char *name;
80092 +       char *listen_address;
80093 +       struct fpm_listen_options_s *listen_options;
80094 +       struct key_value_s *php_defines;
80095 +       char *user;
80096 +       char *group;
80097 +       char *chroot;
80098 +       char *chdir;
80099 +       char *allowed_clients;
80100 +       struct key_value_s *environment;
80101 +       struct fpm_pm_s *pm;
80102 +       int request_execution_timeout;
80103 +       int max_requests;
80104 +       int rlimit_files;
80105 +       int rlimit_core;
80106 +       int catch_workers_output:1;
80107 +};
80108 +
80109 +enum { PM_STYLE_STATIC = 1, PM_STYLE_APACHE_LIKE = 2 };
80110 +
80111 +int fpm_conf_init_main(char *filename);
80112 +int fpm_worker_pool_config_free(struct fpm_worker_pool_config_s *wpc);
80113 +int fpm_conf_write_pid();
80114 +int fpm_conf_unlink_pid();
80115 +
80116 +#endif
80117 +
80118 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_config.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_config.h
80119 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_config.h 1970-01-01 03:00:00.000000000 +0300
80120 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_config.h     2007-08-31 15:47:19.000000000 +0400
80121 @@ -0,0 +1,31 @@
80122 +
80123 +       /* $Id$ */
80124 +       /* (c) 2007 Andrei Nigmatulin */
80125 +
80126 +#include "php_config.h"
80127 +
80128 +
80129 +/* Solaris does not have it */
80130 +#ifndef INADDR_NONE
80131 +#define INADDR_NONE (-1)
80132 +#endif
80133 +
80134 +
80135 +/* If we're not using GNU C, elide __attribute__ */
80136 +#ifndef __GNUC__
80137 +#  define  __attribute__(x)  /*NOTHING*/
80138 +#endif
80139 +
80140 +
80141 +/* Solaris does not have it */
80142 +#ifndef timersub
80143 +#define        timersub(tvp, uvp, vvp)                                         \
80144 +       do {                                                            \
80145 +               (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec;          \
80146 +               (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec;       \
80147 +               if ((vvp)->tv_usec < 0) {                               \
80148 +                       (vvp)->tv_sec--;                                \
80149 +                       (vvp)->tv_usec += 1000000;                      \
80150 +               }                                                       \
80151 +       } while (0)
80152 +#endif
80153 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_env.c php-5.2.4.fpm/sapi/cgi/fpm/fpm_env.c
80154 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_env.c    1970-01-01 03:00:00.000000000 +0300
80155 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_env.c        2007-08-31 15:47:19.000000000 +0400
80156 @@ -0,0 +1,125 @@
80157 +
80158 +       /* $Id$ */
80159 +       /* (c) 2007 Andrei Nigmatulin */
80160 +
80161 +#include "fpm_config.h"
80162 +
80163 +#ifdef HAVE_ALLOCA_H
80164 +#include <alloca.h>
80165 +#endif
80166 +#include <stdio.h>
80167 +#include <stdlib.h>
80168 +#include <string.h>
80169 +
80170 +#include "fpm_env.h"
80171 +#include "zlog.h"
80172 +
80173 +#if !HAVE_SETENV
80174 +int setenv(char *name, char *value, int overwrite)
80175 +{
80176 +       int name_len = strlen(name);
80177 +       int value_len = strlen(value);
80178 +       char *var = alloca(name_len + 1 + value_len + 1);
80179 +
80180 +       memcpy(var, name, name_len);
80181 +
80182 +       var[name_len] = '=';
80183 +
80184 +       memcpy(var + name_len + 1, value, value_len);
80185 +
80186 +       var[name_len + 1 + value_len] = '\0';
80187 +
80188 +       return putenv(var);
80189 +}
80190 +#endif
80191 +
80192 +#if !HAVE_CLEARENV
80193 +void clearenv()
80194 +{
80195 +       char **envp;
80196 +       char *s;
80197 +
80198 +       /* this algo is the only one known to me
80199 +               that works well on all systems */
80200 +       while (*(envp = environ)) {
80201 +               char *eq = strchr(*envp, '=');
80202 +
80203 +               s = strdup(*envp);
80204 +
80205 +               if (eq) s[eq - *envp] = '\0';
80206 +
80207 +               unsetenv(s);
80208 +               free(s);
80209 +       }
80210 +
80211 +}
80212 +#endif
80213 +
80214 +
80215 +int fpm_env_init_child(struct fpm_worker_pool_s *wp)
80216 +{
80217 +       struct key_value_s *kv;
80218 +
80219 +       clearenv();
80220 +
80221 +       for (kv = wp->config->environment; kv; kv = kv->next) {
80222 +               setenv(kv->key, kv->value, 1);
80223 +       }
80224 +
80225 +       if (wp->user) {
80226 +               setenv("USER", wp->user, 1);
80227 +       }
80228 +
80229 +       if (wp->home) {
80230 +               setenv("HOME", wp->home, 1);
80231 +       }
80232 +
80233 +       return 0;
80234 +}
80235 +
80236 +static int fpm_env_conf_wp(struct fpm_worker_pool_s *wp)
80237 +{
80238 +       struct key_value_s *kv;
80239 +
80240 +       kv = wp->config->environment;
80241 +
80242 +       for (kv = wp->config->environment; kv; kv = kv->next) {
80243 +               if (*kv->value == '$') {
80244 +                       char *value = getenv(kv->value + 1);
80245 +
80246 +                       if (!value) value = "";
80247 +
80248 +                       free(kv->value);
80249 +                       kv->value = strdup(value);
80250 +               }
80251 +
80252 +               /* autodetected values should be removed
80253 +                       if these vars specified in config */
80254 +               if (!strcmp(kv->key, "USER")) {
80255 +                       free(wp->user);
80256 +                       wp->user = 0;
80257 +               }
80258 +
80259 +               if (!strcmp(kv->key, "HOME")) {
80260 +                       free(wp->home);
80261 +                       wp->home = 0;
80262 +               }
80263 +       }
80264 +
80265 +       return 0;
80266 +}
80267 +
80268 +int fpm_env_init_main()
80269 +{
80270 +       struct fpm_worker_pool_s *wp;
80271 +
80272 +       for (wp = fpm_worker_all_pools; wp; wp = wp->next) {
80273 +
80274 +               if (0 > fpm_env_conf_wp(wp)) {
80275 +                       return -1;
80276 +               }
80277 +
80278 +       }
80279 +
80280 +       return 0;
80281 +}
80282 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_env.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_env.h
80283 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_env.h    1970-01-01 03:00:00.000000000 +0300
80284 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_env.h        2007-08-31 15:47:19.000000000 +0400
80285 @@ -0,0 +1,24 @@
80286 +
80287 +       /* $Id$ */
80288 +       /* (c) 2007 Andrei Nigmatulin */
80289 +
80290 +#ifndef FPM_ENV_H
80291 +#define FPM_ENV_H 1
80292 +
80293 +#include "fpm_worker_pool.h"
80294 +
80295 +int fpm_env_init_child(struct fpm_worker_pool_s *wp);
80296 +int fpm_env_init_main();
80297 +
80298 +extern char **environ;
80299 +
80300 +#if !HAVE_SETENV
80301 +int setenv(char *name, char *value, int overwrite);
80302 +#endif
80303 +
80304 +#if !HAVE_CLEARENV
80305 +void clearenv();
80306 +#endif
80307 +
80308 +#endif
80309 +
80310 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_events.c php-5.2.4.fpm/sapi/cgi/fpm/fpm_events.c
80311 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_events.c 1970-01-01 03:00:00.000000000 +0300
80312 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_events.c     2007-08-31 15:47:19.000000000 +0400
80313 @@ -0,0 +1,142 @@
80314 +
80315 +       /* $Id$ */
80316 +       /* (c) 2007 Andrei Nigmatulin */
80317 +
80318 +#include "fpm_config.h"
80319 +
80320 +#include <unistd.h>
80321 +#include <errno.h>
80322 +#include <stdlib.h> /* for putenv */
80323 +#include <string.h>
80324 +#include <sys/types.h> /* for event.h below */
80325 +#include <event.h>
80326 +
80327 +#include "fpm_process_ctl.h"
80328 +#include "fpm_events.h"
80329 +#include "fpm_cleanup.h"
80330 +#include "fpm_signals.h"
80331 +#include "fpm_children.h"
80332 +#include "zlog.h"
80333 +
80334 +static struct event pctl_event;
80335 +
80336 +static void fpm_event_pctl_action(int fd, short which, void *arg)
80337 +{
80338 +       evtimer_del(&pctl_event);
80339 +
80340 +       memset(&pctl_event, 0, sizeof(pctl_event));
80341 +
80342 +       fpm_pctl(FPM_PCTL_STATE_UNSPECIFIED, FPM_PCTL_ACTION_TIMEOUT);
80343 +}
80344 +
80345 +int fpm_event_pctl_timeout_set(int sec)
80346 +{
80347 +       struct timeval tv = { .tv_sec = sec, .tv_usec = 0 };
80348 +
80349 +       if (evtimer_initialized(&pctl_event)) {
80350 +               evtimer_del(&pctl_event);
80351 +       }
80352 +
80353 +       evtimer_set(&pctl_event, &fpm_event_pctl_action, 0);
80354 +
80355 +       evtimer_add(&pctl_event, &tv);
80356 +
80357 +       return 0;
80358 +}
80359 +
80360 +static void fpm_event_cleanup(int which, void *arg)
80361 +{
80362 +       event_base_free(0);
80363 +}
80364 +
80365 +static void fpm_got_signal(int fd, short ev, void *arg)
80366 +{
80367 +       char c;
80368 +       int res;
80369 +
80370 +       do {
80371 +               res = read(fd, &c, 1);
80372 +       } while (res == -1 && errno == EINTR);
80373 +
80374 +       if (res <= 0) {
80375 +               if (res < 0 && errno != EAGAIN && errno != EWOULDBLOCK) {
80376 +                       zlog(ZLOG_STUFF, ZLOG_SYSERROR, "read() failed");
80377 +               }
80378 +               return;
80379 +       }
80380 +
80381 +       switch (c) {
80382 +               case 'C' :                  /* SIGCHLD */
80383 +                       zlog(ZLOG_STUFF, ZLOG_NOTICE, "received SIGCHLD");
80384 +                       fpm_children_bury();
80385 +                       break;
80386 +               case 'I' :                  /* SIGINT  */
80387 +                       zlog(ZLOG_STUFF, ZLOG_NOTICE, "received SIGINT");
80388 +                       fpm_pctl(FPM_PCTL_STATE_TERMINATING, FPM_PCTL_ACTION_SET);
80389 +                       break;
80390 +               case 'T' :                  /* SIGTERM */
80391 +                       zlog(ZLOG_STUFF, ZLOG_NOTICE, "received SIGTERM");
80392 +                       fpm_pctl(FPM_PCTL_STATE_TERMINATING, FPM_PCTL_ACTION_SET);
80393 +                       break;
80394 +               case 'Q' :                  /* SIGQUIT */
80395 +                       zlog(ZLOG_STUFF, ZLOG_NOTICE, "received SIGQUIT");
80396 +                       fpm_pctl(FPM_PCTL_STATE_FINISHING, FPM_PCTL_ACTION_SET);
80397 +                       break;
80398 +               case '2' :                  /* SIGUSR2 */
80399 +                       zlog(ZLOG_STUFF, ZLOG_NOTICE, "received SIGUSR2");
80400 +                       fpm_pctl(FPM_PCTL_STATE_RELOADING, FPM_PCTL_ACTION_SET);
80401 +                       break;
80402 +       }
80403 +
80404 +       return;
80405 +}
80406 +
80407 +int fpm_event_init_main()
80408 +{
80409 +       event_init();
80410 +
80411 +       zlog(ZLOG_STUFF, ZLOG_NOTICE, "libevent: using %s", event_get_method());
80412 +
80413 +       fpm_cleanup_add(FPM_CLEANUP_ALL, fpm_event_cleanup, 0);
80414 +
80415 +       return 0;
80416 +}
80417 +
80418 +int fpm_event_loop()
80419 +{
80420 +       static struct event signal_fd_event;
80421 +
80422 +       event_set(&signal_fd_event, fpm_signals_get_fd(), EV_PERSIST | EV_READ, &fpm_got_signal, 0);
80423 +
80424 +       event_add(&signal_fd_event, 0);
80425 +
80426 +       zlog(ZLOG_STUFF, ZLOG_NOTICE, "libevent: entering main loop");
80427 +
80428 +       event_loop(0);
80429 +
80430 +       event_del(&signal_fd_event);
80431 +
80432 +       return 0;
80433 +}
80434 +
80435 +int fpm_event_add(int fd, struct event *ev, void (*callback)(int, short, void *), void *arg)
80436 +{
80437 +       event_set(ev, fd, EV_PERSIST | EV_READ, callback, arg);
80438 +
80439 +       return event_add(ev, 0);
80440 +}
80441 +
80442 +int fpm_event_del(struct event *ev)
80443 +{
80444 +       return event_del(ev);
80445 +}
80446 +
80447 +void fpm_event_exit_loop()
80448 +{
80449 +       event_loopexit(0);
80450 +}
80451 +
80452 +void fpm_event_fire(struct event *ev)
80453 +{
80454 +       (*ev->ev_callback)((int)ev->ev_fd, ev->ev_res, ev->ev_arg);     
80455 +}
80456 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_events.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_events.h
80457 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_events.h 1970-01-01 03:00:00.000000000 +0300
80458 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_events.h     2007-08-31 15:47:19.000000000 +0400
80459 @@ -0,0 +1,17 @@
80460 +
80461 +       /* $Id$ */
80462 +       /* (c) 2007 Andrei Nigmatulin */
80463 +
80464 +#ifndef FPM_EVENTS_H
80465 +#define FPM_EVENTS_H 1
80466 +
80467 +int fpm_event_pctl_timeout_set(int sec);
80468 +void fpm_event_exit_loop();
80469 +int fpm_event_loop();
80470 +int fpm_event_add(int fd, struct event *ev, void (*callback)(int, short, void *), void *arg);
80471 +int fpm_event_del(struct event *ev);
80472 +void fpm_event_fire(struct event *ev);
80473 +int fpm_event_init_main();
80474 +
80475 +
80476 +#endif
80477 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm.h php-5.2.4.fpm/sapi/cgi/fpm/fpm.h
80478 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm.h        1970-01-01 03:00:00.000000000 +0300
80479 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm.h    2007-08-31 15:47:19.000000000 +0400
80480 @@ -0,0 +1,23 @@
80481 +
80482 +       /* $Id$ */
80483 +       /* (c) 2007 Andrei Nigmatulin */
80484 +
80485 +#ifndef FPM_H
80486 +#define FPM_H 1
80487 +
80488 +int fpm_run(int *max_requests);
80489 +int fpm_init(int argc, char **argv, char *config);
80490 +void fpm_request_start();
80491 +void fpm_request_finish();
80492 +
80493 +struct fpm_globals_s {
80494 +       int running_children;
80495 +       int error_log_fd;
80496 +       int listening_socket; /* for this child */
80497 +       int max_requests; /* for this child */
80498 +       int is_child;
80499 +};
80500 +
80501 +extern struct fpm_globals_s fpm_globals;
80502 +
80503 +#endif
80504 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_php.c php-5.2.4.fpm/sapi/cgi/fpm/fpm_php.c
80505 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_php.c    1970-01-01 03:00:00.000000000 +0300
80506 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_php.c        2007-08-31 15:47:19.000000000 +0400
80507 @@ -0,0 +1,98 @@
80508 +
80509 +       /* $Id$ */
80510 +       /* (c) 2007 Andrei Nigmatulin */
80511 +
80512 +#include "fpm_config.h"
80513 +
80514 +#ifdef HAVE_ALLOCA_H
80515 +#include <alloca.h>
80516 +#endif
80517 +#include <stdlib.h>
80518 +#include <string.h>
80519 +
80520 +#include "php.h"
80521 +#include "php_main.h"
80522 +#include "php_ini.h"
80523 +
80524 +#include "fastcgi.h"
80525 +
80526 +#include "fpm.h"
80527 +#include "fpm_php.h"
80528 +#include "fpm_cleanup.h"
80529 +#include "fpm_worker_pool.h"
80530 +
80531 +static int zend_ini_alter_master(char *name, int name_length, char *new_value, int new_value_length, int stage)
80532 +{
80533 +       zend_ini_entry *ini_entry;
80534 +       char *duplicate;
80535 +
80536 +       if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry) == FAILURE) {
80537 +               return FAILURE;
80538 +       }
80539 +
80540 +       duplicate = strdup(new_value);
80541 +
80542 +       if (!ini_entry->on_modify
80543 +               || ini_entry->on_modify(ini_entry, duplicate, new_value_length,
80544 +                       ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC) == SUCCESS) {
80545 +               ini_entry->value = duplicate;
80546 +               ini_entry->value_length = new_value_length;
80547 +       } else {
80548 +               free(duplicate);
80549 +       }
80550 +
80551 +       return SUCCESS;
80552 +}
80553 +
80554 +static int fpm_php_apply_defines(struct fpm_worker_pool_s *wp)
80555 +{
80556 +       struct key_value_s *kv = wp->config->php_defines;
80557 +
80558 +       while (kv) {
80559 +               int name_len = strlen(kv->key);
80560 +               int value_len = strlen(kv->value);
80561 +               char *name = alloca(name_len + 1);
80562 +               char *value = alloca(value_len + 1);
80563 +
80564 +               strcpy(name, kv->key);
80565 +               strcpy(value, kv->value);
80566 +
80567 +               zend_ini_alter_master(name, name_len + 1, value, value_len, PHP_INI_STAGE_ACTIVATE);
80568 +
80569 +               kv = kv->next;
80570 +       }
80571 +
80572 +       return 0;
80573 +}
80574 +
80575 +static int fpm_php_set_allowed_clients(struct fpm_worker_pool_s *wp)
80576 +{
80577 +       if (wp->listen_address_domain == FPM_AF_INET) {
80578 +               fcgi_set_allowed_clients(wp->config->allowed_clients);
80579 +       }
80580 +
80581 +       return 0;
80582 +}
80583 +
80584 +static void fpm_php_cleanup(int which, void *arg)
80585 +{
80586 +       php_module_shutdown(TSRMLS_C);
80587 +       sapi_shutdown();
80588 +}
80589 +
80590 +int fpm_php_init_main()
80591 +{
80592 +       fpm_cleanup_add(FPM_CLEANUP_PARENT, fpm_php_cleanup, 0);
80593 +
80594 +       return 0;
80595 +}
80596 +
80597 +int fpm_php_init_child(struct fpm_worker_pool_s *wp)
80598 +{
80599 +       if (0 > fpm_php_apply_defines(wp) ||
80600 +               0 > fpm_php_set_allowed_clients(wp)) {
80601 +               return -1;
80602 +       }
80603 +
80604 +       return 0;
80605 +}
80606 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_php.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_php.h
80607 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_php.h    1970-01-01 03:00:00.000000000 +0300
80608 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_php.h        2007-08-31 15:47:19.000000000 +0400
80609 @@ -0,0 +1,16 @@
80610 +
80611 +       /* $Id$ */
80612 +       /* (c) 2007 Andrei Nigmatulin */
80613 +
80614 +#ifndef FPM_PHP_H
80615 +#define FPM_PHP_H 1
80616 +
80617 +#include "fpm_worker_pool.h"
80618 +
80619 +#include "build-defs.h" /* for PHP_ defines */
80620 +
80621 +int fpm_php_init_child(struct fpm_worker_pool_s *wp);
80622 +int fpm_php_init_main();
80623 +
80624 +#endif
80625 +
80626 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_process_ctl.c php-5.2.4.fpm/sapi/cgi/fpm/fpm_process_ctl.c
80627 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_process_ctl.c    1970-01-01 03:00:00.000000000 +0300
80628 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_process_ctl.c        2007-08-31 15:47:19.000000000 +0400
80629 @@ -0,0 +1,271 @@
80630 +
80631 +       /* $Id$ */
80632 +       /* (c) 2007 Andrei Nigmatulin */
80633 +
80634 +#include "fpm_config.h"
80635 +
80636 +#include <sys/types.h>
80637 +#include <signal.h>
80638 +#include <unistd.h>
80639 +#include <stdlib.h>
80640 +
80641 +#include "fpm.h"
80642 +#include "fpm_children.h"
80643 +#include "fpm_signals.h"
80644 +#include "fpm_events.h"
80645 +#include "fpm_process_ctl.h"
80646 +#include "fpm_cleanup.h"
80647 +#include "fpm_worker_pool.h"
80648 +#include "zlog.h"
80649 +
80650 +
80651 +static int fpm_state = FPM_PCTL_STATE_NORMAL;
80652 +static int fpm_signal_sent = 0;
80653 +
80654 +
80655 +static const char *fpm_state_names[] = {
80656 +       [FPM_PCTL_STATE_NORMAL] = "normal",
80657 +       [FPM_PCTL_STATE_RELOADING] = "reloading",
80658 +       [FPM_PCTL_STATE_TERMINATING] = "terminating",
80659 +       [FPM_PCTL_STATE_FINISHING] = "finishing"
80660 +};
80661 +
80662 +static int saved_argc;
80663 +static char **saved_argv;
80664 +static int saved_argv_allocated, saved_argv_used;
80665 +
80666 +static void fpm_pctl_cleanup(int which, void *arg)
80667 +{
80668 +       int i;
80669 +
80670 +       if (which != FPM_CLEANUP_PARENT_EXEC) {
80671 +
80672 +               for (i = 0; i < saved_argv_used; i++) {
80673 +                       free(saved_argv[i]);
80674 +               }
80675 +
80676 +               free(saved_argv);
80677 +
80678 +       }
80679 +}
80680 +
80681 +static void fpm_pctl_exit()
80682 +{
80683 +       zlog(ZLOG_STUFF, ZLOG_NOTICE, "exiting, bye-bye!");
80684 +
80685 +       fpm_conf_unlink_pid();
80686 +
80687 +       fpm_cleanups_run(FPM_CLEANUP_PARENT_EXIT_MAIN);
80688 +
80689 +       exit(0);
80690 +}
80691 +
80692 +#define optional_arg(c) (saved_argc > c ? ", \"" : ""), (saved_argc > c ? saved_argv[c] : ""), (saved_argc > c ? "\"" : "")
80693 +
80694 +static void fpm_pctl_exec()
80695 +{
80696 +
80697 +       zlog(ZLOG_STUFF, ZLOG_NOTICE, "reloading: execvp(\"%s\", {\"%s\""
80698 +                       "%s%s%s" "%s%s%s" "%s%s%s" "%s%s%s" "%s%s%s"
80699 +                       "%s%s%s" "%s%s%s" "%s%s%s" "%s%s%s" "%s%s%s"
80700 +               "})",
80701 +               saved_argv[0], saved_argv[0],
80702 +               optional_arg(1),
80703 +               optional_arg(2),
80704 +               optional_arg(3),
80705 +               optional_arg(4),
80706 +               optional_arg(5),
80707 +               optional_arg(6),
80708 +               optional_arg(7),
80709 +               optional_arg(8),
80710 +               optional_arg(9),
80711 +               optional_arg(10)
80712 +       );
80713 +
80714 +       fpm_cleanups_run(FPM_CLEANUP_PARENT_EXEC);
80715 +
80716 +       execvp(saved_argv[0], saved_argv);
80717 +
80718 +       zlog(ZLOG_STUFF, ZLOG_SYSERROR, "execvp() failed");
80719 +
80720 +       fpm_event_exit_loop();
80721 +}
80722 +
80723 +static void fpm_pctl_action_last()
80724 +{
80725 +       switch (fpm_state) {
80726 +
80727 +               case FPM_PCTL_STATE_RELOADING :
80728 +
80729 +                       fpm_pctl_exec();
80730 +                       break;
80731 +
80732 +               case FPM_PCTL_STATE_FINISHING :
80733 +
80734 +               case FPM_PCTL_STATE_TERMINATING :
80735 +
80736 +                       fpm_pctl_exit();
80737 +                       break;
80738 +       }
80739 +}
80740 +
80741 +static void fpm_pctl_kill_all(int signo)
80742 +{
80743 +       struct fpm_worker_pool_s *wp;
80744 +       int alive_children = 0;
80745 +
80746 +       for (wp = fpm_worker_all_pools; wp; wp = wp->next) {
80747 +               struct fpm_child_s *child;
80748 +
80749 +               for (child = wp->children; child; child = child->next) {
80750 +
80751 +                       int res = kill(child->pid, signo);
80752 +
80753 +                       zlog(ZLOG_STUFF, ZLOG_NOTICE, "sending signal %d %s to child %d (pool %s)", signo,
80754 +                               fpm_signal_names[signo] ? fpm_signal_names[signo] : "",
80755 +                               (int) child->pid, child->wp->config->name);
80756 +
80757 +                       if (res == 0) ++alive_children;
80758 +               }
80759 +       }
80760 +
80761 +       if (alive_children) {
80762 +               zlog(ZLOG_STUFF, ZLOG_NOTICE, "%d %s still alive", alive_children, alive_children == 1 ? "child is" : "children are");
80763 +       }
80764 +}
80765 +
80766 +static void fpm_pctl_action_next()
80767 +{
80768 +       int sig, timeout;
80769 +
80770 +       if (!fpm_globals.running_children) fpm_pctl_action_last();
80771 +
80772 +       if (fpm_signal_sent == 0) {
80773 +               if (fpm_state == FPM_PCTL_STATE_TERMINATING) {
80774 +                       sig = SIGTERM;
80775 +               }
80776 +               else {
80777 +                       sig = SIGQUIT;
80778 +               }
80779 +               timeout = fpm_global_options.process_control_timeout;
80780 +       }
80781 +       else {
80782 +               if (fpm_signal_sent == SIGQUIT) {
80783 +                       sig = SIGTERM;
80784 +               }
80785 +               else {
80786 +                       sig = SIGKILL;
80787 +               }
80788 +               timeout = 1;
80789 +       }
80790 +
80791 +       fpm_pctl_kill_all(sig);
80792 +
80793 +       fpm_signal_sent = sig;
80794 +
80795 +       fpm_event_pctl_timeout_set(timeout);
80796 +}
80797 +
80798 +void fpm_pctl(int new_state, int action)
80799 +{
80800 +       switch (action) {
80801 +
80802 +               case FPM_PCTL_ACTION_SET :
80803 +
80804 +                       if (fpm_state == new_state) { /* already in progress - just ignore duplicate signal */
80805 +                               return;
80806 +                       }
80807 +
80808 +                       switch (fpm_state) { /* check which states can be overridden */
80809 +
80810 +                               case FPM_PCTL_STATE_NORMAL :
80811 +
80812 +                                       /* 'normal' can be overridden by any other state */
80813 +                                       break;
80814 +
80815 +                               case FPM_PCTL_STATE_RELOADING :
80816 +
80817 +                                       /* 'reloading' can be overridden by 'finishing' */
80818 +                                       if (new_state == FPM_PCTL_STATE_FINISHING) break;
80819 +
80820 +                               case FPM_PCTL_STATE_FINISHING :
80821 +
80822 +                                       /* 'reloading' and 'finishing' can be overridden by 'terminating' */
80823 +                                       if (new_state == FPM_PCTL_STATE_TERMINATING) break;
80824 +
80825 +                               case FPM_PCTL_STATE_TERMINATING :
80826 +
80827 +                                       /* nothing can override 'terminating' state */
80828 +                                       zlog(ZLOG_STUFF, ZLOG_NOTICE, "not switching to '%s' state, because already in '%s' state",
80829 +                                               fpm_state_names[new_state], fpm_state_names[fpm_state]);
80830 +
80831 +                                       return;
80832 +                       }
80833 +
80834 +                       fpm_signal_sent = 0;
80835 +                       fpm_state = new_state;
80836 +
80837 +                       zlog(ZLOG_STUFF, ZLOG_NOTICE, "switching to '%s' state", fpm_state_names[fpm_state]);
80838 +
80839 +                       /* fall down */
80840 +
80841 +               case FPM_PCTL_ACTION_TIMEOUT :
80842 +
80843 +                       fpm_pctl_action_next();
80844 +
80845 +                       break;
80846 +
80847 +               case FPM_PCTL_ACTION_LAST_CHILD_EXITED :
80848 +
80849 +                       fpm_pctl_action_last();
80850 +
80851 +                       break;
80852 +
80853 +       }
80854 +}
80855 +
80856 +int fpm_pctl_can_spawn_children()
80857 +{
80858 +       return fpm_state == FPM_PCTL_STATE_NORMAL;
80859 +}
80860 +
80861 +int fpm_pctl_child_exited()
80862 +{
80863 +       if (fpm_state == FPM_PCTL_STATE_NORMAL) return 0;
80864 +
80865 +       if (!fpm_globals.running_children) {
80866 +               fpm_pctl(FPM_PCTL_STATE_UNSPECIFIED, FPM_PCTL_ACTION_LAST_CHILD_EXITED);
80867 +       }
80868 +
80869 +       return 0;
80870 +}
80871 +
80872 +int fpm_pctl_init_main(int argc, char **argv)
80873 +{
80874 +       saved_argc = argc;
80875 +
80876 +       for ( ; *argv; ++argv) {
80877 +               if (saved_argv_used == saved_argv_allocated) {
80878 +                       int new_size = saved_argv_allocated + 10;
80879 +                       void *new_ptr = realloc(saved_argv, sizeof(char *) * new_size);
80880 +
80881 +                       if (!new_ptr) {
80882 +                               return -1;
80883 +                       }
80884 +
80885 +                       saved_argv = new_ptr;
80886 +                       saved_argv_allocated = new_size;
80887 +               }
80888 +
80889 +               saved_argv[saved_argv_used] = strdup(*argv);
80890 +
80891 +               ++saved_argv_used;
80892 +       }
80893 +
80894 +       saved_argv[saved_argv_used] = 0;
80895 +
80896 +       fpm_cleanup_add(FPM_CLEANUP_ALL, fpm_pctl_cleanup, 0);
80897 +
80898 +       return 0;
80899 +}
80900 +
80901 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_process_ctl.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_process_ctl.h
80902 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_process_ctl.h    1970-01-01 03:00:00.000000000 +0300
80903 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_process_ctl.h        2007-08-31 15:47:19.000000000 +0400
80904 @@ -0,0 +1,30 @@
80905 +
80906 +       /* $Id$ */
80907 +       /* (c) 2007 Andrei Nigmatulin */
80908 +
80909 +#ifndef FPM_PROCESS_CTL_H
80910 +#define FPM_PROCESS_CTL_H 1
80911 +
80912 +void fpm_pctl(int new_state, int action);
80913 +int fpm_pctl_can_spawn_children();
80914 +int fpm_pctl_child_exited();
80915 +int fpm_pctl_init_main(int argc, char **argv);
80916 +
80917 +
80918 +enum {
80919 +       FPM_PCTL_STATE_UNSPECIFIED,
80920 +       FPM_PCTL_STATE_NORMAL,
80921 +       FPM_PCTL_STATE_RELOADING,
80922 +       FPM_PCTL_STATE_TERMINATING,
80923 +       FPM_PCTL_STATE_FINISHING
80924 +};
80925 +
80926 +enum {
80927 +       FPM_PCTL_ACTION_SET,
80928 +       FPM_PCTL_ACTION_TIMEOUT,
80929 +       FPM_PCTL_ACTION_LAST_CHILD_EXITED
80930 +};
80931 +
80932 +
80933 +#endif
80934 +
80935 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_shm.c php-5.2.4.fpm/sapi/cgi/fpm/fpm_shm.c
80936 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_shm.c    1970-01-01 03:00:00.000000000 +0300
80937 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_shm.c        2007-08-31 15:47:19.000000000 +0400
80938 @@ -0,0 +1,4 @@
80939 +
80940 +       /* $Id$ */
80941 +       /* (c) 2007 Andrei Nigmatulin */
80942 +
80943 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_shm.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_shm.h
80944 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_shm.h    1970-01-01 03:00:00.000000000 +0300
80945 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_shm.h        2007-08-31 15:47:19.000000000 +0400
80946 @@ -0,0 +1,11 @@
80947 +
80948 +       /* $Id$ */
80949 +       /* (c) 2007 Andrei Nigmatulin */
80950 +
80951 +#ifndef FPM_SHM_H
80952 +#define FPM_SHM_H 1
80953 +
80954 +
80955 +
80956 +#endif
80957 +
80958 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_signals.c php-5.2.4.fpm/sapi/cgi/fpm/fpm_signals.c
80959 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_signals.c        1970-01-01 03:00:00.000000000 +0300
80960 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_signals.c    2007-08-31 15:47:19.000000000 +0400
80961 @@ -0,0 +1,235 @@
80962 +
80963 +       /* $Id$ */
80964 +       /* (c) 2007 Andrei Nigmatulin */
80965 +
80966 +#include "fpm_config.h"
80967 +
80968 +#include <signal.h>
80969 +#include <stdio.h>
80970 +#include <sys/types.h>
80971 +#include <sys/socket.h>
80972 +#include <stdlib.h>
80973 +#include <string.h>
80974 +#include <fcntl.h>
80975 +#include <unistd.h>
80976 +#include <errno.h>
80977 +
80978 +#include "fpm_signals.h"
80979 +#include "fpm_sockets.h"
80980 +#include "zlog.h"
80981 +
80982 +static int sp[2];
80983 +
80984 +static int signals_overflowed;
80985 +
80986 +const char *fpm_signal_names[NSIG + 1] = {
80987 +#ifdef SIGHUP
80988 +       [SIGHUP]                = "SIGHUP",
80989 +#endif
80990 +#ifdef SIGINT
80991 +       [SIGINT]                = "SIGINT",
80992 +#endif
80993 +#ifdef SIGQUIT
80994 +       [SIGQUIT]               = "SIGQUIT",
80995 +#endif
80996 +#ifdef SIGILL
80997 +       [SIGILL]                = "SIGILL",
80998 +#endif
80999 +#ifdef SIGTRAP
81000 +       [SIGTRAP]               = "SIGTRAP",
81001 +#endif
81002 +#ifdef SIGABRT
81003 +       [SIGABRT]               = "SIGABRT",
81004 +#endif
81005 +#ifdef SIGEMT
81006 +       [SIGEMT]                = "SIGEMT",
81007 +#endif
81008 +#ifdef SIGBUS
81009 +       [SIGBUS]                = "SIGBUS",
81010 +#endif
81011 +#ifdef SIGFPE
81012 +       [SIGFPE]                = "SIGFPE",
81013 +#endif
81014 +#ifdef SIGKILL
81015 +       [SIGKILL]               = "SIGKILL",
81016 +#endif
81017 +#ifdef SIGUSR1
81018 +       [SIGUSR1]               = "SIGUSR1",
81019 +#endif
81020 +#ifdef SIGSEGV
81021 +       [SIGSEGV]               = "SIGSEGV",
81022 +#endif
81023 +#ifdef SIGUSR2
81024 +       [SIGUSR2]               = "SIGUSR2",
81025 +#endif
81026 +#ifdef SIGPIPE
81027 +       [SIGPIPE]               = "SIGPIPE",
81028 +#endif
81029 +#ifdef SIGALRM
81030 +       [SIGALRM]               = "SIGALRM",
81031 +#endif
81032 +#ifdef SIGTERM
81033 +       [SIGTERM]               = "SIGTERM",
81034 +#endif
81035 +#ifdef SIGCHLD
81036 +       [SIGCHLD]               = "SIGCHLD",
81037 +#endif
81038 +#ifdef SIGCONT
81039 +       [SIGCONT]               = "SIGCONT",
81040 +#endif
81041 +#ifdef SIGSTOP
81042 +       [SIGSTOP]               = "SIGSTOP",
81043 +#endif
81044 +#ifdef SIGTSTP
81045 +       [SIGTSTP]               = "SIGTSTP",
81046 +#endif
81047 +#ifdef SIGTTIN
81048 +       [SIGTTIN]               = "SIGTTIN",
81049 +#endif
81050 +#ifdef SIGTTOU
81051 +       [SIGTTOU]               = "SIGTTOU",
81052 +#endif
81053 +#ifdef SIGURG
81054 +       [SIGURG]                = "SIGURG",
81055 +#endif
81056 +#ifdef SIGXCPU
81057 +       [SIGXCPU]               = "SIGXCPU",
81058 +#endif
81059 +#ifdef SIGXFSZ
81060 +       [SIGXFSZ]               = "SIGXFSZ",
81061 +#endif
81062 +#ifdef SIGVTALRM
81063 +       [SIGVTALRM]     = "SIGVTALRM",
81064 +#endif
81065 +#ifdef SIGPROF
81066 +       [SIGPROF]               = "SIGPROF",
81067 +#endif
81068 +#ifdef SIGWINCH
81069 +       [SIGWINCH]              = "SIGWINCH",
81070 +#endif
81071 +#ifdef SIGINFO
81072 +       [SIGINFO]               = "SIGINFO",
81073 +#endif
81074 +#ifdef SIGIO
81075 +       [SIGIO]                 = "SIGIO",
81076 +#endif
81077 +#ifdef SIGPWR
81078 +       [SIGPWR]                = "SIGPWR",
81079 +#endif
81080 +#ifdef SIGSYS
81081 +       [SIGSYS]                = "SIGSYS",
81082 +#endif
81083 +#ifdef SIGWAITING
81084 +       [SIGWAITING]    = "SIGWAITING",
81085 +#endif
81086 +#ifdef SIGLWP
81087 +       [SIGLWP]                = "SIGLWP",
81088 +#endif
81089 +#ifdef SIGFREEZE
81090 +       [SIGFREEZE]     = "SIGFREEZE",
81091 +#endif
81092 +#ifdef SIGTHAW
81093 +       [SIGTHAW]               = "SIGTHAW",
81094 +#endif
81095 +#ifdef SIGCANCEL
81096 +       [SIGCANCEL]     = "SIGCANCEL",
81097 +#endif
81098 +#ifdef SIGLOST
81099 +       [SIGLOST]               = "SIGLOST",
81100 +#endif
81101 +};
81102 +
81103 +static void sig_soft_quit(int signo)
81104 +{
81105 +       /* closing fastcgi listening socket will force fcgi_accept() exit immediately */
81106 +       close(0);
81107 +       socket(AF_UNIX, SOCK_STREAM, 0);
81108 +}
81109 +
81110 +static void sig_handler(int signo)
81111 +{
81112 +       static const char sig_chars[32] = {
81113 +               [SIGTERM] = 'T',
81114 +               [SIGINT]  = 'I',
81115 +               [SIGUSR2] = '2',
81116 +               [SIGQUIT] = 'Q',
81117 +               [SIGCHLD] = 'C'
81118 +       };
81119 +       char s = sig_chars[signo];
81120 +       int saved_errno = errno;
81121 +
81122 +       if (0 > write(sp[1], &s, sizeof(s))) {
81123 +               signals_overflowed = 1;
81124 +       }
81125 +
81126 +       errno = saved_errno;
81127 +}
81128 +
81129 +int fpm_signals_init_main()
81130 +{
81131 +       struct sigaction act;
81132 +
81133 +       if (0 > socketpair(AF_UNIX, SOCK_STREAM, 0, sp)) {
81134 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "socketpair() failed");
81135 +               return -1;
81136 +       }
81137 +
81138 +       if (0 > fd_set_blocked(sp[0], 0) || 0 > fd_set_blocked(sp[1], 0)) {
81139 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "fd_set_blocked() failed");
81140 +               return -1;
81141 +       }
81142 +
81143 +       if (0 > fcntl(sp[0], F_SETFD, FD_CLOEXEC) || 0 > fcntl(sp[1], F_SETFD, FD_CLOEXEC)) {
81144 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "fcntl(F_SETFD, FD_CLOEXEC) failed");
81145 +               return -1;
81146 +       }
81147 +
81148 +       memset(&act, 0, sizeof(act));
81149 +       act.sa_handler = &sig_handler;
81150 +       sigfillset(&act.sa_mask);
81151 +
81152 +       if (0 > sigaction(SIGTERM,  &act, 0) ||
81153 +               0 > sigaction(SIGINT,   &act, 0) ||
81154 +               0 > sigaction(SIGUSR2,  &act, 0) ||
81155 +               0 > sigaction(SIGCHLD,  &act, 0) ||
81156 +               0 > sigaction(SIGQUIT,  &act, 0)) {
81157 +
81158 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "sigaction() failed");
81159 +               return -1;
81160 +       }
81161 +
81162 +       return 0;
81163 +}
81164 +
81165 +int fpm_signals_init_child()
81166 +{
81167 +       struct sigaction act, act_dfl;
81168 +
81169 +       memset(&act, 0, sizeof(act));
81170 +       memset(&act_dfl, 0, sizeof(act_dfl));
81171 +
81172 +       act.sa_handler = sig_soft_quit;
81173 +       act.sa_flags |= SA_RESTART;
81174 +
81175 +       act_dfl.sa_handler = SIG_DFL;
81176 +
81177 +       close(sp[0]);
81178 +       close(sp[1]);
81179 +
81180 +       if (0 > sigaction(SIGTERM,  &act_dfl,  0) ||
81181 +               0 > sigaction(SIGINT,   &act_dfl,  0) ||
81182 +               0 > sigaction(SIGUSR2,  &act_dfl,  0) ||
81183 +               0 > sigaction(SIGCHLD,  &act_dfl,  0) ||
81184 +               0 > sigaction(SIGQUIT,  &act,      0)) {
81185 +
81186 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "sigaction() failed");
81187 +               return -1;
81188 +       }
81189 +
81190 +       return 0;
81191 +}
81192 +
81193 +int fpm_signals_get_fd()
81194 +{
81195 +       return sp[0];
81196 +}
81197 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_signals.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_signals.h
81198 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_signals.h        1970-01-01 03:00:00.000000000 +0300
81199 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_signals.h    2007-08-31 15:47:19.000000000 +0400
81200 @@ -0,0 +1,16 @@
81201 +
81202 +       /* $Id$ */
81203 +       /* (c) 2007 Andrei Nigmatulin */
81204 +
81205 +#ifndef FPM_SIGNALS_H
81206 +#define FPM_SIGNALS_H 1
81207 +
81208 +#include <signal.h>
81209 +
81210 +int fpm_signals_init_main();
81211 +int fpm_signals_init_child();
81212 +int fpm_signals_get_fd();
81213 +
81214 +extern const char *fpm_signal_names[NSIG + 1];
81215 +
81216 +#endif
81217 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_sockets.c php-5.2.4.fpm/sapi/cgi/fpm/fpm_sockets.c
81218 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_sockets.c        1970-01-01 03:00:00.000000000 +0300
81219 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_sockets.c    2007-08-31 15:47:19.000000000 +0400
81220 @@ -0,0 +1,432 @@
81221 +
81222 +       /* $Id$ */
81223 +       /* (c) 2007 Andrei Nigmatulin */
81224 +
81225 +#include "fpm_config.h"
81226 +
81227 +#ifdef HAVE_ALLOCA_H
81228 +#include <alloca.h>
81229 +#endif
81230 +#include <sys/types.h>
81231 +#include <sys/stat.h> /* for chmod(2) */
81232 +#include <sys/socket.h>
81233 +#include <netinet/in.h>
81234 +#include <arpa/inet.h>
81235 +#include <sys/un.h>
81236 +#include <netdb.h>
81237 +#include <stdio.h>
81238 +#include <stdlib.h>
81239 +#include <string.h>
81240 +#include <errno.h>
81241 +#include <unistd.h>
81242 +
81243 +#include "zlog.h"
81244 +#include "fpm_sockets.h"
81245 +#include "fpm_worker_pool.h"
81246 +#include "fpm_unix.h"
81247 +#include "fpm_env.h"
81248 +#include "fpm_cleanup.h"
81249 +
81250 +struct fpm_listening_socket_s {
81251 +       int refcount;
81252 +       int sock;
81253 +       int type;
81254 +       char *key;
81255 +};
81256 +
81257 +struct fpm_listening_socket_s *sockets_list;
81258 +static int sockets_list_used, sockets_list_allocated;
81259 +
81260 +static int fpm_sockets_resolve_af_inet(char *node, char *service, struct sockaddr_in *addr)
81261 +{
81262 +       struct addrinfo *res;
81263 +       struct addrinfo hints;
81264 +       int ret;
81265 +
81266 +       memset(&hints, 0, sizeof(hints));
81267 +
81268 +       hints.ai_family = AF_INET;
81269 +
81270 +       ret = getaddrinfo(node, service, &hints, &res);
81271 +
81272 +       if (ret != 0) {
81273 +               zlog(ZLOG_STUFF, ZLOG_ERROR, "can't resolve hostname '%s%s%s': getaddrinfo said: %s%s%s\n",
81274 +                                       node, service ? ":" : "", service ? service : "",
81275 +                                       gai_strerror(ret), ret == EAI_SYSTEM ? ", system error: " : "", ret == EAI_SYSTEM ? strerror(errno) : "");
81276 +               return -1;
81277 +       }
81278 +
81279 +       *addr = *(struct sockaddr_in *) res->ai_addr;
81280 +
81281 +       freeaddrinfo(res);
81282 +
81283 +       return 0;
81284 +}
81285 +
81286 +enum { FPM_GET_USE_SOCKET = 1, FPM_STORE_SOCKET = 2, FPM_STORE_USE_SOCKET = 3 };
81287 +
81288 +static void fpm_sockets_cleanup(int which, void *arg)
81289 +{
81290 +       int i;
81291 +       char *env_value = 0;
81292 +       int p = 0;
81293 +
81294 +       for (i = 0; i < sockets_list_used; i++) {
81295 +               struct fpm_listening_socket_s *ls = &sockets_list[i];
81296 +
81297 +               if (which != FPM_CLEANUP_PARENT_EXEC) {
81298 +
81299 +                       close(ls->sock);
81300 +
81301 +               }
81302 +               else { /* on PARENT EXEC we want socket fds to be inherited through environment variable */
81303 +                       char fd[32];
81304 +                       sprintf(fd, "%d", ls->sock);
81305 +                       env_value = realloc(env_value, p + (p ? 1 : 0) + strlen(ls->key) + 1 + strlen(fd) + 1);
81306 +                       p += sprintf(env_value + p, "%s%s=%s", p ? "," : "", ls->key, fd);
81307 +               }
81308 +
81309 +               if (which == FPM_CLEANUP_PARENT_EXIT_MAIN) {
81310 +
81311 +                       if (ls->type == FPM_AF_UNIX) {
81312 +                               unlink(ls->key);
81313 +                       }
81314 +
81315 +               }
81316 +
81317 +               free(ls->key);
81318 +       }
81319 +
81320 +       if (env_value) {
81321 +               setenv("FPM_SOCKETS", env_value, 1);
81322 +       }
81323 +
81324 +       free(sockets_list);
81325 +
81326 +       sockets_list_used = sockets_list_allocated = 0;
81327 +       sockets_list = 0;
81328 +}
81329 +
81330 +static int fpm_sockets_hash_op(int sock, struct sockaddr *sa, char *key, int type, int op)
81331 +{
81332 +
81333 +       if (key == NULL) {
81334 +
81335 +               switch (type) {
81336 +
81337 +                       case FPM_AF_INET : {
81338 +                               struct sockaddr_in *sa_in = (struct sockaddr_in *) sa;
81339 +
81340 +                               key = alloca(sizeof("xxx.xxx.xxx.xxx:ppppp"));
81341 +
81342 +                               sprintf(key, "%u.%u.%u.%u:%u", IPQUAD(&sa_in->sin_addr), ntohs(sa_in->sin_port));
81343 +
81344 +                               break;
81345 +                       }
81346 +
81347 +                       case FPM_AF_UNIX : {
81348 +                               struct sockaddr_un *sa_un = (struct sockaddr_un *) sa;
81349 +
81350 +                               key = alloca(strlen(sa_un->sun_path) + 1);
81351 +
81352 +                               strcpy(key, sa_un->sun_path);
81353 +
81354 +                               break;
81355 +                       }
81356 +
81357 +                       default :
81358 +
81359 +                               return -1;
81360 +               }
81361 +
81362 +       }
81363 +
81364 +       switch (op) {
81365 +
81366 +               case FPM_GET_USE_SOCKET :
81367 +               {
81368 +
81369 +                       int i;
81370 +
81371 +                       for (i = 0; i < sockets_list_used; i++) {
81372 +                               struct fpm_listening_socket_s *ls = &sockets_list[i];
81373 +
81374 +                               if (!strcmp(ls->key, key)) {
81375 +                                       ++ls->refcount;
81376 +                                       return ls->sock;
81377 +                               }
81378 +                       }
81379 +
81380 +                       break;
81381 +               }
81382 +
81383 +               case FPM_STORE_SOCKET :                 /* inherited socket */
81384 +               case FPM_STORE_USE_SOCKET :             /* just created */
81385 +               {
81386 +
81387 +                       struct fpm_listening_socket_s *ls;
81388 +
81389 +                       if (sockets_list_used == sockets_list_allocated) {
81390 +                               int new_size = sockets_list_allocated + 10;
81391 +                               void *new_ptr = realloc(sockets_list, sizeof(struct fpm_listening_socket_s) * new_size);
81392 +
81393 +                               if (!new_ptr) {
81394 +                                       break;
81395 +                               }
81396 +
81397 +                               sockets_list = new_ptr;
81398 +                               sockets_list_allocated = new_size;
81399 +                       }
81400 +
81401 +                       ls = &sockets_list[sockets_list_used];
81402 +
81403 +                       if (op == FPM_STORE_SOCKET) {
81404 +                               ls->refcount = 0;
81405 +                       }
81406 +                       else {
81407 +                               ls->refcount = 1;
81408 +                       }
81409 +                       ls->type = type;
81410 +                       ls->sock = sock;
81411 +                       ls->key = strdup(key);
81412 +
81413 +                       ++sockets_list_used;
81414 +
81415 +                       return 0;
81416 +
81417 +               }
81418 +       }
81419 +
81420 +       return -1;
81421 +
81422 +}
81423 +
81424 +static int fpm_sockets_new_listening_socket(struct fpm_worker_pool_s *wp, struct sockaddr *sa, int socklen)
81425 +{
81426 +       int backlog = -1;
81427 +       int flags = 1;
81428 +       int sock;
81429 +       mode_t saved_umask;
81430 +
81431 +       /* we have custom backlog value */
81432 +       if (wp->config->listen_options) {
81433 +               backlog = wp->config->listen_options->backlog;
81434 +       }
81435 +
81436 +       sock = socket(sa->sa_family, SOCK_STREAM, 0);
81437 +
81438 +       if (0 > sock) {
81439 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "socket() failed");
81440 +               return -1;
81441 +       }
81442 +
81443 +       setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &flags, sizeof(flags));
81444 +
81445 +       if (wp->listen_address_domain == FPM_AF_UNIX) {
81446 +               unlink( ((struct sockaddr_un *) sa)->sun_path);
81447 +       }
81448 +
81449 +       saved_umask = umask(0777 ^ wp->socket_mode);
81450 +
81451 +       if (0 > bind(sock, sa, socklen)) {
81452 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "bind() for address '%s' failed", wp->config->listen_address);
81453 +               return -1;
81454 +       }
81455 +
81456 +       if (wp->listen_address_domain == FPM_AF_UNIX) {
81457 +
81458 +               char *path = ((struct sockaddr_un *) sa)->sun_path;
81459 +
81460 +               if (wp->socket_uid != -1 || wp->socket_gid != -1) {
81461 +
81462 +                       if (0 > chown(path, wp->socket_uid, wp->socket_gid)) {
81463 +                               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "chown() for address '%s' failed", wp->config->listen_address);
81464 +                               return -1;
81465 +                       }
81466 +
81467 +               }
81468 +
81469 +       }
81470 +
81471 +       umask(saved_umask);
81472 +
81473 +       if (0 > listen(sock, backlog)) {
81474 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "listen() for address '%s' failed", wp->config->listen_address);
81475 +               return -1;
81476 +       }
81477 +
81478 +       return sock;
81479 +}
81480 +
81481 +static int fpm_sockets_get_listening_socket(struct fpm_worker_pool_s *wp, struct sockaddr *sa, int socklen)
81482 +{
81483 +       int sock;
81484 +
81485 +       sock = fpm_sockets_hash_op(0, sa, 0, wp->listen_address_domain, FPM_GET_USE_SOCKET);
81486 +
81487 +       if (sock >= 0) return sock;
81488 +
81489 +       sock = fpm_sockets_new_listening_socket(wp, sa, socklen);
81490 +
81491 +       fpm_sockets_hash_op(sock, sa, 0, wp->listen_address_domain, FPM_STORE_USE_SOCKET);
81492 +
81493 +       return sock;
81494 +}
81495 +
81496 +enum fpm_address_domain fpm_sockets_domain_from_address(char *address)
81497 +{
81498 +       if (strchr(address, ':')) return FPM_AF_INET;
81499 +
81500 +       if (strlen(address) == strspn(address, "0123456789")) return FPM_AF_INET;
81501 +
81502 +       return FPM_AF_UNIX;
81503 +}
81504 +
81505 +static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp)
81506 +{
81507 +       struct sockaddr_in sa_in;
81508 +       char *dup_address = strdup(wp->config->listen_address);
81509 +       char *port_str = strchr(dup_address, ':');
81510 +       char *addr = NULL;
81511 +       int port = 0;
81512 +
81513 +       if (port_str) { /* this is host:port pair */
81514 +               *port_str++ = '\0';
81515 +               port = atoi(port_str);
81516 +               addr = dup_address;
81517 +       }
81518 +       else if (strlen(dup_address) == strspn(dup_address, "0123456789")) { /* this is port */
81519 +               port = atoi(dup_address);
81520 +               port_str = dup_address;
81521 +       }
81522 +
81523 +       if (port == 0) {
81524 +               zlog(ZLOG_STUFF, ZLOG_ERROR, "invalid port value '%s'", port_str);
81525 +               return -1;
81526 +       }
81527 +
81528 +       memset(&sa_in, 0, sizeof(sa_in));
81529 +
81530 +       if (addr) {
81531 +
81532 +               sa_in.sin_addr.s_addr = inet_addr(addr);
81533 +
81534 +               if (sa_in.sin_addr.s_addr == INADDR_NONE) { /* do resolve */
81535 +                       if (0 > fpm_sockets_resolve_af_inet(addr, NULL, &sa_in)) {
81536 +                               return -1;
81537 +                       }
81538 +                       zlog(ZLOG_STUFF, ZLOG_NOTICE, "address '%s' resolved as %u.%u.%u.%u", addr, IPQUAD(&sa_in.sin_addr));
81539 +               }
81540 +       }
81541 +       else {
81542 +
81543 +               sa_in.sin_addr.s_addr = htonl(INADDR_ANY);
81544 +
81545 +       }
81546 +
81547 +       sa_in.sin_family = AF_INET;
81548 +       sa_in.sin_port = htons(port);
81549 +
81550 +       free(dup_address);
81551 +
81552 +       return fpm_sockets_get_listening_socket(wp, (struct sockaddr *) &sa_in, sizeof(struct sockaddr_in));
81553 +}
81554 +
81555 +static int fpm_socket_af_unix_listening_socket(struct fpm_worker_pool_s *wp)
81556 +{
81557 +       struct sockaddr_un sa_un;
81558 +
81559 +       memset(&sa_un, 0, sizeof(sa_un));
81560 +
81561 +       strncpy(sa_un.sun_path, wp->config->listen_address, sizeof(sa_un.sun_path) - 1);
81562 +       sa_un.sun_family = AF_UNIX;
81563 +       sa_un.sun_path[sizeof(sa_un.sun_path) - 1] = '\0';
81564 +
81565 +       return fpm_sockets_get_listening_socket(wp, (struct sockaddr *) &sa_un, sizeof(struct sockaddr_un));
81566 +}
81567 +
81568 +int fpm_sockets_init_main()
81569 +{
81570 +       int i;
81571 +       struct fpm_worker_pool_s *wp;
81572 +       char *inherited = getenv("FPM_SOCKETS");
81573 +
81574 +       /* import inherited sockets */
81575 +       while (inherited && *inherited) {
81576 +               char *comma = strchr(inherited, ',');
81577 +               int type, fd_no;
81578 +               char *eq;
81579 +
81580 +               if (comma) *comma = '\0';
81581 +
81582 +               eq = strchr(inherited, '=');
81583 +
81584 +               if (eq) {
81585 +                       *eq = '\0';
81586 +
81587 +                       fd_no = atoi(eq + 1);
81588 +
81589 +                       type = fpm_sockets_domain_from_address(inherited);
81590 +
81591 +                       zlog(ZLOG_STUFF, ZLOG_NOTICE, "using inherited socket fd=%d, \"%s\"", fd_no, inherited);
81592 +
81593 +                       fpm_sockets_hash_op(fd_no, 0, inherited, type, FPM_STORE_SOCKET);
81594 +               }
81595 +
81596 +               if (comma) inherited = comma + 1;
81597 +               else inherited = 0;
81598 +       }
81599 +
81600 +       for (wp = fpm_worker_all_pools; wp; wp = wp->next) {
81601 +
81602 +               if (!wp->is_template) {
81603 +
81604 +                       switch (wp->listen_address_domain) {
81605 +
81606 +                               case FPM_AF_INET :
81607 +
81608 +                                       wp->listening_socket = fpm_socket_af_inet_listening_socket(wp);
81609 +                                       break;
81610 +
81611 +                               case FPM_AF_UNIX :
81612 +
81613 +                                       if (0 > fpm_unix_resolve_socket_premissions(wp)) {
81614 +                                               return -1;
81615 +                                       }
81616 +
81617 +                                       wp->listening_socket = fpm_socket_af_unix_listening_socket(wp);
81618 +                                       break;
81619 +
81620 +                       }
81621 +
81622 +                       if (wp->listening_socket == -1) {
81623 +                               return -1;
81624 +                       }
81625 +               }
81626 +
81627 +       }
81628 +
81629 +       /* close unused sockets that was inherited */
81630 +       for (i = 0; i < sockets_list_used; ) {
81631 +               struct fpm_listening_socket_s *ls = &sockets_list[i];
81632 +
81633 +               if (ls->refcount == 0) {
81634 +                       close(ls->sock);
81635 +                       if (ls->type == FPM_AF_UNIX) {
81636 +                               unlink(ls->key);
81637 +                       }
81638 +                       free(ls->key);
81639 +                       if (i < sockets_list_used - 1) {
81640 +                               *ls = sockets_list[sockets_list_used - 1];
81641 +                       }
81642 +                       --sockets_list_used;
81643 +               }
81644 +               else {
81645 +                       ++i;
81646 +               }
81647 +       }
81648 +
81649 +       fpm_cleanup_add(FPM_CLEANUP_ALL, fpm_sockets_cleanup, 0);
81650 +
81651 +       return 0;
81652 +}
81653 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_sockets.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_sockets.h
81654 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_sockets.h        1970-01-01 03:00:00.000000000 +0300
81655 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_sockets.h    2007-08-31 15:47:19.000000000 +0400
81656 @@ -0,0 +1,37 @@
81657 +
81658 +       /* $Id$ */
81659 +       /* (c) 2007 Andrei Nigmatulin */
81660 +
81661 +#ifndef FPM_MISC_H
81662 +#define FPM_MISC_H 1
81663 +
81664 +#include <unistd.h>
81665 +#include <fcntl.h>
81666 +
81667 +#include "fpm_worker_pool.h"
81668 +
81669 +enum fpm_address_domain fpm_sockets_domain_from_address(char *addr);
81670 +int fpm_sockets_init_main();
81671 +
81672 +
81673 +static inline int fd_set_blocked(int fd, int blocked)
81674 +{
81675 +       int flags = fcntl(fd, F_GETFL);
81676 +
81677 +       if (flags < 0) return -1;
81678 +
81679 +       if (blocked)
81680 +               flags &= ~O_NONBLOCK;
81681 +       else
81682 +               flags |= O_NONBLOCK;
81683 +
81684 +       return fcntl(fd, F_SETFL, flags);
81685 +}
81686 +
81687 +#define IPQUAD(sin_addr) \
81688 +                       ((unsigned char *) &(sin_addr)->s_addr)[0], \
81689 +                       ((unsigned char *) &(sin_addr)->s_addr)[1], \
81690 +                       ((unsigned char *) &(sin_addr)->s_addr)[2], \
81691 +                       ((unsigned char *) &(sin_addr)->s_addr)[3]
81692 +
81693 +#endif
81694 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_stdio.c php-5.2.4.fpm/sapi/cgi/fpm/fpm_stdio.c
81695 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_stdio.c  1970-01-01 03:00:00.000000000 +0300
81696 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_stdio.c      2007-08-31 15:47:19.000000000 +0400
81697 @@ -0,0 +1,220 @@
81698 +
81699 +       /* $Id$ */
81700 +       /* (c) 2007 Andrei Nigmatulin */
81701 +
81702 +#include "fpm_config.h"
81703 +
81704 +#include <sys/types.h>
81705 +#include <sys/stat.h>
81706 +#include <string.h>
81707 +#include <fcntl.h>
81708 +#include <unistd.h>
81709 +#include <errno.h>
81710 +
81711 +#include "fpm.h"
81712 +#include "fpm_children.h"
81713 +#include "fpm_events.h"
81714 +#include "fpm_sockets.h"
81715 +#include "fpm_stdio.h"
81716 +#include "zlog.h"
81717 +
81718 +int fpm_stdio_init_main()
81719 +{
81720 +       int fd = open("/dev/null", 0);
81721 +
81722 +       if (0 > fd) {
81723 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "open(\"/dev/zero\") failed");
81724 +               return -1;
81725 +       }
81726 +
81727 +       dup2(fd, STDIN_FILENO);
81728 +       dup2(fd, STDOUT_FILENO);
81729 +       close(fd);
81730 +
81731 +       return 0;
81732 +}
81733 +
81734 +int fpm_stdio_init_final()
81735 +{
81736 +       if (fpm_global_options.daemonize) {
81737 +
81738 +               if (fpm_globals.error_log_fd != STDERR_FILENO) {
81739 +                       dup2(fpm_globals.error_log_fd, STDERR_FILENO);
81740 +               }
81741 +
81742 +               zlog_set_fd(fpm_globals.error_log_fd);
81743 +       }
81744 +
81745 +       return 0;
81746 +}
81747 +
81748 +int fpm_stdio_init_child(struct fpm_worker_pool_s *wp)
81749 +{
81750 +       if (wp->config->catch_workers_output) {
81751 +               dup2(wp->fd_stdout[1], STDOUT_FILENO);
81752 +               dup2(wp->fd_stderr[1], STDERR_FILENO);
81753 +               close(wp->fd_stdout[0]); close(wp->fd_stdout[1]);
81754 +               close(wp->fd_stderr[0]); close(wp->fd_stderr[1]);
81755 +       }
81756 +       else {
81757 +               /* stdout of parent is always /dev/null */
81758 +               dup2(STDOUT_FILENO, STDERR_FILENO);
81759 +       }
81760 +       
81761 +       close(fpm_globals.error_log_fd);
81762 +       fpm_globals.error_log_fd = -1;
81763 +
81764 +       if (wp->listening_socket != STDIN_FILENO) {
81765 +               dup2(wp->listening_socket, STDIN_FILENO);
81766 +       }
81767 +
81768 +       return 0;
81769 +}
81770 +
81771 +int fpm_stdio_child_prepare_pipes(struct fpm_worker_pool_s *wp)
81772 +{
81773 +       if (!wp->config->catch_workers_output) { /* not required */
81774 +               return 0;
81775 +       }
81776 +
81777 +       if (0 > pipe(wp->fd_stdout) || 0 > pipe(wp->fd_stderr)) {
81778 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "pipe() failed");
81779 +               return -1;
81780 +       }
81781 +
81782 +       if (0 > fd_set_blocked(wp->fd_stdout[0], 0) || 0 > fd_set_blocked(wp->fd_stderr[0], 0)) {
81783 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "fd_set_blocked() failed");
81784 +               close(wp->fd_stdout[0]); close(wp->fd_stdout[1]);
81785 +               close(wp->fd_stderr[0]); close(wp->fd_stderr[1]);
81786 +               return -1;
81787 +       }
81788 +
81789 +       return 0;
81790 +}
81791 +
81792 +static void fpm_stdio_child_said(int fd, short which, void *arg)
81793 +{
81794 +       static const int max_buf_size = 1024;
81795 +       char buf[max_buf_size];
81796 +       struct fpm_child_s *child = arg;
81797 +       int is_stdout = fd == child->fd_stdout;
81798 +       struct event *ev = is_stdout ? &child->ev_stdout : &child->ev_stderr;
81799 +       int fifo_in = 1, fifo_out = 1;
81800 +       int is_last_message = 0;
81801 +       int in_buf = 0;
81802 +       int res;
81803 +
81804 +#if 0
81805 +       zlog(ZLOG_STUFF, ZLOG_DEBUG, "child %d said %s", (int) child->pid, is_stdout ? "stdout" : "stderr");
81806 +#endif
81807 +
81808 +       while (fifo_in || fifo_out) {
81809 +
81810 +               if (fifo_in) {
81811 +
81812 +                       res = read(fd, buf + in_buf, max_buf_size - 1 - in_buf);
81813 +
81814 +                       if (res <= 0) { /* no data */
81815 +                               fifo_in = 0;
81816 +
81817 +                               if (res < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) {
81818 +                                       /* just no more data ready */
81819 +                               }
81820 +                               else { /* error or pipe is closed */
81821 +
81822 +                                       if (res < 0) { /* error */
81823 +                                               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "read() failed");
81824 +                                       }
81825 +
81826 +                                       fpm_event_del(ev);
81827 +                                       is_last_message = 1;
81828 +
81829 +                                       if (is_stdout) {
81830 +                                               close(child->fd_stdout);
81831 +                                               child->fd_stdout = -1;
81832 +                                       }
81833 +                                       else {
81834 +                                               close(child->fd_stderr);
81835 +                                               child->fd_stderr = -1;
81836 +                                       }
81837 +
81838 +#if 0
81839 +                                       if (in_buf == 0 && !fpm_globals.is_child) {
81840 +                                               zlog(ZLOG_STUFF, ZLOG_DEBUG, "child %d (pool %s) %s pipe is closed", (int) child->pid,
81841 +                                                       child->wp->config->name, is_stdout ? "stdout" : "stderr");
81842 +                                       }
81843 +#endif
81844 +                               }
81845 +                       }
81846 +                       else {
81847 +                               in_buf += res;
81848 +                       }
81849 +               }
81850 +
81851 +               if (fifo_out) {
81852 +                       if (in_buf == 0) {
81853 +                               fifo_out = 0;
81854 +                       }
81855 +                       else {
81856 +                               char *nl;
81857 +                               int should_print = 0;
81858 +                               buf[in_buf] = '\0';
81859 +
81860 +                               /* FIXME: there might be binary data */
81861 +
81862 +                               /* we should print if no more space in the buffer */
81863 +                               if (in_buf == max_buf_size - 1) {
81864 +                                       should_print = 1;
81865 +                               }
81866 +
81867 +                               /* we should print if no more data to come */
81868 +                               if (!fifo_in) {
81869 +                                       should_print = 1;
81870 +                               }
81871 +
81872 +                               nl = strchr(buf, '\n');
81873 +
81874 +                               if (nl || should_print) {
81875 +
81876 +                                       if (nl) {
81877 +                                               *nl = '\0';
81878 +                                       }
81879 +
81880 +                                       zlog(ZLOG_STUFF, ZLOG_WARNING, "child %d (pool %s) said into %s: \"%s\"%s", (int) child->pid,
81881 +                                               child->wp->config->name, is_stdout ? "stdout" : "stderr", buf, is_last_message ? ", pipe is closed" : "");
81882 +
81883 +                                       if (nl) {
81884 +                                               int out_buf = 1 + nl - buf;
81885 +                                               memmove(buf, buf + out_buf, in_buf - out_buf);
81886 +                                               in_buf -= out_buf;
81887 +                                       }
81888 +                                       else {
81889 +                                               in_buf = 0;
81890 +                                       }
81891 +                               }
81892 +                       }
81893 +               }
81894 +       }
81895 +
81896 +}
81897 +
81898 +int fpm_stdio_parent_use_pipes(struct fpm_child_s *child)
81899 +{
81900 +       if (!child->wp->config->catch_workers_output) { /* not required */
81901 +               return 0;
81902 +       }
81903 +
81904 +       close(child->wp->fd_stdout[1]);
81905 +       close(child->wp->fd_stderr[1]);
81906 +
81907 +       child->fd_stdout = child->wp->fd_stdout[0];
81908 +       child->fd_stderr = child->wp->fd_stderr[0];
81909 +
81910 +       child->wp->fd_stdout[0] = child->wp->fd_stdout[1] = -1;
81911 +       child->wp->fd_stderr[0] = child->wp->fd_stderr[1] = -1;
81912 +
81913 +       fpm_event_add(child->fd_stdout, &child->ev_stdout, fpm_stdio_child_said, child);
81914 +       fpm_event_add(child->fd_stderr, &child->ev_stderr, fpm_stdio_child_said, child);
81915 +
81916 +       return 0;
81917 +}
81918 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_stdio.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_stdio.h
81919 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_stdio.h  1970-01-01 03:00:00.000000000 +0300
81920 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_stdio.h      2007-08-31 15:47:19.000000000 +0400
81921 @@ -0,0 +1,17 @@
81922 +
81923 +       /* $Id$ */
81924 +       /* (c) 2007 Andrei Nigmatulin */
81925 +
81926 +#ifndef FPM_STDIO_H
81927 +#define FPM_STDIO_H 1
81928 +
81929 +#include "fpm_worker_pool.h"
81930 +
81931 +int fpm_stdio_init_main();
81932 +int fpm_stdio_init_final();
81933 +int fpm_stdio_init_child(struct fpm_worker_pool_s *wp);
81934 +int fpm_stdio_child_prepare_pipes(struct fpm_worker_pool_s *wp);
81935 +int fpm_stdio_parent_use_pipes(struct fpm_child_s *child);
81936 +
81937 +#endif
81938 +
81939 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_unix.c php-5.2.4.fpm/sapi/cgi/fpm/fpm_unix.c
81940 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_unix.c   1970-01-01 03:00:00.000000000 +0300
81941 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_unix.c       2007-08-31 15:47:19.000000000 +0400
81942 @@ -0,0 +1,244 @@
81943 +
81944 +       /* $Id$ */
81945 +       /* (c) 2007 Andrei Nigmatulin */
81946 +
81947 +#include "fpm_config.h"
81948 +
81949 +#include <string.h>
81950 +#include <sys/time.h>
81951 +#include <sys/resource.h>
81952 +#include <stdlib.h>
81953 +#include <unistd.h>
81954 +#include <sys/types.h>
81955 +#include <pwd.h>
81956 +#include <grp.h>
81957 +
81958 +#ifdef __linux
81959 +#include <sys/prctl.h>
81960 +#endif
81961 +
81962 +#include "fpm_conf.h"
81963 +#include "fpm_cleanup.h"
81964 +#include "fpm_stdio.h"
81965 +#include "fpm_unix.h"
81966 +#include "zlog.h"
81967 +
81968 +int fpm_unix_resolve_socket_premissions(struct fpm_worker_pool_s *wp)
81969 +{
81970 +       struct fpm_listen_options_s *lo = wp->config->listen_options;
81971 +
81972 +       /* uninitialized */
81973 +       wp->socket_uid = -1;
81974 +       wp->socket_gid = -1;
81975 +       wp->socket_mode = 0666;
81976 +
81977 +       if (!lo) return 0;
81978 +
81979 +       if (lo->owner && *lo->owner) {
81980 +               struct passwd *pwd;
81981 +
81982 +               pwd = getpwnam(lo->owner);
81983 +
81984 +               if (!pwd) {
81985 +                       zlog(ZLOG_STUFF, ZLOG_SYSERROR, "cannot get uid for user '%s', pool '%s'", lo->owner, wp->config->name);
81986 +                       return -1;
81987 +               }
81988 +
81989 +               wp->socket_uid = pwd->pw_uid;
81990 +               wp->socket_gid = pwd->pw_gid;
81991 +       }
81992 +
81993 +       if (lo->group && *lo->group) {
81994 +               struct group *grp;
81995 +
81996 +               grp = getgrnam(lo->group);
81997 +
81998 +               if (!grp) {
81999 +                       zlog(ZLOG_STUFF, ZLOG_SYSERROR, "cannot get gid for group '%s', pool '%s'", lo->group, wp->config->name);
82000 +                       return -1;
82001 +               }
82002 +
82003 +               wp->socket_gid = grp->gr_gid;
82004 +       }
82005 +
82006 +       if (lo->mode && *lo->mode) {
82007 +               wp->socket_mode = strtoul(lo->mode, 0, 8);
82008 +       }
82009 +
82010 +       return 0;
82011 +}
82012 +
82013 +static int fpm_unix_conf_wp(struct fpm_worker_pool_s *wp)
82014 +{
82015 +       int is_root = !geteuid();
82016 +
82017 +       if (is_root) {
82018 +               if (wp->config->user && *wp->config->user) {
82019 +                       struct passwd *pwd;
82020 +
82021 +                       pwd = getpwnam(wp->config->user);
82022 +
82023 +                       if (!pwd) {
82024 +                               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "cannot get uid for user '%s', pool '%s'", wp->config->user, wp->config->name);
82025 +                               return -1;
82026 +                       }
82027 +
82028 +                       wp->set_uid = pwd->pw_uid;
82029 +                       wp->set_gid = pwd->pw_gid;
82030 +
82031 +                       wp->user = strdup(pwd->pw_name);
82032 +                       wp->home = strdup(pwd->pw_dir);
82033 +               }
82034 +
82035 +               if (wp->config->group && *wp->config->group) {
82036 +                       struct group *grp;
82037 +
82038 +                       grp = getgrnam(wp->config->group);
82039 +
82040 +                       if (!grp) {
82041 +                               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "cannot get gid for group '%s', pool '%s'", wp->config->group, wp->config->name);
82042 +                               return -1;
82043 +                       }
82044 +
82045 +                       wp->set_gid = grp->gr_gid;
82046 +               }
82047 +
82048 +#ifndef I_REALLY_WANT_ROOT_PHP
82049 +               if (wp->set_uid == 0 || wp->set_gid == 0) {
82050 +                       zlog(ZLOG_STUFF, ZLOG_ERROR, "please specify user and group other than root, pool '%s'", wp->config->name);
82051 +                       return -1;
82052 +               }
82053 +#endif
82054 +       }
82055 +       else { /* not root */
82056 +               if (wp->config->user && *wp->config->user) {
82057 +                       zlog(ZLOG_STUFF, ZLOG_WARNING, "'user' directive is ignored, pool '%s'", wp->config->name);
82058 +               }
82059 +               if (wp->config->group && *wp->config->group) {
82060 +                       zlog(ZLOG_STUFF, ZLOG_WARNING, "'group' directive is ignored, pool '%s'", wp->config->name);
82061 +               }
82062 +               if (wp->config->chroot && *wp->config->chroot) {
82063 +                       zlog(ZLOG_STUFF, ZLOG_WARNING, "'chroot' directive is ignored, pool '%s'", wp->config->name);
82064 +               }
82065 +
82066 +               { /* set up HOME and USER anyway */
82067 +                       struct passwd *pwd;
82068 +
82069 +                       pwd = getpwuid(getuid());
82070 +
82071 +                       if (pwd) {
82072 +                               wp->user = strdup(pwd->pw_name);
82073 +                               wp->home = strdup(pwd->pw_dir);
82074 +                       }
82075 +               }
82076 +       }
82077 +
82078 +       return 0;
82079 +}
82080 +
82081 +int fpm_unix_init_child(struct fpm_worker_pool_s *wp)
82082 +{
82083 +       int is_root = !geteuid();
82084 +       int made_chroot = 0;
82085 +
82086 +       if (wp->config->rlimit_files) {
82087 +               struct rlimit r;
82088 +
82089 +               getrlimit(RLIMIT_NOFILE, &r);
82090 +
82091 +               r.rlim_cur = (rlim_t) wp->config->rlimit_files;
82092 +
82093 +               if (0 > setrlimit(RLIMIT_NOFILE, &r)) {
82094 +                       zlog(ZLOG_STUFF, ZLOG_SYSERROR, "setrlimit(RLIMIT_NOFILE) failed");
82095 +               }
82096 +       }
82097 +
82098 +       if (wp->config->rlimit_core) {
82099 +               struct rlimit r;
82100 +
82101 +               getrlimit(RLIMIT_CORE, &r);
82102 +
82103 +               r.rlim_cur = wp->config->rlimit_core == -1 ? (rlim_t) RLIM_INFINITY : (rlim_t) wp->config->rlimit_core;
82104 +
82105 +               if (0 > setrlimit(RLIMIT_CORE, &r)) {
82106 +                       zlog(ZLOG_STUFF, ZLOG_SYSERROR, "setrlimit(RLIMIT_CORE) failed");
82107 +               }
82108 +       }
82109 +
82110 +       if (is_root && wp->config->chroot && *wp->config->chroot) {
82111 +               if (0 > chroot(wp->config->chroot)) {
82112 +                       zlog(ZLOG_STUFF, ZLOG_SYSERROR, "chroot(%s) failed", wp->config->chroot);
82113 +                       return -1;
82114 +               }
82115 +               made_chroot = 1;
82116 +       }
82117 +
82118 +       if (wp->config->chdir && *wp->config->chdir) {
82119 +               if (0 > chdir(wp->config->chdir)) {
82120 +                       zlog(ZLOG_STUFF, ZLOG_SYSERROR, "chdir(%s) failed", wp->config->chdir);
82121 +                       return -1;
82122 +               }
82123 +       }
82124 +       else if (made_chroot) {
82125 +               chdir("/");
82126 +       }
82127 +
82128 +       if (is_root) {
82129 +               if (wp->set_gid) {
82130 +                       setgid(wp->set_gid);
82131 +               }
82132 +               if (wp->set_uid) {
82133 +                       initgroups(wp->config->user, wp->set_gid);
82134 +                       setuid(wp->set_uid);
82135 +               }
82136 +       }
82137 +
82138 +#ifdef __linux
82139 +       if (0 > prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)) {
82140 +               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "prctl(PR_SET_DUMPABLE) failed");
82141 +       }
82142 +#endif
82143 +
82144 +       return 0;
82145 +}
82146 +
82147 +int fpm_unix_init_main()
82148 +{
82149 +       struct fpm_worker_pool_s *wp;
82150 +
82151 +       if (fpm_global_options.daemonize) {
82152 +
82153 +               switch (fork()) {
82154 +
82155 +                       case -1 :
82156 +
82157 +                               zlog(ZLOG_STUFF, ZLOG_SYSERROR, "fork() failed");
82158 +                               return -1;
82159 +
82160 +                       case 0 :
82161 +
82162 +                               break;
82163 +
82164 +                       default :
82165 +
82166 +                               fpm_cleanups_run(FPM_CLEANUP_PARENT_EXIT);
82167 +                               exit(0);
82168 +
82169 +               }
82170 +
82171 +       }
82172 +
82173 +       setsid();
82174 +
82175 +       for (wp = fpm_worker_all_pools; wp; wp = wp->next) {
82176 +
82177 +               if (0 > fpm_unix_conf_wp(wp)) {
82178 +                       return -1;
82179 +               }
82180 +
82181 +       }
82182 +
82183 +       fpm_stdio_init_final();
82184 +
82185 +       return 0;
82186 +}
82187 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_unix.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_unix.h
82188 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_unix.h   1970-01-01 03:00:00.000000000 +0300
82189 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_unix.h       2007-08-31 15:47:19.000000000 +0400
82190 @@ -0,0 +1,15 @@
82191 +
82192 +       /* $Id$ */
82193 +       /* (c) 2007 Andrei Nigmatulin */
82194 +
82195 +#ifndef FPM_UNIX_H
82196 +#define FPM_UNIX_H 1
82197 +
82198 +#include "fpm_worker_pool.h"
82199 +
82200 +int fpm_unix_resolve_socket_premissions(struct fpm_worker_pool_s *wp);
82201 +int fpm_unix_init_child(struct fpm_worker_pool_s *wp);
82202 +int fpm_unix_init_main();
82203 +
82204 +#endif
82205 +
82206 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_worker_pool.c php-5.2.4.fpm/sapi/cgi/fpm/fpm_worker_pool.c
82207 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_worker_pool.c    1970-01-01 03:00:00.000000000 +0300
82208 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_worker_pool.c        2007-08-31 15:47:19.000000000 +0400
82209 @@ -0,0 +1,59 @@
82210 +
82211 +       /* $Id$ */
82212 +       /* (c) 2007 Andrei Nigmatulin */
82213 +
82214 +#include "fpm_config.h"
82215 +
82216 +#include <string.h>
82217 +#include <stdlib.h>
82218 +#include <unistd.h>
82219 +
82220 +#include "fpm_worker_pool.h"
82221 +#include "fpm_cleanup.h"
82222 +#include "fpm_children.h"
82223 +#include "fpm_conf.h"
82224 +
82225 +struct fpm_worker_pool_s *fpm_worker_all_pools;
82226 +
82227 +void fpm_worker_pool_cleanup(int which, void *arg)
82228 +{
82229 +       struct fpm_worker_pool_s *wp, *wp_next;
82230 +
82231 +       for (wp = fpm_worker_all_pools; wp; wp = wp_next) {
82232 +               wp_next = wp->next;
82233 +               fpm_worker_pool_config_free(wp->config);
82234 +               fpm_children_free(wp->children);
82235 +               free(wp->config);
82236 +               free(wp->user);
82237 +               free(wp->home);
82238 +               free(wp);
82239 +       }
82240 +
82241 +       fpm_worker_all_pools = 0;
82242 +}
82243 +
82244 +struct fpm_worker_pool_s *fpm_worker_pool_alloc()
82245 +{
82246 +       struct fpm_worker_pool_s *ret;
82247 +
82248 +       ret = malloc(sizeof(struct fpm_worker_pool_s));
82249 +
82250 +       if (!ret) {
82251 +               return 0;
82252 +       }
82253 +
82254 +       memset(ret, 0, sizeof(struct fpm_worker_pool_s));
82255 +
82256 +       if (!fpm_worker_all_pools) {
82257 +               fpm_worker_all_pools = ret;
82258 +       }
82259 +
82260 +       return ret;
82261 +}
82262 +
82263 +int fpm_worker_pool_init_main()
82264 +{
82265 +       fpm_cleanup_add(FPM_CLEANUP_ALL, fpm_worker_pool_cleanup, 0);
82266 +
82267 +       return 0;
82268 +}
82269 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/fpm_worker_pool.h php-5.2.4.fpm/sapi/cgi/fpm/fpm_worker_pool.h
82270 --- php-5.2.4.vanilla/sapi/cgi/fpm/fpm_worker_pool.h    1970-01-01 03:00:00.000000000 +0300
82271 +++ php-5.2.4.fpm/sapi/cgi/fpm/fpm_worker_pool.h        2007-08-31 15:47:19.000000000 +0400
82272 @@ -0,0 +1,40 @@
82273 +
82274 +       /* $Id$ */
82275 +       /* (c) 2007 Andrei Nigmatulin */
82276 +
82277 +#ifndef FPM_WORKER_POOL_H
82278 +#define FPM_WORKER_POOL_H 1
82279 +
82280 +#include "fpm_conf.h"
82281 +
82282 +struct fpm_worker_pool_s;
82283 +struct fpm_child_s;
82284 +
82285 +enum fpm_address_domain {
82286 +       FPM_AF_UNIX = 1,
82287 +       FPM_AF_INET = 2
82288 +};
82289 +
82290 +struct fpm_worker_pool_s {
82291 +       struct fpm_worker_pool_s *next;
82292 +       struct fpm_worker_pool_config_s *config;
82293 +       char *user, *home;                                                                      /* for setting env USER and HOME */
82294 +       enum fpm_address_domain listen_address_domain;
82295 +       int listening_socket;
82296 +       int set_uid, set_gid;                                                           /* config uid and gid */
82297 +       int is_template:1;                                                                      /* just config template, no processes will be created */
82298 +       int socket_uid, socket_gid, socket_mode;
82299 +
82300 +       /* runtime */
82301 +       struct fpm_child_s *children;
82302 +       int fd_stdout[2], fd_stderr[2];
82303 +       int running_children;
82304 +};
82305 +
82306 +struct fpm_worker_pool_s *fpm_worker_pool_alloc();
82307 +int fpm_worker_pool_init_main();
82308 +
82309 +extern struct fpm_worker_pool_s *fpm_worker_all_pools;
82310 +
82311 +#endif
82312 +
82313 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/Makefile.frag php-5.2.4.fpm/sapi/cgi/fpm/Makefile.frag
82314 --- php-5.2.4.vanilla/sapi/cgi/fpm/Makefile.frag        1970-01-01 03:00:00.000000000 +0300
82315 +++ php-5.2.4.fpm/sapi/cgi/fpm/Makefile.frag    2007-08-31 15:47:19.000000000 +0400
82316 @@ -0,0 +1,16 @@
82317 +
82318 +install-fpm:
82319 +       @echo "Installing FPM config:            $(INSTALL_ROOT)$(sysconfdir)/"
82320 +       -@$(mkinstalldirs) $(INSTALL_ROOT)$(sysconfdir)
82321 +       -@$(mkinstalldirs) $(INSTALL_ROOT)$(prefix)/logs
82322 +       -@if test -r $(INSTALL_ROOT)$(sysconfdir)/php-fpm.conf ; then \
82323 +               echo "                                  (installing as php-fpm.conf.default)" ; \
82324 +               dest=php-fpm.conf.default ; \
82325 +       else \
82326 +               dest=php-fpm.conf ; \
82327 +       fi ; \
82328 +       $(INSTALL_DATA) $(top_srcdir)/sapi/cgi/fpm/conf/php-fpm.conf $(INSTALL_ROOT)$(sysconfdir)/$$dest
82329 +
82330 +$(top_builddir)/libevent/libevent.la: $(top_builddir)/libevent/Makefile
82331 +       cd $(top_builddir)/libevent && $(MAKE) libevent.la
82332 +
82333 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/xml_config.c php-5.2.4.fpm/sapi/cgi/fpm/xml_config.c
82334 --- php-5.2.4.vanilla/sapi/cgi/fpm/xml_config.c 1970-01-01 03:00:00.000000000 +0300
82335 +++ php-5.2.4.fpm/sapi/cgi/fpm/xml_config.c     2007-08-31 15:47:19.000000000 +0400
82336 @@ -0,0 +1,278 @@
82337 +
82338 +       /* $Id$ */
82339 +       /* (c) 2004-2007 Andrei Nigmatulin */
82340 +
82341 +#include "fpm_config.h"
82342 +
82343 +#ifdef HAVE_ALLOCA_H
82344 +#include <alloca.h>
82345 +#endif
82346 +#include <string.h>
82347 +#include <stdio.h>
82348 +#include <stddef.h>
82349 +#include <stdlib.h>
82350 +
82351 +#include <libxml/parser.h>
82352 +#include <libxml/tree.h>
82353 +
82354 +#include "xml_config.h"
82355 +
82356 +static struct xml_conf_section **xml_conf_sections = 0;
82357 +static int xml_conf_sections_allocated = 0;
82358 +static int xml_conf_sections_used = 0;
82359 +
82360 +char *xml_conf_set_slot_boolean(void **conf, char *name, void *vv, intptr_t offset)
82361 +{
82362 +       char *value = vv;
82363 +       long value_y = !strcasecmp(value, "yes") || !strcmp(value,  "1") || !strcasecmp(value, "on");
82364 +       long value_n = !strcasecmp(value, "no")  || !strcmp(value,  "0") || !strcasecmp(value, "off");
82365 +
82366 +       if (!value_y && !value_n) {
82367 +               return "xml_conf_set_slot(): invalid boolean value";
82368 +       }
82369 +
82370 +#ifdef XML_CONF_DEBUG
82371 +       fprintf(stderr, "setting boolean '%s' => %s\n", name, value_y ? "TRUE" : "FALSE");
82372 +#endif
82373 +
82374 +       * (int *) ((char *) *conf + offset) = value_y ? 1 : 0;
82375 +
82376 +       return NULL;
82377 +}
82378 +
82379 +char *xml_conf_set_slot_string(void **conf, char *name, void *vv, intptr_t offset)
82380 +{
82381 +       char *value = vv;
82382 +       char *v = strdup(value);
82383 +
82384 +       if (!v) return "xml_conf_set_slot_string(): strdup() failed";
82385 +
82386 +#ifdef XML_CONF_DEBUG
82387 +       fprintf(stderr, "setting string '%s' => '%s'\n", name, v);
82388 +#endif
82389 +
82390 +       * (char **) ((char *) *conf + offset) = v;
82391 +
82392 +       return NULL;
82393 +}
82394 +
82395 +char *xml_conf_set_slot_integer(void **conf, char *name, void *vv, intptr_t offset)
82396 +{
82397 +       char *value = vv;
82398 +       int v = atoi(value);
82399 +
82400 +       * (int *) ((char *) *conf + offset) = v;
82401 +
82402 +#ifdef XML_CONF_DEBUG
82403 +       fprintf(stderr, "setting integer '%s' => %d\n", name, v);
82404 +#endif
82405 +
82406 +       return NULL;
82407 +}
82408 +
82409 +char *xml_conf_set_slot_time(void **conf, char *name, void *vv, intptr_t offset)
82410 +{
82411 +       char *value = vv;
82412 +       int len = strlen(value);
82413 +       char suffix;
82414 +       int seconds;
82415 +
82416 +       if (!len) return "xml_conf_set_slot_timeval(): invalid timeval value";
82417 +
82418 +       suffix = value[len-1];
82419 +
82420 +       value[len-1] = '\0';
82421 +
82422 +       switch (suffix) {
82423 +               case 's' :
82424 +                       seconds = atoi(value);
82425 +                       break;
82426 +               case 'm' :
82427 +                       seconds = 60 * atoi(value);
82428 +                       break;
82429 +               case 'h' :
82430 +                       seconds = 60 * 60 * atoi(value);
82431 +                       break;
82432 +               case 'd' :
82433 +                       seconds = 24 * 60 * 60 * atoi(value);
82434 +                       break;
82435 +               default :
82436 +                       return "xml_conf_set_slot_timeval(): unknown suffix used in timeval value";
82437 +       }
82438 +
82439 +       * (int *) ((char *) *conf + offset) = seconds;
82440 +
82441 +#ifdef XML_CONF_DEBUG
82442 +       fprintf(stderr, "setting time '%s' => %d:%02d:%02d:%02d\n", name, expand_dhms(seconds));
82443 +#endif
82444 +
82445 +       return NULL;
82446 +}
82447 +
82448 +char *xml_conf_parse_section(void **conf, struct xml_conf_section *section, void *xml_node)
82449 +{
82450 +       xmlNode *element = xml_node;
82451 +       char *ret = 0;
82452 +
82453 +#ifdef XML_CONF_DEBUG
82454 +       fprintf(stderr, "processing a section %s\n", section->path);
82455 +#endif
82456 +
82457 +       for ( ; element; element = element->next) {
82458 +               if (element->type == XML_ELEMENT_NODE && !strcmp((const char *) element->name, "value") && element->children) {
82459 +                       xmlChar *name = xmlGetProp(element, (unsigned char *) "name");
82460 +
82461 +                       if (name) {
82462 +                               int i;
82463 +
82464 +#ifdef XML_CONF_DEBUG
82465 +                               fprintf(stderr, "found a value: %s\n", name);
82466 +#endif
82467 +                               for (i = 0; section->parsers[i].parser; i++) {
82468 +                                       if (!section->parsers[i].name || !strcmp(section->parsers[i].name, (char *) name)) {
82469 +                                               break;
82470 +                                       }
82471 +                               }
82472 +
82473 +                               if (section->parsers[i].parser) {
82474 +                                       if (section->parsers[i].type == XML_CONF_SCALAR) {
82475 +                                               if (element->children->type == XML_TEXT_NODE) {
82476 +                                                       ret = section->parsers[i].parser(conf, (char *) name, element->children->content, section->parsers[i].offset);
82477 +                                               }
82478 +                                               else {
82479 +                                                       ret = "XML_TEXT_NODE is expected, something different is given";
82480 +                                               }
82481 +                                       }
82482 +                                       else {
82483 +                                               ret = section->parsers[i].parser(conf, (char *) name, element->children, section->parsers[i].offset);
82484 +                                       }
82485 +
82486 +                                       xmlFree(name);
82487 +                                       if (ret) return ret;
82488 +                                       else continue;
82489 +                               }
82490 +
82491 +                               fprintf(stderr, "Warning, unknown setting '%s' in section '%s'\n", name, section->path);
82492 +
82493 +                               xmlFree(name);
82494 +                       }
82495 +               }
82496 +       }
82497 +
82498 +       return NULL;
82499 +}
82500 +
82501 +static char *xml_conf_parse_file(xmlNode *element)
82502 +{
82503 +       char *ret = 0;
82504 +
82505 +       for ( ; element; element = element->next) {
82506 +
82507 +               if (element->parent && element->type == XML_ELEMENT_NODE && !strcmp((const char *) element->name, "section")) {
82508 +                       xmlChar *name = xmlGetProp(element, (unsigned char *) "name");
82509 +
82510 +                       if (name) {
82511 +                               char *parent_name = (char *) xmlGetNodePath(element->parent);
82512 +                               char *full_name;
82513 +                               int i;
82514 +                               struct xml_conf_section *section = NULL;
82515 +
82516 +#ifdef XML_CONF_DEBUG
82517 +                               fprintf(stderr, "got a section: %s/%s\n", parent_name, name);
82518 +#endif
82519 +                               full_name = alloca(strlen(parent_name) + strlen((char *) name) + 1 + 1);
82520 +
82521 +                               sprintf(full_name, "%s/%s", parent_name, name);
82522 +
82523 +                               xmlFree(parent_name);
82524 +                               xmlFree(name);
82525 +
82526 +                               for (i = 0; i < xml_conf_sections_used; i++) {
82527 +                                       if (!strcmp(xml_conf_sections[i]->path, full_name)) {
82528 +                                               section = xml_conf_sections[i];
82529 +                                       }
82530 +                               }
82531 +
82532 +                               if (section) { /* found a registered section */
82533 +                                       void *conf = section->conf();
82534 +                                       ret = xml_conf_parse_section(&conf, section, element->children);
82535 +                                       if (ret) break;
82536 +                               }
82537 +
82538 +                       }
82539 +               }
82540 +
82541 +               if (element->children) {
82542 +                       ret = xml_conf_parse_file(element->children);
82543 +                       if (ret) break;
82544 +               }
82545 +       }
82546 +
82547 +       return ret;
82548 +}
82549 +
82550 +char *xml_conf_load_file(char *file)
82551 +{
82552 +       char *ret = 0;
82553 +       xmlDoc *doc;
82554 +
82555 +       LIBXML_TEST_VERSION
82556 +
82557 +       doc = xmlParseFile(file);
82558 +
82559 +       if (doc) {
82560 +               ret = xml_conf_parse_file(doc->children);
82561 +               xmlFreeDoc(doc);
82562 +       }
82563 +       else {
82564 +               ret = "failed to parse conf file";
82565 +       }
82566 +
82567 +       xmlCleanupParser();
82568 +       return ret;
82569 +}
82570 +
82571 +int xml_conf_init()
82572 +{
82573 +       return 0;
82574 +}
82575 +
82576 +void xml_conf_clean()
82577 +{
82578 +       if (xml_conf_sections) {
82579 +               free(xml_conf_sections);
82580 +       }
82581 +}
82582 +
82583 +int xml_conf_section_register(struct xml_conf_section *section)
82584 +{
82585 +       if (xml_conf_sections_allocated == xml_conf_sections_used) {
82586 +               int new_size = xml_conf_sections_used + 10;
82587 +               void *new_ptr = realloc(xml_conf_sections, sizeof(struct xml_conf_section *) * new_size);
82588 +
82589 +               if (new_ptr) {
82590 +                       xml_conf_sections = new_ptr;
82591 +                       xml_conf_sections_allocated = new_size;
82592 +               }
82593 +               else {
82594 +                       fprintf(stderr, "xml_conf_section_register(): out of memory\n");
82595 +                       return -1;
82596 +               }
82597 +       }
82598 +
82599 +       xml_conf_sections[xml_conf_sections_used++] = section;
82600 +
82601 +       return 0;
82602 +}
82603 +
82604 +int xml_conf_sections_register(struct xml_conf_section *sections[])
82605 +{
82606 +       for ( ; sections && *sections; sections++) {
82607 +               if (0 > xml_conf_section_register(*sections)) {
82608 +                       return -1;
82609 +               }
82610 +       }
82611 +
82612 +       return 0;
82613 +}
82614 +
82615 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/xml_config.h php-5.2.4.fpm/sapi/cgi/fpm/xml_config.h
82616 --- php-5.2.4.vanilla/sapi/cgi/fpm/xml_config.h 1970-01-01 03:00:00.000000000 +0300
82617 +++ php-5.2.4.fpm/sapi/cgi/fpm/xml_config.h     2007-08-31 15:47:19.000000000 +0400
82618 @@ -0,0 +1,43 @@
82619 +
82620 +       /* $Id$ */
82621 +       /* (c) 2004-2007 Andrei Nigmatulin */
82622 +
82623 +#ifndef XML_CONFIG_H
82624 +#define XML_CONFIG_H 1
82625 +
82626 +#include <stdint.h>
82627 +
82628 +struct xml_value_parser;
82629 +
82630 +struct xml_value_parser {
82631 +       int type;
82632 +       char *name;
82633 +       char *(*parser)(void **, char *, void *, intptr_t offset);
82634 +       intptr_t offset;
82635 +};
82636 +
82637 +struct xml_conf_section {
82638 +       void *(*conf)();
82639 +       char *path;
82640 +       struct xml_value_parser parsers[];
82641 +};
82642 +
82643 +char *xml_conf_set_slot_boolean(void **conf, char *name, void *value, intptr_t offset);
82644 +char *xml_conf_set_slot_string(void **conf, char *name, void *value, intptr_t offset);
82645 +char *xml_conf_set_slot_integer(void **conf, char *name, void *value, intptr_t offset);
82646 +char *xml_conf_set_slot_time(void **conf, char *name, void *value, intptr_t offset);
82647 +
82648 +int xml_conf_init();
82649 +void xml_conf_clean();
82650 +char *xml_conf_load_file(char *file);
82651 +char *xml_conf_parse_section(void **conf, struct xml_conf_section *section, void *ve);
82652 +int xml_conf_section_register(struct xml_conf_section *section);
82653 +int xml_conf_sections_register(struct xml_conf_section *sections[]);
82654 +
82655 +#define expand_hms(value) (value) / 3600, ((value) % 3600) / 60, (value) % 60
82656 +
82657 +#define expand_dhms(value) (value) / 86400, ((value) % 86400) / 3600, ((value) % 3600) / 60, (value) % 60
82658 +
82659 +enum { XML_CONF_SCALAR = 1, XML_CONF_SUBSECTION = 2 };
82660 +
82661 +#endif
82662 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/zlog.c php-5.2.4.fpm/sapi/cgi/fpm/zlog.c
82663 --- php-5.2.4.vanilla/sapi/cgi/fpm/zlog.c       1970-01-01 03:00:00.000000000 +0300
82664 +++ php-5.2.4.fpm/sapi/cgi/fpm/zlog.c   2007-08-31 15:47:19.000000000 +0400
82665 @@ -0,0 +1,100 @@
82666 +
82667 +       /* $Id$ */
82668 +       /* (c) 2004-2007 Andrei Nigmatulin */
82669 +
82670 +#include "fpm_config.h"
82671 +
82672 +#include <stdio.h>
82673 +#include <unistd.h>
82674 +#include <time.h>
82675 +#include <string.h>
82676 +#include <stdarg.h>
82677 +#include <sys/time.h>
82678 +#include <errno.h>
82679 +
82680 +#include "zlog.h"
82681 +
82682 +#define MAX_LINE_LENGTH 1024
82683 +
82684 +static int zlog_fd = -1;
82685 +#if 0
82686 +static int zlog_level = 0;
82687 +#endif
82688 +
82689 +static const char *level_names[] = {
82690 +       [ZLOG_DEBUG]            = "DEBUG",
82691 +       [ZLOG_NOTICE]           = "NOTICE",
82692 +       [ZLOG_WARNING]          = "WARNING",
82693 +       [ZLOG_ERROR]            = "ERROR",
82694 +       [ZLOG_ALERT]            = "ALERT",
82695 +};
82696 +
82697 +static size_t print_time(char *timebuf, int timebuf_len)
82698 +{
82699 +       struct timeval tv;
82700 +       struct tm t;
82701 +       size_t len;
82702 +
82703 +       gettimeofday(&tv, 0);
82704 +
82705 +       len = strftime(timebuf, timebuf_len, "%b %d %H:%M:%S", localtime_r((const time_t *) &tv.tv_sec, &t));
82706 +       len += snprintf(timebuf + len, timebuf_len - len, ".%06d", (int) tv.tv_usec);
82707 +
82708 +       return len;
82709 +}
82710 +
82711 +int zlog_set_fd(int new_fd)
82712 +{
82713 +       int old_fd = zlog_fd;
82714 +       zlog_fd = new_fd;
82715 +
82716 +       return old_fd;
82717 +}
82718 +
82719 +void zlog(const char *function, int line, int flags, const char *fmt, ...)
82720 +{
82721 +       char buf[MAX_LINE_LENGTH];
82722 +       const size_t buf_size = MAX_LINE_LENGTH;
82723 +       va_list args;
82724 +       size_t len;
82725 +       int truncated = 0;
82726 +       int saved_errno = errno;
82727 +
82728 +       len = print_time(buf, buf_size);
82729 +
82730 +       len += snprintf(buf + len, buf_size - len, " [%s] %s(), line %d: ", level_names[flags & ZLOG_LEVEL_MASK], function, line);
82731 +
82732 +       if (len > buf_size - 1) {
82733 +               truncated = 1;
82734 +       }
82735 +
82736 +       if (!truncated) {
82737 +               va_start(args, fmt);
82738 +
82739 +               len += vsnprintf(buf + len, buf_size - len, fmt, args);
82740 +
82741 +               va_end(args);
82742 +
82743 +               if (len >= buf_size) {
82744 +                       truncated = 1;
82745 +               }
82746 +       }
82747 +
82748 +       if (!truncated) {
82749 +               if (flags & ZLOG_HAVE_ERRNO) {
82750 +                       len += snprintf(buf + len, buf_size - len, ": %s (%d)", strerror(saved_errno), saved_errno);
82751 +                       if (len >= buf_size) {
82752 +                               truncated = 1;
82753 +                       }
82754 +               }
82755 +       }
82756 +
82757 +       if (truncated) {
82758 +               memcpy(buf + buf_size - sizeof("..."), "...", sizeof("...") - 1);
82759 +               len = buf_size - 1;
82760 +       }
82761 +
82762 +       buf[len++] = '\n';
82763 +
82764 +       write(zlog_fd > -1 ? zlog_fd : STDERR_FILENO, buf, len);
82765 +}
82766 diff -Nru php-5.2.4.vanilla/sapi/cgi/fpm/zlog.h php-5.2.4.fpm/sapi/cgi/fpm/zlog.h
82767 --- php-5.2.4.vanilla/sapi/cgi/fpm/zlog.h       1970-01-01 03:00:00.000000000 +0300
82768 +++ php-5.2.4.fpm/sapi/cgi/fpm/zlog.h   2007-08-31 15:47:19.000000000 +0400
82769 @@ -0,0 +1,29 @@
82770 +
82771 +       /* $Id$ */
82772 +       /* (c) 2004-2007 Andrei Nigmatulin */
82773 +
82774 +#ifndef ZLOG_H
82775 +#define ZLOG_H 1
82776 +
82777 +#define ZLOG_STUFF             __func__, __LINE__
82778 +
82779 +int zlog_set_fd(int new_fd);
82780 +
82781 +void zlog(const char *function, int line, int flags, const char *fmt, ...)
82782 +               __attribute__ ((format(printf,4,5)));
82783 +
82784 +enum {
82785 +       ZLOG_DEBUG                      = 1,
82786 +       ZLOG_NOTICE                     = 2,
82787 +       ZLOG_WARNING            = 3,
82788 +       ZLOG_ERROR                      = 4,
82789 +       ZLOG_ALERT                      = 5,
82790 +};
82791 +
82792 +#define ZLOG_LEVEL_MASK 7
82793 +
82794 +#define ZLOG_HAVE_ERRNO 0x100
82795 +
82796 +#define ZLOG_SYSERROR (ZLOG_ERROR | ZLOG_HAVE_ERRNO)
82797 +
82798 +#endif
82799 diff -Nru php-5.2.4.vanilla/sapi/cgi/Makefile.frag php-5.2.4.fpm/sapi/cgi/Makefile.frag
82800 --- php-5.2.4.vanilla/sapi/cgi/Makefile.frag    2003-07-02 05:08:26.000000000 +0400
82801 +++ php-5.2.4.fpm/sapi/cgi/Makefile.frag        2007-08-31 15:47:19.000000000 +0400
82802 @@ -1,2 +1,2 @@
82803 -$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
82804 +$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(SAPI_EXTRA_DEPS)
82805         $(BUILD_CGI)
This page took 7.258804 seconds and 3 git commands to generate.