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