1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --enable-shared[=PKGS]  build shared libraries [default=no]"
16ac_default_prefix=/usr
17ac_help="$ac_help
18  --enable-static[=PKGS]  build static libraries [default=yes]"
19ac_help="$ac_help
20  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
21ac_help="$ac_help
22  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
23
24# Find the correct PATH separator.  Usually this is `:', but
25# DJGPP uses `;' like DOS.
26if test "X${PATH_SEPARATOR+set}" != Xset; then
27  UNAME=${UNAME-`uname 2>/dev/null`}
28  case X$UNAME in
29    *-DOS) lt_cv_sys_path_separator=';' ;;
30    *)     lt_cv_sys_path_separator=':' ;;
31  esac
32fi
33
34
35# Check that we are running under the correct shell.
36SHELL=${CONFIG_SHELL-/bin/sh}
37
38case X$ECHO in
39X*--fallback-echo)
40  # Remove one level of quotation (which was required for Make).
41  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
42  ;;
43esac
44
45echo=${ECHO-echo}
46if test "X$1" = X--no-reexec; then
47  # Discard the --no-reexec flag, and continue.
48  shift
49elif test "X$1" = X--fallback-echo; then
50  # Avoid inline document here, it may be left over
51  :
52elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
53  # Yippee, $echo works!
54  :
55else
56  # Restart under the correct shell.
57  exec $SHELL "$0" --no-reexec ${1+"$@"}
58fi
59
60if test "X$1" = X--fallback-echo; then
61  # used as fallback echo
62  shift
63  cat <<EOF
64
65EOF
66  exit 0
67fi
68
69# The HP-UX ksh and POSIX shell print the target directory to stdout
70# if CDPATH is set.
71if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
72
73if test -z "$ECHO"; then
74if test "X${echo_test_string+set}" != Xset; then
75# find a string as large as possible, as long as the shell can cope with it
76  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
77    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
78    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
79       echo_test_string="`eval $cmd`" &&
80       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
81    then
82      break
83    fi
84  done
85fi
86
87if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
88   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
89   test "X$echo_testing_string" = "X$echo_test_string"; then
90  :
91else
92  # The Solaris, AIX, and Digital Unix default echo programs unquote
93  # backslashes.  This makes it impossible to quote backslashes using
94  #   echo "$something" | sed 's/\\/\\\\/g'
95  #
96  # So, first we look for a working echo in the user's PATH.
97
98  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
99  for dir in $PATH /usr/ucb; do
100    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
101       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
102       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
103       test "X$echo_testing_string" = "X$echo_test_string"; then
104      echo="$dir/echo"
105      break
106    fi
107  done
108  IFS="$save_ifs"
109
110  if test "X$echo" = Xecho; then
111    # We didn't find a better echo, so look for alternatives.
112    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
113       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
114       test "X$echo_testing_string" = "X$echo_test_string"; then
115      # This shell has a builtin print -r that does the trick.
116      echo='print -r'
117    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
118	 test "X$CONFIG_SHELL" != X/bin/ksh; then
119      # If we have ksh, try running configure again with it.
120      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
121      export ORIGINAL_CONFIG_SHELL
122      CONFIG_SHELL=/bin/ksh
123      export CONFIG_SHELL
124      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
125    else
126      # Try using printf.
127      echo='printf %s\n'
128      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
129	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
130	 test "X$echo_testing_string" = "X$echo_test_string"; then
131	# Cool, printf works
132	:
133      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
134	   test "X$echo_testing_string" = 'X\t' &&
135	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
136	   test "X$echo_testing_string" = "X$echo_test_string"; then
137	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
138	export CONFIG_SHELL
139	SHELL="$CONFIG_SHELL"
140	export SHELL
141	echo="$CONFIG_SHELL $0 --fallback-echo"
142      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
143	   test "X$echo_testing_string" = 'X\t' &&
144	   echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
145	   test "X$echo_testing_string" = "X$echo_test_string"; then
146	echo="$CONFIG_SHELL $0 --fallback-echo"
147      else
148	# maybe with a smaller string...
149	prev=:
150
151	for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
152	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
153	  then
154	    break
155	  fi
156	  prev="$cmd"
157	done
158
159	if test "$prev" != 'sed 50q "$0"'; then
160	  echo_test_string=`eval $prev`
161	  export echo_test_string
162	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
163	else
164	  # Oops.  We lost completely, so just stick with echo.
165	  echo=echo
166	fi
167      fi
168    fi
169  fi
170fi
171fi
172
173# Copy echo and quote the copy suitably for passing to libtool from
174# the Makefile, instead of quoting the original, which is used later.
175ECHO=$echo
176if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
177   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
178fi
179
180
181ac_help="$ac_help
182  --disable-libtool-lock  avoid locking (might break parallel builds)"
183ac_help="$ac_help
184  --with-pic              try to use only PIC/non-PIC objects [default=use both]"
185ac_help="$ac_help
186 --with-pf_packet=[yes,no] override defaults"
187ac_help="$ac_help
188 --with-fast_x86_check=[yes,no] override defaults"
189
190# Initialize some variables set by options.
191# The variables have the same names as the options, with
192# dashes changed to underlines.
193build=NONE
194cache_file=./config.cache
195exec_prefix=NONE
196host=NONE
197no_create=
198nonopt=NONE
199no_recursion=
200prefix=NONE
201program_prefix=NONE
202program_suffix=NONE
203program_transform_name=s,x,x,
204silent=
205site=
206srcdir=
207target=NONE
208verbose=
209x_includes=NONE
210x_libraries=NONE
211bindir='${exec_prefix}/bin'
212sbindir='${exec_prefix}/sbin'
213libexecdir='${exec_prefix}/libexec'
214datadir='${prefix}/share'
215sysconfdir='${prefix}/etc'
216sharedstatedir='${prefix}/com'
217localstatedir='${prefix}/var'
218libdir='${exec_prefix}/lib'
219includedir='${prefix}/include'
220oldincludedir='/usr/include'
221infodir='${prefix}/info'
222mandir='${prefix}/man'
223
224# Initialize some other variables.
225subdirs=
226MFLAGS= MAKEFLAGS=
227SHELL=${CONFIG_SHELL-/bin/sh}
228# Maximum number of lines to put in a shell here document.
229ac_max_here_lines=12
230
231ac_prev=
232for ac_option
233do
234
235  # If the previous option needs an argument, assign it.
236  if test -n "$ac_prev"; then
237    eval "$ac_prev=\$ac_option"
238    ac_prev=
239    continue
240  fi
241
242  case "$ac_option" in
243  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
244  *) ac_optarg= ;;
245  esac
246
247  # Accept the important Cygnus configure options, so we can diagnose typos.
248
249  case "$ac_option" in
250
251  -bindir | --bindir | --bindi | --bind | --bin | --bi)
252    ac_prev=bindir ;;
253  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
254    bindir="$ac_optarg" ;;
255
256  -build | --build | --buil | --bui | --bu)
257    ac_prev=build ;;
258  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
259    build="$ac_optarg" ;;
260
261  -cache-file | --cache-file | --cache-fil | --cache-fi \
262  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
263    ac_prev=cache_file ;;
264  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
265  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
266    cache_file="$ac_optarg" ;;
267
268  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
269    ac_prev=datadir ;;
270  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
271  | --da=*)
272    datadir="$ac_optarg" ;;
273
274  -disable-* | --disable-*)
275    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
276    # Reject names that are not valid shell variable names.
277    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
278      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
279    fi
280    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
281    eval "enable_${ac_feature}=no" ;;
282
283  -enable-* | --enable-*)
284    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
285    # Reject names that are not valid shell variable names.
286    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
287      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
288    fi
289    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
290    case "$ac_option" in
291      *=*) ;;
292      *) ac_optarg=yes ;;
293    esac
294    eval "enable_${ac_feature}='$ac_optarg'" ;;
295
296  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
297  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
298  | --exec | --exe | --ex)
299    ac_prev=exec_prefix ;;
300  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
301  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
302  | --exec=* | --exe=* | --ex=*)
303    exec_prefix="$ac_optarg" ;;
304
305  -gas | --gas | --ga | --g)
306    # Obsolete; use --with-gas.
307    with_gas=yes ;;
308
309  -help | --help | --hel | --he)
310    # Omit some internal or obsolete options to make the list less imposing.
311    # This message is too long to be a string in the A/UX 3.1 sh.
312    cat << EOF
313Usage: configure [options] [host]
314Options: [defaults in brackets after descriptions]
315Configuration:
316  --cache-file=FILE       cache test results in FILE
317  --help                  print this message
318  --no-create             do not create output files
319  --quiet, --silent       do not print \`checking...' messages
320  --version               print the version of autoconf that created configure
321Directory and file names:
322  --prefix=PREFIX         install architecture-independent files in PREFIX
323                          [$ac_default_prefix]
324  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
325                          [same as prefix]
326  --bindir=DIR            user executables in DIR [EPREFIX/bin]
327  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
328  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
329  --datadir=DIR           read-only architecture-independent data in DIR
330                          [PREFIX/share]
331  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
332  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
333                          [PREFIX/com]
334  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
335  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
336  --includedir=DIR        C header files in DIR [PREFIX/include]
337  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
338  --infodir=DIR           info documentation in DIR [PREFIX/info]
339  --mandir=DIR            man documentation in DIR [PREFIX/man]
340  --srcdir=DIR            find the sources in DIR [configure dir or ..]
341  --program-prefix=PREFIX prepend PREFIX to installed program names
342  --program-suffix=SUFFIX append SUFFIX to installed program names
343  --program-transform-name=PROGRAM
344                          run sed PROGRAM on installed program names
345EOF
346    cat << EOF
347Host type:
348  --build=BUILD           configure for building on BUILD [BUILD=HOST]
349  --host=HOST             configure for HOST [guessed]
350  --target=TARGET         configure for TARGET [TARGET=HOST]
351Features and packages:
352  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
353  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
354  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
355  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
356  --x-includes=DIR        X include files are in DIR
357  --x-libraries=DIR       X library files are in DIR
358EOF
359    if test -n "$ac_help"; then
360      echo "--enable and --with options recognized:$ac_help"
361    fi
362    exit 0 ;;
363
364  -host | --host | --hos | --ho)
365    ac_prev=host ;;
366  -host=* | --host=* | --hos=* | --ho=*)
367    host="$ac_optarg" ;;
368
369  -includedir | --includedir | --includedi | --included | --include \
370  | --includ | --inclu | --incl | --inc)
371    ac_prev=includedir ;;
372  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
373  | --includ=* | --inclu=* | --incl=* | --inc=*)
374    includedir="$ac_optarg" ;;
375
376  -infodir | --infodir | --infodi | --infod | --info | --inf)
377    ac_prev=infodir ;;
378  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
379    infodir="$ac_optarg" ;;
380
381  -libdir | --libdir | --libdi | --libd)
382    ac_prev=libdir ;;
383  -libdir=* | --libdir=* | --libdi=* | --libd=*)
384    libdir="$ac_optarg" ;;
385
386  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
387  | --libexe | --libex | --libe)
388    ac_prev=libexecdir ;;
389  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
390  | --libexe=* | --libex=* | --libe=*)
391    libexecdir="$ac_optarg" ;;
392
393  -localstatedir | --localstatedir | --localstatedi | --localstated \
394  | --localstate | --localstat | --localsta | --localst \
395  | --locals | --local | --loca | --loc | --lo)
396    ac_prev=localstatedir ;;
397  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
398  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
399  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
400    localstatedir="$ac_optarg" ;;
401
402  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
403    ac_prev=mandir ;;
404  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
405    mandir="$ac_optarg" ;;
406
407  -nfp | --nfp | --nf)
408    # Obsolete; use --without-fp.
409    with_fp=no ;;
410
411  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
412  | --no-cr | --no-c)
413    no_create=yes ;;
414
415  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
416  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
417    no_recursion=yes ;;
418
419  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
420  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
421  | --oldin | --oldi | --old | --ol | --o)
422    ac_prev=oldincludedir ;;
423  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
424  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
425  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
426    oldincludedir="$ac_optarg" ;;
427
428  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
429    ac_prev=prefix ;;
430  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
431    prefix="$ac_optarg" ;;
432
433  -program-prefix | --program-prefix | --program-prefi | --program-pref \
434  | --program-pre | --program-pr | --program-p)
435    ac_prev=program_prefix ;;
436  -program-prefix=* | --program-prefix=* | --program-prefi=* \
437  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
438    program_prefix="$ac_optarg" ;;
439
440  -program-suffix | --program-suffix | --program-suffi | --program-suff \
441  | --program-suf | --program-su | --program-s)
442    ac_prev=program_suffix ;;
443  -program-suffix=* | --program-suffix=* | --program-suffi=* \
444  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
445    program_suffix="$ac_optarg" ;;
446
447  -program-transform-name | --program-transform-name \
448  | --program-transform-nam | --program-transform-na \
449  | --program-transform-n | --program-transform- \
450  | --program-transform | --program-transfor \
451  | --program-transfo | --program-transf \
452  | --program-trans | --program-tran \
453  | --progr-tra | --program-tr | --program-t)
454    ac_prev=program_transform_name ;;
455  -program-transform-name=* | --program-transform-name=* \
456  | --program-transform-nam=* | --program-transform-na=* \
457  | --program-transform-n=* | --program-transform-=* \
458  | --program-transform=* | --program-transfor=* \
459  | --program-transfo=* | --program-transf=* \
460  | --program-trans=* | --program-tran=* \
461  | --progr-tra=* | --program-tr=* | --program-t=*)
462    program_transform_name="$ac_optarg" ;;
463
464  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
465  | -silent | --silent | --silen | --sile | --sil)
466    silent=yes ;;
467
468  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
469    ac_prev=sbindir ;;
470  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
471  | --sbi=* | --sb=*)
472    sbindir="$ac_optarg" ;;
473
474  -sharedstatedir | --sharedstatedir | --sharedstatedi \
475  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
476  | --sharedst | --shareds | --shared | --share | --shar \
477  | --sha | --sh)
478    ac_prev=sharedstatedir ;;
479  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
480  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
481  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
482  | --sha=* | --sh=*)
483    sharedstatedir="$ac_optarg" ;;
484
485  -site | --site | --sit)
486    ac_prev=site ;;
487  -site=* | --site=* | --sit=*)
488    site="$ac_optarg" ;;
489
490  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
491    ac_prev=srcdir ;;
492  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
493    srcdir="$ac_optarg" ;;
494
495  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
496  | --syscon | --sysco | --sysc | --sys | --sy)
497    ac_prev=sysconfdir ;;
498  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
499  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
500    sysconfdir="$ac_optarg" ;;
501
502  -target | --target | --targe | --targ | --tar | --ta | --t)
503    ac_prev=target ;;
504  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
505    target="$ac_optarg" ;;
506
507  -v | -verbose | --verbose | --verbos | --verbo | --verb)
508    verbose=yes ;;
509
510  -version | --version | --versio | --versi | --vers)
511    echo "configure generated by autoconf version 2.13"
512    exit 0 ;;
513
514  -with-* | --with-*)
515    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
516    # Reject names that are not valid shell variable names.
517    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
518      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
519    fi
520    ac_package=`echo $ac_package| sed 's/-/_/g'`
521    case "$ac_option" in
522      *=*) ;;
523      *) ac_optarg=yes ;;
524    esac
525    eval "with_${ac_package}='$ac_optarg'" ;;
526
527  -without-* | --without-*)
528    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
529    # Reject names that are not valid shell variable names.
530    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
531      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
532    fi
533    ac_package=`echo $ac_package| sed 's/-/_/g'`
534    eval "with_${ac_package}=no" ;;
535
536  --x)
537    # Obsolete; use --with-x.
538    with_x=yes ;;
539
540  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
541  | --x-incl | --x-inc | --x-in | --x-i)
542    ac_prev=x_includes ;;
543  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
544  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
545    x_includes="$ac_optarg" ;;
546
547  -x-libraries | --x-libraries | --x-librarie | --x-librari \
548  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
549    ac_prev=x_libraries ;;
550  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
551  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
552    x_libraries="$ac_optarg" ;;
553
554  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
555    ;;
556
557  *)
558    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
559      echo "configure: warning: $ac_option: invalid host type" 1>&2
560    fi
561    if test "x$nonopt" != xNONE; then
562      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
563    fi
564    nonopt="$ac_option"
565    ;;
566
567  esac
568done
569
570if test -n "$ac_prev"; then
571  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
572fi
573
574trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
575
576# File descriptor usage:
577# 0 standard input
578# 1 file creation
579# 2 errors and warnings
580# 3 some systems may open it to /dev/tty
581# 4 used on the Kubota Titan
582# 6 checking for... messages and results
583# 5 compiler messages saved in config.log
584if test "$silent" = yes; then
585  exec 6>/dev/null
586else
587  exec 6>&1
588fi
589exec 5>./config.log
590
591echo "\
592This file contains any messages produced by compilers while
593running configure, to aid debugging if configure makes a mistake.
594" 1>&5
595
596# Strip out --no-create and --no-recursion so they do not pile up.
597# Also quote any args containing shell metacharacters.
598ac_configure_args=
599for ac_arg
600do
601  case "$ac_arg" in
602  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
603  | --no-cr | --no-c) ;;
604  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
605  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
606  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
607  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
608  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
609  esac
610done
611
612# NLS nuisances.
613# Only set these to C if already set.  These must not be set unconditionally
614# because not all systems understand e.g. LANG=C (notably SCO).
615# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
616# Non-C LC_CTYPE values break the ctype check.
617if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
618if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
619if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
620if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
621
622# confdefs.h avoids OS command line length limits that DEFS can exceed.
623rm -rf conftest* confdefs.h
624# AIX cpp loses on an empty file, so make sure it contains at least a newline.
625echo > confdefs.h
626
627# A filename unique to this package, relative to the directory that
628# configure is in, which we can look for to find out if srcdir is correct.
629ac_unique_file=src/libnet_build_ip.c
630
631# Find the source files, if location was not specified.
632if test -z "$srcdir"; then
633  ac_srcdir_defaulted=yes
634  # Try the directory containing this script, then its parent.
635  ac_prog=$0
636  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
637  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
638  srcdir=$ac_confdir
639  if test ! -r $srcdir/$ac_unique_file; then
640    srcdir=..
641  fi
642else
643  ac_srcdir_defaulted=no
644fi
645if test ! -r $srcdir/$ac_unique_file; then
646  if test "$ac_srcdir_defaulted" = yes; then
647    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
648  else
649    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
650  fi
651fi
652srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
653
654# Prefer explicitly selected file to automatically selected ones.
655if test -z "$CONFIG_SITE"; then
656  if test "x$prefix" != xNONE; then
657    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
658  else
659    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
660  fi
661fi
662for ac_site_file in $CONFIG_SITE; do
663  if test -r "$ac_site_file"; then
664    echo "loading site script $ac_site_file"
665    . "$ac_site_file"
666  fi
667done
668
669if test -r "$cache_file"; then
670  echo "loading cache $cache_file"
671  . $cache_file
672else
673  echo "creating cache $cache_file"
674  > $cache_file
675fi
676
677ac_ext=c
678# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
679ac_cpp='$CPP $CPPFLAGS'
680ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
681ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
682cross_compiling=$ac_cv_prog_cc_cross
683
684ac_exeext=
685ac_objext=o
686if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
687  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
688  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
689    ac_n= ac_c='
690' ac_t='	'
691  else
692    ac_n=-n ac_c= ac_t=
693  fi
694else
695  ac_n= ac_c='\c' ac_t=
696fi
697
698
699ac_aux_dir=
700for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
701  if test -f $ac_dir/install-sh; then
702    ac_aux_dir=$ac_dir
703    ac_install_sh="$ac_aux_dir/install-sh -c"
704    break
705  elif test -f $ac_dir/install.sh; then
706    ac_aux_dir=$ac_dir
707    ac_install_sh="$ac_aux_dir/install.sh -c"
708    break
709  fi
710done
711if test -z "$ac_aux_dir"; then
712  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
713fi
714ac_config_guess=$ac_aux_dir/config.guess
715ac_config_sub=$ac_aux_dir/config.sub
716ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
717
718
719# Do some error checking and defaulting for the host and target type.
720# The inputs are:
721#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
722#
723# The rules are:
724# 1. You are not allowed to specify --host, --target, and nonopt at the
725#    same time.
726# 2. Host defaults to nonopt.
727# 3. If nonopt is not specified, then host defaults to the current host,
728#    as determined by config.guess.
729# 4. Target and build default to nonopt.
730# 5. If nonopt is not specified, then target and build default to host.
731
732# The aliases save the names the user supplied, while $host etc.
733# will get canonicalized.
734case $host---$target---$nonopt in
735NONE---*---* | *---NONE---* | *---*---NONE) ;;
736*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
737esac
738
739
740# Make sure we can run config.sub.
741if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
742else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
743fi
744
745echo $ac_n "checking host system type""... $ac_c" 1>&6
746echo "configure:747: checking host system type" >&5
747
748host_alias=$host
749case "$host_alias" in
750NONE)
751  case $nonopt in
752  NONE)
753    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
754    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
755    fi ;;
756  *) host_alias=$nonopt ;;
757  esac ;;
758esac
759
760host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
761host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
762host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
763host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
764echo "$ac_t""$host" 1>&6
765
766echo $ac_n "checking target system type""... $ac_c" 1>&6
767echo "configure:768: checking target system type" >&5
768
769target_alias=$target
770case "$target_alias" in
771NONE)
772  case $nonopt in
773  NONE) target_alias=$host_alias ;;
774  *) target_alias=$nonopt ;;
775  esac ;;
776esac
777
778target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
779target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
780target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
781target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
782echo "$ac_t""$target" 1>&6
783
784echo $ac_n "checking build system type""... $ac_c" 1>&6
785echo "configure:786: checking build system type" >&5
786
787build_alias=$build
788case "$build_alias" in
789NONE)
790  case $nonopt in
791  NONE) build_alias=$host_alias ;;
792  *) build_alias=$nonopt ;;
793  esac ;;
794esac
795
796build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
797build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
798build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
799build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
800echo "$ac_t""$build" 1>&6
801
802test "$host_alias" != "$target_alias" &&
803  test "$program_prefix$program_suffix$program_transform_name" = \
804    NONENONEs,x,x, &&
805  program_prefix=${target_alias}-
806
807
808# Find a good install program.  We prefer a C program (faster),
809# so one script is as good as another.  But avoid the broken or
810# incompatible versions:
811# SysV /etc/install, /usr/sbin/install
812# SunOS /usr/etc/install
813# IRIX /sbin/install
814# AIX /bin/install
815# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
816# AFS /usr/afsws/bin/install, which mishandles nonexistent args
817# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
818# ./install, which can be erroneously created by make from ./install.sh.
819echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
820echo "configure:821: checking for a BSD compatible install" >&5
821if test -z "$INSTALL"; then
822if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
823  echo $ac_n "(cached) $ac_c" 1>&6
824else
825    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
826  for ac_dir in $PATH; do
827    # Account for people who put trailing slashes in PATH elements.
828    case "$ac_dir/" in
829    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
830    *)
831      # OSF1 and SCO ODT 3.0 have their own names for install.
832      # Don't use installbsd from OSF since it installs stuff as root
833      # by default.
834      for ac_prog in ginstall scoinst install; do
835        if test -f $ac_dir/$ac_prog; then
836	  if test $ac_prog = install &&
837            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
838	    # AIX install.  It has an incompatible calling convention.
839	    :
840	  else
841	    ac_cv_path_install="$ac_dir/$ac_prog -c"
842	    break 2
843	  fi
844	fi
845      done
846      ;;
847    esac
848  done
849  IFS="$ac_save_IFS"
850
851fi
852  if test "${ac_cv_path_install+set}" = set; then
853    INSTALL="$ac_cv_path_install"
854  else
855    # As a last resort, use the slow shell script.  We don't cache a
856    # path for INSTALL within a source directory, because that will
857    # break other packages using the cache if that directory is
858    # removed, or if the path is relative.
859    INSTALL="$ac_install_sh"
860  fi
861fi
862echo "$ac_t""$INSTALL" 1>&6
863
864# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
865# It thinks the first close brace ends the variable substitution.
866test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
867
868test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
869
870test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
871
872echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
873echo "configure:874: checking whether build environment is sane" >&5
874# Just in case
875sleep 1
876echo timestamp > conftestfile
877# Do `set' in a subshell so we don't clobber the current shell's
878# arguments.  Must try -L first in case configure is actually a
879# symlink; some systems play weird games with the mod time of symlinks
880# (eg FreeBSD returns the mod time of the symlink's containing
881# directory).
882if (
883   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
884   if test "$*" = "X"; then
885      # -L didn't work.
886      set X `ls -t $srcdir/configure conftestfile`
887   fi
888   if test "$*" != "X $srcdir/configure conftestfile" \
889      && test "$*" != "X conftestfile $srcdir/configure"; then
890
891      # If neither matched, then we have a broken ls.  This can happen
892      # if, for instance, CONFIG_SHELL is bash and it inherits a
893      # broken ls alias from the environment.  This has actually
894      # happened.  Such a system could not be considered "sane".
895      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
896alias in your environment" 1>&2; exit 1; }
897   fi
898
899   test "$2" = conftestfile
900   )
901then
902   # Ok.
903   :
904else
905   { echo "configure: error: newly created file is older than distributed files!
906Check your system clock" 1>&2; exit 1; }
907fi
908rm -f conftest*
909echo "$ac_t""yes" 1>&6
910if test "$program_transform_name" = s,x,x,; then
911  program_transform_name=
912else
913  # Double any \ or $.  echo might interpret backslashes.
914  cat <<\EOF_SED > conftestsed
915s,\\,\\\\,g; s,\$,$$,g
916EOF_SED
917  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
918  rm -f conftestsed
919fi
920test "$program_prefix" != NONE &&
921  program_transform_name="s,^,${program_prefix},; $program_transform_name"
922# Use a double $ so make ignores it.
923test "$program_suffix" != NONE &&
924  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
925
926# sed with no file args requires a program.
927test "$program_transform_name" = "" && program_transform_name="s,x,x,"
928
929echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
930echo "configure:931: checking whether ${MAKE-make} sets \${MAKE}" >&5
931set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
932if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
933  echo $ac_n "(cached) $ac_c" 1>&6
934else
935  cat > conftestmake <<\EOF
936all:
937	@echo 'ac_maketemp="${MAKE}"'
938EOF
939# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
940eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
941if test -n "$ac_maketemp"; then
942  eval ac_cv_prog_make_${ac_make}_set=yes
943else
944  eval ac_cv_prog_make_${ac_make}_set=no
945fi
946rm -f conftestmake
947fi
948if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
949  echo "$ac_t""yes" 1>&6
950  SET_MAKE=
951else
952  echo "$ac_t""no" 1>&6
953  SET_MAKE="MAKE=${MAKE-make}"
954fi
955
956
957PACKAGE=libnet
958
959VERSION=1.0.2a
960
961if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
962  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
963fi
964cat >> confdefs.h <<EOF
965#define PACKAGE "$PACKAGE"
966EOF
967
968cat >> confdefs.h <<EOF
969#define VERSION "$VERSION"
970EOF
971
972
973
974missing_dir=`cd $ac_aux_dir && pwd`
975echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
976echo "configure:977: checking for working aclocal" >&5
977# Run test in a subshell; some versions of sh will print an error if
978# an executable is not found, even if stderr is redirected.
979# Redirect stdin to placate older versions of autoconf.  Sigh.
980if (aclocal --version) < /dev/null > /dev/null 2>&1; then
981   ACLOCAL=aclocal
982   echo "$ac_t""found" 1>&6
983else
984   ACLOCAL="$missing_dir/missing aclocal"
985   echo "$ac_t""missing" 1>&6
986fi
987
988echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
989echo "configure:990: checking for working autoconf" >&5
990# Run test in a subshell; some versions of sh will print an error if
991# an executable is not found, even if stderr is redirected.
992# Redirect stdin to placate older versions of autoconf.  Sigh.
993if (autoconf --version) < /dev/null > /dev/null 2>&1; then
994   AUTOCONF=autoconf
995   echo "$ac_t""found" 1>&6
996else
997   AUTOCONF="$missing_dir/missing autoconf"
998   echo "$ac_t""missing" 1>&6
999fi
1000
1001echo $ac_n "checking for working automake""... $ac_c" 1>&6
1002echo "configure:1003: checking for working automake" >&5
1003# Run test in a subshell; some versions of sh will print an error if
1004# an executable is not found, even if stderr is redirected.
1005# Redirect stdin to placate older versions of autoconf.  Sigh.
1006if (automake --version) < /dev/null > /dev/null 2>&1; then
1007   AUTOMAKE=automake
1008   echo "$ac_t""found" 1>&6
1009else
1010   AUTOMAKE="$missing_dir/missing automake"
1011   echo "$ac_t""missing" 1>&6
1012fi
1013
1014echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1015echo "configure:1016: checking for working autoheader" >&5
1016# Run test in a subshell; some versions of sh will print an error if
1017# an executable is not found, even if stderr is redirected.
1018# Redirect stdin to placate older versions of autoconf.  Sigh.
1019if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1020   AUTOHEADER=autoheader
1021   echo "$ac_t""found" 1>&6
1022else
1023   AUTOHEADER="$missing_dir/missing autoheader"
1024   echo "$ac_t""missing" 1>&6
1025fi
1026
1027echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1028echo "configure:1029: checking for working makeinfo" >&5
1029# Run test in a subshell; some versions of sh will print an error if
1030# an executable is not found, even if stderr is redirected.
1031# Redirect stdin to placate older versions of autoconf.  Sigh.
1032if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1033   MAKEINFO=makeinfo
1034   echo "$ac_t""found" 1>&6
1035else
1036   MAKEINFO="$missing_dir/missing makeinfo"
1037   echo "$ac_t""missing" 1>&6
1038fi
1039
1040
1041
1042
1043
1044# Check whether --enable-shared or --disable-shared was given.
1045if test "${enable_shared+set}" = set; then
1046  enableval="$enable_shared"
1047  p=${PACKAGE-default}
1048case $enableval in
1049yes) enable_shared=yes ;;
1050no) enable_shared=no ;;
1051*)
1052  enable_shared=no
1053  # Look at the argument we got.  We use all the common list separators.
1054  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1055  for pkg in $enableval; do
1056    if test "X$pkg" = "X$p"; then
1057      enable_shared=yes
1058    fi
1059  done
1060  IFS="$ac_save_ifs"
1061  ;;
1062esac
1063else
1064  enable_shared=no
1065fi
1066
1067VER=`cat VERSION`
1068echo "$ac_t""Beginning autoconfiguration process for libnet-$VER..." 1>&6
1069
1070
1071
1072if test "$prefix" = "NONE"; then
1073    prefix="/usr"
1074fi
1075
1076# Extract the first word of "gcc", so it can be a program name with args.
1077set dummy gcc; ac_word=$2
1078echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1079echo "configure:1080: checking for $ac_word" >&5
1080if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1081  echo $ac_n "(cached) $ac_c" 1>&6
1082else
1083  if test -n "$CC"; then
1084  ac_cv_prog_CC="$CC" # Let the user override the test.
1085else
1086  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1087  ac_dummy="$PATH"
1088  for ac_dir in $ac_dummy; do
1089    test -z "$ac_dir" && ac_dir=.
1090    if test -f $ac_dir/$ac_word; then
1091      ac_cv_prog_CC="gcc"
1092      break
1093    fi
1094  done
1095  IFS="$ac_save_ifs"
1096fi
1097fi
1098CC="$ac_cv_prog_CC"
1099if test -n "$CC"; then
1100  echo "$ac_t""$CC" 1>&6
1101else
1102  echo "$ac_t""no" 1>&6
1103fi
1104
1105if test -z "$CC"; then
1106  # Extract the first word of "cc", so it can be a program name with args.
1107set dummy cc; ac_word=$2
1108echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1109echo "configure:1110: checking for $ac_word" >&5
1110if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1111  echo $ac_n "(cached) $ac_c" 1>&6
1112else
1113  if test -n "$CC"; then
1114  ac_cv_prog_CC="$CC" # Let the user override the test.
1115else
1116  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1117  ac_prog_rejected=no
1118  ac_dummy="$PATH"
1119  for ac_dir in $ac_dummy; do
1120    test -z "$ac_dir" && ac_dir=.
1121    if test -f $ac_dir/$ac_word; then
1122      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1123        ac_prog_rejected=yes
1124	continue
1125      fi
1126      ac_cv_prog_CC="cc"
1127      break
1128    fi
1129  done
1130  IFS="$ac_save_ifs"
1131if test $ac_prog_rejected = yes; then
1132  # We found a bogon in the path, so make sure we never use it.
1133  set dummy $ac_cv_prog_CC
1134  shift
1135  if test $# -gt 0; then
1136    # We chose a different compiler from the bogus one.
1137    # However, it has the same basename, so the bogon will be chosen
1138    # first if we set CC to just the basename; use the full file name.
1139    shift
1140    set dummy "$ac_dir/$ac_word" "$@"
1141    shift
1142    ac_cv_prog_CC="$@"
1143  fi
1144fi
1145fi
1146fi
1147CC="$ac_cv_prog_CC"
1148if test -n "$CC"; then
1149  echo "$ac_t""$CC" 1>&6
1150else
1151  echo "$ac_t""no" 1>&6
1152fi
1153
1154  if test -z "$CC"; then
1155    case "`uname -s`" in
1156    *win32* | *WIN32*)
1157      # Extract the first word of "cl", so it can be a program name with args.
1158set dummy cl; ac_word=$2
1159echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1160echo "configure:1161: checking for $ac_word" >&5
1161if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1162  echo $ac_n "(cached) $ac_c" 1>&6
1163else
1164  if test -n "$CC"; then
1165  ac_cv_prog_CC="$CC" # Let the user override the test.
1166else
1167  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1168  ac_dummy="$PATH"
1169  for ac_dir in $ac_dummy; do
1170    test -z "$ac_dir" && ac_dir=.
1171    if test -f $ac_dir/$ac_word; then
1172      ac_cv_prog_CC="cl"
1173      break
1174    fi
1175  done
1176  IFS="$ac_save_ifs"
1177fi
1178fi
1179CC="$ac_cv_prog_CC"
1180if test -n "$CC"; then
1181  echo "$ac_t""$CC" 1>&6
1182else
1183  echo "$ac_t""no" 1>&6
1184fi
1185 ;;
1186    esac
1187  fi
1188  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1189fi
1190
1191echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1192echo "configure:1193: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1193
1194ac_ext=c
1195# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1196ac_cpp='$CPP $CPPFLAGS'
1197ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1198ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1199cross_compiling=$ac_cv_prog_cc_cross
1200
1201cat > conftest.$ac_ext << EOF
1202
1203#line 1204 "configure"
1204#include "confdefs.h"
1205
1206main(){return(0);}
1207EOF
1208if { (eval echo configure:1209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1209  ac_cv_prog_cc_works=yes
1210  # If we can't run a trivial program, we are probably using a cross compiler.
1211  if (./conftest; exit) 2>/dev/null; then
1212    ac_cv_prog_cc_cross=no
1213  else
1214    ac_cv_prog_cc_cross=yes
1215  fi
1216else
1217  echo "configure: failed program was:" >&5
1218  cat conftest.$ac_ext >&5
1219  ac_cv_prog_cc_works=no
1220fi
1221rm -fr conftest*
1222ac_ext=c
1223# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1224ac_cpp='$CPP $CPPFLAGS'
1225ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1226ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1227cross_compiling=$ac_cv_prog_cc_cross
1228
1229echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1230if test $ac_cv_prog_cc_works = no; then
1231  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1232fi
1233echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1234echo "configure:1235: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1235echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1236cross_compiling=$ac_cv_prog_cc_cross
1237
1238echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1239echo "configure:1240: checking whether we are using GNU C" >&5
1240if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1241  echo $ac_n "(cached) $ac_c" 1>&6
1242else
1243  cat > conftest.c <<EOF
1244#ifdef __GNUC__
1245  yes;
1246#endif
1247EOF
1248if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1249  ac_cv_prog_gcc=yes
1250else
1251  ac_cv_prog_gcc=no
1252fi
1253fi
1254
1255echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1256
1257if test $ac_cv_prog_gcc = yes; then
1258  GCC=yes
1259else
1260  GCC=
1261fi
1262
1263ac_test_CFLAGS="${CFLAGS+set}"
1264ac_save_CFLAGS="$CFLAGS"
1265CFLAGS=
1266echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1267echo "configure:1268: checking whether ${CC-cc} accepts -g" >&5
1268if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1269  echo $ac_n "(cached) $ac_c" 1>&6
1270else
1271  echo 'void f(){}' > conftest.c
1272if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1273  ac_cv_prog_cc_g=yes
1274else
1275  ac_cv_prog_cc_g=no
1276fi
1277rm -f conftest*
1278
1279fi
1280
1281echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1282if test "$ac_test_CFLAGS" = set; then
1283  CFLAGS="$ac_save_CFLAGS"
1284fi
1285
1286
1287echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1288echo "configure:1301: checking for Cygwin environment" >&5
1289if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1290  echo $ac_n "(cached) $ac_c" 1>&6
1291else
1292  cat > conftest.$ac_ext <<EOF
1293#line 1306 "configure"
1294#include "confdefs.h"
1295
1296int main() {
1297
1298#ifndef __CYGWIN__
1299#define __CYGWIN__ __CYGWIN32__
1300#endif
1301return __CYGWIN__;
1302; return 0; }
1303EOF
1304if { (eval echo configure:1317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1305  rm -rf conftest*
1306  ac_cv_cygwin=yes
1307else
1308  echo "configure: failed program was:" >&5
1309  cat conftest.$ac_ext >&5
1310  rm -rf conftest*
1311  ac_cv_cygwin=no
1312fi
1313rm -f conftest*
1314rm -f conftest*
1315fi
1316
1317echo "$ac_t""$ac_cv_cygwin" 1>&6
1318CYGWIN=
1319test "$ac_cv_cygwin" = yes && CYGWIN=yes
1320echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1321echo "configure:1334: checking for mingw32 environment" >&5
1322if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1323  echo $ac_n "(cached) $ac_c" 1>&6
1324else
1325  cat > conftest.$ac_ext <<EOF
1326#line 1339 "configure"
1327#include "confdefs.h"
1328
1329int main() {
1330return __MINGW32__;
1331; return 0; }
1332EOF
1333if { (eval echo configure:1346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1334  rm -rf conftest*
1335  ac_cv_mingw32=yes
1336else
1337  echo "configure: failed program was:" >&5
1338  cat conftest.$ac_ext >&5
1339  rm -rf conftest*
1340  ac_cv_mingw32=no
1341fi
1342rm -f conftest*
1343rm -f conftest*
1344fi
1345
1346echo "$ac_t""$ac_cv_mingw32" 1>&6
1347MINGW32=
1348test "$ac_cv_mingw32" = yes && MINGW32=yes
1349echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1350echo "configure:1363: checking how to run the C preprocessor" >&5
1351# On Suns, sometimes $CPP names a directory.
1352if test -n "$CPP" && test -d "$CPP"; then
1353  CPP=
1354fi
1355if test -z "$CPP"; then
1356if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1357  echo $ac_n "(cached) $ac_c" 1>&6
1358else
1359    # This must be in double quotes, not single quotes, because CPP may get
1360  # substituted into the Makefile and "${CC-cc}" will confuse make.
1361  CPP="${CC-cc} -E"
1362  # On the NeXT, cc -E runs the code through the compiler's parser,
1363  # not just through cpp.
1364  cat > conftest.$ac_ext <<EOF
1365#line 1378 "configure"
1366#include "confdefs.h"
1367#include <assert.h>
1368Syntax Error
1369EOF
1370ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1371{ (eval echo configure:1384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1372ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1373if test -z "$ac_err"; then
1374  :
1375else
1376  echo "$ac_err" >&5
1377  echo "configure: failed program was:" >&5
1378  cat conftest.$ac_ext >&5
1379  rm -rf conftest*
1380  CPP="${CC-cc} -E -traditional-cpp"
1381  cat > conftest.$ac_ext <<EOF
1382#line 1395 "configure"
1383#include "confdefs.h"
1384#include <assert.h>
1385Syntax Error
1386EOF
1387ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1388{ (eval echo configure:1401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1389ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1390if test -z "$ac_err"; then
1391  :
1392else
1393  echo "$ac_err" >&5
1394  echo "configure: failed program was:" >&5
1395  cat conftest.$ac_ext >&5
1396  rm -rf conftest*
1397  CPP="${CC-cc} -nologo -E"
1398  cat > conftest.$ac_ext <<EOF
1399#line 1412 "configure"
1400#include "confdefs.h"
1401#include <assert.h>
1402Syntax Error
1403EOF
1404ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1405{ (eval echo configure:1418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1406ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1407if test -z "$ac_err"; then
1408  :
1409else
1410  echo "$ac_err" >&5
1411  echo "configure: failed program was:" >&5
1412  cat conftest.$ac_ext >&5
1413  rm -rf conftest*
1414  CPP=/lib/cpp
1415fi
1416rm -f conftest*
1417fi
1418rm -f conftest*
1419fi
1420rm -f conftest*
1421  ac_cv_prog_CPP="$CPP"
1422fi
1423  CPP="$ac_cv_prog_CPP"
1424else
1425  ac_cv_prog_CPP="$CPP"
1426fi
1427echo "$ac_t""$CPP" 1>&6
1428
1429# Check whether --enable-static or --disable-static was given.
1430if test "${enable_static+set}" = set; then
1431  enableval="$enable_static"
1432  p=${PACKAGE-default}
1433case $enableval in
1434yes) enable_static=yes ;;
1435no) enable_static=no ;;
1436*)
1437  enable_static=no
1438  # Look at the argument we got.  We use all the common list separators.
1439  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1440  for pkg in $enableval; do
1441    if test "X$pkg" = "X$p"; then
1442      enable_static=yes
1443    fi
1444  done
1445  IFS="$ac_save_ifs"
1446  ;;
1447esac
1448else
1449  enable_static=yes
1450fi
1451
1452# Check whether --enable-fast-install or --disable-fast-install was given.
1453if test "${enable_fast_install+set}" = set; then
1454  enableval="$enable_fast_install"
1455  p=${PACKAGE-default}
1456case $enableval in
1457yes) enable_fast_install=yes ;;
1458no) enable_fast_install=no ;;
1459*)
1460  enable_fast_install=no
1461  # Look at the argument we got.  We use all the common list separators.
1462  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1463  for pkg in $enableval; do
1464    if test "X$pkg" = "X$p"; then
1465      enable_fast_install=yes
1466    fi
1467  done
1468  IFS="$ac_save_ifs"
1469  ;;
1470esac
1471else
1472  enable_fast_install=yes
1473fi
1474
1475# Check whether --with-gnu-ld or --without-gnu-ld was given.
1476if test "${with_gnu_ld+set}" = set; then
1477  withval="$with_gnu_ld"
1478  test "$withval" = no || with_gnu_ld=yes
1479else
1480  with_gnu_ld=no
1481fi
1482
1483ac_prog=ld
1484if test "$GCC" = yes; then
1485  # Check if gcc -print-prog-name=ld gives a path.
1486  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1487echo "configure:1500: checking for ld used by GCC" >&5
1488  case $host in
1489  *-*-mingw*)
1490    # gcc leaves a trailing carriage return which upsets mingw
1491    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1492  *)
1493    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1494  esac
1495  case $ac_prog in
1496    # Accept absolute paths.
1497    [\\/]* | [A-Za-z]:[\\/]*)
1498      re_direlt='/[^/][^/]*/\.\./'
1499      # Canonicalize the path of ld
1500      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1501      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1502	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1503      done
1504      test -z "$LD" && LD="$ac_prog"
1505      ;;
1506  "")
1507    # If it fails, then pretend we aren't using GCC.
1508    ac_prog=ld
1509    ;;
1510  *)
1511    # If it is relative, then search for the first ld in PATH.
1512    with_gnu_ld=unknown
1513    ;;
1514  esac
1515elif test "$with_gnu_ld" = yes; then
1516  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1517echo "configure:1530: checking for GNU ld" >&5
1518else
1519  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1520echo "configure:1533: checking for non-GNU ld" >&5
1521fi
1522if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1523  echo $ac_n "(cached) $ac_c" 1>&6
1524else
1525  if test -z "$LD"; then
1526  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1527  for ac_dir in $PATH; do
1528    test -z "$ac_dir" && ac_dir=.
1529    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1530      lt_cv_path_LD="$ac_dir/$ac_prog"
1531      # Check to see if the program is GNU ld.  I'd rather use --version,
1532      # but apparently some GNU ld's only accept -v.
1533      # Break only if it was the GNU/non-GNU ld that we prefer.
1534      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1535	test "$with_gnu_ld" != no && break
1536      else
1537	test "$with_gnu_ld" != yes && break
1538      fi
1539    fi
1540  done
1541  IFS="$ac_save_ifs"
1542else
1543  lt_cv_path_LD="$LD" # Let the user override the test with a path.
1544fi
1545fi
1546
1547LD="$lt_cv_path_LD"
1548if test -n "$LD"; then
1549  echo "$ac_t""$LD" 1>&6
1550else
1551  echo "$ac_t""no" 1>&6
1552fi
1553test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1554echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1555echo "configure:1568: checking if the linker ($LD) is GNU ld" >&5
1556if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1557  echo $ac_n "(cached) $ac_c" 1>&6
1558else
1559  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1560if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1561  lt_cv_prog_gnu_ld=yes
1562else
1563  lt_cv_prog_gnu_ld=no
1564fi
1565fi
1566
1567echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1568with_gnu_ld=$lt_cv_prog_gnu_ld
1569
1570
1571echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1572echo "configure:1585: checking for $LD option to reload object files" >&5
1573if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1574  echo $ac_n "(cached) $ac_c" 1>&6
1575else
1576  lt_cv_ld_reload_flag='-r'
1577fi
1578
1579echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1580reload_flag=$lt_cv_ld_reload_flag
1581test -n "$reload_flag" && reload_flag=" $reload_flag"
1582
1583echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1584echo "configure:1597: checking for BSD-compatible nm" >&5
1585if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1586  echo $ac_n "(cached) $ac_c" 1>&6
1587else
1588  if test -n "$NM"; then
1589  # Let the user override the test.
1590  lt_cv_path_NM="$NM"
1591else
1592  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1593  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1594    test -z "$ac_dir" && ac_dir=.
1595    tmp_nm=$ac_dir/${ac_tool_prefix}nm
1596    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1597      # Check to see if the nm accepts a BSD-compat flag.
1598      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1599      #   nm: unknown option "B" ignored
1600      # Tru64's nm complains that /dev/null is an invalid object file
1601      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1602	lt_cv_path_NM="$tmp_nm -B"
1603	break
1604      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1605	lt_cv_path_NM="$tmp_nm -p"
1606	break
1607      else
1608	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1609	continue # so that we can try to find one that supports BSD flags
1610      fi
1611    fi
1612  done
1613  IFS="$ac_save_ifs"
1614  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1615fi
1616fi
1617
1618NM="$lt_cv_path_NM"
1619echo "$ac_t""$NM" 1>&6
1620
1621echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1622echo "configure:1635: checking whether ln -s works" >&5
1623if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1624  echo $ac_n "(cached) $ac_c" 1>&6
1625else
1626  rm -f conftestdata
1627if ln -s X conftestdata 2>/dev/null
1628then
1629  rm -f conftestdata
1630  ac_cv_prog_LN_S="ln -s"
1631else
1632  ac_cv_prog_LN_S=ln
1633fi
1634fi
1635LN_S="$ac_cv_prog_LN_S"
1636if test "$ac_cv_prog_LN_S" = "ln -s"; then
1637  echo "$ac_t""yes" 1>&6
1638else
1639  echo "$ac_t""no" 1>&6
1640fi
1641
1642echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1643echo "configure:1656: checking how to recognise dependant libraries" >&5
1644if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1645  echo $ac_n "(cached) $ac_c" 1>&6
1646else
1647  lt_cv_file_magic_cmd='$MAGIC_CMD'
1648lt_cv_file_magic_test_file=
1649lt_cv_deplibs_check_method='unknown'
1650# Need to set the preceding variable on all platforms that support
1651# interlibrary dependencies.
1652# 'none' -- dependencies not supported.
1653# `unknown' -- same as none, but documents that we really don't know.
1654# 'pass_all' -- all dependencies passed with no checks.
1655# 'test_compile' -- check by making test program.
1656# ['file_magic [regex]'] -- check by looking for files in library path
1657# which responds to the $file_magic_cmd with a given egrep regex.
1658# If you have `file' or equivalent on your system and you're not sure
1659# whether `pass_all' will *always* work, you probably want this one.
1660
1661case $host_os in
1662aix4* | aix5*)
1663  lt_cv_deplibs_check_method=pass_all
1664  ;;
1665
1666beos*)
1667  lt_cv_deplibs_check_method=pass_all
1668  ;;
1669
1670bsdi4*)
1671  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1672  lt_cv_file_magic_cmd='/usr/bin/file -L'
1673  lt_cv_file_magic_test_file=/shlib/libc.so
1674  ;;
1675
1676cygwin* | mingw* | pw32*)
1677  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1678  lt_cv_file_magic_cmd='$OBJDUMP -f'
1679  ;;
1680
1681darwin* | rhapsody*)
1682  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1683  lt_cv_file_magic_cmd='/usr/bin/file -L'
1684  case "$host_os" in
1685  rhapsody* | darwin1.[012])
1686    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
1687    ;;
1688  *) # Darwin 1.3 on
1689    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1690    ;;
1691  esac
1692  ;;
1693
1694freebsd*)
1695  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1696    case $host_cpu in
1697    i*86 )
1698      # Not sure whether the presence of OpenBSD here was a mistake.
1699      # Let's accept both of them until this is cleared up.
1700      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1701      lt_cv_file_magic_cmd=/usr/bin/file
1702      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1703      ;;
1704    esac
1705  else
1706    lt_cv_deplibs_check_method=pass_all
1707  fi
1708  ;;
1709
1710gnu*)
1711  lt_cv_deplibs_check_method=pass_all
1712  ;;
1713
1714hpux10.20*|hpux11*)
1715  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1716  lt_cv_file_magic_cmd=/usr/bin/file
1717  lt_cv_file_magic_test_file=/usr/lib/libc.sl
1718  ;;
1719
1720irix5* | irix6*)
1721  case $host_os in
1722  irix5*)
1723    # this will be overridden with pass_all, but let us keep it just in case
1724    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1725    ;;
1726  *)
1727    case $LD in
1728    *-32|*"-32 ") libmagic=32-bit;;
1729    *-n32|*"-n32 ") libmagic=N32;;
1730    *-64|*"-64 ") libmagic=64-bit;;
1731    *) libmagic=never-match;;
1732    esac
1733    # this will be overridden with pass_all, but let us keep it just in case
1734    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1735    ;;
1736  esac
1737  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1738  lt_cv_deplibs_check_method=pass_all
1739  ;;
1740
1741# This must be Linux ELF.
1742linux-gnu*)
1743  case $host_cpu in
1744  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
1745    lt_cv_deplibs_check_method=pass_all ;;
1746  *)
1747    # glibc up to 2.1.1 does not perform some relocations on ARM
1748    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1749  esac
1750  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1751  ;;
1752
1753netbsd*)
1754  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1755    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1756  else
1757    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
1758  fi
1759  ;;
1760
1761newos6*)
1762  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1763  lt_cv_file_magic_cmd=/usr/bin/file
1764  lt_cv_file_magic_test_file=/usr/lib/libnls.so
1765  ;;
1766
1767openbsd*)
1768  lt_cv_file_magic_cmd=/usr/bin/file
1769  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1770  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1771    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
1772  else
1773    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
1774  fi
1775  ;;
1776
1777osf3* | osf4* | osf5*)
1778  # this will be overridden with pass_all, but let us keep it just in case
1779  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1780  lt_cv_file_magic_test_file=/shlib/libc.so
1781  lt_cv_deplibs_check_method=pass_all
1782  ;;
1783
1784sco3.2v5*)
1785  lt_cv_deplibs_check_method=pass_all
1786  ;;
1787
1788solaris*)
1789  lt_cv_deplibs_check_method=pass_all
1790  lt_cv_file_magic_test_file=/lib/libc.so
1791  ;;
1792
1793sysv5uw[78]* | sysv4*uw2*)
1794  lt_cv_deplibs_check_method=pass_all
1795  ;;
1796
1797sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1798  case $host_vendor in
1799  motorola)
1800    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]'
1801    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1802    ;;
1803  ncr)
1804    lt_cv_deplibs_check_method=pass_all
1805    ;;
1806  sequent)
1807    lt_cv_file_magic_cmd='/bin/file'
1808    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
1809    ;;
1810  sni)
1811    lt_cv_file_magic_cmd='/bin/file'
1812    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
1813    lt_cv_file_magic_test_file=/lib/libc.so
1814    ;;
1815  esac
1816  ;;
1817esac
1818
1819fi
1820
1821echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
1822file_magic_cmd=$lt_cv_file_magic_cmd
1823deplibs_check_method=$lt_cv_deplibs_check_method
1824
1825echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1826echo "configure:1839: checking for object suffix" >&5
1827if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1828  echo $ac_n "(cached) $ac_c" 1>&6
1829else
1830  rm -f conftest*
1831echo 'int i = 1;' > conftest.$ac_ext
1832if { (eval echo configure:1845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1833  for ac_file in conftest.*; do
1834    case $ac_file in
1835    *.c) ;;
1836    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1837    esac
1838  done
1839else
1840  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1841fi
1842rm -f conftest*
1843fi
1844
1845echo "$ac_t""$ac_cv_objext" 1>&6
1846OBJEXT=$ac_cv_objext
1847ac_objext=$ac_cv_objext
1848
1849
1850
1851echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1852echo "configure:1865: checking for executable suffix" >&5
1853if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1854  echo $ac_n "(cached) $ac_c" 1>&6
1855else
1856  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1857  ac_cv_exeext=.exe
1858else
1859  rm -f conftest*
1860  echo 'int main () { return 0; }' > conftest.$ac_ext
1861  ac_cv_exeext=
1862  if { (eval echo configure:1875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1863    for file in conftest.*; do
1864      case $file in
1865      *.c | *.o | *.obj) ;;
1866      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1867      esac
1868    done
1869  else
1870    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1871  fi
1872  rm -f conftest*
1873  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1874fi
1875fi
1876
1877EXEEXT=""
1878test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1879echo "$ac_t""${ac_cv_exeext}" 1>&6
1880ac_exeext=$EXEEXT
1881
1882if test $host != $build; then
1883  ac_tool_prefix=${host_alias}-
1884else
1885  ac_tool_prefix=
1886fi
1887
1888
1889
1890
1891# Check for command to grab the raw symbol name followed by C symbol from nm.
1892echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
1893echo "configure:1906: checking command to parse $NM output" >&5
1894if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
1895  echo $ac_n "(cached) $ac_c" 1>&6
1896else
1897
1898# These are sane defaults that work on at least a few old systems.
1899# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
1900
1901# Character class describing NM global symbol codes.
1902symcode='[BCDEGRST]'
1903
1904# Regexp to match symbols that can be accessed directly from C.
1905sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1906
1907# Transform the above into a raw symbol and a C symbol.
1908symxfrm='\1 \2\3 \3'
1909
1910# Transform an extracted symbol line into a proper C declaration
1911lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1912
1913# Transform an extracted symbol line into symbol name and symbol address
1914lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
1915
1916# Define system-specific variables.
1917case $host_os in
1918aix*)
1919  symcode='[BCDT]'
1920  ;;
1921cygwin* | mingw* | pw32*)
1922  symcode='[ABCDGISTW]'
1923  ;;
1924hpux*) # Its linker distinguishes data from code symbols
1925  lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1926  lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
1927  ;;
1928irix*)
1929  symcode='[BCDEGRST]'
1930  ;;
1931solaris* | sysv5*)
1932  symcode='[BDT]'
1933  ;;
1934sysv4)
1935  symcode='[DFNSTU]'
1936  ;;
1937esac
1938
1939# Handle CRLF in mingw tool chain
1940opt_cr=
1941case $host_os in
1942mingw*)
1943  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1944  ;;
1945esac
1946
1947# If we're using GNU nm, then use its standard symbol codes.
1948if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1949  symcode='[ABCDGISTW]'
1950fi
1951
1952# Try without a prefix undercore, then with it.
1953for ac_symprfx in "" "_"; do
1954
1955  # Write the raw and C identifiers.
1956lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1957
1958  # Check to see that the pipe works correctly.
1959  pipe_works=no
1960  rm -f conftest*
1961  cat > conftest.$ac_ext <<EOF
1962#ifdef __cplusplus
1963extern "C" {
1964#endif
1965char nm_test_var;
1966void nm_test_func(){}
1967#ifdef __cplusplus
1968}
1969#endif
1970int main(){nm_test_var='a';nm_test_func();return(0);}
1971EOF
1972
1973  if { (eval echo configure:1986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1974    # Now try to grab the symbols.
1975    nlist=conftest.nm
1976    if { (eval echo configure:1989: \"$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
1977      # Try sorting and uniquifying the output.
1978      if sort "$nlist" | uniq > "$nlist"T; then
1979	mv -f "$nlist"T "$nlist"
1980      else
1981	rm -f "$nlist"T
1982      fi
1983
1984      # Make sure that we snagged all the symbols we need.
1985      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1986	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1987	  cat <<EOF > conftest.$ac_ext
1988#ifdef __cplusplus
1989extern "C" {
1990#endif
1991
1992EOF
1993	  # Now generate the symbol file.
1994	  eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1995
1996	  cat <<EOF >> conftest.$ac_ext
1997#if defined (__STDC__) && __STDC__
1998# define lt_ptr void *
1999#else
2000# define lt_ptr char *
2001# define const
2002#endif
2003
2004/* The mapping between symbol names and symbols. */
2005const struct {
2006  const char *name;
2007  lt_ptr address;
2008}
2009lt_preloaded_symbols[] =
2010{
2011EOF
2012	  sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
2013	  cat <<\EOF >> conftest.$ac_ext
2014  {0, (lt_ptr) 0}
2015};
2016
2017#ifdef __cplusplus
2018}
2019#endif
2020EOF
2021	  # Now try linking the two files.
2022	  mv conftest.$ac_objext conftstm.$ac_objext
2023	  save_LIBS="$LIBS"
2024	  save_CFLAGS="$CFLAGS"
2025	  LIBS="conftstm.$ac_objext"
2026	  CFLAGS="$CFLAGS$no_builtin_flag"
2027	  if { (eval echo configure:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2028	    pipe_works=yes
2029	  fi
2030	  LIBS="$save_LIBS"
2031	  CFLAGS="$save_CFLAGS"
2032	else
2033	  echo "cannot find nm_test_func in $nlist" >&5
2034	fi
2035      else
2036	echo "cannot find nm_test_var in $nlist" >&5
2037      fi
2038    else
2039      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
2040    fi
2041  else
2042    echo "$progname: failed program was:" >&5
2043    cat conftest.$ac_ext >&5
2044  fi
2045  rm -f conftest* conftst*
2046
2047  # Do not use the global_symbol_pipe unless it works.
2048  if test "$pipe_works" = yes; then
2049    break
2050  else
2051    lt_cv_sys_global_symbol_pipe=
2052  fi
2053done
2054
2055fi
2056
2057global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
2058if test -z "$lt_cv_sys_global_symbol_pipe"; then
2059  global_symbol_to_cdecl=
2060  global_symbol_to_c_name_address=
2061else
2062  global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
2063  global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
2064fi
2065if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
2066then
2067  echo "$ac_t""failed" 1>&6
2068else
2069  echo "$ac_t""ok" 1>&6
2070fi
2071
2072for ac_hdr in dlfcn.h
2073do
2074ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2075echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2076echo "configure:2089: checking for $ac_hdr" >&5
2077if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2078  echo $ac_n "(cached) $ac_c" 1>&6
2079else
2080  cat > conftest.$ac_ext <<EOF
2081#line 2094 "configure"
2082#include "confdefs.h"
2083#include <$ac_hdr>
2084EOF
2085ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2086{ (eval echo configure:2099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2087ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2088if test -z "$ac_err"; then
2089  rm -rf conftest*
2090  eval "ac_cv_header_$ac_safe=yes"
2091else
2092  echo "$ac_err" >&5
2093  echo "configure: failed program was:" >&5
2094  cat conftest.$ac_ext >&5
2095  rm -rf conftest*
2096  eval "ac_cv_header_$ac_safe=no"
2097fi
2098rm -f conftest*
2099fi
2100if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2101  echo "$ac_t""yes" 1>&6
2102    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2103  cat >> confdefs.h <<EOF
2104#define $ac_tr_hdr 1
2105EOF
2106
2107else
2108  echo "$ac_t""no" 1>&6
2109fi
2110done
2111
2112
2113
2114
2115
2116# Only perform the check for file, if the check method requires it
2117case $deplibs_check_method in
2118file_magic*)
2119  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2120    echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2121echo "configure:2134: checking for ${ac_tool_prefix}file" >&5
2122if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2123  echo $ac_n "(cached) $ac_c" 1>&6
2124else
2125  case $MAGIC_CMD in
2126  /*)
2127  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2128  ;;
2129  ?:/*)
2130  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2131  ;;
2132  *)
2133  ac_save_MAGIC_CMD="$MAGIC_CMD"
2134  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2135  ac_dummy="/usr/bin:$PATH"
2136  for ac_dir in $ac_dummy; do
2137    test -z "$ac_dir" && ac_dir=.
2138    if test -f $ac_dir/${ac_tool_prefix}file; then
2139      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2140      if test -n "$file_magic_test_file"; then
2141	case $deplibs_check_method in
2142	"file_magic "*)
2143	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2144	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2145	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2146	    egrep "$file_magic_regex" > /dev/null; then
2147	    :
2148	  else
2149	    cat <<EOF 1>&2
2150
2151*** Warning: the command libtool uses to detect shared libraries,
2152*** $file_magic_cmd, produces output that libtool cannot recognize.
2153*** The result is that libtool may fail to recognize shared libraries
2154*** as such.  This will affect the creation of libtool libraries that
2155*** depend on shared libraries, but programs linked with such libtool
2156*** libraries will work regardless of this problem.  Nevertheless, you
2157*** may want to report the problem to your system manager and/or to
2158*** bug-libtool@gnu.org
2159
2160EOF
2161	  fi ;;
2162	esac
2163      fi
2164      break
2165    fi
2166  done
2167  IFS="$ac_save_ifs"
2168  MAGIC_CMD="$ac_save_MAGIC_CMD"
2169  ;;
2170esac
2171fi
2172
2173MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2174if test -n "$MAGIC_CMD"; then
2175  echo "$ac_t""$MAGIC_CMD" 1>&6
2176else
2177  echo "$ac_t""no" 1>&6
2178fi
2179
2180if test -z "$lt_cv_path_MAGIC_CMD"; then
2181  if test -n "$ac_tool_prefix"; then
2182    echo $ac_n "checking for file""... $ac_c" 1>&6
2183echo "configure:2196: checking for file" >&5
2184if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2185  echo $ac_n "(cached) $ac_c" 1>&6
2186else
2187  case $MAGIC_CMD in
2188  /*)
2189  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2190  ;;
2191  ?:/*)
2192  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2193  ;;
2194  *)
2195  ac_save_MAGIC_CMD="$MAGIC_CMD"
2196  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2197  ac_dummy="/usr/bin:$PATH"
2198  for ac_dir in $ac_dummy; do
2199    test -z "$ac_dir" && ac_dir=.
2200    if test -f $ac_dir/file; then
2201      lt_cv_path_MAGIC_CMD="$ac_dir/file"
2202      if test -n "$file_magic_test_file"; then
2203	case $deplibs_check_method in
2204	"file_magic "*)
2205	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2206	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2207	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2208	    egrep "$file_magic_regex" > /dev/null; then
2209	    :
2210	  else
2211	    cat <<EOF 1>&2
2212
2213*** Warning: the command libtool uses to detect shared libraries,
2214*** $file_magic_cmd, produces output that libtool cannot recognize.
2215*** The result is that libtool may fail to recognize shared libraries
2216*** as such.  This will affect the creation of libtool libraries that
2217*** depend on shared libraries, but programs linked with such libtool
2218*** libraries will work regardless of this problem.  Nevertheless, you
2219*** may want to report the problem to your system manager and/or to
2220*** bug-libtool@gnu.org
2221
2222EOF
2223	  fi ;;
2224	esac
2225      fi
2226      break
2227    fi
2228  done
2229  IFS="$ac_save_ifs"
2230  MAGIC_CMD="$ac_save_MAGIC_CMD"
2231  ;;
2232esac
2233fi
2234
2235MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2236if test -n "$MAGIC_CMD"; then
2237  echo "$ac_t""$MAGIC_CMD" 1>&6
2238else
2239  echo "$ac_t""no" 1>&6
2240fi
2241
2242  else
2243    MAGIC_CMD=:
2244  fi
2245fi
2246
2247  fi
2248  ;;
2249esac
2250
2251# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2252set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2253echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2254echo "configure:2267: checking for $ac_word" >&5
2255if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2256  echo $ac_n "(cached) $ac_c" 1>&6
2257else
2258  if test -n "$RANLIB"; then
2259  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2260else
2261  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
2262  ac_dummy="$PATH"
2263  for ac_dir in $ac_dummy; do
2264    test -z "$ac_dir" && ac_dir=.
2265    if test -f $ac_dir/$ac_word; then
2266      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2267      break
2268    fi
2269  done
2270  IFS="$ac_save_ifs"
2271fi
2272fi
2273RANLIB="$ac_cv_prog_RANLIB"
2274if test -n "$RANLIB"; then
2275  echo "$ac_t""$RANLIB" 1>&6
2276else
2277  echo "$ac_t""no" 1>&6
2278fi
2279
2280
2281if test -z "$ac_cv_prog_RANLIB"; then
2282if test -n "$ac_tool_prefix"; then
2283  # Extract the first word of "ranlib", so it can be a program name with args.
2284set dummy ranlib; ac_word=$2
2285echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2286echo "configure:2299: checking for $ac_word" >&5
2287if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2288  echo $ac_n "(cached) $ac_c" 1>&6
2289else
2290  if test -n "$RANLIB"; then
2291  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2292else
2293  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
2294  ac_dummy="$PATH"
2295  for ac_dir in $ac_dummy; do
2296    test -z "$ac_dir" && ac_dir=.
2297    if test -f $ac_dir/$ac_word; then
2298      ac_cv_prog_RANLIB="ranlib"
2299      break
2300    fi
2301  done
2302  IFS="$ac_save_ifs"
2303  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2304fi
2305fi
2306RANLIB="$ac_cv_prog_RANLIB"
2307if test -n "$RANLIB"; then
2308  echo "$ac_t""$RANLIB" 1>&6
2309else
2310  echo "$ac_t""no" 1>&6
2311fi
2312
2313else
2314  RANLIB=":"
2315fi
2316fi
2317
2318# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2319set dummy ${ac_tool_prefix}strip; ac_word=$2
2320echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2321echo "configure:2334: checking for $ac_word" >&5
2322if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2323  echo $ac_n "(cached) $ac_c" 1>&6
2324else
2325  if test -n "$STRIP"; then
2326  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2327else
2328  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
2329  ac_dummy="$PATH"
2330  for ac_dir in $ac_dummy; do
2331    test -z "$ac_dir" && ac_dir=.
2332    if test -f $ac_dir/$ac_word; then
2333      ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2334      break
2335    fi
2336  done
2337  IFS="$ac_save_ifs"
2338fi
2339fi
2340STRIP="$ac_cv_prog_STRIP"
2341if test -n "$STRIP"; then
2342  echo "$ac_t""$STRIP" 1>&6
2343else
2344  echo "$ac_t""no" 1>&6
2345fi
2346
2347
2348if test -z "$ac_cv_prog_STRIP"; then
2349if test -n "$ac_tool_prefix"; then
2350  # Extract the first word of "strip", so it can be a program name with args.
2351set dummy strip; ac_word=$2
2352echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2353echo "configure:2366: checking for $ac_word" >&5
2354if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2355  echo $ac_n "(cached) $ac_c" 1>&6
2356else
2357  if test -n "$STRIP"; then
2358  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2359else
2360  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
2361  ac_dummy="$PATH"
2362  for ac_dir in $ac_dummy; do
2363    test -z "$ac_dir" && ac_dir=.
2364    if test -f $ac_dir/$ac_word; then
2365      ac_cv_prog_STRIP="strip"
2366      break
2367    fi
2368  done
2369  IFS="$ac_save_ifs"
2370  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2371fi
2372fi
2373STRIP="$ac_cv_prog_STRIP"
2374if test -n "$STRIP"; then
2375  echo "$ac_t""$STRIP" 1>&6
2376else
2377  echo "$ac_t""no" 1>&6
2378fi
2379
2380else
2381  STRIP=":"
2382fi
2383fi
2384
2385
2386enable_dlopen=no
2387enable_win32_dll=no
2388
2389# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2390if test "${enable_libtool_lock+set}" = set; then
2391  enableval="$enable_libtool_lock"
2392  :
2393fi
2394
2395test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2396
2397# Some flags need to be propagated to the compiler or linker for good
2398# libtool support.
2399case $host in
2400*-*-irix6*)
2401  # Find out which ABI we are using.
2402  echo '#line 2415 "configure"' > conftest.$ac_ext
2403  if { (eval echo configure:2416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2404    case `/usr/bin/file conftest.$ac_objext` in
2405    *32-bit*)
2406      LD="${LD-ld} -32"
2407      ;;
2408    *N32*)
2409      LD="${LD-ld} -n32"
2410      ;;
2411    *64-bit*)
2412      LD="${LD-ld} -64"
2413      ;;
2414    esac
2415  fi
2416  rm -rf conftest*
2417  ;;
2418
2419*-*-sco3.2v5*)
2420  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2421  SAVE_CFLAGS="$CFLAGS"
2422  CFLAGS="$CFLAGS -belf"
2423  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2424echo "configure:2437: checking whether the C compiler needs -belf" >&5
2425if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2426  echo $ac_n "(cached) $ac_c" 1>&6
2427else
2428
2429     ac_ext=c
2430# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2431ac_cpp='$CPP $CPPFLAGS'
2432ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2433ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2434cross_compiling=$ac_cv_prog_cc_cross
2435
2436     cat > conftest.$ac_ext <<EOF
2437#line 2450 "configure"
2438#include "confdefs.h"
2439
2440int main() {
2441
2442; return 0; }
2443EOF
2444if { (eval echo configure:2457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2445  rm -rf conftest*
2446  lt_cv_cc_needs_belf=yes
2447else
2448  echo "configure: failed program was:" >&5
2449  cat conftest.$ac_ext >&5
2450  rm -rf conftest*
2451  lt_cv_cc_needs_belf=no
2452fi
2453rm -f conftest*
2454     ac_ext=c
2455# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2456ac_cpp='$CPP $CPPFLAGS'
2457ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2458ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2459cross_compiling=$ac_cv_prog_cc_cross
2460
2461fi
2462
2463echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2464  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2465    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2466    CFLAGS="$SAVE_CFLAGS"
2467  fi
2468  ;;
2469
2470
2471esac
2472
2473# Sed substitution that helps us do robust quoting.  It backslashifies
2474# metacharacters that are still active within double-quoted strings.
2475Xsed='sed -e s/^X//'
2476sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
2477
2478# Same as above, but do not quote variable references.
2479double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
2480
2481# Sed substitution to delay expansion of an escaped shell variable in a
2482# double_quote_subst'ed string.
2483delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2484
2485# Constants:
2486rm="rm -f"
2487
2488# Global variables:
2489default_ofile=libtool
2490can_build_shared=yes
2491
2492# All known linkers require a `.a' archive for static linking (except M$VC,
2493# which needs '.lib').
2494libext=a
2495ltmain="$ac_aux_dir/ltmain.sh"
2496ofile="$default_ofile"
2497with_gnu_ld="$lt_cv_prog_gnu_ld"
2498need_locks="$enable_libtool_lock"
2499
2500old_CC="$CC"
2501old_CFLAGS="$CFLAGS"
2502
2503# Set sane defaults for various variables
2504test -z "$AR" && AR=ar
2505test -z "$AR_FLAGS" && AR_FLAGS=cru
2506test -z "$AS" && AS=as
2507test -z "$CC" && CC=cc
2508test -z "$DLLTOOL" && DLLTOOL=dlltool
2509test -z "$LD" && LD=ld
2510test -z "$LN_S" && LN_S="ln -s"
2511test -z "$MAGIC_CMD" && MAGIC_CMD=file
2512test -z "$NM" && NM=nm
2513test -z "$OBJDUMP" && OBJDUMP=objdump
2514test -z "$RANLIB" && RANLIB=:
2515test -z "$STRIP" && STRIP=:
2516test -z "$ac_objext" && ac_objext=o
2517
2518if test x"$host" != x"$build"; then
2519  ac_tool_prefix=${host_alias}-
2520else
2521  ac_tool_prefix=
2522fi
2523
2524# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
2525case $host_os in
2526linux-gnu*) ;;
2527linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
2528esac
2529
2530case $host_os in
2531aix3*)
2532  # AIX sometimes has problems with the GCC collect2 program.  For some
2533  # reason, if we set the COLLECT_NAMES environment variable, the problems
2534  # vanish in a puff of smoke.
2535  if test "X${COLLECT_NAMES+set}" != Xset; then
2536    COLLECT_NAMES=
2537    export COLLECT_NAMES
2538  fi
2539  ;;
2540esac
2541
2542# Determine commands to create old-style static archives.
2543old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
2544old_postinstall_cmds='chmod 644 $oldlib'
2545old_postuninstall_cmds=
2546
2547if test -n "$RANLIB"; then
2548  case $host_os in
2549  openbsd*)
2550    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
2551    ;;
2552  *)
2553    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
2554    ;;
2555  esac
2556  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2557fi
2558
2559# Allow CC to be a program name with arguments.
2560set dummy $CC
2561compiler="$2"
2562
2563echo $ac_n "checking for objdir""... $ac_c" 1>&6
2564echo "configure:2577: checking for objdir" >&5
2565rm -f .libs 2>/dev/null
2566mkdir .libs 2>/dev/null
2567if test -d .libs; then
2568  objdir=.libs
2569else
2570  # MS-DOS does not allow filenames that begin with a dot.
2571  objdir=_libs
2572fi
2573rmdir .libs 2>/dev/null
2574echo "$ac_t""$objdir" 1>&6
2575
2576
2577# Check whether --with-pic or --without-pic was given.
2578if test "${with_pic+set}" = set; then
2579  withval="$with_pic"
2580  pic_mode="$withval"
2581else
2582  pic_mode=default
2583fi
2584
2585test -z "$pic_mode" && pic_mode=default
2586
2587# We assume here that the value for lt_cv_prog_cc_pic will not be cached
2588# in isolation, and that seeing it set (from the cache) indicates that
2589# the associated values are set (in the cache) correctly too.
2590echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
2591echo "configure:2604: checking for $compiler option to produce PIC" >&5
2592if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then
2593  echo $ac_n "(cached) $ac_c" 1>&6
2594else
2595   lt_cv_prog_cc_pic=
2596  lt_cv_prog_cc_shlib=
2597  lt_cv_prog_cc_wl=
2598  lt_cv_prog_cc_static=
2599  lt_cv_prog_cc_no_builtin=
2600  lt_cv_prog_cc_can_build_shared=$can_build_shared
2601
2602  if test "$GCC" = yes; then
2603    lt_cv_prog_cc_wl='-Wl,'
2604    lt_cv_prog_cc_static='-static'
2605
2606    case $host_os in
2607    aix*)
2608      # Below there is a dirty hack to force normal static linking with -ldl
2609      # The problem is because libdl dynamically linked with both libc and
2610      # libC (AIX C++ library), which obviously doesn't included in libraries
2611      # list by gcc. This cause undefined symbols with -static flags.
2612      # This hack allows C programs to be linked with "-static -ldl", but
2613      # not sure about C++ programs.
2614      lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
2615      ;;
2616    amigaos*)
2617      # FIXME: we need at least 68020 code to build shared libraries, but
2618      # adding the `-m68020' flag to GCC prevents building anything better,
2619      # like `-m68040'.
2620      lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
2621      ;;
2622    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
2623      # PIC is the default for these OSes.
2624      ;;
2625    darwin* | rhapsody*)
2626      # PIC is the default on this platform
2627      # Common symbols not allowed in MH_DYLIB files
2628      lt_cv_prog_cc_pic='-fno-common'
2629      ;;
2630    cygwin* | mingw* | pw32* | os2*)
2631      # This hack is so that the source file can tell whether it is being
2632      # built for inclusion in a dll (and should export symbols for example).
2633      lt_cv_prog_cc_pic='-DDLL_EXPORT'
2634      ;;
2635    sysv4*MP*)
2636      if test -d /usr/nec; then
2637	 lt_cv_prog_cc_pic=-Kconform_pic
2638      fi
2639      ;;
2640    *)
2641      lt_cv_prog_cc_pic='-fPIC'
2642      ;;
2643    esac
2644  else
2645    # PORTME Check for PIC flags for the system compiler.
2646    case $host_os in
2647    aix3* | aix4* | aix5*)
2648      lt_cv_prog_cc_wl='-Wl,'
2649      # All AIX code is PIC.
2650      if test "$host_cpu" = ia64; then
2651	# AIX 5 now supports IA64 processor
2652	lt_cv_prog_cc_static='-Bstatic'
2653      else
2654	lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
2655      fi
2656      ;;
2657
2658    hpux9* | hpux10* | hpux11*)
2659      # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
2660      lt_cv_prog_cc_wl='-Wl,'
2661      lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
2662      lt_cv_prog_cc_pic='+Z'
2663      ;;
2664
2665    irix5* | irix6*)
2666      lt_cv_prog_cc_wl='-Wl,'
2667      lt_cv_prog_cc_static='-non_shared'
2668      # PIC (with -KPIC) is the default.
2669      ;;
2670
2671    cygwin* | mingw* | pw32* | os2*)
2672      # This hack is so that the source file can tell whether it is being
2673      # built for inclusion in a dll (and should export symbols for example).
2674      lt_cv_prog_cc_pic='-DDLL_EXPORT'
2675      ;;
2676
2677    newsos6)
2678      lt_cv_prog_cc_pic='-KPIC'
2679      lt_cv_prog_cc_static='-Bstatic'
2680      ;;
2681
2682    osf3* | osf4* | osf5*)
2683      # All OSF/1 code is PIC.
2684      lt_cv_prog_cc_wl='-Wl,'
2685      lt_cv_prog_cc_static='-non_shared'
2686      ;;
2687
2688    sco3.2v5*)
2689      lt_cv_prog_cc_pic='-Kpic'
2690      lt_cv_prog_cc_static='-dn'
2691      lt_cv_prog_cc_shlib='-belf'
2692      ;;
2693
2694    solaris*)
2695      lt_cv_prog_cc_pic='-KPIC'
2696      lt_cv_prog_cc_static='-Bstatic'
2697      lt_cv_prog_cc_wl='-Wl,'
2698      ;;
2699
2700    sunos4*)
2701      lt_cv_prog_cc_pic='-PIC'
2702      lt_cv_prog_cc_static='-Bstatic'
2703      lt_cv_prog_cc_wl='-Qoption ld '
2704      ;;
2705
2706    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2707      lt_cv_prog_cc_pic='-KPIC'
2708      lt_cv_prog_cc_static='-Bstatic'
2709      if test "x$host_vendor" = xsni; then
2710	lt_cv_prog_cc_wl='-LD'
2711      else
2712	lt_cv_prog_cc_wl='-Wl,'
2713      fi
2714      ;;
2715
2716    uts4*)
2717      lt_cv_prog_cc_pic='-pic'
2718      lt_cv_prog_cc_static='-Bstatic'
2719      ;;
2720
2721    sysv4*MP*)
2722      if test -d /usr/nec ;then
2723	lt_cv_prog_cc_pic='-Kconform_pic'
2724	lt_cv_prog_cc_static='-Bstatic'
2725      fi
2726      ;;
2727
2728    *)
2729      lt_cv_prog_cc_can_build_shared=no
2730      ;;
2731    esac
2732  fi
2733
2734fi
2735
2736if test -z "$lt_cv_prog_cc_pic"; then
2737  echo "$ac_t""none" 1>&6
2738else
2739  echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
2740
2741  # Check to make sure the pic_flag actually works.
2742  echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
2743echo "configure:2756: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
2744  if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then
2745  echo $ac_n "(cached) $ac_c" 1>&6
2746else
2747      save_CFLAGS="$CFLAGS"
2748    CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
2749    cat > conftest.$ac_ext <<EOF
2750#line 2763 "configure"
2751#include "confdefs.h"
2752
2753int main() {
2754
2755; return 0; }
2756EOF
2757if { (eval echo configure:2770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2758  rm -rf conftest*
2759        case $host_os in
2760      hpux9* | hpux10* | hpux11*)
2761	# On HP-UX, both CC and GCC only warn that PIC is supported... then
2762	# they create non-PIC objects.  So, if there were any warnings, we
2763	# assume that PIC is not supported.
2764	if test -s conftest.err; then
2765	  lt_cv_prog_cc_pic_works=no
2766	else
2767	  lt_cv_prog_cc_pic_works=yes
2768	fi
2769	;;
2770      *)
2771	lt_cv_prog_cc_pic_works=yes
2772	;;
2773      esac
2774
2775else
2776  echo "configure: failed program was:" >&5
2777  cat conftest.$ac_ext >&5
2778  rm -rf conftest*
2779        lt_cv_prog_cc_pic_works=no
2780
2781fi
2782rm -f conftest*
2783    CFLAGS="$save_CFLAGS"
2784
2785fi
2786
2787
2788  if test "X$lt_cv_prog_cc_pic_works" = Xno; then
2789    lt_cv_prog_cc_pic=
2790    lt_cv_prog_cc_can_build_shared=no
2791  else
2792    lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
2793  fi
2794
2795  echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
2796fi
2797
2798# Check for any special shared library compilation flags.
2799if test -n "$lt_cv_prog_cc_shlib"; then
2800  echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
2801  if echo "$old_CC $old_CFLAGS " | egrep -e "[ 	]$lt_cv_prog_cc_shlib[ 	]" >/dev/null; then :
2802  else
2803   echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
2804    lt_cv_prog_cc_can_build_shared=no
2805  fi
2806fi
2807
2808echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
2809echo "configure:2822: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
2810if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then
2811  echo $ac_n "(cached) $ac_c" 1>&6
2812else
2813    lt_cv_prog_cc_static_works=no
2814  save_LDFLAGS="$LDFLAGS"
2815  LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
2816  cat > conftest.$ac_ext <<EOF
2817#line 2830 "configure"
2818#include "confdefs.h"
2819
2820int main() {
2821
2822; return 0; }
2823EOF
2824if { (eval echo configure:2837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2825  rm -rf conftest*
2826  lt_cv_prog_cc_static_works=yes
2827else
2828  echo "configure: failed program was:" >&5
2829  cat conftest.$ac_ext >&5
2830fi
2831rm -f conftest*
2832  LDFLAGS="$save_LDFLAGS"
2833
2834fi
2835
2836
2837# Belt *and* braces to stop my trousers falling down:
2838test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
2839echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
2840
2841pic_flag="$lt_cv_prog_cc_pic"
2842special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
2843wl="$lt_cv_prog_cc_wl"
2844link_static_flag="$lt_cv_prog_cc_static"
2845no_builtin_flag="$lt_cv_prog_cc_no_builtin"
2846can_build_shared="$lt_cv_prog_cc_can_build_shared"
2847
2848
2849# Check to see if options -o and -c are simultaneously supported by compiler
2850echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
2851echo "configure:2864: checking if $compiler supports -c -o file.$ac_objext" >&5
2852if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then
2853  echo $ac_n "(cached) $ac_c" 1>&6
2854else
2855
2856$rm -r conftest 2>/dev/null
2857mkdir conftest
2858cd conftest
2859echo "int some_variable = 0;" > conftest.$ac_ext
2860mkdir out
2861# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
2862# that will create temporary files in the current directory regardless of
2863# the output directory.  Thus, making CWD read-only will cause this test
2864# to fail, enabling locking or at least warning the user not to do parallel
2865# builds.
2866chmod -w .
2867save_CFLAGS="$CFLAGS"
2868CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
2869compiler_c_o=no
2870if { (eval echo configure:2883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
2871  # The compiler can only warn and ignore the option if not recognized
2872  # So say no if there are warnings
2873  if test -s out/conftest.err; then
2874    lt_cv_compiler_c_o=no
2875  else
2876    lt_cv_compiler_c_o=yes
2877  fi
2878else
2879  # Append any errors to the config.log.
2880  cat out/conftest.err 1>&5
2881  lt_cv_compiler_c_o=no
2882fi
2883CFLAGS="$save_CFLAGS"
2884chmod u+w .
2885$rm conftest* out/*
2886rmdir out
2887cd ..
2888rmdir conftest
2889$rm -r conftest 2>/dev/null
2890
2891fi
2892
2893compiler_c_o=$lt_cv_compiler_c_o
2894echo "$ac_t""$compiler_c_o" 1>&6
2895
2896if test x"$compiler_c_o" = x"yes"; then
2897  # Check to see if we can write to a .lo
2898  echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
2899echo "configure:2912: checking if $compiler supports -c -o file.lo" >&5
2900  if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then
2901  echo $ac_n "(cached) $ac_c" 1>&6
2902else
2903
2904  lt_cv_compiler_o_lo=no
2905  save_CFLAGS="$CFLAGS"
2906  CFLAGS="$CFLAGS -c -o conftest.lo"
2907  save_objext="$ac_objext"
2908  ac_objext=lo
2909  cat > conftest.$ac_ext <<EOF
2910#line 2923 "configure"
2911#include "confdefs.h"
2912
2913int main() {
2914int some_variable = 0;
2915; return 0; }
2916EOF
2917if { (eval echo configure:2930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2918  rm -rf conftest*
2919      # The compiler can only warn and ignore the option if not recognized
2920    # So say no if there are warnings
2921    if test -s conftest.err; then
2922      lt_cv_compiler_o_lo=no
2923    else
2924      lt_cv_compiler_o_lo=yes
2925    fi
2926
2927else
2928  echo "configure: failed program was:" >&5
2929  cat conftest.$ac_ext >&5
2930fi
2931rm -f conftest*
2932  ac_objext="$save_objext"
2933  CFLAGS="$save_CFLAGS"
2934
2935fi
2936
2937  compiler_o_lo=$lt_cv_compiler_o_lo
2938  echo "$ac_t""$compiler_o_lo" 1>&6
2939else
2940  compiler_o_lo=no
2941fi
2942
2943# Check to see if we can do hard links to lock some files if needed
2944hard_links="nottested"
2945if test "$compiler_c_o" = no && test "$need_locks" != no; then
2946  # do not overwrite the value of need_locks provided by the user
2947  echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
2948echo "configure:2961: checking if we can lock with hard links" >&5
2949  hard_links=yes
2950  $rm conftest*
2951  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2952  touch conftest.a
2953  ln conftest.a conftest.b 2>&5 || hard_links=no
2954  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2955  echo "$ac_t""$hard_links" 1>&6
2956  if test "$hard_links" = no; then
2957    echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
2958    need_locks=warn
2959  fi
2960else
2961  need_locks=no
2962fi
2963
2964if test "$GCC" = yes; then
2965  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2966  echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
2967echo "configure:2980: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
2968  echo "int some_variable = 0;" > conftest.$ac_ext
2969  save_CFLAGS="$CFLAGS"
2970  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2971  compiler_rtti_exceptions=no
2972  cat > conftest.$ac_ext <<EOF
2973#line 2986 "configure"
2974#include "confdefs.h"
2975
2976int main() {
2977int some_variable = 0;
2978; return 0; }
2979EOF
2980if { (eval echo configure:2993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2981  rm -rf conftest*
2982      # The compiler can only warn and ignore the option if not recognized
2983    # So say no if there are warnings
2984    if test -s conftest.err; then
2985      compiler_rtti_exceptions=no
2986    else
2987      compiler_rtti_exceptions=yes
2988    fi
2989
2990else
2991  echo "configure: failed program was:" >&5
2992  cat conftest.$ac_ext >&5
2993fi
2994rm -f conftest*
2995  CFLAGS="$save_CFLAGS"
2996  echo "$ac_t""$compiler_rtti_exceptions" 1>&6
2997
2998  if test "$compiler_rtti_exceptions" = "yes"; then
2999    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
3000  else
3001    no_builtin_flag=' -fno-builtin'
3002  fi
3003fi
3004
3005# See if the linker supports building shared libraries.
3006echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
3007echo "configure:3020: checking whether the linker ($LD) supports shared libraries" >&5
3008
3009allow_undefined_flag=
3010no_undefined_flag=
3011need_lib_prefix=unknown
3012need_version=unknown
3013# when you set need_version to no, make sure it does not cause -set_version
3014# flags to be left without arguments
3015archive_cmds=
3016archive_expsym_cmds=
3017old_archive_from_new_cmds=
3018old_archive_from_expsyms_cmds=
3019export_dynamic_flag_spec=
3020whole_archive_flag_spec=
3021thread_safe_flag_spec=
3022hardcode_into_libs=no
3023hardcode_libdir_flag_spec=
3024hardcode_libdir_separator=
3025hardcode_direct=no
3026hardcode_minus_L=no
3027hardcode_shlibpath_var=unsupported
3028runpath_var=
3029link_all_deplibs=unknown
3030always_export_symbols=no
3031export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
3032# include_expsyms should be a list of space-separated symbols to be *always*
3033# included in the symbol list
3034include_expsyms=
3035# exclude_expsyms can be an egrep regular expression of symbols to exclude
3036# it will be wrapped by ` (' and `)$', so one must not match beginning or
3037# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
3038# as well as any symbol that contains `d'.
3039exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
3040# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
3041# platforms (ab)use it in PIC code, but their linkers get confused if
3042# the symbol is explicitly referenced.  Since portable code cannot
3043# rely on this symbol name, it's probably fine to never include it in
3044# preloaded symbol tables.
3045extract_expsyms_cmds=
3046
3047case $host_os in
3048cygwin* | mingw* | pw32*)
3049  # FIXME: the MSVC++ port hasn't been tested in a loooong time
3050  # When not using gcc, we currently assume that we are using
3051  # Microsoft Visual C++.
3052  if test "$GCC" != yes; then
3053    with_gnu_ld=no
3054  fi
3055  ;;
3056openbsd*)
3057  with_gnu_ld=no
3058  ;;
3059esac
3060
3061ld_shlibs=yes
3062if test "$with_gnu_ld" = yes; then
3063  # If archive_cmds runs LD, not CC, wlarc should be empty
3064  wlarc='${wl}'
3065
3066  # See if GNU ld supports shared libraries.
3067  case $host_os in
3068  aix3* | aix4* | aix5*)
3069    # On AIX, the GNU linker is very broken
3070    # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
3071    ld_shlibs=no
3072    cat <<EOF 1>&2
3073
3074*** Warning: the GNU linker, at least up to release 2.9.1, is reported
3075*** to be unable to reliably create shared libraries on AIX.
3076*** Therefore, libtool is disabling shared libraries support.  If you
3077*** really care for shared libraries, you may want to modify your PATH
3078*** so that a non-GNU linker is found, and then restart.
3079
3080EOF
3081    ;;
3082
3083  amigaos*)
3084    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)'
3085    hardcode_libdir_flag_spec='-L$libdir'
3086    hardcode_minus_L=yes
3087
3088    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
3089    # that the semantics of dynamic libraries on AmigaOS, at least up
3090    # to version 4, is to share data among multiple programs linked
3091    # with the same dynamic library.  Since this doesn't match the
3092    # behavior of shared libraries on other platforms, we can use
3093    # them.
3094    ld_shlibs=no
3095    ;;
3096
3097  beos*)
3098    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
3099      allow_undefined_flag=unsupported
3100      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3101      # support --undefined.  This deserves some investigation.  FIXME
3102      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3103    else
3104      ld_shlibs=no
3105    fi
3106    ;;
3107
3108  cygwin* | mingw* | pw32*)
3109    # hardcode_libdir_flag_spec is actually meaningless, as there is
3110    # no search path for DLLs.
3111    hardcode_libdir_flag_spec='-L$libdir'
3112    allow_undefined_flag=unsupported
3113    always_export_symbols=yes
3114
3115    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
3116      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
3117      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
3118      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
3119      else $CC -o impgen impgen.c ; fi)~
3120      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
3121
3122    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
3123
3124    # cygwin and mingw dlls have different entry points and sets of symbols
3125    # to exclude.
3126    # FIXME: what about values for MSVC?
3127    dll_entry=__cygwin_dll_entry@12
3128    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
3129    case $host_os in
3130    mingw*)
3131      # mingw values
3132      dll_entry=_DllMainCRTStartup@12
3133      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
3134      ;;
3135    esac
3136
3137    # mingw and cygwin differ, and it's simplest to just exclude the union
3138    # of the two symbol sets.
3139    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
3140
3141    # recent cygwin and mingw systems supply a stub DllMain which the user
3142    # can override, but on older systems we have to supply one (in ltdll.c)
3143    if test "x$lt_cv_need_dllmain" = "xyes"; then
3144      ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
3145      ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < [$]0 > $output_objdir/$soname-ltdll.c~
3146	test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
3147    else
3148      ltdll_obj=
3149      ltdll_cmds=
3150    fi
3151
3152    # Extract the symbol export list from an `--export-all' def file,
3153    # then regenerate the def file from the symbol export list, so that
3154    # the compiled dll only exports the symbol export list.
3155    # Be careful not to strip the DATA tag left be newer dlltools.
3156    export_symbols_cmds="$ltdll_cmds"'
3157      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
3158      sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
3159
3160    # If the export-symbols file already is a .def file (1st line
3161    # is EXPORTS), use it as is.
3162    # If DATA tags from a recent dlltool are present, honour them!
3163    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
3164	cp $export_symbols $output_objdir/$soname-def;
3165      else
3166	echo EXPORTS > $output_objdir/$soname-def;
3167	_lt_hint=1;
3168	cat $export_symbols | while read symbol; do
3169	 set dummy \$symbol;
3170	 case \$# in
3171	   2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
3172	   *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
3173	 esac;
3174	 _lt_hint=`expr 1 + \$_lt_hint`;
3175	done;
3176      fi~
3177      '"$ltdll_cmds"'
3178      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
3179      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
3180      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
3181      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
3182      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
3183    ;;
3184
3185  netbsd*)
3186    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3187      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
3188      wlarc=
3189    else
3190      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3191      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3192    fi
3193    ;;
3194
3195  solaris* | sysv5*)
3196    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
3197      ld_shlibs=no
3198      cat <<EOF 1>&2
3199
3200*** Warning: The releases 2.8.* of the GNU linker cannot reliably
3201*** create shared libraries on Solaris systems.  Therefore, libtool
3202*** is disabling shared libraries support.  We urge you to upgrade GNU
3203*** binutils to release 2.9.1 or newer.  Another option is to modify
3204*** your PATH or compiler configuration so that the native linker is
3205*** used, and then restart.
3206
3207EOF
3208    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
3209      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3210      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3211    else
3212      ld_shlibs=no
3213    fi
3214    ;;
3215
3216  sunos4*)
3217    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3218    wlarc=
3219    hardcode_direct=yes
3220    hardcode_shlibpath_var=no
3221    ;;
3222
3223  *)
3224    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
3225      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3226      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3227    else
3228      ld_shlibs=no
3229    fi
3230    ;;
3231  esac
3232
3233  if test "$ld_shlibs" = yes; then
3234    runpath_var=LD_RUN_PATH
3235    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
3236    export_dynamic_flag_spec='${wl}--export-dynamic'
3237    case $host_os in
3238    cygwin* | mingw* | pw32*)
3239      # dlltool doesn't understand --whole-archive et. al.
3240      whole_archive_flag_spec=
3241      ;;
3242    *)
3243      # ancient GNU ld didn't support --whole-archive et. al.
3244      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
3245	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3246      else
3247	whole_archive_flag_spec=
3248      fi
3249      ;;
3250    esac
3251  fi
3252else
3253  # PORTME fill in a description of your system's linker (not GNU ld)
3254  case $host_os in
3255  aix3*)
3256    allow_undefined_flag=unsupported
3257    always_export_symbols=yes
3258    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'
3259    # Note: this linker hardcodes the directories in LIBPATH if there
3260    # are no directories specified by -L.
3261    hardcode_minus_L=yes
3262    if test "$GCC" = yes && test -z "$link_static_flag"; then
3263      # Neither direct hardcoding nor static linking is supported with a
3264      # broken collect2.
3265      hardcode_direct=unsupported
3266    fi
3267    ;;
3268
3269  aix4* | aix5*)
3270    if test "$host_cpu" = ia64; then
3271      # On IA64, the linker does run time linking by default, so we don't
3272      # have to do anything special.
3273      aix_use_runtimelinking=no
3274      exp_sym_flag='-Bexport'
3275      no_entry_flag=""
3276    else
3277      aix_use_runtimelinking=no
3278
3279      # Test if we are trying to use run time linking or normal
3280      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3281      # need to do runtime linking.
3282      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
3283	for ld_flag in $LDFLAGS; do
3284	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
3285	    aix_use_runtimelinking=yes
3286	    break
3287	  fi
3288	done
3289      esac
3290
3291      exp_sym_flag='-bexport'
3292      no_entry_flag='-bnoentry'
3293    fi
3294
3295    # When large executables or shared objects are built, AIX ld can
3296    # have problems creating the table of contents.  If linking a library
3297    # or program results in "error TOC overflow" add -mminimal-toc to
3298    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3299    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3300
3301    hardcode_direct=yes
3302    archive_cmds=''
3303    hardcode_libdir_separator=':'
3304    if test "$GCC" = yes; then
3305      case $host_os in aix4.[012]|aix4.[012].*)
3306	collect2name=`${CC} -print-prog-name=collect2`
3307	if test -f "$collect2name" && \
3308	  strings "$collect2name" | grep resolve_lib_name >/dev/null
3309	then
3310	  # We have reworked collect2
3311	  hardcode_direct=yes
3312	else
3313	  # We have old collect2
3314	  hardcode_direct=unsupported
3315	  # It fails to find uninstalled libraries when the uninstalled
3316	  # path is not listed in the libpath.  Setting hardcode_minus_L
3317	  # to unsupported forces relinking
3318	  hardcode_minus_L=yes
3319	  hardcode_libdir_flag_spec='-L$libdir'
3320	  hardcode_libdir_separator=
3321	fi
3322      esac
3323
3324      shared_flag='-shared'
3325    else
3326      # not using gcc
3327      if test "$host_cpu" = ia64; then
3328	shared_flag='${wl}-G'
3329      else
3330	if test "$aix_use_runtimelinking" = yes; then
3331	  shared_flag='${wl}-G'
3332	else
3333	  shared_flag='${wl}-bM:SRE'
3334	fi
3335      fi
3336    fi
3337
3338    # It seems that -bexpall can do strange things, so it is better to
3339    # generate a list of symbols to export.
3340    always_export_symbols=yes
3341    if test "$aix_use_runtimelinking" = yes; then
3342      # Warning - without using the other runtime loading flags (-brtl),
3343      # -berok will link without error, but may produce a broken library.
3344      allow_undefined_flag='-berok'
3345      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
3346      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"
3347    else
3348      if test "$host_cpu" = ia64; then
3349	hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
3350	allow_undefined_flag="-z nodefs"
3351	archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3352      else
3353	hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
3354	# Warning - without using the other run time loading flags,
3355	# -berok will link without error, but may produce a broken library.
3356	allow_undefined_flag='${wl}-berok'
3357	# This is a bit strange, but is similar to how AIX traditionally builds
3358	# it's shared libraries.
3359	archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
3360      fi
3361    fi
3362    ;;
3363
3364  amigaos*)
3365    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)'
3366    hardcode_libdir_flag_spec='-L$libdir'
3367    hardcode_minus_L=yes
3368    # see comment about different semantics on the GNU ld section
3369    ld_shlibs=no
3370    ;;
3371
3372  cygwin* | mingw* | pw32*)
3373    # When not using gcc, we currently assume that we are using
3374    # Microsoft Visual C++.
3375    # hardcode_libdir_flag_spec is actually meaningless, as there is
3376    # no search path for DLLs.
3377    hardcode_libdir_flag_spec=' '
3378    allow_undefined_flag=unsupported
3379    # Tell ltmain to make .lib files, not .a files.
3380    libext=lib
3381    # FIXME: Setting linknames here is a bad hack.
3382    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
3383    # The linker will automatically build a .lib file if we build a DLL.
3384    old_archive_from_new_cmds='true'
3385    # FIXME: Should let the user specify the lib program.
3386    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
3387    fix_srcfile_path='`cygpath -w "$srcfile"`'
3388    ;;
3389
3390  darwin* | rhapsody*)
3391    case "$host_os" in
3392    rhapsody* | darwin1.[012])
3393      allow_undefined_flag='-undefined suppress'
3394      ;;
3395    *) # Darwin 1.3 on
3396      allow_undefined_flag='-flat_namespace -undefined suppress'
3397      ;;
3398    esac
3399    # FIXME: Relying on posixy $() will cause problems for
3400    #        cross-compilation, but unfortunately the echo tests do not
3401    #        yet detect zsh echo's removal of \ escapes.
3402    archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
3403    # We need to add '_' to the symbols in $export_symbols first
3404    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
3405    hardcode_direct=yes
3406    hardcode_shlibpath_var=no
3407    whole_archive_flag_spec='-all_load $convenience'
3408    ;;
3409
3410  freebsd1*)
3411    ld_shlibs=no
3412    ;;
3413
3414  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
3415  # support.  Future versions do this automatically, but an explicit c++rt0.o
3416  # does not break anything, and helps significantly (at the cost of a little
3417  # extra space).
3418  freebsd2.2*)
3419    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
3420    hardcode_libdir_flag_spec='-R$libdir'
3421    hardcode_direct=yes
3422    hardcode_shlibpath_var=no
3423    ;;
3424
3425  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
3426  freebsd2*)
3427    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3428    hardcode_direct=yes
3429    hardcode_minus_L=yes
3430    hardcode_shlibpath_var=no
3431    ;;
3432
3433  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
3434  freebsd*)
3435    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
3436    hardcode_libdir_flag_spec='-R$libdir'
3437    hardcode_direct=yes
3438    hardcode_shlibpath_var=no
3439    ;;
3440
3441  hpux9* | hpux10* | hpux11*)
3442    case $host_os in
3443    hpux9*) 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' ;;
3444    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
3445    esac
3446    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
3447    hardcode_libdir_separator=:
3448    hardcode_direct=yes
3449    hardcode_minus_L=yes # Not in the search PATH, but as the default
3450			 # location of the library.
3451    export_dynamic_flag_spec='${wl}-E'
3452    ;;
3453
3454  irix5* | irix6*)
3455    if test "$GCC" = yes; then
3456      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'
3457    else
3458      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'
3459    fi
3460    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3461    hardcode_libdir_separator=:
3462    link_all_deplibs=yes
3463    ;;
3464
3465  netbsd*)
3466    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3467      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
3468    else
3469      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
3470    fi
3471    hardcode_libdir_flag_spec='-R$libdir'
3472    hardcode_direct=yes
3473    hardcode_shlibpath_var=no
3474    ;;
3475
3476  newsos6)
3477    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3478    hardcode_direct=yes
3479    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3480    hardcode_libdir_separator=:
3481    hardcode_shlibpath_var=no
3482    ;;
3483
3484  openbsd*)
3485    hardcode_direct=yes
3486    hardcode_shlibpath_var=no
3487    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3488      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
3489      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
3490      export_dynamic_flag_spec='${wl}-E'
3491    else
3492      case "$host_os" in
3493      openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
3494	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3495	hardcode_libdir_flag_spec='-R$libdir'
3496        ;;
3497      *)
3498        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
3499        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
3500        ;;
3501      esac
3502    fi
3503    ;;
3504
3505  os2*)
3506    hardcode_libdir_flag_spec='-L$libdir'
3507    hardcode_minus_L=yes
3508    allow_undefined_flag=unsupported
3509    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'
3510    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
3511    ;;
3512
3513  osf3*)
3514    if test "$GCC" = yes; then
3515      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
3516      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'
3517    else
3518      allow_undefined_flag=' -expect_unresolved \*'
3519      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'
3520    fi
3521    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3522    hardcode_libdir_separator=:
3523    ;;
3524
3525  osf4* | osf5*)	# as osf3* with the addition of -msym flag
3526    if test "$GCC" = yes; then
3527      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
3528      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'
3529      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
3530    else
3531      allow_undefined_flag=' -expect_unresolved \*'
3532      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'
3533      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
3534      $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'
3535
3536      #Both c and cxx compiler support -rpath directly
3537      hardcode_libdir_flag_spec='-rpath $libdir'
3538    fi
3539    hardcode_libdir_separator=:
3540    ;;
3541
3542  sco3.2v5*)
3543    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3544    hardcode_shlibpath_var=no
3545    runpath_var=LD_RUN_PATH
3546    hardcode_runpath_var=yes
3547    export_dynamic_flag_spec='${wl}-Bexport'
3548    ;;
3549
3550  solaris*)
3551    no_undefined_flag=' -z defs'
3552    # $CC -shared without GNU ld will not create a library from C++
3553    # object files and a static libstdc++, better avoid it by now
3554    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
3555    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3556		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
3557    hardcode_libdir_flag_spec='-R$libdir'
3558    hardcode_shlibpath_var=no
3559    case $host_os in
3560    solaris2.[0-5] | solaris2.[0-5].*) ;;
3561    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
3562      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
3563    esac
3564    link_all_deplibs=yes
3565    ;;
3566
3567  sunos4*)
3568    if test "x$host_vendor" = xsequent; then
3569      # Use $CC to link under sequent, because it throws in some extra .o
3570      # files that make .init and .fini sections work.
3571      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
3572    else
3573      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
3574    fi
3575    hardcode_libdir_flag_spec='-L$libdir'
3576    hardcode_direct=yes
3577    hardcode_minus_L=yes
3578    hardcode_shlibpath_var=no
3579    ;;
3580
3581  sysv4)
3582    if test "x$host_vendor" = xsno; then
3583      archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
3584      hardcode_direct=yes # is this really true???
3585    else
3586      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3587      hardcode_direct=no #Motorola manual says yes, but my tests say they lie
3588    fi
3589    runpath_var='LD_RUN_PATH'
3590    hardcode_shlibpath_var=no
3591    ;;
3592
3593  sysv4.3*)
3594    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3595    hardcode_shlibpath_var=no
3596    export_dynamic_flag_spec='-Bexport'
3597    ;;
3598
3599  sysv5*)
3600    no_undefined_flag=' -z text'
3601    # $CC -shared without GNU ld will not create a library from C++
3602    # object files and a static libstdc++, better avoid it by now
3603    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
3604    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3605		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
3606    hardcode_libdir_flag_spec=
3607    hardcode_shlibpath_var=no
3608    runpath_var='LD_RUN_PATH'
3609    ;;
3610
3611  uts4*)
3612    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3613    hardcode_libdir_flag_spec='-L$libdir'
3614    hardcode_shlibpath_var=no
3615    ;;
3616
3617  dgux*)
3618    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3619    hardcode_libdir_flag_spec='-L$libdir'
3620    hardcode_shlibpath_var=no
3621    ;;
3622
3623  sysv4*MP*)
3624    if test -d /usr/nec; then
3625      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3626      hardcode_shlibpath_var=no
3627      runpath_var=LD_RUN_PATH
3628      hardcode_runpath_var=yes
3629      ld_shlibs=yes
3630    fi
3631    ;;
3632
3633  sysv4.2uw2*)
3634    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
3635    hardcode_direct=yes
3636    hardcode_minus_L=no
3637    hardcode_shlibpath_var=no
3638    hardcode_runpath_var=yes
3639    runpath_var=LD_RUN_PATH
3640    ;;
3641
3642  sysv5uw7* | unixware7*)
3643    no_undefined_flag='${wl}-z ${wl}text'
3644    if test "$GCC" = yes; then
3645      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3646    else
3647      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3648    fi
3649    runpath_var='LD_RUN_PATH'
3650    hardcode_shlibpath_var=no
3651    ;;
3652
3653  *)
3654    ld_shlibs=no
3655    ;;
3656  esac
3657fi
3658echo "$ac_t""$ld_shlibs" 1>&6
3659test "$ld_shlibs" = no && can_build_shared=no
3660
3661# Check hardcoding attributes.
3662echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
3663echo "configure:3676: checking how to hardcode library paths into programs" >&5
3664hardcode_action=
3665if test -n "$hardcode_libdir_flag_spec" || \
3666   test -n "$runpath_var"; then
3667
3668  # We can hardcode non-existant directories.
3669  if test "$hardcode_direct" != no &&
3670     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3671     # have to relink, otherwise we might link with an installed library
3672     # when we should be linking with a yet-to-be-installed one
3673     ## test "$hardcode_shlibpath_var" != no &&
3674     test "$hardcode_minus_L" != no; then
3675    # Linking always hardcodes the temporary library directory.
3676    hardcode_action=relink
3677  else
3678    # We can link without hardcoding, and we can hardcode nonexisting dirs.
3679    hardcode_action=immediate
3680  fi
3681else
3682  # We cannot hardcode anything, or else we can only hardcode existing
3683  # directories.
3684  hardcode_action=unsupported
3685fi
3686echo "$ac_t""$hardcode_action" 1>&6
3687
3688striplib=
3689old_striplib=
3690echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
3691echo "configure:3704: checking whether stripping libraries is possible" >&5
3692if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
3693  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3694  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3695  echo "$ac_t""yes" 1>&6
3696else
3697  echo "$ac_t""no" 1>&6
3698fi
3699
3700reload_cmds='$LD$reload_flag -o $output$reload_objs'
3701test -z "$deplibs_check_method" && deplibs_check_method=unknown
3702
3703# PORTME Fill in your ld.so characteristics
3704echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
3705echo "configure:3718: checking dynamic linker characteristics" >&5
3706library_names_spec=
3707libname_spec='lib$name'
3708soname_spec=
3709postinstall_cmds=
3710postuninstall_cmds=
3711finish_cmds=
3712finish_eval=
3713shlibpath_var=
3714shlibpath_overrides_runpath=unknown
3715version_type=none
3716dynamic_linker="$host_os ld.so"
3717sys_lib_dlsearch_path_spec="/lib /usr/lib"
3718sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3719
3720case $host_os in
3721aix3*)
3722  version_type=linux
3723  library_names_spec='${libname}${release}.so$versuffix $libname.a'
3724  shlibpath_var=LIBPATH
3725
3726  # AIX has no versioning support, so we append a major version to the name.
3727  soname_spec='${libname}${release}.so$major'
3728  ;;
3729
3730aix4* | aix5*)
3731  version_type=linux
3732  if test "$host_cpu" = ia64; then
3733    # AIX 5 supports IA64
3734    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
3735    shlibpath_var=LD_LIBRARY_PATH
3736  else
3737    # With GCC up to 2.95.x, collect2 would create an import file
3738    # for dependence libraries.  The import file would start with
3739    # the line `#! .'.  This would cause the generated library to
3740    # depend on `.', always an invalid library.  This was fixed in
3741    # development snapshots of GCC prior to 3.0.
3742    case $host_os in
3743       aix4 | aix4.[01] | aix4.[01].*)
3744      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3745	   echo ' yes '
3746	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
3747	:
3748      else
3749	can_build_shared=no
3750      fi
3751      ;;
3752    esac
3753    # AIX (on Power*) has no versioning support, so currently we can
3754    # not hardcode correct soname into executable. Probably we can
3755    # add versioning support to collect2, so additional links can
3756    # be useful in future.
3757    if test "$aix_use_runtimelinking" = yes; then
3758      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3759      # instead of lib<name>.a to let people know that these are not
3760      # typical AIX shared libraries.
3761      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3762    else
3763      # We preserve .a as extension for shared libraries through AIX4.2
3764      # and later when we are not doing run time linking.
3765      library_names_spec='${libname}${release}.a $libname.a'
3766      soname_spec='${libname}${release}.so$major'
3767    fi
3768    shlibpath_var=LIBPATH
3769  fi
3770  ;;
3771
3772amigaos*)
3773  library_names_spec='$libname.ixlibrary $libname.a'
3774  # Create ${libname}_ixlibrary.a entries in /sys/libs.
3775  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'
3776  ;;
3777
3778beos*)
3779  library_names_spec='${libname}.so'
3780  dynamic_linker="$host_os ld.so"
3781  shlibpath_var=LIBRARY_PATH
3782  ;;
3783
3784bsdi4*)
3785  version_type=linux
3786  need_version=no
3787  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3788  soname_spec='${libname}${release}.so$major'
3789  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3790  shlibpath_var=LD_LIBRARY_PATH
3791  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3792  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3793  export_dynamic_flag_spec=-rdynamic
3794  # the default ld.so.conf also contains /usr/contrib/lib and
3795  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3796  # libtool to hard-code these into programs
3797  ;;
3798
3799cygwin* | mingw* | pw32*)
3800  version_type=windows
3801  need_version=no
3802  need_lib_prefix=no
3803  case $GCC,$host_os in
3804  yes,cygwin*)
3805    library_names_spec='$libname.dll.a'
3806    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3807    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
3808      dldir=$destdir/`dirname \$dlpath`~
3809      test -d \$dldir || mkdir -p \$dldir~
3810      $install_prog .libs/$dlname \$dldir/$dlname'
3811    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
3812      dlpath=$dir/\$dldll~
3813       $rm \$dlpath'
3814    ;;
3815  yes,mingw*)
3816    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3817    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
3818    ;;
3819  yes,pw32*)
3820    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
3821    ;;
3822  *)
3823    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
3824    ;;
3825  esac
3826  dynamic_linker='Win32 ld.exe'
3827  # FIXME: first we should search . and the directory the executable is in
3828  shlibpath_var=PATH
3829  ;;
3830
3831darwin* | rhapsody*)
3832  dynamic_linker="$host_os dyld"
3833  version_type=darwin
3834  need_lib_prefix=no
3835  need_version=no
3836  # FIXME: Relying on posixy $() will cause problems for
3837  #        cross-compilation, but unfortunately the echo tests do not
3838  #        yet detect zsh echo's removal of \ escapes.
3839  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
3840  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
3841  shlibpath_overrides_runpath=yes
3842  shlibpath_var=DYLD_LIBRARY_PATH
3843  ;;
3844
3845freebsd1*)
3846  dynamic_linker=no
3847  ;;
3848
3849freebsd*)
3850  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3851  version_type=freebsd-$objformat
3852  case $version_type in
3853    freebsd-elf*)
3854      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3855      need_version=no
3856      need_lib_prefix=no
3857      ;;
3858    freebsd-*)
3859      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
3860      need_version=yes
3861      ;;
3862  esac
3863  shlibpath_var=LD_LIBRARY_PATH
3864  case $host_os in
3865  freebsd2*)
3866    shlibpath_overrides_runpath=yes
3867    ;;
3868  *)
3869    shlibpath_overrides_runpath=no
3870    hardcode_into_libs=yes
3871    ;;
3872  esac
3873  ;;
3874
3875gnu*)
3876  version_type=linux
3877  need_lib_prefix=no
3878  need_version=no
3879  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
3880  soname_spec='${libname}${release}.so$major'
3881  shlibpath_var=LD_LIBRARY_PATH
3882  hardcode_into_libs=yes
3883  ;;
3884
3885hpux9* | hpux10* | hpux11*)
3886  # Give a soname corresponding to the major version so that dld.sl refuses to
3887  # link against other versions.
3888  dynamic_linker="$host_os dld.sl"
3889  version_type=sunos
3890  need_lib_prefix=no
3891  need_version=no
3892  shlibpath_var=SHLIB_PATH
3893  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3894  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
3895  soname_spec='${libname}${release}.sl$major'
3896  # HP-UX runs *really* slowly unless shared libraries are mode 555.
3897  postinstall_cmds='chmod 555 $lib'
3898  ;;
3899
3900irix5* | irix6*)
3901  version_type=irix
3902  need_lib_prefix=no
3903  need_version=no
3904  soname_spec='${libname}${release}.so$major'
3905  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
3906  case $host_os in
3907  irix5*)
3908    libsuff= shlibsuff=
3909    ;;
3910  *)
3911    case $LD in # libtool.m4 will add one of these switches to LD
3912    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
3913    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
3914    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
3915    *) libsuff= shlibsuff= libmagic=never-match;;
3916    esac
3917    ;;
3918  esac
3919  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3920  shlibpath_overrides_runpath=no
3921  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3922  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3923  ;;
3924
3925# No shared lib support for Linux oldld, aout, or coff.
3926linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
3927  dynamic_linker=no
3928  ;;
3929
3930# This must be Linux ELF.
3931linux-gnu*)
3932  version_type=linux
3933  need_lib_prefix=no
3934  need_version=no
3935  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3936  soname_spec='${libname}${release}.so$major'
3937  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3938  shlibpath_var=LD_LIBRARY_PATH
3939  shlibpath_overrides_runpath=no
3940  # This implies no fast_install, which is unacceptable.
3941  # Some rework will be needed to allow for fast_install
3942  # before this can be enabled.
3943  hardcode_into_libs=yes
3944
3945  # We used to test for /lib/ld.so.1 and disable shared libraries on
3946  # powerpc, because MkLinux only supported shared libraries with the
3947  # GNU dynamic linker.  Since this was broken with cross compilers,
3948  # most powerpc-linux boxes support dynamic linking these days and
3949  # people can always --disable-shared, the test was removed, and we
3950  # assume the GNU/Linux dynamic linker is in use.
3951  dynamic_linker='GNU/Linux ld.so'
3952  ;;
3953
3954netbsd*)
3955  version_type=sunos
3956  need_lib_prefix=no
3957  need_version=no
3958  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3959    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3960    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3961    dynamic_linker='NetBSD (a.out) ld.so'
3962  else
3963    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
3964    soname_spec='${libname}${release}.so$major'
3965    dynamic_linker='NetBSD ld.elf_so'
3966  fi
3967  shlibpath_var=LD_LIBRARY_PATH
3968  shlibpath_overrides_runpath=yes
3969  hardcode_into_libs=yes
3970  ;;
3971
3972newsos6)
3973  version_type=linux
3974  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3975  shlibpath_var=LD_LIBRARY_PATH
3976  shlibpath_overrides_runpath=yes
3977  ;;
3978
3979openbsd*)
3980  version_type=sunos
3981  need_lib_prefix=no
3982  need_version=no
3983  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3984    case "$host_os" in
3985    openbsd2.[89] | openbsd2.[89].*)
3986      shlibpath_overrides_runpath=no
3987      ;;
3988    *)
3989      shlibpath_overrides_runpath=yes
3990      ;;
3991    esac
3992  else
3993    shlibpath_overrides_runpath=yes
3994  fi
3995  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3996  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3997  shlibpath_var=LD_LIBRARY_PATH
3998  ;;
3999
4000os2*)
4001  libname_spec='$name'
4002  need_lib_prefix=no
4003  library_names_spec='$libname.dll $libname.a'
4004  dynamic_linker='OS/2 ld.exe'
4005  shlibpath_var=LIBPATH
4006  ;;
4007
4008osf3* | osf4* | osf5*)
4009  version_type=osf
4010  need_version=no
4011  soname_spec='${libname}${release}.so'
4012  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
4013  shlibpath_var=LD_LIBRARY_PATH
4014  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4015  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4016  ;;
4017
4018sco3.2v5*)
4019  version_type=osf
4020  soname_spec='${libname}${release}.so$major'
4021  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4022  shlibpath_var=LD_LIBRARY_PATH
4023  ;;
4024
4025solaris*)
4026  version_type=linux
4027  need_lib_prefix=no
4028  need_version=no
4029  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4030  soname_spec='${libname}${release}.so$major'
4031  shlibpath_var=LD_LIBRARY_PATH
4032  shlibpath_overrides_runpath=yes
4033  hardcode_into_libs=yes
4034  # ldd complains unless libraries are executable
4035  postinstall_cmds='chmod +x $lib'
4036  ;;
4037
4038sunos4*)
4039  version_type=sunos
4040  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
4041  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4042  shlibpath_var=LD_LIBRARY_PATH
4043  shlibpath_overrides_runpath=yes
4044  if test "$with_gnu_ld" = yes; then
4045    need_lib_prefix=no
4046  fi
4047  need_version=yes
4048  ;;
4049
4050sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4051  version_type=linux
4052  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4053  soname_spec='${libname}${release}.so$major'
4054  shlibpath_var=LD_LIBRARY_PATH
4055  case $host_vendor in
4056    sni)
4057      shlibpath_overrides_runpath=no
4058      ;;
4059    motorola)
4060      need_lib_prefix=no
4061      need_version=no
4062      shlibpath_overrides_runpath=no
4063      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4064      ;;
4065  esac
4066  ;;
4067
4068uts4*)
4069  version_type=linux
4070  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4071  soname_spec='${libname}${release}.so$major'
4072  shlibpath_var=LD_LIBRARY_PATH
4073  ;;
4074
4075dgux*)
4076  version_type=linux
4077  need_lib_prefix=no
4078  need_version=no
4079  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
4080  soname_spec='${libname}${release}.so$major'
4081  shlibpath_var=LD_LIBRARY_PATH
4082  ;;
4083
4084sysv4*MP*)
4085  if test -d /usr/nec ;then
4086    version_type=linux
4087    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
4088    soname_spec='$libname.so.$major'
4089    shlibpath_var=LD_LIBRARY_PATH
4090  fi
4091  ;;
4092
4093*)
4094  dynamic_linker=no
4095  ;;
4096esac
4097echo "$ac_t""$dynamic_linker" 1>&6
4098test "$dynamic_linker" = no && can_build_shared=no
4099
4100# Report the final consequences.
4101echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
4102echo "configure:4115: checking if libtool supports shared libraries" >&5
4103echo "$ac_t""$can_build_shared" 1>&6
4104
4105echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
4106echo "configure:4119: checking whether to build shared libraries" >&5
4107test "$can_build_shared" = "no" && enable_shared=no
4108
4109# On AIX, shared libraries and static libraries use the same namespace, and
4110# are all built from PIC.
4111case "$host_os" in
4112aix3*)
4113  test "$enable_shared" = yes && enable_static=no
4114  if test -n "$RANLIB"; then
4115    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4116    postinstall_cmds='$RANLIB $lib'
4117  fi
4118  ;;
4119
4120aix4*)
4121  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4122    test "$enable_shared" = yes && enable_static=no
4123  fi
4124  ;;
4125esac
4126echo "$ac_t""$enable_shared" 1>&6
4127
4128echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
4129echo "configure:4142: checking whether to build static libraries" >&5
4130# Make sure either enable_shared or enable_static is yes.
4131test "$enable_shared" = yes || enable_static=yes
4132echo "$ac_t""$enable_static" 1>&6
4133
4134if test "$hardcode_action" = relink; then
4135  # Fast installation is not supported
4136  enable_fast_install=no
4137elif test "$shlibpath_overrides_runpath" = yes ||
4138     test "$enable_shared" = no; then
4139  # Fast installation is not necessary
4140  enable_fast_install=needless
4141fi
4142
4143variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4144if test "$GCC" = yes; then
4145  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4146fi
4147
4148if test "x$enable_dlopen" != xyes; then
4149  enable_dlopen=unknown
4150  enable_dlopen_self=unknown
4151  enable_dlopen_self_static=unknown
4152else
4153  lt_cv_dlopen=no
4154  lt_cv_dlopen_libs=
4155
4156  case $host_os in
4157  beos*)
4158    lt_cv_dlopen="load_add_on"
4159    lt_cv_dlopen_libs=
4160    lt_cv_dlopen_self=yes
4161    ;;
4162
4163  cygwin* | mingw* | pw32*)
4164    lt_cv_dlopen="LoadLibrary"
4165    lt_cv_dlopen_libs=
4166   ;;
4167
4168  *)
4169    echo $ac_n "checking for shl_load""... $ac_c" 1>&6
4170echo "configure:4183: checking for shl_load" >&5
4171if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
4172  echo $ac_n "(cached) $ac_c" 1>&6
4173else
4174  cat > conftest.$ac_ext <<EOF
4175#line 4188 "configure"
4176#include "confdefs.h"
4177/* System header to define __stub macros and hopefully few prototypes,
4178    which can conflict with char shl_load(); below.  */
4179#include <assert.h>
4180/* Override any gcc2 internal prototype to avoid an error.  */
4181/* We use char because int might match the return type of a gcc2
4182    builtin and then its argument prototype would still apply.  */
4183char shl_load();
4184
4185int main() {
4186
4187/* The GNU C library defines this for functions which it implements
4188    to always fail with ENOSYS.  Some functions are actually named
4189    something starting with __ and the normal name is an alias.  */
4190#if defined (__stub_shl_load) || defined (__stub___shl_load)
4191choke me
4192#else
4193shl_load();
4194#endif
4195
4196; return 0; }
4197EOF
4198if { (eval echo configure:4211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4199  rm -rf conftest*
4200  eval "ac_cv_func_shl_load=yes"
4201else
4202  echo "configure: failed program was:" >&5
4203  cat conftest.$ac_ext >&5
4204  rm -rf conftest*
4205  eval "ac_cv_func_shl_load=no"
4206fi
4207rm -f conftest*
4208fi
4209
4210if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
4211  echo "$ac_t""yes" 1>&6
4212  lt_cv_dlopen="shl_load"
4213else
4214  echo "$ac_t""no" 1>&6
4215echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
4216echo "configure:4229: checking for shl_load in -ldld" >&5
4217ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
4218if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4219  echo $ac_n "(cached) $ac_c" 1>&6
4220else
4221  ac_save_LIBS="$LIBS"
4222LIBS="-ldld  $LIBS"
4223cat > conftest.$ac_ext <<EOF
4224#line 4237 "configure"
4225#include "confdefs.h"
4226/* Override any gcc2 internal prototype to avoid an error.  */
4227/* We use char because int might match the return type of a gcc2
4228    builtin and then its argument prototype would still apply.  */
4229char shl_load();
4230
4231int main() {
4232shl_load()
4233; return 0; }
4234EOF
4235if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4236  rm -rf conftest*
4237  eval "ac_cv_lib_$ac_lib_var=yes"
4238else
4239  echo "configure: failed program was:" >&5
4240  cat conftest.$ac_ext >&5
4241  rm -rf conftest*
4242  eval "ac_cv_lib_$ac_lib_var=no"
4243fi
4244rm -f conftest*
4245LIBS="$ac_save_LIBS"
4246
4247fi
4248if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4249  echo "$ac_t""yes" 1>&6
4250  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
4251else
4252  echo "$ac_t""no" 1>&6
4253echo $ac_n "checking for dlopen""... $ac_c" 1>&6
4254echo "configure:4267: checking for dlopen" >&5
4255if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
4256  echo $ac_n "(cached) $ac_c" 1>&6
4257else
4258  cat > conftest.$ac_ext <<EOF
4259#line 4272 "configure"
4260#include "confdefs.h"
4261/* System header to define __stub macros and hopefully few prototypes,
4262    which can conflict with char dlopen(); below.  */
4263#include <assert.h>
4264/* Override any gcc2 internal prototype to avoid an error.  */
4265/* We use char because int might match the return type of a gcc2
4266    builtin and then its argument prototype would still apply.  */
4267char dlopen();
4268
4269int main() {
4270
4271/* The GNU C library defines this for functions which it implements
4272    to always fail with ENOSYS.  Some functions are actually named
4273    something starting with __ and the normal name is an alias.  */
4274#if defined (__stub_dlopen) || defined (__stub___dlopen)
4275choke me
4276#else
4277dlopen();
4278#endif
4279
4280; return 0; }
4281EOF
4282if { (eval echo configure:4295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4283  rm -rf conftest*
4284  eval "ac_cv_func_dlopen=yes"
4285else
4286  echo "configure: failed program was:" >&5
4287  cat conftest.$ac_ext >&5
4288  rm -rf conftest*
4289  eval "ac_cv_func_dlopen=no"
4290fi
4291rm -f conftest*
4292fi
4293
4294if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
4295  echo "$ac_t""yes" 1>&6
4296  lt_cv_dlopen="dlopen"
4297else
4298  echo "$ac_t""no" 1>&6
4299echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4300echo "configure:4313: checking for dlopen in -ldl" >&5
4301ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4302if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4303  echo $ac_n "(cached) $ac_c" 1>&6
4304else
4305  ac_save_LIBS="$LIBS"
4306LIBS="-ldl  $LIBS"
4307cat > conftest.$ac_ext <<EOF
4308#line 4321 "configure"
4309#include "confdefs.h"
4310/* Override any gcc2 internal prototype to avoid an error.  */
4311/* We use char because int might match the return type of a gcc2
4312    builtin and then its argument prototype would still apply.  */
4313char dlopen();
4314
4315int main() {
4316dlopen()
4317; return 0; }
4318EOF
4319if { (eval echo configure:4332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4320  rm -rf conftest*
4321  eval "ac_cv_lib_$ac_lib_var=yes"
4322else
4323  echo "configure: failed program was:" >&5
4324  cat conftest.$ac_ext >&5
4325  rm -rf conftest*
4326  eval "ac_cv_lib_$ac_lib_var=no"
4327fi
4328rm -f conftest*
4329LIBS="$ac_save_LIBS"
4330
4331fi
4332if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4333  echo "$ac_t""yes" 1>&6
4334  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
4335else
4336  echo "$ac_t""no" 1>&6
4337echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
4338echo "configure:4351: checking for dlopen in -lsvld" >&5
4339ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'`
4340if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4341  echo $ac_n "(cached) $ac_c" 1>&6
4342else
4343  ac_save_LIBS="$LIBS"
4344LIBS="-lsvld  $LIBS"
4345cat > conftest.$ac_ext <<EOF
4346#line 4359 "configure"
4347#include "confdefs.h"
4348/* Override any gcc2 internal prototype to avoid an error.  */
4349/* We use char because int might match the return type of a gcc2
4350    builtin and then its argument prototype would still apply.  */
4351char dlopen();
4352
4353int main() {
4354dlopen()
4355; return 0; }
4356EOF
4357if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4358  rm -rf conftest*
4359  eval "ac_cv_lib_$ac_lib_var=yes"
4360else
4361  echo "configure: failed program was:" >&5
4362  cat conftest.$ac_ext >&5
4363  rm -rf conftest*
4364  eval "ac_cv_lib_$ac_lib_var=no"
4365fi
4366rm -f conftest*
4367LIBS="$ac_save_LIBS"
4368
4369fi
4370if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4371  echo "$ac_t""yes" 1>&6
4372  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
4373else
4374  echo "$ac_t""no" 1>&6
4375echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
4376echo "configure:4389: checking for dld_link in -ldld" >&5
4377ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
4378if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4379  echo $ac_n "(cached) $ac_c" 1>&6
4380else
4381  ac_save_LIBS="$LIBS"
4382LIBS="-ldld  $LIBS"
4383cat > conftest.$ac_ext <<EOF
4384#line 4397 "configure"
4385#include "confdefs.h"
4386/* Override any gcc2 internal prototype to avoid an error.  */
4387/* We use char because int might match the return type of a gcc2
4388    builtin and then its argument prototype would still apply.  */
4389char dld_link();
4390
4391int main() {
4392dld_link()
4393; return 0; }
4394EOF
4395if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4396  rm -rf conftest*
4397  eval "ac_cv_lib_$ac_lib_var=yes"
4398else
4399  echo "configure: failed program was:" >&5
4400  cat conftest.$ac_ext >&5
4401  rm -rf conftest*
4402  eval "ac_cv_lib_$ac_lib_var=no"
4403fi
4404rm -f conftest*
4405LIBS="$ac_save_LIBS"
4406
4407fi
4408if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4409  echo "$ac_t""yes" 1>&6
4410  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
4411else
4412  echo "$ac_t""no" 1>&6
4413fi
4414
4415
4416fi
4417
4418
4419fi
4420
4421
4422fi
4423
4424
4425fi
4426
4427
4428fi
4429
4430    ;;
4431  esac
4432
4433  if test "x$lt_cv_dlopen" != xno; then
4434    enable_dlopen=yes
4435  else
4436    enable_dlopen=no
4437  fi
4438
4439  case $lt_cv_dlopen in
4440  dlopen)
4441    save_CPPFLAGS="$CPPFLAGS"
4442        test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4443
4444    save_LDFLAGS="$LDFLAGS"
4445    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4446
4447    save_LIBS="$LIBS"
4448    LIBS="$lt_cv_dlopen_libs $LIBS"
4449
4450    echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
4451echo "configure:4464: checking whether a program can dlopen itself" >&5
4452if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then
4453  echo $ac_n "(cached) $ac_c" 1>&6
4454else
4455  	  if test "$cross_compiling" = yes; then :
4456  lt_cv_dlopen_self=cross
4457else
4458    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
4459  lt_status=$lt_dlunknown
4460  cat > conftest.$ac_ext <<EOF
4461#line 4474 "configure"
4462#include "confdefs.h"
4463
4464#if HAVE_DLFCN_H
4465#include <dlfcn.h>
4466#endif
4467
4468#include <stdio.h>
4469
4470#ifdef RTLD_GLOBAL
4471#  define LT_DLGLOBAL		RTLD_GLOBAL
4472#else
4473#  ifdef DL_GLOBAL
4474#    define LT_DLGLOBAL		DL_GLOBAL
4475#  else
4476#    define LT_DLGLOBAL		0
4477#  endif
4478#endif
4479
4480/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
4481   find out it does not work in some platform. */
4482#ifndef LT_DLLAZY_OR_NOW
4483#  ifdef RTLD_LAZY
4484#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
4485#  else
4486#    ifdef DL_LAZY
4487#      define LT_DLLAZY_OR_NOW		DL_LAZY
4488#    else
4489#      ifdef RTLD_NOW
4490#        define LT_DLLAZY_OR_NOW	RTLD_NOW
4491#      else
4492#        ifdef DL_NOW
4493#          define LT_DLLAZY_OR_NOW	DL_NOW
4494#        else
4495#          define LT_DLLAZY_OR_NOW	0
4496#        endif
4497#      endif
4498#    endif
4499#  endif
4500#endif
4501
4502#ifdef __cplusplus
4503extern "C" void exit (int);
4504#endif
4505
4506void fnord() { int i=42;}
4507int main ()
4508{
4509  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4510  int status = $lt_dlunknown;
4511
4512  if (self)
4513    {
4514      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4515      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
4516      /* dlclose (self); */
4517    }
4518
4519    exit (status);
4520}
4521EOF
4522  if { (eval echo configure:4535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
4523    (./conftest; exit; ) 2>/dev/null
4524    lt_status=$?
4525    case x$lt_status in
4526      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
4527      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
4528      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
4529    esac
4530  else :
4531    # compilation failed
4532    lt_cv_dlopen_self=no
4533  fi
4534fi
4535rm -fr conftest*
4536
4537
4538fi
4539
4540echo "$ac_t""$lt_cv_dlopen_self" 1>&6
4541
4542    if test "x$lt_cv_dlopen_self" = xyes; then
4543      LDFLAGS="$LDFLAGS $link_static_flag"
4544      echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
4545echo "configure:4558: checking whether a statically linked program can dlopen itself" >&5
4546if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then
4547  echo $ac_n "(cached) $ac_c" 1>&6
4548else
4549  	  if test "$cross_compiling" = yes; then :
4550  lt_cv_dlopen_self_static=cross
4551else
4552    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
4553  lt_status=$lt_dlunknown
4554  cat > conftest.$ac_ext <<EOF
4555#line 4568 "configure"
4556#include "confdefs.h"
4557
4558#if HAVE_DLFCN_H
4559#include <dlfcn.h>
4560#endif
4561
4562#include <stdio.h>
4563
4564#ifdef RTLD_GLOBAL
4565#  define LT_DLGLOBAL		RTLD_GLOBAL
4566#else
4567#  ifdef DL_GLOBAL
4568#    define LT_DLGLOBAL		DL_GLOBAL
4569#  else
4570#    define LT_DLGLOBAL		0
4571#  endif
4572#endif
4573
4574/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
4575   find out it does not work in some platform. */
4576#ifndef LT_DLLAZY_OR_NOW
4577#  ifdef RTLD_LAZY
4578#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
4579#  else
4580#    ifdef DL_LAZY
4581#      define LT_DLLAZY_OR_NOW		DL_LAZY
4582#    else
4583#      ifdef RTLD_NOW
4584#        define LT_DLLAZY_OR_NOW	RTLD_NOW
4585#      else
4586#        ifdef DL_NOW
4587#          define LT_DLLAZY_OR_NOW	DL_NOW
4588#        else
4589#          define LT_DLLAZY_OR_NOW	0
4590#        endif
4591#      endif
4592#    endif
4593#  endif
4594#endif
4595
4596#ifdef __cplusplus
4597extern "C" void exit (int);
4598#endif
4599
4600void fnord() { int i=42;}
4601int main ()
4602{
4603  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4604  int status = $lt_dlunknown;
4605
4606  if (self)
4607    {
4608      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4609      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
4610      /* dlclose (self); */
4611    }
4612
4613    exit (status);
4614}
4615EOF
4616  if { (eval echo configure:4629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
4617    (./conftest; exit; ) 2>/dev/null
4618    lt_status=$?
4619    case x$lt_status in
4620      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
4621      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
4622      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
4623    esac
4624  else :
4625    # compilation failed
4626    lt_cv_dlopen_self_static=no
4627  fi
4628fi
4629rm -fr conftest*
4630
4631
4632fi
4633
4634echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
4635    fi
4636
4637    CPPFLAGS="$save_CPPFLAGS"
4638    LDFLAGS="$save_LDFLAGS"
4639    LIBS="$save_LIBS"
4640    ;;
4641  esac
4642
4643  case $lt_cv_dlopen_self in
4644  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4645  *) enable_dlopen_self=unknown ;;
4646  esac
4647
4648  case $lt_cv_dlopen_self_static in
4649  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4650  *) enable_dlopen_self_static=unknown ;;
4651  esac
4652fi
4653
4654
4655if test "$enable_shared" = yes && test "$GCC" = yes; then
4656  case $archive_cmds in
4657  *'~'*)
4658    # FIXME: we may have to deal with multi-command sequences.
4659    ;;
4660  '$CC '*)
4661    # Test whether the compiler implicitly links with -lc since on some
4662    # systems, -lgcc has to come before -lc. If gcc already passes -lc
4663    # to ld, don't add -lc before -lgcc.
4664    echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
4665echo "configure:4678: checking whether -lc should be explicitly linked in" >&5
4666    if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then
4667  echo $ac_n "(cached) $ac_c" 1>&6
4668else
4669  $rm conftest*
4670    echo 'static int dummy;' > conftest.$ac_ext
4671
4672    if { (eval echo configure:4685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4673      soname=conftest
4674      lib=conftest
4675      libobjs=conftest.$ac_objext
4676      deplibs=
4677      wl=$lt_cv_prog_cc_wl
4678      compiler_flags=-v
4679      linker_flags=-v
4680      verstring=
4681      output_objdir=.
4682      libname=conftest
4683      save_allow_undefined_flag=$allow_undefined_flag
4684      allow_undefined_flag=
4685      if { (eval echo configure:4698: \"$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; }
4686      then
4687	lt_cv_archive_cmds_need_lc=no
4688      else
4689	lt_cv_archive_cmds_need_lc=yes
4690      fi
4691      allow_undefined_flag=$save_allow_undefined_flag
4692    else
4693      cat conftest.err 1>&5
4694    fi
4695fi
4696
4697    echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
4698    ;;
4699  esac
4700fi
4701need_lc=${lt_cv_archive_cmds_need_lc-yes}
4702
4703# The second clause should only fire when bootstrapping the
4704# libtool distribution, otherwise you forgot to ship ltmain.sh
4705# with your package, and you will get complaints that there are
4706# no rules to generate ltmain.sh.
4707if test -f "$ltmain"; then
4708  :
4709else
4710  # If there is no Makefile yet, we rely on a make rule to execute
4711  # `config.status --recheck' to rerun these tests and create the
4712  # libtool script then.
4713  test -f Makefile && make "$ltmain"
4714fi
4715
4716if test -f "$ltmain"; then
4717  trap "$rm \"${ofile}T\"; exit 1" 1 2 15
4718  $rm -f "${ofile}T"
4719
4720  echo creating $ofile
4721
4722  # Now quote all the things that may contain metacharacters while being
4723  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4724  # variables and quote the copies for generation of the libtool script.
4725  for var in echo old_CC old_CFLAGS \
4726    AR AR_FLAGS CC LD LN_S NM SHELL \
4727    reload_flag reload_cmds wl \
4728    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
4729    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
4730    library_names_spec soname_spec \
4731    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
4732    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
4733    postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
4734    old_striplib striplib file_magic_cmd export_symbols_cmds \
4735    deplibs_check_method allow_undefined_flag no_undefined_flag \
4736    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
4737    global_symbol_to_c_name_address \
4738    hardcode_libdir_flag_spec hardcode_libdir_separator  \
4739    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4740    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
4741
4742    case $var in
4743    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
4744    old_postinstall_cmds | old_postuninstall_cmds | \
4745    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
4746    extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
4747    postinstall_cmds | postuninstall_cmds | \
4748    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4749      # Double-quote double-evaled strings.
4750      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4751      ;;
4752    *)
4753      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4754      ;;
4755    esac
4756  done
4757
4758  cat <<__EOF__ > "${ofile}T"
4759#! $SHELL
4760
4761# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4762# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4763# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4764#
4765# Copyright (C) 1996-2000 Free Software Foundation, Inc.
4766# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4767#
4768# This program is free software; you can redistribute it and/or modify
4769# it under the terms of the GNU General Public License as published by
4770# the Free Software Foundation; either version 2 of the License, or
4771# (at your option) any later version.
4772#
4773# This program is distributed in the hope that it will be useful, but
4774# WITHOUT ANY WARRANTY; without even the implied warranty of
4775# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4776# General Public License for more details.
4777#
4778# You should have received a copy of the GNU General Public License
4779# along with this program; if not, write to the Free Software
4780# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4781#
4782# As a special exception to the GNU General Public License, if you
4783# distribute this file as part of a program that contains a
4784# configuration script generated by Autoconf, you may include it under
4785# the same distribution terms that you use for the rest of that program.
4786
4787# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4788Xsed="sed -e s/^X//"
4789
4790# The HP-UX ksh and POSIX shell print the target directory to stdout
4791# if CDPATH is set.
4792if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4793
4794# ### BEGIN LIBTOOL CONFIG
4795
4796# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4797
4798# Shell to use when invoking shell scripts.
4799SHELL=$lt_SHELL
4800
4801# Whether or not to build shared libraries.
4802build_libtool_libs=$enable_shared
4803
4804# Whether or not to build static libraries.
4805build_old_libs=$enable_static
4806
4807# Whether or not to add -lc for building shared libraries.
4808build_libtool_need_lc=$need_lc
4809
4810# Whether or not to optimize for fast installation.
4811fast_install=$enable_fast_install
4812
4813# The host system.
4814host_alias=$host_alias
4815host=$host
4816
4817# An echo program that does not interpret backslashes.
4818echo=$lt_echo
4819
4820# The archiver.
4821AR=$lt_AR
4822AR_FLAGS=$lt_AR_FLAGS
4823
4824# The default C compiler.
4825CC=$lt_CC
4826
4827# Is the compiler the GNU C compiler?
4828with_gcc=$GCC
4829
4830# The linker used to build libraries.
4831LD=$lt_LD
4832
4833# Whether we need hard or soft links.
4834LN_S=$lt_LN_S
4835
4836# A BSD-compatible nm program.
4837NM=$lt_NM
4838
4839# A symbol stripping program
4840STRIP=$STRIP
4841
4842# Used to examine libraries when file_magic_cmd begins "file"
4843MAGIC_CMD=$MAGIC_CMD
4844
4845# Used on cygwin: DLL creation program.
4846DLLTOOL="$DLLTOOL"
4847
4848# Used on cygwin: object dumper.
4849OBJDUMP="$OBJDUMP"
4850
4851# Used on cygwin: assembler.
4852AS="$AS"
4853
4854# The name of the directory that contains temporary libtool files.
4855objdir=$objdir
4856
4857# How to create reloadable object files.
4858reload_flag=$lt_reload_flag
4859reload_cmds=$lt_reload_cmds
4860
4861# How to pass a linker flag through the compiler.
4862wl=$lt_wl
4863
4864# Object file suffix (normally "o").
4865objext="$ac_objext"
4866
4867# Old archive suffix (normally "a").
4868libext="$libext"
4869
4870# Executable file suffix (normally "").
4871exeext="$exeext"
4872
4873# Additional compiler flags for building library objects.
4874pic_flag=$lt_pic_flag
4875pic_mode=$pic_mode
4876
4877# Does compiler simultaneously support -c and -o options?
4878compiler_c_o=$lt_compiler_c_o
4879
4880# Can we write directly to a .lo ?
4881compiler_o_lo=$lt_compiler_o_lo
4882
4883# Must we lock files when doing compilation ?
4884need_locks=$lt_need_locks
4885
4886# Do we need the lib prefix for modules?
4887need_lib_prefix=$need_lib_prefix
4888
4889# Do we need a version for libraries?
4890need_version=$need_version
4891
4892# Whether dlopen is supported.
4893dlopen_support=$enable_dlopen
4894
4895# Whether dlopen of programs is supported.
4896dlopen_self=$enable_dlopen_self
4897
4898# Whether dlopen of statically linked programs is supported.
4899dlopen_self_static=$enable_dlopen_self_static
4900
4901# Compiler flag to prevent dynamic linking.
4902link_static_flag=$lt_link_static_flag
4903
4904# Compiler flag to turn off builtin functions.
4905no_builtin_flag=$lt_no_builtin_flag
4906
4907# Compiler flag to allow reflexive dlopens.
4908export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
4909
4910# Compiler flag to generate shared objects directly from archives.
4911whole_archive_flag_spec=$lt_whole_archive_flag_spec
4912
4913# Compiler flag to generate thread-safe objects.
4914thread_safe_flag_spec=$lt_thread_safe_flag_spec
4915
4916# Library versioning type.
4917version_type=$version_type
4918
4919# Format of library name prefix.
4920libname_spec=$lt_libname_spec
4921
4922# List of archive names.  First name is the real one, the rest are links.
4923# The last name is the one that the linker finds with -lNAME.
4924library_names_spec=$lt_library_names_spec
4925
4926# The coded name of the library, if different from the real name.
4927soname_spec=$lt_soname_spec
4928
4929# Commands used to build and install an old-style archive.
4930RANLIB=$lt_RANLIB
4931old_archive_cmds=$lt_old_archive_cmds
4932old_postinstall_cmds=$lt_old_postinstall_cmds
4933old_postuninstall_cmds=$lt_old_postuninstall_cmds
4934
4935# Create an old-style archive from a shared archive.
4936old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
4937
4938# Create a temporary old-style archive to link instead of a shared archive.
4939old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
4940
4941# Commands used to build and install a shared archive.
4942archive_cmds=$lt_archive_cmds
4943archive_expsym_cmds=$lt_archive_expsym_cmds
4944postinstall_cmds=$lt_postinstall_cmds
4945postuninstall_cmds=$lt_postuninstall_cmds
4946
4947# Commands to strip libraries.
4948old_striplib=$lt_old_striplib
4949striplib=$lt_striplib
4950
4951# Method to check whether dependent libraries are shared objects.
4952deplibs_check_method=$lt_deplibs_check_method
4953
4954# Command to use when deplibs_check_method == file_magic.
4955file_magic_cmd=$lt_file_magic_cmd
4956
4957# Flag that allows shared libraries with undefined symbols to be built.
4958allow_undefined_flag=$lt_allow_undefined_flag
4959
4960# Flag that forces no undefined symbols.
4961no_undefined_flag=$lt_no_undefined_flag
4962
4963# Commands used to finish a libtool library installation in a directory.
4964finish_cmds=$lt_finish_cmds
4965
4966# Same as above, but a single script fragment to be evaled but not shown.
4967finish_eval=$lt_finish_eval
4968
4969# Take the output of nm and produce a listing of raw symbols and C names.
4970global_symbol_pipe=$lt_global_symbol_pipe
4971
4972# Transform the output of nm in a proper C declaration
4973global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
4974
4975# Transform the output of nm in a C name address pair
4976global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
4977
4978# This is the shared library runtime path variable.
4979runpath_var=$runpath_var
4980
4981# This is the shared library path variable.
4982shlibpath_var=$shlibpath_var
4983
4984# Is shlibpath searched before the hard-coded library search path?
4985shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4986
4987# How to hardcode a shared library path into an executable.
4988hardcode_action=$hardcode_action
4989
4990# Whether we should hardcode library paths into libraries.
4991hardcode_into_libs=$hardcode_into_libs
4992
4993# Flag to hardcode \$libdir into a binary during linking.
4994# This must work even if \$libdir does not exist.
4995hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
4996
4997# Whether we need a single -rpath flag with a separated argument.
4998hardcode_libdir_separator=$lt_hardcode_libdir_separator
4999
5000# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
5001# resulting binary.
5002hardcode_direct=$hardcode_direct
5003
5004# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5005# resulting binary.
5006hardcode_minus_L=$hardcode_minus_L
5007
5008# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5009# the resulting binary.
5010hardcode_shlibpath_var=$hardcode_shlibpath_var
5011
5012# Variables whose values should be saved in libtool wrapper scripts and
5013# restored at relink time.
5014variables_saved_for_relink="$variables_saved_for_relink"
5015
5016# Whether libtool must link a program against all its dependency libraries.
5017link_all_deplibs=$link_all_deplibs
5018
5019# Compile-time system search path for libraries
5020sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5021
5022# Run-time system search path for libraries
5023sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5024
5025# Fix the shell variable \$srcfile for the compiler.
5026fix_srcfile_path="$fix_srcfile_path"
5027
5028# Set to yes if exported symbols are required.
5029always_export_symbols=$always_export_symbols
5030
5031# The commands to list exported symbols.
5032export_symbols_cmds=$lt_export_symbols_cmds
5033
5034# The commands to extract the exported symbol list from a shared archive.
5035extract_expsyms_cmds=$lt_extract_expsyms_cmds
5036
5037# Symbols that should not be listed in the preloaded symbols.
5038exclude_expsyms=$lt_exclude_expsyms
5039
5040# Symbols that must always be exported.
5041include_expsyms=$lt_include_expsyms
5042
5043# ### END LIBTOOL CONFIG
5044
5045__EOF__
5046
5047  case $host_os in
5048  aix3*)
5049    cat <<\EOF >> "${ofile}T"
5050
5051# AIX sometimes has problems with the GCC collect2 program.  For some
5052# reason, if we set the COLLECT_NAMES environment variable, the problems
5053# vanish in a puff of smoke.
5054if test "X${COLLECT_NAMES+set}" != Xset; then
5055  COLLECT_NAMES=
5056  export COLLECT_NAMES
5057fi
5058EOF
5059    ;;
5060  esac
5061
5062  case $host_os in
5063  cygwin* | mingw* | pw32* | os2*)
5064    cat <<'EOF' >> "${ofile}T"
5065      # This is a source program that is used to create dlls on Windows
5066      # Don't remove nor modify the starting and closing comments
5067# /* ltdll.c starts here */
5068# #define WIN32_LEAN_AND_MEAN
5069# #include <windows.h>
5070# #undef WIN32_LEAN_AND_MEAN
5071# #include <stdio.h>
5072#
5073# #ifndef __CYGWIN__
5074# #  ifdef __CYGWIN32__
5075# #    define __CYGWIN__ __CYGWIN32__
5076# #  endif
5077# #endif
5078#
5079# #ifdef __cplusplus
5080# extern "C" {
5081# #endif
5082# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
5083# #ifdef __cplusplus
5084# }
5085# #endif
5086#
5087# #ifdef __CYGWIN__
5088# #include <cygwin/cygwin_dll.h>
5089# DECLARE_CYGWIN_DLL( DllMain );
5090# #endif
5091# HINSTANCE __hDllInstance_base;
5092#
5093# BOOL APIENTRY
5094# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
5095# {
5096#   __hDllInstance_base = hInst;
5097#   return TRUE;
5098# }
5099# /* ltdll.c ends here */
5100	# This is a source program that is used to create import libraries
5101	# on Windows for dlls which lack them. Don't remove nor modify the
5102	# starting and closing comments
5103# /* impgen.c starts here */
5104# /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
5105#
5106#  This file is part of GNU libtool.
5107#
5108#  This program is free software; you can redistribute it and/or modify
5109#  it under the terms of the GNU General Public License as published by
5110#  the Free Software Foundation; either version 2 of the License, or
5111#  (at your option) any later version.
5112#
5113#  This program is distributed in the hope that it will be useful,
5114#  but WITHOUT ANY WARRANTY; without even the implied warranty of
5115#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5116#  GNU General Public License for more details.
5117#
5118#  You should have received a copy of the GNU General Public License
5119#  along with this program; if not, write to the Free Software
5120#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5121#  */
5122#
5123# #include <stdio.h>		/* for printf() */
5124# #include <unistd.h>		/* for open(), lseek(), read() */
5125# #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
5126# #include <string.h>		/* for strdup() */
5127#
5128# /* O_BINARY isn't required (or even defined sometimes) under Unix */
5129# #ifndef O_BINARY
5130# #define O_BINARY 0
5131# #endif
5132#
5133# static unsigned int
5134# pe_get16 (fd, offset)
5135#      int fd;
5136#      int offset;
5137# {
5138#   unsigned char b[2];
5139#   lseek (fd, offset, SEEK_SET);
5140#   read (fd, b, 2);
5141#   return b[0] + (b[1]<<8);
5142# }
5143#
5144# static unsigned int
5145# pe_get32 (fd, offset)
5146#     int fd;
5147#     int offset;
5148# {
5149#   unsigned char b[4];
5150#   lseek (fd, offset, SEEK_SET);
5151#   read (fd, b, 4);
5152#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5153# }
5154#
5155# static unsigned int
5156# pe_as32 (ptr)
5157#      void *ptr;
5158# {
5159#   unsigned char *b = ptr;
5160#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5161# }
5162#
5163# int
5164# main (argc, argv)
5165#     int argc;
5166#     char *argv[];
5167# {
5168#     int dll;
5169#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
5170#     unsigned long export_rva, export_size, nsections, secptr, expptr;
5171#     unsigned long name_rvas, nexp;
5172#     unsigned char *expdata, *erva;
5173#     char *filename, *dll_name;
5174#
5175#     filename = argv[1];
5176#
5177#     dll = open(filename, O_RDONLY|O_BINARY);
5178#     if (dll < 1)
5179# 	return 1;
5180#
5181#     dll_name = filename;
5182#
5183#     for (i=0; filename[i]; i++)
5184# 	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
5185# 	    dll_name = filename + i +1;
5186#
5187#     pe_header_offset = pe_get32 (dll, 0x3c);
5188#     opthdr_ofs = pe_header_offset + 4 + 20;
5189#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
5190#
5191#     if (num_entries < 1) /* no exports */
5192# 	return 1;
5193#
5194#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
5195#     export_size = pe_get32 (dll, opthdr_ofs + 100);
5196#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
5197#     secptr = (pe_header_offset + 4 + 20 +
5198# 	      pe_get16 (dll, pe_header_offset + 4 + 16));
5199#
5200#     expptr = 0;
5201#     for (i = 0; i < nsections; i++)
5202#     {
5203# 	char sname[8];
5204# 	unsigned long secptr1 = secptr + 40 * i;
5205# 	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
5206# 	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
5207# 	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
5208# 	lseek(dll, secptr1, SEEK_SET);
5209# 	read(dll, sname, 8);
5210# 	if (vaddr <= export_rva && vaddr+vsize > export_rva)
5211# 	{
5212# 	    expptr = fptr + (export_rva - vaddr);
5213# 	    if (export_rva + export_size > vaddr + vsize)
5214# 		export_size = vsize - (export_rva - vaddr);
5215# 	    break;
5216# 	}
5217#     }
5218#
5219#     expdata = (unsigned char*)malloc(export_size);
5220#     lseek (dll, expptr, SEEK_SET);
5221#     read (dll, expdata, export_size);
5222#     erva = expdata - export_rva;
5223#
5224#     nexp = pe_as32 (expdata+24);
5225#     name_rvas = pe_as32 (expdata+32);
5226#
5227#     printf ("EXPORTS\n");
5228#     for (i = 0; i<nexp; i++)
5229#     {
5230# 	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
5231# 	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
5232#     }
5233#
5234#     return 0;
5235# }
5236# /* impgen.c ends here */
5237
5238EOF
5239    ;;
5240  esac
5241
5242  # We use sed instead of cat because bash on DJGPP gets confused if
5243  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5244  # text mode, it properly converts lines to CR/LF.  This bash problem
5245  # is reportedly fixed, but why not run on old versions too?
5246  sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
5247
5248  mv -f "${ofile}T" "$ofile" || \
5249    (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
5250  chmod +x "$ofile"
5251fi
5252
5253
5254
5255
5256
5257# This can be used to rebuild libtool when needed
5258LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5259
5260# Always use our own libtool.
5261LIBTOOL='$(SHELL) $(top_builddir)/libtool'
5262
5263# Prevent multiple expansion
5264
5265
5266
5267echo $ac_n "checking for working const""... $ac_c" 1>&6
5268echo "configure:5281: checking for working const" >&5
5269if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5270  echo $ac_n "(cached) $ac_c" 1>&6
5271else
5272  cat > conftest.$ac_ext <<EOF
5273#line 5286 "configure"
5274#include "confdefs.h"
5275
5276int main() {
5277
5278/* Ultrix mips cc rejects this.  */
5279typedef int charset[2]; const charset x;
5280/* SunOS 4.1.1 cc rejects this.  */
5281char const *const *ccp;
5282char **p;
5283/* NEC SVR4.0.2 mips cc rejects this.  */
5284struct point {int x, y;};
5285static struct point const zero = {0,0};
5286/* AIX XL C 1.02.0.0 rejects this.
5287   It does not let you subtract one const X* pointer from another in an arm
5288   of an if-expression whose if-part is not a constant expression */
5289const char *g = "string";
5290ccp = &g + (g ? g-g : 0);
5291/* HPUX 7.0 cc rejects these. */
5292++ccp;
5293p = (char**) ccp;
5294ccp = (char const *const *) p;
5295{ /* SCO 3.2v4 cc rejects this.  */
5296  char *t;
5297  char const *s = 0 ? (char *) 0 : (char const *) 0;
5298
5299  *t++ = 0;
5300}
5301{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5302  int x[] = {25, 17};
5303  const int *foo = &x[0];
5304  ++foo;
5305}
5306{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5307  typedef const int *iptr;
5308  iptr p = 0;
5309  ++p;
5310}
5311{ /* AIX XL C 1.02.0.0 rejects this saying
5312     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5313  struct s { int j; const int *ap[3]; };
5314  struct s *b; b->j = 5;
5315}
5316{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5317  const int foo = 10;
5318}
5319
5320; return 0; }
5321EOF
5322if { (eval echo configure:5335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5323  rm -rf conftest*
5324  ac_cv_c_const=yes
5325else
5326  echo "configure: failed program was:" >&5
5327  cat conftest.$ac_ext >&5
5328  rm -rf conftest*
5329  ac_cv_c_const=no
5330fi
5331rm -f conftest*
5332fi
5333
5334echo "$ac_t""$ac_cv_c_const" 1>&6
5335if test $ac_cv_c_const = no; then
5336  cat >> confdefs.h <<\EOF
5337#define const
5338EOF
5339
5340fi
5341
5342
5343
5344# Check whether --with-pf_packet or --without-pf_packet was given.
5345if test "${with_pf_packet+set}" = set; then
5346  withval="$with_pf_packet"
5347  \
5348    with_pf_packet=yes
5349else
5350  with_pf_packet=no
5351fi
5352
5353
5354# Check whether --with-fast_x86_check or --without-fast_x86_check was given.
5355if test "${with_fast_x86_check+set}" = set; then
5356  withval="$with_fast_x86_check"
5357  \
5358    cat >> confdefs.h <<\EOF
5359#define LIBNET_FAST_X86_CHECK 1
5360EOF
5361
5362fi
5363
5364
5365# Find a good install program.  We prefer a C program (faster),
5366# so one script is as good as another.  But avoid the broken or
5367# incompatible versions:
5368# SysV /etc/install, /usr/sbin/install
5369# SunOS /usr/etc/install
5370# IRIX /sbin/install
5371# AIX /bin/install
5372# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5373# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5374# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5375# ./install, which can be erroneously created by make from ./install.sh.
5376echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
5377echo "configure:5395: checking for a BSD compatible install" >&5
5378if test -z "$INSTALL"; then
5379if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
5380  echo $ac_n "(cached) $ac_c" 1>&6
5381else
5382    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
5383  for ac_dir in $PATH; do
5384    # Account for people who put trailing slashes in PATH elements.
5385    case "$ac_dir/" in
5386    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
5387    *)
5388      # OSF1 and SCO ODT 3.0 have their own names for install.
5389      # Don't use installbsd from OSF since it installs stuff as root
5390      # by default.
5391      for ac_prog in ginstall scoinst install; do
5392        if test -f $ac_dir/$ac_prog; then
5393	  if test $ac_prog = install &&
5394            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
5395	    # AIX install.  It has an incompatible calling convention.
5396	    :
5397	  else
5398	    ac_cv_path_install="$ac_dir/$ac_prog -c"
5399	    break 2
5400	  fi
5401	fi
5402      done
5403      ;;
5404    esac
5405  done
5406  IFS="$ac_save_IFS"
5407
5408fi
5409  if test "${ac_cv_path_install+set}" = set; then
5410    INSTALL="$ac_cv_path_install"
5411  else
5412    # As a last resort, use the slow shell script.  We don't cache a
5413    # path for INSTALL within a source directory, because that will
5414    # break other packages using the cache if that directory is
5415    # removed, or if the path is relative.
5416    INSTALL="$ac_install_sh"
5417  fi
5418fi
5419echo "$ac_t""$INSTALL" 1>&6
5420
5421# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5422# It thinks the first close brace ends the variable substitution.
5423test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5424
5425test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
5426
5427test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5428
5429echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
5430echo "configure:5448: checking whether ${MAKE-make} sets \${MAKE}" >&5
5431set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
5432if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
5433  echo $ac_n "(cached) $ac_c" 1>&6
5434else
5435  cat > conftestmake <<\EOF
5436all:
5437	@echo 'ac_maketemp="${MAKE}"'
5438EOF
5439# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5440eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
5441if test -n "$ac_maketemp"; then
5442  eval ac_cv_prog_make_${ac_make}_set=yes
5443else
5444  eval ac_cv_prog_make_${ac_make}_set=no
5445fi
5446rm -f conftestmake
5447fi
5448if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
5449  echo "$ac_t""yes" 1>&6
5450  SET_MAKE=
5451else
5452  echo "$ac_t""no" 1>&6
5453  SET_MAKE="MAKE=${MAKE-make}"
5454fi
5455
5456for ac_prog in ranlib
5457do
5458# Extract the first word of "$ac_prog", so it can be a program name with args.
5459set dummy $ac_prog; ac_word=$2
5460echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5461echo "configure:5479: checking for $ac_word" >&5
5462if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
5463  echo $ac_n "(cached) $ac_c" 1>&6
5464else
5465  if test -n "$RANLIB"; then
5466  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5467else
5468  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
5469  ac_dummy="$PATH"
5470  for ac_dir in $ac_dummy; do
5471    test -z "$ac_dir" && ac_dir=.
5472    if test -f $ac_dir/$ac_word; then
5473      ac_cv_prog_RANLIB="$ac_prog"
5474      break
5475    fi
5476  done
5477  IFS="$ac_save_ifs"
5478fi
5479fi
5480RANLIB="$ac_cv_prog_RANLIB"
5481if test -n "$RANLIB"; then
5482  echo "$ac_t""$RANLIB" 1>&6
5483else
5484  echo "$ac_t""no" 1>&6
5485fi
5486
5487test -n "$RANLIB" && break
5488done
5489test -n "$RANLIB" || RANLIB="@true"
5490
5491for ac_prog in ar
5492do
5493# Extract the first word of "$ac_prog", so it can be a program name with args.
5494set dummy $ac_prog; ac_word=$2
5495echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5496echo "configure:5514: checking for $ac_word" >&5
5497if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
5498  echo $ac_n "(cached) $ac_c" 1>&6
5499else
5500  if test -n "$AR"; then
5501  ac_cv_prog_AR="$AR" # Let the user override the test.
5502else
5503  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
5504  ac_dummy="$PATH"
5505  for ac_dir in $ac_dummy; do
5506    test -z "$ac_dir" && ac_dir=.
5507    if test -f $ac_dir/$ac_word; then
5508      ac_cv_prog_AR="$ac_prog"
5509      break
5510    fi
5511  done
5512  IFS="$ac_save_ifs"
5513fi
5514fi
5515AR="$ac_cv_prog_AR"
5516if test -n "$AR"; then
5517  echo "$ac_t""$AR" 1>&6
5518else
5519  echo "$ac_t""no" 1>&6
5520fi
5521
5522test -n "$AR" && break
5523done
5524test -n "$AR" || AR="@true"
5525
5526for ac_prog in ln
5527do
5528# Extract the first word of "$ac_prog", so it can be a program name with args.
5529set dummy $ac_prog; ac_word=$2
5530echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5531echo "configure:5549: checking for $ac_word" >&5
5532if eval "test \"`echo '$''{'ac_cv_prog_LN'+set}'`\" = set"; then
5533  echo $ac_n "(cached) $ac_c" 1>&6
5534else
5535  if test -n "$LN"; then
5536  ac_cv_prog_LN="$LN" # Let the user override the test.
5537else
5538  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
5539  ac_dummy="$PATH"
5540  for ac_dir in $ac_dummy; do
5541    test -z "$ac_dir" && ac_dir=.
5542    if test -f $ac_dir/$ac_word; then
5543      ac_cv_prog_LN="$ac_prog"
5544      break
5545    fi
5546  done
5547  IFS="$ac_save_ifs"
5548fi
5549fi
5550LN="$ac_cv_prog_LN"
5551if test -n "$LN"; then
5552  echo "$ac_t""$LN" 1>&6
5553else
5554  echo "$ac_t""no" 1>&6
5555fi
5556
5557test -n "$LN" && break
5558done
5559test -n "$LN" || LN="@true"
5560
5561
5562for ac_func in strerror
5563do
5564echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5565echo "configure:5583: checking for $ac_func" >&5
5566if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5567  echo $ac_n "(cached) $ac_c" 1>&6
5568else
5569  cat > conftest.$ac_ext <<EOF
5570#line 5588 "configure"
5571#include "confdefs.h"
5572/* System header to define __stub macros and hopefully few prototypes,
5573    which can conflict with char $ac_func(); below.  */
5574#include <assert.h>
5575/* Override any gcc2 internal prototype to avoid an error.  */
5576/* We use char because int might match the return type of a gcc2
5577    builtin and then its argument prototype would still apply.  */
5578char $ac_func();
5579
5580int main() {
5581
5582/* The GNU C library defines this for functions which it implements
5583    to always fail with ENOSYS.  Some functions are actually named
5584    something starting with __ and the normal name is an alias.  */
5585#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5586choke me
5587#else
5588$ac_func();
5589#endif
5590
5591; return 0; }
5592EOF
5593if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5594  rm -rf conftest*
5595  eval "ac_cv_func_$ac_func=yes"
5596else
5597  echo "configure: failed program was:" >&5
5598  cat conftest.$ac_ext >&5
5599  rm -rf conftest*
5600  eval "ac_cv_func_$ac_func=no"
5601fi
5602rm -f conftest*
5603fi
5604
5605if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5606  echo "$ac_t""yes" 1>&6
5607    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5608  cat >> confdefs.h <<EOF
5609#define $ac_tr_func 1
5610EOF
5611
5612else
5613  echo "$ac_t""no" 1>&6
5614fi
5615done
5616
5617
5618echo $ac_n "checking for pcap_open_live in -lpcap""... $ac_c" 1>&6
5619echo "configure:5637: checking for pcap_open_live in -lpcap" >&5
5620ac_lib_var=`echo pcap'_'pcap_open_live | sed 'y%./+-%__p_%'`
5621if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5622  echo $ac_n "(cached) $ac_c" 1>&6
5623else
5624  ac_save_LIBS="$LIBS"
5625LIBS="-lpcap  $LIBS"
5626cat > conftest.$ac_ext <<EOF
5627#line 5645 "configure"
5628#include "confdefs.h"
5629/* Override any gcc2 internal prototype to avoid an error.  */
5630/* We use char because int might match the return type of a gcc2
5631    builtin and then its argument prototype would still apply.  */
5632char pcap_open_live();
5633
5634int main() {
5635pcap_open_live()
5636; return 0; }
5637EOF
5638if { (eval echo configure:5656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5639  rm -rf conftest*
5640  eval "ac_cv_lib_$ac_lib_var=yes"
5641else
5642  echo "configure: failed program was:" >&5
5643  cat conftest.$ac_ext >&5
5644  rm -rf conftest*
5645  eval "ac_cv_lib_$ac_lib_var=no"
5646fi
5647rm -f conftest*
5648LIBS="$ac_save_LIBS"
5649
5650fi
5651if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5652  echo "$ac_t""yes" 1>&6
5653  cat >> confdefs.h <<\EOF
5654#define HAVE_LIB_PCAP 1
5655EOF
5656
5657else
5658  echo "$ac_t""no" 1>&6
5659fi
5660
5661
5662echo $ac_n "checking low-level packet interface type""... $ac_c" 1>&6
5663echo "configure:5681: checking low-level packet interface type" >&5
5664
5665if test -r /dev/bpf0 ; then
5666    LL_INT_TYPE=bpf
5667    echo "$ac_t""found bpf" 1>&6
5668elif test -r /usr/include/net/pfilt.h ; then
5669    LL_INT_TYPE=pf
5670    echo "$ac_t""found pf" 1>&6
5671elif test -r /dev/nit ; then
5672    LL_INT_TYPE=snit
5673    echo "$ac_t""found snit" 1>&6
5674elif test -r /usr/include/sys/net/nit.h ; then
5675    LL_INT_TYPE=nit
5676    echo "$ac_t""found nit" 1>&6
5677elif test -r /usr/include/net/raw.h ; then
5678    LL_INT_TYPE=snoop
5679    echo "$ac_t""found snoop" 1>&6
5680elif test -r /usr/include/sys/dlpi.h ; then
5681    LL_INT_TYPE=dlpi
5682    echo "$ac_t""found dlpi" 1>&6
5683    cat >> confdefs.h <<\EOF
5684#define HAVE_DLPI 1
5685EOF
5686
5687elif test -r /usr/include/linux/socket.h ; then
5688    LL_INT_TYPE=sockpacket
5689    echo "$ac_t""found SOCK_PACKET" 1>&6
5690    if test $with_pf_packet = yes; then
5691
5692    echo $ac_n "checking for PF_PACKET""... $ac_c" 1>&6
5693echo "configure:5711: checking for PF_PACKET" >&5
5694    if eval "test \"`echo '$''{'ac_libnet_have_pf_packet'+set}'`\" = set"; then
5695  echo $ac_n "(cached) $ac_c" 1>&6
5696else
5697  case "$target_os" in
5698
5699        linux)
5700                ac_libnet_have_pf_packet = no
5701                ;;
5702        *)
5703
5704    cat > pf_packet-test.c << EOF
5705#include <net/if.h>
5706#if (__GLIBC__)
5707#include <netinet/if_ether.h>
5708#include <net/if_arp.h>
5709#else
5710#include <linux/if_arp.h>
5711#include <linux/if_ether.h>
5712#endif
5713#if (PF_PACKET)
5714#ifndef SOL_PACKET
5715#define SOL_PACKET 263
5716#endif  /* SOL_PACKET */
5717#include <linux/if_packet.h>
5718#endif
5719#include "./include/libnet.h"
5720
5721int
5722main()
5723{
5724#if (PF_PACKET)
5725    int fd;
5726    struct sockaddr_ll sa;
5727    struct ifreq ifr;
5728    struct packet_mreq mr;
5729    char *device ="lo";
5730
5731    fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
5732    if (fd == -1)
5733    {
5734        printf("choked");
5735        exit (EXIT_FAILURE);
5736    }
5737
5738    memset(&sa, 0, sizeof(sa));
5739    strcpy(ifr.ifr_name, device);
5740    if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0)
5741    {
5742        printf("choked");
5743        exit (EXIT_FAILURE);
5744    }
5745    sa.sll_family = AF_PACKET;
5746    sa.sll_ifindex = ifr.ifr_ifindex;
5747    sa.sll_protocol = htons(ETH_P_ALL);
5748
5749    memset(&mr, 0, sizeof (mr));
5750    mr.mr_ifindex = sa.sll_ifindex;
5751    mr.mr_type = PACKET_MR_ALLMULTI;
5752
5753    if (setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, (char *)&mr,
5754            sizeof (mr)) < 0)
5755    {
5756        printf("choked\n");
5757        exit (EXIT_FAILURE);
5758    }
5759    /* yay.  we made it and it workz! */
5760    printf("yes");
5761#else   /* PF_PACKET */
5762    printf("no");
5763#endif
5764    exit (EXIT_SUCCESS);
5765}
5766EOF
5767    ${CC-cc} -o pf_packet-test $CFLAGS pf_packet-test.c >/dev/null 2>&1
5768
5769    # Oopz 4.3 BSD doesn't have this.  Sorry.
5770    if test ! -x ./pf_packet-test ; then
5771        ac_libnet_have_pf_packet=choked
5772    else
5773        ac_libnet_have_pf_packet=`./pf_packet-test`;
5774    fi
5775
5776    if test $ac_libnet_have_pf_packet = choked; then
5777        echo "$ac_t""test program choked... assuming no" 1>&6
5778    elif test $ac_libnet_have_pf_packet = yes; then
5779        cat >> confdefs.h <<\EOF
5780#define HAVE_PF_PACKET 1
5781EOF
5782
5783        LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DHAVE_PF_PACKET"
5784    fi
5785
5786    if test $ac_libnet_have_pf_packet != choked; then
5787        echo "$ac_t""$ac_libnet_have_pf_packet" 1>&6
5788    fi
5789    rm -f pf_packet-test* core core.pf_packet-test
5790    ;;
5791    esac
5792fi
5793
5794
5795    fi
5796elif test -c /dev/bpf0 ; then           # check again in case not readable
5797    LL_INT_TYPE=bpf
5798    echo "$ac_t""found bpf" 1>&6
5799elif test -c /dev/enet ; then           # check again in case not readable
5800    LL_INT_TYPE=enet
5801    echo "$ac_t""found enet" 1>&6
5802elif test -c /dev/nit ; then            # check again in case not readable
5803    LL_INT_TYPE=snit
5804    echo "$ac_t""found snit" 1>&6
5805else
5806    LL_INT_TYPE=null
5807    echo "configure: warning: could not find a low level packet interface" 1>&2
5808    echo "configure: warning: low level packet creation API will not be added to the library" 1>&2
5809fi
5810
5811LL_INT_TYPE_UC=`echo $LL_INT_TYPE | tr a-z A-Z`
5812
5813
5814case "$target_os" in
5815
5816*linux*)
5817    cat >> confdefs.h <<\EOF
5818#define _BSD_SOURCE 1
5819EOF
5820
5821    cat >> confdefs.h <<\EOF
5822#define __BSD_SOURCE 1
5823EOF
5824
5825    cat >> confdefs.h <<\EOF
5826#define __FAVOR_BSD 1
5827EOF
5828
5829    LIBNET_CONFIG_DEFINES="-D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD"
5830    for ac_hdr in net/ethernet.h
5831do
5832ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5833echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5834echo "configure:5852: checking for $ac_hdr" >&5
5835if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5836  echo $ac_n "(cached) $ac_c" 1>&6
5837else
5838  cat > conftest.$ac_ext <<EOF
5839#line 5857 "configure"
5840#include "confdefs.h"
5841#include <$ac_hdr>
5842EOF
5843ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5844{ (eval echo configure:5862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5845ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5846if test -z "$ac_err"; then
5847  rm -rf conftest*
5848  eval "ac_cv_header_$ac_safe=yes"
5849else
5850  echo "$ac_err" >&5
5851  echo "configure: failed program was:" >&5
5852  cat conftest.$ac_ext >&5
5853  rm -rf conftest*
5854  eval "ac_cv_header_$ac_safe=no"
5855fi
5856rm -f conftest*
5857fi
5858if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5859  echo "$ac_t""yes" 1>&6
5860    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5861  cat >> confdefs.h <<EOF
5862#define $ac_tr_hdr 1
5863EOF
5864 \
5865        LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DHAVE_NET_ETHERNET_H"
5866else
5867  echo "$ac_t""no" 1>&6
5868fi
5869done
5870
5871    MAN_PREFIX="$prefix/man/man3/"
5872    LIB_PREFIX="$prefix/lib/"
5873    INC_PREFIX="$prefix/include/"
5874    BIN_PREFIX="$prefix/bin/"
5875    ;;
5876
5877*freebsd*)
5878    cat >> confdefs.h <<\EOF
5879#define LIBNET_BSDISH_OS 1
5880EOF
5881
5882    cat >> confdefs.h <<\EOF
5883#define LIBNET_BSD_BYTE_SWAP 1
5884EOF
5885
5886    cat >> confdefs.h <<\EOF
5887#define HAVE_SOCKADDR_SA_LEN 1
5888EOF
5889
5890    LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP \
5891        -DHAVE_SOCKADDR_SA_LEN"
5892    MAN_PREFIX="$prefix/man/man3/"
5893    LIB_PREFIX="$prefix/lib/aout"
5894    INC_PREFIX="$prefix/include/"
5895    BIN_PREFIX="$prefix/bin/"
5896    echo "$ac_t""Note: support/bpf-lkm/etherspoof contains the lkm source \
5897required to spoof ethernet frames" 1>&6
5898        ;;
5899
5900*netbsd*)
5901    cat >> confdefs.h <<\EOF
5902#define LIBNET_BSDISH_OS 1
5903EOF
5904
5905    cat >> confdefs.h <<\EOF
5906#define LIBNET_BSD_BYTE_SWAP 1
5907EOF
5908
5909    LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP"
5910    MAN_PREFIX="$prefix/man/man3/"
5911    LIB_PREFIX="$prefix/lib/aout"
5912    INC_PREFIX="$prefix/include/"
5913    BIN_PREFIX="$prefix/bin/"
5914    ;;
5915
5916*openbsd*)
5917    cat >> confdefs.h <<\EOF
5918#define LIBNET_BSDISH_OS 1
5919EOF
5920
5921    cat >> confdefs.h <<\EOF
5922#define HAVE_SOCKADDR_SA_LEN 1
5923EOF
5924
5925    LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS"
5926    MAN_PREFIX="$prefix/man/man3/"
5927    LIB_PREFIX="$prefix/lib/"
5928    INC_PREFIX="$prefix/include/"
5929    BIN_PREFIX="$prefix/bin/"
5930    echo "$ac_t""Note: support/bpf-lkm/etherspoof contains the lkm required \
5931to spoof ethernet frames" 1>&6
5932        ;;
5933
5934*bsdi*)
5935    cat >> confdefs.h <<\EOF
5936#define LIBNET_BSDISH_OS 1
5937EOF
5938
5939    cat >> confdefs.h <<\EOF
5940#define LIBNET_BSD_BYTE_SWAP 1
5941EOF
5942
5943    LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP"
5944    MAN_PREFIX="$prefix/man/man3/"
5945    LIB_PREFIX="$prefix/lib/"
5946    INC_PREFIX="$prefix/include/"
5947    BIN_PREFIX="$prefix/bin/"
5948    ;;
5949
5950*solaris*)
5951    cat >> confdefs.h <<\EOF
5952#define HAVE_SOLARIS 1
5953EOF
5954
5955    for ac_hdr in sys/bufmod.h sys/dlpi_ext.h
5956do
5957ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5958echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5959echo "configure:5977: checking for $ac_hdr" >&5
5960if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5961  echo $ac_n "(cached) $ac_c" 1>&6
5962else
5963  cat > conftest.$ac_ext <<EOF
5964#line 5982 "configure"
5965#include "confdefs.h"
5966#include <$ac_hdr>
5967EOF
5968ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5969{ (eval echo configure:5987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5970ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5971if test -z "$ac_err"; then
5972  rm -rf conftest*
5973  eval "ac_cv_header_$ac_safe=yes"
5974else
5975  echo "$ac_err" >&5
5976  echo "configure: failed program was:" >&5
5977  cat conftest.$ac_ext >&5
5978  rm -rf conftest*
5979  eval "ac_cv_header_$ac_safe=no"
5980fi
5981rm -f conftest*
5982fi
5983if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5984  echo "$ac_t""yes" 1>&6
5985    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5986  cat >> confdefs.h <<EOF
5987#define $ac_tr_hdr 1
5988EOF
5989
5990else
5991  echo "$ac_t""no" 1>&6
5992fi
5993done
5994
5995    echo $ac_n "checking for /dev/dlpi device""... $ac_c" 1>&6
5996echo "configure:6014: checking for /dev/dlpi device" >&5
5997    if test -c /dev/dlpi; then
5998        echo "$ac_t""yes" 1>&6
5999        cat >> confdefs.h <<\EOF
6000#define HAVE_DEV_DLPI 1
6001EOF
6002
6003    else
6004        echo "$ac_t""no" 1>&6
6005        dir="/dev/dlpi"
6006        echo $ac_n "checking for $dir directory""... $ac_c" 1>&6
6007echo "configure:6025: checking for $dir directory" >&5
6008        if test -d $dir ; then
6009            echo "$ac_t""yes" 1>&6
6010            cat >> confdefs.h <<EOF
6011#define DLPI_DEV_PREFIX "$dir"
6012EOF
6013
6014        else
6015            echo "$ac_t""no" 1>&6
6016        fi
6017    fi
6018    echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
6019echo "configure:6037: checking for socket in -lsocket" >&5
6020ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
6021if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6022  echo $ac_n "(cached) $ac_c" 1>&6
6023else
6024  ac_save_LIBS="$LIBS"
6025LIBS="-lsocket  $LIBS"
6026cat > conftest.$ac_ext <<EOF
6027#line 6045 "configure"
6028#include "confdefs.h"
6029/* Override any gcc2 internal prototype to avoid an error.  */
6030/* We use char because int might match the return type of a gcc2
6031    builtin and then its argument prototype would still apply.  */
6032char socket();
6033
6034int main() {
6035socket()
6036; return 0; }
6037EOF
6038if { (eval echo configure:6056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6039  rm -rf conftest*
6040  eval "ac_cv_lib_$ac_lib_var=yes"
6041else
6042  echo "configure: failed program was:" >&5
6043  cat conftest.$ac_ext >&5
6044  rm -rf conftest*
6045  eval "ac_cv_lib_$ac_lib_var=no"
6046fi
6047rm -f conftest*
6048LIBS="$ac_save_LIBS"
6049
6050fi
6051if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6052  echo "$ac_t""yes" 1>&6
6053    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6054    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6055  cat >> confdefs.h <<EOF
6056#define $ac_tr_lib 1
6057EOF
6058
6059  LIBS="-lsocket $LIBS"
6060
6061else
6062  echo "$ac_t""no" 1>&6
6063{ echo "configure: error: libsocket not found." 1>&2; exit 1; }
6064fi
6065
6066    echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6067echo "configure:6085: checking for gethostbyname in -lnsl" >&5
6068ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6069if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6070  echo $ac_n "(cached) $ac_c" 1>&6
6071else
6072  ac_save_LIBS="$LIBS"
6073LIBS="-lnsl  $LIBS"
6074cat > conftest.$ac_ext <<EOF
6075#line 6093 "configure"
6076#include "confdefs.h"
6077/* Override any gcc2 internal prototype to avoid an error.  */
6078/* We use char because int might match the return type of a gcc2
6079    builtin and then its argument prototype would still apply.  */
6080char gethostbyname();
6081
6082int main() {
6083gethostbyname()
6084; return 0; }
6085EOF
6086if { (eval echo configure:6104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6087  rm -rf conftest*
6088  eval "ac_cv_lib_$ac_lib_var=yes"
6089else
6090  echo "configure: failed program was:" >&5
6091  cat conftest.$ac_ext >&5
6092  rm -rf conftest*
6093  eval "ac_cv_lib_$ac_lib_var=no"
6094fi
6095rm -f conftest*
6096LIBS="$ac_save_LIBS"
6097
6098fi
6099if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6100  echo "$ac_t""yes" 1>&6
6101    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6102    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6103  cat >> confdefs.h <<EOF
6104#define $ac_tr_lib 1
6105EOF
6106
6107  LIBS="-lnsl $LIBS"
6108
6109else
6110  echo "$ac_t""no" 1>&6
6111{ echo "configure: error: libnsl not found." 1>&2; exit 1; }
6112fi
6113
6114
6115    case "`uname -r`" in
6116    5.4)
6117        cat >> confdefs.h <<\EOF
6118#define STUPID_SOLARIS_CHECKSUM_BUG 1
6119EOF
6120
6121        ;;
6122    5.5*)
6123        cat >> confdefs.h <<\EOF
6124#define STUPID_SOLARIS_CHECKSUM_BUG 1
6125EOF
6126
6127        ;;
6128
6129    esac
6130
6131    ADDITIONAL_LIBS='-lsocket -lnsl'
6132    LIBNET_CONFIG_LIBS="$LIBNET_CONFIG_LIBS -lsocket -lnsl"
6133    MAN_PREFIX="$prefix/man/man3/"
6134    LIB_PREFIX="$prefix/lib/"
6135    INC_PREFIX="$prefix/include/"
6136    BIN_PREFIX="$prefix/bin/"
6137    ;;
6138
6139*)
6140    echo "configure: warning: apparently your OS is not officially supported yet" 1>&2
6141    echo "configure: warning: this may not work" 1>&2
6142    echo "$ac_t""you'll have to edit the makefile by hand" 1>&6
6143    echo "$ac_t""please send diffs to mike@infonexus.com" 1>&6
6144    ;;
6145
6146esac
6147
6148
6149    echo $ac_n "checking for libnet_build_ip in -lnet""... $ac_c" 1>&6
6150echo "configure:6168: checking for libnet_build_ip in -lnet" >&5
6151ac_lib_var=`echo net'_'libnet_build_ip | sed 'y%./+-%__p_%'`
6152if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6153  echo $ac_n "(cached) $ac_c" 1>&6
6154else
6155  ac_save_LIBS="$LIBS"
6156LIBS="-lnet  $LIBS"
6157cat > conftest.$ac_ext <<EOF
6158#line 6176 "configure"
6159#include "confdefs.h"
6160/* Override any gcc2 internal prototype to avoid an error.  */
6161/* We use char because int might match the return type of a gcc2
6162    builtin and then its argument prototype would still apply.  */
6163char libnet_build_ip();
6164
6165int main() {
6166libnet_build_ip()
6167; return 0; }
6168EOF
6169if { (eval echo configure:6187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6170  rm -rf conftest*
6171  eval "ac_cv_lib_$ac_lib_var=yes"
6172else
6173  echo "configure: failed program was:" >&5
6174  cat conftest.$ac_ext >&5
6175  rm -rf conftest*
6176  eval "ac_cv_lib_$ac_lib_var=no"
6177fi
6178rm -f conftest*
6179LIBS="$ac_save_LIBS"
6180
6181fi
6182if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6183  echo "$ac_t""yes" 1>&6
6184  echo $ac_n "checking version""... $ac_c" 1>&6
6185echo "configure:6203: checking version" >&5 \
6186
6187    if [ ! -f $LIB_PREFIX/libnet.a ] ; then
6188        echo "$ac_t""$LIB_PREFIX/libnet.a doesn't exist" 1>&6
6189        echo "$ac_t""previous libnet install lives elsewhere" 1>&6
6190    else
6191        __LIBNET_VERSION=`strings $LIB_PREFIX/libnet.a | grep "libnet version"\
6192                | cut -f3 -d" "`;\
6193        if test -z "$__LIBNET_VERSION"; then
6194            echo "$ac_t""<0.8" 1>&6
6195        else
6196            echo "$ac_t""$__LIBNET_VERSION" 1>&6
6197        fi
6198    fi\
6199
6200else
6201  echo "$ac_t""no" 1>&6
6202fi
6203
6204
6205echo $ac_n "checking machine endianess""... $ac_c" 1>&6
6206echo "configure:6224: checking machine endianess" >&5
6207
6208    cat > conftest.c << EOF
6209#       include <stdio.h>
6210#       include <stdlib.h>
6211
6212        int main()
6213        {
6214            union
6215            {
6216                short s;
6217                char c[sizeof(short)];
6218            } un;
6219
6220            un.s = 0x0102;
6221            if (sizeof (short) == 2)
6222            {
6223                if (un.c [0] == 1 && un.c [1] == 2)
6224                {
6225                    printf("B\n");
6226                }
6227                else
6228                {
6229                    if (un.c [0] == 2 && un.c [1] == 1)
6230                    {
6231                        printf("L\n");
6232                    }
6233                }
6234            }
6235            else
6236            {
6237                printf("?\n");
6238            }
6239            return (EXIT_SUCCESS);
6240        }
6241EOF
6242        ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS > /dev/null 2>&1
6243        # Oopz 4.3 BSD doesn't have this.  Sorry.
6244        if test ! -x conftest ; then
6245            ac_cv_libnet_endianess=unknown
6246        else
6247            ./conftest > conftest.out
6248            result=`cat conftest.out`
6249            if test $result = "B"; then
6250                ac_cv_libnet_endianess=big
6251            elif test $result = "L"; then
6252                ac_cv_libnet_endianess=lil
6253            else
6254                ac_cv_libnet_endianess=unknown
6255            fi
6256        fi
6257        rm -f conftest* core core.conftest
6258
6259        echo "$ac_t""$ac_cv_libnet_endianess" 1>&6
6260
6261        if test $ac_cv_libnet_endianess = big ; then
6262            cat >> confdefs.h <<\EOF
6263#define LIBNET_BIG_ENDIAN 1
6264EOF
6265
6266        LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DLIBNET_BIG_ENDIAN"
6267        elif test $ac_cv_libnet_endianess = lil ; then
6268            cat >> confdefs.h <<\EOF
6269#define LIBNET_LIL_ENDIAN 1
6270EOF
6271
6272        LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DLIBNET_LIL_ENDIAN"
6273        fi
6274
6275echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
6276echo "configure:6294: checking if unaligned accesses fail" >&5
6277    if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
6278  echo $ac_n "(cached) $ac_c" 1>&6
6279else
6280  case "$target_cpu" in
6281
6282        alpha|hp*|mips|sparc)
6283                ac_cv_lbl_unaligned_fail=yes
6284                ;;
6285
6286        *)
6287                cat >conftest.c <<EOF
6288#                   include <sys/types.h>
6289#                   include <sys/wait.h>
6290#                   include <stdio.h>
6291                    unsigned char a[5] = { 1, 2, 3, 4, 5 };
6292                    main()
6293                    {
6294                        unsigned int i;
6295                        pid_t pid;
6296                        int status;
6297                        /* avoid "core dumped" message */
6298                        pid = fork();
6299                        if (pid <  0)
6300                        {
6301                            exit(2);
6302                        }
6303                        if (pid > 0)
6304                        {
6305                            /* parent */
6306                            pid = waitpid(pid, &status, 0);
6307                            if (pid < 0)
6308                            {
6309                                exit(3);
6310                            }
6311                            exit(!WIFEXITED(status));
6312                        }
6313                        /* child */
6314                        i = *(unsigned int *)&a[1];
6315                        printf("%d\n", i);
6316                        exit(0);
6317                    }
6318EOF
6319                ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
6320                    conftest.c $LIBS > /dev/null 2>&1
6321                # Oopz 4.3 BSD doesn't have this.  Sorry.
6322                if test ! -x conftest ; then
6323                                                ac_cv_lbl_unaligned_fail=yes
6324                else
6325                        ./conftest > conftest.out
6326                        if test ! -s conftest.out ; then
6327                                ac_cv_lbl_unaligned_fail=yes
6328                        else
6329                                ac_cv_lbl_unaligned_fail=no
6330                        fi
6331                fi
6332                rm -f conftest* core core.conftest
6333                ;;
6334        esac
6335fi
6336
6337    echo "$ac_t""$ac_cv_lbl_unaligned_fail" 1>&6
6338    if test $ac_cv_lbl_unaligned_fail = yes ; then
6339            cat >> confdefs.h <<\EOF
6340#define LBL_ALIGN 1
6341EOF
6342
6343    fi
6344
6345
6346for ac_hdr in sys/sockio.h
6347do
6348ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6349echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6350echo "configure:6368: checking for $ac_hdr" >&5
6351if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6352  echo $ac_n "(cached) $ac_c" 1>&6
6353else
6354  cat > conftest.$ac_ext <<EOF
6355#line 6373 "configure"
6356#include "confdefs.h"
6357#include <$ac_hdr>
6358EOF
6359ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6360{ (eval echo configure:6378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6361ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6362if test -z "$ac_err"; then
6363  rm -rf conftest*
6364  eval "ac_cv_header_$ac_safe=yes"
6365else
6366  echo "$ac_err" >&5
6367  echo "configure: failed program was:" >&5
6368  cat conftest.$ac_ext >&5
6369  rm -rf conftest*
6370  eval "ac_cv_header_$ac_safe=no"
6371fi
6372rm -f conftest*
6373fi
6374if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6375  echo "$ac_t""yes" 1>&6
6376    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6377  cat >> confdefs.h <<EOF
6378#define $ac_tr_hdr 1
6379EOF
6380
6381else
6382  echo "$ac_t""no" 1>&6
6383fi
6384done
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401trap '' 1 2 15
6402cat > confcache <<\EOF
6403# This file is a shell script that caches the results of configure
6404# tests run on this system so they can be shared between configure
6405# scripts and configure runs.  It is not useful on other systems.
6406# If it contains results you don't want to keep, you may remove or edit it.
6407#
6408# By default, configure uses ./config.cache as the cache file,
6409# creating it if it does not exist already.  You can give configure
6410# the --cache-file=FILE option to use a different cache file; that is
6411# what configure does when it calls configure scripts in
6412# subdirectories, so they share the cache.
6413# Giving --cache-file=/dev/null disables caching, for debugging configure.
6414# config.status only pays attention to the cache file if you give it the
6415# --recheck option to rerun configure.
6416#
6417EOF
6418# The following way of writing the cache mishandles newlines in values,
6419# but we know of no workaround that is simple, portable, and efficient.
6420# So, don't put newlines in cache variables' values.
6421# Ultrix sh set writes to stderr and can't be redirected directly,
6422# and sets the high bit in the cache file unless we assign to the vars.
6423(set) 2>&1 |
6424  case `(ac_space=' '; set | grep ac_space) 2>&1` in
6425  *ac_space=\ *)
6426    # `set' does not quote correctly, so add quotes (double-quote substitution
6427    # turns \\\\ into \\, and sed turns \\ into \).
6428    sed -n \
6429      -e "s/'/'\\\\''/g" \
6430      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6431    ;;
6432  *)
6433    # `set' quotes correctly as required by POSIX, so do not add quotes.
6434    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6435    ;;
6436  esac >> confcache
6437if cmp -s $cache_file confcache; then
6438  :
6439else
6440  if test -w $cache_file; then
6441    echo "updating cache $cache_file"
6442    cat confcache > $cache_file
6443  else
6444    echo "not updating unwritable cache $cache_file"
6445  fi
6446fi
6447rm -f confcache
6448
6449trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6450
6451test "x$prefix" = xNONE && prefix=$ac_default_prefix
6452# Let make expand exec_prefix.
6453test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6454
6455# Any assignment to VPATH causes Sun make to only execute
6456# the first set of double-colon rules, so remove it if not needed.
6457# If there is a colon in the path, we need to keep it.
6458if test "x$srcdir" = x.; then
6459  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
6460fi
6461
6462trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6463
6464DEFS=-DHAVE_CONFIG_H
6465
6466# Without the "./", some shells look in PATH for config.status.
6467: ${CONFIG_STATUS=./config.status}
6468
6469echo creating $CONFIG_STATUS
6470rm -f $CONFIG_STATUS
6471cat > $CONFIG_STATUS <<EOF
6472#! /bin/sh
6473# Generated automatically by configure.
6474# Run this file to recreate the current configuration.
6475# This directory was configured as follows,
6476# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6477#
6478# $0 $ac_configure_args
6479#
6480# Compiler output produced by configure, useful for debugging
6481# configure, is in ./config.log if it exists.
6482
6483ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6484for ac_option
6485do
6486  case "\$ac_option" in
6487  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6488    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6489    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6490  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6491    echo "$CONFIG_STATUS generated by autoconf version 2.13"
6492    exit 0 ;;
6493  -help | --help | --hel | --he | --h)
6494    echo "\$ac_cs_usage"; exit 0 ;;
6495  *) echo "\$ac_cs_usage"; exit 1 ;;
6496  esac
6497done
6498
6499ac_given_srcdir=$srcdir
6500ac_given_INSTALL="$INSTALL"
6501
6502trap 'rm -fr `echo "Makefile src/Makefile include/Makefile include/libnet/Makefile libnet-config include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6503EOF
6504cat >> $CONFIG_STATUS <<EOF
6505
6506# Protect against being on the right side of a sed subst in config.status.
6507sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6508 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6509$ac_vpsub
6510$extrasub
6511s%@SHELL@%$SHELL%g
6512s%@CFLAGS@%$CFLAGS%g
6513s%@CPPFLAGS@%$CPPFLAGS%g
6514s%@CXXFLAGS@%$CXXFLAGS%g
6515s%@FFLAGS@%$FFLAGS%g
6516s%@DEFS@%$DEFS%g
6517s%@LDFLAGS@%$LDFLAGS%g
6518s%@LIBS@%$LIBS%g
6519s%@exec_prefix@%$exec_prefix%g
6520s%@prefix@%$prefix%g
6521s%@program_transform_name@%$program_transform_name%g
6522s%@bindir@%$bindir%g
6523s%@sbindir@%$sbindir%g
6524s%@libexecdir@%$libexecdir%g
6525s%@datadir@%$datadir%g
6526s%@sysconfdir@%$sysconfdir%g
6527s%@sharedstatedir@%$sharedstatedir%g
6528s%@localstatedir@%$localstatedir%g
6529s%@libdir@%$libdir%g
6530s%@includedir@%$includedir%g
6531s%@oldincludedir@%$oldincludedir%g
6532s%@infodir@%$infodir%g
6533s%@mandir@%$mandir%g
6534s%@host@%$host%g
6535s%@host_alias@%$host_alias%g
6536s%@host_cpu@%$host_cpu%g
6537s%@host_vendor@%$host_vendor%g
6538s%@host_os@%$host_os%g
6539s%@target@%$target%g
6540s%@target_alias@%$target_alias%g
6541s%@target_cpu@%$target_cpu%g
6542s%@target_vendor@%$target_vendor%g
6543s%@target_os@%$target_os%g
6544s%@build@%$build%g
6545s%@build_alias@%$build_alias%g
6546s%@build_cpu@%$build_cpu%g
6547s%@build_vendor@%$build_vendor%g
6548s%@build_os@%$build_os%g
6549s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6550s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6551s%@INSTALL_DATA@%$INSTALL_DATA%g
6552s%@PACKAGE@%$PACKAGE%g
6553s%@VERSION@%$VERSION%g
6554s%@ACLOCAL@%$ACLOCAL%g
6555s%@AUTOCONF@%$AUTOCONF%g
6556s%@AUTOMAKE@%$AUTOMAKE%g
6557s%@AUTOHEADER@%$AUTOHEADER%g
6558s%@MAKEINFO@%$MAKEINFO%g
6559s%@SET_MAKE@%$SET_MAKE%g
6560s%@CC@%$CC%g
6561s%@LN_S@%$LN_S%g
6562s%@OBJEXT@%$OBJEXT%g
6563s%@EXEEXT@%$EXEEXT%g
6564s%@ECHO@%$ECHO%g
6565s%@RANLIB@%$RANLIB%g
6566s%@STRIP@%$STRIP%g
6567s%@CPP@%$CPP%g
6568s%@LIBTOOL@%$LIBTOOL%g
6569s%@AR@%$AR%g
6570s%@LN@%$LN%g
6571s%@LL_INT_TYPE_UC@%$LL_INT_TYPE_UC%g
6572s%@LL_INT_TYPE@%$LL_INT_TYPE%g
6573s%@LIB_PREFIX@%$LIB_PREFIX%g
6574s%@INC_PREFIX@%$INC_PREFIX%g
6575s%@MAN_PREFIX@%$MAN_PREFIX%g
6576s%@BIN_PREFIX@%$BIN_PREFIX%g
6577s%@ADDITIONAL_LIBS@%$ADDITIONAL_LIBS%g
6578s%@LIBNET_CONFIG_DEFINES@%$LIBNET_CONFIG_DEFINES%g
6579s%@LIBNET_CONFIG_LIBS@%$LIBNET_CONFIG_LIBS%g
6580s%@LIBNET_CONFIG_CFLAGS@%$LIBNET_CONFIG_CFLAGS%g
6581
6582CEOF
6583EOF
6584
6585cat >> $CONFIG_STATUS <<\EOF
6586
6587# Split the substitutions into bite-sized pieces for seds with
6588# small command number limits, like on Digital OSF/1 and HP-UX.
6589ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6590ac_file=1 # Number of current file.
6591ac_beg=1 # First line for current file.
6592ac_end=$ac_max_sed_cmds # Line after last line for current file.
6593ac_more_lines=:
6594ac_sed_cmds=""
6595while $ac_more_lines; do
6596  if test $ac_beg -gt 1; then
6597    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6598  else
6599    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6600  fi
6601  if test ! -s conftest.s$ac_file; then
6602    ac_more_lines=false
6603    rm -f conftest.s$ac_file
6604  else
6605    if test -z "$ac_sed_cmds"; then
6606      ac_sed_cmds="sed -f conftest.s$ac_file"
6607    else
6608      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6609    fi
6610    ac_file=`expr $ac_file + 1`
6611    ac_beg=$ac_end
6612    ac_end=`expr $ac_end + $ac_max_sed_cmds`
6613  fi
6614done
6615if test -z "$ac_sed_cmds"; then
6616  ac_sed_cmds=cat
6617fi
6618EOF
6619
6620cat >> $CONFIG_STATUS <<EOF
6621
6622CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile include/Makefile include/libnet/Makefile libnet-config"}
6623EOF
6624cat >> $CONFIG_STATUS <<\EOF
6625for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6626  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6627  case "$ac_file" in
6628  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6629       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6630  *) ac_file_in="${ac_file}.in" ;;
6631  esac
6632
6633  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6634
6635  # Remove last slash and all that follows it.  Not all systems have dirname.
6636  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6637  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6638    # The file is in a subdirectory.
6639    test ! -d "$ac_dir" && mkdir "$ac_dir"
6640    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6641    # A "../" for each directory in $ac_dir_suffix.
6642    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6643  else
6644    ac_dir_suffix= ac_dots=
6645  fi
6646
6647  case "$ac_given_srcdir" in
6648  .)  srcdir=.
6649      if test -z "$ac_dots"; then top_srcdir=.
6650      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6651  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6652  *) # Relative path.
6653    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6654    top_srcdir="$ac_dots$ac_given_srcdir" ;;
6655  esac
6656
6657  case "$ac_given_INSTALL" in
6658  [/$]*) INSTALL="$ac_given_INSTALL" ;;
6659  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6660  esac
6661
6662  echo creating "$ac_file"
6663  rm -f "$ac_file"
6664  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6665  case "$ac_file" in
6666  *Makefile*) ac_comsub="1i\\
6667# $configure_input" ;;
6668  *) ac_comsub= ;;
6669  esac
6670
6671  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6672  sed -e "$ac_comsub
6673s%@configure_input@%$configure_input%g
6674s%@srcdir@%$srcdir%g
6675s%@top_srcdir@%$top_srcdir%g
6676s%@INSTALL@%$INSTALL%g
6677" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6678fi; done
6679rm -f conftest.s*
6680
6681# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6682# NAME is the cpp macro being defined and VALUE is the value it is being given.
6683#
6684# ac_d sets the value in "#define NAME VALUE" lines.
6685ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
6686ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
6687ac_dC='\3'
6688ac_dD='%g'
6689# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6690ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
6691ac_uB='\([ 	]\)%\1#\2define\3'
6692ac_uC=' '
6693ac_uD='\4%g'
6694# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6695ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
6696ac_eB='$%\1#\2define\3'
6697ac_eC=' '
6698ac_eD='%g'
6699
6700if test "${CONFIG_HEADERS+set}" != set; then
6701EOF
6702cat >> $CONFIG_STATUS <<EOF
6703  CONFIG_HEADERS="include/config.h"
6704EOF
6705cat >> $CONFIG_STATUS <<\EOF
6706fi
6707for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6708  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6709  case "$ac_file" in
6710  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6711       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6712  *) ac_file_in="${ac_file}.in" ;;
6713  esac
6714
6715  echo creating $ac_file
6716
6717  rm -f conftest.frag conftest.in conftest.out
6718  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6719  cat $ac_file_inputs > conftest.in
6720
6721EOF
6722
6723# Transform confdefs.h into a sed script conftest.vals that substitutes
6724# the proper values into config.h.in to produce config.h.  And first:
6725# Protect against being on the right side of a sed subst in config.status.
6726# Protect against being in an unquoted here document in config.status.
6727rm -f conftest.vals
6728cat > conftest.hdr <<\EOF
6729s/[\\&%]/\\&/g
6730s%[\\$`]%\\&%g
6731s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6732s%ac_d%ac_u%gp
6733s%ac_u%ac_e%gp
6734EOF
6735sed -n -f conftest.hdr confdefs.h > conftest.vals
6736rm -f conftest.hdr
6737
6738# This sed command replaces #undef with comments.  This is necessary, for
6739# example, in the case of _POSIX_SOURCE, which is predefined and required
6740# on some systems where configure will not decide to define it.
6741cat >> conftest.vals <<\EOF
6742s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6743EOF
6744
6745# Break up conftest.vals because some shells have a limit on
6746# the size of here documents, and old seds have small limits too.
6747
6748rm -f conftest.tail
6749while :
6750do
6751  ac_lines=`grep -c . conftest.vals`
6752  # grep -c gives empty output for an empty file on some AIX systems.
6753  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6754  # Write a limited-size here document to conftest.frag.
6755  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6756  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6757  echo 'CEOF
6758  sed -f conftest.frag conftest.in > conftest.out
6759  rm -f conftest.in
6760  mv conftest.out conftest.in
6761' >> $CONFIG_STATUS
6762  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6763  rm -f conftest.vals
6764  mv conftest.tail conftest.vals
6765done
6766rm -f conftest.vals
6767
6768cat >> $CONFIG_STATUS <<\EOF
6769  rm -f conftest.frag conftest.h
6770  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6771  cat conftest.in >> conftest.h
6772  rm -f conftest.in
6773  if cmp -s $ac_file conftest.h 2>/dev/null; then
6774    echo "$ac_file is unchanged"
6775    rm -f conftest.h
6776  else
6777    # Remove last slash and all that follows it.  Not all systems have dirname.
6778      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6779      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6780      # The file is in a subdirectory.
6781      test ! -d "$ac_dir" && mkdir "$ac_dir"
6782    fi
6783    rm -f $ac_file
6784    mv conftest.h $ac_file
6785  fi
6786fi; done
6787
6788EOF
6789cat >> $CONFIG_STATUS <<EOF
6790
6791
6792EOF
6793cat >> $CONFIG_STATUS <<\EOF
6794test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h
6795chmod +x libnet-config
6796exit 0
6797EOF
6798chmod +x $CONFIG_STATUS
6799rm -fr confdefs* $ac_clean_files
6800test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6801
6802
6803