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