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