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