ignore some files
[tridge/bind9.git] / contrib / idn / idnkit-1.0-src / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-debug          enable debug codes [default=no]"
16 ac_help="$ac_help
17   --enable-mdnkit-compat  enable mDNkit compatibility mode [default=no]"
18 ac_help="$ac_help
19   --enable-extra-ace      enable additional ACE converters. [default=no]"
20 ac_help="$ac_help
21   --with-utf8=NAME        codeset name for UTF-8 encoding [UTF-8]"
22 ac_help="$ac_help
23   --enable-liteonly       compile and install lite library only [default=no]"
24 ac_help="$ac_help
25   --enable-runidn         compile and install runidn [default=no]"
26 ac_help="$ac_help
27   --with-libiconv=IPREFIX  GNU libiconv are installed in IPREFIX [PREFIX]"
28 ac_help="$ac_help
29   --with-iconv-include=DIR  iconv include files are in DIR []"
30 ac_help="$ac_help
31   --with-iconv=LIB        special library for iconv []"
32 ac_help="$ac_help
33   --with-iconv-sofile=PATH  shared library file for libiconv []"
34 ac_help="$ac_help
35   --enable-shared[=PKGS]  build shared libraries [default=yes]"
36 ac_help="$ac_help
37   --enable-static[=PKGS]  build static libraries [default=yes]"
38 ac_help="$ac_help
39   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
40 ac_help="$ac_help
41   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
42 ac_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.
48 build=NONE
49 cache_file=./config.cache
50 exec_prefix=NONE
51 host=NONE
52 no_create=
53 nonopt=NONE
54 no_recursion=
55 prefix=NONE
56 program_prefix=NONE
57 program_suffix=NONE
58 program_transform_name=s,x,x,
59 silent=
60 site=
61 srcdir=
62 target=NONE
63 verbose=
64 x_includes=NONE
65 x_libraries=NONE
66 bindir='${exec_prefix}/bin'
67 sbindir='${exec_prefix}/sbin'
68 libexecdir='${exec_prefix}/libexec'
69 datadir='${prefix}/share'
70 sysconfdir='${prefix}/etc'
71 sharedstatedir='${prefix}/com'
72 localstatedir='${prefix}/var'
73 libdir='${exec_prefix}/lib'
74 includedir='${prefix}/include'
75 oldincludedir='/usr/include'
76 infodir='${prefix}/info'
77 mandir='${prefix}/man'
78
79 # Initialize some other variables.
80 subdirs=
81 MFLAGS= MAKEFLAGS=
82 SHELL=${CONFIG_SHELL-/bin/sh}
83 # Maximum number of lines to put in a shell here document.
84 ac_max_here_lines=12
85
86 ac_prev=
87 for ac_option
88 do
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
168 Usage: configure [options] [host]
169 Options: [defaults in brackets after descriptions]
170 Configuration:
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
176 Directory 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
200 EOF
201     cat << EOF
202 Host 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]
206 Features 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
213 EOF
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
423 done
424
425 if test -n "$ac_prev"; then
426   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
427 fi
428
429 trap '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
439 if test "$silent" = yes; then
440   exec 6>/dev/null
441 else
442   exec 6>&1
443 fi
444 exec 5>./config.log
445
446 echo "\
447 This file contains any messages produced by compilers while
448 running 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.
453 ac_configure_args=
454 for ac_arg
455 do
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
465 done
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.
472 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
473 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
474 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
475 if 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.
478 rm -rf conftest* confdefs.h
479 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
480 echo > 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.
484 ac_unique_file=include/idn/converter.h
485
486 # Find the source files, if location was not specified.
487 if 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
497 else
498   ac_srcdir_defaulted=no
499 fi
500 if 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
506 fi
507 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
508
509 # Prefer explicitly selected file to automatically selected ones.
510 if 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
516 fi
517 for 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
522 done
523
524 if test -r "$cache_file"; then
525   echo "loading cache $cache_file"
526   . $cache_file
527 else
528   echo "creating cache $cache_file"
529   > $cache_file
530 fi
531
532 ac_ext=c
533 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
534 ac_cpp='$CPP $CPPFLAGS'
535 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
536 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
537 cross_compiling=$ac_cv_prog_cc_cross
538
539 ac_exeext=
540 ac_objext=o
541 if (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
549 else
550   ac_n= ac_c='\c' ac_t=
551 fi
552
553
554
555 ac_aux_dir=
556 for 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
566 done
567 if 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; }
569 fi
570 ac_config_guess=$ac_aux_dir/config.guess
571 ac_config_sub=$ac_aux_dir/config.sub
572 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
573
574
575 # Make sure we can run config.sub.
576 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
577 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
578 fi
579
580 echo $ac_n "checking host system type""... $ac_c" 1>&6
581 echo "configure:582: checking host system type" >&5
582
583 host_alias=$host
584 case "$host_alias" in
585 NONE)
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 ;;
593 esac
594
595 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
596 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
597 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
598 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
599 echo "$ac_t""$host" 1>&6
600
601
602 debug=no
603 # Check whether --enable-debug or --disable-debug was given.
604 if test "${enable_debug+set}" = set; then
605   enableval="$enable_debug"
606   debug=$enableval
607 fi
608
609 case "$debug" in
610 yes)
611     CFLAGS="$CFLAGS -DDEBUG"
612     ;;
613 esac
614
615 mdnkit_compat=no
616 COMPAT_TRUE="#"
617 COMPAT_FALSE=
618 # Check whether --enable-mdnkit-compat or --disable-mdnkit-compat was given.
619 if test "${enable_mdnkit_compat+set}" = set; then
620   enableval="$enable_mdnkit_compat"
621   mdnkit_compat=$enableval
622 fi
623
624 case "$mdnkit_compat" in
625 yes)
626     COMPAT_TRUE=
627     COMPAT_FALSE="#"
628     cat >> confdefs.h <<\EOF
629 #define ENABLE_MDNKIT_COMPAT 1
630 EOF
631
632     ;;
633 no)
634     ;;
635 *)
636     { echo "configure: error: You must specify yes or no to --enable-runidn option." 1>&2; exit 1; }
637     ;;
638 esac
639
640
641
642 extraace=no
643 # Check whether --enable-extra-ace or --disable-extra-ace was given.
644 if test "${enable_extra_ace+set}" = set; then
645   enableval="$enable_extra_ace"
646   extraace=$enableval
647 fi
648
649 case "$extraace" in
650 no)
651     ;;
652 yes)
653     cat >> confdefs.h <<\EOF
654 #define IDN_EXTRA_ACE 1
655 EOF
656
657     ;;
658 *)
659     { echo "configure: error: You must specify yes or no to --enable-extra-ace option." 1>&2; exit 1; }
660     ;;
661 esac
662
663 UTF8_NAME=no
664 # Check whether --with-utf8 or --without-utf8 was given.
665 if test "${with_utf8+set}" = set; then
666   withval="$with_utf8"
667   UTF8_NAME=$withval
668 fi
669
670 case "$UTF8_NAME" in
671 no)
672     UTF8_NAME=UTF-8
673     ;;
674 yes)
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"
680 EOF
681
682     ;;
683 esac
684
685
686 liteonly=no
687 LITEONLY_TRUE="#"
688 LITEONLY_FALSE=
689 # Check whether --enable-liteonly or --disable-liteonly was given.
690 if test "${enable_liteonly+set}" = set; then
691   enableval="$enable_liteonly"
692   liteonly=$enableval
693 fi
694
695 case "$liteonly" in
696 no)
697     ;;
698 yes)
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     ;;
708 esac
709
710
711
712 install_runidn=no
713 RUNIDN_TRUE="#"
714 RUNIDN_FALSE=
715 # Check whether --enable-runidn or --disable-runidn was given.
716 if test "${enable_runidn+set}" = set; then
717   enableval="$enable_runidn"
718   install_runidn=$enableval
719 fi
720
721 case "$install_runidn" in
722 no)
723     ;;
724 yes)
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     ;;
734 esac
735
736
737
738 ICONVINC=
739 ICONVLIB=
740
741 libiconv=unspec
742 # Check whether --with-libiconv or --without-libiconv was given.
743 if test "${with_libiconv+set}" = set; then
744   withval="$with_libiconv"
745   libiconv=$withval
746 fi
747
748 case "$libiconv" in
749 unspec)
750     ;;
751 no)
752     ICONVINC=
753     ICONVLIB=
754     ;;
755 yes)
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     ;;
774 esac
775
776 iconv_include=unspec
777 # Check whether --with-iconv-include or --without-iconv-include was given.
778 if test "${with_iconv_include+set}" = set; then
779   withval="$with_iconv_include"
780   iconv_include=$withval
781 fi
782
783 case "$iconv_include" in
784 unspec)
785     ;;
786 no)
787     ICONVINC=
788     ;;
789 yes)
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     ;;
803 esac
804
805 if 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
810 fi
811
812
813
814 iconv=unspec
815 # Check whether --with-iconv or --without-iconv was given.
816 if test "${with_iconv+set}" = set; then
817   withval="$with_iconv"
818   iconv=$withval
819 fi
820
821 case "$iconv" in
822 unspec)
823     ;;
824 no)
825     ICONVLIB=
826     ;;
827 yes)
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     ;;
841 esac
842
843
844 # Check whether --with-iconv-sofile or --without-iconv-sofile was given.
845 if test "${with_iconv_sofile+set}" = set; then
846   withval="$with_iconv_sofile"
847   iconv_file=$withval
848 else
849   iconv_file=guess
850 fi
851
852 ICONVSOFILE=
853 case "$iconv_file" in
854 no)
855     ICONVSOFILE=none
856     ;;
857 yes)
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     ;;
863 guess)
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
869 echo "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     ;;
923 esac
924
925
926 PRELOAD_VAR="LD_PRELOAD"
927 PRELOAD_SEP=":"
928 PRELOAD_LAST=""
929 case "$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     ;;
949 esac
950
951
952
953
954
955 # Extract the first word of "gcc", so it can be a program name with args.
956 set dummy gcc; ac_word=$2
957 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
958 echo "configure:959: checking for $ac_word" >&5
959 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
960   echo $ac_n "(cached) $ac_c" 1>&6
961 else
962   if test -n "$CC"; then
963   ac_cv_prog_CC="$CC" # Let the user override the test.
964 else
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"
975 fi
976 fi
977 CC="$ac_cv_prog_CC"
978 if test -n "$CC"; then
979   echo "$ac_t""$CC" 1>&6
980 else
981   echo "$ac_t""no" 1>&6
982 fi
983
984 if test -z "$CC"; then
985   # Extract the first word of "cc", so it can be a program name with args.
986 set dummy cc; ac_word=$2
987 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
988 echo "configure:989: checking for $ac_word" >&5
989 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
990   echo $ac_n "(cached) $ac_c" 1>&6
991 else
992   if test -n "$CC"; then
993   ac_cv_prog_CC="$CC" # Let the user override the test.
994 else
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"
1010 if 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
1023 fi
1024 fi
1025 fi
1026 CC="$ac_cv_prog_CC"
1027 if test -n "$CC"; then
1028   echo "$ac_t""$CC" 1>&6
1029 else
1030   echo "$ac_t""no" 1>&6
1031 fi
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.
1037 set dummy cl; ac_word=$2
1038 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1039 echo "configure:1040: checking for $ac_word" >&5
1040 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1041   echo $ac_n "(cached) $ac_c" 1>&6
1042 else
1043   if test -n "$CC"; then
1044   ac_cv_prog_CC="$CC" # Let the user override the test.
1045 else
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"
1056 fi
1057 fi
1058 CC="$ac_cv_prog_CC"
1059 if test -n "$CC"; then
1060   echo "$ac_t""$CC" 1>&6
1061 else
1062   echo "$ac_t""no" 1>&6
1063 fi
1064  ;;
1065     esac
1066   fi
1067   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1068 fi
1069
1070 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1071 echo "configure:1072: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1072
1073 ac_ext=c
1074 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1075 ac_cpp='$CPP $CPPFLAGS'
1076 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1077 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1078 cross_compiling=$ac_cv_prog_cc_cross
1079
1080 cat > conftest.$ac_ext << EOF
1081
1082 #line 1083 "configure"
1083 #include "confdefs.h"
1084
1085 main(){return(0);}
1086 EOF
1087 if { (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
1095 else
1096   echo "configure: failed program was:" >&5
1097   cat conftest.$ac_ext >&5
1098   ac_cv_prog_cc_works=no
1099 fi
1100 rm -fr conftest*
1101 ac_ext=c
1102 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1103 ac_cpp='$CPP $CPPFLAGS'
1104 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1105 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1106 cross_compiling=$ac_cv_prog_cc_cross
1107
1108 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1109 if 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; }
1111 fi
1112 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1113 echo "configure:1114: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1114 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1115 cross_compiling=$ac_cv_prog_cc_cross
1116
1117 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1118 echo "configure:1119: checking whether we are using GNU C" >&5
1119 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1120   echo $ac_n "(cached) $ac_c" 1>&6
1121 else
1122   cat > conftest.c <<EOF
1123 #ifdef __GNUC__
1124   yes;
1125 #endif
1126 EOF
1127 if { 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
1129 else
1130   ac_cv_prog_gcc=no
1131 fi
1132 fi
1133
1134 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1135
1136 if test $ac_cv_prog_gcc = yes; then
1137   GCC=yes
1138 else
1139   GCC=
1140 fi
1141
1142 ac_test_CFLAGS="${CFLAGS+set}"
1143 ac_save_CFLAGS="$CFLAGS"
1144 CFLAGS=
1145 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1146 echo "configure:1147: checking whether ${CC-cc} accepts -g" >&5
1147 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1148   echo $ac_n "(cached) $ac_c" 1>&6
1149 else
1150   echo 'void f(){}' > conftest.c
1151 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1152   ac_cv_prog_cc_g=yes
1153 else
1154   ac_cv_prog_cc_g=no
1155 fi
1156 rm -f conftest*
1157
1158 fi
1159
1160 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1161 if test "$ac_test_CFLAGS" = set; then
1162   CFLAGS="$ac_save_CFLAGS"
1163 elif 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
1169 else
1170   if test "$GCC" = yes; then
1171     CFLAGS="-O2"
1172   else
1173     CFLAGS=
1174   fi
1175 fi
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.
1188 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1189 echo "configure:1190: checking for a BSD compatible install" >&5
1190 if test -z "$INSTALL"; then
1191 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1192   echo $ac_n "(cached) $ac_c" 1>&6
1193 else
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
1220 fi
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
1230 fi
1231 echo "$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.
1235 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1236
1237 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1238
1239 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1240
1241 # Check whether --enable-shared or --disable-shared was given.
1242 if test "${enable_shared+set}" = set; then
1243   enableval="$enable_shared"
1244   p=${PACKAGE-default}
1245 case "$enableval" in
1246 yes) enable_shared=yes ;;
1247 no) 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   ;;
1259 esac
1260 else
1261   enable_shared=yes
1262 fi
1263
1264 # Check whether --enable-static or --disable-static was given.
1265 if test "${enable_static+set}" = set; then
1266   enableval="$enable_static"
1267   p=${PACKAGE-default}
1268 case "$enableval" in
1269 yes) enable_static=yes ;;
1270 no) 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   ;;
1282 esac
1283 else
1284   enable_static=yes
1285 fi
1286
1287 # Check whether --enable-fast-install or --disable-fast-install was given.
1288 if test "${enable_fast_install+set}" = set; then
1289   enableval="$enable_fast_install"
1290   p=${PACKAGE-default}
1291 case "$enableval" in
1292 yes) enable_fast_install=yes ;;
1293 no) 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   ;;
1305 esac
1306 else
1307   enable_fast_install=yes
1308 fi
1309
1310 echo $ac_n "checking build system type""... $ac_c" 1>&6
1311 echo "configure:1312: checking build system type" >&5
1312
1313 build_alias=$build
1314 case "$build_alias" in
1315 NONE)
1316   case $nonopt in
1317   NONE) build_alias=$host_alias ;;
1318   *) build_alias=$nonopt ;;
1319   esac ;;
1320 esac
1321
1322 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1323 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1324 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1325 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1326 echo "$ac_t""$build" 1>&6
1327
1328 # Extract the first word of "ranlib", so it can be a program name with args.
1329 set dummy ranlib; ac_word=$2
1330 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1331 echo "configure:1332: checking for $ac_word" >&5
1332 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1333   echo $ac_n "(cached) $ac_c" 1>&6
1334 else
1335   if test -n "$RANLIB"; then
1336   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1337 else
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=":"
1349 fi
1350 fi
1351 RANLIB="$ac_cv_prog_RANLIB"
1352 if test -n "$RANLIB"; then
1353   echo "$ac_t""$RANLIB" 1>&6
1354 else
1355   echo "$ac_t""no" 1>&6
1356 fi
1357
1358 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1359 if test "${with_gnu_ld+set}" = set; then
1360   withval="$with_gnu_ld"
1361   test "$withval" = no || with_gnu_ld=yes
1362 else
1363   with_gnu_ld=no
1364 fi
1365
1366 ac_prog=ld
1367 if 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
1370 echo "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
1392 elif test "$with_gnu_ld" = yes; then
1393   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1394 echo "configure:1395: checking for GNU ld" >&5
1395 else
1396   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1397 echo "configure:1398: checking for non-GNU ld" >&5
1398 fi
1399 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1400   echo $ac_n "(cached) $ac_c" 1>&6
1401 else
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"
1419 else
1420   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1421 fi
1422 fi
1423
1424 LD="$ac_cv_path_LD"
1425 if test -n "$LD"; then
1426   echo "$ac_t""$LD" 1>&6
1427 else
1428   echo "$ac_t""no" 1>&6
1429 fi
1430 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1431 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1432 echo "configure:1433: checking if the linker ($LD) is GNU ld" >&5
1433 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1434   echo $ac_n "(cached) $ac_c" 1>&6
1435 else
1436   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1437 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1438   ac_cv_prog_gnu_ld=yes
1439 else
1440   ac_cv_prog_gnu_ld=no
1441 fi
1442 fi
1443
1444 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1445
1446
1447 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1448 echo "configure:1449: checking for BSD-compatible nm" >&5
1449 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1450   echo $ac_n "(cached) $ac_c" 1>&6
1451 else
1452   if test -n "$NM"; then
1453   # Let the user override the test.
1454   ac_cv_path_NM="$NM"
1455 else
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
1477 fi
1478 fi
1479
1480 NM="$ac_cv_path_NM"
1481 echo "$ac_t""$NM" 1>&6
1482
1483 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1484 echo "configure:1485: checking whether ln -s works" >&5
1485 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1486   echo $ac_n "(cached) $ac_c" 1>&6
1487 else
1488   rm -f conftestdata
1489 if ln -s X conftestdata 2>/dev/null
1490 then
1491   rm -f conftestdata
1492   ac_cv_prog_LN_S="ln -s"
1493 else
1494   ac_cv_prog_LN_S=ln
1495 fi
1496 fi
1497 LN_S="$ac_cv_prog_LN_S"
1498 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1499   echo "$ac_t""yes" 1>&6
1500 else
1501   echo "$ac_t""no" 1>&6
1502 fi
1503
1504
1505 case "$target" in
1506 NONE) lt_target="$host" ;;
1507 *) lt_target="$target" ;;
1508 esac
1509
1510 # Check for any special flags to pass to ltconfig.
1511 libtool_flags="--cache-file=$cache_file"
1512 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1513 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1514 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1515 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1516 test "$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.
1520 if test "${enable_libtool_lock+set}" = set; then
1521   enableval="$enable_libtool_lock"
1522   :
1523 fi
1524
1525 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1526 test 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.
1530 case "$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
1555 echo "configure:1556: checking whether the C compiler needs -belf" >&5
1556 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1557   echo $ac_n "(cached) $ac_c" 1>&6
1558 else
1559   cat > conftest.$ac_ext <<EOF
1560 #line 1561 "configure"
1561 #include "confdefs.h"
1562
1563 int main() {
1564
1565 ; return 0; }
1566 EOF
1567 if { (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
1570 else
1571   echo "configure: failed program was:" >&5
1572   cat conftest.$ac_ext >&5
1573   rm -rf conftest*
1574   lt_cv_cc_needs_belf=no
1575 fi
1576 rm -f conftest*
1577 fi
1578
1579 echo "$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
1587 esac
1588
1589
1590 # Save cache, so that ltconfig can load it
1591 cat > 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 #
1606 EOF
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
1626 if cmp -s $cache_file confcache; then
1627   :
1628 else
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
1635 fi
1636 rm -f confcache
1637
1638
1639 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1640 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1641 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1642 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1643 DLLTOOL="$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
1649 if test -r "$cache_file"; then
1650   echo "loading cache $cache_file"
1651   . $cache_file
1652 else
1653   echo "creating cache $cache_file"
1654   > $cache_file
1655 fi
1656
1657
1658 # This can be used to rebuild libtool when needed
1659 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1660
1661 # Always use our own libtool.
1662 LIBTOOL='$(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.
1666 exec 5>>./config.log
1667
1668
1669 for ac_prog in perl
1670 do
1671 # Extract the first word of "$ac_prog", so it can be a program name with args.
1672 set dummy $ac_prog; ac_word=$2
1673 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1674 echo "configure:1675: checking for $ac_word" >&5
1675 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
1676   echo $ac_n "(cached) $ac_c" 1>&6
1677 else
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   ;;
1697 esac
1698 fi
1699 PERL="$ac_cv_path_PERL"
1700 if test -n "$PERL"; then
1701   echo "$ac_t""$PERL" 1>&6
1702 else
1703   echo "$ac_t""no" 1>&6
1704 fi
1705
1706 test -n "$PERL" && break
1707 done
1708 test -n "$PERL" || PERL="perl"
1709
1710
1711 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1712 echo "configure:1713: checking how to run the C preprocessor" >&5
1713 # On Suns, sometimes $CPP names a directory.
1714 if test -n "$CPP" && test -d "$CPP"; then
1715   CPP=
1716 fi
1717 if test -z "$CPP"; then
1718 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1719   echo $ac_n "(cached) $ac_c" 1>&6
1720 else
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>
1730 Syntax Error
1731 EOF
1732 ac_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; }
1734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1735 if test -z "$ac_err"; then
1736   :
1737 else
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>
1747 Syntax Error
1748 EOF
1749 ac_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; }
1751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1752 if test -z "$ac_err"; then
1753   :
1754 else
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>
1764 Syntax Error
1765 EOF
1766 ac_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; }
1768 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1769 if test -z "$ac_err"; then
1770   :
1771 else
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
1777 fi
1778 rm -f conftest*
1779 fi
1780 rm -f conftest*
1781 fi
1782 rm -f conftest*
1783   ac_cv_prog_CPP="$CPP"
1784 fi
1785   CPP="$ac_cv_prog_CPP"
1786 else
1787   ac_cv_prog_CPP="$CPP"
1788 fi
1789 echo "$ac_t""$CPP" 1>&6
1790
1791 for ac_hdr in unistd.h locale.h langinfo.h pwd.h
1792 do
1793 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1794 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1795 echo "configure:1796: checking for $ac_hdr" >&5
1796 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1797   echo $ac_n "(cached) $ac_c" 1>&6
1798 else
1799   cat > conftest.$ac_ext <<EOF
1800 #line 1801 "configure"
1801 #include "confdefs.h"
1802 #include <$ac_hdr>
1803 EOF
1804 ac_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; }
1806 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1807 if test -z "$ac_err"; then
1808   rm -rf conftest*
1809   eval "ac_cv_header_$ac_safe=yes"
1810 else
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"
1816 fi
1817 rm -f conftest*
1818 fi
1819 if 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
1824 EOF
1825  
1826 else
1827   echo "$ac_t""no" 1>&6
1828 fi
1829 done
1830
1831 if test "$install_runidn" = yes ; then
1832     for ac_hdr in dlfcn.h
1833 do
1834 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1835 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1836 echo "configure:1837: checking for $ac_hdr" >&5
1837 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1838   echo $ac_n "(cached) $ac_c" 1>&6
1839 else
1840   cat > conftest.$ac_ext <<EOF
1841 #line 1842 "configure"
1842 #include "confdefs.h"
1843 #include <$ac_hdr>
1844 EOF
1845 ac_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; }
1847 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1848 if test -z "$ac_err"; then
1849   rm -rf conftest*
1850   eval "ac_cv_header_$ac_safe=yes"
1851 else
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"
1857 fi
1858 rm -f conftest*
1859 fi
1860 if 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
1865 EOF
1866  
1867 else
1868   echo "$ac_t""no" 1>&6
1869 fi
1870 done
1871
1872 fi
1873
1874 saved_CPPFLAGS=$CPPFLAGS
1875 CPPFLAGS="$CPPFLAGS $ICONVINC"
1876 if test "$liteonly" != yes ; then
1877     ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
1878 echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
1879 echo "configure:1880: checking for iconv.h" >&5
1880 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1881   echo $ac_n "(cached) $ac_c" 1>&6
1882 else
1883   cat > conftest.$ac_ext <<EOF
1884 #line 1885 "configure"
1885 #include "confdefs.h"
1886 #include <iconv.h>
1887 EOF
1888 ac_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; }
1890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1891 if test -z "$ac_err"; then
1892   rm -rf conftest*
1893   eval "ac_cv_header_$ac_safe=yes"
1894 else
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"
1900 fi
1901 rm -f conftest*
1902 fi
1903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1904   echo "$ac_t""yes" 1>&6
1905   :
1906 else
1907   echo "$ac_t""no" 1>&6
1908 { echo "configure: error: iconv.h doesn't exist" 1>&2; exit 1; }
1909 fi
1910
1911 fi
1912 CPPFLAGS=$saved_CPPFLAGS
1913
1914 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1915 echo "configure:1916: checking for uid_t in sys/types.h" >&5
1916 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1917   echo $ac_n "(cached) $ac_c" 1>&6
1918 else
1919   cat > conftest.$ac_ext <<EOF
1920 #line 1921 "configure"
1921 #include "confdefs.h"
1922 #include <sys/types.h>
1923 EOF
1924 if (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
1928 else
1929   rm -rf conftest*
1930   ac_cv_type_uid_t=no
1931 fi
1932 rm -f conftest*
1933
1934 fi
1935
1936 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1937 if test $ac_cv_type_uid_t = no; then
1938   cat >> confdefs.h <<\EOF
1939 #define uid_t int
1940 EOF
1941
1942   cat >> confdefs.h <<\EOF
1943 #define gid_t int
1944 EOF
1945
1946 fi
1947
1948 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1949 echo "configure:1950: checking for ANSI C header files" >&5
1950 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1951   echo $ac_n "(cached) $ac_c" 1>&6
1952 else
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>
1960 EOF
1961 ac_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; }
1963 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1964 if test -z "$ac_err"; then
1965   rm -rf conftest*
1966   ac_cv_header_stdc=yes
1967 else
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
1973 fi
1974 rm -f conftest*
1975
1976 if test $ac_cv_header_stdc = yes; then
1977   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1978 cat > conftest.$ac_ext <<EOF
1979 #line 1980 "configure"
1980 #include "confdefs.h"
1981 #include <string.h>
1982 EOF
1983 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1984   egrep "memchr" >/dev/null 2>&1; then
1985   :
1986 else
1987   rm -rf conftest*
1988   ac_cv_header_stdc=no
1989 fi
1990 rm -f conftest*
1991
1992 fi
1993
1994 if test $ac_cv_header_stdc = yes; then
1995   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1996 cat > conftest.$ac_ext <<EOF
1997 #line 1998 "configure"
1998 #include "confdefs.h"
1999 #include <stdlib.h>
2000 EOF
2001 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2002   egrep "free" >/dev/null 2>&1; then
2003   :
2004 else
2005   rm -rf conftest*
2006   ac_cv_header_stdc=no
2007 fi
2008 rm -f conftest*
2009
2010 fi
2011
2012 if test $ac_cv_header_stdc = yes; then
2013   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2014 if test "$cross_compiling" = yes; then
2015   :
2016 else
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)))
2024 int main () { int i; for (i = 0; i < 256; i++)
2025 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2026 exit (0); }
2027
2028 EOF
2029 if { (eval echo configure:2030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2030 then
2031   :
2032 else
2033   echo "configure: failed program was:" >&5
2034   cat conftest.$ac_ext >&5
2035   rm -fr conftest*
2036   ac_cv_header_stdc=no
2037 fi
2038 rm -fr conftest*
2039 fi
2040
2041 fi
2042 fi
2043
2044 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2045 if test $ac_cv_header_stdc = yes; then
2046   cat >> confdefs.h <<\EOF
2047 #define STDC_HEADERS 1
2048 EOF
2049
2050 fi
2051
2052 echo $ac_n "checking for BOOL""... $ac_c" 1>&6
2053 echo "configure:2054: checking for BOOL" >&5
2054 if eval "test \"`echo '$''{'ac_cv_type_BOOL'+set}'`\" = set"; then
2055   echo $ac_n "(cached) $ac_c" 1>&6
2056 else
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
2065 EOF
2066 if (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
2070 else
2071   rm -rf conftest*
2072   ac_cv_type_BOOL=no
2073 fi
2074 rm -f conftest*
2075
2076 fi
2077 echo "$ac_t""$ac_cv_type_BOOL" 1>&6
2078 if test $ac_cv_type_BOOL = no; then
2079   cat >> confdefs.h <<\EOF
2080 #define BOOL int
2081 EOF
2082
2083 fi
2084
2085
2086 if test "$install_runidn" = yes ; then
2087     echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
2088 echo "configure:2089: checking for socket in -lsocket" >&5
2089 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
2090 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2091   echo $ac_n "(cached) $ac_c" 1>&6
2092 else
2093   ac_save_LIBS="$LIBS"
2094 LIBS="-lsocket  $LIBS"
2095 cat > 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.  */
2101 char socket();
2102
2103 int main() {
2104 socket()
2105 ; return 0; }
2106 EOF
2107 if { (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"
2110 else
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"
2115 fi
2116 rm -f conftest*
2117 LIBS="$ac_save_LIBS"
2118
2119 fi
2120 if 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
2126 EOF
2127
2128   LIBS="-lsocket $LIBS"
2129
2130 else
2131   echo "$ac_t""no" 1>&6
2132 fi
2133
2134     echo $ac_n "checking for inet_addr in -lnsl""... $ac_c" 1>&6
2135 echo "configure:2136: checking for inet_addr in -lnsl" >&5
2136 ac_lib_var=`echo nsl'_'inet_addr | sed 'y%./+-%__p_%'`
2137 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2138   echo $ac_n "(cached) $ac_c" 1>&6
2139 else
2140   ac_save_LIBS="$LIBS"
2141 LIBS="-lnsl  $LIBS"
2142 cat > 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.  */
2148 char inet_addr();
2149
2150 int main() {
2151 inet_addr()
2152 ; return 0; }
2153 EOF
2154 if { (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"
2157 else
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"
2162 fi
2163 rm -f conftest*
2164 LIBS="$ac_save_LIBS"
2165
2166 fi
2167 if 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
2173 EOF
2174
2175   LIBS="-lnsl $LIBS"
2176
2177 else
2178   echo "$ac_t""no" 1>&6
2179 fi
2180
2181     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2182 echo "configure:2183: checking for dlopen in -ldl" >&5
2183 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2184 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2185   echo $ac_n "(cached) $ac_c" 1>&6
2186 else
2187   ac_save_LIBS="$LIBS"
2188 LIBS="-ldl  $LIBS"
2189 cat > 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.  */
2195 char dlopen();
2196
2197 int main() {
2198 dlopen()
2199 ; return 0; }
2200 EOF
2201 if { (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"
2204 else
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"
2209 fi
2210 rm -f conftest*
2211 LIBS="$ac_save_LIBS"
2212
2213 fi
2214 if 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
2221 EOF
2222
2223         
2224     
2225 else
2226   echo "$ac_t""no" 1>&6
2227 fi
2228
2229 fi
2230
2231 for ac_func in vsnprintf setvbuf setlocale nl_langinfo memmove bcopy setenv \
2232     unsetenv
2233 do
2234 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2235 echo "configure:2236: checking for $ac_func" >&5
2236 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2237   echo $ac_n "(cached) $ac_c" 1>&6
2238 else
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.  */
2248 char $ac_func();
2249
2250 int 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)
2256 choke me
2257 #else
2258 $ac_func();
2259 #endif
2260
2261 ; return 0; }
2262 EOF
2263 if { (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"
2266 else
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"
2271 fi
2272 rm -f conftest*
2273 fi
2274
2275 if 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
2280 EOF
2281  
2282 else
2283   echo "$ac_t""no" 1>&6
2284 fi
2285 done
2286
2287 if test "$install_runidn" = yes ; then
2288     for ac_func in gethostbyname gethostbyname2 gethostbyaddr
2289 do
2290 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2291 echo "configure:2292: checking for $ac_func" >&5
2292 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2293   echo $ac_n "(cached) $ac_c" 1>&6
2294 else
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.  */
2304 char $ac_func();
2305
2306 int 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)
2312 choke me
2313 #else
2314 $ac_func();
2315 #endif
2316
2317 ; return 0; }
2318 EOF
2319 if { (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"
2322 else
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"
2327 fi
2328 rm -f conftest*
2329 fi
2330
2331 if 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
2336 EOF
2337  
2338 else
2339   echo "$ac_t""no" 1>&6
2340 fi
2341 done
2342
2343     for ac_func in gethostbyname_r gethostbyname2_r gethostbyaddr_r
2344 do
2345 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2346 echo "configure:2347: checking for $ac_func" >&5
2347 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2348   echo $ac_n "(cached) $ac_c" 1>&6
2349 else
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.  */
2359 char $ac_func();
2360
2361 int 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)
2367 choke me
2368 #else
2369 $ac_func();
2370 #endif
2371
2372 ; return 0; }
2373 EOF
2374 if { (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"
2377 else
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"
2382 fi
2383 rm -f conftest*
2384 fi
2385
2386 if 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
2391 EOF
2392  find_gethost_r=yes
2393 else
2394   echo "$ac_t""no" 1>&6
2395 fi
2396 done
2397
2398     for ac_func in getipnodebyname getipnodebyaddr freehostent
2399 do
2400 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2401 echo "configure:2402: checking for $ac_func" >&5
2402 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2403   echo $ac_n "(cached) $ac_c" 1>&6
2404 else
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.  */
2414 char $ac_func();
2415
2416 int 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)
2422 choke me
2423 #else
2424 $ac_func();
2425 #endif
2426
2427 ; return 0; }
2428 EOF
2429 if { (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"
2432 else
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"
2437 fi
2438 rm -f conftest*
2439 fi
2440
2441 if 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
2446 EOF
2447  
2448 else
2449   echo "$ac_t""no" 1>&6
2450 fi
2451 done
2452
2453     for ac_func in getaddrinfo freeaddrinfo getnameinfo
2454 do
2455 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2456 echo "configure:2457: checking for $ac_func" >&5
2457 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2458   echo $ac_n "(cached) $ac_c" 1>&6
2459 else
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.  */
2469 char $ac_func();
2470
2471 int 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)
2477 choke me
2478 #else
2479 $ac_func();
2480 #endif
2481
2482 ; return 0; }
2483 EOF
2484 if { (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"
2487 else
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"
2492 fi
2493 rm -f conftest*
2494 fi
2495
2496 if 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
2501 EOF
2502  
2503 else
2504   echo "$ac_t""no" 1>&6
2505 fi
2506 done
2507
2508     for ac_func in dlopen dlsym
2509 do
2510 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2511 echo "configure:2512: checking for $ac_func" >&5
2512 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2513   echo $ac_n "(cached) $ac_c" 1>&6
2514 else
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.  */
2524 char $ac_func();
2525
2526 int 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)
2532 choke me
2533 #else
2534 $ac_func();
2535 #endif
2536
2537 ; return 0; }
2538 EOF
2539 if { (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"
2542 else
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"
2547 fi
2548 rm -f conftest*
2549 fi
2550
2551 if 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
2556 EOF
2557  
2558 else
2559   echo "$ac_t""no" 1>&6
2560 fi
2561 done
2562
2563 fi
2564
2565 if test "$install_runidn" = yes ; then
2566     echo $ac_n "checking flavor of gethostbyaddr""... $ac_c" 1>&6
2567 echo "configure:2568: checking flavor of gethostbyaddr" >&5
2568 if eval "test \"`echo '$''{'ac_cv_flavor_gethostbyaddr'+set}'`\" = set"; then
2569   echo $ac_n "(cached) $ac_c" 1>&6
2570 else
2571   ac_cv_flavor_gethostbyaddr=unknown
2572     if test "$cross_compiling" = yes; then
2573   ac_cv_flavor_gethostbyaddr=unknown
2574 else
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     
2591 EOF
2592 if { (eval echo configure:2593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2593 then
2594   ac_cv_flavor_gethostbyaddr=glibc2_2
2595 else
2596   echo "configure: failed program was:" >&5
2597   cat conftest.$ac_ext >&5
2598 fi
2599 rm -fr conftest*
2600 fi
2601
2602     if test "$cross_compiling" = yes; then
2603   ac_cv_flavor_gethostbyaddr=unknown
2604 else
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     
2621 EOF
2622 if { (eval echo configure:2623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2623 then
2624   ac_cv_flavor_gethostbyaddr=glibc
2625 else
2626   echo "configure: failed program was:" >&5
2627   cat conftest.$ac_ext >&5
2628 fi
2629 rm -fr conftest*
2630 fi
2631
2632     if test "$cross_compiling" = yes; then
2633   ac_cv_flavor_gethostbyaddr=unknown
2634 else
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     
2651 EOF
2652 if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2653 then
2654   ac_cv_flavor_gethostbyaddr=traditional
2655 else
2656   echo "configure: failed program was:" >&5
2657   cat conftest.$ac_ext >&5
2658 fi
2659 rm -fr conftest*
2660 fi
2661
2662     if test "$ac_cv_func_gethostbyaddr" = no ; then
2663         ac_cv_flavor_gethostbyaddr=none
2664     fi
2665 fi
2666
2667 echo "$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
2688 EOF
2689
2690     cat >> confdefs.h <<EOF
2691 #define GHBA_ADDRLEN_T $ac_cv_type_ghba_addrlen_t
2692 EOF
2693
2694
2695     echo $ac_n "checking flavor of getnameinfo""... $ac_c" 1>&6
2696 echo "configure:2697: checking flavor of getnameinfo" >&5
2697 if eval "test \"`echo '$''{'ac_cv_flavor_getnameinfo'+set}'`\" = set"; then
2698   echo $ac_n "(cached) $ac_c" 1>&6
2699 else
2700   ac_cv_flavor_getnameinfo=unknown
2701     if test "$cross_compiling" = yes; then
2702   ac_cv_flavor_getnameinfo=unknown
2703 else
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     
2722 EOF
2723 if { (eval echo configure:2724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2724 then
2725   ac_cv_flavor_getnameinfo=glibc2_2_2
2726 else
2727   echo "configure: failed program was:" >&5
2728   cat conftest.$ac_ext >&5
2729 fi
2730 rm -fr conftest*
2731 fi
2732
2733     if test "$cross_compiling" = yes; then
2734   ac_cv_flavor_getnameinfo=unknown
2735 else
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     
2754 EOF
2755 if { (eval echo configure:2756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2756 then
2757   ac_cv_flavor_getnameinfo=rfc2553bis_03
2758 else
2759   echo "configure: failed program was:" >&5
2760   cat conftest.$ac_ext >&5
2761 fi
2762 rm -fr conftest*
2763 fi
2764
2765     if test "$cross_compiling" = yes; then
2766   ac_cv_flavor_getnameinfo=unknown
2767 else
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     
2785 EOF
2786 if { (eval echo configure:2787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2787 then
2788   ac_cv_flavor_getnameinfo=rfc2553
2789 else
2790   echo "configure: failed program was:" >&5
2791   cat conftest.$ac_ext >&5
2792 fi
2793 rm -fr conftest*
2794 fi
2795
2796     if test "$cross_compiling" = yes; then
2797   ac_cv_flavor_getnameinfo=unknown
2798 else
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     
2816 EOF
2817 if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2818 then
2819   ac_cv_flavor_getnameinfo=rfc2133
2820 else
2821   echo "configure: failed program was:" >&5
2822   cat conftest.$ac_ext >&5
2823 fi
2824 rm -fr conftest*
2825 fi
2826
2827     if test "$ac_cv_func_getnameinfo" = no ; then
2828         ac_cv_flavor_getnameinfo=none
2829     fi
2830 fi
2831
2832 echo "$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
2864 EOF
2865
2866     cat >> confdefs.h <<EOF
2867 #define GNI_HOSTLEN_T $ac_cv_type_gni_hostlen_t
2868 EOF
2869
2870     cat >> confdefs.h <<EOF
2871 #define GNI_SERVLEN_T $ac_cv_type_gni_servlen_t
2872 EOF
2873
2874     cat >> confdefs.h <<EOF
2875 #define GNI_FLAGS_T $ac_cv_type_gni_flags_t
2876 EOF
2877
2878 fi
2879
2880 if test "$find_gethost_r" = yes; then
2881     echo $ac_n "checking flavor of gethostbyname_r""... $ac_c" 1>&6
2882 echo "configure:2883: checking flavor of gethostbyname_r" >&5
2883 if eval "test \"`echo '$''{'ac_cv_flavor_gethost_r'+set}'`\" = set"; then
2884   echo $ac_n "(cached) $ac_c" 1>&6
2885 else
2886   if test "$cross_compiling" = yes; then
2887   ac_cv_flavor_gethost_r=sun
2888 else
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>
2898 int 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
2911 EOF
2912 if { (eval echo configure:2913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2913 then
2914         ac_cv_flavor_gethost_r=glibc
2915 else
2916   echo "configure: failed program was:" >&5
2917   cat conftest.$ac_ext >&5
2918   rm -fr conftest*
2919   ac_cv_flavor_gethost_r=sun
2920 fi
2921 rm -fr conftest*
2922 fi
2923
2924 fi
2925
2926 echo "$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
2930 EOF
2931
2932     fi
2933 fi
2934
2935
2936 echo $ac_n "checking for libc shared object""... $ac_c" 1>&6
2937 echo "configure:2938: checking for libc shared object" >&5
2938 shobj_name=libc
2939 shobj_path=
2940 case "$host" in
2941 *-hpux*)
2942     SOEXT=sl
2943     ;;
2944 *)
2945     SOEXT=so
2946     ;;
2947 esac
2948 for 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"
2964 EOF
2965
2966         break
2967     fi
2968 done
2969 if test "$shobj_path" = ""; then
2970     echo "$ac_t""no" 1>&6
2971 fi
2972
2973 if test "$install_runidn" = yes ; then
2974     
2975 echo $ac_n "checking for libnsl shared object""... $ac_c" 1>&6
2976 echo "configure:2977: checking for libnsl shared object" >&5
2977 shobj_name=libnsl
2978 shobj_path=
2979 case "$host" in
2980 *-hpux*)
2981     SOEXT=sl
2982     ;;
2983 *)
2984     SOEXT=so
2985     ;;
2986 esac
2987 for 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"
3003 EOF
3004
3005         break
3006     fi
3007 done
3008 if test "$shobj_path" = ""; then
3009     echo "$ac_t""no" 1>&6
3010 fi
3011
3012 fi
3013
3014 if test "$liteonly" != yes ; then
3015     echo $ac_n "checking for iconv""... $ac_c" 1>&6
3016 echo "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     
3027 int main() {
3028
3029         iconv_t i;
3030         i = iconv_open("ISO-8859-1", "UTF-8");
3031     
3032 ; return 0; }
3033 EOF
3034 if { (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
3037 else
3038   echo "configure: failed program was:" >&5
3039   cat conftest.$ac_ext >&5
3040   rm -rf conftest*
3041   iconv_try_link=no
3042 fi
3043 rm -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
3050 fi
3051
3052 if test "$liteonly" != yes ; then
3053     echo $ac_n "checking for codeset name $UTF8_NAME""... $ac_c" 1>&6
3054 echo "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
3061 else
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     
3090 EOF
3091 if { (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3092 then
3093   utf8_name_valid=yes
3094 else
3095   echo "configure: failed program was:" >&5
3096   cat conftest.$ac_ext >&5
3097   rm -fr conftest*
3098   utf8_name_valid=no
3099 fi
3100 rm -fr conftest*
3101 fi
3102
3103     LIBS=$saved_LIBS
3104     CPPFLAGS=$saved_CPPFLAGS
3105     echo "$ac_t""$utf8_name_valid" 1>&6
3106 fi
3107
3108
3109 trap '' 1 2 15
3110 cat > 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 #
3125 EOF
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
3145 if cmp -s $cache_file confcache; then
3146   :
3147 else
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
3154 fi
3155 rm -f confcache
3156
3157 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3158
3159 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3160 # Let make expand exec_prefix.
3161 test "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.
3166 if test "x$srcdir" = x.; then
3167   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3168 fi
3169
3170 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3171
3172 DEFS=-DHAVE_CONFIG_H
3173
3174 # Without the "./", some shells look in PATH for config.status.
3175 : ${CONFIG_STATUS=./config.status}
3176
3177 echo creating $CONFIG_STATUS
3178 rm -f $CONFIG_STATUS
3179 cat > $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
3191 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3192 for ac_option
3193 do
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
3205 done
3206
3207 ac_given_srcdir=$srcdir
3208 ac_given_INSTALL="$INSTALL"
3209
3210 trap '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
3223 EOF
3224 cat >> $CONFIG_STATUS <<EOF
3225
3226 # Protect against being on the right side of a sed subst in config.status.
3227 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3228  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3229 $ac_vpsub
3230 $extrasub
3231 s%@SHELL@%$SHELL%g
3232 s%@CFLAGS@%$CFLAGS%g
3233 s%@CPPFLAGS@%$CPPFLAGS%g
3234 s%@CXXFLAGS@%$CXXFLAGS%g
3235 s%@FFLAGS@%$FFLAGS%g
3236 s%@DEFS@%$DEFS%g
3237 s%@LDFLAGS@%$LDFLAGS%g
3238 s%@LIBS@%$LIBS%g
3239 s%@exec_prefix@%$exec_prefix%g
3240 s%@prefix@%$prefix%g
3241 s%@program_transform_name@%$program_transform_name%g
3242 s%@bindir@%$bindir%g
3243 s%@sbindir@%$sbindir%g
3244 s%@libexecdir@%$libexecdir%g
3245 s%@datadir@%$datadir%g
3246 s%@sysconfdir@%$sysconfdir%g
3247 s%@sharedstatedir@%$sharedstatedir%g
3248 s%@localstatedir@%$localstatedir%g
3249 s%@libdir@%$libdir%g
3250 s%@includedir@%$includedir%g
3251 s%@oldincludedir@%$oldincludedir%g
3252 s%@infodir@%$infodir%g
3253 s%@mandir@%$mandir%g
3254 s%@host@%$host%g
3255 s%@host_alias@%$host_alias%g
3256 s%@host_cpu@%$host_cpu%g
3257 s%@host_vendor@%$host_vendor%g
3258 s%@host_os@%$host_os%g
3259 s%@COMPAT_TRUE@%$COMPAT_TRUE%g
3260 s%@COMPAT_FALSE@%$COMPAT_FALSE%g
3261 s%@UTF8_NAME@%$UTF8_NAME%g
3262 s%@LITEONLY_TRUE@%$LITEONLY_TRUE%g
3263 s%@LITEONLY_FALSE@%$LITEONLY_FALSE%g
3264 s%@RUNIDN_TRUE@%$RUNIDN_TRUE%g
3265 s%@RUNIDN_FALSE@%$RUNIDN_FALSE%g
3266 s%@ICONVINC@%$ICONVINC%g
3267 s%@ICONVLIB@%$ICONVLIB%g
3268 s%@ICONVSOFILE@%$ICONVSOFILE%g
3269 s%@PRELOAD_VAR@%$PRELOAD_VAR%g
3270 s%@PRELOAD_SEP@%$PRELOAD_SEP%g
3271 s%@PRELOAD_LAST@%$PRELOAD_LAST%g
3272 s%@CC@%$CC%g
3273 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3274 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3275 s%@INSTALL_DATA@%$INSTALL_DATA%g
3276 s%@build@%$build%g
3277 s%@build_alias@%$build_alias%g
3278 s%@build_cpu@%$build_cpu%g
3279 s%@build_vendor@%$build_vendor%g
3280 s%@build_os@%$build_os%g
3281 s%@RANLIB@%$RANLIB%g
3282 s%@LN_S@%$LN_S%g
3283 s%@LIBTOOL@%$LIBTOOL%g
3284 s%@PERL@%$PERL%g
3285 s%@CPP@%$CPP%g
3286 s%@LIBDL@%$LIBDL%g
3287
3288 CEOF
3289 EOF
3290
3291 cat >> $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.
3295 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3296 ac_file=1 # Number of current file.
3297 ac_beg=1 # First line for current file.
3298 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3299 ac_more_lines=:
3300 ac_sed_cmds=""
3301 while $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
3320 done
3321 if test -z "$ac_sed_cmds"; then
3322   ac_sed_cmds=cat
3323 fi
3324 EOF
3325
3326 cat >> $CONFIG_STATUS <<EOF
3327
3328 CONFIG_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 "}
3341 EOF
3342 cat >> $CONFIG_STATUS <<\EOF
3343 for 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
3391 s%@configure_input@%$configure_input%g
3392 s%@srcdir@%$srcdir%g
3393 s%@top_srcdir@%$top_srcdir%g
3394 s%@INSTALL@%$INSTALL%g
3395 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3396 fi; done
3397 rm -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.
3403 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3404 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3405 ac_dC='\3'
3406 ac_dD='%g'
3407 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3408 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3409 ac_uB='\([      ]\)%\1#\2define\3'
3410 ac_uC=' '
3411 ac_uD='\4%g'
3412 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3413 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3414 ac_eB='$%\1#\2define\3'
3415 ac_eC=' '
3416 ac_eD='%g'
3417
3418 if test "${CONFIG_HEADERS+set}" != set; then
3419 EOF
3420 cat >> $CONFIG_STATUS <<EOF
3421   CONFIG_HEADERS="include/config.h"
3422 EOF
3423 cat >> $CONFIG_STATUS <<\EOF
3424 fi
3425 for 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
3439 EOF
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.
3445 rm -f conftest.vals
3446 cat > conftest.hdr <<\EOF
3447 s/[\\&%]/\\&/g
3448 s%[\\$`]%\\&%g
3449 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3450 s%ac_d%ac_u%gp
3451 s%ac_u%ac_e%gp
3452 EOF
3453 sed -n -f conftest.hdr confdefs.h > conftest.vals
3454 rm -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.
3459 cat >> conftest.vals <<\EOF
3460 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3461 EOF
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
3466 rm -f conftest.tail
3467 while :
3468 do
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
3483 done
3484 rm -f conftest.vals
3485
3486 cat >> $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
3504 fi; done
3505
3506 EOF
3507 cat >> $CONFIG_STATUS <<EOF
3508
3509 EOF
3510 cat >> $CONFIG_STATUS <<\EOF
3511
3512 exit 0
3513 EOF
3514 chmod +x $CONFIG_STATUS
3515 rm -fr confdefs* $ac_clean_files
3516 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3517