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-debug          enable debug codes [default=no]"
16ac_help="$ac_help
17  --enable-mdnkit-compat  enable mDNkit compatibility mode [default=no]"
18ac_help="$ac_help
19  --enable-extra-ace      enable additional ACE converters. [default=no]"
20ac_help="$ac_help
21  --with-utf8=NAME        codeset name for UTF-8 encoding [UTF-8]"
22ac_help="$ac_help
23  --enable-liteonly       compile and install lite library only [default=no]"
24ac_help="$ac_help
25  --enable-runidn         compile and install runidn [default=no]"
26ac_help="$ac_help
27  --with-libiconv=IPREFIX  GNU libiconv are installed in IPREFIX [PREFIX]"
28ac_help="$ac_help
29  --with-iconv-include=DIR  iconv include files are in DIR []"
30ac_help="$ac_help
31  --with-iconv=LIB        special library for iconv []"
32ac_help="$ac_help
33  --with-iconv-sofile=PATH  shared library file for libiconv []"
34ac_help="$ac_help
35  --enable-shared[=PKGS]  build shared libraries [default=yes]"
36ac_help="$ac_help
37  --enable-static[=PKGS]  build static libraries [default=yes]"
38ac_help="$ac_help
39  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
40ac_help="$ac_help
41  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
42ac_help="$ac_help
43  --disable-libtool-lock  avoid locking (might break parallel builds)"
44
45# Initialize some variables set by options.
46# The variables have the same names as the options, with
47# dashes changed to underlines.
48build=NONE
49cache_file=./config.cache
50exec_prefix=NONE
51host=NONE
52no_create=
53nonopt=NONE
54no_recursion=
55prefix=NONE
56program_prefix=NONE
57program_suffix=NONE
58program_transform_name=s,x,x,
59silent=
60site=
61srcdir=
62target=NONE
63verbose=
64x_includes=NONE
65x_libraries=NONE
66bindir='${exec_prefix}/bin'
67sbindir='${exec_prefix}/sbin'
68libexecdir='${exec_prefix}/libexec'
69datadir='${prefix}/share'
70sysconfdir='${prefix}/etc'
71sharedstatedir='${prefix}/com'
72localstatedir='${prefix}/var'
73libdir='${exec_prefix}/lib'
74includedir='${prefix}/include'
75oldincludedir='/usr/include'
76infodir='${prefix}/info'
77mandir='${prefix}/man'
78
79# Initialize some other variables.
80subdirs=
81MFLAGS= MAKEFLAGS=
82SHELL=${CONFIG_SHELL-/bin/sh}
83# Maximum number of lines to put in a shell here document.
84ac_max_here_lines=12
85
86ac_prev=
87for ac_option
88do
89
90  # If the previous option needs an argument, assign it.
91  if test -n "$ac_prev"; then
92    eval "$ac_prev=\$ac_option"
93    ac_prev=
94    continue
95  fi
96
97  case "$ac_option" in
98  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
99  *) ac_optarg= ;;
100  esac
101
102  # Accept the important Cygnus configure options, so we can diagnose typos.
103
104  case "$ac_option" in
105
106  -bindir | --bindir | --bindi | --bind | --bin | --bi)
107    ac_prev=bindir ;;
108  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
109    bindir="$ac_optarg" ;;
110
111  -build | --build | --buil | --bui | --bu)
112    ac_prev=build ;;
113  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
114    build="$ac_optarg" ;;
115
116  -cache-file | --cache-file | --cache-fil | --cache-fi \
117  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
118    ac_prev=cache_file ;;
119  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
120  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
121    cache_file="$ac_optarg" ;;
122
123  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
124    ac_prev=datadir ;;
125  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
126  | --da=*)
127    datadir="$ac_optarg" ;;
128
129  -disable-* | --disable-*)
130    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
131    # Reject names that are not valid shell variable names.
132    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
133      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
134    fi
135    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
136    eval "enable_${ac_feature}=no" ;;
137
138  -enable-* | --enable-*)
139    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
140    # Reject names that are not valid shell variable names.
141    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
142      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
143    fi
144    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
145    case "$ac_option" in
146      *=*) ;;
147      *) ac_optarg=yes ;;
148    esac
149    eval "enable_${ac_feature}='$ac_optarg'" ;;
150
151  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
152  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
153  | --exec | --exe | --ex)
154    ac_prev=exec_prefix ;;
155  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
156  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
157  | --exec=* | --exe=* | --ex=*)
158    exec_prefix="$ac_optarg" ;;
159
160  -gas | --gas | --ga | --g)
161    # Obsolete; use --with-gas.
162    with_gas=yes ;;
163
164  -help | --help | --hel | --he)
165    # Omit some internal or obsolete options to make the list less imposing.
166    # This message is too long to be a string in the A/UX 3.1 sh.
167    cat << EOF
168Usage: configure [options] [host]
169Options: [defaults in brackets after descriptions]
170Configuration:
171  --cache-file=FILE       cache test results in FILE
172  --help                  print this message
173  --no-create             do not create output files
174  --quiet, --silent       do not print \`checking...' messages
175  --version               print the version of autoconf that created configure
176Directory and file names:
177  --prefix=PREFIX         install architecture-independent files in PREFIX
178                          [$ac_default_prefix]
179  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
180                          [same as prefix]
181  --bindir=DIR            user executables in DIR [EPREFIX/bin]
182  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
183  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
184  --datadir=DIR           read-only architecture-independent data in DIR
185                          [PREFIX/share]
186  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
187  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
188                          [PREFIX/com]
189  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
190  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
191  --includedir=DIR        C header files in DIR [PREFIX/include]
192  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
193  --infodir=DIR           info documentation in DIR [PREFIX/info]
194  --mandir=DIR            man documentation in DIR [PREFIX/man]
195  --srcdir=DIR            find the sources in DIR [configure dir or ..]
196  --program-prefix=PREFIX prepend PREFIX to installed program names
197  --program-suffix=SUFFIX append SUFFIX to installed program names
198  --program-transform-name=PROGRAM
199                          run sed PROGRAM on installed program names
200EOF
201    cat << EOF
202Host type:
203  --build=BUILD           configure for building on BUILD [BUILD=HOST]
204  --host=HOST             configure for HOST [guessed]
205  --target=TARGET         configure for TARGET [TARGET=HOST]
206Features and packages:
207  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
208  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
209  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
210  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
211  --x-includes=DIR        X include files are in DIR
212  --x-libraries=DIR       X library files are in DIR
213EOF
214    if test -n "$ac_help"; then
215      echo "--enable and --with options recognized:$ac_help"
216    fi
217    exit 0 ;;
218
219  -host | --host | --hos | --ho)
220    ac_prev=host ;;
221  -host=* | --host=* | --hos=* | --ho=*)
222    host="$ac_optarg" ;;
223
224  -includedir | --includedir | --includedi | --included | --include \
225  | --includ | --inclu | --incl | --inc)
226    ac_prev=includedir ;;
227  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
228  | --includ=* | --inclu=* | --incl=* | --inc=*)
229    includedir="$ac_optarg" ;;
230
231  -infodir | --infodir | --infodi | --infod | --info | --inf)
232    ac_prev=infodir ;;
233  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
234    infodir="$ac_optarg" ;;
235
236  -libdir | --libdir | --libdi | --libd)
237    ac_prev=libdir ;;
238  -libdir=* | --libdir=* | --libdi=* | --libd=*)
239    libdir="$ac_optarg" ;;
240
241  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
242  | --libexe | --libex | --libe)
243    ac_prev=libexecdir ;;
244  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
245  | --libexe=* | --libex=* | --libe=*)
246    libexecdir="$ac_optarg" ;;
247
248  -localstatedir | --localstatedir | --localstatedi | --localstated \
249  | --localstate | --localstat | --localsta | --localst \
250  | --locals | --local | --loca | --loc | --lo)
251    ac_prev=localstatedir ;;
252  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
253  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
254  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
255    localstatedir="$ac_optarg" ;;
256
257  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
258    ac_prev=mandir ;;
259  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
260    mandir="$ac_optarg" ;;
261
262  -nfp | --nfp | --nf)
263    # Obsolete; use --without-fp.
264    with_fp=no ;;
265
266  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
267  | --no-cr | --no-c)
268    no_create=yes ;;
269
270  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
271  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
272    no_recursion=yes ;;
273
274  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
275  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
276  | --oldin | --oldi | --old | --ol | --o)
277    ac_prev=oldincludedir ;;
278  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
279  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
280  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
281    oldincludedir="$ac_optarg" ;;
282
283  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
284    ac_prev=prefix ;;
285  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
286    prefix="$ac_optarg" ;;
287
288  -program-prefix | --program-prefix | --program-prefi | --program-pref \
289  | --program-pre | --program-pr | --program-p)
290    ac_prev=program_prefix ;;
291  -program-prefix=* | --program-prefix=* | --program-prefi=* \
292  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
293    program_prefix="$ac_optarg" ;;
294
295  -program-suffix | --program-suffix | --program-suffi | --program-suff \
296  | --program-suf | --program-su | --program-s)
297    ac_prev=program_suffix ;;
298  -program-suffix=* | --program-suffix=* | --program-suffi=* \
299  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
300    program_suffix="$ac_optarg" ;;
301
302  -program-transform-name | --program-transform-name \
303  | --program-transform-nam | --program-transform-na \
304  | --program-transform-n | --program-transform- \
305  | --program-transform | --program-transfor \
306  | --program-transfo | --program-transf \
307  | --program-trans | --program-tran \
308  | --progr-tra | --program-tr | --program-t)
309    ac_prev=program_transform_name ;;
310  -program-transform-name=* | --program-transform-name=* \
311  | --program-transform-nam=* | --program-transform-na=* \
312  | --program-transform-n=* | --program-transform-=* \
313  | --program-transform=* | --program-transfor=* \
314  | --program-transfo=* | --program-transf=* \
315  | --program-trans=* | --program-tran=* \
316  | --progr-tra=* | --program-tr=* | --program-t=*)
317    program_transform_name="$ac_optarg" ;;
318
319  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
320  | -silent | --silent | --silen | --sile | --sil)
321    silent=yes ;;
322
323  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
324    ac_prev=sbindir ;;
325  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
326  | --sbi=* | --sb=*)
327    sbindir="$ac_optarg" ;;
328
329  -sharedstatedir | --sharedstatedir | --sharedstatedi \
330  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
331  | --sharedst | --shareds | --shared | --share | --shar \
332  | --sha | --sh)
333    ac_prev=sharedstatedir ;;
334  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
335  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
336  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
337  | --sha=* | --sh=*)
338    sharedstatedir="$ac_optarg" ;;
339
340  -site | --site | --sit)
341    ac_prev=site ;;
342  -site=* | --site=* | --sit=*)
343    site="$ac_optarg" ;;
344
345  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
346    ac_prev=srcdir ;;
347  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
348    srcdir="$ac_optarg" ;;
349
350  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
351  | --syscon | --sysco | --sysc | --sys | --sy)
352    ac_prev=sysconfdir ;;
353  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
354  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
355    sysconfdir="$ac_optarg" ;;
356
357  -target | --target | --targe | --targ | --tar | --ta | --t)
358    ac_prev=target ;;
359  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
360    target="$ac_optarg" ;;
361
362  -v | -verbose | --verbose | --verbos | --verbo | --verb)
363    verbose=yes ;;
364
365  -version | --version | --versio | --versi | --vers)
366    echo "configure generated by autoconf version 2.13"
367    exit 0 ;;
368
369  -with-* | --with-*)
370    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
371    # Reject names that are not valid shell variable names.
372    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
373      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
374    fi
375    ac_package=`echo $ac_package| sed 's/-/_/g'`
376    case "$ac_option" in
377      *=*) ;;
378      *) ac_optarg=yes ;;
379    esac
380    eval "with_${ac_package}='$ac_optarg'" ;;
381
382  -without-* | --without-*)
383    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
384    # Reject names that are not valid shell variable names.
385    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
386      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
387    fi
388    ac_package=`echo $ac_package| sed 's/-/_/g'`
389    eval "with_${ac_package}=no" ;;
390
391  --x)
392    # Obsolete; use --with-x.
393    with_x=yes ;;
394
395  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
396  | --x-incl | --x-inc | --x-in | --x-i)
397    ac_prev=x_includes ;;
398  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
399  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
400    x_includes="$ac_optarg" ;;
401
402  -x-libraries | --x-libraries | --x-librarie | --x-librari \
403  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
404    ac_prev=x_libraries ;;
405  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
406  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
407    x_libraries="$ac_optarg" ;;
408
409  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
410    ;;
411
412  *)
413    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
414      echo "configure: warning: $ac_option: invalid host type" 1>&2
415    fi
416    if test "x$nonopt" != xNONE; then
417      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
418    fi
419    nonopt="$ac_option"
420    ;;
421
422  esac
423done
424
425if test -n "$ac_prev"; then
426  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
427fi
428
429trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
430
431# File descriptor usage:
432# 0 standard input
433# 1 file creation
434# 2 errors and warnings
435# 3 some systems may open it to /dev/tty
436# 4 used on the Kubota Titan
437# 6 checking for... messages and results
438# 5 compiler messages saved in config.log
439if test "$silent" = yes; then
440  exec 6>/dev/null
441else
442  exec 6>&1
443fi
444exec 5>./config.log
445
446echo "\
447This file contains any messages produced by compilers while
448running configure, to aid debugging if configure makes a mistake.
449" 1>&5
450
451# Strip out --no-create and --no-recursion so they do not pile up.
452# Also quote any args containing shell metacharacters.
453ac_configure_args=
454for ac_arg
455do
456  case "$ac_arg" in
457  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
458  | --no-cr | --no-c) ;;
459  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
460  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
461  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
462  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
463  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
464  esac
465done
466
467# NLS nuisances.
468# Only set these to C if already set.  These must not be set unconditionally
469# because not all systems understand e.g. LANG=C (notably SCO).
470# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
471# Non-C LC_CTYPE values break the ctype check.
472if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
473if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
474if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
475if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
476
477# confdefs.h avoids OS command line length limits that DEFS can exceed.
478rm -rf conftest* confdefs.h
479# AIX cpp loses on an empty file, so make sure it contains at least a newline.
480echo > confdefs.h
481
482# A filename unique to this package, relative to the directory that
483# configure is in, which we can look for to find out if srcdir is correct.
484ac_unique_file=include/idn/converter.h
485
486# Find the source files, if location was not specified.
487if test -z "$srcdir"; then
488  ac_srcdir_defaulted=yes
489  # Try the directory containing this script, then its parent.
490  ac_prog=$0
491  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
492  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
493  srcdir=$ac_confdir
494  if test ! -r $srcdir/$ac_unique_file; then
495    srcdir=..
496  fi
497else
498  ac_srcdir_defaulted=no
499fi
500if test ! -r $srcdir/$ac_unique_file; then
501  if test "$ac_srcdir_defaulted" = yes; then
502    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
503  else
504    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
505  fi
506fi
507srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
508
509# Prefer explicitly selected file to automatically selected ones.
510if test -z "$CONFIG_SITE"; then
511  if test "x$prefix" != xNONE; then
512    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
513  else
514    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
515  fi
516fi
517for ac_site_file in $CONFIG_SITE; do
518  if test -r "$ac_site_file"; then
519    echo "loading site script $ac_site_file"
520    . "$ac_site_file"
521  fi
522done
523
524if test -r "$cache_file"; then
525  echo "loading cache $cache_file"
526  . $cache_file
527else
528  echo "creating cache $cache_file"
529  > $cache_file
530fi
531
532ac_ext=c
533# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
534ac_cpp='$CPP $CPPFLAGS'
535ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
536ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
537cross_compiling=$ac_cv_prog_cc_cross
538
539ac_exeext=
540ac_objext=o
541if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
542  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
543  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
544    ac_n= ac_c='
545' ac_t='	'
546  else
547    ac_n=-n ac_c= ac_t=
548  fi
549else
550  ac_n= ac_c='\c' ac_t=
551fi
552
553
554
555ac_aux_dir=
556for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
557  if test -f $ac_dir/install-sh; then
558    ac_aux_dir=$ac_dir
559    ac_install_sh="$ac_aux_dir/install-sh -c"
560    break
561  elif test -f $ac_dir/install.sh; then
562    ac_aux_dir=$ac_dir
563    ac_install_sh="$ac_aux_dir/install.sh -c"
564    break
565  fi
566done
567if test -z "$ac_aux_dir"; then
568  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
569fi
570ac_config_guess=$ac_aux_dir/config.guess
571ac_config_sub=$ac_aux_dir/config.sub
572ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
573
574
575# Make sure we can run config.sub.
576if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
577else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
578fi
579
580echo $ac_n "checking host system type""... $ac_c" 1>&6
581echo "configure:582: checking host system type" >&5
582
583host_alias=$host
584case "$host_alias" in
585NONE)
586  case $nonopt in
587  NONE)
588    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
589    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
590    fi ;;
591  *) host_alias=$nonopt ;;
592  esac ;;
593esac
594
595host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
596host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
597host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
598host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
599echo "$ac_t""$host" 1>&6
600
601
602debug=no
603# Check whether --enable-debug or --disable-debug was given.
604if test "${enable_debug+set}" = set; then
605  enableval="$enable_debug"
606  debug=$enableval
607fi
608
609case "$debug" in
610yes)
611    CFLAGS="$CFLAGS -DDEBUG"
612    ;;
613esac
614
615mdnkit_compat=no
616COMPAT_TRUE="#"
617COMPAT_FALSE=
618# Check whether --enable-mdnkit-compat or --disable-mdnkit-compat was given.
619if test "${enable_mdnkit_compat+set}" = set; then
620  enableval="$enable_mdnkit_compat"
621  mdnkit_compat=$enableval
622fi
623
624case "$mdnkit_compat" in
625yes)
626    COMPAT_TRUE=
627    COMPAT_FALSE="#"
628    cat >> confdefs.h <<\EOF
629#define ENABLE_MDNKIT_COMPAT 1
630EOF
631
632    ;;
633no)
634    ;;
635*)
636    { echo "configure: error: You must specify yes or no to --enable-runidn option." 1>&2; exit 1; }
637    ;;
638esac
639
640
641
642extraace=no
643# Check whether --enable-extra-ace or --disable-extra-ace was given.
644if test "${enable_extra_ace+set}" = set; then
645  enableval="$enable_extra_ace"
646  extraace=$enableval
647fi
648
649case "$extraace" in
650no)
651    ;;
652yes)
653    cat >> confdefs.h <<\EOF
654#define IDN_EXTRA_ACE 1
655EOF
656
657    ;;
658*)
659    { echo "configure: error: You must specify yes or no to --enable-extra-ace option." 1>&2; exit 1; }
660    ;;
661esac
662
663UTF8_NAME=no
664# Check whether --with-utf8 or --without-utf8 was given.
665if test "${with_utf8+set}" = set; then
666  withval="$with_utf8"
667  UTF8_NAME=$withval
668fi
669
670case "$UTF8_NAME" in
671no)
672    UTF8_NAME=UTF-8
673    ;;
674yes)
675    { echo "configure: error: You must specify NAME to --with-utf8 option." 1>&2; exit 1; }
676    ;;
677*)
678    cat >> confdefs.h <<EOF
679#define IDN_UTF8_ENCODING_NAME "$UTF8_NAME"
680EOF
681
682    ;;
683esac
684
685
686liteonly=no
687LITEONLY_TRUE="#"
688LITEONLY_FALSE=
689# Check whether --enable-liteonly or --disable-liteonly was given.
690if test "${enable_liteonly+set}" = set; then
691  enableval="$enable_liteonly"
692  liteonly=$enableval
693fi
694
695case "$liteonly" in
696no)
697    ;;
698yes)
699    if test "$install_runidn" = yes ; then
700	{ echo "configure: error: you can't set value \"yes\" to --enable-runidn and --enable-liteonly simultaneously, because runidn requires iconv support of generic libidnkit." 1>&2; exit 1; }
701    fi
702    LITEONLY_TRUE=
703    LITEONLY_FALSE="#"
704    ;;
705*)
706    { echo "configure: error: You must specify yes or no to --enable-liteonly option." 1>&2; exit 1; }
707    ;;
708esac
709
710
711
712install_runidn=no
713RUNIDN_TRUE="#"
714RUNIDN_FALSE=
715# Check whether --enable-runidn or --disable-runidn was given.
716if test "${enable_runidn+set}" = set; then
717  enableval="$enable_runidn"
718  install_runidn=$enableval
719fi
720
721case "$install_runidn" in
722no)
723    ;;
724yes)
725    if test "$liteonly" = yes ; then
726	{ echo "configure: error: you can't set value \"yes\" to --enable-runidn and --enable-liteonly simultaneously, because runidn requires iconv support of generic libidnkit." 1>&2; exit 1; }
727    fi
728    RUNIDN_TRUE=
729    RUNIDN_FALSE="#"
730    ;;
731*)
732    { echo "configure: error: You must specify yes or no to --enable-runidn option." 1>&2; exit 1; }
733    ;;
734esac
735
736
737
738ICONVINC=
739ICONVLIB=
740
741libiconv=unspec
742# Check whether --with-libiconv or --without-libiconv was given.
743if test "${with_libiconv+set}" = set; then
744  withval="$with_libiconv"
745  libiconv=$withval
746fi
747
748case "$libiconv" in
749unspec)
750    ;;
751no)
752    ICONVINC=
753    ICONVLIB=
754    ;;
755yes)
756    if test "$liteonly" = yes ; then
757	{ echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; }
758    fi
759    if test X$prefix = XNONE ; then
760	libiconv=$ac_default_prefix
761    else
762	libiconv=$prefix
763    fi
764    ICONVINC="-I$libiconv/include"
765    ICONVLIB="-L$libiconv/lib -R$libiconv/lib -liconv"
766    ;;
767*)
768    if test "$liteonly" = yes ; then
769	{ echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; }
770    fi
771    ICONVINC="-I$libiconv/include"
772    ICONVLIB="-L$libiconv/lib -R$libiconv/lib -liconv"
773    ;;
774esac
775
776iconv_include=unspec
777# Check whether --with-iconv-include or --without-iconv-include was given.
778if test "${with_iconv_include+set}" = set; then
779  withval="$with_iconv_include"
780  iconv_include=$withval
781fi
782
783case "$iconv_include" in
784unspec)
785    ;;
786no)
787    ICONVINC=
788    ;;
789yes)
790    if test "$liteonly" = yes ; then
791	{ echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; }
792    fi
793    echo "configure: warning: You must supply DIR to --with-iconv-include option.
794  Ignored." 1>&2
795    ICONVINC=
796    ;;
797*)
798    if test "$liteonly" = yes ; then
799	{ echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; }
800    fi
801    ICONVINC="-I$iconv_include"
802    ;;
803esac
804
805if test "X$ICONVINC" != X ; then
806    iconv_include="`echo X$ICONVINC | sed -e 's/^X-I//'`"
807    if test ! -f "$iconv_include/iconv.h" ; then
808	{ echo "configure: error: iconv.h doesn't exist in $iconv_include" 1>&2; exit 1; }
809    fi
810fi
811
812
813
814iconv=unspec
815# Check whether --with-iconv or --without-iconv was given.
816if test "${with_iconv+set}" = set; then
817  withval="$with_iconv"
818  iconv=$withval
819fi
820
821case "$iconv" in
822unspec)
823    ;;
824no)
825    ICONVLIB=
826    ;;
827yes)
828    if test "$liteonly" = yes ; then
829	{ echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; }
830    fi
831    echo "configure: warning: You must supply LIB to --with-iconv option.
832  -liconv is assumed." 1>&2
833    ICONVLIB=-liconv
834    ;;
835*)
836    if test "$liteonly" = yes ; then
837	{ echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; }
838    fi
839    ICONVLIB=$iconv
840    ;;
841esac
842
843
844# Check whether --with-iconv-sofile or --without-iconv-sofile was given.
845if test "${with_iconv_sofile+set}" = set; then
846  withval="$with_iconv_sofile"
847  iconv_file=$withval
848else
849  iconv_file=guess
850fi
851
852ICONVSOFILE=
853case "$iconv_file" in
854no)
855    ICONVSOFILE=none
856    ;;
857yes)
858    if test "$liteonly" = yes ; then
859	{ echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; }
860    fi
861    { echo "configure: error: You must supply PATH to --with-iconv-sofile option." 1>&2; exit 1; }
862    ;;
863guess)
864    if test "$liteonly" != yes ; then
865	if test "$ICONVLIB" = ""; then
866	    ICONVSOFILE=none
867	else
868	    echo $ac_n "checking pathname of iconv shared library""... $ac_c" 1>&6
869echo "configure:870: checking pathname of iconv shared library" >&5
870	    ic_libdir=
871	    ic_libname=
872	    case "$host" in
873	    *-hpux*)
874		SO=sl
875		;;
876	    *)
877		SO=so
878		;;
879	    esac
880	    for arg in $ICONVLIB; do
881		case "$arg" in
882		-L*) ic_libdir="$ic_libdir `echo $arg | sed s/-L//`" ;;
883		-l*) ic_libname=`echo $arg | sed s/-l//` ;;
884		/*.$SO*) ICONVSOFILE=$arg ;;
885		esac
886	    done
887	    if test "$ICONVSOFILE" = ""; then
888		if test "$ic_libname" = ""; then
889		    echo "$ac_t""unknown" 1>&6
890		    echo "configure: warning: use --with-iconv-sofile for specifying iconv shared library file" 1>&2
891		    ICONVSOFILE=none
892		else
893		    if test "$ic_libdir" = ""; then
894			# Standard (and semi-standard) library directories
895			ic_libdir="/lib /usr/lib /usr/local/lib"
896		    fi
897		    for dir in $ic_libdir; do
898			ICONVSOFILE=`ls -r $dir/lib$ic_libname.$SO* 2>/dev/null | head -1`
899			if test "$ICONVSOFILE" != ""; then
900			    break
901			fi
902		    done
903		    if test "$ICONVSOFILE" != ""; then
904			echo "$ac_t""$ICONVSOFILE" 1>&6
905		    else
906			echo "$ac_t""unknown" 1>&6
907			echo "configure: warning: use --with-iconv-sofile for specifying iconv shared library file" 1>&2
908			ICONVSOFILE=none
909		    fi
910		fi
911	    fi
912	fi
913    else
914	ICONVSOFILE=none
915    fi
916    ;;
917*)
918    if test "$liteonly" = yes ; then
919	{ echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; }
920    fi
921    ICONVSOFILE=$iconv_file
922    ;;
923esac
924
925
926PRELOAD_VAR="LD_PRELOAD"
927PRELOAD_SEP=":"
928PRELOAD_LAST=""
929case "$host" in
930*-solaris*)
931    PRELOAD_SEP=" "
932    ;;
933*-linux*)
934    PRELOAD_SEP=" "
935    ;;
936*-osf*)
937    PRELOAD_VAR="_RLD_LIST"
938    PRELOAD_LAST=":DEFAULT"
939    ;;
940*-netbsd*)
941    if test -x /usr/bin/file -a -x /usr/bin/grep ; then
942        case "`/usr/bin/file /usr/bin/grep`" in
943	*ELF*)
944	    PRELOAD_SEP=" "
945	    ;;
946	esac
947    fi
948    ;;
949esac
950
951
952
953
954
955# Extract the first word of "gcc", so it can be a program name with args.
956set dummy gcc; ac_word=$2
957echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
958echo "configure:959: checking for $ac_word" >&5
959if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
960  echo $ac_n "(cached) $ac_c" 1>&6
961else
962  if test -n "$CC"; then
963  ac_cv_prog_CC="$CC" # Let the user override the test.
964else
965  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
966  ac_dummy="$PATH"
967  for ac_dir in $ac_dummy; do
968    test -z "$ac_dir" && ac_dir=.
969    if test -f $ac_dir/$ac_word; then
970      ac_cv_prog_CC="gcc"
971      break
972    fi
973  done
974  IFS="$ac_save_ifs"
975fi
976fi
977CC="$ac_cv_prog_CC"
978if test -n "$CC"; then
979  echo "$ac_t""$CC" 1>&6
980else
981  echo "$ac_t""no" 1>&6
982fi
983
984if test -z "$CC"; then
985  # Extract the first word of "cc", so it can be a program name with args.
986set dummy cc; ac_word=$2
987echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
988echo "configure:989: checking for $ac_word" >&5
989if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
990  echo $ac_n "(cached) $ac_c" 1>&6
991else
992  if test -n "$CC"; then
993  ac_cv_prog_CC="$CC" # Let the user override the test.
994else
995  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
996  ac_prog_rejected=no
997  ac_dummy="$PATH"
998  for ac_dir in $ac_dummy; do
999    test -z "$ac_dir" && ac_dir=.
1000    if test -f $ac_dir/$ac_word; then
1001      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1002        ac_prog_rejected=yes
1003	continue
1004      fi
1005      ac_cv_prog_CC="cc"
1006      break
1007    fi
1008  done
1009  IFS="$ac_save_ifs"
1010if test $ac_prog_rejected = yes; then
1011  # We found a bogon in the path, so make sure we never use it.
1012  set dummy $ac_cv_prog_CC
1013  shift
1014  if test $# -gt 0; then
1015    # We chose a different compiler from the bogus one.
1016    # However, it has the same basename, so the bogon will be chosen
1017    # first if we set CC to just the basename; use the full file name.
1018    shift
1019    set dummy "$ac_dir/$ac_word" "$@"
1020    shift
1021    ac_cv_prog_CC="$@"
1022  fi
1023fi
1024fi
1025fi
1026CC="$ac_cv_prog_CC"
1027if test -n "$CC"; then
1028  echo "$ac_t""$CC" 1>&6
1029else
1030  echo "$ac_t""no" 1>&6
1031fi
1032
1033  if test -z "$CC"; then
1034    case "`uname -s`" in
1035    *win32* | *WIN32*)
1036      # Extract the first word of "cl", so it can be a program name with args.
1037set dummy cl; ac_word=$2
1038echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1039echo "configure:1040: checking for $ac_word" >&5
1040if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1041  echo $ac_n "(cached) $ac_c" 1>&6
1042else
1043  if test -n "$CC"; then
1044  ac_cv_prog_CC="$CC" # Let the user override the test.
1045else
1046  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1047  ac_dummy="$PATH"
1048  for ac_dir in $ac_dummy; do
1049    test -z "$ac_dir" && ac_dir=.
1050    if test -f $ac_dir/$ac_word; then
1051      ac_cv_prog_CC="cl"
1052      break
1053    fi
1054  done
1055  IFS="$ac_save_ifs"
1056fi
1057fi
1058CC="$ac_cv_prog_CC"
1059if test -n "$CC"; then
1060  echo "$ac_t""$CC" 1>&6
1061else
1062  echo "$ac_t""no" 1>&6
1063fi
1064 ;;
1065    esac
1066  fi
1067  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1068fi
1069
1070echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1071echo "configure:1072: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1072
1073ac_ext=c
1074# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1075ac_cpp='$CPP $CPPFLAGS'
1076ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1077ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1078cross_compiling=$ac_cv_prog_cc_cross
1079
1080cat > conftest.$ac_ext << EOF
1081
1082#line 1083 "configure"
1083#include "confdefs.h"
1084
1085main(){return(0);}
1086EOF
1087if { (eval echo configure:1088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1088  ac_cv_prog_cc_works=yes
1089  # If we can't run a trivial program, we are probably using a cross compiler.
1090  if (./conftest; exit) 2>/dev/null; then
1091    ac_cv_prog_cc_cross=no
1092  else
1093    ac_cv_prog_cc_cross=yes
1094  fi
1095else
1096  echo "configure: failed program was:" >&5
1097  cat conftest.$ac_ext >&5
1098  ac_cv_prog_cc_works=no
1099fi
1100rm -fr conftest*
1101ac_ext=c
1102# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1103ac_cpp='$CPP $CPPFLAGS'
1104ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1105ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1106cross_compiling=$ac_cv_prog_cc_cross
1107
1108echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1109if test $ac_cv_prog_cc_works = no; then
1110  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1111fi
1112echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1113echo "configure:1114: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1114echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1115cross_compiling=$ac_cv_prog_cc_cross
1116
1117echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1118echo "configure:1119: checking whether we are using GNU C" >&5
1119if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1120  echo $ac_n "(cached) $ac_c" 1>&6
1121else
1122  cat > conftest.c <<EOF
1123#ifdef __GNUC__
1124  yes;
1125#endif
1126EOF
1127if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1128  ac_cv_prog_gcc=yes
1129else
1130  ac_cv_prog_gcc=no
1131fi
1132fi
1133
1134echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1135
1136if test $ac_cv_prog_gcc = yes; then
1137  GCC=yes
1138else
1139  GCC=
1140fi
1141
1142ac_test_CFLAGS="${CFLAGS+set}"
1143ac_save_CFLAGS="$CFLAGS"
1144CFLAGS=
1145echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1146echo "configure:1147: checking whether ${CC-cc} accepts -g" >&5
1147if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1148  echo $ac_n "(cached) $ac_c" 1>&6
1149else
1150  echo 'void f(){}' > conftest.c
1151if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1152  ac_cv_prog_cc_g=yes
1153else
1154  ac_cv_prog_cc_g=no
1155fi
1156rm -f conftest*
1157
1158fi
1159
1160echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1161if test "$ac_test_CFLAGS" = set; then
1162  CFLAGS="$ac_save_CFLAGS"
1163elif test $ac_cv_prog_cc_g = yes; then
1164  if test "$GCC" = yes; then
1165    CFLAGS="-g -O2"
1166  else
1167    CFLAGS="-g"
1168  fi
1169else
1170  if test "$GCC" = yes; then
1171    CFLAGS="-O2"
1172  else
1173    CFLAGS=
1174  fi
1175fi
1176
1177# Find a good install program.  We prefer a C program (faster),
1178# so one script is as good as another.  But avoid the broken or
1179# incompatible versions:
1180# SysV /etc/install, /usr/sbin/install
1181# SunOS /usr/etc/install
1182# IRIX /sbin/install
1183# AIX /bin/install
1184# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1185# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1186# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1187# ./install, which can be erroneously created by make from ./install.sh.
1188echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1189echo "configure:1190: checking for a BSD compatible install" >&5
1190if test -z "$INSTALL"; then
1191if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1192  echo $ac_n "(cached) $ac_c" 1>&6
1193else
1194    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
1195  for ac_dir in $PATH; do
1196    # Account for people who put trailing slashes in PATH elements.
1197    case "$ac_dir/" in
1198    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1199    *)
1200      # OSF1 and SCO ODT 3.0 have their own names for install.
1201      # Don't use installbsd from OSF since it installs stuff as root
1202      # by default.
1203      for ac_prog in ginstall scoinst install; do
1204        if test -f $ac_dir/$ac_prog; then
1205	  if test $ac_prog = install &&
1206            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1207	    # AIX install.  It has an incompatible calling convention.
1208	    :
1209	  else
1210	    ac_cv_path_install="$ac_dir/$ac_prog -c"
1211	    break 2
1212	  fi
1213	fi
1214      done
1215      ;;
1216    esac
1217  done
1218  IFS="$ac_save_IFS"
1219
1220fi
1221  if test "${ac_cv_path_install+set}" = set; then
1222    INSTALL="$ac_cv_path_install"
1223  else
1224    # As a last resort, use the slow shell script.  We don't cache a
1225    # path for INSTALL within a source directory, because that will
1226    # break other packages using the cache if that directory is
1227    # removed, or if the path is relative.
1228    INSTALL="$ac_install_sh"
1229  fi
1230fi
1231echo "$ac_t""$INSTALL" 1>&6
1232
1233# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1234# It thinks the first close brace ends the variable substitution.
1235test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1236
1237test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1238
1239test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1240
1241# Check whether --enable-shared or --disable-shared was given.
1242if test "${enable_shared+set}" = set; then
1243  enableval="$enable_shared"
1244  p=${PACKAGE-default}
1245case "$enableval" in
1246yes) enable_shared=yes ;;
1247no) enable_shared=no ;;
1248*)
1249  enable_shared=no
1250  # Look at the argument we got.  We use all the common list separators.
1251  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1252  for pkg in $enableval; do
1253    if test "X$pkg" = "X$p"; then
1254      enable_shared=yes
1255    fi
1256  done
1257  IFS="$ac_save_ifs"
1258  ;;
1259esac
1260else
1261  enable_shared=yes
1262fi
1263
1264# Check whether --enable-static or --disable-static was given.
1265if test "${enable_static+set}" = set; then
1266  enableval="$enable_static"
1267  p=${PACKAGE-default}
1268case "$enableval" in
1269yes) enable_static=yes ;;
1270no) enable_static=no ;;
1271*)
1272  enable_static=no
1273  # Look at the argument we got.  We use all the common list separators.
1274  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1275  for pkg in $enableval; do
1276    if test "X$pkg" = "X$p"; then
1277      enable_static=yes
1278    fi
1279  done
1280  IFS="$ac_save_ifs"
1281  ;;
1282esac
1283else
1284  enable_static=yes
1285fi
1286
1287# Check whether --enable-fast-install or --disable-fast-install was given.
1288if test "${enable_fast_install+set}" = set; then
1289  enableval="$enable_fast_install"
1290  p=${PACKAGE-default}
1291case "$enableval" in
1292yes) enable_fast_install=yes ;;
1293no) enable_fast_install=no ;;
1294*)
1295  enable_fast_install=no
1296  # Look at the argument we got.  We use all the common list separators.
1297  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1298  for pkg in $enableval; do
1299    if test "X$pkg" = "X$p"; then
1300      enable_fast_install=yes
1301    fi
1302  done
1303  IFS="$ac_save_ifs"
1304  ;;
1305esac
1306else
1307  enable_fast_install=yes
1308fi
1309
1310echo $ac_n "checking build system type""... $ac_c" 1>&6
1311echo "configure:1312: checking build system type" >&5
1312
1313build_alias=$build
1314case "$build_alias" in
1315NONE)
1316  case $nonopt in
1317  NONE) build_alias=$host_alias ;;
1318  *) build_alias=$nonopt ;;
1319  esac ;;
1320esac
1321
1322build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1323build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1324build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1325build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1326echo "$ac_t""$build" 1>&6
1327
1328# Extract the first word of "ranlib", so it can be a program name with args.
1329set dummy ranlib; ac_word=$2
1330echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1331echo "configure:1332: checking for $ac_word" >&5
1332if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1333  echo $ac_n "(cached) $ac_c" 1>&6
1334else
1335  if test -n "$RANLIB"; then
1336  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1337else
1338  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1339  ac_dummy="$PATH"
1340  for ac_dir in $ac_dummy; do
1341    test -z "$ac_dir" && ac_dir=.
1342    if test -f $ac_dir/$ac_word; then
1343      ac_cv_prog_RANLIB="ranlib"
1344      break
1345    fi
1346  done
1347  IFS="$ac_save_ifs"
1348  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1349fi
1350fi
1351RANLIB="$ac_cv_prog_RANLIB"
1352if test -n "$RANLIB"; then
1353  echo "$ac_t""$RANLIB" 1>&6
1354else
1355  echo "$ac_t""no" 1>&6
1356fi
1357
1358# Check whether --with-gnu-ld or --without-gnu-ld was given.
1359if test "${with_gnu_ld+set}" = set; then
1360  withval="$with_gnu_ld"
1361  test "$withval" = no || with_gnu_ld=yes
1362else
1363  with_gnu_ld=no
1364fi
1365
1366ac_prog=ld
1367if test "$ac_cv_prog_gcc" = yes; then
1368  # Check if gcc -print-prog-name=ld gives a path.
1369  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1370echo "configure:1371: checking for ld used by GCC" >&5
1371  ac_prog=`($CC -print-prog-name=ld) 2>&5`
1372  case "$ac_prog" in
1373    # Accept absolute paths.
1374    [\\/]* | [A-Za-z]:[\\/]*)
1375      re_direlt='/[^/][^/]*/\.\./'
1376      # Canonicalize the path of ld
1377      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1378      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1379	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1380      done
1381      test -z "$LD" && LD="$ac_prog"
1382      ;;
1383  "")
1384    # If it fails, then pretend we aren't using GCC.
1385    ac_prog=ld
1386    ;;
1387  *)
1388    # If it is relative, then search for the first ld in PATH.
1389    with_gnu_ld=unknown
1390    ;;
1391  esac
1392elif test "$with_gnu_ld" = yes; then
1393  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1394echo "configure:1395: checking for GNU ld" >&5
1395else
1396  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1397echo "configure:1398: checking for non-GNU ld" >&5
1398fi
1399if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1400  echo $ac_n "(cached) $ac_c" 1>&6
1401else
1402  if test -z "$LD"; then
1403  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1404  for ac_dir in $PATH; do
1405    test -z "$ac_dir" && ac_dir=.
1406    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1407      ac_cv_path_LD="$ac_dir/$ac_prog"
1408      # Check to see if the program is GNU ld.  I'd rather use --version,
1409      # but apparently some GNU ld's only accept -v.
1410      # Break only if it was the GNU/non-GNU ld that we prefer.
1411      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1412	test "$with_gnu_ld" != no && break
1413      else
1414	test "$with_gnu_ld" != yes && break
1415      fi
1416    fi
1417  done
1418  IFS="$ac_save_ifs"
1419else
1420  ac_cv_path_LD="$LD" # Let the user override the test with a path.
1421fi
1422fi
1423
1424LD="$ac_cv_path_LD"
1425if test -n "$LD"; then
1426  echo "$ac_t""$LD" 1>&6
1427else
1428  echo "$ac_t""no" 1>&6
1429fi
1430test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1431echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1432echo "configure:1433: checking if the linker ($LD) is GNU ld" >&5
1433if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1434  echo $ac_n "(cached) $ac_c" 1>&6
1435else
1436  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1437if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1438  ac_cv_prog_gnu_ld=yes
1439else
1440  ac_cv_prog_gnu_ld=no
1441fi
1442fi
1443
1444echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1445
1446
1447echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1448echo "configure:1449: checking for BSD-compatible nm" >&5
1449if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1450  echo $ac_n "(cached) $ac_c" 1>&6
1451else
1452  if test -n "$NM"; then
1453  # Let the user override the test.
1454  ac_cv_path_NM="$NM"
1455else
1456  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1457  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1458    test -z "$ac_dir" && ac_dir=.
1459    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1460      # Check to see if the nm accepts a BSD-compat flag.
1461      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1462      #   nm: unknown option "B" ignored
1463      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1464	ac_cv_path_NM="$ac_dir/nm -B"
1465	break
1466      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1467	ac_cv_path_NM="$ac_dir/nm -p"
1468	break
1469      else
1470	ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1471	continue # so that we can try to find one that supports BSD flags
1472      fi
1473    fi
1474  done
1475  IFS="$ac_save_ifs"
1476  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1477fi
1478fi
1479
1480NM="$ac_cv_path_NM"
1481echo "$ac_t""$NM" 1>&6
1482
1483echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1484echo "configure:1485: checking whether ln -s works" >&5
1485if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1486  echo $ac_n "(cached) $ac_c" 1>&6
1487else
1488  rm -f conftestdata
1489if ln -s X conftestdata 2>/dev/null
1490then
1491  rm -f conftestdata
1492  ac_cv_prog_LN_S="ln -s"
1493else
1494  ac_cv_prog_LN_S=ln
1495fi
1496fi
1497LN_S="$ac_cv_prog_LN_S"
1498if test "$ac_cv_prog_LN_S" = "ln -s"; then
1499  echo "$ac_t""yes" 1>&6
1500else
1501  echo "$ac_t""no" 1>&6
1502fi
1503
1504
1505case "$target" in
1506NONE) lt_target="$host" ;;
1507*) lt_target="$target" ;;
1508esac
1509
1510# Check for any special flags to pass to ltconfig.
1511libtool_flags="--cache-file=$cache_file"
1512test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1513test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1514test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1515test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1516test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1517
1518
1519# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1520if test "${enable_libtool_lock+set}" = set; then
1521  enableval="$enable_libtool_lock"
1522  :
1523fi
1524
1525test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1526test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1527
1528# Some flags need to be propagated to the compiler or linker for good
1529# libtool support.
1530case "$lt_target" in
1531*-*-irix6*)
1532  # Find out which ABI we are using.
1533  echo '#line 1534 "configure"' > conftest.$ac_ext
1534  if { (eval echo configure:1535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1535    case "`/usr/bin/file conftest.o`" in
1536    *32-bit*)
1537      LD="${LD-ld} -32"
1538      ;;
1539    *N32*)
1540      LD="${LD-ld} -n32"
1541      ;;
1542    *64-bit*)
1543      LD="${LD-ld} -64"
1544      ;;
1545    esac
1546  fi
1547  rm -rf conftest*
1548  ;;
1549
1550*-*-sco3.2v5*)
1551  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1552  SAVE_CFLAGS="$CFLAGS"
1553  CFLAGS="$CFLAGS -belf"
1554  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1555echo "configure:1556: checking whether the C compiler needs -belf" >&5
1556if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1557  echo $ac_n "(cached) $ac_c" 1>&6
1558else
1559  cat > conftest.$ac_ext <<EOF
1560#line 1561 "configure"
1561#include "confdefs.h"
1562
1563int main() {
1564
1565; return 0; }
1566EOF
1567if { (eval echo configure:1568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1568  rm -rf conftest*
1569  lt_cv_cc_needs_belf=yes
1570else
1571  echo "configure: failed program was:" >&5
1572  cat conftest.$ac_ext >&5
1573  rm -rf conftest*
1574  lt_cv_cc_needs_belf=no
1575fi
1576rm -f conftest*
1577fi
1578
1579echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1580  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1581    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1582    CFLAGS="$SAVE_CFLAGS"
1583  fi
1584  ;;
1585
1586
1587esac
1588
1589
1590# Save cache, so that ltconfig can load it
1591cat > confcache <<\EOF
1592# This file is a shell script that caches the results of configure
1593# tests run on this system so they can be shared between configure
1594# scripts and configure runs.  It is not useful on other systems.
1595# If it contains results you don't want to keep, you may remove or edit it.
1596#
1597# By default, configure uses ./config.cache as the cache file,
1598# creating it if it does not exist already.  You can give configure
1599# the --cache-file=FILE option to use a different cache file; that is
1600# what configure does when it calls configure scripts in
1601# subdirectories, so they share the cache.
1602# Giving --cache-file=/dev/null disables caching, for debugging configure.
1603# config.status only pays attention to the cache file if you give it the
1604# --recheck option to rerun configure.
1605#
1606EOF
1607# The following way of writing the cache mishandles newlines in values,
1608# but we know of no workaround that is simple, portable, and efficient.
1609# So, don't put newlines in cache variables' values.
1610# Ultrix sh set writes to stderr and can't be redirected directly,
1611# and sets the high bit in the cache file unless we assign to the vars.
1612(set) 2>&1 |
1613  case `(ac_space=' '; set | grep ac_space) 2>&1` in
1614  *ac_space=\ *)
1615    # `set' does not quote correctly, so add quotes (double-quote substitution
1616    # turns \\\\ into \\, and sed turns \\ into \).
1617    sed -n \
1618      -e "s/'/'\\\\''/g" \
1619      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1620    ;;
1621  *)
1622    # `set' quotes correctly as required by POSIX, so do not add quotes.
1623    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1624    ;;
1625  esac >> confcache
1626if cmp -s $cache_file confcache; then
1627  :
1628else
1629  if test -w $cache_file; then
1630    echo "updating cache $cache_file"
1631    cat confcache > $cache_file
1632  else
1633    echo "not updating unwritable cache $cache_file"
1634  fi
1635fi
1636rm -f confcache
1637
1638
1639# Actually configure libtool.  ac_aux_dir is where install-sh is found.
1640CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1641LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1642LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1643DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1644${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1645$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1646|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1647
1648# Reload cache, that may have been modified by ltconfig
1649if test -r "$cache_file"; then
1650  echo "loading cache $cache_file"
1651  . $cache_file
1652else
1653  echo "creating cache $cache_file"
1654  > $cache_file
1655fi
1656
1657
1658# This can be used to rebuild libtool when needed
1659LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1660
1661# Always use our own libtool.
1662LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1663
1664# Redirect the config.log output again, so that the ltconfig log is not
1665# clobbered by the next message.
1666exec 5>>./config.log
1667
1668
1669for ac_prog in perl
1670do
1671# Extract the first word of "$ac_prog", so it can be a program name with args.
1672set dummy $ac_prog; ac_word=$2
1673echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1674echo "configure:1675: checking for $ac_word" >&5
1675if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
1676  echo $ac_n "(cached) $ac_c" 1>&6
1677else
1678  case "$PERL" in
1679  /*)
1680  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
1681  ;;
1682  ?:/*)			 
1683  ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
1684  ;;
1685  *)
1686  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1687  ac_dummy="$PATH"
1688  for ac_dir in $ac_dummy; do 
1689    test -z "$ac_dir" && ac_dir=.
1690    if test -f $ac_dir/$ac_word; then
1691      ac_cv_path_PERL="$ac_dir/$ac_word"
1692      break
1693    fi
1694  done
1695  IFS="$ac_save_ifs"
1696  ;;
1697esac
1698fi
1699PERL="$ac_cv_path_PERL"
1700if test -n "$PERL"; then
1701  echo "$ac_t""$PERL" 1>&6
1702else
1703  echo "$ac_t""no" 1>&6
1704fi
1705
1706test -n "$PERL" && break
1707done
1708test -n "$PERL" || PERL="perl"
1709
1710
1711echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1712echo "configure:1713: checking how to run the C preprocessor" >&5
1713# On Suns, sometimes $CPP names a directory.
1714if test -n "$CPP" && test -d "$CPP"; then
1715  CPP=
1716fi
1717if test -z "$CPP"; then
1718if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1719  echo $ac_n "(cached) $ac_c" 1>&6
1720else
1721    # This must be in double quotes, not single quotes, because CPP may get
1722  # substituted into the Makefile and "${CC-cc}" will confuse make.
1723  CPP="${CC-cc} -E"
1724  # On the NeXT, cc -E runs the code through the compiler's parser,
1725  # not just through cpp.
1726  cat > conftest.$ac_ext <<EOF
1727#line 1728 "configure"
1728#include "confdefs.h"
1729#include <assert.h>
1730Syntax Error
1731EOF
1732ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1733{ (eval echo configure:1734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1734ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1735if test -z "$ac_err"; then
1736  :
1737else
1738  echo "$ac_err" >&5
1739  echo "configure: failed program was:" >&5
1740  cat conftest.$ac_ext >&5
1741  rm -rf conftest*
1742  CPP="${CC-cc} -E -traditional-cpp"
1743  cat > conftest.$ac_ext <<EOF
1744#line 1745 "configure"
1745#include "confdefs.h"
1746#include <assert.h>
1747Syntax Error
1748EOF
1749ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1750{ (eval echo configure:1751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1751ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1752if test -z "$ac_err"; then
1753  :
1754else
1755  echo "$ac_err" >&5
1756  echo "configure: failed program was:" >&5
1757  cat conftest.$ac_ext >&5
1758  rm -rf conftest*
1759  CPP="${CC-cc} -nologo -E"
1760  cat > conftest.$ac_ext <<EOF
1761#line 1762 "configure"
1762#include "confdefs.h"
1763#include <assert.h>
1764Syntax Error
1765EOF
1766ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1767{ (eval echo configure:1768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1768ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1769if test -z "$ac_err"; then
1770  :
1771else
1772  echo "$ac_err" >&5
1773  echo "configure: failed program was:" >&5
1774  cat conftest.$ac_ext >&5
1775  rm -rf conftest*
1776  CPP=/lib/cpp
1777fi
1778rm -f conftest*
1779fi
1780rm -f conftest*
1781fi
1782rm -f conftest*
1783  ac_cv_prog_CPP="$CPP"
1784fi
1785  CPP="$ac_cv_prog_CPP"
1786else
1787  ac_cv_prog_CPP="$CPP"
1788fi
1789echo "$ac_t""$CPP" 1>&6
1790
1791for ac_hdr in unistd.h locale.h langinfo.h pwd.h
1792do
1793ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1794echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1795echo "configure:1796: checking for $ac_hdr" >&5
1796if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1797  echo $ac_n "(cached) $ac_c" 1>&6
1798else
1799  cat > conftest.$ac_ext <<EOF
1800#line 1801 "configure"
1801#include "confdefs.h"
1802#include <$ac_hdr>
1803EOF
1804ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1805{ (eval echo configure:1806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1806ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1807if test -z "$ac_err"; then
1808  rm -rf conftest*
1809  eval "ac_cv_header_$ac_safe=yes"
1810else
1811  echo "$ac_err" >&5
1812  echo "configure: failed program was:" >&5
1813  cat conftest.$ac_ext >&5
1814  rm -rf conftest*
1815  eval "ac_cv_header_$ac_safe=no"
1816fi
1817rm -f conftest*
1818fi
1819if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1820  echo "$ac_t""yes" 1>&6
1821    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1822  cat >> confdefs.h <<EOF
1823#define $ac_tr_hdr 1
1824EOF
1825 
1826else
1827  echo "$ac_t""no" 1>&6
1828fi
1829done
1830
1831if test "$install_runidn" = yes ; then
1832    for ac_hdr in dlfcn.h
1833do
1834ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1835echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1836echo "configure:1837: checking for $ac_hdr" >&5
1837if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1838  echo $ac_n "(cached) $ac_c" 1>&6
1839else
1840  cat > conftest.$ac_ext <<EOF
1841#line 1842 "configure"
1842#include "confdefs.h"
1843#include <$ac_hdr>
1844EOF
1845ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1846{ (eval echo configure:1847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1847ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1848if test -z "$ac_err"; then
1849  rm -rf conftest*
1850  eval "ac_cv_header_$ac_safe=yes"
1851else
1852  echo "$ac_err" >&5
1853  echo "configure: failed program was:" >&5
1854  cat conftest.$ac_ext >&5
1855  rm -rf conftest*
1856  eval "ac_cv_header_$ac_safe=no"
1857fi
1858rm -f conftest*
1859fi
1860if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1861  echo "$ac_t""yes" 1>&6
1862    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1863  cat >> confdefs.h <<EOF
1864#define $ac_tr_hdr 1
1865EOF
1866 
1867else
1868  echo "$ac_t""no" 1>&6
1869fi
1870done
1871
1872fi
1873
1874saved_CPPFLAGS=$CPPFLAGS
1875CPPFLAGS="$CPPFLAGS $ICONVINC"
1876if test "$liteonly" != yes ; then
1877    ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
1878echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
1879echo "configure:1880: checking for iconv.h" >&5
1880if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1881  echo $ac_n "(cached) $ac_c" 1>&6
1882else
1883  cat > conftest.$ac_ext <<EOF
1884#line 1885 "configure"
1885#include "confdefs.h"
1886#include <iconv.h>
1887EOF
1888ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1889{ (eval echo configure:1890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1890ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1891if test -z "$ac_err"; then
1892  rm -rf conftest*
1893  eval "ac_cv_header_$ac_safe=yes"
1894else
1895  echo "$ac_err" >&5
1896  echo "configure: failed program was:" >&5
1897  cat conftest.$ac_ext >&5
1898  rm -rf conftest*
1899  eval "ac_cv_header_$ac_safe=no"
1900fi
1901rm -f conftest*
1902fi
1903if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1904  echo "$ac_t""yes" 1>&6
1905  :
1906else
1907  echo "$ac_t""no" 1>&6
1908{ echo "configure: error: iconv.h doesn't exist" 1>&2; exit 1; }
1909fi
1910
1911fi
1912CPPFLAGS=$saved_CPPFLAGS
1913
1914echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1915echo "configure:1916: checking for uid_t in sys/types.h" >&5
1916if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1917  echo $ac_n "(cached) $ac_c" 1>&6
1918else
1919  cat > conftest.$ac_ext <<EOF
1920#line 1921 "configure"
1921#include "confdefs.h"
1922#include <sys/types.h>
1923EOF
1924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1925  egrep "uid_t" >/dev/null 2>&1; then
1926  rm -rf conftest*
1927  ac_cv_type_uid_t=yes
1928else
1929  rm -rf conftest*
1930  ac_cv_type_uid_t=no
1931fi
1932rm -f conftest*
1933
1934fi
1935
1936echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1937if test $ac_cv_type_uid_t = no; then
1938  cat >> confdefs.h <<\EOF
1939#define uid_t int
1940EOF
1941
1942  cat >> confdefs.h <<\EOF
1943#define gid_t int
1944EOF
1945
1946fi
1947
1948echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1949echo "configure:1950: checking for ANSI C header files" >&5
1950if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1951  echo $ac_n "(cached) $ac_c" 1>&6
1952else
1953  cat > conftest.$ac_ext <<EOF
1954#line 1955 "configure"
1955#include "confdefs.h"
1956#include <stdlib.h>
1957#include <stdarg.h>
1958#include <string.h>
1959#include <float.h>
1960EOF
1961ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1962{ (eval echo configure:1963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1963ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1964if test -z "$ac_err"; then
1965  rm -rf conftest*
1966  ac_cv_header_stdc=yes
1967else
1968  echo "$ac_err" >&5
1969  echo "configure: failed program was:" >&5
1970  cat conftest.$ac_ext >&5
1971  rm -rf conftest*
1972  ac_cv_header_stdc=no
1973fi
1974rm -f conftest*
1975
1976if test $ac_cv_header_stdc = yes; then
1977  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1978cat > conftest.$ac_ext <<EOF
1979#line 1980 "configure"
1980#include "confdefs.h"
1981#include <string.h>
1982EOF
1983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1984  egrep "memchr" >/dev/null 2>&1; then
1985  :
1986else
1987  rm -rf conftest*
1988  ac_cv_header_stdc=no
1989fi
1990rm -f conftest*
1991
1992fi
1993
1994if test $ac_cv_header_stdc = yes; then
1995  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1996cat > conftest.$ac_ext <<EOF
1997#line 1998 "configure"
1998#include "confdefs.h"
1999#include <stdlib.h>
2000EOF
2001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2002  egrep "free" >/dev/null 2>&1; then
2003  :
2004else
2005  rm -rf conftest*
2006  ac_cv_header_stdc=no
2007fi
2008rm -f conftest*
2009
2010fi
2011
2012if test $ac_cv_header_stdc = yes; then
2013  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2014if test "$cross_compiling" = yes; then
2015  :
2016else
2017  cat > conftest.$ac_ext <<EOF
2018#line 2019 "configure"
2019#include "confdefs.h"
2020#include <ctype.h>
2021#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2022#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2023#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2024int main () { int i; for (i = 0; i < 256; i++)
2025if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2026exit (0); }
2027
2028EOF
2029if { (eval echo configure:2030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2030then
2031  :
2032else
2033  echo "configure: failed program was:" >&5
2034  cat conftest.$ac_ext >&5
2035  rm -fr conftest*
2036  ac_cv_header_stdc=no
2037fi
2038rm -fr conftest*
2039fi
2040
2041fi
2042fi
2043
2044echo "$ac_t""$ac_cv_header_stdc" 1>&6
2045if test $ac_cv_header_stdc = yes; then
2046  cat >> confdefs.h <<\EOF
2047#define STDC_HEADERS 1
2048EOF
2049
2050fi
2051
2052echo $ac_n "checking for BOOL""... $ac_c" 1>&6
2053echo "configure:2054: checking for BOOL" >&5
2054if eval "test \"`echo '$''{'ac_cv_type_BOOL'+set}'`\" = set"; then
2055  echo $ac_n "(cached) $ac_c" 1>&6
2056else
2057  cat > conftest.$ac_ext <<EOF
2058#line 2059 "configure"
2059#include "confdefs.h"
2060#include <sys/types.h>
2061#if STDC_HEADERS
2062#include <stdlib.h>
2063#include <stddef.h>
2064#endif
2065EOF
2066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2067  egrep "(^|[^a-zA-Z_0-9])BOOL[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2068  rm -rf conftest*
2069  ac_cv_type_BOOL=yes
2070else
2071  rm -rf conftest*
2072  ac_cv_type_BOOL=no
2073fi
2074rm -f conftest*
2075
2076fi
2077echo "$ac_t""$ac_cv_type_BOOL" 1>&6
2078if test $ac_cv_type_BOOL = no; then
2079  cat >> confdefs.h <<\EOF
2080#define BOOL int
2081EOF
2082
2083fi
2084
2085
2086if test "$install_runidn" = yes ; then
2087    echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
2088echo "configure:2089: checking for socket in -lsocket" >&5
2089ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
2090if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2091  echo $ac_n "(cached) $ac_c" 1>&6
2092else
2093  ac_save_LIBS="$LIBS"
2094LIBS="-lsocket  $LIBS"
2095cat > conftest.$ac_ext <<EOF
2096#line 2097 "configure"
2097#include "confdefs.h"
2098/* Override any gcc2 internal prototype to avoid an error.  */
2099/* We use char because int might match the return type of a gcc2
2100    builtin and then its argument prototype would still apply.  */
2101char socket();
2102
2103int main() {
2104socket()
2105; return 0; }
2106EOF
2107if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2108  rm -rf conftest*
2109  eval "ac_cv_lib_$ac_lib_var=yes"
2110else
2111  echo "configure: failed program was:" >&5
2112  cat conftest.$ac_ext >&5
2113  rm -rf conftest*
2114  eval "ac_cv_lib_$ac_lib_var=no"
2115fi
2116rm -f conftest*
2117LIBS="$ac_save_LIBS"
2118
2119fi
2120if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2121  echo "$ac_t""yes" 1>&6
2122    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2123    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2124  cat >> confdefs.h <<EOF
2125#define $ac_tr_lib 1
2126EOF
2127
2128  LIBS="-lsocket $LIBS"
2129
2130else
2131  echo "$ac_t""no" 1>&6
2132fi
2133
2134    echo $ac_n "checking for inet_addr in -lnsl""... $ac_c" 1>&6
2135echo "configure:2136: checking for inet_addr in -lnsl" >&5
2136ac_lib_var=`echo nsl'_'inet_addr | sed 'y%./+-%__p_%'`
2137if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2138  echo $ac_n "(cached) $ac_c" 1>&6
2139else
2140  ac_save_LIBS="$LIBS"
2141LIBS="-lnsl  $LIBS"
2142cat > conftest.$ac_ext <<EOF
2143#line 2144 "configure"
2144#include "confdefs.h"
2145/* Override any gcc2 internal prototype to avoid an error.  */
2146/* We use char because int might match the return type of a gcc2
2147    builtin and then its argument prototype would still apply.  */
2148char inet_addr();
2149
2150int main() {
2151inet_addr()
2152; return 0; }
2153EOF
2154if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2155  rm -rf conftest*
2156  eval "ac_cv_lib_$ac_lib_var=yes"
2157else
2158  echo "configure: failed program was:" >&5
2159  cat conftest.$ac_ext >&5
2160  rm -rf conftest*
2161  eval "ac_cv_lib_$ac_lib_var=no"
2162fi
2163rm -f conftest*
2164LIBS="$ac_save_LIBS"
2165
2166fi
2167if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2168  echo "$ac_t""yes" 1>&6
2169    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2170    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2171  cat >> confdefs.h <<EOF
2172#define $ac_tr_lib 1
2173EOF
2174
2175  LIBS="-lnsl $LIBS"
2176
2177else
2178  echo "$ac_t""no" 1>&6
2179fi
2180
2181    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2182echo "configure:2183: checking for dlopen in -ldl" >&5
2183ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2184if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2185  echo $ac_n "(cached) $ac_c" 1>&6
2186else
2187  ac_save_LIBS="$LIBS"
2188LIBS="-ldl  $LIBS"
2189cat > conftest.$ac_ext <<EOF
2190#line 2191 "configure"
2191#include "confdefs.h"
2192/* Override any gcc2 internal prototype to avoid an error.  */
2193/* We use char because int might match the return type of a gcc2
2194    builtin and then its argument prototype would still apply.  */
2195char dlopen();
2196
2197int main() {
2198dlopen()
2199; return 0; }
2200EOF
2201if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2202  rm -rf conftest*
2203  eval "ac_cv_lib_$ac_lib_var=yes"
2204else
2205  echo "configure: failed program was:" >&5
2206  cat conftest.$ac_ext >&5
2207  rm -rf conftest*
2208  eval "ac_cv_lib_$ac_lib_var=no"
2209fi
2210rm -f conftest*
2211LIBS="$ac_save_LIBS"
2212
2213fi
2214if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2215  echo "$ac_t""yes" 1>&6
2216  
2217	LIBS="-ldl $LIBS"
2218	LIBDL="-ldl"
2219	cat >> confdefs.h <<\EOF
2220#define HAVE_LIBDL 1
2221EOF
2222
2223	
2224    
2225else
2226  echo "$ac_t""no" 1>&6
2227fi
2228
2229fi
2230
2231for ac_func in vsnprintf setvbuf setlocale nl_langinfo memmove bcopy setenv \
2232    unsetenv
2233do
2234echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2235echo "configure:2236: checking for $ac_func" >&5
2236if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2237  echo $ac_n "(cached) $ac_c" 1>&6
2238else
2239  cat > conftest.$ac_ext <<EOF
2240#line 2241 "configure"
2241#include "confdefs.h"
2242/* System header to define __stub macros and hopefully few prototypes,
2243    which can conflict with char $ac_func(); below.  */
2244#include <assert.h>
2245/* Override any gcc2 internal prototype to avoid an error.  */
2246/* We use char because int might match the return type of a gcc2
2247    builtin and then its argument prototype would still apply.  */
2248char $ac_func();
2249
2250int main() {
2251
2252/* The GNU C library defines this for functions which it implements
2253    to always fail with ENOSYS.  Some functions are actually named
2254    something starting with __ and the normal name is an alias.  */
2255#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2256choke me
2257#else
2258$ac_func();
2259#endif
2260
2261; return 0; }
2262EOF
2263if { (eval echo configure:2264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2264  rm -rf conftest*
2265  eval "ac_cv_func_$ac_func=yes"
2266else
2267  echo "configure: failed program was:" >&5
2268  cat conftest.$ac_ext >&5
2269  rm -rf conftest*
2270  eval "ac_cv_func_$ac_func=no"
2271fi
2272rm -f conftest*
2273fi
2274
2275if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2276  echo "$ac_t""yes" 1>&6
2277    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2278  cat >> confdefs.h <<EOF
2279#define $ac_tr_func 1
2280EOF
2281 
2282else
2283  echo "$ac_t""no" 1>&6
2284fi
2285done
2286
2287if test "$install_runidn" = yes ; then
2288    for ac_func in gethostbyname gethostbyname2 gethostbyaddr
2289do
2290echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2291echo "configure:2292: checking for $ac_func" >&5
2292if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2293  echo $ac_n "(cached) $ac_c" 1>&6
2294else
2295  cat > conftest.$ac_ext <<EOF
2296#line 2297 "configure"
2297#include "confdefs.h"
2298/* System header to define __stub macros and hopefully few prototypes,
2299    which can conflict with char $ac_func(); below.  */
2300#include <assert.h>
2301/* Override any gcc2 internal prototype to avoid an error.  */
2302/* We use char because int might match the return type of a gcc2
2303    builtin and then its argument prototype would still apply.  */
2304char $ac_func();
2305
2306int main() {
2307
2308/* The GNU C library defines this for functions which it implements
2309    to always fail with ENOSYS.  Some functions are actually named
2310    something starting with __ and the normal name is an alias.  */
2311#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2312choke me
2313#else
2314$ac_func();
2315#endif
2316
2317; return 0; }
2318EOF
2319if { (eval echo configure:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2320  rm -rf conftest*
2321  eval "ac_cv_func_$ac_func=yes"
2322else
2323  echo "configure: failed program was:" >&5
2324  cat conftest.$ac_ext >&5
2325  rm -rf conftest*
2326  eval "ac_cv_func_$ac_func=no"
2327fi
2328rm -f conftest*
2329fi
2330
2331if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2332  echo "$ac_t""yes" 1>&6
2333    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2334  cat >> confdefs.h <<EOF
2335#define $ac_tr_func 1
2336EOF
2337 
2338else
2339  echo "$ac_t""no" 1>&6
2340fi
2341done
2342
2343    for ac_func in gethostbyname_r gethostbyname2_r gethostbyaddr_r
2344do
2345echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2346echo "configure:2347: checking for $ac_func" >&5
2347if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2348  echo $ac_n "(cached) $ac_c" 1>&6
2349else
2350  cat > conftest.$ac_ext <<EOF
2351#line 2352 "configure"
2352#include "confdefs.h"
2353/* System header to define __stub macros and hopefully few prototypes,
2354    which can conflict with char $ac_func(); below.  */
2355#include <assert.h>
2356/* Override any gcc2 internal prototype to avoid an error.  */
2357/* We use char because int might match the return type of a gcc2
2358    builtin and then its argument prototype would still apply.  */
2359char $ac_func();
2360
2361int main() {
2362
2363/* The GNU C library defines this for functions which it implements
2364    to always fail with ENOSYS.  Some functions are actually named
2365    something starting with __ and the normal name is an alias.  */
2366#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2367choke me
2368#else
2369$ac_func();
2370#endif
2371
2372; return 0; }
2373EOF
2374if { (eval echo configure:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2375  rm -rf conftest*
2376  eval "ac_cv_func_$ac_func=yes"
2377else
2378  echo "configure: failed program was:" >&5
2379  cat conftest.$ac_ext >&5
2380  rm -rf conftest*
2381  eval "ac_cv_func_$ac_func=no"
2382fi
2383rm -f conftest*
2384fi
2385
2386if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2387  echo "$ac_t""yes" 1>&6
2388    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2389  cat >> confdefs.h <<EOF
2390#define $ac_tr_func 1
2391EOF
2392 find_gethost_r=yes
2393else
2394  echo "$ac_t""no" 1>&6
2395fi
2396done
2397
2398    for ac_func in getipnodebyname getipnodebyaddr freehostent
2399do
2400echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2401echo "configure:2402: checking for $ac_func" >&5
2402if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2403  echo $ac_n "(cached) $ac_c" 1>&6
2404else
2405  cat > conftest.$ac_ext <<EOF
2406#line 2407 "configure"
2407#include "confdefs.h"
2408/* System header to define __stub macros and hopefully few prototypes,
2409    which can conflict with char $ac_func(); below.  */
2410#include <assert.h>
2411/* Override any gcc2 internal prototype to avoid an error.  */
2412/* We use char because int might match the return type of a gcc2
2413    builtin and then its argument prototype would still apply.  */
2414char $ac_func();
2415
2416int main() {
2417
2418/* The GNU C library defines this for functions which it implements
2419    to always fail with ENOSYS.  Some functions are actually named
2420    something starting with __ and the normal name is an alias.  */
2421#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2422choke me
2423#else
2424$ac_func();
2425#endif
2426
2427; return 0; }
2428EOF
2429if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2430  rm -rf conftest*
2431  eval "ac_cv_func_$ac_func=yes"
2432else
2433  echo "configure: failed program was:" >&5
2434  cat conftest.$ac_ext >&5
2435  rm -rf conftest*
2436  eval "ac_cv_func_$ac_func=no"
2437fi
2438rm -f conftest*
2439fi
2440
2441if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2442  echo "$ac_t""yes" 1>&6
2443    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2444  cat >> confdefs.h <<EOF
2445#define $ac_tr_func 1
2446EOF
2447 
2448else
2449  echo "$ac_t""no" 1>&6
2450fi
2451done
2452
2453    for ac_func in getaddrinfo freeaddrinfo getnameinfo
2454do
2455echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2456echo "configure:2457: checking for $ac_func" >&5
2457if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2458  echo $ac_n "(cached) $ac_c" 1>&6
2459else
2460  cat > conftest.$ac_ext <<EOF
2461#line 2462 "configure"
2462#include "confdefs.h"
2463/* System header to define __stub macros and hopefully few prototypes,
2464    which can conflict with char $ac_func(); below.  */
2465#include <assert.h>
2466/* Override any gcc2 internal prototype to avoid an error.  */
2467/* We use char because int might match the return type of a gcc2
2468    builtin and then its argument prototype would still apply.  */
2469char $ac_func();
2470
2471int main() {
2472
2473/* The GNU C library defines this for functions which it implements
2474    to always fail with ENOSYS.  Some functions are actually named
2475    something starting with __ and the normal name is an alias.  */
2476#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2477choke me
2478#else
2479$ac_func();
2480#endif
2481
2482; return 0; }
2483EOF
2484if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2485  rm -rf conftest*
2486  eval "ac_cv_func_$ac_func=yes"
2487else
2488  echo "configure: failed program was:" >&5
2489  cat conftest.$ac_ext >&5
2490  rm -rf conftest*
2491  eval "ac_cv_func_$ac_func=no"
2492fi
2493rm -f conftest*
2494fi
2495
2496if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2497  echo "$ac_t""yes" 1>&6
2498    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2499  cat >> confdefs.h <<EOF
2500#define $ac_tr_func 1
2501EOF
2502 
2503else
2504  echo "$ac_t""no" 1>&6
2505fi
2506done
2507
2508    for ac_func in dlopen dlsym
2509do
2510echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2511echo "configure:2512: checking for $ac_func" >&5
2512if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2513  echo $ac_n "(cached) $ac_c" 1>&6
2514else
2515  cat > conftest.$ac_ext <<EOF
2516#line 2517 "configure"
2517#include "confdefs.h"
2518/* System header to define __stub macros and hopefully few prototypes,
2519    which can conflict with char $ac_func(); below.  */
2520#include <assert.h>
2521/* Override any gcc2 internal prototype to avoid an error.  */
2522/* We use char because int might match the return type of a gcc2
2523    builtin and then its argument prototype would still apply.  */
2524char $ac_func();
2525
2526int main() {
2527
2528/* The GNU C library defines this for functions which it implements
2529    to always fail with ENOSYS.  Some functions are actually named
2530    something starting with __ and the normal name is an alias.  */
2531#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2532choke me
2533#else
2534$ac_func();
2535#endif
2536
2537; return 0; }
2538EOF
2539if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2540  rm -rf conftest*
2541  eval "ac_cv_func_$ac_func=yes"
2542else
2543  echo "configure: failed program was:" >&5
2544  cat conftest.$ac_ext >&5
2545  rm -rf conftest*
2546  eval "ac_cv_func_$ac_func=no"
2547fi
2548rm -f conftest*
2549fi
2550
2551if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2552  echo "$ac_t""yes" 1>&6
2553    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2554  cat >> confdefs.h <<EOF
2555#define $ac_tr_func 1
2556EOF
2557 
2558else
2559  echo "$ac_t""no" 1>&6
2560fi
2561done
2562
2563fi
2564
2565if test "$install_runidn" = yes ; then
2566    echo $ac_n "checking flavor of gethostbyaddr""... $ac_c" 1>&6
2567echo "configure:2568: checking flavor of gethostbyaddr" >&5
2568if eval "test \"`echo '$''{'ac_cv_flavor_gethostbyaddr'+set}'`\" = set"; then
2569  echo $ac_n "(cached) $ac_c" 1>&6
2570else
2571  ac_cv_flavor_gethostbyaddr=unknown
2572    if test "$cross_compiling" = yes; then
2573  ac_cv_flavor_gethostbyaddr=unknown
2574else
2575  cat > conftest.$ac_ext <<EOF
2576#line 2577 "configure"
2577#include "confdefs.h"
2578
2579    #include <stddef.h>
2580    #include <sys/types.h>
2581    #include <sys/socket.h>
2582    #include <netdb.h>
2583    struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type) {
2584	return NULL;
2585    }
2586    int main() {
2587	(void)gethostbyaddr(NULL, 0, 0);
2588	return 0;
2589    }
2590    
2591EOF
2592if { (eval echo configure:2593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2593then
2594  ac_cv_flavor_gethostbyaddr=glibc2_2
2595else
2596  echo "configure: failed program was:" >&5
2597  cat conftest.$ac_ext >&5
2598fi
2599rm -fr conftest*
2600fi
2601
2602    if test "$cross_compiling" = yes; then
2603  ac_cv_flavor_gethostbyaddr=unknown
2604else
2605  cat > conftest.$ac_ext <<EOF
2606#line 2607 "configure"
2607#include "confdefs.h"
2608
2609    #include <stddef.h>
2610    #include <sys/types.h>
2611    #include <sys/socket.h>
2612    #include <netdb.h>
2613    struct hostent *gethostbyaddr(const char *addr, size_t len, int type) {
2614	return NULL;
2615    }
2616    int main() {
2617	(void)gethostbyaddr(NULL, 0, 0);
2618	return 0;
2619    }
2620    
2621EOF
2622if { (eval echo configure:2623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2623then
2624  ac_cv_flavor_gethostbyaddr=glibc
2625else
2626  echo "configure: failed program was:" >&5
2627  cat conftest.$ac_ext >&5
2628fi
2629rm -fr conftest*
2630fi
2631
2632    if test "$cross_compiling" = yes; then
2633  ac_cv_flavor_gethostbyaddr=unknown
2634else
2635  cat > conftest.$ac_ext <<EOF
2636#line 2637 "configure"
2637#include "confdefs.h"
2638
2639    #include <stddef.h>
2640    #include <sys/types.h>
2641    #include <sys/socket.h>
2642    #include <netdb.h>
2643    struct hostent *gethostbyaddr(const char *addr, int len, int type) {
2644	return NULL;
2645    }
2646    int main() {
2647	(void)gethostbyaddr(NULL, 0, 0);
2648	return 0;
2649    }
2650    
2651EOF
2652if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2653then
2654  ac_cv_flavor_gethostbyaddr=traditional
2655else
2656  echo "configure: failed program was:" >&5
2657  cat conftest.$ac_ext >&5
2658fi
2659rm -fr conftest*
2660fi
2661
2662    if test "$ac_cv_func_gethostbyaddr" = no ; then
2663	ac_cv_flavor_gethostbyaddr=none
2664    fi
2665fi
2666
2667echo "$ac_t""$ac_cv_flavor_gethostbyaddr" 1>&6
2668
2669    case "$ac_cv_flavor_gethostbyaddr" in
2670    glibc2_2)
2671	ac_cv_type_ghba_addr_t='const void *'
2672	ac_cv_type_ghba_addrlen_t='socklen_t'
2673	;;
2674    glibc)
2675	ac_cv_type_ghba_addr_t='const char *'
2676	ac_cv_type_ghba_addrlen_t='size_t'
2677	;;
2678    traditional | none)
2679	ac_cv_type_ghba_addr_t='const char *'
2680	ac_cv_type_ghba_addrlen_t='int'
2681	;;
2682    *)
2683	{ echo "configure: error: can't build runidn, since parameter type list of gethostbyaddr() is unknown to configure." 1>&2; exit 1; }
2684	;;
2685    esac
2686    cat >> confdefs.h <<EOF
2687#define GHBA_ADDR_T $ac_cv_type_ghba_addr_t
2688EOF
2689
2690    cat >> confdefs.h <<EOF
2691#define GHBA_ADDRLEN_T $ac_cv_type_ghba_addrlen_t
2692EOF
2693
2694
2695    echo $ac_n "checking flavor of getnameinfo""... $ac_c" 1>&6
2696echo "configure:2697: checking flavor of getnameinfo" >&5
2697if eval "test \"`echo '$''{'ac_cv_flavor_getnameinfo'+set}'`\" = set"; then
2698  echo $ac_n "(cached) $ac_c" 1>&6
2699else
2700  ac_cv_flavor_getnameinfo=unknown
2701    if test "$cross_compiling" = yes; then
2702  ac_cv_flavor_getnameinfo=unknown
2703else
2704  cat > conftest.$ac_ext <<EOF
2705#line 2706 "configure"
2706#include "confdefs.h"
2707
2708    #include <stddef.h>
2709    #include <sys/types.h>
2710    #include <sys/socket.h>
2711    #include <netdb.h>
2712    int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
2713                    socklen_t hostlen, char *serv, socklen_t servlen,
2714                    unsigned int flags) {
2715	return NULL;
2716    }
2717    int main() {
2718	(void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0);
2719	return 0;
2720    }
2721    
2722EOF
2723if { (eval echo configure:2724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2724then
2725  ac_cv_flavor_getnameinfo=glibc2_2_2
2726else
2727  echo "configure: failed program was:" >&5
2728  cat conftest.$ac_ext >&5
2729fi
2730rm -fr conftest*
2731fi
2732
2733    if test "$cross_compiling" = yes; then
2734  ac_cv_flavor_getnameinfo=unknown
2735else
2736  cat > conftest.$ac_ext <<EOF
2737#line 2738 "configure"
2738#include "confdefs.h"
2739
2740    #include <stddef.h>
2741    #include <sys/types.h>
2742    #include <sys/socket.h>
2743    #include <netdb.h>
2744    int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
2745                    socklen_t hostlen, char *serv, socklen_t servlen,
2746                    int flags) {
2747	return NULL;
2748    }
2749    int main() {
2750	(void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0);
2751	return 0;
2752    }
2753    
2754EOF
2755if { (eval echo configure:2756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2756then
2757  ac_cv_flavor_getnameinfo=rfc2553bis_03
2758else
2759  echo "configure: failed program was:" >&5
2760  cat conftest.$ac_ext >&5
2761fi
2762rm -fr conftest*
2763fi
2764
2765    if test "$cross_compiling" = yes; then
2766  ac_cv_flavor_getnameinfo=unknown
2767else
2768  cat > conftest.$ac_ext <<EOF
2769#line 2770 "configure"
2770#include "confdefs.h"
2771
2772    #include <stddef.h>
2773    #include <sys/types.h>
2774    #include <sys/socket.h>
2775    #include <netdb.h>
2776    int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
2777                    size_t hostlen, char *serv, size_t servlen, int flags) {
2778	return NULL;
2779    }
2780    int main() {
2781	(void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0);
2782	return 0;
2783    }
2784    
2785EOF
2786if { (eval echo configure:2787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2787then
2788  ac_cv_flavor_getnameinfo=rfc2553
2789else
2790  echo "configure: failed program was:" >&5
2791  cat conftest.$ac_ext >&5
2792fi
2793rm -fr conftest*
2794fi
2795
2796    if test "$cross_compiling" = yes; then
2797  ac_cv_flavor_getnameinfo=unknown
2798else
2799  cat > conftest.$ac_ext <<EOF
2800#line 2801 "configure"
2801#include "confdefs.h"
2802
2803    #include <stddef.h>
2804    #include <sys/types.h>
2805    #include <sys/socket.h>
2806    #include <netdb.h>
2807    int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
2808                    size_t hostlen, char *serv, size_t servlen, int flags) {
2809	return NULL;
2810    }
2811    int main() {
2812	(void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0);
2813	return 0;
2814    }
2815    
2816EOF
2817if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2818then
2819  ac_cv_flavor_getnameinfo=rfc2133
2820else
2821  echo "configure: failed program was:" >&5
2822  cat conftest.$ac_ext >&5
2823fi
2824rm -fr conftest*
2825fi
2826
2827    if test "$ac_cv_func_getnameinfo" = no ; then
2828	ac_cv_flavor_getnameinfo=none
2829    fi
2830fi
2831
2832echo "$ac_t""$ac_cv_flavor_getnameinfo" 1>&6
2833
2834    case "$ac_cv_flavor_getnameinfo" in
2835    glibc2_2_2)
2836	ac_cv_type_gni_salen_t='socklen_t'
2837	ac_cv_type_gni_hostlen_t='socklen_t'
2838	ac_cv_type_gni_servlen_t='socklen_t'
2839	ac_cv_type_gni_flags_t='unsigned int'
2840	;;
2841    rfc2553bis_03)
2842	ac_cv_type_gni_salen_t='socklen_t'
2843	ac_cv_type_gni_hostlen_t='socklen_t'
2844	ac_cv_type_gni_servlen_t='socklen_t'
2845	ac_cv_type_gni_flags_t='int'
2846	;;
2847    rfc2553)
2848	ac_cv_type_gni_salen_t='socklen_t'
2849	ac_cv_type_gni_hostlen_t='size_t'
2850	ac_cv_type_gni_servlen_t='size_t'
2851	ac_cv_type_gni_flags_t='int'
2852	;;
2853    rfc2133 | none)
2854	ac_cv_type_gni_salen_t='size_t'
2855	ac_cv_type_gni_hostlen_t='size_t'
2856	ac_cv_type_gni_servlen_t='size_t'
2857	ac_cv_type_gni_flags_t='int'
2858	;;
2859    *)
2860	{ echo "configure: error: can't build runidn, since parameter type list of getnameinfo() is unknown to configure." 1>&2; exit 1; }
2861    esac
2862    cat >> confdefs.h <<EOF
2863#define GNI_SALEN_T $ac_cv_type_gni_salen_t
2864EOF
2865
2866    cat >> confdefs.h <<EOF
2867#define GNI_HOSTLEN_T $ac_cv_type_gni_hostlen_t
2868EOF
2869
2870    cat >> confdefs.h <<EOF
2871#define GNI_SERVLEN_T $ac_cv_type_gni_servlen_t
2872EOF
2873
2874    cat >> confdefs.h <<EOF
2875#define GNI_FLAGS_T $ac_cv_type_gni_flags_t
2876EOF
2877
2878fi
2879
2880if test "$find_gethost_r" = yes; then
2881    echo $ac_n "checking flavor of gethostbyname_r""... $ac_c" 1>&6
2882echo "configure:2883: checking flavor of gethostbyname_r" >&5
2883if eval "test \"`echo '$''{'ac_cv_flavor_gethost_r'+set}'`\" = set"; then
2884  echo $ac_n "(cached) $ac_c" 1>&6
2885else
2886  if test "$cross_compiling" = yes; then
2887  ac_cv_flavor_gethost_r=sun
2888else
2889  cat > conftest.$ac_ext <<EOF
2890#line 2891 "configure"
2891#include "confdefs.h"
2892
2893#include <stddef.h>
2894#include <sys/types.h>
2895#include <sys/socket.h>
2896#include <netdb.h>
2897#include <stdio.h>
2898int main()
2899{
2900    int err = 0;
2901    struct hostent hebuf, *hp;
2902    char buf[10];
2903    /* Try resolving a invalid name using glibc flavor. */
2904    (void)gethostbyname_r("@#!", &hebuf, buf, sizeof(buf), &hp, &err);
2905    if (err != 0)
2906	return 0;	/* glibc flavor */
2907    else
2908	return 1;	/* Sun flavor */
2909}
2910
2911EOF
2912if { (eval echo configure:2913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2913then
2914  	ac_cv_flavor_gethost_r=glibc
2915else
2916  echo "configure: failed program was:" >&5
2917  cat conftest.$ac_ext >&5
2918  rm -fr conftest*
2919  ac_cv_flavor_gethost_r=sun
2920fi
2921rm -fr conftest*
2922fi
2923
2924fi
2925
2926echo "$ac_t""$ac_cv_flavor_gethost_r" 1>&6
2927    if test "$ac_cv_flavor_gethost_r" = "glibc"; then
2928	cat >> confdefs.h <<\EOF
2929#define GETHOST_R_GLIBC_FLAVOR 1
2930EOF
2931
2932    fi
2933fi
2934
2935
2936echo $ac_n "checking for libc shared object""... $ac_c" 1>&6
2937echo "configure:2938: checking for libc shared object" >&5
2938shobj_name=libc
2939shobj_path=
2940case "$host" in
2941*-hpux*)
2942    SOEXT=sl
2943    ;;
2944*)
2945    SOEXT=so
2946    ;;
2947esac
2948for shobj_libdir in /lib /usr/lib; do
2949    if test -f $shobj_libdir/$shobj_name.$SOEXT; then
2950        shobj_path=$shobj_libdir/$shobj_name.$SOEXT
2951    else
2952        shobj_path=`ls -r $shobj_libdir/$shobj_name.$SOEXT* 2>/dev/null | head -1`
2953	if test "$shobj_path" != "" -a -f "$shobj_path"; then
2954	    :
2955	else
2956	    shobj_path=
2957	fi
2958    fi
2959    if test "$shobj_path" != ""; then
2960	echo "$ac_t""$shobj_path" 1>&6
2961        shobj_pathsymbol=SOPATH_`echo $shobj_name | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2962	cat >> confdefs.h <<EOF
2963#define $shobj_pathsymbol "$shobj_path"
2964EOF
2965
2966	break
2967    fi
2968done
2969if test "$shobj_path" = ""; then
2970    echo "$ac_t""no" 1>&6
2971fi
2972
2973if test "$install_runidn" = yes ; then
2974    
2975echo $ac_n "checking for libnsl shared object""... $ac_c" 1>&6
2976echo "configure:2977: checking for libnsl shared object" >&5
2977shobj_name=libnsl
2978shobj_path=
2979case "$host" in
2980*-hpux*)
2981    SOEXT=sl
2982    ;;
2983*)
2984    SOEXT=so
2985    ;;
2986esac
2987for shobj_libdir in /lib /usr/lib; do
2988    if test -f $shobj_libdir/$shobj_name.$SOEXT; then
2989        shobj_path=$shobj_libdir/$shobj_name.$SOEXT
2990    else
2991        shobj_path=`ls -r $shobj_libdir/$shobj_name.$SOEXT* 2>/dev/null | head -1`
2992	if test "$shobj_path" != "" -a -f "$shobj_path"; then
2993	    :
2994	else
2995	    shobj_path=
2996	fi
2997    fi
2998    if test "$shobj_path" != ""; then
2999	echo "$ac_t""$shobj_path" 1>&6
3000        shobj_pathsymbol=SOPATH_`echo $shobj_name | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3001	cat >> confdefs.h <<EOF
3002#define $shobj_pathsymbol "$shobj_path"
3003EOF
3004
3005	break
3006    fi
3007done
3008if test "$shobj_path" = ""; then
3009    echo "$ac_t""no" 1>&6
3010fi
3011
3012fi
3013
3014if test "$liteonly" != yes ; then
3015    echo $ac_n "checking for iconv""... $ac_c" 1>&6
3016echo "configure:3017: checking for iconv" >&5
3017    saved_CPPFLAGS=$CPPFLAGS
3018    saved_LIBS=$LIBS
3019    CPPFLAGS="$CPPFLAGS $ICONVINC"
3020    LIBS="$LIBS $ICONVLIB"
3021    cat > conftest.$ac_ext <<EOF
3022#line 3023 "configure"
3023#include "confdefs.h"
3024
3025    #include <iconv.h>
3026    
3027int main() {
3028
3029	iconv_t i;
3030	i = iconv_open("ISO-8859-1", "UTF-8");
3031    
3032; return 0; }
3033EOF
3034if { (eval echo configure:3035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3035  rm -rf conftest*
3036  iconv_try_link=yes
3037else
3038  echo "configure: failed program was:" >&5
3039  cat conftest.$ac_ext >&5
3040  rm -rf conftest*
3041  iconv_try_link=no
3042fi
3043rm -f conftest*
3044    LIBS=$saved_LIBS
3045    CPPFLAGS=$saved_CPPFLAGS
3046    echo "$ac_t""$iconv_try_link" 1>&6
3047    if test "$iconv_try_link" = no ; then
3048	{ echo "configure: error: iconv function not available" 1>&2; exit 1; }
3049    fi
3050fi
3051
3052if test "$liteonly" != yes ; then
3053    echo $ac_n "checking for codeset name $UTF8_NAME""... $ac_c" 1>&6
3054echo "configure:3055: checking for codeset name $UTF8_NAME" >&5
3055    saved_CPPFLAGS=$CPPFLAGS
3056    saved_LIBS=$LIBS
3057    CPPFLAGS="$CPPFLAGS $ICONVINC"
3058    LIBS="$LIBS $ICONVLIB"
3059    if test "$cross_compiling" = yes; then
3060  utf8_name_valid=unknown
3061else
3062  cat > conftest.$ac_ext <<EOF
3063#line 3064 "configure"
3064#include "confdefs.h"
3065
3066    #include <stddef.h>
3067    #include <stdlib.h>
3068    #include <iconv.h>
3069    #define UTF8_NAME "$UTF8_NAME"
3070    #define ICONV_FAIL ((iconv_t)(-1))
3071    /* Check if the codeset name UTF8_NAME is valid by performing iconv_open(). */
3072    int main() {
3073	int i;
3074	/* list of codeset names likely to exist */
3075	static char *codeset[] = {
3076	    "ASCII", "ISO-8859-1", "ISO8859-1", "iso8859_1", "8859-1",
3077	    "Shift_JIS", "SJIS", "sjis", NULL,
3078	};
3079
3080	/* First try null conversion. */
3081	if (iconv_open(UTF8_NAME, UTF8_NAME) != ICONV_FAIL) return 0;
3082
3083	/* Unfortunately, above check fails on certain systems, such as Solaris. */
3084	for (i = 0; codeset[i] != NULL; i++) {
3085	    if (iconv_open(UTF8_NAME, codeset[i]) != ICONV_FAIL) return 0;
3086	}
3087	return 1;
3088    }
3089    
3090EOF
3091if { (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3092then
3093  utf8_name_valid=yes
3094else
3095  echo "configure: failed program was:" >&5
3096  cat conftest.$ac_ext >&5
3097  rm -fr conftest*
3098  utf8_name_valid=no
3099fi
3100rm -fr conftest*
3101fi
3102
3103    LIBS=$saved_LIBS
3104    CPPFLAGS=$saved_CPPFLAGS
3105    echo "$ac_t""$utf8_name_valid" 1>&6
3106fi
3107
3108
3109trap '' 1 2 15
3110cat > confcache <<\EOF
3111# This file is a shell script that caches the results of configure
3112# tests run on this system so they can be shared between configure
3113# scripts and configure runs.  It is not useful on other systems.
3114# If it contains results you don't want to keep, you may remove or edit it.
3115#
3116# By default, configure uses ./config.cache as the cache file,
3117# creating it if it does not exist already.  You can give configure
3118# the --cache-file=FILE option to use a different cache file; that is
3119# what configure does when it calls configure scripts in
3120# subdirectories, so they share the cache.
3121# Giving --cache-file=/dev/null disables caching, for debugging configure.
3122# config.status only pays attention to the cache file if you give it the
3123# --recheck option to rerun configure.
3124#
3125EOF
3126# The following way of writing the cache mishandles newlines in values,
3127# but we know of no workaround that is simple, portable, and efficient.
3128# So, don't put newlines in cache variables' values.
3129# Ultrix sh set writes to stderr and can't be redirected directly,
3130# and sets the high bit in the cache file unless we assign to the vars.
3131(set) 2>&1 |
3132  case `(ac_space=' '; set | grep ac_space) 2>&1` in
3133  *ac_space=\ *)
3134    # `set' does not quote correctly, so add quotes (double-quote substitution
3135    # turns \\\\ into \\, and sed turns \\ into \).
3136    sed -n \
3137      -e "s/'/'\\\\''/g" \
3138      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3139    ;;
3140  *)
3141    # `set' quotes correctly as required by POSIX, so do not add quotes.
3142    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3143    ;;
3144  esac >> confcache
3145if cmp -s $cache_file confcache; then
3146  :
3147else
3148  if test -w $cache_file; then
3149    echo "updating cache $cache_file"
3150    cat confcache > $cache_file
3151  else
3152    echo "not updating unwritable cache $cache_file"
3153  fi
3154fi
3155rm -f confcache
3156
3157trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3158
3159test "x$prefix" = xNONE && prefix=$ac_default_prefix
3160# Let make expand exec_prefix.
3161test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3162
3163# Any assignment to VPATH causes Sun make to only execute
3164# the first set of double-colon rules, so remove it if not needed.
3165# If there is a colon in the path, we need to keep it.
3166if test "x$srcdir" = x.; then
3167  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
3168fi
3169
3170trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3171
3172DEFS=-DHAVE_CONFIG_H
3173
3174# Without the "./", some shells look in PATH for config.status.
3175: ${CONFIG_STATUS=./config.status}
3176
3177echo creating $CONFIG_STATUS
3178rm -f $CONFIG_STATUS
3179cat > $CONFIG_STATUS <<EOF
3180#! /bin/sh
3181# Generated automatically by configure.
3182# Run this file to recreate the current configuration.
3183# This directory was configured as follows,
3184# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3185#
3186# $0 $ac_configure_args
3187#
3188# Compiler output produced by configure, useful for debugging
3189# configure, is in ./config.log if it exists.
3190
3191ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3192for ac_option
3193do
3194  case "\$ac_option" in
3195  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3196    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3197    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3198  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3199    echo "$CONFIG_STATUS generated by autoconf version 2.13"
3200    exit 0 ;;
3201  -help | --help | --hel | --he | --h)
3202    echo "\$ac_cs_usage"; exit 0 ;;
3203  *) echo "\$ac_cs_usage"; exit 1 ;;
3204  esac
3205done
3206
3207ac_given_srcdir=$srcdir
3208ac_given_INSTALL="$INSTALL"
3209
3210trap 'rm -fr `echo "Makefile
3211	include/Makefile
3212	include/idn/Makefile
3213	include/mdn/Makefile
3214	lib/Makefile
3215	man/Makefile
3216	tools/Makefile
3217	tools/idnconv/Makefile
3218	tools/runidn/Makefile
3219	tools/runidn/runidn
3220	map/Makefile
3221	lib/tests/Makefile
3222 include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3223EOF
3224cat >> $CONFIG_STATUS <<EOF
3225
3226# Protect against being on the right side of a sed subst in config.status.
3227sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3228 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3229$ac_vpsub
3230$extrasub
3231s%@SHELL@%$SHELL%g
3232s%@CFLAGS@%$CFLAGS%g
3233s%@CPPFLAGS@%$CPPFLAGS%g
3234s%@CXXFLAGS@%$CXXFLAGS%g
3235s%@FFLAGS@%$FFLAGS%g
3236s%@DEFS@%$DEFS%g
3237s%@LDFLAGS@%$LDFLAGS%g
3238s%@LIBS@%$LIBS%g
3239s%@exec_prefix@%$exec_prefix%g
3240s%@prefix@%$prefix%g
3241s%@program_transform_name@%$program_transform_name%g
3242s%@bindir@%$bindir%g
3243s%@sbindir@%$sbindir%g
3244s%@libexecdir@%$libexecdir%g
3245s%@datadir@%$datadir%g
3246s%@sysconfdir@%$sysconfdir%g
3247s%@sharedstatedir@%$sharedstatedir%g
3248s%@localstatedir@%$localstatedir%g
3249s%@libdir@%$libdir%g
3250s%@includedir@%$includedir%g
3251s%@oldincludedir@%$oldincludedir%g
3252s%@infodir@%$infodir%g
3253s%@mandir@%$mandir%g
3254s%@host@%$host%g
3255s%@host_alias@%$host_alias%g
3256s%@host_cpu@%$host_cpu%g
3257s%@host_vendor@%$host_vendor%g
3258s%@host_os@%$host_os%g
3259s%@COMPAT_TRUE@%$COMPAT_TRUE%g
3260s%@COMPAT_FALSE@%$COMPAT_FALSE%g
3261s%@UTF8_NAME@%$UTF8_NAME%g
3262s%@LITEONLY_TRUE@%$LITEONLY_TRUE%g
3263s%@LITEONLY_FALSE@%$LITEONLY_FALSE%g
3264s%@RUNIDN_TRUE@%$RUNIDN_TRUE%g
3265s%@RUNIDN_FALSE@%$RUNIDN_FALSE%g
3266s%@ICONVINC@%$ICONVINC%g
3267s%@ICONVLIB@%$ICONVLIB%g
3268s%@ICONVSOFILE@%$ICONVSOFILE%g
3269s%@PRELOAD_VAR@%$PRELOAD_VAR%g
3270s%@PRELOAD_SEP@%$PRELOAD_SEP%g
3271s%@PRELOAD_LAST@%$PRELOAD_LAST%g
3272s%@CC@%$CC%g
3273s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3274s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3275s%@INSTALL_DATA@%$INSTALL_DATA%g
3276s%@build@%$build%g
3277s%@build_alias@%$build_alias%g
3278s%@build_cpu@%$build_cpu%g
3279s%@build_vendor@%$build_vendor%g
3280s%@build_os@%$build_os%g
3281s%@RANLIB@%$RANLIB%g
3282s%@LN_S@%$LN_S%g
3283s%@LIBTOOL@%$LIBTOOL%g
3284s%@PERL@%$PERL%g
3285s%@CPP@%$CPP%g
3286s%@LIBDL@%$LIBDL%g
3287
3288CEOF
3289EOF
3290
3291cat >> $CONFIG_STATUS <<\EOF
3292
3293# Split the substitutions into bite-sized pieces for seds with
3294# small command number limits, like on Digital OSF/1 and HP-UX.
3295ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3296ac_file=1 # Number of current file.
3297ac_beg=1 # First line for current file.
3298ac_end=$ac_max_sed_cmds # Line after last line for current file.
3299ac_more_lines=:
3300ac_sed_cmds=""
3301while $ac_more_lines; do
3302  if test $ac_beg -gt 1; then
3303    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3304  else
3305    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3306  fi
3307  if test ! -s conftest.s$ac_file; then
3308    ac_more_lines=false
3309    rm -f conftest.s$ac_file
3310  else
3311    if test -z "$ac_sed_cmds"; then
3312      ac_sed_cmds="sed -f conftest.s$ac_file"
3313    else
3314      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3315    fi
3316    ac_file=`expr $ac_file + 1`
3317    ac_beg=$ac_end
3318    ac_end=`expr $ac_end + $ac_max_sed_cmds`
3319  fi
3320done
3321if test -z "$ac_sed_cmds"; then
3322  ac_sed_cmds=cat
3323fi
3324EOF
3325
3326cat >> $CONFIG_STATUS <<EOF
3327
3328CONFIG_FILES=\${CONFIG_FILES-"Makefile
3329	include/Makefile
3330	include/idn/Makefile
3331	include/mdn/Makefile
3332	lib/Makefile
3333	man/Makefile
3334	tools/Makefile
3335	tools/idnconv/Makefile
3336	tools/runidn/Makefile
3337	tools/runidn/runidn
3338	map/Makefile
3339	lib/tests/Makefile
3340"}
3341EOF
3342cat >> $CONFIG_STATUS <<\EOF
3343for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3344  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3345  case "$ac_file" in
3346  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3347       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3348  *) ac_file_in="${ac_file}.in" ;;
3349  esac
3350
3351  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3352
3353  # Remove last slash and all that follows it.  Not all systems have dirname.
3354  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3355  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3356    # The file is in a subdirectory.
3357    test ! -d "$ac_dir" && mkdir "$ac_dir"
3358    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3359    # A "../" for each directory in $ac_dir_suffix.
3360    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3361  else
3362    ac_dir_suffix= ac_dots=
3363  fi
3364
3365  case "$ac_given_srcdir" in
3366  .)  srcdir=.
3367      if test -z "$ac_dots"; then top_srcdir=.
3368      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3369  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3370  *) # Relative path.
3371    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3372    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3373  esac
3374
3375  case "$ac_given_INSTALL" in
3376  [/$]*) INSTALL="$ac_given_INSTALL" ;;
3377  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3378  esac
3379
3380  echo creating "$ac_file"
3381  rm -f "$ac_file"
3382  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3383  case "$ac_file" in
3384  *Makefile*) ac_comsub="1i\\
3385# $configure_input" ;;
3386  *) ac_comsub= ;;
3387  esac
3388
3389  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3390  sed -e "$ac_comsub
3391s%@configure_input@%$configure_input%g
3392s%@srcdir@%$srcdir%g
3393s%@top_srcdir@%$top_srcdir%g
3394s%@INSTALL@%$INSTALL%g
3395" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3396fi; done
3397rm -f conftest.s*
3398
3399# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3400# NAME is the cpp macro being defined and VALUE is the value it is being given.
3401#
3402# ac_d sets the value in "#define NAME VALUE" lines.
3403ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
3404ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
3405ac_dC='\3'
3406ac_dD='%g'
3407# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3408ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
3409ac_uB='\([ 	]\)%\1#\2define\3'
3410ac_uC=' '
3411ac_uD='\4%g'
3412# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3413ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
3414ac_eB='$%\1#\2define\3'
3415ac_eC=' '
3416ac_eD='%g'
3417
3418if test "${CONFIG_HEADERS+set}" != set; then
3419EOF
3420cat >> $CONFIG_STATUS <<EOF
3421  CONFIG_HEADERS="include/config.h"
3422EOF
3423cat >> $CONFIG_STATUS <<\EOF
3424fi
3425for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3426  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3427  case "$ac_file" in
3428  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3429       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3430  *) ac_file_in="${ac_file}.in" ;;
3431  esac
3432
3433  echo creating $ac_file
3434
3435  rm -f conftest.frag conftest.in conftest.out
3436  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3437  cat $ac_file_inputs > conftest.in
3438
3439EOF
3440
3441# Transform confdefs.h into a sed script conftest.vals that substitutes
3442# the proper values into config.h.in to produce config.h.  And first:
3443# Protect against being on the right side of a sed subst in config.status.
3444# Protect against being in an unquoted here document in config.status.
3445rm -f conftest.vals
3446cat > conftest.hdr <<\EOF
3447s/[\\&%]/\\&/g
3448s%[\\$`]%\\&%g
3449s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3450s%ac_d%ac_u%gp
3451s%ac_u%ac_e%gp
3452EOF
3453sed -n -f conftest.hdr confdefs.h > conftest.vals
3454rm -f conftest.hdr
3455
3456# This sed command replaces #undef with comments.  This is necessary, for
3457# example, in the case of _POSIX_SOURCE, which is predefined and required
3458# on some systems where configure will not decide to define it.
3459cat >> conftest.vals <<\EOF
3460s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3461EOF
3462
3463# Break up conftest.vals because some shells have a limit on
3464# the size of here documents, and old seds have small limits too.
3465
3466rm -f conftest.tail
3467while :
3468do
3469  ac_lines=`grep -c . conftest.vals`
3470  # grep -c gives empty output for an empty file on some AIX systems.
3471  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3472  # Write a limited-size here document to conftest.frag.
3473  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3474  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3475  echo 'CEOF
3476  sed -f conftest.frag conftest.in > conftest.out
3477  rm -f conftest.in
3478  mv conftest.out conftest.in
3479' >> $CONFIG_STATUS
3480  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3481  rm -f conftest.vals
3482  mv conftest.tail conftest.vals
3483done
3484rm -f conftest.vals
3485
3486cat >> $CONFIG_STATUS <<\EOF
3487  rm -f conftest.frag conftest.h
3488  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3489  cat conftest.in >> conftest.h
3490  rm -f conftest.in
3491  if cmp -s $ac_file conftest.h 2>/dev/null; then
3492    echo "$ac_file is unchanged"
3493    rm -f conftest.h
3494  else
3495    # Remove last slash and all that follows it.  Not all systems have dirname.
3496      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3497      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3498      # The file is in a subdirectory.
3499      test ! -d "$ac_dir" && mkdir "$ac_dir"
3500    fi
3501    rm -f $ac_file
3502    mv conftest.h $ac_file
3503  fi
3504fi; done
3505
3506EOF
3507cat >> $CONFIG_STATUS <<EOF
3508
3509EOF
3510cat >> $CONFIG_STATUS <<\EOF
3511
3512exit 0
3513EOF
3514chmod +x $CONFIG_STATUS
3515rm -fr confdefs* $ac_clean_files
3516test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3517
3518