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