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