UPS: apcupsd clean sources
[tomato.git] / release / src / router / apcupsd / configure
blob97b88c75d1644b10c65abfab524c754fb5cc8a83
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59.
5 # Copyright (C) 2003 Free Software Foundation, Inc.
6 # This configure script is free software; the Free Software Foundation
7 # gives unlimited permission to copy, distribute and modify it.
8 ## --------------------- ##
9 ## M4sh Initialization. ##
10 ## --------------------- ##
12 # Be Bourne compatible
13 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
19 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
22 DUALCASE=1; export DUALCASE # for MKS sh
24 # Support unset when possible.
25 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26 as_unset=unset
27 else
28 as_unset=false
32 # Work around bugs in pre-3.0 UWIN ksh.
33 $as_unset ENV MAIL MAILPATH
34 PS1='$ '
35 PS2='> '
36 PS4='+ '
38 # NLS nuisances.
39 for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
49 done
51 # Required to use basename.
52 if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54 else
55 as_expr=false
58 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60 else
61 as_basename=false
65 # Name of the executable.
66 as_me=`$as_basename "$0" ||
67 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71 echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
78 # PATH needs CR, and LINENO needs CR and PATH.
79 # Avoid depending upon Character Ranges.
80 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83 as_cr_digits='0123456789'
84 as_cr_alnum=$as_cr_Letters$as_cr_digits
86 # The user is always right.
87 if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
96 rm -f conf$$.sh
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110 for as_dir in $PATH
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115 done
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
128 case $CONFIG_SHELL in
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152 done
154 esac
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
187 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189 ' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192 esac
194 if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196 else
197 as_expr=false
200 rm -f conf$$ conf$$.exe conf$$.file
201 echo >conf$$.file
202 if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
211 elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213 else
214 as_ln_s='cp -p'
216 rm -f conf$$ conf$$.exe conf$$.file
218 if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220 else
221 test -d ./-p && rmdir ./-p
222 as_mkdir_p=false
225 as_executable_p="test -f"
227 # Sed expression to map a string onto a valid CPP name.
228 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
230 # Sed expression to map a string onto a valid variable name.
231 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
234 # IFS
235 # We need space, tab and new line, in precisely that order.
236 as_nl='
238 IFS=" $as_nl"
240 # CDPATH.
241 $as_unset CDPATH
244 # Name of the host.
245 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246 # so uname gets run too.
247 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
249 exec 6>&1
252 # Initializations.
254 ac_default_prefix=/usr/local
255 ac_config_libobj_dir=.
256 cross_compiling=no
257 subdirs=
258 MFLAGS=
259 MAKEFLAGS=
260 SHELL=${CONFIG_SHELL-/bin/sh}
262 # Maximum number of lines to put in a shell here document.
263 # This variable seems obsolete. It should probably be removed, and
264 # only ac_max_sed_lines should be used.
265 : ${ac_max_here_lines=38}
267 # Identity of this package.
268 PACKAGE_NAME=
269 PACKAGE_TARNAME=
270 PACKAGE_VERSION=
271 PACKAGE_STRING=
272 PACKAGE_BUGREPORT=
274 ac_unique_file="Developers"
275 ac_default_prefix=/opt/apcupsd
276 ac_default_prefix=/usr
277 # Factoring default headers for most tests.
278 ac_includes_default="\
279 #include <stdio.h>
280 #if HAVE_SYS_TYPES_H
281 # include <sys/types.h>
282 #endif
283 #if HAVE_SYS_STAT_H
284 # include <sys/stat.h>
285 #endif
286 #if STDC_HEADERS
287 # include <stdlib.h>
288 # include <stddef.h>
289 #else
290 # if HAVE_STDLIB_H
291 # include <stdlib.h>
292 # endif
293 #endif
294 #if HAVE_STRING_H
295 # if !STDC_HEADERS && HAVE_MEMORY_H
296 # include <memory.h>
297 # endif
298 # include <string.h>
299 #endif
300 #if HAVE_STRINGS_H
301 # include <strings.h>
302 #endif
303 #if HAVE_INTTYPES_H
304 # include <inttypes.h>
305 #else
306 # if HAVE_STDINT_H
307 # include <stdint.h>
308 # endif
309 #endif
310 #if HAVE_UNISTD_H
311 # include <unistd.h>
312 #endif"
314 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS ABSSRCDIR topdir TOP_DIR VERSION DATE TRUEPRG FALSEPRG build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK HAVE_GCC_TRUE HAVE_GCC_FALSE DEBUG DRVLIBS APCDRVLIBS PTHREAD_CFLAGS PTHREAD_LFLAGS APCACCESS SMTP APCTEST SHUTDOWN APCUPSD_MAIL WALL SCRIPTSHELL RANLIB RM CP ECHO LN SED AR MV RST2HTML RST2PDF EGREP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS HALPOLICYDIR GDHEAD APCSMART_DRIVER DUMB_DRIVER LIBUSBHID LIBUSBHIDINC usbcfg LIBUSBH USB_DRIVER USB_TYPE NET_DRIVER SNMPLITE_DRIVER SNMP_DRIVER TEST_DRIVER PCNET_DRIVER NISIP PKG_CONFIG ac_pt_PKG_CONFIG GAPCMON_CFLAGS GAPCMON_LIBS GAPCMON APCAGENT POWERFLUTE POWERLIBS MAKE LD CGI GD_LIBS CGIBIN SYSCONFDIR MKINSTALLDIRS EXTRADEFS LIBEXTRAOBJ EXTRAOBJ DISTDIR DISTNAME DISTVER SERIALDEV PIDDIR LOGDIR nologdir PWRFAILDIR LOCKDIR NISPORT UPSTYPE UPSCABLE HOST LIBOBJS LTLIBOBJS'
315 ac_subst_files=''
317 # Initialize some variables set by options.
318 ac_init_help=
319 ac_init_version=false
320 # The variables have the same names as the options, with
321 # dashes changed to underlines.
322 cache_file=/dev/null
323 exec_prefix=NONE
324 no_create=
325 no_recursion=
326 prefix=NONE
327 program_prefix=NONE
328 program_suffix=NONE
329 program_transform_name=s,x,x,
330 silent=
331 site=
332 srcdir=
333 verbose=
334 x_includes=NONE
335 x_libraries=NONE
337 # Installation directory options.
338 # These are left unexpanded so users can "make install exec_prefix=/foo"
339 # and all the variables that are supposed to be based on exec_prefix
340 # by default will actually change.
341 # Use braces instead of parens because sh, perl, etc. also accept them.
342 bindir='${exec_prefix}/bin'
343 sbindir='${exec_prefix}/sbin'
344 libexecdir='${exec_prefix}/libexec'
345 datadir='${prefix}/share'
346 sysconfdir='${prefix}/etc'
347 sharedstatedir='${prefix}/com'
348 localstatedir='${prefix}/var'
349 libdir='${exec_prefix}/lib'
350 includedir='${prefix}/include'
351 oldincludedir='/usr/include'
352 infodir='${prefix}/info'
353 mandir='${prefix}/man'
355 ac_prev=
356 for ac_option
358 # If the previous option needs an argument, assign it.
359 if test -n "$ac_prev"; then
360 eval "$ac_prev=\$ac_option"
361 ac_prev=
362 continue
365 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
367 # Accept the important Cygnus configure options, so we can diagnose typos.
369 case $ac_option in
371 -bindir | --bindir | --bindi | --bind | --bin | --bi)
372 ac_prev=bindir ;;
373 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
374 bindir=$ac_optarg ;;
376 -build | --build | --buil | --bui | --bu)
377 ac_prev=build_alias ;;
378 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
379 build_alias=$ac_optarg ;;
381 -cache-file | --cache-file | --cache-fil | --cache-fi \
382 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
383 ac_prev=cache_file ;;
384 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
385 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
386 cache_file=$ac_optarg ;;
388 --config-cache | -C)
389 cache_file=config.cache ;;
391 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
392 ac_prev=datadir ;;
393 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
394 | --da=*)
395 datadir=$ac_optarg ;;
397 -disable-* | --disable-*)
398 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
399 # Reject names that are not valid shell variable names.
400 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
401 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
402 { (exit 1); exit 1; }; }
403 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
404 eval "enable_$ac_feature=no" ;;
406 -enable-* | --enable-*)
407 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
408 # Reject names that are not valid shell variable names.
409 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
410 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
411 { (exit 1); exit 1; }; }
412 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
413 case $ac_option in
414 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
415 *) ac_optarg=yes ;;
416 esac
417 eval "enable_$ac_feature='$ac_optarg'" ;;
419 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
420 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
421 | --exec | --exe | --ex)
422 ac_prev=exec_prefix ;;
423 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
424 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
425 | --exec=* | --exe=* | --ex=*)
426 exec_prefix=$ac_optarg ;;
428 -gas | --gas | --ga | --g)
429 # Obsolete; use --with-gas.
430 with_gas=yes ;;
432 -help | --help | --hel | --he | -h)
433 ac_init_help=long ;;
434 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
435 ac_init_help=recursive ;;
436 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
437 ac_init_help=short ;;
439 -host | --host | --hos | --ho)
440 ac_prev=host_alias ;;
441 -host=* | --host=* | --hos=* | --ho=*)
442 host_alias=$ac_optarg ;;
444 -includedir | --includedir | --includedi | --included | --include \
445 | --includ | --inclu | --incl | --inc)
446 ac_prev=includedir ;;
447 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
448 | --includ=* | --inclu=* | --incl=* | --inc=*)
449 includedir=$ac_optarg ;;
451 -infodir | --infodir | --infodi | --infod | --info | --inf)
452 ac_prev=infodir ;;
453 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
454 infodir=$ac_optarg ;;
456 -libdir | --libdir | --libdi | --libd)
457 ac_prev=libdir ;;
458 -libdir=* | --libdir=* | --libdi=* | --libd=*)
459 libdir=$ac_optarg ;;
461 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
462 | --libexe | --libex | --libe)
463 ac_prev=libexecdir ;;
464 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
465 | --libexe=* | --libex=* | --libe=*)
466 libexecdir=$ac_optarg ;;
468 -localstatedir | --localstatedir | --localstatedi | --localstated \
469 | --localstate | --localstat | --localsta | --localst \
470 | --locals | --local | --loca | --loc | --lo)
471 ac_prev=localstatedir ;;
472 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
473 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
474 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
475 localstatedir=$ac_optarg ;;
477 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
478 ac_prev=mandir ;;
479 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
480 mandir=$ac_optarg ;;
482 -nfp | --nfp | --nf)
483 # Obsolete; use --without-fp.
484 with_fp=no ;;
486 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
487 | --no-cr | --no-c | -n)
488 no_create=yes ;;
490 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
491 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
492 no_recursion=yes ;;
494 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
495 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
496 | --oldin | --oldi | --old | --ol | --o)
497 ac_prev=oldincludedir ;;
498 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
499 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
500 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
501 oldincludedir=$ac_optarg ;;
503 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
504 ac_prev=prefix ;;
505 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
506 prefix=$ac_optarg ;;
508 -program-prefix | --program-prefix | --program-prefi | --program-pref \
509 | --program-pre | --program-pr | --program-p)
510 ac_prev=program_prefix ;;
511 -program-prefix=* | --program-prefix=* | --program-prefi=* \
512 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
513 program_prefix=$ac_optarg ;;
515 -program-suffix | --program-suffix | --program-suffi | --program-suff \
516 | --program-suf | --program-su | --program-s)
517 ac_prev=program_suffix ;;
518 -program-suffix=* | --program-suffix=* | --program-suffi=* \
519 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
520 program_suffix=$ac_optarg ;;
522 -program-transform-name | --program-transform-name \
523 | --program-transform-nam | --program-transform-na \
524 | --program-transform-n | --program-transform- \
525 | --program-transform | --program-transfor \
526 | --program-transfo | --program-transf \
527 | --program-trans | --program-tran \
528 | --progr-tra | --program-tr | --program-t)
529 ac_prev=program_transform_name ;;
530 -program-transform-name=* | --program-transform-name=* \
531 | --program-transform-nam=* | --program-transform-na=* \
532 | --program-transform-n=* | --program-transform-=* \
533 | --program-transform=* | --program-transfor=* \
534 | --program-transfo=* | --program-transf=* \
535 | --program-trans=* | --program-tran=* \
536 | --progr-tra=* | --program-tr=* | --program-t=*)
537 program_transform_name=$ac_optarg ;;
539 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
540 | -silent | --silent | --silen | --sile | --sil)
541 silent=yes ;;
543 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
544 ac_prev=sbindir ;;
545 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
546 | --sbi=* | --sb=*)
547 sbindir=$ac_optarg ;;
549 -sharedstatedir | --sharedstatedir | --sharedstatedi \
550 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
551 | --sharedst | --shareds | --shared | --share | --shar \
552 | --sha | --sh)
553 ac_prev=sharedstatedir ;;
554 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
555 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
556 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
557 | --sha=* | --sh=*)
558 sharedstatedir=$ac_optarg ;;
560 -site | --site | --sit)
561 ac_prev=site ;;
562 -site=* | --site=* | --sit=*)
563 site=$ac_optarg ;;
565 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
566 ac_prev=srcdir ;;
567 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
568 srcdir=$ac_optarg ;;
570 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
571 | --syscon | --sysco | --sysc | --sys | --sy)
572 ac_prev=sysconfdir ;;
573 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
574 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
575 sysconfdir=$ac_optarg ;;
577 -target | --target | --targe | --targ | --tar | --ta | --t)
578 ac_prev=target_alias ;;
579 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
580 target_alias=$ac_optarg ;;
582 -v | -verbose | --verbose | --verbos | --verbo | --verb)
583 verbose=yes ;;
585 -version | --version | --versio | --versi | --vers | -V)
586 ac_init_version=: ;;
588 -with-* | --with-*)
589 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
590 # Reject names that are not valid shell variable names.
591 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
592 { echo "$as_me: error: invalid package name: $ac_package" >&2
593 { (exit 1); exit 1; }; }
594 ac_package=`echo $ac_package| sed 's/-/_/g'`
595 case $ac_option in
596 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
597 *) ac_optarg=yes ;;
598 esac
599 eval "with_$ac_package='$ac_optarg'" ;;
601 -without-* | --without-*)
602 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
603 # Reject names that are not valid shell variable names.
604 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
605 { echo "$as_me: error: invalid package name: $ac_package" >&2
606 { (exit 1); exit 1; }; }
607 ac_package=`echo $ac_package | sed 's/-/_/g'`
608 eval "with_$ac_package=no" ;;
610 --x)
611 # Obsolete; use --with-x.
612 with_x=yes ;;
614 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
615 | --x-incl | --x-inc | --x-in | --x-i)
616 ac_prev=x_includes ;;
617 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
618 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
619 x_includes=$ac_optarg ;;
621 -x-libraries | --x-libraries | --x-librarie | --x-librari \
622 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
623 ac_prev=x_libraries ;;
624 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
625 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
626 x_libraries=$ac_optarg ;;
628 -*) { echo "$as_me: error: unrecognized option: $ac_option
629 Try \`$0 --help' for more information." >&2
630 { (exit 1); exit 1; }; }
633 *=*)
634 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
635 # Reject names that are not valid shell variable names.
636 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
637 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
638 { (exit 1); exit 1; }; }
639 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
640 eval "$ac_envvar='$ac_optarg'"
641 export $ac_envvar ;;
644 # FIXME: should be removed in autoconf 3.0.
645 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
646 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
647 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
648 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
651 esac
652 done
654 if test -n "$ac_prev"; then
655 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
656 { echo "$as_me: error: missing argument to $ac_option" >&2
657 { (exit 1); exit 1; }; }
660 # Be sure to have absolute paths.
661 for ac_var in exec_prefix prefix
663 eval ac_val=$`echo $ac_var`
664 case $ac_val in
665 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
666 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
667 { (exit 1); exit 1; }; };;
668 esac
669 done
671 # Be sure to have absolute paths.
672 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
673 localstatedir libdir includedir oldincludedir infodir mandir
675 eval ac_val=$`echo $ac_var`
676 case $ac_val in
677 [\\/$]* | ?:[\\/]* ) ;;
678 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
679 { (exit 1); exit 1; }; };;
680 esac
681 done
683 # There might be people who depend on the old broken behavior: `$host'
684 # used to hold the argument of --host etc.
685 # FIXME: To remove some day.
686 build=$build_alias
687 host=$host_alias
688 target=$target_alias
690 # FIXME: To remove some day.
691 if test "x$host_alias" != x; then
692 if test "x$build_alias" = x; then
693 cross_compiling=maybe
694 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
695 If a cross compiler is detected then cross compile mode will be used." >&2
696 elif test "x$build_alias" != "x$host_alias"; then
697 cross_compiling=yes
701 ac_tool_prefix=
702 test -n "$host_alias" && ac_tool_prefix=$host_alias-
704 test "$silent" = yes && exec 6>/dev/null
707 # Find the source files, if location was not specified.
708 if test -z "$srcdir"; then
709 ac_srcdir_defaulted=yes
710 # Try the directory containing this script, then its parent.
711 ac_confdir=`(dirname "$0") 2>/dev/null ||
712 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
713 X"$0" : 'X\(//\)[^/]' \| \
714 X"$0" : 'X\(//\)$' \| \
715 X"$0" : 'X\(/\)' \| \
716 . : '\(.\)' 2>/dev/null ||
717 echo X"$0" |
718 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
719 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
720 /^X\(\/\/\)$/{ s//\1/; q; }
721 /^X\(\/\).*/{ s//\1/; q; }
722 s/.*/./; q'`
723 srcdir=$ac_confdir
724 if test ! -r $srcdir/$ac_unique_file; then
725 srcdir=..
727 else
728 ac_srcdir_defaulted=no
730 if test ! -r $srcdir/$ac_unique_file; then
731 if test "$ac_srcdir_defaulted" = yes; then
732 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
733 { (exit 1); exit 1; }; }
734 else
735 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
736 { (exit 1); exit 1; }; }
739 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
740 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
741 { (exit 1); exit 1; }; }
742 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
743 ac_env_build_alias_set=${build_alias+set}
744 ac_env_build_alias_value=$build_alias
745 ac_cv_env_build_alias_set=${build_alias+set}
746 ac_cv_env_build_alias_value=$build_alias
747 ac_env_host_alias_set=${host_alias+set}
748 ac_env_host_alias_value=$host_alias
749 ac_cv_env_host_alias_set=${host_alias+set}
750 ac_cv_env_host_alias_value=$host_alias
751 ac_env_target_alias_set=${target_alias+set}
752 ac_env_target_alias_value=$target_alias
753 ac_cv_env_target_alias_set=${target_alias+set}
754 ac_cv_env_target_alias_value=$target_alias
755 ac_env_CXX_set=${CXX+set}
756 ac_env_CXX_value=$CXX
757 ac_cv_env_CXX_set=${CXX+set}
758 ac_cv_env_CXX_value=$CXX
759 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
760 ac_env_CXXFLAGS_value=$CXXFLAGS
761 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
762 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
763 ac_env_LDFLAGS_set=${LDFLAGS+set}
764 ac_env_LDFLAGS_value=$LDFLAGS
765 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
766 ac_cv_env_LDFLAGS_value=$LDFLAGS
767 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
768 ac_env_CPPFLAGS_value=$CPPFLAGS
769 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
770 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
771 ac_env_CC_set=${CC+set}
772 ac_env_CC_value=$CC
773 ac_cv_env_CC_set=${CC+set}
774 ac_cv_env_CC_value=$CC
775 ac_env_CFLAGS_set=${CFLAGS+set}
776 ac_env_CFLAGS_value=$CFLAGS
777 ac_cv_env_CFLAGS_set=${CFLAGS+set}
778 ac_cv_env_CFLAGS_value=$CFLAGS
779 ac_env_CPP_set=${CPP+set}
780 ac_env_CPP_value=$CPP
781 ac_cv_env_CPP_set=${CPP+set}
782 ac_cv_env_CPP_value=$CPP
783 ac_env_PKG_CONFIG_set=${PKG_CONFIG+set}
784 ac_env_PKG_CONFIG_value=$PKG_CONFIG
785 ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set}
786 ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG
787 ac_env_GAPCMON_CFLAGS_set=${GAPCMON_CFLAGS+set}
788 ac_env_GAPCMON_CFLAGS_value=$GAPCMON_CFLAGS
789 ac_cv_env_GAPCMON_CFLAGS_set=${GAPCMON_CFLAGS+set}
790 ac_cv_env_GAPCMON_CFLAGS_value=$GAPCMON_CFLAGS
791 ac_env_GAPCMON_LIBS_set=${GAPCMON_LIBS+set}
792 ac_env_GAPCMON_LIBS_value=$GAPCMON_LIBS
793 ac_cv_env_GAPCMON_LIBS_set=${GAPCMON_LIBS+set}
794 ac_cv_env_GAPCMON_LIBS_value=$GAPCMON_LIBS
797 # Report the --help message.
799 if test "$ac_init_help" = "long"; then
800 # Omit some internal or obsolete options to make the list less imposing.
801 # This message is too long to be a string in the A/UX 3.1 sh.
802 cat <<_ACEOF
803 \`configure' configures this package to adapt to many kinds of systems.
805 Usage: $0 [OPTION]... [VAR=VALUE]...
807 To assign environment variables (e.g., CC, CFLAGS...), specify them as
808 VAR=VALUE. See below for descriptions of some of the useful variables.
810 Defaults for the options are specified in brackets.
812 Configuration:
813 -h, --help display this help and exit
814 --help=short display options specific to this package
815 --help=recursive display the short help of all the included packages
816 -V, --version display version information and exit
817 -q, --quiet, --silent do not print \`checking...' messages
818 --cache-file=FILE cache test results in FILE [disabled]
819 -C, --config-cache alias for \`--cache-file=config.cache'
820 -n, --no-create do not create output files
821 --srcdir=DIR find the sources in DIR [configure dir or \`..']
823 _ACEOF
825 cat <<_ACEOF
826 Installation directories:
827 --prefix=PREFIX install architecture-independent files in PREFIX
828 [$ac_default_prefix]
829 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
830 [PREFIX]
832 By default, \`make install' will install all the files in
833 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
834 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
835 for instance \`--prefix=\$HOME'.
837 For better control, use the options below.
839 Fine tuning of the installation directories:
840 --bindir=DIR user executables [EPREFIX/bin]
841 --sbindir=DIR system admin executables [EPREFIX/sbin]
842 --libexecdir=DIR program executables [EPREFIX/libexec]
843 --datadir=DIR read-only architecture-independent data [PREFIX/share]
844 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
845 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
846 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
847 --libdir=DIR object code libraries [EPREFIX/lib]
848 --includedir=DIR C header files [PREFIX/include]
849 --oldincludedir=DIR C header files for non-gcc [/usr/include]
850 --infodir=DIR info documentation [PREFIX/info]
851 --mandir=DIR man documentation [PREFIX/man]
852 _ACEOF
854 cat <<\_ACEOF
856 X features:
857 --x-includes=DIR X include files are in DIR
858 --x-libraries=DIR X library files are in DIR
860 System types:
861 --build=BUILD configure for building on BUILD [guessed]
862 --host=HOST cross-compile to build programs to run on HOST [BUILD]
863 _ACEOF
866 if test -n "$ac_init_help"; then
868 cat <<\_ACEOF
870 Optional Features:
871 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
872 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
874 --enable-all Enable all optional modules
875 --enable-cgi Compile CGI programs
877 --enable-apcsmart Compile APC SmartUPS serial driver (default)
878 --disable-apcsmart No APC SmartUPS serial driver
880 --enable-dumb Compile dumb UPS driver (default)
881 --disable-dumb No dumb UPS driver
883 --enable-usb Compile USB UPS code
884 --disable-usb No USB UPS code (default)
886 --enable-net Compile networking driver for slaves (default)
887 --disable-net No network driver for slaves
889 --enable-snmp Compile SNMP driver (default)
890 --disable-snmp No SNMP driver
892 --enable-net-snmp Compile NET-SNMP UPS code (OBSOLETE)
893 --disable-net-snmp No NET-SNMP UPS code (default)
895 --enable-test Compile TEST driver code
896 --disable-test No TEST driver (default)
898 --enable-pcnet Compile PCNET driver code (default)
899 --disable-pcnet No PCNET driver
900 --enable-gapcmon Build GTK/GUI front-end to apcupsd (default=no)
901 --enable-apcagent Build menubar app for Mac OS X (default=no)
902 --enable-install-distdir
903 Install distribution
905 Optional Packages:
906 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
907 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
908 --with-x use the X Window System
909 --with-halpolicydir=DIR HAL policy directory (default is platform dependent)
910 --with-libwrap=DIR Compile in libwrap (tcp_wrappers) support
911 --with-generic-usb Force use of generic USB driver
912 --with-nisip=IP-ADDRESS Specify the IP address to bind to (default=0.0.0.0)
913 --with-cgi-bin=DIR Specify cgi-bin directory (default=/etc/apcupsd)
914 --with-distname=NAME Specify DISTNAME
915 --with-nologin=DIR Specify nologin file directory (default /etc)
916 --with-pid-dir=DIR Specify PIDDIR directory (default is OS dependent)
917 --with-log-dir=DIR Specify EVENTS and STATUS directory (default is OS
918 dependent)
919 --with-lock-dir=DIR Specify serial port lock directory (default is OS
920 dependent)
921 --with-pwrfail-dir=DIR Specify power failure file directory (default is OS
922 dependent)
923 --with-serial-dev=DEV Specify serial port device
924 --with-dev=DEV Specify port or device
925 --with-nis-port=PORT Specify NIS (CGI) port (default 3551 except Debian)
926 --with-upstype=TYPE Specify the UPS type
927 --with-upscable=CABLE Specify the UPS cable
929 Some influential environment variables:
930 CXX C++ compiler command
931 CXXFLAGS C++ compiler flags
932 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
933 nonstandard directory <lib dir>
934 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
935 headers in a nonstandard directory <include dir>
936 CC C compiler command
937 CFLAGS C compiler flags
938 CPP C preprocessor
939 PKG_CONFIG path to pkg-config utility
940 GAPCMON_CFLAGS
941 C compiler flags for GAPCMON, overriding pkg-config
942 GAPCMON_LIBS
943 linker flags for GAPCMON, overriding pkg-config
945 Use these variables to override the choices made by `configure' or to help
946 it to find libraries and programs with nonstandard names/locations.
948 _ACEOF
951 if test "$ac_init_help" = "recursive"; then
952 # If there are subdirs, report their specific --help.
953 ac_popdir=`pwd`
954 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
955 test -d $ac_dir || continue
956 ac_builddir=.
958 if test "$ac_dir" != .; then
959 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
960 # A "../" for each directory in $ac_dir_suffix.
961 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
962 else
963 ac_dir_suffix= ac_top_builddir=
966 case $srcdir in
967 .) # No --srcdir option. We are building in place.
968 ac_srcdir=.
969 if test -z "$ac_top_builddir"; then
970 ac_top_srcdir=.
971 else
972 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
973 fi ;;
974 [\\/]* | ?:[\\/]* ) # Absolute path.
975 ac_srcdir=$srcdir$ac_dir_suffix;
976 ac_top_srcdir=$srcdir ;;
977 *) # Relative path.
978 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
979 ac_top_srcdir=$ac_top_builddir$srcdir ;;
980 esac
982 # Do not use `cd foo && pwd` to compute absolute paths, because
983 # the directories may not exist.
984 case `pwd` in
985 .) ac_abs_builddir="$ac_dir";;
987 case "$ac_dir" in
988 .) ac_abs_builddir=`pwd`;;
989 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
990 *) ac_abs_builddir=`pwd`/"$ac_dir";;
991 esac;;
992 esac
993 case $ac_abs_builddir in
994 .) ac_abs_top_builddir=${ac_top_builddir}.;;
996 case ${ac_top_builddir}. in
997 .) ac_abs_top_builddir=$ac_abs_builddir;;
998 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
999 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1000 esac;;
1001 esac
1002 case $ac_abs_builddir in
1003 .) ac_abs_srcdir=$ac_srcdir;;
1005 case $ac_srcdir in
1006 .) ac_abs_srcdir=$ac_abs_builddir;;
1007 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1008 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1009 esac;;
1010 esac
1011 case $ac_abs_builddir in
1012 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1014 case $ac_top_srcdir in
1015 .) ac_abs_top_srcdir=$ac_abs_builddir;;
1016 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1017 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1018 esac;;
1019 esac
1021 cd $ac_dir
1022 # Check for guested configure; otherwise get Cygnus style configure.
1023 if test -f $ac_srcdir/configure.gnu; then
1024 echo
1025 $SHELL $ac_srcdir/configure.gnu --help=recursive
1026 elif test -f $ac_srcdir/configure; then
1027 echo
1028 $SHELL $ac_srcdir/configure --help=recursive
1029 elif test -f $ac_srcdir/configure.ac ||
1030 test -f $ac_srcdir/configure.in; then
1031 echo
1032 $ac_configure --help
1033 else
1034 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1036 cd $ac_popdir
1037 done
1040 test -n "$ac_init_help" && exit 0
1041 if $ac_init_version; then
1042 cat <<\_ACEOF
1044 Copyright (C) 2003 Free Software Foundation, Inc.
1045 This configure script is free software; the Free Software Foundation
1046 gives unlimited permission to copy, distribute and modify it.
1047 _ACEOF
1048 exit 0
1050 exec 5>config.log
1051 cat >&5 <<_ACEOF
1052 This file contains any messages produced by compilers while
1053 running configure, to aid debugging if configure makes a mistake.
1055 It was created by $as_me, which was
1056 generated by GNU Autoconf 2.59. Invocation command line was
1058 $ $0 $@
1060 _ACEOF
1062 cat <<_ASUNAME
1063 ## --------- ##
1064 ## Platform. ##
1065 ## --------- ##
1067 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1068 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1069 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1070 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1071 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1073 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1074 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1076 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1077 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1078 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1079 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1080 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1081 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1082 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1084 _ASUNAME
1086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1087 for as_dir in $PATH
1089 IFS=$as_save_IFS
1090 test -z "$as_dir" && as_dir=.
1091 echo "PATH: $as_dir"
1092 done
1094 } >&5
1096 cat >&5 <<_ACEOF
1099 ## ----------- ##
1100 ## Core tests. ##
1101 ## ----------- ##
1103 _ACEOF
1106 # Keep a trace of the command line.
1107 # Strip out --no-create and --no-recursion so they do not pile up.
1108 # Strip out --silent because we don't want to record it for future runs.
1109 # Also quote any args containing shell meta-characters.
1110 # Make two passes to allow for proper duplicate-argument suppression.
1111 ac_configure_args=
1112 ac_configure_args0=
1113 ac_configure_args1=
1114 ac_sep=
1115 ac_must_keep_next=false
1116 for ac_pass in 1 2
1118 for ac_arg
1120 case $ac_arg in
1121 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1122 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1123 | -silent | --silent | --silen | --sile | --sil)
1124 continue ;;
1125 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1126 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1127 esac
1128 case $ac_pass in
1129 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1131 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1132 if test $ac_must_keep_next = true; then
1133 ac_must_keep_next=false # Got value, back to normal.
1134 else
1135 case $ac_arg in
1136 *=* | --config-cache | -C | -disable-* | --disable-* \
1137 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1138 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1139 | -with-* | --with-* | -without-* | --without-* | --x)
1140 case "$ac_configure_args0 " in
1141 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1142 esac
1144 -* ) ac_must_keep_next=true ;;
1145 esac
1147 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1148 # Get rid of the leading space.
1149 ac_sep=" "
1151 esac
1152 done
1153 done
1154 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1155 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1157 # When interrupted or exit'd, cleanup temporary files, and complete
1158 # config.log. We remove comments because anyway the quotes in there
1159 # would cause problems or look ugly.
1160 # WARNING: Be sure not to use single quotes in there, as some shells,
1161 # such as our DU 5.0 friend, will then `close' the trap.
1162 trap 'exit_status=$?
1163 # Save into config.log some information that might help in debugging.
1165 echo
1167 cat <<\_ASBOX
1168 ## ---------------- ##
1169 ## Cache variables. ##
1170 ## ---------------- ##
1171 _ASBOX
1172 echo
1173 # The following way of writing the cache mishandles newlines in values,
1175 (set) 2>&1 |
1176 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1177 *ac_space=\ *)
1178 sed -n \
1179 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1180 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1183 sed -n \
1184 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1186 esac;
1188 echo
1190 cat <<\_ASBOX
1191 ## ----------------- ##
1192 ## Output variables. ##
1193 ## ----------------- ##
1194 _ASBOX
1195 echo
1196 for ac_var in $ac_subst_vars
1198 eval ac_val=$`echo $ac_var`
1199 echo "$ac_var='"'"'$ac_val'"'"'"
1200 done | sort
1201 echo
1203 if test -n "$ac_subst_files"; then
1204 cat <<\_ASBOX
1205 ## ------------- ##
1206 ## Output files. ##
1207 ## ------------- ##
1208 _ASBOX
1209 echo
1210 for ac_var in $ac_subst_files
1212 eval ac_val=$`echo $ac_var`
1213 echo "$ac_var='"'"'$ac_val'"'"'"
1214 done | sort
1215 echo
1218 if test -s confdefs.h; then
1219 cat <<\_ASBOX
1220 ## ----------- ##
1221 ## confdefs.h. ##
1222 ## ----------- ##
1223 _ASBOX
1224 echo
1225 sed "/^$/d" confdefs.h | sort
1226 echo
1228 test "$ac_signal" != 0 &&
1229 echo "$as_me: caught signal $ac_signal"
1230 echo "$as_me: exit $exit_status"
1231 } >&5
1232 rm -f core *.core &&
1233 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1234 exit $exit_status
1236 for ac_signal in 1 2 13 15; do
1237 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1238 done
1239 ac_signal=0
1241 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1242 rm -rf conftest* confdefs.h
1243 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1244 echo >confdefs.h
1246 # Predefined preprocessor variables.
1248 cat >>confdefs.h <<_ACEOF
1249 #define PACKAGE_NAME "$PACKAGE_NAME"
1250 _ACEOF
1253 cat >>confdefs.h <<_ACEOF
1254 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1255 _ACEOF
1258 cat >>confdefs.h <<_ACEOF
1259 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1260 _ACEOF
1263 cat >>confdefs.h <<_ACEOF
1264 #define PACKAGE_STRING "$PACKAGE_STRING"
1265 _ACEOF
1268 cat >>confdefs.h <<_ACEOF
1269 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1270 _ACEOF
1273 # Let the site file select an alternate cache file if it wants to.
1274 # Prefer explicitly selected file to automatically selected ones.
1275 if test -z "$CONFIG_SITE"; then
1276 if test "x$prefix" != xNONE; then
1277 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1278 else
1279 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1282 for ac_site_file in $CONFIG_SITE; do
1283 if test -r "$ac_site_file"; then
1284 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1285 echo "$as_me: loading site script $ac_site_file" >&6;}
1286 sed 's/^/| /' "$ac_site_file" >&5
1287 . "$ac_site_file"
1289 done
1291 if test -r "$cache_file"; then
1292 # Some versions of bash will fail to source /dev/null (special
1293 # files actually), so we avoid doing that.
1294 if test -f "$cache_file"; then
1295 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1296 echo "$as_me: loading cache $cache_file" >&6;}
1297 case $cache_file in
1298 [\\/]* | ?:[\\/]* ) . $cache_file;;
1299 *) . ./$cache_file;;
1300 esac
1302 else
1303 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1304 echo "$as_me: creating cache $cache_file" >&6;}
1305 >$cache_file
1308 # Check that the precious variables saved in the cache have kept the same
1309 # value.
1310 ac_cache_corrupted=false
1311 for ac_var in `(set) 2>&1 |
1312 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1313 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1314 eval ac_new_set=\$ac_env_${ac_var}_set
1315 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1316 eval ac_new_val="\$ac_env_${ac_var}_value"
1317 case $ac_old_set,$ac_new_set in
1318 set,)
1319 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1320 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1321 ac_cache_corrupted=: ;;
1322 ,set)
1323 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1324 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1325 ac_cache_corrupted=: ;;
1326 ,);;
1328 if test "x$ac_old_val" != "x$ac_new_val"; then
1329 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1330 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1331 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1332 echo "$as_me: former value: $ac_old_val" >&2;}
1333 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1334 echo "$as_me: current value: $ac_new_val" >&2;}
1335 ac_cache_corrupted=:
1336 fi;;
1337 esac
1338 # Pass precious variables to config.status.
1339 if test "$ac_new_set" = set; then
1340 case $ac_new_val in
1341 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1342 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1343 *) ac_arg=$ac_var=$ac_new_val ;;
1344 esac
1345 case " $ac_configure_args " in
1346 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1347 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1348 esac
1350 done
1351 if $ac_cache_corrupted; then
1352 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1353 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1354 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1355 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1356 { (exit 1); exit 1; }; }
1359 ac_ext=c
1360 ac_cpp='$CPP $CPPFLAGS'
1361 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1362 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1363 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1384 ac_config_headers="$ac_config_headers include/config.h:autoconf/config.h.in"
1387 topdir=`pwd`
1388 ac_aux_dir=
1389 for ac_dir in ${topdir}/autoconf $srcdir/${topdir}/autoconf; do
1390 if test -f $ac_dir/install-sh; then
1391 ac_aux_dir=$ac_dir
1392 ac_install_sh="$ac_aux_dir/install-sh -c"
1393 break
1394 elif test -f $ac_dir/install.sh; then
1395 ac_aux_dir=$ac_dir
1396 ac_install_sh="$ac_aux_dir/install.sh -c"
1397 break
1398 elif test -f $ac_dir/shtool; then
1399 ac_aux_dir=$ac_dir
1400 ac_install_sh="$ac_aux_dir/shtool install -c"
1401 break
1403 done
1404 if test -z "$ac_aux_dir"; then
1405 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ${topdir}/autoconf $srcdir/${topdir}/autoconf" >&5
1406 echo "$as_me: error: cannot find install-sh or install.sh in ${topdir}/autoconf $srcdir/${topdir}/autoconf" >&2;}
1407 { (exit 1); exit 1; }; }
1409 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1410 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1411 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1414 ABSSRCDIR=`pwd`
1418 cd ..
1419 TOP_DIR=`pwd`
1420 cd ${topdir}
1423 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/include/version.h`
1426 DATE=`sed -n -e 's/^.* \t*ADATE.*"\(.*\)"$/\1/p' ${srcdir}/include/version.h`
1429 for ac_prog in true
1431 # Extract the first word of "$ac_prog", so it can be a program name with args.
1432 set dummy $ac_prog; ac_word=$2
1433 echo "$as_me:$LINENO: checking for $ac_word" >&5
1434 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1435 if test "${ac_cv_path_TRUEPRG+set}" = set; then
1436 echo $ECHO_N "(cached) $ECHO_C" >&6
1437 else
1438 case $TRUEPRG in
1439 [\\/]* | ?:[\\/]*)
1440 ac_cv_path_TRUEPRG="$TRUEPRG" # Let the user override the test with a path.
1443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1444 for as_dir in $PATH
1446 IFS=$as_save_IFS
1447 test -z "$as_dir" && as_dir=.
1448 for ac_exec_ext in '' $ac_executable_extensions; do
1449 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1450 ac_cv_path_TRUEPRG="$as_dir/$ac_word$ac_exec_ext"
1451 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1452 break 2
1454 done
1455 done
1458 esac
1460 TRUEPRG=$ac_cv_path_TRUEPRG
1462 if test -n "$TRUEPRG"; then
1463 echo "$as_me:$LINENO: result: $TRUEPRG" >&5
1464 echo "${ECHO_T}$TRUEPRG" >&6
1465 else
1466 echo "$as_me:$LINENO: result: no" >&5
1467 echo "${ECHO_T}no" >&6
1470 test -n "$TRUEPRG" && break
1471 done
1472 test -n "$TRUEPRG" || TRUEPRG=":"
1474 for ac_prog in false
1476 # Extract the first word of "$ac_prog", so it can be a program name with args.
1477 set dummy $ac_prog; ac_word=$2
1478 echo "$as_me:$LINENO: checking for $ac_word" >&5
1479 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1480 if test "${ac_cv_path_FALSEPRG+set}" = set; then
1481 echo $ECHO_N "(cached) $ECHO_C" >&6
1482 else
1483 case $FALSEPRG in
1484 [\\/]* | ?:[\\/]*)
1485 ac_cv_path_FALSEPRG="$FALSEPRG" # Let the user override the test with a path.
1488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1489 for as_dir in $PATH
1491 IFS=$as_save_IFS
1492 test -z "$as_dir" && as_dir=.
1493 for ac_exec_ext in '' $ac_executable_extensions; do
1494 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1495 ac_cv_path_FALSEPRG="$as_dir/$ac_word$ac_exec_ext"
1496 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1497 break 2
1499 done
1500 done
1503 esac
1505 FALSEPRG=$ac_cv_path_FALSEPRG
1507 if test -n "$FALSEPRG"; then
1508 echo "$as_me:$LINENO: result: $FALSEPRG" >&5
1509 echo "${ECHO_T}$FALSEPRG" >&6
1510 else
1511 echo "$as_me:$LINENO: result: no" >&5
1512 echo "${ECHO_T}no" >&6
1515 test -n "$FALSEPRG" && break
1516 done
1517 test -n "$FALSEPRG" || FALSEPRG=":"
1520 PATH=$PATH:/bin:/sbin:/etc:/usr/bin:/usr/bin/X11:/usr/sbin:/usr/local/bin:/usr/local/sbin
1521 export PATH
1524 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
1525 LDFLAGS="${LDFLAGS} -L/usr/local/lib64 -L/usr/local/lib"
1527 if test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
1528 then
1530 if test x$sysconfdir = x'${prefix}/etc' ; then
1531 sysconfdir='/etc/opt/apcupsd'
1533 if test x$sbindir = x'${exec_prefix}/sbin' ; then
1534 sbindir='/etc/opt/apcupsd/sbin'
1537 CPPFLAGS="${CPPFLAGS} -I/usr/sfw/include"
1538 LDFLAGS="${LDFLAGS} -L/usr/sfw/lib"
1539 else
1541 if test x$sysconfdir = x'${prefix}/etc' ; then
1542 sysconfdir='/etc/apcupsd'
1545 if test x$sbindir = x'${exec_prefix}/sbin' ; then
1546 sbindir='/sbin'
1550 # Make sure we can run config.sub.
1551 $ac_config_sub sun4 >/dev/null 2>&1 ||
1552 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1553 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1554 { (exit 1); exit 1; }; }
1556 echo "$as_me:$LINENO: checking build system type" >&5
1557 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1558 if test "${ac_cv_build+set}" = set; then
1559 echo $ECHO_N "(cached) $ECHO_C" >&6
1560 else
1561 ac_cv_build_alias=$build_alias
1562 test -z "$ac_cv_build_alias" &&
1563 ac_cv_build_alias=`$ac_config_guess`
1564 test -z "$ac_cv_build_alias" &&
1565 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1566 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1567 { (exit 1); exit 1; }; }
1568 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1569 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1570 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1571 { (exit 1); exit 1; }; }
1574 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1575 echo "${ECHO_T}$ac_cv_build" >&6
1576 build=$ac_cv_build
1577 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1578 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1579 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1582 echo "$as_me:$LINENO: checking host system type" >&5
1583 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1584 if test "${ac_cv_host+set}" = set; then
1585 echo $ECHO_N "(cached) $ECHO_C" >&6
1586 else
1587 ac_cv_host_alias=$host_alias
1588 test -z "$ac_cv_host_alias" &&
1589 ac_cv_host_alias=$ac_cv_build_alias
1590 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1591 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1592 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1593 { (exit 1); exit 1; }; }
1596 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1597 echo "${ECHO_T}$ac_cv_host" >&6
1598 host=$ac_cv_host
1599 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1600 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1601 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1606 ac_ext=cc
1607 ac_cpp='$CXXCPP $CPPFLAGS'
1608 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1609 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1610 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1611 if test -n "$ac_tool_prefix"; then
1612 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
1614 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1615 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1616 echo "$as_me:$LINENO: checking for $ac_word" >&5
1617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1618 if test "${ac_cv_prog_CXX+set}" = set; then
1619 echo $ECHO_N "(cached) $ECHO_C" >&6
1620 else
1621 if test -n "$CXX"; then
1622 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1623 else
1624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1625 for as_dir in $PATH
1627 IFS=$as_save_IFS
1628 test -z "$as_dir" && as_dir=.
1629 for ac_exec_ext in '' $ac_executable_extensions; do
1630 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1631 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
1632 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1633 break 2
1635 done
1636 done
1640 CXX=$ac_cv_prog_CXX
1641 if test -n "$CXX"; then
1642 echo "$as_me:$LINENO: result: $CXX" >&5
1643 echo "${ECHO_T}$CXX" >&6
1644 else
1645 echo "$as_me:$LINENO: result: no" >&5
1646 echo "${ECHO_T}no" >&6
1649 test -n "$CXX" && break
1650 done
1652 if test -z "$CXX"; then
1653 ac_ct_CXX=$CXX
1654 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
1656 # Extract the first word of "$ac_prog", so it can be a program name with args.
1657 set dummy $ac_prog; ac_word=$2
1658 echo "$as_me:$LINENO: checking for $ac_word" >&5
1659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1660 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
1661 echo $ECHO_N "(cached) $ECHO_C" >&6
1662 else
1663 if test -n "$ac_ct_CXX"; then
1664 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
1665 else
1666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1667 for as_dir in $PATH
1669 IFS=$as_save_IFS
1670 test -z "$as_dir" && as_dir=.
1671 for ac_exec_ext in '' $ac_executable_extensions; do
1672 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1673 ac_cv_prog_ac_ct_CXX="$ac_prog"
1674 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1675 break 2
1677 done
1678 done
1682 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
1683 if test -n "$ac_ct_CXX"; then
1684 echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
1685 echo "${ECHO_T}$ac_ct_CXX" >&6
1686 else
1687 echo "$as_me:$LINENO: result: no" >&5
1688 echo "${ECHO_T}no" >&6
1691 test -n "$ac_ct_CXX" && break
1692 done
1693 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
1695 CXX=$ac_ct_CXX
1699 # Provide some information about the compiler.
1700 echo "$as_me:$LINENO:" \
1701 "checking for C++ compiler version" >&5
1702 ac_compiler=`set X $ac_compile; echo $2`
1703 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1704 (eval $ac_compiler --version </dev/null >&5) 2>&5
1705 ac_status=$?
1706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1707 (exit $ac_status); }
1708 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1709 (eval $ac_compiler -v </dev/null >&5) 2>&5
1710 ac_status=$?
1711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1712 (exit $ac_status); }
1713 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1714 (eval $ac_compiler -V </dev/null >&5) 2>&5
1715 ac_status=$?
1716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1717 (exit $ac_status); }
1719 cat >conftest.$ac_ext <<_ACEOF
1720 /* confdefs.h. */
1721 _ACEOF
1722 cat confdefs.h >>conftest.$ac_ext
1723 cat >>conftest.$ac_ext <<_ACEOF
1724 /* end confdefs.h. */
1727 main ()
1731 return 0;
1733 _ACEOF
1734 ac_clean_files_save=$ac_clean_files
1735 ac_clean_files="$ac_clean_files a.out a.exe b.out"
1736 # Try to create an executable without -o first, disregard a.out.
1737 # It will help us diagnose broken compilers, and finding out an intuition
1738 # of exeext.
1739 echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
1740 echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6
1741 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1742 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1743 (eval $ac_link_default) 2>&5
1744 ac_status=$?
1745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1746 (exit $ac_status); }; then
1747 # Find the output, starting from the most likely. This scheme is
1748 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1749 # resort.
1751 # Be careful to initialize this variable, since it used to be cached.
1752 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1753 ac_cv_exeext=
1754 # b.out is created by i960 compilers.
1755 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1757 test -f "$ac_file" || continue
1758 case $ac_file in
1759 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1761 conftest.$ac_ext )
1762 # This is the source file.
1764 [ab].out )
1765 # We found the default executable, but exeext='' is most
1766 # certainly right.
1767 break;;
1768 *.* )
1769 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1770 # FIXME: I believe we export ac_cv_exeext for Libtool,
1771 # but it would be cool to find out if it's true. Does anybody
1772 # maintain Libtool? --akim.
1773 export ac_cv_exeext
1774 break;;
1776 break;;
1777 esac
1778 done
1779 else
1780 echo "$as_me: failed program was:" >&5
1781 sed 's/^/| /' conftest.$ac_ext >&5
1783 { { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1784 See \`config.log' for more details." >&5
1785 echo "$as_me: error: C++ compiler cannot create executables
1786 See \`config.log' for more details." >&2;}
1787 { (exit 77); exit 77; }; }
1790 ac_exeext=$ac_cv_exeext
1791 echo "$as_me:$LINENO: result: $ac_file" >&5
1792 echo "${ECHO_T}$ac_file" >&6
1794 # Check the compiler produces executables we can run. If not, either
1795 # the compiler is broken, or we cross compile.
1796 echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1797 echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1798 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1799 # If not cross compiling, check that we can run a simple program.
1800 if test "$cross_compiling" != yes; then
1801 if { ac_try='./$ac_file'
1802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1803 (eval $ac_try) 2>&5
1804 ac_status=$?
1805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1806 (exit $ac_status); }; }; then
1807 cross_compiling=no
1808 else
1809 if test "$cross_compiling" = maybe; then
1810 cross_compiling=yes
1811 else
1812 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1813 If you meant to cross compile, use \`--host'.
1814 See \`config.log' for more details." >&5
1815 echo "$as_me: error: cannot run C++ compiled programs.
1816 If you meant to cross compile, use \`--host'.
1817 See \`config.log' for more details." >&2;}
1818 { (exit 1); exit 1; }; }
1822 echo "$as_me:$LINENO: result: yes" >&5
1823 echo "${ECHO_T}yes" >&6
1825 rm -f a.out a.exe conftest$ac_cv_exeext b.out
1826 ac_clean_files=$ac_clean_files_save
1827 # Check the compiler produces executables we can run. If not, either
1828 # the compiler is broken, or we cross compile.
1829 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1830 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1831 echo "$as_me:$LINENO: result: $cross_compiling" >&5
1832 echo "${ECHO_T}$cross_compiling" >&6
1834 echo "$as_me:$LINENO: checking for suffix of executables" >&5
1835 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1836 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1837 (eval $ac_link) 2>&5
1838 ac_status=$?
1839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1840 (exit $ac_status); }; then
1841 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1842 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1843 # work properly (i.e., refer to `conftest.exe'), while it won't with
1844 # `rm'.
1845 for ac_file in conftest.exe conftest conftest.*; do
1846 test -f "$ac_file" || continue
1847 case $ac_file in
1848 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1849 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1850 export ac_cv_exeext
1851 break;;
1852 * ) break;;
1853 esac
1854 done
1855 else
1856 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1857 See \`config.log' for more details." >&5
1858 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1859 See \`config.log' for more details." >&2;}
1860 { (exit 1); exit 1; }; }
1863 rm -f conftest$ac_cv_exeext
1864 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1865 echo "${ECHO_T}$ac_cv_exeext" >&6
1867 rm -f conftest.$ac_ext
1868 EXEEXT=$ac_cv_exeext
1869 ac_exeext=$EXEEXT
1870 echo "$as_me:$LINENO: checking for suffix of object files" >&5
1871 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1872 if test "${ac_cv_objext+set}" = set; then
1873 echo $ECHO_N "(cached) $ECHO_C" >&6
1874 else
1875 cat >conftest.$ac_ext <<_ACEOF
1876 /* confdefs.h. */
1877 _ACEOF
1878 cat confdefs.h >>conftest.$ac_ext
1879 cat >>conftest.$ac_ext <<_ACEOF
1880 /* end confdefs.h. */
1883 main ()
1887 return 0;
1889 _ACEOF
1890 rm -f conftest.o conftest.obj
1891 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1892 (eval $ac_compile) 2>&5
1893 ac_status=$?
1894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1895 (exit $ac_status); }; then
1896 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1897 case $ac_file in
1898 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1899 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1900 break;;
1901 esac
1902 done
1903 else
1904 echo "$as_me: failed program was:" >&5
1905 sed 's/^/| /' conftest.$ac_ext >&5
1907 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1908 See \`config.log' for more details." >&5
1909 echo "$as_me: error: cannot compute suffix of object files: cannot compile
1910 See \`config.log' for more details." >&2;}
1911 { (exit 1); exit 1; }; }
1914 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1916 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1917 echo "${ECHO_T}$ac_cv_objext" >&6
1918 OBJEXT=$ac_cv_objext
1919 ac_objext=$OBJEXT
1920 echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
1921 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
1922 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
1923 echo $ECHO_N "(cached) $ECHO_C" >&6
1924 else
1925 cat >conftest.$ac_ext <<_ACEOF
1926 /* confdefs.h. */
1927 _ACEOF
1928 cat confdefs.h >>conftest.$ac_ext
1929 cat >>conftest.$ac_ext <<_ACEOF
1930 /* end confdefs.h. */
1933 main ()
1935 #ifndef __GNUC__
1936 choke me
1937 #endif
1940 return 0;
1942 _ACEOF
1943 rm -f conftest.$ac_objext
1944 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1945 (eval $ac_compile) 2>conftest.er1
1946 ac_status=$?
1947 grep -v '^ *+' conftest.er1 >conftest.err
1948 rm -f conftest.er1
1949 cat conftest.err >&5
1950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1951 (exit $ac_status); } &&
1952 { ac_try='test -z "$ac_cxx_werror_flag"
1953 || test ! -s conftest.err'
1954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1955 (eval $ac_try) 2>&5
1956 ac_status=$?
1957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1958 (exit $ac_status); }; } &&
1959 { ac_try='test -s conftest.$ac_objext'
1960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1961 (eval $ac_try) 2>&5
1962 ac_status=$?
1963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1964 (exit $ac_status); }; }; then
1965 ac_compiler_gnu=yes
1966 else
1967 echo "$as_me: failed program was:" >&5
1968 sed 's/^/| /' conftest.$ac_ext >&5
1970 ac_compiler_gnu=no
1972 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1973 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
1976 echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
1977 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
1978 GXX=`test $ac_compiler_gnu = yes && echo yes`
1979 ac_test_CXXFLAGS=${CXXFLAGS+set}
1980 ac_save_CXXFLAGS=$CXXFLAGS
1981 CXXFLAGS="-g"
1982 echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
1983 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
1984 if test "${ac_cv_prog_cxx_g+set}" = set; then
1985 echo $ECHO_N "(cached) $ECHO_C" >&6
1986 else
1987 cat >conftest.$ac_ext <<_ACEOF
1988 /* confdefs.h. */
1989 _ACEOF
1990 cat confdefs.h >>conftest.$ac_ext
1991 cat >>conftest.$ac_ext <<_ACEOF
1992 /* end confdefs.h. */
1995 main ()
1999 return 0;
2001 _ACEOF
2002 rm -f conftest.$ac_objext
2003 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2004 (eval $ac_compile) 2>conftest.er1
2005 ac_status=$?
2006 grep -v '^ *+' conftest.er1 >conftest.err
2007 rm -f conftest.er1
2008 cat conftest.err >&5
2009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2010 (exit $ac_status); } &&
2011 { ac_try='test -z "$ac_cxx_werror_flag"
2012 || test ! -s conftest.err'
2013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2014 (eval $ac_try) 2>&5
2015 ac_status=$?
2016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2017 (exit $ac_status); }; } &&
2018 { ac_try='test -s conftest.$ac_objext'
2019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2020 (eval $ac_try) 2>&5
2021 ac_status=$?
2022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2023 (exit $ac_status); }; }; then
2024 ac_cv_prog_cxx_g=yes
2025 else
2026 echo "$as_me: failed program was:" >&5
2027 sed 's/^/| /' conftest.$ac_ext >&5
2029 ac_cv_prog_cxx_g=no
2031 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2033 echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
2034 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2035 if test "$ac_test_CXXFLAGS" = set; then
2036 CXXFLAGS=$ac_save_CXXFLAGS
2037 elif test $ac_cv_prog_cxx_g = yes; then
2038 if test "$GXX" = yes; then
2039 CXXFLAGS="-g -O2"
2040 else
2041 CXXFLAGS="-g"
2043 else
2044 if test "$GXX" = yes; then
2045 CXXFLAGS="-O2"
2046 else
2047 CXXFLAGS=
2050 for ac_declaration in \
2051 '' \
2052 'extern "C" void std::exit (int) throw (); using std::exit;' \
2053 'extern "C" void std::exit (int); using std::exit;' \
2054 'extern "C" void exit (int) throw ();' \
2055 'extern "C" void exit (int);' \
2056 'void exit (int);'
2058 cat >conftest.$ac_ext <<_ACEOF
2059 /* confdefs.h. */
2060 _ACEOF
2061 cat confdefs.h >>conftest.$ac_ext
2062 cat >>conftest.$ac_ext <<_ACEOF
2063 /* end confdefs.h. */
2064 $ac_declaration
2065 #include <stdlib.h>
2067 main ()
2069 exit (42);
2071 return 0;
2073 _ACEOF
2074 rm -f conftest.$ac_objext
2075 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2076 (eval $ac_compile) 2>conftest.er1
2077 ac_status=$?
2078 grep -v '^ *+' conftest.er1 >conftest.err
2079 rm -f conftest.er1
2080 cat conftest.err >&5
2081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2082 (exit $ac_status); } &&
2083 { ac_try='test -z "$ac_cxx_werror_flag"
2084 || test ! -s conftest.err'
2085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2086 (eval $ac_try) 2>&5
2087 ac_status=$?
2088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2089 (exit $ac_status); }; } &&
2090 { ac_try='test -s conftest.$ac_objext'
2091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2092 (eval $ac_try) 2>&5
2093 ac_status=$?
2094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2095 (exit $ac_status); }; }; then
2097 else
2098 echo "$as_me: failed program was:" >&5
2099 sed 's/^/| /' conftest.$ac_ext >&5
2101 continue
2103 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2104 cat >conftest.$ac_ext <<_ACEOF
2105 /* confdefs.h. */
2106 _ACEOF
2107 cat confdefs.h >>conftest.$ac_ext
2108 cat >>conftest.$ac_ext <<_ACEOF
2109 /* end confdefs.h. */
2110 $ac_declaration
2112 main ()
2114 exit (42);
2116 return 0;
2118 _ACEOF
2119 rm -f conftest.$ac_objext
2120 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2121 (eval $ac_compile) 2>conftest.er1
2122 ac_status=$?
2123 grep -v '^ *+' conftest.er1 >conftest.err
2124 rm -f conftest.er1
2125 cat conftest.err >&5
2126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2127 (exit $ac_status); } &&
2128 { ac_try='test -z "$ac_cxx_werror_flag"
2129 || test ! -s conftest.err'
2130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2131 (eval $ac_try) 2>&5
2132 ac_status=$?
2133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2134 (exit $ac_status); }; } &&
2135 { ac_try='test -s conftest.$ac_objext'
2136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2137 (eval $ac_try) 2>&5
2138 ac_status=$?
2139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2140 (exit $ac_status); }; }; then
2141 break
2142 else
2143 echo "$as_me: failed program was:" >&5
2144 sed 's/^/| /' conftest.$ac_ext >&5
2147 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2148 done
2149 rm -f conftest*
2150 if test -n "$ac_declaration"; then
2151 echo '#ifdef __cplusplus' >>confdefs.h
2152 echo $ac_declaration >>confdefs.h
2153 echo '#endif' >>confdefs.h
2156 ac_ext=c
2157 ac_cpp='$CPP $CPPFLAGS'
2158 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2159 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2160 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2161 ac_ext=c
2162 ac_cpp='$CPP $CPPFLAGS'
2163 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2164 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2165 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2166 if test -n "$ac_tool_prefix"; then
2167 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2168 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2169 echo "$as_me:$LINENO: checking for $ac_word" >&5
2170 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2171 if test "${ac_cv_prog_CC+set}" = set; then
2172 echo $ECHO_N "(cached) $ECHO_C" >&6
2173 else
2174 if test -n "$CC"; then
2175 ac_cv_prog_CC="$CC" # Let the user override the test.
2176 else
2177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2178 for as_dir in $PATH
2180 IFS=$as_save_IFS
2181 test -z "$as_dir" && as_dir=.
2182 for ac_exec_ext in '' $ac_executable_extensions; do
2183 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2184 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2185 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2186 break 2
2188 done
2189 done
2193 CC=$ac_cv_prog_CC
2194 if test -n "$CC"; then
2195 echo "$as_me:$LINENO: result: $CC" >&5
2196 echo "${ECHO_T}$CC" >&6
2197 else
2198 echo "$as_me:$LINENO: result: no" >&5
2199 echo "${ECHO_T}no" >&6
2203 if test -z "$ac_cv_prog_CC"; then
2204 ac_ct_CC=$CC
2205 # Extract the first word of "gcc", so it can be a program name with args.
2206 set dummy gcc; ac_word=$2
2207 echo "$as_me:$LINENO: checking for $ac_word" >&5
2208 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2209 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2210 echo $ECHO_N "(cached) $ECHO_C" >&6
2211 else
2212 if test -n "$ac_ct_CC"; then
2213 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2214 else
2215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2216 for as_dir in $PATH
2218 IFS=$as_save_IFS
2219 test -z "$as_dir" && as_dir=.
2220 for ac_exec_ext in '' $ac_executable_extensions; do
2221 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2222 ac_cv_prog_ac_ct_CC="gcc"
2223 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2224 break 2
2226 done
2227 done
2231 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2232 if test -n "$ac_ct_CC"; then
2233 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2234 echo "${ECHO_T}$ac_ct_CC" >&6
2235 else
2236 echo "$as_me:$LINENO: result: no" >&5
2237 echo "${ECHO_T}no" >&6
2240 CC=$ac_ct_CC
2241 else
2242 CC="$ac_cv_prog_CC"
2245 if test -z "$CC"; then
2246 if test -n "$ac_tool_prefix"; then
2247 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2248 set dummy ${ac_tool_prefix}cc; ac_word=$2
2249 echo "$as_me:$LINENO: checking for $ac_word" >&5
2250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2251 if test "${ac_cv_prog_CC+set}" = set; then
2252 echo $ECHO_N "(cached) $ECHO_C" >&6
2253 else
2254 if test -n "$CC"; then
2255 ac_cv_prog_CC="$CC" # Let the user override the test.
2256 else
2257 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2258 for as_dir in $PATH
2260 IFS=$as_save_IFS
2261 test -z "$as_dir" && as_dir=.
2262 for ac_exec_ext in '' $ac_executable_extensions; do
2263 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2264 ac_cv_prog_CC="${ac_tool_prefix}cc"
2265 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2266 break 2
2268 done
2269 done
2273 CC=$ac_cv_prog_CC
2274 if test -n "$CC"; then
2275 echo "$as_me:$LINENO: result: $CC" >&5
2276 echo "${ECHO_T}$CC" >&6
2277 else
2278 echo "$as_me:$LINENO: result: no" >&5
2279 echo "${ECHO_T}no" >&6
2283 if test -z "$ac_cv_prog_CC"; then
2284 ac_ct_CC=$CC
2285 # Extract the first word of "cc", so it can be a program name with args.
2286 set dummy cc; ac_word=$2
2287 echo "$as_me:$LINENO: checking for $ac_word" >&5
2288 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2289 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2290 echo $ECHO_N "(cached) $ECHO_C" >&6
2291 else
2292 if test -n "$ac_ct_CC"; then
2293 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2294 else
2295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2296 for as_dir in $PATH
2298 IFS=$as_save_IFS
2299 test -z "$as_dir" && as_dir=.
2300 for ac_exec_ext in '' $ac_executable_extensions; do
2301 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2302 ac_cv_prog_ac_ct_CC="cc"
2303 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2304 break 2
2306 done
2307 done
2311 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2312 if test -n "$ac_ct_CC"; then
2313 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2314 echo "${ECHO_T}$ac_ct_CC" >&6
2315 else
2316 echo "$as_me:$LINENO: result: no" >&5
2317 echo "${ECHO_T}no" >&6
2320 CC=$ac_ct_CC
2321 else
2322 CC="$ac_cv_prog_CC"
2326 if test -z "$CC"; then
2327 # Extract the first word of "cc", so it can be a program name with args.
2328 set dummy cc; ac_word=$2
2329 echo "$as_me:$LINENO: checking for $ac_word" >&5
2330 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2331 if test "${ac_cv_prog_CC+set}" = set; then
2332 echo $ECHO_N "(cached) $ECHO_C" >&6
2333 else
2334 if test -n "$CC"; then
2335 ac_cv_prog_CC="$CC" # Let the user override the test.
2336 else
2337 ac_prog_rejected=no
2338 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2339 for as_dir in $PATH
2341 IFS=$as_save_IFS
2342 test -z "$as_dir" && as_dir=.
2343 for ac_exec_ext in '' $ac_executable_extensions; do
2344 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2345 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2346 ac_prog_rejected=yes
2347 continue
2349 ac_cv_prog_CC="cc"
2350 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2351 break 2
2353 done
2354 done
2356 if test $ac_prog_rejected = yes; then
2357 # We found a bogon in the path, so make sure we never use it.
2358 set dummy $ac_cv_prog_CC
2359 shift
2360 if test $# != 0; then
2361 # We chose a different compiler from the bogus one.
2362 # However, it has the same basename, so the bogon will be chosen
2363 # first if we set CC to just the basename; use the full file name.
2364 shift
2365 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2370 CC=$ac_cv_prog_CC
2371 if test -n "$CC"; then
2372 echo "$as_me:$LINENO: result: $CC" >&5
2373 echo "${ECHO_T}$CC" >&6
2374 else
2375 echo "$as_me:$LINENO: result: no" >&5
2376 echo "${ECHO_T}no" >&6
2380 if test -z "$CC"; then
2381 if test -n "$ac_tool_prefix"; then
2382 for ac_prog in cl
2384 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2385 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2386 echo "$as_me:$LINENO: checking for $ac_word" >&5
2387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2388 if test "${ac_cv_prog_CC+set}" = set; then
2389 echo $ECHO_N "(cached) $ECHO_C" >&6
2390 else
2391 if test -n "$CC"; then
2392 ac_cv_prog_CC="$CC" # Let the user override the test.
2393 else
2394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2395 for as_dir in $PATH
2397 IFS=$as_save_IFS
2398 test -z "$as_dir" && as_dir=.
2399 for ac_exec_ext in '' $ac_executable_extensions; do
2400 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2401 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2402 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2403 break 2
2405 done
2406 done
2410 CC=$ac_cv_prog_CC
2411 if test -n "$CC"; then
2412 echo "$as_me:$LINENO: result: $CC" >&5
2413 echo "${ECHO_T}$CC" >&6
2414 else
2415 echo "$as_me:$LINENO: result: no" >&5
2416 echo "${ECHO_T}no" >&6
2419 test -n "$CC" && break
2420 done
2422 if test -z "$CC"; then
2423 ac_ct_CC=$CC
2424 for ac_prog in cl
2426 # Extract the first word of "$ac_prog", so it can be a program name with args.
2427 set dummy $ac_prog; ac_word=$2
2428 echo "$as_me:$LINENO: checking for $ac_word" >&5
2429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2430 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2431 echo $ECHO_N "(cached) $ECHO_C" >&6
2432 else
2433 if test -n "$ac_ct_CC"; then
2434 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2435 else
2436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2437 for as_dir in $PATH
2439 IFS=$as_save_IFS
2440 test -z "$as_dir" && as_dir=.
2441 for ac_exec_ext in '' $ac_executable_extensions; do
2442 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2443 ac_cv_prog_ac_ct_CC="$ac_prog"
2444 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2445 break 2
2447 done
2448 done
2452 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2453 if test -n "$ac_ct_CC"; then
2454 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2455 echo "${ECHO_T}$ac_ct_CC" >&6
2456 else
2457 echo "$as_me:$LINENO: result: no" >&5
2458 echo "${ECHO_T}no" >&6
2461 test -n "$ac_ct_CC" && break
2462 done
2464 CC=$ac_ct_CC
2470 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2471 See \`config.log' for more details." >&5
2472 echo "$as_me: error: no acceptable C compiler found in \$PATH
2473 See \`config.log' for more details." >&2;}
2474 { (exit 1); exit 1; }; }
2476 # Provide some information about the compiler.
2477 echo "$as_me:$LINENO:" \
2478 "checking for C compiler version" >&5
2479 ac_compiler=`set X $ac_compile; echo $2`
2480 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2481 (eval $ac_compiler --version </dev/null >&5) 2>&5
2482 ac_status=$?
2483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2484 (exit $ac_status); }
2485 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2486 (eval $ac_compiler -v </dev/null >&5) 2>&5
2487 ac_status=$?
2488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2489 (exit $ac_status); }
2490 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2491 (eval $ac_compiler -V </dev/null >&5) 2>&5
2492 ac_status=$?
2493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2494 (exit $ac_status); }
2496 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2497 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2498 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2499 echo $ECHO_N "(cached) $ECHO_C" >&6
2500 else
2501 cat >conftest.$ac_ext <<_ACEOF
2502 /* confdefs.h. */
2503 _ACEOF
2504 cat confdefs.h >>conftest.$ac_ext
2505 cat >>conftest.$ac_ext <<_ACEOF
2506 /* end confdefs.h. */
2509 main ()
2511 #ifndef __GNUC__
2512 choke me
2513 #endif
2516 return 0;
2518 _ACEOF
2519 rm -f conftest.$ac_objext
2520 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2521 (eval $ac_compile) 2>conftest.er1
2522 ac_status=$?
2523 grep -v '^ *+' conftest.er1 >conftest.err
2524 rm -f conftest.er1
2525 cat conftest.err >&5
2526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2527 (exit $ac_status); } &&
2528 { ac_try='test -z "$ac_c_werror_flag"
2529 || test ! -s conftest.err'
2530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2531 (eval $ac_try) 2>&5
2532 ac_status=$?
2533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2534 (exit $ac_status); }; } &&
2535 { ac_try='test -s conftest.$ac_objext'
2536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2537 (eval $ac_try) 2>&5
2538 ac_status=$?
2539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2540 (exit $ac_status); }; }; then
2541 ac_compiler_gnu=yes
2542 else
2543 echo "$as_me: failed program was:" >&5
2544 sed 's/^/| /' conftest.$ac_ext >&5
2546 ac_compiler_gnu=no
2548 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2549 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2552 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2553 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2554 GCC=`test $ac_compiler_gnu = yes && echo yes`
2555 ac_test_CFLAGS=${CFLAGS+set}
2556 ac_save_CFLAGS=$CFLAGS
2557 CFLAGS="-g"
2558 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2559 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2560 if test "${ac_cv_prog_cc_g+set}" = set; then
2561 echo $ECHO_N "(cached) $ECHO_C" >&6
2562 else
2563 cat >conftest.$ac_ext <<_ACEOF
2564 /* confdefs.h. */
2565 _ACEOF
2566 cat confdefs.h >>conftest.$ac_ext
2567 cat >>conftest.$ac_ext <<_ACEOF
2568 /* end confdefs.h. */
2571 main ()
2575 return 0;
2577 _ACEOF
2578 rm -f conftest.$ac_objext
2579 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2580 (eval $ac_compile) 2>conftest.er1
2581 ac_status=$?
2582 grep -v '^ *+' conftest.er1 >conftest.err
2583 rm -f conftest.er1
2584 cat conftest.err >&5
2585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2586 (exit $ac_status); } &&
2587 { ac_try='test -z "$ac_c_werror_flag"
2588 || test ! -s conftest.err'
2589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2590 (eval $ac_try) 2>&5
2591 ac_status=$?
2592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2593 (exit $ac_status); }; } &&
2594 { ac_try='test -s conftest.$ac_objext'
2595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2596 (eval $ac_try) 2>&5
2597 ac_status=$?
2598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2599 (exit $ac_status); }; }; then
2600 ac_cv_prog_cc_g=yes
2601 else
2602 echo "$as_me: failed program was:" >&5
2603 sed 's/^/| /' conftest.$ac_ext >&5
2605 ac_cv_prog_cc_g=no
2607 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2609 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2610 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2611 if test "$ac_test_CFLAGS" = set; then
2612 CFLAGS=$ac_save_CFLAGS
2613 elif test $ac_cv_prog_cc_g = yes; then
2614 if test "$GCC" = yes; then
2615 CFLAGS="-g -O2"
2616 else
2617 CFLAGS="-g"
2619 else
2620 if test "$GCC" = yes; then
2621 CFLAGS="-O2"
2622 else
2623 CFLAGS=
2626 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2627 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2628 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2629 echo $ECHO_N "(cached) $ECHO_C" >&6
2630 else
2631 ac_cv_prog_cc_stdc=no
2632 ac_save_CC=$CC
2633 cat >conftest.$ac_ext <<_ACEOF
2634 /* confdefs.h. */
2635 _ACEOF
2636 cat confdefs.h >>conftest.$ac_ext
2637 cat >>conftest.$ac_ext <<_ACEOF
2638 /* end confdefs.h. */
2639 #include <stdarg.h>
2640 #include <stdio.h>
2641 #include <sys/types.h>
2642 #include <sys/stat.h>
2643 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2644 struct buf { int x; };
2645 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2646 static char *e (p, i)
2647 char **p;
2648 int i;
2650 return p[i];
2652 static char *f (char * (*g) (char **, int), char **p, ...)
2654 char *s;
2655 va_list v;
2656 va_start (v,p);
2657 s = g (p, va_arg (v,int));
2658 va_end (v);
2659 return s;
2662 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2663 function prototypes and stuff, but not '\xHH' hex character constants.
2664 These don't provoke an error unfortunately, instead are silently treated
2665 as 'x'. The following induces an error, until -std1 is added to get
2666 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2667 array size at least. It's necessary to write '\x00'==0 to get something
2668 that's true only with -std1. */
2669 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2671 int test (int i, double x);
2672 struct s1 {int (*f) (int a);};
2673 struct s2 {int (*f) (double a);};
2674 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2675 int argc;
2676 char **argv;
2678 main ()
2680 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2682 return 0;
2684 _ACEOF
2685 # Don't try gcc -ansi; that turns off useful extensions and
2686 # breaks some systems' header files.
2687 # AIX -qlanglvl=ansi
2688 # Ultrix and OSF/1 -std1
2689 # HP-UX 10.20 and later -Ae
2690 # HP-UX older versions -Aa -D_HPUX_SOURCE
2691 # SVR4 -Xc -D__EXTENSIONS__
2692 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2694 CC="$ac_save_CC $ac_arg"
2695 rm -f conftest.$ac_objext
2696 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2697 (eval $ac_compile) 2>conftest.er1
2698 ac_status=$?
2699 grep -v '^ *+' conftest.er1 >conftest.err
2700 rm -f conftest.er1
2701 cat conftest.err >&5
2702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2703 (exit $ac_status); } &&
2704 { ac_try='test -z "$ac_c_werror_flag"
2705 || test ! -s conftest.err'
2706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2707 (eval $ac_try) 2>&5
2708 ac_status=$?
2709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2710 (exit $ac_status); }; } &&
2711 { ac_try='test -s conftest.$ac_objext'
2712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2713 (eval $ac_try) 2>&5
2714 ac_status=$?
2715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2716 (exit $ac_status); }; }; then
2717 ac_cv_prog_cc_stdc=$ac_arg
2718 break
2719 else
2720 echo "$as_me: failed program was:" >&5
2721 sed 's/^/| /' conftest.$ac_ext >&5
2724 rm -f conftest.err conftest.$ac_objext
2725 done
2726 rm -f conftest.$ac_ext conftest.$ac_objext
2727 CC=$ac_save_CC
2731 case "x$ac_cv_prog_cc_stdc" in
2732 x|xno)
2733 echo "$as_me:$LINENO: result: none needed" >&5
2734 echo "${ECHO_T}none needed" >&6 ;;
2736 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2737 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2738 CC="$CC $ac_cv_prog_cc_stdc" ;;
2739 esac
2741 # Some people use a C++ compiler to compile C. Since we use `exit',
2742 # in C++ we need to declare it. In case someone uses the same compiler
2743 # for both compiling C and C++ we need to have the C++ compiler decide
2744 # the declaration of exit, since it's the most demanding environment.
2745 cat >conftest.$ac_ext <<_ACEOF
2746 #ifndef __cplusplus
2747 choke me
2748 #endif
2749 _ACEOF
2750 rm -f conftest.$ac_objext
2751 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2752 (eval $ac_compile) 2>conftest.er1
2753 ac_status=$?
2754 grep -v '^ *+' conftest.er1 >conftest.err
2755 rm -f conftest.er1
2756 cat conftest.err >&5
2757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2758 (exit $ac_status); } &&
2759 { ac_try='test -z "$ac_c_werror_flag"
2760 || test ! -s conftest.err'
2761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2762 (eval $ac_try) 2>&5
2763 ac_status=$?
2764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2765 (exit $ac_status); }; } &&
2766 { ac_try='test -s conftest.$ac_objext'
2767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2768 (eval $ac_try) 2>&5
2769 ac_status=$?
2770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2771 (exit $ac_status); }; }; then
2772 for ac_declaration in \
2773 '' \
2774 'extern "C" void std::exit (int) throw (); using std::exit;' \
2775 'extern "C" void std::exit (int); using std::exit;' \
2776 'extern "C" void exit (int) throw ();' \
2777 'extern "C" void exit (int);' \
2778 'void exit (int);'
2780 cat >conftest.$ac_ext <<_ACEOF
2781 /* confdefs.h. */
2782 _ACEOF
2783 cat confdefs.h >>conftest.$ac_ext
2784 cat >>conftest.$ac_ext <<_ACEOF
2785 /* end confdefs.h. */
2786 $ac_declaration
2787 #include <stdlib.h>
2789 main ()
2791 exit (42);
2793 return 0;
2795 _ACEOF
2796 rm -f conftest.$ac_objext
2797 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2798 (eval $ac_compile) 2>conftest.er1
2799 ac_status=$?
2800 grep -v '^ *+' conftest.er1 >conftest.err
2801 rm -f conftest.er1
2802 cat conftest.err >&5
2803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2804 (exit $ac_status); } &&
2805 { ac_try='test -z "$ac_c_werror_flag"
2806 || test ! -s conftest.err'
2807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2808 (eval $ac_try) 2>&5
2809 ac_status=$?
2810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2811 (exit $ac_status); }; } &&
2812 { ac_try='test -s conftest.$ac_objext'
2813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2814 (eval $ac_try) 2>&5
2815 ac_status=$?
2816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2817 (exit $ac_status); }; }; then
2819 else
2820 echo "$as_me: failed program was:" >&5
2821 sed 's/^/| /' conftest.$ac_ext >&5
2823 continue
2825 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2826 cat >conftest.$ac_ext <<_ACEOF
2827 /* confdefs.h. */
2828 _ACEOF
2829 cat confdefs.h >>conftest.$ac_ext
2830 cat >>conftest.$ac_ext <<_ACEOF
2831 /* end confdefs.h. */
2832 $ac_declaration
2834 main ()
2836 exit (42);
2838 return 0;
2840 _ACEOF
2841 rm -f conftest.$ac_objext
2842 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2843 (eval $ac_compile) 2>conftest.er1
2844 ac_status=$?
2845 grep -v '^ *+' conftest.er1 >conftest.err
2846 rm -f conftest.er1
2847 cat conftest.err >&5
2848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2849 (exit $ac_status); } &&
2850 { ac_try='test -z "$ac_c_werror_flag"
2851 || test ! -s conftest.err'
2852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2853 (eval $ac_try) 2>&5
2854 ac_status=$?
2855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2856 (exit $ac_status); }; } &&
2857 { ac_try='test -s conftest.$ac_objext'
2858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2859 (eval $ac_try) 2>&5
2860 ac_status=$?
2861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2862 (exit $ac_status); }; }; then
2863 break
2864 else
2865 echo "$as_me: failed program was:" >&5
2866 sed 's/^/| /' conftest.$ac_ext >&5
2869 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2870 done
2871 rm -f conftest*
2872 if test -n "$ac_declaration"; then
2873 echo '#ifdef __cplusplus' >>confdefs.h
2874 echo $ac_declaration >>confdefs.h
2875 echo '#endif' >>confdefs.h
2878 else
2879 echo "$as_me: failed program was:" >&5
2880 sed 's/^/| /' conftest.$ac_ext >&5
2883 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2884 ac_ext=c
2885 ac_cpp='$CPP $CPPFLAGS'
2886 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2887 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2888 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2889 ac_ext=c
2890 ac_cpp='$CPP $CPPFLAGS'
2891 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2892 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2893 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2894 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2895 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2896 # On Suns, sometimes $CPP names a directory.
2897 if test -n "$CPP" && test -d "$CPP"; then
2898 CPP=
2900 if test -z "$CPP"; then
2901 if test "${ac_cv_prog_CPP+set}" = set; then
2902 echo $ECHO_N "(cached) $ECHO_C" >&6
2903 else
2904 # Double quotes because CPP needs to be expanded
2905 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2907 ac_preproc_ok=false
2908 for ac_c_preproc_warn_flag in '' yes
2910 # Use a header file that comes with gcc, so configuring glibc
2911 # with a fresh cross-compiler works.
2912 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2913 # <limits.h> exists even on freestanding compilers.
2914 # On the NeXT, cc -E runs the code through the compiler's parser,
2915 # not just through cpp. "Syntax error" is here to catch this case.
2916 cat >conftest.$ac_ext <<_ACEOF
2917 /* confdefs.h. */
2918 _ACEOF
2919 cat confdefs.h >>conftest.$ac_ext
2920 cat >>conftest.$ac_ext <<_ACEOF
2921 /* end confdefs.h. */
2922 #ifdef __STDC__
2923 # include <limits.h>
2924 #else
2925 # include <assert.h>
2926 #endif
2927 Syntax error
2928 _ACEOF
2929 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2930 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2931 ac_status=$?
2932 grep -v '^ *+' conftest.er1 >conftest.err
2933 rm -f conftest.er1
2934 cat conftest.err >&5
2935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2936 (exit $ac_status); } >/dev/null; then
2937 if test -s conftest.err; then
2938 ac_cpp_err=$ac_c_preproc_warn_flag
2939 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2940 else
2941 ac_cpp_err=
2943 else
2944 ac_cpp_err=yes
2946 if test -z "$ac_cpp_err"; then
2948 else
2949 echo "$as_me: failed program was:" >&5
2950 sed 's/^/| /' conftest.$ac_ext >&5
2952 # Broken: fails on valid input.
2953 continue
2955 rm -f conftest.err conftest.$ac_ext
2957 # OK, works on sane cases. Now check whether non-existent headers
2958 # can be detected and how.
2959 cat >conftest.$ac_ext <<_ACEOF
2960 /* confdefs.h. */
2961 _ACEOF
2962 cat confdefs.h >>conftest.$ac_ext
2963 cat >>conftest.$ac_ext <<_ACEOF
2964 /* end confdefs.h. */
2965 #include <ac_nonexistent.h>
2966 _ACEOF
2967 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2968 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2969 ac_status=$?
2970 grep -v '^ *+' conftest.er1 >conftest.err
2971 rm -f conftest.er1
2972 cat conftest.err >&5
2973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2974 (exit $ac_status); } >/dev/null; then
2975 if test -s conftest.err; then
2976 ac_cpp_err=$ac_c_preproc_warn_flag
2977 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2978 else
2979 ac_cpp_err=
2981 else
2982 ac_cpp_err=yes
2984 if test -z "$ac_cpp_err"; then
2985 # Broken: success on invalid input.
2986 continue
2987 else
2988 echo "$as_me: failed program was:" >&5
2989 sed 's/^/| /' conftest.$ac_ext >&5
2991 # Passes both tests.
2992 ac_preproc_ok=:
2993 break
2995 rm -f conftest.err conftest.$ac_ext
2997 done
2998 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2999 rm -f conftest.err conftest.$ac_ext
3000 if $ac_preproc_ok; then
3001 break
3004 done
3005 ac_cv_prog_CPP=$CPP
3008 CPP=$ac_cv_prog_CPP
3009 else
3010 ac_cv_prog_CPP=$CPP
3012 echo "$as_me:$LINENO: result: $CPP" >&5
3013 echo "${ECHO_T}$CPP" >&6
3014 ac_preproc_ok=false
3015 for ac_c_preproc_warn_flag in '' yes
3017 # Use a header file that comes with gcc, so configuring glibc
3018 # with a fresh cross-compiler works.
3019 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3020 # <limits.h> exists even on freestanding compilers.
3021 # On the NeXT, cc -E runs the code through the compiler's parser,
3022 # not just through cpp. "Syntax error" is here to catch this case.
3023 cat >conftest.$ac_ext <<_ACEOF
3024 /* confdefs.h. */
3025 _ACEOF
3026 cat confdefs.h >>conftest.$ac_ext
3027 cat >>conftest.$ac_ext <<_ACEOF
3028 /* end confdefs.h. */
3029 #ifdef __STDC__
3030 # include <limits.h>
3031 #else
3032 # include <assert.h>
3033 #endif
3034 Syntax error
3035 _ACEOF
3036 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3037 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3038 ac_status=$?
3039 grep -v '^ *+' conftest.er1 >conftest.err
3040 rm -f conftest.er1
3041 cat conftest.err >&5
3042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3043 (exit $ac_status); } >/dev/null; then
3044 if test -s conftest.err; then
3045 ac_cpp_err=$ac_c_preproc_warn_flag
3046 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3047 else
3048 ac_cpp_err=
3050 else
3051 ac_cpp_err=yes
3053 if test -z "$ac_cpp_err"; then
3055 else
3056 echo "$as_me: failed program was:" >&5
3057 sed 's/^/| /' conftest.$ac_ext >&5
3059 # Broken: fails on valid input.
3060 continue
3062 rm -f conftest.err conftest.$ac_ext
3064 # OK, works on sane cases. Now check whether non-existent headers
3065 # can be detected and how.
3066 cat >conftest.$ac_ext <<_ACEOF
3067 /* confdefs.h. */
3068 _ACEOF
3069 cat confdefs.h >>conftest.$ac_ext
3070 cat >>conftest.$ac_ext <<_ACEOF
3071 /* end confdefs.h. */
3072 #include <ac_nonexistent.h>
3073 _ACEOF
3074 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3075 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3076 ac_status=$?
3077 grep -v '^ *+' conftest.er1 >conftest.err
3078 rm -f conftest.er1
3079 cat conftest.err >&5
3080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3081 (exit $ac_status); } >/dev/null; then
3082 if test -s conftest.err; then
3083 ac_cpp_err=$ac_c_preproc_warn_flag
3084 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3085 else
3086 ac_cpp_err=
3088 else
3089 ac_cpp_err=yes
3091 if test -z "$ac_cpp_err"; then
3092 # Broken: success on invalid input.
3093 continue
3094 else
3095 echo "$as_me: failed program was:" >&5
3096 sed 's/^/| /' conftest.$ac_ext >&5
3098 # Passes both tests.
3099 ac_preproc_ok=:
3100 break
3102 rm -f conftest.err conftest.$ac_ext
3104 done
3105 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3106 rm -f conftest.err conftest.$ac_ext
3107 if $ac_preproc_ok; then
3109 else
3110 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3111 See \`config.log' for more details." >&5
3112 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3113 See \`config.log' for more details." >&2;}
3114 { (exit 1); exit 1; }; }
3117 ac_ext=c
3118 ac_cpp='$CPP $CPPFLAGS'
3119 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3120 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3121 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3122 # Find a good install program. We prefer a C program (faster),
3123 # so one script is as good as another. But avoid the broken or
3124 # incompatible versions:
3125 # SysV /etc/install, /usr/sbin/install
3126 # SunOS /usr/etc/install
3127 # IRIX /sbin/install
3128 # AIX /bin/install
3129 # AmigaOS /C/install, which installs bootblocks on floppy discs
3130 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3131 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3132 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3133 # OS/2's system install, which has a completely different semantic
3134 # ./install, which can be erroneously created by make from ./install.sh.
3135 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3136 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3137 if test -z "$INSTALL"; then
3138 if test "${ac_cv_path_install+set}" = set; then
3139 echo $ECHO_N "(cached) $ECHO_C" >&6
3140 else
3141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3142 for as_dir in $PATH
3144 IFS=$as_save_IFS
3145 test -z "$as_dir" && as_dir=.
3146 # Account for people who put trailing slashes in PATH elements.
3147 case $as_dir/ in
3148 ./ | .// | /cC/* | \
3149 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3150 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3151 /usr/ucb/* ) ;;
3153 # OSF1 and SCO ODT 3.0 have their own names for install.
3154 # Don't use installbsd from OSF since it installs stuff as root
3155 # by default.
3156 for ac_prog in ginstall scoinst install; do
3157 for ac_exec_ext in '' $ac_executable_extensions; do
3158 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3159 if test $ac_prog = install &&
3160 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3161 # AIX install. It has an incompatible calling convention.
3163 elif test $ac_prog = install &&
3164 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3165 # program-specific install script used by HP pwplus--don't use.
3167 else
3168 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3169 break 3
3172 done
3173 done
3175 esac
3176 done
3180 if test "${ac_cv_path_install+set}" = set; then
3181 INSTALL=$ac_cv_path_install
3182 else
3183 # As a last resort, use the slow shell script. We don't cache a
3184 # path for INSTALL within a source directory, because that will
3185 # break other packages using the cache if that directory is
3186 # removed, or if the path is relative.
3187 INSTALL=$ac_install_sh
3190 echo "$as_me:$LINENO: result: $INSTALL" >&5
3191 echo "${ECHO_T}$INSTALL" >&6
3193 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3194 # It thinks the first close brace ends the variable substitution.
3195 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3197 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3199 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3200 for ac_prog in gawk mawk nawk awk
3202 # Extract the first word of "$ac_prog", so it can be a program name with args.
3203 set dummy $ac_prog; ac_word=$2
3204 echo "$as_me:$LINENO: checking for $ac_word" >&5
3205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3206 if test "${ac_cv_prog_AWK+set}" = set; then
3207 echo $ECHO_N "(cached) $ECHO_C" >&6
3208 else
3209 if test -n "$AWK"; then
3210 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3211 else
3212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3213 for as_dir in $PATH
3215 IFS=$as_save_IFS
3216 test -z "$as_dir" && as_dir=.
3217 for ac_exec_ext in '' $ac_executable_extensions; do
3218 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3219 ac_cv_prog_AWK="$ac_prog"
3220 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3221 break 2
3223 done
3224 done
3228 AWK=$ac_cv_prog_AWK
3229 if test -n "$AWK"; then
3230 echo "$as_me:$LINENO: result: $AWK" >&5
3231 echo "${ECHO_T}$AWK" >&6
3232 else
3233 echo "$as_me:$LINENO: result: no" >&5
3234 echo "${ECHO_T}no" >&6
3237 test -n "$AWK" && break
3238 done
3241 echo "$as_me:$LINENO: checking for library containing strerror" >&5
3242 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
3243 if test "${ac_cv_search_strerror+set}" = set; then
3244 echo $ECHO_N "(cached) $ECHO_C" >&6
3245 else
3246 ac_func_search_save_LIBS=$LIBS
3247 ac_cv_search_strerror=no
3248 cat >conftest.$ac_ext <<_ACEOF
3249 /* confdefs.h. */
3250 _ACEOF
3251 cat confdefs.h >>conftest.$ac_ext
3252 cat >>conftest.$ac_ext <<_ACEOF
3253 /* end confdefs.h. */
3255 /* Override any gcc2 internal prototype to avoid an error. */
3256 #ifdef __cplusplus
3257 extern "C"
3258 #endif
3259 /* We use char because int might match the return type of a gcc2
3260 builtin and then its argument prototype would still apply. */
3261 char strerror ();
3263 main ()
3265 strerror ();
3267 return 0;
3269 _ACEOF
3270 rm -f conftest.$ac_objext conftest$ac_exeext
3271 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3272 (eval $ac_link) 2>conftest.er1
3273 ac_status=$?
3274 grep -v '^ *+' conftest.er1 >conftest.err
3275 rm -f conftest.er1
3276 cat conftest.err >&5
3277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3278 (exit $ac_status); } &&
3279 { ac_try='test -z "$ac_c_werror_flag"
3280 || test ! -s conftest.err'
3281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3282 (eval $ac_try) 2>&5
3283 ac_status=$?
3284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3285 (exit $ac_status); }; } &&
3286 { ac_try='test -s conftest$ac_exeext'
3287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3288 (eval $ac_try) 2>&5
3289 ac_status=$?
3290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3291 (exit $ac_status); }; }; then
3292 ac_cv_search_strerror="none required"
3293 else
3294 echo "$as_me: failed program was:" >&5
3295 sed 's/^/| /' conftest.$ac_ext >&5
3298 rm -f conftest.err conftest.$ac_objext \
3299 conftest$ac_exeext conftest.$ac_ext
3300 if test "$ac_cv_search_strerror" = no; then
3301 for ac_lib in cposix; do
3302 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
3303 cat >conftest.$ac_ext <<_ACEOF
3304 /* confdefs.h. */
3305 _ACEOF
3306 cat confdefs.h >>conftest.$ac_ext
3307 cat >>conftest.$ac_ext <<_ACEOF
3308 /* end confdefs.h. */
3310 /* Override any gcc2 internal prototype to avoid an error. */
3311 #ifdef __cplusplus
3312 extern "C"
3313 #endif
3314 /* We use char because int might match the return type of a gcc2
3315 builtin and then its argument prototype would still apply. */
3316 char strerror ();
3318 main ()
3320 strerror ();
3322 return 0;
3324 _ACEOF
3325 rm -f conftest.$ac_objext conftest$ac_exeext
3326 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3327 (eval $ac_link) 2>conftest.er1
3328 ac_status=$?
3329 grep -v '^ *+' conftest.er1 >conftest.err
3330 rm -f conftest.er1
3331 cat conftest.err >&5
3332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3333 (exit $ac_status); } &&
3334 { ac_try='test -z "$ac_c_werror_flag"
3335 || test ! -s conftest.err'
3336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3337 (eval $ac_try) 2>&5
3338 ac_status=$?
3339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3340 (exit $ac_status); }; } &&
3341 { ac_try='test -s conftest$ac_exeext'
3342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3343 (eval $ac_try) 2>&5
3344 ac_status=$?
3345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3346 (exit $ac_status); }; }; then
3347 ac_cv_search_strerror="-l$ac_lib"
3348 break
3349 else
3350 echo "$as_me: failed program was:" >&5
3351 sed 's/^/| /' conftest.$ac_ext >&5
3354 rm -f conftest.err conftest.$ac_objext \
3355 conftest$ac_exeext conftest.$ac_ext
3356 done
3358 LIBS=$ac_func_search_save_LIBS
3360 echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
3361 echo "${ECHO_T}$ac_cv_search_strerror" >&6
3362 if test "$ac_cv_search_strerror" != no; then
3363 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
3368 if test x$GCC = xyes; then
3371 if $TRUEPRG; then
3372 HAVE_GCC_TRUE=
3373 HAVE_GCC_FALSE='#'
3374 else
3375 HAVE_GCC_TRUE='#'
3376 HAVE_GCC_FALSE=
3378 cat >>confdefs.h <<\_ACEOF
3379 #define HAVE_GCC 1
3380 _ACEOF
3382 else
3385 if $FALSEPRG; then
3386 HAVE_GCC_TRUE=
3387 HAVE_GCC_FALSE='#'
3388 else
3389 HAVE_GCC_TRUE='#'
3390 HAVE_GCC_FALSE=
3394 if test x$LD = x ; then
3395 LD="$CC"
3407 PTHREAD_CFLAGS=""
3408 PTHREAD_LFLAGS="-lpthread"
3409 with_pthreads=yes
3411 cat >>confdefs.h <<\_ACEOF
3412 #define HAVE_PTHREADS 1
3413 _ACEOF
3418 APCACCESS=apcaccess
3419 SMTP=smtp
3420 APCTEST=apctest
3425 for ac_prog in shutdown shutdown.bsd
3427 # Extract the first word of "$ac_prog", so it can be a program name with args.
3428 set dummy $ac_prog; ac_word=$2
3429 echo "$as_me:$LINENO: checking for $ac_word" >&5
3430 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3431 if test "${ac_cv_path_SHUTDOWN+set}" = set; then
3432 echo $ECHO_N "(cached) $ECHO_C" >&6
3433 else
3434 case $SHUTDOWN in
3435 [\\/]* | ?:[\\/]*)
3436 ac_cv_path_SHUTDOWN="$SHUTDOWN" # Let the user override the test with a path.
3439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3440 for as_dir in $PATH
3442 IFS=$as_save_IFS
3443 test -z "$as_dir" && as_dir=.
3444 for ac_exec_ext in '' $ac_executable_extensions; do
3445 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3446 ac_cv_path_SHUTDOWN="$as_dir/$ac_word$ac_exec_ext"
3447 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3448 break 2
3450 done
3451 done
3454 esac
3456 SHUTDOWN=$ac_cv_path_SHUTDOWN
3458 if test -n "$SHUTDOWN"; then
3459 echo "$as_me:$LINENO: result: $SHUTDOWN" >&5
3460 echo "${ECHO_T}$SHUTDOWN" >&6
3461 else
3462 echo "$as_me:$LINENO: result: no" >&5
3463 echo "${ECHO_T}no" >&6
3466 test -n "$SHUTDOWN" && break
3467 done
3469 if test "$SHUTDOWN" = "" ; then
3470 { { echo "$as_me:$LINENO: error: Missing required tool; need any one of: shutdown shutdown.bsd" >&5
3471 echo "$as_me: error: Missing required tool; need any one of: shutdown shutdown.bsd" >&2;}
3472 { (exit 1); exit 1; }; }
3476 for ac_prog in mail
3478 # Extract the first word of "$ac_prog", so it can be a program name with args.
3479 set dummy $ac_prog; ac_word=$2
3480 echo "$as_me:$LINENO: checking for $ac_word" >&5
3481 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3482 if test "${ac_cv_path_APCUPSD_MAIL+set}" = set; then
3483 echo $ECHO_N "(cached) $ECHO_C" >&6
3484 else
3485 case $APCUPSD_MAIL in
3486 [\\/]* | ?:[\\/]*)
3487 ac_cv_path_APCUPSD_MAIL="$APCUPSD_MAIL" # Let the user override the test with a path.
3490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3491 for as_dir in $PATH
3493 IFS=$as_save_IFS
3494 test -z "$as_dir" && as_dir=.
3495 for ac_exec_ext in '' $ac_executable_extensions; do
3496 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3497 ac_cv_path_APCUPSD_MAIL="$as_dir/$ac_word$ac_exec_ext"
3498 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3499 break 2
3501 done
3502 done
3505 esac
3507 APCUPSD_MAIL=$ac_cv_path_APCUPSD_MAIL
3509 if test -n "$APCUPSD_MAIL"; then
3510 echo "$as_me:$LINENO: result: $APCUPSD_MAIL" >&5
3511 echo "${ECHO_T}$APCUPSD_MAIL" >&6
3512 else
3513 echo "$as_me:$LINENO: result: no" >&5
3514 echo "${ECHO_T}no" >&6
3517 test -n "$APCUPSD_MAIL" && break
3518 done
3519 test -n "$APCUPSD_MAIL" || APCUPSD_MAIL="no"
3521 if test "$APCUPSD_MAIL" = "no"
3522 then
3523 { echo "$as_me:$LINENO: WARNING: mail program not found !" >&5
3524 echo "$as_me: WARNING: mail program not found !" >&2;}
3525 APCUPSD_MAIL=mail
3528 for ac_prog in wall
3530 # Extract the first word of "$ac_prog", so it can be a program name with args.
3531 set dummy $ac_prog; ac_word=$2
3532 echo "$as_me:$LINENO: checking for $ac_word" >&5
3533 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3534 if test "${ac_cv_path_WALL+set}" = set; then
3535 echo $ECHO_N "(cached) $ECHO_C" >&6
3536 else
3537 case $WALL in
3538 [\\/]* | ?:[\\/]*)
3539 ac_cv_path_WALL="$WALL" # Let the user override the test with a path.
3542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3543 for as_dir in $PATH
3545 IFS=$as_save_IFS
3546 test -z "$as_dir" && as_dir=.
3547 for ac_exec_ext in '' $ac_executable_extensions; do
3548 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3549 ac_cv_path_WALL="$as_dir/$ac_word$ac_exec_ext"
3550 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3551 break 2
3553 done
3554 done
3557 esac
3559 WALL=$ac_cv_path_WALL
3561 if test -n "$WALL"; then
3562 echo "$as_me:$LINENO: result: $WALL" >&5
3563 echo "${ECHO_T}$WALL" >&6
3564 else
3565 echo "$as_me:$LINENO: result: no" >&5
3566 echo "${ECHO_T}no" >&6
3569 test -n "$WALL" && break
3570 done
3572 if test "$WALL" = "" ; then
3573 { { echo "$as_me:$LINENO: error: Missing required tool; need any one of: wall" >&5
3574 echo "$as_me: error: Missing required tool; need any one of: wall" >&2;}
3575 { (exit 1); exit 1; }; }
3578 for ac_prog in sh bash
3580 # Extract the first word of "$ac_prog", so it can be a program name with args.
3581 set dummy $ac_prog; ac_word=$2
3582 echo "$as_me:$LINENO: checking for $ac_word" >&5
3583 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3584 if test "${ac_cv_path_SCRIPTSHELL+set}" = set; then
3585 echo $ECHO_N "(cached) $ECHO_C" >&6
3586 else
3587 case $SCRIPTSHELL in
3588 [\\/]* | ?:[\\/]*)
3589 ac_cv_path_SCRIPTSHELL="$SCRIPTSHELL" # Let the user override the test with a path.
3592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3593 for as_dir in $PATH
3595 IFS=$as_save_IFS
3596 test -z "$as_dir" && as_dir=.
3597 for ac_exec_ext in '' $ac_executable_extensions; do
3598 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3599 ac_cv_path_SCRIPTSHELL="$as_dir/$ac_word$ac_exec_ext"
3600 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3601 break 2
3603 done
3604 done
3607 esac
3609 SCRIPTSHELL=$ac_cv_path_SCRIPTSHELL
3611 if test -n "$SCRIPTSHELL"; then
3612 echo "$as_me:$LINENO: result: $SCRIPTSHELL" >&5
3613 echo "${ECHO_T}$SCRIPTSHELL" >&6
3614 else
3615 echo "$as_me:$LINENO: result: no" >&5
3616 echo "${ECHO_T}no" >&6
3619 test -n "$SCRIPTSHELL" && break
3620 done
3622 if test "$SCRIPTSHELL" = "" ; then
3623 { { echo "$as_me:$LINENO: error: Missing required tool; need any one of: sh bash" >&5
3624 echo "$as_me: error: Missing required tool; need any one of: sh bash" >&2;}
3625 { (exit 1); exit 1; }; }
3629 echo "$as_me:$LINENO: checking for GNU make" >&5
3630 echo $ECHO_N "checking for GNU make... $ECHO_C" >&6
3631 if test "${_cv_gnu_make_command+set}" = set; then
3632 echo $ECHO_N "(cached) $ECHO_C" >&6
3633 else
3634 _cv_gnu_make_command='' ;
3635 for a in "$MAKE" make gmake gnumake ; do
3636 if test -z "$a" ; then continue ; fi ;
3637 if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
3638 _cv_gnu_make_command=$a ;
3639 break;
3641 done ;
3644 echo "$as_me:$LINENO: result: $_cv_gnu_make_command" >&5
3645 echo "${ECHO_T}$_cv_gnu_make_command" >&6 ;
3646 MAKE=$_cv_gnu_make_command;
3647 if test -z "$_cv_gnu_make_command" ; then
3648 { { echo "$as_me:$LINENO: error: Could not find GNU make" >&5
3649 echo "$as_me: error: Could not find GNU make" >&2;}
3650 { (exit 1); exit 1; }; } ;
3651 fi ;
3653 for ac_prog in ranlib true
3655 # Extract the first word of "$ac_prog", so it can be a program name with args.
3656 set dummy $ac_prog; ac_word=$2
3657 echo "$as_me:$LINENO: checking for $ac_word" >&5
3658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3659 if test "${ac_cv_path_RANLIB+set}" = set; then
3660 echo $ECHO_N "(cached) $ECHO_C" >&6
3661 else
3662 case $RANLIB in
3663 [\\/]* | ?:[\\/]*)
3664 ac_cv_path_RANLIB="$RANLIB" # Let the user override the test with a path.
3667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3668 for as_dir in $PATH
3670 IFS=$as_save_IFS
3671 test -z "$as_dir" && as_dir=.
3672 for ac_exec_ext in '' $ac_executable_extensions; do
3673 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3674 ac_cv_path_RANLIB="$as_dir/$ac_word$ac_exec_ext"
3675 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3676 break 2
3678 done
3679 done
3682 esac
3684 RANLIB=$ac_cv_path_RANLIB
3686 if test -n "$RANLIB"; then
3687 echo "$as_me:$LINENO: result: $RANLIB" >&5
3688 echo "${ECHO_T}$RANLIB" >&6
3689 else
3690 echo "$as_me:$LINENO: result: no" >&5
3691 echo "${ECHO_T}no" >&6
3694 test -n "$RANLIB" && break
3695 done
3697 if test "$RANLIB" = "" ; then
3698 { { echo "$as_me:$LINENO: error: Missing required tool; need any one of: ranlib true" >&5
3699 echo "$as_me: error: Missing required tool; need any one of: ranlib true" >&2;}
3700 { (exit 1); exit 1; }; }
3703 # Extract the first word of "rm", so it can be a program name with args.
3704 set dummy rm; ac_word=$2
3705 echo "$as_me:$LINENO: checking for $ac_word" >&5
3706 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3707 if test "${ac_cv_path_RM+set}" = set; then
3708 echo $ECHO_N "(cached) $ECHO_C" >&6
3709 else
3710 case $RM in
3711 [\\/]* | ?:[\\/]*)
3712 ac_cv_path_RM="$RM" # Let the user override the test with a path.
3715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3716 for as_dir in $PATH
3718 IFS=$as_save_IFS
3719 test -z "$as_dir" && as_dir=.
3720 for ac_exec_ext in '' $ac_executable_extensions; do
3721 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3722 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
3723 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3724 break 2
3726 done
3727 done
3730 esac
3732 RM=$ac_cv_path_RM
3734 if test -n "$RM"; then
3735 echo "$as_me:$LINENO: result: $RM" >&5
3736 echo "${ECHO_T}$RM" >&6
3737 else
3738 echo "$as_me:$LINENO: result: no" >&5
3739 echo "${ECHO_T}no" >&6
3742 if test "$RM" = "" ; then
3743 { { echo "$as_me:$LINENO: error: Missing required tool: rm" >&5
3744 echo "$as_me: error: Missing required tool: rm" >&2;}
3745 { (exit 1); exit 1; }; }
3748 # Extract the first word of "cp", so it can be a program name with args.
3749 set dummy cp; ac_word=$2
3750 echo "$as_me:$LINENO: checking for $ac_word" >&5
3751 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3752 if test "${ac_cv_path_CP+set}" = set; then
3753 echo $ECHO_N "(cached) $ECHO_C" >&6
3754 else
3755 case $CP in
3756 [\\/]* | ?:[\\/]*)
3757 ac_cv_path_CP="$CP" # Let the user override the test with a path.
3760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3761 for as_dir in $PATH
3763 IFS=$as_save_IFS
3764 test -z "$as_dir" && as_dir=.
3765 for ac_exec_ext in '' $ac_executable_extensions; do
3766 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3767 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
3768 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3769 break 2
3771 done
3772 done
3775 esac
3777 CP=$ac_cv_path_CP
3779 if test -n "$CP"; then
3780 echo "$as_me:$LINENO: result: $CP" >&5
3781 echo "${ECHO_T}$CP" >&6
3782 else
3783 echo "$as_me:$LINENO: result: no" >&5
3784 echo "${ECHO_T}no" >&6
3787 if test "$CP" = "" ; then
3788 { { echo "$as_me:$LINENO: error: Missing required tool: cp" >&5
3789 echo "$as_me: error: Missing required tool: cp" >&2;}
3790 { (exit 1); exit 1; }; }
3793 # Extract the first word of "echo", so it can be a program name with args.
3794 set dummy echo; ac_word=$2
3795 echo "$as_me:$LINENO: checking for $ac_word" >&5
3796 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3797 if test "${ac_cv_path_ECHO+set}" = set; then
3798 echo $ECHO_N "(cached) $ECHO_C" >&6
3799 else
3800 case $ECHO in
3801 [\\/]* | ?:[\\/]*)
3802 ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
3805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3806 for as_dir in $PATH
3808 IFS=$as_save_IFS
3809 test -z "$as_dir" && as_dir=.
3810 for ac_exec_ext in '' $ac_executable_extensions; do
3811 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3812 ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
3813 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3814 break 2
3816 done
3817 done
3820 esac
3822 ECHO=$ac_cv_path_ECHO
3824 if test -n "$ECHO"; then
3825 echo "$as_me:$LINENO: result: $ECHO" >&5
3826 echo "${ECHO_T}$ECHO" >&6
3827 else
3828 echo "$as_me:$LINENO: result: no" >&5
3829 echo "${ECHO_T}no" >&6
3832 if test "$ECHO" = "" ; then
3833 { { echo "$as_me:$LINENO: error: Missing required tool: echo" >&5
3834 echo "$as_me: error: Missing required tool: echo" >&2;}
3835 { (exit 1); exit 1; }; }
3838 # Extract the first word of "ln", so it can be a program name with args.
3839 set dummy ln; ac_word=$2
3840 echo "$as_me:$LINENO: checking for $ac_word" >&5
3841 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3842 if test "${ac_cv_path_LN+set}" = set; then
3843 echo $ECHO_N "(cached) $ECHO_C" >&6
3844 else
3845 case $LN in
3846 [\\/]* | ?:[\\/]*)
3847 ac_cv_path_LN="$LN" # Let the user override the test with a path.
3850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3851 for as_dir in $PATH
3853 IFS=$as_save_IFS
3854 test -z "$as_dir" && as_dir=.
3855 for ac_exec_ext in '' $ac_executable_extensions; do
3856 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3857 ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
3858 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3859 break 2
3861 done
3862 done
3865 esac
3867 LN=$ac_cv_path_LN
3869 if test -n "$LN"; then
3870 echo "$as_me:$LINENO: result: $LN" >&5
3871 echo "${ECHO_T}$LN" >&6
3872 else
3873 echo "$as_me:$LINENO: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3877 if test "$LN" = "" ; then
3878 { { echo "$as_me:$LINENO: error: Missing required tool: ln" >&5
3879 echo "$as_me: error: Missing required tool: ln" >&2;}
3880 { (exit 1); exit 1; }; }
3883 # Extract the first word of "sed", so it can be a program name with args.
3884 set dummy sed; ac_word=$2
3885 echo "$as_me:$LINENO: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_path_SED+set}" = set; then
3888 echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890 case $SED in
3891 [\\/]* | ?:[\\/]*)
3892 ac_cv_path_SED="$SED" # Let the user override the test with a path.
3895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3896 for as_dir in $PATH
3898 IFS=$as_save_IFS
3899 test -z "$as_dir" && as_dir=.
3900 for ac_exec_ext in '' $ac_executable_extensions; do
3901 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3902 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
3903 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3904 break 2
3906 done
3907 done
3910 esac
3912 SED=$ac_cv_path_SED
3914 if test -n "$SED"; then
3915 echo "$as_me:$LINENO: result: $SED" >&5
3916 echo "${ECHO_T}$SED" >&6
3917 else
3918 echo "$as_me:$LINENO: result: no" >&5
3919 echo "${ECHO_T}no" >&6
3922 if test "$SED" = "" ; then
3923 { { echo "$as_me:$LINENO: error: Missing required tool: sed" >&5
3924 echo "$as_me: error: Missing required tool: sed" >&2;}
3925 { (exit 1); exit 1; }; }
3928 # Extract the first word of "ar", so it can be a program name with args.
3929 set dummy ar; ac_word=$2
3930 echo "$as_me:$LINENO: checking for $ac_word" >&5
3931 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3932 if test "${ac_cv_path_AR+set}" = set; then
3933 echo $ECHO_N "(cached) $ECHO_C" >&6
3934 else
3935 case $AR in
3936 [\\/]* | ?:[\\/]*)
3937 ac_cv_path_AR="$AR" # Let the user override the test with a path.
3940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3941 for as_dir in $PATH
3943 IFS=$as_save_IFS
3944 test -z "$as_dir" && as_dir=.
3945 for ac_exec_ext in '' $ac_executable_extensions; do
3946 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3947 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
3948 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3949 break 2
3951 done
3952 done
3955 esac
3957 AR=$ac_cv_path_AR
3959 if test -n "$AR"; then
3960 echo "$as_me:$LINENO: result: $AR" >&5
3961 echo "${ECHO_T}$AR" >&6
3962 else
3963 echo "$as_me:$LINENO: result: no" >&5
3964 echo "${ECHO_T}no" >&6
3967 if test "$AR" = "" ; then
3968 { { echo "$as_me:$LINENO: error: Missing required tool: ar" >&5
3969 echo "$as_me: error: Missing required tool: ar" >&2;}
3970 { (exit 1); exit 1; }; }
3973 # Extract the first word of "mv", so it can be a program name with args.
3974 set dummy mv; ac_word=$2
3975 echo "$as_me:$LINENO: checking for $ac_word" >&5
3976 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3977 if test "${ac_cv_path_MV+set}" = set; then
3978 echo $ECHO_N "(cached) $ECHO_C" >&6
3979 else
3980 case $MV in
3981 [\\/]* | ?:[\\/]*)
3982 ac_cv_path_MV="$MV" # Let the user override the test with a path.
3985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3986 for as_dir in $PATH
3988 IFS=$as_save_IFS
3989 test -z "$as_dir" && as_dir=.
3990 for ac_exec_ext in '' $ac_executable_extensions; do
3991 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3992 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
3993 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3994 break 2
3996 done
3997 done
4000 esac
4002 MV=$ac_cv_path_MV
4004 if test -n "$MV"; then
4005 echo "$as_me:$LINENO: result: $MV" >&5
4006 echo "${ECHO_T}$MV" >&6
4007 else
4008 echo "$as_me:$LINENO: result: no" >&5
4009 echo "${ECHO_T}no" >&6
4012 if test "$MV" = "" ; then
4013 { { echo "$as_me:$LINENO: error: Missing required tool: mv" >&5
4014 echo "$as_me: error: Missing required tool: mv" >&2;}
4015 { (exit 1); exit 1; }; }
4019 # Extract the first word of "rst2html.py", so it can be a program name with args.
4020 set dummy rst2html.py; ac_word=$2
4021 echo "$as_me:$LINENO: checking for $ac_word" >&5
4022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4023 if test "${ac_cv_path_RST2HTML+set}" = set; then
4024 echo $ECHO_N "(cached) $ECHO_C" >&6
4025 else
4026 case $RST2HTML in
4027 [\\/]* | ?:[\\/]*)
4028 ac_cv_path_RST2HTML="$RST2HTML" # Let the user override the test with a path.
4031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4032 for as_dir in $PATH
4034 IFS=$as_save_IFS
4035 test -z "$as_dir" && as_dir=.
4036 for ac_exec_ext in '' $ac_executable_extensions; do
4037 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4038 ac_cv_path_RST2HTML="$as_dir/$ac_word$ac_exec_ext"
4039 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4040 break 2
4042 done
4043 done
4046 esac
4048 RST2HTML=$ac_cv_path_RST2HTML
4050 if test -n "$RST2HTML"; then
4051 echo "$as_me:$LINENO: result: $RST2HTML" >&5
4052 echo "${ECHO_T}$RST2HTML" >&6
4053 else
4054 echo "$as_me:$LINENO: result: no" >&5
4055 echo "${ECHO_T}no" >&6
4058 # Extract the first word of "rst2pdf", so it can be a program name with args.
4059 set dummy rst2pdf; ac_word=$2
4060 echo "$as_me:$LINENO: checking for $ac_word" >&5
4061 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4062 if test "${ac_cv_path_RST2PDF+set}" = set; then
4063 echo $ECHO_N "(cached) $ECHO_C" >&6
4064 else
4065 case $RST2PDF in
4066 [\\/]* | ?:[\\/]*)
4067 ac_cv_path_RST2PDF="$RST2PDF" # Let the user override the test with a path.
4070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4071 for as_dir in $PATH
4073 IFS=$as_save_IFS
4074 test -z "$as_dir" && as_dir=.
4075 for ac_exec_ext in '' $ac_executable_extensions; do
4076 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4077 ac_cv_path_RST2PDF="$as_dir/$ac_word$ac_exec_ext"
4078 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4079 break 2
4081 done
4082 done
4085 esac
4087 RST2PDF=$ac_cv_path_RST2PDF
4089 if test -n "$RST2PDF"; then
4090 echo "$as_me:$LINENO: result: $RST2PDF" >&5
4091 echo "${ECHO_T}$RST2PDF" >&6
4092 else
4093 echo "$as_me:$LINENO: result: no" >&5
4094 echo "${ECHO_T}no" >&6
4098 # -------------------------------------------------------------------------
4099 # If the user has not set --mandir, we default to /usr/share/man
4100 # -------------------------------------------------------------------------
4101 if test x$mandir = x'${prefix}/man' ; then
4102 mandir=/usr/share/man
4122 for ac_func in abort fork calloc getpid \
4123 ioctl kill rewind select setsid signal strerror strncmp \
4124 strncpy tcgetattr vfprintf setpgrp
4126 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4127 echo "$as_me:$LINENO: checking for $ac_func" >&5
4128 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4129 if eval "test \"\${$as_ac_var+set}\" = set"; then
4130 echo $ECHO_N "(cached) $ECHO_C" >&6
4131 else
4132 cat >conftest.$ac_ext <<_ACEOF
4133 /* confdefs.h. */
4134 _ACEOF
4135 cat confdefs.h >>conftest.$ac_ext
4136 cat >>conftest.$ac_ext <<_ACEOF
4137 /* end confdefs.h. */
4138 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4139 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4140 #define $ac_func innocuous_$ac_func
4142 /* System header to define __stub macros and hopefully few prototypes,
4143 which can conflict with char $ac_func (); below.
4144 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4145 <limits.h> exists even on freestanding compilers. */
4147 #ifdef __STDC__
4148 # include <limits.h>
4149 #else
4150 # include <assert.h>
4151 #endif
4153 #undef $ac_func
4155 /* Override any gcc2 internal prototype to avoid an error. */
4156 #ifdef __cplusplus
4157 extern "C"
4159 #endif
4160 /* We use char because int might match the return type of a gcc2
4161 builtin and then its argument prototype would still apply. */
4162 char $ac_func ();
4163 /* The GNU C library defines this for functions which it implements
4164 to always fail with ENOSYS. Some functions are actually named
4165 something starting with __ and the normal name is an alias. */
4166 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4167 choke me
4168 #else
4169 char (*f) () = $ac_func;
4170 #endif
4171 #ifdef __cplusplus
4173 #endif
4176 main ()
4178 return f != $ac_func;
4180 return 0;
4182 _ACEOF
4183 rm -f conftest.$ac_objext conftest$ac_exeext
4184 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4185 (eval $ac_link) 2>conftest.er1
4186 ac_status=$?
4187 grep -v '^ *+' conftest.er1 >conftest.err
4188 rm -f conftest.er1
4189 cat conftest.err >&5
4190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4191 (exit $ac_status); } &&
4192 { ac_try='test -z "$ac_c_werror_flag"
4193 || test ! -s conftest.err'
4194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4195 (eval $ac_try) 2>&5
4196 ac_status=$?
4197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4198 (exit $ac_status); }; } &&
4199 { ac_try='test -s conftest$ac_exeext'
4200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4201 (eval $ac_try) 2>&5
4202 ac_status=$?
4203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4204 (exit $ac_status); }; }; then
4205 eval "$as_ac_var=yes"
4206 else
4207 echo "$as_me: failed program was:" >&5
4208 sed 's/^/| /' conftest.$ac_ext >&5
4210 eval "$as_ac_var=no"
4212 rm -f conftest.err conftest.$ac_objext \
4213 conftest$ac_exeext conftest.$ac_ext
4215 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4216 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4217 if test `eval echo '${'$as_ac_var'}'` = yes; then
4218 cat >>confdefs.h <<_ACEOF
4219 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4220 _ACEOF
4222 else
4223 { { echo "$as_me:$LINENO: error: cannot find required function." >&5
4224 echo "$as_me: error: cannot find required function." >&2;}
4225 { (exit 1); exit 1; }; }
4228 done
4233 for ac_func in snprintf vsnprintf
4235 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4236 echo "$as_me:$LINENO: checking for $ac_func" >&5
4237 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4238 if eval "test \"\${$as_ac_var+set}\" = set"; then
4239 echo $ECHO_N "(cached) $ECHO_C" >&6
4240 else
4241 cat >conftest.$ac_ext <<_ACEOF
4242 /* confdefs.h. */
4243 _ACEOF
4244 cat confdefs.h >>conftest.$ac_ext
4245 cat >>conftest.$ac_ext <<_ACEOF
4246 /* end confdefs.h. */
4247 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4248 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4249 #define $ac_func innocuous_$ac_func
4251 /* System header to define __stub macros and hopefully few prototypes,
4252 which can conflict with char $ac_func (); below.
4253 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4254 <limits.h> exists even on freestanding compilers. */
4256 #ifdef __STDC__
4257 # include <limits.h>
4258 #else
4259 # include <assert.h>
4260 #endif
4262 #undef $ac_func
4264 /* Override any gcc2 internal prototype to avoid an error. */
4265 #ifdef __cplusplus
4266 extern "C"
4268 #endif
4269 /* We use char because int might match the return type of a gcc2
4270 builtin and then its argument prototype would still apply. */
4271 char $ac_func ();
4272 /* The GNU C library defines this for functions which it implements
4273 to always fail with ENOSYS. Some functions are actually named
4274 something starting with __ and the normal name is an alias. */
4275 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4276 choke me
4277 #else
4278 char (*f) () = $ac_func;
4279 #endif
4280 #ifdef __cplusplus
4282 #endif
4285 main ()
4287 return f != $ac_func;
4289 return 0;
4291 _ACEOF
4292 rm -f conftest.$ac_objext conftest$ac_exeext
4293 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4294 (eval $ac_link) 2>conftest.er1
4295 ac_status=$?
4296 grep -v '^ *+' conftest.er1 >conftest.err
4297 rm -f conftest.er1
4298 cat conftest.err >&5
4299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4300 (exit $ac_status); } &&
4301 { ac_try='test -z "$ac_c_werror_flag"
4302 || test ! -s conftest.err'
4303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4304 (eval $ac_try) 2>&5
4305 ac_status=$?
4306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4307 (exit $ac_status); }; } &&
4308 { ac_try='test -s conftest$ac_exeext'
4309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4310 (eval $ac_try) 2>&5
4311 ac_status=$?
4312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4313 (exit $ac_status); }; }; then
4314 eval "$as_ac_var=yes"
4315 else
4316 echo "$as_me: failed program was:" >&5
4317 sed 's/^/| /' conftest.$ac_ext >&5
4319 eval "$as_ac_var=no"
4321 rm -f conftest.err conftest.$ac_objext \
4322 conftest$ac_exeext conftest.$ac_ext
4324 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4325 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4326 if test `eval echo '${'$as_ac_var'}'` = yes; then
4327 cat >>confdefs.h <<_ACEOF
4328 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4329 _ACEOF
4332 done
4335 echo "$as_me:$LINENO: checking for library containing nanosleep" >&5
4336 echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6
4337 if test "${ac_cv_search_nanosleep+set}" = set; then
4338 echo $ECHO_N "(cached) $ECHO_C" >&6
4339 else
4340 ac_func_search_save_LIBS=$LIBS
4341 ac_cv_search_nanosleep=no
4342 cat >conftest.$ac_ext <<_ACEOF
4343 /* confdefs.h. */
4344 _ACEOF
4345 cat confdefs.h >>conftest.$ac_ext
4346 cat >>conftest.$ac_ext <<_ACEOF
4347 /* end confdefs.h. */
4349 /* Override any gcc2 internal prototype to avoid an error. */
4350 #ifdef __cplusplus
4351 extern "C"
4352 #endif
4353 /* We use char because int might match the return type of a gcc2
4354 builtin and then its argument prototype would still apply. */
4355 char nanosleep ();
4357 main ()
4359 nanosleep ();
4361 return 0;
4363 _ACEOF
4364 rm -f conftest.$ac_objext conftest$ac_exeext
4365 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4366 (eval $ac_link) 2>conftest.er1
4367 ac_status=$?
4368 grep -v '^ *+' conftest.er1 >conftest.err
4369 rm -f conftest.er1
4370 cat conftest.err >&5
4371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4372 (exit $ac_status); } &&
4373 { ac_try='test -z "$ac_c_werror_flag"
4374 || test ! -s conftest.err'
4375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4376 (eval $ac_try) 2>&5
4377 ac_status=$?
4378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4379 (exit $ac_status); }; } &&
4380 { ac_try='test -s conftest$ac_exeext'
4381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4382 (eval $ac_try) 2>&5
4383 ac_status=$?
4384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4385 (exit $ac_status); }; }; then
4386 ac_cv_search_nanosleep="none required"
4387 else
4388 echo "$as_me: failed program was:" >&5
4389 sed 's/^/| /' conftest.$ac_ext >&5
4392 rm -f conftest.err conftest.$ac_objext \
4393 conftest$ac_exeext conftest.$ac_ext
4394 if test "$ac_cv_search_nanosleep" = no; then
4395 for ac_lib in rt posix4; do
4396 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4397 cat >conftest.$ac_ext <<_ACEOF
4398 /* confdefs.h. */
4399 _ACEOF
4400 cat confdefs.h >>conftest.$ac_ext
4401 cat >>conftest.$ac_ext <<_ACEOF
4402 /* end confdefs.h. */
4404 /* Override any gcc2 internal prototype to avoid an error. */
4405 #ifdef __cplusplus
4406 extern "C"
4407 #endif
4408 /* We use char because int might match the return type of a gcc2
4409 builtin and then its argument prototype would still apply. */
4410 char nanosleep ();
4412 main ()
4414 nanosleep ();
4416 return 0;
4418 _ACEOF
4419 rm -f conftest.$ac_objext conftest$ac_exeext
4420 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4421 (eval $ac_link) 2>conftest.er1
4422 ac_status=$?
4423 grep -v '^ *+' conftest.er1 >conftest.err
4424 rm -f conftest.er1
4425 cat conftest.err >&5
4426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4427 (exit $ac_status); } &&
4428 { ac_try='test -z "$ac_c_werror_flag"
4429 || test ! -s conftest.err'
4430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4431 (eval $ac_try) 2>&5
4432 ac_status=$?
4433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4434 (exit $ac_status); }; } &&
4435 { ac_try='test -s conftest$ac_exeext'
4436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4437 (eval $ac_try) 2>&5
4438 ac_status=$?
4439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4440 (exit $ac_status); }; }; then
4441 ac_cv_search_nanosleep="-l$ac_lib"
4442 break
4443 else
4444 echo "$as_me: failed program was:" >&5
4445 sed 's/^/| /' conftest.$ac_ext >&5
4448 rm -f conftest.err conftest.$ac_objext \
4449 conftest$ac_exeext conftest.$ac_ext
4450 done
4452 LIBS=$ac_func_search_save_LIBS
4454 echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5
4455 echo "${ECHO_T}$ac_cv_search_nanosleep" >&6
4456 if test "$ac_cv_search_nanosleep" != no; then
4457 test "$ac_cv_search_nanosleep" = "none required" || LIBS="$ac_cv_search_nanosleep $LIBS"
4459 cat >>confdefs.h <<\_ACEOF
4460 #define HAVE_NANOSLEEP 1
4461 _ACEOF
4463 else
4464 LIBEXTRAOBJ="$LIBEXTRAOBJ sleep.o"
4465 EXTRAOBJ="$EXTRAOBJ lib/sleep.o"
4469 echo "$as_me:$LINENO: checking for syslog" >&5
4470 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
4472 cat >conftest.$ac_ext <<_ACEOF
4473 /* confdefs.h. */
4474 _ACEOF
4475 cat confdefs.h >>conftest.$ac_ext
4476 cat >>conftest.$ac_ext <<_ACEOF
4477 /* end confdefs.h. */
4478 #include <syslog.h>
4480 main ()
4482 syslog(0, "%s", "test");
4484 return 0;
4486 _ACEOF
4487 rm -f conftest.$ac_objext conftest$ac_exeext
4488 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4489 (eval $ac_link) 2>conftest.er1
4490 ac_status=$?
4491 grep -v '^ *+' conftest.er1 >conftest.err
4492 rm -f conftest.er1
4493 cat conftest.err >&5
4494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4495 (exit $ac_status); } &&
4496 { ac_try='test -z "$ac_c_werror_flag"
4497 || test ! -s conftest.err'
4498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4499 (eval $ac_try) 2>&5
4500 ac_status=$?
4501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4502 (exit $ac_status); }; } &&
4503 { ac_try='test -s conftest$ac_exeext'
4504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4505 (eval $ac_try) 2>&5
4506 ac_status=$?
4507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4508 (exit $ac_status); }; }; then
4509 echo "$as_me:$LINENO: result: yes" >&5
4510 echo "${ECHO_T}yes" >&6
4511 else
4512 echo "$as_me: failed program was:" >&5
4513 sed 's/^/| /' conftest.$ac_ext >&5
4516 echo "$as_me:$LINENO: checking for std_syslog in -lsocket" >&5
4517 echo $ECHO_N "checking for std_syslog in -lsocket... $ECHO_C" >&6
4518 if test "${ac_cv_lib_socket_std_syslog+set}" = set; then
4519 echo $ECHO_N "(cached) $ECHO_C" >&6
4520 else
4521 ac_check_lib_save_LIBS=$LIBS
4522 LIBS="-lsocket $LIBS"
4523 cat >conftest.$ac_ext <<_ACEOF
4524 /* confdefs.h. */
4525 _ACEOF
4526 cat confdefs.h >>conftest.$ac_ext
4527 cat >>conftest.$ac_ext <<_ACEOF
4528 /* end confdefs.h. */
4530 /* Override any gcc2 internal prototype to avoid an error. */
4531 #ifdef __cplusplus
4532 extern "C"
4533 #endif
4534 /* We use char because int might match the return type of a gcc2
4535 builtin and then its argument prototype would still apply. */
4536 char std_syslog ();
4538 main ()
4540 std_syslog ();
4542 return 0;
4544 _ACEOF
4545 rm -f conftest.$ac_objext conftest$ac_exeext
4546 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4547 (eval $ac_link) 2>conftest.er1
4548 ac_status=$?
4549 grep -v '^ *+' conftest.er1 >conftest.err
4550 rm -f conftest.er1
4551 cat conftest.err >&5
4552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4553 (exit $ac_status); } &&
4554 { ac_try='test -z "$ac_c_werror_flag"
4555 || test ! -s conftest.err'
4556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4557 (eval $ac_try) 2>&5
4558 ac_status=$?
4559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4560 (exit $ac_status); }; } &&
4561 { ac_try='test -s conftest$ac_exeext'
4562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4563 (eval $ac_try) 2>&5
4564 ac_status=$?
4565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4566 (exit $ac_status); }; }; then
4567 ac_cv_lib_socket_std_syslog=yes
4568 else
4569 echo "$as_me: failed program was:" >&5
4570 sed 's/^/| /' conftest.$ac_ext >&5
4572 ac_cv_lib_socket_std_syslog=no
4574 rm -f conftest.err conftest.$ac_objext \
4575 conftest$ac_exeext conftest.$ac_ext
4576 LIBS=$ac_check_lib_save_LIBS
4578 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_std_syslog" >&5
4579 echo "${ECHO_T}$ac_cv_lib_socket_std_syslog" >&6
4580 if test $ac_cv_lib_socket_std_syslog = yes; then
4581 cat >>confdefs.h <<_ACEOF
4582 #define HAVE_LIBSOCKET 1
4583 _ACEOF
4585 LIBS="-lsocket $LIBS"
4587 else
4588 { { echo "$as_me:$LINENO: error: cannot find required function." >&5
4589 echo "$as_me: error: cannot find required function." >&2;}
4590 { (exit 1); exit 1; }; }
4593 cat >conftest.$ac_ext <<_ACEOF
4594 /* confdefs.h. */
4595 _ACEOF
4596 cat confdefs.h >>conftest.$ac_ext
4597 cat >>conftest.$ac_ext <<_ACEOF
4598 /* end confdefs.h. */
4599 #include <syslog.h>
4601 main ()
4603 syslog(0, "%s", "test");
4605 return 0;
4607 _ACEOF
4608 rm -f conftest.$ac_objext conftest$ac_exeext
4609 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4610 (eval $ac_link) 2>conftest.er1
4611 ac_status=$?
4612 grep -v '^ *+' conftest.er1 >conftest.err
4613 rm -f conftest.er1
4614 cat conftest.err >&5
4615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4616 (exit $ac_status); } &&
4617 { ac_try='test -z "$ac_c_werror_flag"
4618 || test ! -s conftest.err'
4619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4620 (eval $ac_try) 2>&5
4621 ac_status=$?
4622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4623 (exit $ac_status); }; } &&
4624 { ac_try='test -s conftest$ac_exeext'
4625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4626 (eval $ac_try) 2>&5
4627 ac_status=$?
4628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4629 (exit $ac_status); }; }; then
4630 echo "$as_me:$LINENO: result: yes" >&5
4631 echo "${ECHO_T}yes" >&6
4632 else
4633 echo "$as_me: failed program was:" >&5
4634 sed 's/^/| /' conftest.$ac_ext >&5
4636 { { echo "$as_me:$LINENO: error: cannot find required function." >&5
4637 echo "$as_me: error: cannot find required function." >&2;}
4638 { (exit 1); exit 1; }; }
4640 rm -f conftest.err conftest.$ac_objext \
4641 conftest$ac_exeext conftest.$ac_ext
4644 rm -f conftest.err conftest.$ac_objext \
4645 conftest$ac_exeext conftest.$ac_ext
4648 for ac_func in strftime
4650 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4651 echo "$as_me:$LINENO: checking for $ac_func" >&5
4652 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4653 if eval "test \"\${$as_ac_var+set}\" = set"; then
4654 echo $ECHO_N "(cached) $ECHO_C" >&6
4655 else
4656 cat >conftest.$ac_ext <<_ACEOF
4657 /* confdefs.h. */
4658 _ACEOF
4659 cat confdefs.h >>conftest.$ac_ext
4660 cat >>conftest.$ac_ext <<_ACEOF
4661 /* end confdefs.h. */
4662 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4663 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4664 #define $ac_func innocuous_$ac_func
4666 /* System header to define __stub macros and hopefully few prototypes,
4667 which can conflict with char $ac_func (); below.
4668 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4669 <limits.h> exists even on freestanding compilers. */
4671 #ifdef __STDC__
4672 # include <limits.h>
4673 #else
4674 # include <assert.h>
4675 #endif
4677 #undef $ac_func
4679 /* Override any gcc2 internal prototype to avoid an error. */
4680 #ifdef __cplusplus
4681 extern "C"
4683 #endif
4684 /* We use char because int might match the return type of a gcc2
4685 builtin and then its argument prototype would still apply. */
4686 char $ac_func ();
4687 /* The GNU C library defines this for functions which it implements
4688 to always fail with ENOSYS. Some functions are actually named
4689 something starting with __ and the normal name is an alias. */
4690 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4691 choke me
4692 #else
4693 char (*f) () = $ac_func;
4694 #endif
4695 #ifdef __cplusplus
4697 #endif
4700 main ()
4702 return f != $ac_func;
4704 return 0;
4706 _ACEOF
4707 rm -f conftest.$ac_objext conftest$ac_exeext
4708 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4709 (eval $ac_link) 2>conftest.er1
4710 ac_status=$?
4711 grep -v '^ *+' conftest.er1 >conftest.err
4712 rm -f conftest.er1
4713 cat conftest.err >&5
4714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4715 (exit $ac_status); } &&
4716 { ac_try='test -z "$ac_c_werror_flag"
4717 || test ! -s conftest.err'
4718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4719 (eval $ac_try) 2>&5
4720 ac_status=$?
4721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4722 (exit $ac_status); }; } &&
4723 { ac_try='test -s conftest$ac_exeext'
4724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4725 (eval $ac_try) 2>&5
4726 ac_status=$?
4727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4728 (exit $ac_status); }; }; then
4729 eval "$as_ac_var=yes"
4730 else
4731 echo "$as_me: failed program was:" >&5
4732 sed 's/^/| /' conftest.$ac_ext >&5
4734 eval "$as_ac_var=no"
4736 rm -f conftest.err conftest.$ac_objext \
4737 conftest$ac_exeext conftest.$ac_ext
4739 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4740 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4741 if test `eval echo '${'$as_ac_var'}'` = yes; then
4742 cat >>confdefs.h <<_ACEOF
4743 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4744 _ACEOF
4746 else
4747 # strftime is in -lintl on SCO UNIX.
4748 echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
4749 echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
4750 if test "${ac_cv_lib_intl_strftime+set}" = set; then
4751 echo $ECHO_N "(cached) $ECHO_C" >&6
4752 else
4753 ac_check_lib_save_LIBS=$LIBS
4754 LIBS="-lintl $LIBS"
4755 cat >conftest.$ac_ext <<_ACEOF
4756 /* confdefs.h. */
4757 _ACEOF
4758 cat confdefs.h >>conftest.$ac_ext
4759 cat >>conftest.$ac_ext <<_ACEOF
4760 /* end confdefs.h. */
4762 /* Override any gcc2 internal prototype to avoid an error. */
4763 #ifdef __cplusplus
4764 extern "C"
4765 #endif
4766 /* We use char because int might match the return type of a gcc2
4767 builtin and then its argument prototype would still apply. */
4768 char strftime ();
4770 main ()
4772 strftime ();
4774 return 0;
4776 _ACEOF
4777 rm -f conftest.$ac_objext conftest$ac_exeext
4778 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4779 (eval $ac_link) 2>conftest.er1
4780 ac_status=$?
4781 grep -v '^ *+' conftest.er1 >conftest.err
4782 rm -f conftest.er1
4783 cat conftest.err >&5
4784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4785 (exit $ac_status); } &&
4786 { ac_try='test -z "$ac_c_werror_flag"
4787 || test ! -s conftest.err'
4788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4789 (eval $ac_try) 2>&5
4790 ac_status=$?
4791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4792 (exit $ac_status); }; } &&
4793 { ac_try='test -s conftest$ac_exeext'
4794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4795 (eval $ac_try) 2>&5
4796 ac_status=$?
4797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4798 (exit $ac_status); }; }; then
4799 ac_cv_lib_intl_strftime=yes
4800 else
4801 echo "$as_me: failed program was:" >&5
4802 sed 's/^/| /' conftest.$ac_ext >&5
4804 ac_cv_lib_intl_strftime=no
4806 rm -f conftest.err conftest.$ac_objext \
4807 conftest$ac_exeext conftest.$ac_ext
4808 LIBS=$ac_check_lib_save_LIBS
4810 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
4811 echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
4812 if test $ac_cv_lib_intl_strftime = yes; then
4813 cat >>confdefs.h <<\_ACEOF
4814 #define HAVE_STRFTIME 1
4815 _ACEOF
4817 LIBS="-lintl $LIBS"
4821 done
4822 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
4823 echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
4824 if test "${ac_cv_func_setpgrp_void+set}" = set; then
4825 echo $ECHO_N "(cached) $ECHO_C" >&6
4826 else
4827 if test "$cross_compiling" = yes; then
4828 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
4829 echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
4830 { (exit 1); exit 1; }; }
4831 else
4832 cat >conftest.$ac_ext <<_ACEOF
4833 /* confdefs.h. */
4834 _ACEOF
4835 cat confdefs.h >>conftest.$ac_ext
4836 cat >>conftest.$ac_ext <<_ACEOF
4837 /* end confdefs.h. */
4838 #if HAVE_UNISTD_H
4839 # include <unistd.h>
4840 #endif
4843 main ()
4845 /* If this system has a BSD-style setpgrp which takes arguments,
4846 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
4847 exit successfully. */
4848 exit (setpgrp (1,1) == -1 ? 0 : 1);
4850 return 0;
4852 _ACEOF
4853 rm -f conftest$ac_exeext
4854 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4855 (eval $ac_link) 2>&5
4856 ac_status=$?
4857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4858 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4860 (eval $ac_try) 2>&5
4861 ac_status=$?
4862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4863 (exit $ac_status); }; }; then
4864 ac_cv_func_setpgrp_void=no
4865 else
4866 echo "$as_me: program exited with status $ac_status" >&5
4867 echo "$as_me: failed program was:" >&5
4868 sed 's/^/| /' conftest.$ac_ext >&5
4870 ( exit $ac_status )
4871 ac_cv_func_setpgrp_void=yes
4873 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4876 echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
4877 echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
4878 if test $ac_cv_func_setpgrp_void = yes; then
4880 cat >>confdefs.h <<\_ACEOF
4881 #define SETPGRP_VOID 1
4882 _ACEOF
4886 # Under sysV68, socket and friends are provided by the C library.
4887 # -linet does not provide socket, but causes multiple definition
4888 # errors at link-time. It is thus better to only use the C library.
4889 # So don't add -linet to the link list unless it's necessary
4891 # With Solaris socket and friends seem not to be in C library.
4892 # I hope that if socket is found, all the BSD friends are in the same library
4894 # - RF
4896 echo "$as_me:$LINENO: checking for library containing socket" >&5
4897 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
4898 if test "${ac_cv_search_socket+set}" = set; then
4899 echo $ECHO_N "(cached) $ECHO_C" >&6
4900 else
4901 ac_func_search_save_LIBS=$LIBS
4902 ac_cv_search_socket=no
4903 cat >conftest.$ac_ext <<_ACEOF
4904 /* confdefs.h. */
4905 _ACEOF
4906 cat confdefs.h >>conftest.$ac_ext
4907 cat >>conftest.$ac_ext <<_ACEOF
4908 /* end confdefs.h. */
4910 /* Override any gcc2 internal prototype to avoid an error. */
4911 #ifdef __cplusplus
4912 extern "C"
4913 #endif
4914 /* We use char because int might match the return type of a gcc2
4915 builtin and then its argument prototype would still apply. */
4916 char socket ();
4918 main ()
4920 socket ();
4922 return 0;
4924 _ACEOF
4925 rm -f conftest.$ac_objext conftest$ac_exeext
4926 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4927 (eval $ac_link) 2>conftest.er1
4928 ac_status=$?
4929 grep -v '^ *+' conftest.er1 >conftest.err
4930 rm -f conftest.er1
4931 cat conftest.err >&5
4932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4933 (exit $ac_status); } &&
4934 { ac_try='test -z "$ac_c_werror_flag"
4935 || test ! -s conftest.err'
4936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4937 (eval $ac_try) 2>&5
4938 ac_status=$?
4939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4940 (exit $ac_status); }; } &&
4941 { ac_try='test -s conftest$ac_exeext'
4942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4943 (eval $ac_try) 2>&5
4944 ac_status=$?
4945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4946 (exit $ac_status); }; }; then
4947 ac_cv_search_socket="none required"
4948 else
4949 echo "$as_me: failed program was:" >&5
4950 sed 's/^/| /' conftest.$ac_ext >&5
4953 rm -f conftest.err conftest.$ac_objext \
4954 conftest$ac_exeext conftest.$ac_ext
4955 if test "$ac_cv_search_socket" = no; then
4956 for ac_lib in xnet socket inet; do
4957 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4958 cat >conftest.$ac_ext <<_ACEOF
4959 /* confdefs.h. */
4960 _ACEOF
4961 cat confdefs.h >>conftest.$ac_ext
4962 cat >>conftest.$ac_ext <<_ACEOF
4963 /* end confdefs.h. */
4965 /* Override any gcc2 internal prototype to avoid an error. */
4966 #ifdef __cplusplus
4967 extern "C"
4968 #endif
4969 /* We use char because int might match the return type of a gcc2
4970 builtin and then its argument prototype would still apply. */
4971 char socket ();
4973 main ()
4975 socket ();
4977 return 0;
4979 _ACEOF
4980 rm -f conftest.$ac_objext conftest$ac_exeext
4981 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4982 (eval $ac_link) 2>conftest.er1
4983 ac_status=$?
4984 grep -v '^ *+' conftest.er1 >conftest.err
4985 rm -f conftest.er1
4986 cat conftest.err >&5
4987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4988 (exit $ac_status); } &&
4989 { ac_try='test -z "$ac_c_werror_flag"
4990 || test ! -s conftest.err'
4991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4992 (eval $ac_try) 2>&5
4993 ac_status=$?
4994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4995 (exit $ac_status); }; } &&
4996 { ac_try='test -s conftest$ac_exeext'
4997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4998 (eval $ac_try) 2>&5
4999 ac_status=$?
5000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5001 (exit $ac_status); }; }; then
5002 ac_cv_search_socket="-l$ac_lib"
5003 break
5004 else
5005 echo "$as_me: failed program was:" >&5
5006 sed 's/^/| /' conftest.$ac_ext >&5
5009 rm -f conftest.err conftest.$ac_objext \
5010 conftest$ac_exeext conftest.$ac_ext
5011 done
5013 LIBS=$ac_func_search_save_LIBS
5015 echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
5016 echo "${ECHO_T}$ac_cv_search_socket" >&6
5017 if test "$ac_cv_search_socket" != no; then
5018 test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
5022 echo "$as_me:$LINENO: checking for library containing gethostname" >&5
5023 echo $ECHO_N "checking for library containing gethostname... $ECHO_C" >&6
5024 if test "${ac_cv_search_gethostname+set}" = set; then
5025 echo $ECHO_N "(cached) $ECHO_C" >&6
5026 else
5027 ac_func_search_save_LIBS=$LIBS
5028 ac_cv_search_gethostname=no
5029 cat >conftest.$ac_ext <<_ACEOF
5030 /* confdefs.h. */
5031 _ACEOF
5032 cat confdefs.h >>conftest.$ac_ext
5033 cat >>conftest.$ac_ext <<_ACEOF
5034 /* end confdefs.h. */
5036 /* Override any gcc2 internal prototype to avoid an error. */
5037 #ifdef __cplusplus
5038 extern "C"
5039 #endif
5040 /* We use char because int might match the return type of a gcc2
5041 builtin and then its argument prototype would still apply. */
5042 char gethostname ();
5044 main ()
5046 gethostname ();
5048 return 0;
5050 _ACEOF
5051 rm -f conftest.$ac_objext conftest$ac_exeext
5052 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5053 (eval $ac_link) 2>conftest.er1
5054 ac_status=$?
5055 grep -v '^ *+' conftest.er1 >conftest.err
5056 rm -f conftest.er1
5057 cat conftest.err >&5
5058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5059 (exit $ac_status); } &&
5060 { ac_try='test -z "$ac_c_werror_flag"
5061 || test ! -s conftest.err'
5062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5063 (eval $ac_try) 2>&5
5064 ac_status=$?
5065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5066 (exit $ac_status); }; } &&
5067 { ac_try='test -s conftest$ac_exeext'
5068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5069 (eval $ac_try) 2>&5
5070 ac_status=$?
5071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072 (exit $ac_status); }; }; then
5073 ac_cv_search_gethostname="none required"
5074 else
5075 echo "$as_me: failed program was:" >&5
5076 sed 's/^/| /' conftest.$ac_ext >&5
5079 rm -f conftest.err conftest.$ac_objext \
5080 conftest$ac_exeext conftest.$ac_ext
5081 if test "$ac_cv_search_gethostname" = no; then
5082 for ac_lib in xnet socket inet; do
5083 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5084 cat >conftest.$ac_ext <<_ACEOF
5085 /* confdefs.h. */
5086 _ACEOF
5087 cat confdefs.h >>conftest.$ac_ext
5088 cat >>conftest.$ac_ext <<_ACEOF
5089 /* end confdefs.h. */
5091 /* Override any gcc2 internal prototype to avoid an error. */
5092 #ifdef __cplusplus
5093 extern "C"
5094 #endif
5095 /* We use char because int might match the return type of a gcc2
5096 builtin and then its argument prototype would still apply. */
5097 char gethostname ();
5099 main ()
5101 gethostname ();
5103 return 0;
5105 _ACEOF
5106 rm -f conftest.$ac_objext conftest$ac_exeext
5107 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5108 (eval $ac_link) 2>conftest.er1
5109 ac_status=$?
5110 grep -v '^ *+' conftest.er1 >conftest.err
5111 rm -f conftest.er1
5112 cat conftest.err >&5
5113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5114 (exit $ac_status); } &&
5115 { ac_try='test -z "$ac_c_werror_flag"
5116 || test ! -s conftest.err'
5117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5118 (eval $ac_try) 2>&5
5119 ac_status=$?
5120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5121 (exit $ac_status); }; } &&
5122 { ac_try='test -s conftest$ac_exeext'
5123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5124 (eval $ac_try) 2>&5
5125 ac_status=$?
5126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5127 (exit $ac_status); }; }; then
5128 ac_cv_search_gethostname="-l$ac_lib"
5129 break
5130 else
5131 echo "$as_me: failed program was:" >&5
5132 sed 's/^/| /' conftest.$ac_ext >&5
5135 rm -f conftest.err conftest.$ac_objext \
5136 conftest$ac_exeext conftest.$ac_ext
5137 done
5139 LIBS=$ac_func_search_save_LIBS
5141 echo "$as_me:$LINENO: result: $ac_cv_search_gethostname" >&5
5142 echo "${ECHO_T}$ac_cv_search_gethostname" >&6
5143 if test "$ac_cv_search_gethostname" != no; then
5144 test "$ac_cv_search_gethostname" = "none required" || LIBS="$ac_cv_search_gethostname $LIBS"
5148 echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
5149 echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
5150 if test "${ac_cv_search_gethostbyname+set}" = set; then
5151 echo $ECHO_N "(cached) $ECHO_C" >&6
5152 else
5153 ac_func_search_save_LIBS=$LIBS
5154 ac_cv_search_gethostbyname=no
5155 cat >conftest.$ac_ext <<_ACEOF
5156 /* confdefs.h. */
5157 _ACEOF
5158 cat confdefs.h >>conftest.$ac_ext
5159 cat >>conftest.$ac_ext <<_ACEOF
5160 /* end confdefs.h. */
5162 /* Override any gcc2 internal prototype to avoid an error. */
5163 #ifdef __cplusplus
5164 extern "C"
5165 #endif
5166 /* We use char because int might match the return type of a gcc2
5167 builtin and then its argument prototype would still apply. */
5168 char gethostbyname ();
5170 main ()
5172 gethostbyname ();
5174 return 0;
5176 _ACEOF
5177 rm -f conftest.$ac_objext conftest$ac_exeext
5178 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5179 (eval $ac_link) 2>conftest.er1
5180 ac_status=$?
5181 grep -v '^ *+' conftest.er1 >conftest.err
5182 rm -f conftest.er1
5183 cat conftest.err >&5
5184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5185 (exit $ac_status); } &&
5186 { ac_try='test -z "$ac_c_werror_flag"
5187 || test ! -s conftest.err'
5188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5189 (eval $ac_try) 2>&5
5190 ac_status=$?
5191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5192 (exit $ac_status); }; } &&
5193 { ac_try='test -s conftest$ac_exeext'
5194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5195 (eval $ac_try) 2>&5
5196 ac_status=$?
5197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5198 (exit $ac_status); }; }; then
5199 ac_cv_search_gethostbyname="none required"
5200 else
5201 echo "$as_me: failed program was:" >&5
5202 sed 's/^/| /' conftest.$ac_ext >&5
5205 rm -f conftest.err conftest.$ac_objext \
5206 conftest$ac_exeext conftest.$ac_ext
5207 if test "$ac_cv_search_gethostbyname" = no; then
5208 for ac_lib in nsl resolv; do
5209 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5210 cat >conftest.$ac_ext <<_ACEOF
5211 /* confdefs.h. */
5212 _ACEOF
5213 cat confdefs.h >>conftest.$ac_ext
5214 cat >>conftest.$ac_ext <<_ACEOF
5215 /* end confdefs.h. */
5217 /* Override any gcc2 internal prototype to avoid an error. */
5218 #ifdef __cplusplus
5219 extern "C"
5220 #endif
5221 /* We use char because int might match the return type of a gcc2
5222 builtin and then its argument prototype would still apply. */
5223 char gethostbyname ();
5225 main ()
5227 gethostbyname ();
5229 return 0;
5231 _ACEOF
5232 rm -f conftest.$ac_objext conftest$ac_exeext
5233 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5234 (eval $ac_link) 2>conftest.er1
5235 ac_status=$?
5236 grep -v '^ *+' conftest.er1 >conftest.err
5237 rm -f conftest.er1
5238 cat conftest.err >&5
5239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5240 (exit $ac_status); } &&
5241 { ac_try='test -z "$ac_c_werror_flag"
5242 || test ! -s conftest.err'
5243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5244 (eval $ac_try) 2>&5
5245 ac_status=$?
5246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5247 (exit $ac_status); }; } &&
5248 { ac_try='test -s conftest$ac_exeext'
5249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5250 (eval $ac_try) 2>&5
5251 ac_status=$?
5252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5253 (exit $ac_status); }; }; then
5254 ac_cv_search_gethostbyname="-l$ac_lib"
5255 break
5256 else
5257 echo "$as_me: failed program was:" >&5
5258 sed 's/^/| /' conftest.$ac_ext >&5
5261 rm -f conftest.err conftest.$ac_objext \
5262 conftest$ac_exeext conftest.$ac_ext
5263 done
5265 LIBS=$ac_func_search_save_LIBS
5267 echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
5268 echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
5269 if test "$ac_cv_search_gethostbyname" != no; then
5270 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
5274 echo "$as_me:$LINENO: checking for library containing gethostbyname_r" >&5
5275 echo $ECHO_N "checking for library containing gethostbyname_r... $ECHO_C" >&6
5276 if test "${ac_cv_search_gethostbyname_r+set}" = set; then
5277 echo $ECHO_N "(cached) $ECHO_C" >&6
5278 else
5279 ac_func_search_save_LIBS=$LIBS
5280 ac_cv_search_gethostbyname_r=no
5281 cat >conftest.$ac_ext <<_ACEOF
5282 /* confdefs.h. */
5283 _ACEOF
5284 cat confdefs.h >>conftest.$ac_ext
5285 cat >>conftest.$ac_ext <<_ACEOF
5286 /* end confdefs.h. */
5288 /* Override any gcc2 internal prototype to avoid an error. */
5289 #ifdef __cplusplus
5290 extern "C"
5291 #endif
5292 /* We use char because int might match the return type of a gcc2
5293 builtin and then its argument prototype would still apply. */
5294 char gethostbyname_r ();
5296 main ()
5298 gethostbyname_r ();
5300 return 0;
5302 _ACEOF
5303 rm -f conftest.$ac_objext conftest$ac_exeext
5304 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5305 (eval $ac_link) 2>conftest.er1
5306 ac_status=$?
5307 grep -v '^ *+' conftest.er1 >conftest.err
5308 rm -f conftest.er1
5309 cat conftest.err >&5
5310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5311 (exit $ac_status); } &&
5312 { ac_try='test -z "$ac_c_werror_flag"
5313 || test ! -s conftest.err'
5314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5315 (eval $ac_try) 2>&5
5316 ac_status=$?
5317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5318 (exit $ac_status); }; } &&
5319 { ac_try='test -s conftest$ac_exeext'
5320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5321 (eval $ac_try) 2>&5
5322 ac_status=$?
5323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5324 (exit $ac_status); }; }; then
5325 ac_cv_search_gethostbyname_r="none required"
5326 else
5327 echo "$as_me: failed program was:" >&5
5328 sed 's/^/| /' conftest.$ac_ext >&5
5331 rm -f conftest.err conftest.$ac_objext \
5332 conftest$ac_exeext conftest.$ac_ext
5333 if test "$ac_cv_search_gethostbyname_r" = no; then
5334 for ac_lib in nsl resolv; do
5335 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5336 cat >conftest.$ac_ext <<_ACEOF
5337 /* confdefs.h. */
5338 _ACEOF
5339 cat confdefs.h >>conftest.$ac_ext
5340 cat >>conftest.$ac_ext <<_ACEOF
5341 /* end confdefs.h. */
5343 /* Override any gcc2 internal prototype to avoid an error. */
5344 #ifdef __cplusplus
5345 extern "C"
5346 #endif
5347 /* We use char because int might match the return type of a gcc2
5348 builtin and then its argument prototype would still apply. */
5349 char gethostbyname_r ();
5351 main ()
5353 gethostbyname_r ();
5355 return 0;
5357 _ACEOF
5358 rm -f conftest.$ac_objext conftest$ac_exeext
5359 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5360 (eval $ac_link) 2>conftest.er1
5361 ac_status=$?
5362 grep -v '^ *+' conftest.er1 >conftest.err
5363 rm -f conftest.er1
5364 cat conftest.err >&5
5365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5366 (exit $ac_status); } &&
5367 { ac_try='test -z "$ac_c_werror_flag"
5368 || test ! -s conftest.err'
5369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5370 (eval $ac_try) 2>&5
5371 ac_status=$?
5372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5373 (exit $ac_status); }; } &&
5374 { ac_try='test -s conftest$ac_exeext'
5375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5376 (eval $ac_try) 2>&5
5377 ac_status=$?
5378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5379 (exit $ac_status); }; }; then
5380 ac_cv_search_gethostbyname_r="-l$ac_lib"
5381 break
5382 else
5383 echo "$as_me: failed program was:" >&5
5384 sed 's/^/| /' conftest.$ac_ext >&5
5387 rm -f conftest.err conftest.$ac_objext \
5388 conftest$ac_exeext conftest.$ac_ext
5389 done
5391 LIBS=$ac_func_search_save_LIBS
5393 echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname_r" >&5
5394 echo "${ECHO_T}$ac_cv_search_gethostbyname_r" >&6
5395 if test "$ac_cv_search_gethostbyname_r" != no; then
5396 test "$ac_cv_search_gethostbyname_r" = "none required" || LIBS="$ac_cv_search_gethostbyname_r $LIBS"
5401 echo "$as_me:$LINENO: checking for socklen_t" >&5
5402 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
5403 if test "${ba_cv_header_socklen_t+set}" = set; then
5404 echo $ECHO_N "(cached) $ECHO_C" >&6
5405 else
5406 cat >conftest.$ac_ext <<_ACEOF
5407 /* confdefs.h. */
5408 _ACEOF
5409 cat confdefs.h >>conftest.$ac_ext
5410 cat >>conftest.$ac_ext <<_ACEOF
5411 /* end confdefs.h. */
5413 #include <sys/types.h>
5414 #include <sys/socket.h>
5416 main ()
5418 socklen_t x
5420 return 0;
5422 _ACEOF
5423 rm -f conftest.$ac_objext
5424 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5425 (eval $ac_compile) 2>conftest.er1
5426 ac_status=$?
5427 grep -v '^ *+' conftest.er1 >conftest.err
5428 rm -f conftest.er1
5429 cat conftest.err >&5
5430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5431 (exit $ac_status); } &&
5432 { ac_try='test -z "$ac_c_werror_flag"
5433 || test ! -s conftest.err'
5434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5435 (eval $ac_try) 2>&5
5436 ac_status=$?
5437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5438 (exit $ac_status); }; } &&
5439 { ac_try='test -s conftest.$ac_objext'
5440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5441 (eval $ac_try) 2>&5
5442 ac_status=$?
5443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5444 (exit $ac_status); }; }; then
5445 ba_cv_header_socklen_t=yes
5446 else
5447 echo "$as_me: failed program was:" >&5
5448 sed 's/^/| /' conftest.$ac_ext >&5
5450 ba_cv_header_socklen_t=no
5452 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5454 echo "$as_me:$LINENO: result: $ba_cv_header_socklen_t" >&5
5455 echo "${ECHO_T}$ba_cv_header_socklen_t" >&6
5456 test $ba_cv_header_socklen_t = yes && cat >>confdefs.h <<\_ACEOF
5457 #define HAVE_SOCKLEN_T 1
5458 _ACEOF
5461 # The condition in this test copes with the presence of inet_addr in libc6.
5462 echo "$as_me:$LINENO: checking for library containing inet_addr" >&5
5463 echo $ECHO_N "checking for library containing inet_addr... $ECHO_C" >&6
5464 if test "${ac_cv_search_inet_addr+set}" = set; then
5465 echo $ECHO_N "(cached) $ECHO_C" >&6
5466 else
5467 ac_func_search_save_LIBS=$LIBS
5468 ac_cv_search_inet_addr=no
5469 cat >conftest.$ac_ext <<_ACEOF
5470 /* confdefs.h. */
5471 _ACEOF
5472 cat confdefs.h >>conftest.$ac_ext
5473 cat >>conftest.$ac_ext <<_ACEOF
5474 /* end confdefs.h. */
5476 /* Override any gcc2 internal prototype to avoid an error. */
5477 #ifdef __cplusplus
5478 extern "C"
5479 #endif
5480 /* We use char because int might match the return type of a gcc2
5481 builtin and then its argument prototype would still apply. */
5482 char inet_addr ();
5484 main ()
5486 inet_addr ();
5488 return 0;
5490 _ACEOF
5491 rm -f conftest.$ac_objext conftest$ac_exeext
5492 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5493 (eval $ac_link) 2>conftest.er1
5494 ac_status=$?
5495 grep -v '^ *+' conftest.er1 >conftest.err
5496 rm -f conftest.er1
5497 cat conftest.err >&5
5498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5499 (exit $ac_status); } &&
5500 { ac_try='test -z "$ac_c_werror_flag"
5501 || test ! -s conftest.err'
5502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5503 (eval $ac_try) 2>&5
5504 ac_status=$?
5505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5506 (exit $ac_status); }; } &&
5507 { ac_try='test -s conftest$ac_exeext'
5508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5509 (eval $ac_try) 2>&5
5510 ac_status=$?
5511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5512 (exit $ac_status); }; }; then
5513 ac_cv_search_inet_addr="none required"
5514 else
5515 echo "$as_me: failed program was:" >&5
5516 sed 's/^/| /' conftest.$ac_ext >&5
5519 rm -f conftest.err conftest.$ac_objext \
5520 conftest$ac_exeext conftest.$ac_ext
5521 if test "$ac_cv_search_inet_addr" = no; then
5522 for ac_lib in nsl; do
5523 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5524 cat >conftest.$ac_ext <<_ACEOF
5525 /* confdefs.h. */
5526 _ACEOF
5527 cat confdefs.h >>conftest.$ac_ext
5528 cat >>conftest.$ac_ext <<_ACEOF
5529 /* end confdefs.h. */
5531 /* Override any gcc2 internal prototype to avoid an error. */
5532 #ifdef __cplusplus
5533 extern "C"
5534 #endif
5535 /* We use char because int might match the return type of a gcc2
5536 builtin and then its argument prototype would still apply. */
5537 char inet_addr ();
5539 main ()
5541 inet_addr ();
5543 return 0;
5545 _ACEOF
5546 rm -f conftest.$ac_objext conftest$ac_exeext
5547 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5548 (eval $ac_link) 2>conftest.er1
5549 ac_status=$?
5550 grep -v '^ *+' conftest.er1 >conftest.err
5551 rm -f conftest.er1
5552 cat conftest.err >&5
5553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5554 (exit $ac_status); } &&
5555 { ac_try='test -z "$ac_c_werror_flag"
5556 || test ! -s conftest.err'
5557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5558 (eval $ac_try) 2>&5
5559 ac_status=$?
5560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5561 (exit $ac_status); }; } &&
5562 { ac_try='test -s conftest$ac_exeext'
5563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5564 (eval $ac_try) 2>&5
5565 ac_status=$?
5566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5567 (exit $ac_status); }; }; then
5568 ac_cv_search_inet_addr="-l$ac_lib"
5569 break
5570 else
5571 echo "$as_me: failed program was:" >&5
5572 sed 's/^/| /' conftest.$ac_ext >&5
5575 rm -f conftest.err conftest.$ac_objext \
5576 conftest$ac_exeext conftest.$ac_ext
5577 done
5579 LIBS=$ac_func_search_save_LIBS
5581 echo "$as_me:$LINENO: result: $ac_cv_search_inet_addr" >&5
5582 echo "${ECHO_T}$ac_cv_search_inet_addr" >&6
5583 if test "$ac_cv_search_inet_addr" != no; then
5584 test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
5589 echo "$as_me:$LINENO: checking for strchr" >&5
5590 echo $ECHO_N "checking for strchr... $ECHO_C" >&6
5591 if test "${ac_cv_func_strchr+set}" = set; then
5592 echo $ECHO_N "(cached) $ECHO_C" >&6
5593 else
5594 cat >conftest.$ac_ext <<_ACEOF
5595 /* confdefs.h. */
5596 _ACEOF
5597 cat confdefs.h >>conftest.$ac_ext
5598 cat >>conftest.$ac_ext <<_ACEOF
5599 /* end confdefs.h. */
5600 /* Define strchr to an innocuous variant, in case <limits.h> declares strchr.
5601 For example, HP-UX 11i <limits.h> declares gettimeofday. */
5602 #define strchr innocuous_strchr
5604 /* System header to define __stub macros and hopefully few prototypes,
5605 which can conflict with char strchr (); below.
5606 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5607 <limits.h> exists even on freestanding compilers. */
5609 #ifdef __STDC__
5610 # include <limits.h>
5611 #else
5612 # include <assert.h>
5613 #endif
5615 #undef strchr
5617 /* Override any gcc2 internal prototype to avoid an error. */
5618 #ifdef __cplusplus
5619 extern "C"
5621 #endif
5622 /* We use char because int might match the return type of a gcc2
5623 builtin and then its argument prototype would still apply. */
5624 char strchr ();
5625 /* The GNU C library defines this for functions which it implements
5626 to always fail with ENOSYS. Some functions are actually named
5627 something starting with __ and the normal name is an alias. */
5628 #if defined (__stub_strchr) || defined (__stub___strchr)
5629 choke me
5630 #else
5631 char (*f) () = strchr;
5632 #endif
5633 #ifdef __cplusplus
5635 #endif
5638 main ()
5640 return f != strchr;
5642 return 0;
5644 _ACEOF
5645 rm -f conftest.$ac_objext conftest$ac_exeext
5646 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5647 (eval $ac_link) 2>conftest.er1
5648 ac_status=$?
5649 grep -v '^ *+' conftest.er1 >conftest.err
5650 rm -f conftest.er1
5651 cat conftest.err >&5
5652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5653 (exit $ac_status); } &&
5654 { ac_try='test -z "$ac_c_werror_flag"
5655 || test ! -s conftest.err'
5656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5657 (eval $ac_try) 2>&5
5658 ac_status=$?
5659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5660 (exit $ac_status); }; } &&
5661 { ac_try='test -s conftest$ac_exeext'
5662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5663 (eval $ac_try) 2>&5
5664 ac_status=$?
5665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5666 (exit $ac_status); }; }; then
5667 ac_cv_func_strchr=yes
5668 else
5669 echo "$as_me: failed program was:" >&5
5670 sed 's/^/| /' conftest.$ac_ext >&5
5672 ac_cv_func_strchr=no
5674 rm -f conftest.err conftest.$ac_objext \
5675 conftest$ac_exeext conftest.$ac_ext
5677 echo "$as_me:$LINENO: result: $ac_cv_func_strchr" >&5
5678 echo "${ECHO_T}$ac_cv_func_strchr" >&6
5679 if test $ac_cv_func_strchr = yes; then
5680 echo "$as_me:$LINENO: result: using libc's strchr" >&5
5681 echo "${ECHO_T}using libc's strchr" >&6
5682 else
5683 echo "$as_me:$LINENO: checking for strchr in -lcposix" >&5
5684 echo $ECHO_N "checking for strchr in -lcposix... $ECHO_C" >&6
5685 if test "${ac_cv_lib_cposix_strchr+set}" = set; then
5686 echo $ECHO_N "(cached) $ECHO_C" >&6
5687 else
5688 ac_check_lib_save_LIBS=$LIBS
5689 LIBS="-lcposix $LIBS"
5690 cat >conftest.$ac_ext <<_ACEOF
5691 /* confdefs.h. */
5692 _ACEOF
5693 cat confdefs.h >>conftest.$ac_ext
5694 cat >>conftest.$ac_ext <<_ACEOF
5695 /* end confdefs.h. */
5697 /* Override any gcc2 internal prototype to avoid an error. */
5698 #ifdef __cplusplus
5699 extern "C"
5700 #endif
5701 /* We use char because int might match the return type of a gcc2
5702 builtin and then its argument prototype would still apply. */
5703 char strchr ();
5705 main ()
5707 strchr ();
5709 return 0;
5711 _ACEOF
5712 rm -f conftest.$ac_objext conftest$ac_exeext
5713 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5714 (eval $ac_link) 2>conftest.er1
5715 ac_status=$?
5716 grep -v '^ *+' conftest.er1 >conftest.err
5717 rm -f conftest.er1
5718 cat conftest.err >&5
5719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5720 (exit $ac_status); } &&
5721 { ac_try='test -z "$ac_c_werror_flag"
5722 || test ! -s conftest.err'
5723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5724 (eval $ac_try) 2>&5
5725 ac_status=$?
5726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5727 (exit $ac_status); }; } &&
5728 { ac_try='test -s conftest$ac_exeext'
5729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5730 (eval $ac_try) 2>&5
5731 ac_status=$?
5732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5733 (exit $ac_status); }; }; then
5734 ac_cv_lib_cposix_strchr=yes
5735 else
5736 echo "$as_me: failed program was:" >&5
5737 sed 's/^/| /' conftest.$ac_ext >&5
5739 ac_cv_lib_cposix_strchr=no
5741 rm -f conftest.err conftest.$ac_objext \
5742 conftest$ac_exeext conftest.$ac_ext
5743 LIBS=$ac_check_lib_save_LIBS
5745 echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strchr" >&5
5746 echo "${ECHO_T}$ac_cv_lib_cposix_strchr" >&6
5747 if test $ac_cv_lib_cposix_strchr = yes; then
5748 EXTRADEFS="$EXTRADEFS -D_SYSV3"
5749 LIBS="$LIBS -lcposix"
5755 echo "$as_me:$LINENO: checking for strstr" >&5
5756 echo $ECHO_N "checking for strstr... $ECHO_C" >&6
5757 if test "${ac_cv_func_strstr+set}" = set; then
5758 echo $ECHO_N "(cached) $ECHO_C" >&6
5759 else
5760 cat >conftest.$ac_ext <<_ACEOF
5761 /* confdefs.h. */
5762 _ACEOF
5763 cat confdefs.h >>conftest.$ac_ext
5764 cat >>conftest.$ac_ext <<_ACEOF
5765 /* end confdefs.h. */
5766 /* Define strstr to an innocuous variant, in case <limits.h> declares strstr.
5767 For example, HP-UX 11i <limits.h> declares gettimeofday. */
5768 #define strstr innocuous_strstr
5770 /* System header to define __stub macros and hopefully few prototypes,
5771 which can conflict with char strstr (); below.
5772 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5773 <limits.h> exists even on freestanding compilers. */
5775 #ifdef __STDC__
5776 # include <limits.h>
5777 #else
5778 # include <assert.h>
5779 #endif
5781 #undef strstr
5783 /* Override any gcc2 internal prototype to avoid an error. */
5784 #ifdef __cplusplus
5785 extern "C"
5787 #endif
5788 /* We use char because int might match the return type of a gcc2
5789 builtin and then its argument prototype would still apply. */
5790 char strstr ();
5791 /* The GNU C library defines this for functions which it implements
5792 to always fail with ENOSYS. Some functions are actually named
5793 something starting with __ and the normal name is an alias. */
5794 #if defined (__stub_strstr) || defined (__stub___strstr)
5795 choke me
5796 #else
5797 char (*f) () = strstr;
5798 #endif
5799 #ifdef __cplusplus
5801 #endif
5804 main ()
5806 return f != strstr;
5808 return 0;
5810 _ACEOF
5811 rm -f conftest.$ac_objext conftest$ac_exeext
5812 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5813 (eval $ac_link) 2>conftest.er1
5814 ac_status=$?
5815 grep -v '^ *+' conftest.er1 >conftest.err
5816 rm -f conftest.er1
5817 cat conftest.err >&5
5818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5819 (exit $ac_status); } &&
5820 { ac_try='test -z "$ac_c_werror_flag"
5821 || test ! -s conftest.err'
5822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5823 (eval $ac_try) 2>&5
5824 ac_status=$?
5825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826 (exit $ac_status); }; } &&
5827 { ac_try='test -s conftest$ac_exeext'
5828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5829 (eval $ac_try) 2>&5
5830 ac_status=$?
5831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5832 (exit $ac_status); }; }; then
5833 ac_cv_func_strstr=yes
5834 else
5835 echo "$as_me: failed program was:" >&5
5836 sed 's/^/| /' conftest.$ac_ext >&5
5838 ac_cv_func_strstr=no
5840 rm -f conftest.err conftest.$ac_objext \
5841 conftest$ac_exeext conftest.$ac_ext
5843 echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5
5844 echo "${ECHO_T}$ac_cv_func_strstr" >&6
5845 if test $ac_cv_func_strstr = yes; then
5846 cat >>confdefs.h <<\_ACEOF
5847 #define HAVE_STRSTR 1
5848 _ACEOF
5850 else
5851 LIBEXTRAOBJ="$LIBEXTRAOBJ strstr.o"
5852 EXTRAOBJ="$EXTRAOBJ lib/strstr.o"
5856 echo "$as_me:$LINENO: checking for strcasecmp" >&5
5857 echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6
5858 if test "${ac_cv_func_strcasecmp+set}" = set; then
5859 echo $ECHO_N "(cached) $ECHO_C" >&6
5860 else
5861 cat >conftest.$ac_ext <<_ACEOF
5862 /* confdefs.h. */
5863 _ACEOF
5864 cat confdefs.h >>conftest.$ac_ext
5865 cat >>conftest.$ac_ext <<_ACEOF
5866 /* end confdefs.h. */
5867 /* Define strcasecmp to an innocuous variant, in case <limits.h> declares strcasecmp.
5868 For example, HP-UX 11i <limits.h> declares gettimeofday. */
5869 #define strcasecmp innocuous_strcasecmp
5871 /* System header to define __stub macros and hopefully few prototypes,
5872 which can conflict with char strcasecmp (); below.
5873 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5874 <limits.h> exists even on freestanding compilers. */
5876 #ifdef __STDC__
5877 # include <limits.h>
5878 #else
5879 # include <assert.h>
5880 #endif
5882 #undef strcasecmp
5884 /* Override any gcc2 internal prototype to avoid an error. */
5885 #ifdef __cplusplus
5886 extern "C"
5888 #endif
5889 /* We use char because int might match the return type of a gcc2
5890 builtin and then its argument prototype would still apply. */
5891 char strcasecmp ();
5892 /* The GNU C library defines this for functions which it implements
5893 to always fail with ENOSYS. Some functions are actually named
5894 something starting with __ and the normal name is an alias. */
5895 #if defined (__stub_strcasecmp) || defined (__stub___strcasecmp)
5896 choke me
5897 #else
5898 char (*f) () = strcasecmp;
5899 #endif
5900 #ifdef __cplusplus
5902 #endif
5905 main ()
5907 return f != strcasecmp;
5909 return 0;
5911 _ACEOF
5912 rm -f conftest.$ac_objext conftest$ac_exeext
5913 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5914 (eval $ac_link) 2>conftest.er1
5915 ac_status=$?
5916 grep -v '^ *+' conftest.er1 >conftest.err
5917 rm -f conftest.er1
5918 cat conftest.err >&5
5919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5920 (exit $ac_status); } &&
5921 { ac_try='test -z "$ac_c_werror_flag"
5922 || test ! -s conftest.err'
5923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5924 (eval $ac_try) 2>&5
5925 ac_status=$?
5926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5927 (exit $ac_status); }; } &&
5928 { ac_try='test -s conftest$ac_exeext'
5929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5930 (eval $ac_try) 2>&5
5931 ac_status=$?
5932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5933 (exit $ac_status); }; }; then
5934 ac_cv_func_strcasecmp=yes
5935 else
5936 echo "$as_me: failed program was:" >&5
5937 sed 's/^/| /' conftest.$ac_ext >&5
5939 ac_cv_func_strcasecmp=no
5941 rm -f conftest.err conftest.$ac_objext \
5942 conftest$ac_exeext conftest.$ac_ext
5944 echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5
5945 echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6
5946 if test $ac_cv_func_strcasecmp = yes; then
5947 cat >>confdefs.h <<\_ACEOF
5948 #define HAVE_STRCASECMP 1
5949 _ACEOF
5951 else
5952 LIBEXTRAOBJ="$LIBEXTRAOBJ strcasecmp.o"
5953 EXTRAOBJ="$EXTRAOBJ lib/strcasecmp.o"
5957 echo "$as_me:$LINENO: checking for memmove" >&5
5958 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
5959 if test "${ac_cv_func_memmove+set}" = set; then
5960 echo $ECHO_N "(cached) $ECHO_C" >&6
5961 else
5962 cat >conftest.$ac_ext <<_ACEOF
5963 /* confdefs.h. */
5964 _ACEOF
5965 cat confdefs.h >>conftest.$ac_ext
5966 cat >>conftest.$ac_ext <<_ACEOF
5967 /* end confdefs.h. */
5968 /* Define memmove to an innocuous variant, in case <limits.h> declares memmove.
5969 For example, HP-UX 11i <limits.h> declares gettimeofday. */
5970 #define memmove innocuous_memmove
5972 /* System header to define __stub macros and hopefully few prototypes,
5973 which can conflict with char memmove (); below.
5974 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5975 <limits.h> exists even on freestanding compilers. */
5977 #ifdef __STDC__
5978 # include <limits.h>
5979 #else
5980 # include <assert.h>
5981 #endif
5983 #undef memmove
5985 /* Override any gcc2 internal prototype to avoid an error. */
5986 #ifdef __cplusplus
5987 extern "C"
5989 #endif
5990 /* We use char because int might match the return type of a gcc2
5991 builtin and then its argument prototype would still apply. */
5992 char memmove ();
5993 /* The GNU C library defines this for functions which it implements
5994 to always fail with ENOSYS. Some functions are actually named
5995 something starting with __ and the normal name is an alias. */
5996 #if defined (__stub_memmove) || defined (__stub___memmove)
5997 choke me
5998 #else
5999 char (*f) () = memmove;
6000 #endif
6001 #ifdef __cplusplus
6003 #endif
6006 main ()
6008 return f != memmove;
6010 return 0;
6012 _ACEOF
6013 rm -f conftest.$ac_objext conftest$ac_exeext
6014 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6015 (eval $ac_link) 2>conftest.er1
6016 ac_status=$?
6017 grep -v '^ *+' conftest.er1 >conftest.err
6018 rm -f conftest.er1
6019 cat conftest.err >&5
6020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6021 (exit $ac_status); } &&
6022 { ac_try='test -z "$ac_c_werror_flag"
6023 || test ! -s conftest.err'
6024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6025 (eval $ac_try) 2>&5
6026 ac_status=$?
6027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6028 (exit $ac_status); }; } &&
6029 { ac_try='test -s conftest$ac_exeext'
6030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6031 (eval $ac_try) 2>&5
6032 ac_status=$?
6033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6034 (exit $ac_status); }; }; then
6035 ac_cv_func_memmove=yes
6036 else
6037 echo "$as_me: failed program was:" >&5
6038 sed 's/^/| /' conftest.$ac_ext >&5
6040 ac_cv_func_memmove=no
6042 rm -f conftest.err conftest.$ac_objext \
6043 conftest$ac_exeext conftest.$ac_ext
6045 echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5
6046 echo "${ECHO_T}$ac_cv_func_memmove" >&6
6047 if test $ac_cv_func_memmove = yes; then
6048 cat >>confdefs.h <<\_ACEOF
6049 #define HAVE_MEMMOVE 1
6050 _ACEOF
6052 else
6053 LIBEXTRAOBJ="$LIBEXTRAOBJ memmove.o"
6054 EXTRAOBJ="$EXTRAOBJ lib/memmove.o"
6058 echo "$as_me:$LINENO: checking for getopt_long" >&5
6059 echo $ECHO_N "checking for getopt_long... $ECHO_C" >&6
6060 if test "${ac_cv_func_getopt_long+set}" = set; then
6061 echo $ECHO_N "(cached) $ECHO_C" >&6
6062 else
6063 cat >conftest.$ac_ext <<_ACEOF
6064 /* confdefs.h. */
6065 _ACEOF
6066 cat confdefs.h >>conftest.$ac_ext
6067 cat >>conftest.$ac_ext <<_ACEOF
6068 /* end confdefs.h. */
6069 /* Define getopt_long to an innocuous variant, in case <limits.h> declares getopt_long.
6070 For example, HP-UX 11i <limits.h> declares gettimeofday. */
6071 #define getopt_long innocuous_getopt_long
6073 /* System header to define __stub macros and hopefully few prototypes,
6074 which can conflict with char getopt_long (); below.
6075 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6076 <limits.h> exists even on freestanding compilers. */
6078 #ifdef __STDC__
6079 # include <limits.h>
6080 #else
6081 # include <assert.h>
6082 #endif
6084 #undef getopt_long
6086 /* Override any gcc2 internal prototype to avoid an error. */
6087 #ifdef __cplusplus
6088 extern "C"
6090 #endif
6091 /* We use char because int might match the return type of a gcc2
6092 builtin and then its argument prototype would still apply. */
6093 char getopt_long ();
6094 /* The GNU C library defines this for functions which it implements
6095 to always fail with ENOSYS. Some functions are actually named
6096 something starting with __ and the normal name is an alias. */
6097 #if defined (__stub_getopt_long) || defined (__stub___getopt_long)
6098 choke me
6099 #else
6100 char (*f) () = getopt_long;
6101 #endif
6102 #ifdef __cplusplus
6104 #endif
6107 main ()
6109 return f != getopt_long;
6111 return 0;
6113 _ACEOF
6114 rm -f conftest.$ac_objext conftest$ac_exeext
6115 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6116 (eval $ac_link) 2>conftest.er1
6117 ac_status=$?
6118 grep -v '^ *+' conftest.er1 >conftest.err
6119 rm -f conftest.er1
6120 cat conftest.err >&5
6121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6122 (exit $ac_status); } &&
6123 { ac_try='test -z "$ac_c_werror_flag"
6124 || test ! -s conftest.err'
6125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6126 (eval $ac_try) 2>&5
6127 ac_status=$?
6128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6129 (exit $ac_status); }; } &&
6130 { ac_try='test -s conftest$ac_exeext'
6131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6132 (eval $ac_try) 2>&5
6133 ac_status=$?
6134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135 (exit $ac_status); }; }; then
6136 ac_cv_func_getopt_long=yes
6137 else
6138 echo "$as_me: failed program was:" >&5
6139 sed 's/^/| /' conftest.$ac_ext >&5
6141 ac_cv_func_getopt_long=no
6143 rm -f conftest.err conftest.$ac_objext \
6144 conftest$ac_exeext conftest.$ac_ext
6146 echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long" >&5
6147 echo "${ECHO_T}$ac_cv_func_getopt_long" >&6
6148 if test $ac_cv_func_getopt_long = yes; then
6149 cat >>confdefs.h <<\_ACEOF
6150 #define HAVE_GETOPTLONG 1
6151 _ACEOF
6153 else
6154 LIBEXTRAOBJ="$LIBEXTRAOBJ getopt.o getopt1.o"
6155 EXTRAOBJ="$EXTRAOBJ lib/getopt.o lib/getopt1.o"
6159 echo "$as_me:$LINENO: checking for inet_pton" >&5
6160 echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
6161 if test "${ac_cv_func_inet_pton+set}" = set; then
6162 echo $ECHO_N "(cached) $ECHO_C" >&6
6163 else
6164 cat >conftest.$ac_ext <<_ACEOF
6165 /* confdefs.h. */
6166 _ACEOF
6167 cat confdefs.h >>conftest.$ac_ext
6168 cat >>conftest.$ac_ext <<_ACEOF
6169 /* end confdefs.h. */
6170 /* Define inet_pton to an innocuous variant, in case <limits.h> declares inet_pton.
6171 For example, HP-UX 11i <limits.h> declares gettimeofday. */
6172 #define inet_pton innocuous_inet_pton
6174 /* System header to define __stub macros and hopefully few prototypes,
6175 which can conflict with char inet_pton (); below.
6176 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6177 <limits.h> exists even on freestanding compilers. */
6179 #ifdef __STDC__
6180 # include <limits.h>
6181 #else
6182 # include <assert.h>
6183 #endif
6185 #undef inet_pton
6187 /* Override any gcc2 internal prototype to avoid an error. */
6188 #ifdef __cplusplus
6189 extern "C"
6191 #endif
6192 /* We use char because int might match the return type of a gcc2
6193 builtin and then its argument prototype would still apply. */
6194 char inet_pton ();
6195 /* The GNU C library defines this for functions which it implements
6196 to always fail with ENOSYS. Some functions are actually named
6197 something starting with __ and the normal name is an alias. */
6198 #if defined (__stub_inet_pton) || defined (__stub___inet_pton)
6199 choke me
6200 #else
6201 char (*f) () = inet_pton;
6202 #endif
6203 #ifdef __cplusplus
6205 #endif
6208 main ()
6210 return f != inet_pton;
6212 return 0;
6214 _ACEOF
6215 rm -f conftest.$ac_objext conftest$ac_exeext
6216 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6217 (eval $ac_link) 2>conftest.er1
6218 ac_status=$?
6219 grep -v '^ *+' conftest.er1 >conftest.err
6220 rm -f conftest.er1
6221 cat conftest.err >&5
6222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6223 (exit $ac_status); } &&
6224 { ac_try='test -z "$ac_c_werror_flag"
6225 || test ! -s conftest.err'
6226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6227 (eval $ac_try) 2>&5
6228 ac_status=$?
6229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6230 (exit $ac_status); }; } &&
6231 { ac_try='test -s conftest$ac_exeext'
6232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6233 (eval $ac_try) 2>&5
6234 ac_status=$?
6235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6236 (exit $ac_status); }; }; then
6237 ac_cv_func_inet_pton=yes
6238 else
6239 echo "$as_me: failed program was:" >&5
6240 sed 's/^/| /' conftest.$ac_ext >&5
6242 ac_cv_func_inet_pton=no
6244 rm -f conftest.err conftest.$ac_objext \
6245 conftest$ac_exeext conftest.$ac_ext
6247 echo "$as_me:$LINENO: result: $ac_cv_func_inet_pton" >&5
6248 echo "${ECHO_T}$ac_cv_func_inet_pton" >&6
6249 if test $ac_cv_func_inet_pton = yes; then
6250 cat >>confdefs.h <<\_ACEOF
6251 #define HAVE_INETPTON 1
6252 _ACEOF
6254 else
6255 LIBEXTRAOBJ="$LIBEXTRAOBJ inet_pton.o"
6256 EXTRAOBJ="$EXTRAOBJ lib/inet_pton.o"
6260 echo "$as_me:$LINENO: checking for localtime_r" >&5
6261 echo $ECHO_N "checking for localtime_r... $ECHO_C" >&6
6262 if test "${ac_cv_func_localtime_r+set}" = set; then
6263 echo $ECHO_N "(cached) $ECHO_C" >&6
6264 else
6265 cat >conftest.$ac_ext <<_ACEOF
6266 /* confdefs.h. */
6267 _ACEOF
6268 cat confdefs.h >>conftest.$ac_ext
6269 cat >>conftest.$ac_ext <<_ACEOF
6270 /* end confdefs.h. */
6271 /* Define localtime_r to an innocuous variant, in case <limits.h> declares localtime_r.
6272 For example, HP-UX 11i <limits.h> declares gettimeofday. */
6273 #define localtime_r innocuous_localtime_r
6275 /* System header to define __stub macros and hopefully few prototypes,
6276 which can conflict with char localtime_r (); below.
6277 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6278 <limits.h> exists even on freestanding compilers. */
6280 #ifdef __STDC__
6281 # include <limits.h>
6282 #else
6283 # include <assert.h>
6284 #endif
6286 #undef localtime_r
6288 /* Override any gcc2 internal prototype to avoid an error. */
6289 #ifdef __cplusplus
6290 extern "C"
6292 #endif
6293 /* We use char because int might match the return type of a gcc2
6294 builtin and then its argument prototype would still apply. */
6295 char localtime_r ();
6296 /* The GNU C library defines this for functions which it implements
6297 to always fail with ENOSYS. Some functions are actually named
6298 something starting with __ and the normal name is an alias. */
6299 #if defined (__stub_localtime_r) || defined (__stub___localtime_r)
6300 choke me
6301 #else
6302 char (*f) () = localtime_r;
6303 #endif
6304 #ifdef __cplusplus
6306 #endif
6309 main ()
6311 return f != localtime_r;
6313 return 0;
6315 _ACEOF
6316 rm -f conftest.$ac_objext conftest$ac_exeext
6317 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6318 (eval $ac_link) 2>conftest.er1
6319 ac_status=$?
6320 grep -v '^ *+' conftest.er1 >conftest.err
6321 rm -f conftest.er1
6322 cat conftest.err >&5
6323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6324 (exit $ac_status); } &&
6325 { ac_try='test -z "$ac_c_werror_flag"
6326 || test ! -s conftest.err'
6327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6328 (eval $ac_try) 2>&5
6329 ac_status=$?
6330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6331 (exit $ac_status); }; } &&
6332 { ac_try='test -s conftest$ac_exeext'
6333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6334 (eval $ac_try) 2>&5
6335 ac_status=$?
6336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6337 (exit $ac_status); }; }; then
6338 ac_cv_func_localtime_r=yes
6339 else
6340 echo "$as_me: failed program was:" >&5
6341 sed 's/^/| /' conftest.$ac_ext >&5
6343 ac_cv_func_localtime_r=no
6345 rm -f conftest.err conftest.$ac_objext \
6346 conftest$ac_exeext conftest.$ac_ext
6348 echo "$as_me:$LINENO: result: $ac_cv_func_localtime_r" >&5
6349 echo "${ECHO_T}$ac_cv_func_localtime_r" >&6
6350 if test $ac_cv_func_localtime_r = yes; then
6351 cat >>confdefs.h <<\_ACEOF
6352 #define HAVE_LOCALTIME_R 1
6353 _ACEOF
6355 else
6356 LIBEXTRAOBJ="$LIBEXTRAOBJ localtime_r.o"
6357 EXTRAOBJ="$EXTRAOBJ lib/localtime_r.o"
6362 echo "$as_me:$LINENO: checking for egrep" >&5
6363 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
6364 if test "${ac_cv_prog_egrep+set}" = set; then
6365 echo $ECHO_N "(cached) $ECHO_C" >&6
6366 else
6367 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
6368 then ac_cv_prog_egrep='grep -E'
6369 else ac_cv_prog_egrep='egrep'
6372 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
6373 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
6374 EGREP=$ac_cv_prog_egrep
6377 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6378 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6379 if test "${ac_cv_header_stdc+set}" = set; then
6380 echo $ECHO_N "(cached) $ECHO_C" >&6
6381 else
6382 cat >conftest.$ac_ext <<_ACEOF
6383 /* confdefs.h. */
6384 _ACEOF
6385 cat confdefs.h >>conftest.$ac_ext
6386 cat >>conftest.$ac_ext <<_ACEOF
6387 /* end confdefs.h. */
6388 #include <stdlib.h>
6389 #include <stdarg.h>
6390 #include <string.h>
6391 #include <float.h>
6394 main ()
6398 return 0;
6400 _ACEOF
6401 rm -f conftest.$ac_objext
6402 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6403 (eval $ac_compile) 2>conftest.er1
6404 ac_status=$?
6405 grep -v '^ *+' conftest.er1 >conftest.err
6406 rm -f conftest.er1
6407 cat conftest.err >&5
6408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6409 (exit $ac_status); } &&
6410 { ac_try='test -z "$ac_c_werror_flag"
6411 || test ! -s conftest.err'
6412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6413 (eval $ac_try) 2>&5
6414 ac_status=$?
6415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6416 (exit $ac_status); }; } &&
6417 { ac_try='test -s conftest.$ac_objext'
6418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6419 (eval $ac_try) 2>&5
6420 ac_status=$?
6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422 (exit $ac_status); }; }; then
6423 ac_cv_header_stdc=yes
6424 else
6425 echo "$as_me: failed program was:" >&5
6426 sed 's/^/| /' conftest.$ac_ext >&5
6428 ac_cv_header_stdc=no
6430 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6432 if test $ac_cv_header_stdc = yes; then
6433 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6434 cat >conftest.$ac_ext <<_ACEOF
6435 /* confdefs.h. */
6436 _ACEOF
6437 cat confdefs.h >>conftest.$ac_ext
6438 cat >>conftest.$ac_ext <<_ACEOF
6439 /* end confdefs.h. */
6440 #include <string.h>
6442 _ACEOF
6443 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6444 $EGREP "memchr" >/dev/null 2>&1; then
6446 else
6447 ac_cv_header_stdc=no
6449 rm -f conftest*
6453 if test $ac_cv_header_stdc = yes; then
6454 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6455 cat >conftest.$ac_ext <<_ACEOF
6456 /* confdefs.h. */
6457 _ACEOF
6458 cat confdefs.h >>conftest.$ac_ext
6459 cat >>conftest.$ac_ext <<_ACEOF
6460 /* end confdefs.h. */
6461 #include <stdlib.h>
6463 _ACEOF
6464 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6465 $EGREP "free" >/dev/null 2>&1; then
6467 else
6468 ac_cv_header_stdc=no
6470 rm -f conftest*
6474 if test $ac_cv_header_stdc = yes; then
6475 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6476 if test "$cross_compiling" = yes; then
6478 else
6479 cat >conftest.$ac_ext <<_ACEOF
6480 /* confdefs.h. */
6481 _ACEOF
6482 cat confdefs.h >>conftest.$ac_ext
6483 cat >>conftest.$ac_ext <<_ACEOF
6484 /* end confdefs.h. */
6485 #include <ctype.h>
6486 #if ((' ' & 0x0FF) == 0x020)
6487 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6488 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6489 #else
6490 # define ISLOWER(c) \
6491 (('a' <= (c) && (c) <= 'i') \
6492 || ('j' <= (c) && (c) <= 'r') \
6493 || ('s' <= (c) && (c) <= 'z'))
6494 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6495 #endif
6497 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6499 main ()
6501 int i;
6502 for (i = 0; i < 256; i++)
6503 if (XOR (islower (i), ISLOWER (i))
6504 || toupper (i) != TOUPPER (i))
6505 exit(2);
6506 exit (0);
6508 _ACEOF
6509 rm -f conftest$ac_exeext
6510 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6511 (eval $ac_link) 2>&5
6512 ac_status=$?
6513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6514 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6516 (eval $ac_try) 2>&5
6517 ac_status=$?
6518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6519 (exit $ac_status); }; }; then
6521 else
6522 echo "$as_me: program exited with status $ac_status" >&5
6523 echo "$as_me: failed program was:" >&5
6524 sed 's/^/| /' conftest.$ac_ext >&5
6526 ( exit $ac_status )
6527 ac_cv_header_stdc=no
6529 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6533 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6534 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6535 if test $ac_cv_header_stdc = yes; then
6537 cat >>confdefs.h <<\_ACEOF
6538 #define STDC_HEADERS 1
6539 _ACEOF
6543 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6553 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6554 inttypes.h stdint.h unistd.h
6556 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6557 echo "$as_me:$LINENO: checking for $ac_header" >&5
6558 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6559 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6560 echo $ECHO_N "(cached) $ECHO_C" >&6
6561 else
6562 cat >conftest.$ac_ext <<_ACEOF
6563 /* confdefs.h. */
6564 _ACEOF
6565 cat confdefs.h >>conftest.$ac_ext
6566 cat >>conftest.$ac_ext <<_ACEOF
6567 /* end confdefs.h. */
6568 $ac_includes_default
6570 #include <$ac_header>
6571 _ACEOF
6572 rm -f conftest.$ac_objext
6573 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6574 (eval $ac_compile) 2>conftest.er1
6575 ac_status=$?
6576 grep -v '^ *+' conftest.er1 >conftest.err
6577 rm -f conftest.er1
6578 cat conftest.err >&5
6579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6580 (exit $ac_status); } &&
6581 { ac_try='test -z "$ac_c_werror_flag"
6582 || test ! -s conftest.err'
6583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6584 (eval $ac_try) 2>&5
6585 ac_status=$?
6586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6587 (exit $ac_status); }; } &&
6588 { ac_try='test -s conftest.$ac_objext'
6589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6590 (eval $ac_try) 2>&5
6591 ac_status=$?
6592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6593 (exit $ac_status); }; }; then
6594 eval "$as_ac_Header=yes"
6595 else
6596 echo "$as_me: failed program was:" >&5
6597 sed 's/^/| /' conftest.$ac_ext >&5
6599 eval "$as_ac_Header=no"
6601 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6603 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6604 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6605 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6606 cat >>confdefs.h <<_ACEOF
6607 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6608 _ACEOF
6612 done
6635 for ac_header in arpa/inet.h ctype.h errno.h fcntl.h \
6636 limits.h netdb.h netinet/in.h pwd.h signal.h \
6637 stdarg.h stdio.h stdlib.h string.h strings.h sys/ioctl.h \
6638 sys/socket.h sys/types.h syslog.h termios.h \
6639 unistd.h
6642 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6643 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6644 echo "$as_me:$LINENO: checking for $ac_header" >&5
6645 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6646 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6647 echo $ECHO_N "(cached) $ECHO_C" >&6
6649 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6650 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6651 else
6652 # Is the header compilable?
6653 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6654 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6655 cat >conftest.$ac_ext <<_ACEOF
6656 /* confdefs.h. */
6657 _ACEOF
6658 cat confdefs.h >>conftest.$ac_ext
6659 cat >>conftest.$ac_ext <<_ACEOF
6660 /* end confdefs.h. */
6661 $ac_includes_default
6662 #include <$ac_header>
6663 _ACEOF
6664 rm -f conftest.$ac_objext
6665 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6666 (eval $ac_compile) 2>conftest.er1
6667 ac_status=$?
6668 grep -v '^ *+' conftest.er1 >conftest.err
6669 rm -f conftest.er1
6670 cat conftest.err >&5
6671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6672 (exit $ac_status); } &&
6673 { ac_try='test -z "$ac_c_werror_flag"
6674 || test ! -s conftest.err'
6675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6676 (eval $ac_try) 2>&5
6677 ac_status=$?
6678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6679 (exit $ac_status); }; } &&
6680 { ac_try='test -s conftest.$ac_objext'
6681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6682 (eval $ac_try) 2>&5
6683 ac_status=$?
6684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6685 (exit $ac_status); }; }; then
6686 ac_header_compiler=yes
6687 else
6688 echo "$as_me: failed program was:" >&5
6689 sed 's/^/| /' conftest.$ac_ext >&5
6691 ac_header_compiler=no
6693 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6694 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6695 echo "${ECHO_T}$ac_header_compiler" >&6
6697 # Is the header present?
6698 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6699 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6700 cat >conftest.$ac_ext <<_ACEOF
6701 /* confdefs.h. */
6702 _ACEOF
6703 cat confdefs.h >>conftest.$ac_ext
6704 cat >>conftest.$ac_ext <<_ACEOF
6705 /* end confdefs.h. */
6706 #include <$ac_header>
6707 _ACEOF
6708 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6709 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6710 ac_status=$?
6711 grep -v '^ *+' conftest.er1 >conftest.err
6712 rm -f conftest.er1
6713 cat conftest.err >&5
6714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715 (exit $ac_status); } >/dev/null; then
6716 if test -s conftest.err; then
6717 ac_cpp_err=$ac_c_preproc_warn_flag
6718 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6719 else
6720 ac_cpp_err=
6722 else
6723 ac_cpp_err=yes
6725 if test -z "$ac_cpp_err"; then
6726 ac_header_preproc=yes
6727 else
6728 echo "$as_me: failed program was:" >&5
6729 sed 's/^/| /' conftest.$ac_ext >&5
6731 ac_header_preproc=no
6733 rm -f conftest.err conftest.$ac_ext
6734 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6735 echo "${ECHO_T}$ac_header_preproc" >&6
6737 # So? What about this header?
6738 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6739 yes:no: )
6740 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6741 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6742 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6743 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6744 ac_header_preproc=yes
6746 no:yes:* )
6747 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6748 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6749 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6750 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6751 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6752 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6753 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6754 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6755 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6756 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6757 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6758 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6760 cat <<\_ASBOX
6761 ## ------------------------------------------ ##
6762 ## Report this to the AC_PACKAGE_NAME lists. ##
6763 ## ------------------------------------------ ##
6764 _ASBOX
6766 sed "s/^/$as_me: WARNING: /" >&2
6768 esac
6769 echo "$as_me:$LINENO: checking for $ac_header" >&5
6770 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6771 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6772 echo $ECHO_N "(cached) $ECHO_C" >&6
6773 else
6774 eval "$as_ac_Header=\$ac_header_preproc"
6776 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6777 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6780 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6781 cat >>confdefs.h <<_ACEOF
6782 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6783 _ACEOF
6785 else
6786 { echo "$as_me:$LINENO: WARNING: at least 1 header file is missing. This may not compile." >&5
6787 echo "$as_me: WARNING: at least 1 header file is missing. This may not compile." >&2;}
6790 done
6794 for ac_header in arpa/nameser.h
6796 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6797 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6798 echo "$as_me:$LINENO: checking for $ac_header" >&5
6799 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6800 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6801 echo $ECHO_N "(cached) $ECHO_C" >&6
6803 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6804 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6805 else
6806 # Is the header compilable?
6807 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6808 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6809 cat >conftest.$ac_ext <<_ACEOF
6810 /* confdefs.h. */
6811 _ACEOF
6812 cat confdefs.h >>conftest.$ac_ext
6813 cat >>conftest.$ac_ext <<_ACEOF
6814 /* end confdefs.h. */
6815 $ac_includes_default
6816 #include <$ac_header>
6817 _ACEOF
6818 rm -f conftest.$ac_objext
6819 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6820 (eval $ac_compile) 2>conftest.er1
6821 ac_status=$?
6822 grep -v '^ *+' conftest.er1 >conftest.err
6823 rm -f conftest.er1
6824 cat conftest.err >&5
6825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6826 (exit $ac_status); } &&
6827 { ac_try='test -z "$ac_c_werror_flag"
6828 || test ! -s conftest.err'
6829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6830 (eval $ac_try) 2>&5
6831 ac_status=$?
6832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6833 (exit $ac_status); }; } &&
6834 { ac_try='test -s conftest.$ac_objext'
6835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6836 (eval $ac_try) 2>&5
6837 ac_status=$?
6838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6839 (exit $ac_status); }; }; then
6840 ac_header_compiler=yes
6841 else
6842 echo "$as_me: failed program was:" >&5
6843 sed 's/^/| /' conftest.$ac_ext >&5
6845 ac_header_compiler=no
6847 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6848 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6849 echo "${ECHO_T}$ac_header_compiler" >&6
6851 # Is the header present?
6852 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6853 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6854 cat >conftest.$ac_ext <<_ACEOF
6855 /* confdefs.h. */
6856 _ACEOF
6857 cat confdefs.h >>conftest.$ac_ext
6858 cat >>conftest.$ac_ext <<_ACEOF
6859 /* end confdefs.h. */
6860 #include <$ac_header>
6861 _ACEOF
6862 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6863 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6864 ac_status=$?
6865 grep -v '^ *+' conftest.er1 >conftest.err
6866 rm -f conftest.er1
6867 cat conftest.err >&5
6868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6869 (exit $ac_status); } >/dev/null; then
6870 if test -s conftest.err; then
6871 ac_cpp_err=$ac_c_preproc_warn_flag
6872 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6873 else
6874 ac_cpp_err=
6876 else
6877 ac_cpp_err=yes
6879 if test -z "$ac_cpp_err"; then
6880 ac_header_preproc=yes
6881 else
6882 echo "$as_me: failed program was:" >&5
6883 sed 's/^/| /' conftest.$ac_ext >&5
6885 ac_header_preproc=no
6887 rm -f conftest.err conftest.$ac_ext
6888 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6889 echo "${ECHO_T}$ac_header_preproc" >&6
6891 # So? What about this header?
6892 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6893 yes:no: )
6894 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6895 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6896 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6897 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6898 ac_header_preproc=yes
6900 no:yes:* )
6901 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6902 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6903 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6904 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6905 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6906 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6907 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6908 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6909 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6910 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6911 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6912 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6914 cat <<\_ASBOX
6915 ## ------------------------------------------ ##
6916 ## Report this to the AC_PACKAGE_NAME lists. ##
6917 ## ------------------------------------------ ##
6918 _ASBOX
6920 sed "s/^/$as_me: WARNING: /" >&2
6922 esac
6923 echo "$as_me:$LINENO: checking for $ac_header" >&5
6924 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6925 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6926 echo $ECHO_N "(cached) $ECHO_C" >&6
6927 else
6928 eval "$as_ac_Header=\$ac_header_preproc"
6930 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6931 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6934 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6935 cat >>confdefs.h <<_ACEOF
6936 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6937 _ACEOF
6938 cat >>confdefs.h <<\_ACEOF
6939 #define HAVE_NAMESER_H 1
6940 _ACEOF
6944 done
6947 echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
6948 echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
6949 if test "${ac_cv_header_stat_broken+set}" = set; then
6950 echo $ECHO_N "(cached) $ECHO_C" >&6
6951 else
6952 cat >conftest.$ac_ext <<_ACEOF
6953 /* confdefs.h. */
6954 _ACEOF
6955 cat confdefs.h >>conftest.$ac_ext
6956 cat >>conftest.$ac_ext <<_ACEOF
6957 /* end confdefs.h. */
6958 #include <sys/types.h>
6959 #include <sys/stat.h>
6961 #if defined(S_ISBLK) && defined(S_IFDIR)
6962 # if S_ISBLK (S_IFDIR)
6963 You lose.
6964 # endif
6965 #endif
6967 #if defined(S_ISBLK) && defined(S_IFCHR)
6968 # if S_ISBLK (S_IFCHR)
6969 You lose.
6970 # endif
6971 #endif
6973 #if defined(S_ISLNK) && defined(S_IFREG)
6974 # if S_ISLNK (S_IFREG)
6975 You lose.
6976 # endif
6977 #endif
6979 #if defined(S_ISSOCK) && defined(S_IFREG)
6980 # if S_ISSOCK (S_IFREG)
6981 You lose.
6982 # endif
6983 #endif
6985 _ACEOF
6986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6987 $EGREP "You lose" >/dev/null 2>&1; then
6988 ac_cv_header_stat_broken=yes
6989 else
6990 ac_cv_header_stat_broken=no
6992 rm -f conftest*
6995 echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
6996 echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
6997 if test $ac_cv_header_stat_broken = yes; then
6999 cat >>confdefs.h <<\_ACEOF
7000 #define STAT_MACROS_BROKEN 1
7001 _ACEOF
7004 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7005 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
7006 if test "${ac_cv_header_time+set}" = set; then
7007 echo $ECHO_N "(cached) $ECHO_C" >&6
7008 else
7009 cat >conftest.$ac_ext <<_ACEOF
7010 /* confdefs.h. */
7011 _ACEOF
7012 cat confdefs.h >>conftest.$ac_ext
7013 cat >>conftest.$ac_ext <<_ACEOF
7014 /* end confdefs.h. */
7015 #include <sys/types.h>
7016 #include <sys/time.h>
7017 #include <time.h>
7020 main ()
7022 if ((struct tm *) 0)
7023 return 0;
7025 return 0;
7027 _ACEOF
7028 rm -f conftest.$ac_objext
7029 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7030 (eval $ac_compile) 2>conftest.er1
7031 ac_status=$?
7032 grep -v '^ *+' conftest.er1 >conftest.err
7033 rm -f conftest.er1
7034 cat conftest.err >&5
7035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7036 (exit $ac_status); } &&
7037 { ac_try='test -z "$ac_c_werror_flag"
7038 || test ! -s conftest.err'
7039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7040 (eval $ac_try) 2>&5
7041 ac_status=$?
7042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7043 (exit $ac_status); }; } &&
7044 { ac_try='test -s conftest.$ac_objext'
7045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7046 (eval $ac_try) 2>&5
7047 ac_status=$?
7048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7049 (exit $ac_status); }; }; then
7050 ac_cv_header_time=yes
7051 else
7052 echo "$as_me: failed program was:" >&5
7053 sed 's/^/| /' conftest.$ac_ext >&5
7055 ac_cv_header_time=no
7057 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7059 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7060 echo "${ECHO_T}$ac_cv_header_time" >&6
7061 if test $ac_cv_header_time = yes; then
7063 cat >>confdefs.h <<\_ACEOF
7064 #define TIME_WITH_SYS_TIME 1
7065 _ACEOF
7068 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7069 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
7070 if test "${ac_cv_header_sys_wait_h+set}" = set; then
7071 echo $ECHO_N "(cached) $ECHO_C" >&6
7072 else
7073 cat >conftest.$ac_ext <<_ACEOF
7074 /* confdefs.h. */
7075 _ACEOF
7076 cat confdefs.h >>conftest.$ac_ext
7077 cat >>conftest.$ac_ext <<_ACEOF
7078 /* end confdefs.h. */
7079 #include <sys/types.h>
7080 #include <sys/wait.h>
7081 #ifndef WEXITSTATUS
7082 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
7083 #endif
7084 #ifndef WIFEXITED
7085 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7086 #endif
7089 main ()
7091 int s;
7092 wait (&s);
7093 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7095 return 0;
7097 _ACEOF
7098 rm -f conftest.$ac_objext
7099 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7100 (eval $ac_compile) 2>conftest.er1
7101 ac_status=$?
7102 grep -v '^ *+' conftest.er1 >conftest.err
7103 rm -f conftest.er1
7104 cat conftest.err >&5
7105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7106 (exit $ac_status); } &&
7107 { ac_try='test -z "$ac_c_werror_flag"
7108 || test ! -s conftest.err'
7109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7110 (eval $ac_try) 2>&5
7111 ac_status=$?
7112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7113 (exit $ac_status); }; } &&
7114 { ac_try='test -s conftest.$ac_objext'
7115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7116 (eval $ac_try) 2>&5
7117 ac_status=$?
7118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7119 (exit $ac_status); }; }; then
7120 ac_cv_header_sys_wait_h=yes
7121 else
7122 echo "$as_me: failed program was:" >&5
7123 sed 's/^/| /' conftest.$ac_ext >&5
7125 ac_cv_header_sys_wait_h=no
7127 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7129 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7130 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
7131 if test $ac_cv_header_sys_wait_h = yes; then
7133 cat >>confdefs.h <<\_ACEOF
7134 #define HAVE_SYS_WAIT_H 1
7135 _ACEOF
7139 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7140 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
7141 if test "${ac_cv_struct_tm+set}" = set; then
7142 echo $ECHO_N "(cached) $ECHO_C" >&6
7143 else
7144 cat >conftest.$ac_ext <<_ACEOF
7145 /* confdefs.h. */
7146 _ACEOF
7147 cat confdefs.h >>conftest.$ac_ext
7148 cat >>conftest.$ac_ext <<_ACEOF
7149 /* end confdefs.h. */
7150 #include <sys/types.h>
7151 #include <time.h>
7154 main ()
7156 struct tm *tp; tp->tm_sec;
7158 return 0;
7160 _ACEOF
7161 rm -f conftest.$ac_objext
7162 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7163 (eval $ac_compile) 2>conftest.er1
7164 ac_status=$?
7165 grep -v '^ *+' conftest.er1 >conftest.err
7166 rm -f conftest.er1
7167 cat conftest.err >&5
7168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7169 (exit $ac_status); } &&
7170 { ac_try='test -z "$ac_c_werror_flag"
7171 || test ! -s conftest.err'
7172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7173 (eval $ac_try) 2>&5
7174 ac_status=$?
7175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7176 (exit $ac_status); }; } &&
7177 { ac_try='test -s conftest.$ac_objext'
7178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7179 (eval $ac_try) 2>&5
7180 ac_status=$?
7181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7182 (exit $ac_status); }; }; then
7183 ac_cv_struct_tm=time.h
7184 else
7185 echo "$as_me: failed program was:" >&5
7186 sed 's/^/| /' conftest.$ac_ext >&5
7188 ac_cv_struct_tm=sys/time.h
7190 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7192 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7193 echo "${ECHO_T}$ac_cv_struct_tm" >&6
7194 if test $ac_cv_struct_tm = sys/time.h; then
7196 cat >>confdefs.h <<\_ACEOF
7197 #define TM_IN_SYS_TIME 1
7198 _ACEOF
7201 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7202 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
7203 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
7204 echo $ECHO_N "(cached) $ECHO_C" >&6
7205 else
7206 cat >conftest.$ac_ext <<_ACEOF
7207 /* confdefs.h. */
7208 _ACEOF
7209 cat confdefs.h >>conftest.$ac_ext
7210 cat >>conftest.$ac_ext <<_ACEOF
7211 /* end confdefs.h. */
7212 #include <sys/types.h>
7213 #include <$ac_cv_struct_tm>
7217 main ()
7219 static struct tm ac_aggr;
7220 if (ac_aggr.tm_zone)
7221 return 0;
7223 return 0;
7225 _ACEOF
7226 rm -f conftest.$ac_objext
7227 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7228 (eval $ac_compile) 2>conftest.er1
7229 ac_status=$?
7230 grep -v '^ *+' conftest.er1 >conftest.err
7231 rm -f conftest.er1
7232 cat conftest.err >&5
7233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7234 (exit $ac_status); } &&
7235 { ac_try='test -z "$ac_c_werror_flag"
7236 || test ! -s conftest.err'
7237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7238 (eval $ac_try) 2>&5
7239 ac_status=$?
7240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7241 (exit $ac_status); }; } &&
7242 { ac_try='test -s conftest.$ac_objext'
7243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7244 (eval $ac_try) 2>&5
7245 ac_status=$?
7246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7247 (exit $ac_status); }; }; then
7248 ac_cv_member_struct_tm_tm_zone=yes
7249 else
7250 echo "$as_me: failed program was:" >&5
7251 sed 's/^/| /' conftest.$ac_ext >&5
7253 cat >conftest.$ac_ext <<_ACEOF
7254 /* confdefs.h. */
7255 _ACEOF
7256 cat confdefs.h >>conftest.$ac_ext
7257 cat >>conftest.$ac_ext <<_ACEOF
7258 /* end confdefs.h. */
7259 #include <sys/types.h>
7260 #include <$ac_cv_struct_tm>
7264 main ()
7266 static struct tm ac_aggr;
7267 if (sizeof ac_aggr.tm_zone)
7268 return 0;
7270 return 0;
7272 _ACEOF
7273 rm -f conftest.$ac_objext
7274 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7275 (eval $ac_compile) 2>conftest.er1
7276 ac_status=$?
7277 grep -v '^ *+' conftest.er1 >conftest.err
7278 rm -f conftest.er1
7279 cat conftest.err >&5
7280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7281 (exit $ac_status); } &&
7282 { ac_try='test -z "$ac_c_werror_flag"
7283 || test ! -s conftest.err'
7284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7285 (eval $ac_try) 2>&5
7286 ac_status=$?
7287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7288 (exit $ac_status); }; } &&
7289 { ac_try='test -s conftest.$ac_objext'
7290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7291 (eval $ac_try) 2>&5
7292 ac_status=$?
7293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7294 (exit $ac_status); }; }; then
7295 ac_cv_member_struct_tm_tm_zone=yes
7296 else
7297 echo "$as_me: failed program was:" >&5
7298 sed 's/^/| /' conftest.$ac_ext >&5
7300 ac_cv_member_struct_tm_tm_zone=no
7302 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7304 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7306 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7307 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
7308 if test $ac_cv_member_struct_tm_tm_zone = yes; then
7310 cat >>confdefs.h <<_ACEOF
7311 #define HAVE_STRUCT_TM_TM_ZONE 1
7312 _ACEOF
7317 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
7319 cat >>confdefs.h <<\_ACEOF
7320 #define HAVE_TM_ZONE 1
7321 _ACEOF
7323 else
7324 echo "$as_me:$LINENO: checking for tzname" >&5
7325 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
7326 if test "${ac_cv_var_tzname+set}" = set; then
7327 echo $ECHO_N "(cached) $ECHO_C" >&6
7328 else
7329 cat >conftest.$ac_ext <<_ACEOF
7330 /* confdefs.h. */
7331 _ACEOF
7332 cat confdefs.h >>conftest.$ac_ext
7333 cat >>conftest.$ac_ext <<_ACEOF
7334 /* end confdefs.h. */
7335 #include <time.h>
7336 #ifndef tzname /* For SGI. */
7337 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
7338 #endif
7341 main ()
7343 atoi(*tzname);
7345 return 0;
7347 _ACEOF
7348 rm -f conftest.$ac_objext conftest$ac_exeext
7349 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7350 (eval $ac_link) 2>conftest.er1
7351 ac_status=$?
7352 grep -v '^ *+' conftest.er1 >conftest.err
7353 rm -f conftest.er1
7354 cat conftest.err >&5
7355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7356 (exit $ac_status); } &&
7357 { ac_try='test -z "$ac_c_werror_flag"
7358 || test ! -s conftest.err'
7359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7360 (eval $ac_try) 2>&5
7361 ac_status=$?
7362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7363 (exit $ac_status); }; } &&
7364 { ac_try='test -s conftest$ac_exeext'
7365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7366 (eval $ac_try) 2>&5
7367 ac_status=$?
7368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7369 (exit $ac_status); }; }; then
7370 ac_cv_var_tzname=yes
7371 else
7372 echo "$as_me: failed program was:" >&5
7373 sed 's/^/| /' conftest.$ac_ext >&5
7375 ac_cv_var_tzname=no
7377 rm -f conftest.err conftest.$ac_objext \
7378 conftest$ac_exeext conftest.$ac_ext
7380 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
7381 echo "${ECHO_T}$ac_cv_var_tzname" >&6
7382 if test $ac_cv_var_tzname = yes; then
7384 cat >>confdefs.h <<\_ACEOF
7385 #define HAVE_TZNAME 1
7386 _ACEOF
7391 echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7392 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
7393 if test "${ac_cv_type_uid_t+set}" = set; then
7394 echo $ECHO_N "(cached) $ECHO_C" >&6
7395 else
7396 cat >conftest.$ac_ext <<_ACEOF
7397 /* confdefs.h. */
7398 _ACEOF
7399 cat confdefs.h >>conftest.$ac_ext
7400 cat >>conftest.$ac_ext <<_ACEOF
7401 /* end confdefs.h. */
7402 #include <sys/types.h>
7404 _ACEOF
7405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7406 $EGREP "uid_t" >/dev/null 2>&1; then
7407 ac_cv_type_uid_t=yes
7408 else
7409 ac_cv_type_uid_t=no
7411 rm -f conftest*
7414 echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7415 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
7416 if test $ac_cv_type_uid_t = no; then
7418 cat >>confdefs.h <<\_ACEOF
7419 #define uid_t int
7420 _ACEOF
7423 cat >>confdefs.h <<\_ACEOF
7424 #define gid_t int
7425 _ACEOF
7429 echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
7430 echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
7431 if test "${ac_cv_type_getgroups+set}" = set; then
7432 echo $ECHO_N "(cached) $ECHO_C" >&6
7433 else
7434 if test "$cross_compiling" = yes; then
7435 ac_cv_type_getgroups=cross
7436 else
7437 cat >conftest.$ac_ext <<_ACEOF
7438 /* confdefs.h. */
7439 _ACEOF
7440 cat confdefs.h >>conftest.$ac_ext
7441 cat >>conftest.$ac_ext <<_ACEOF
7442 /* end confdefs.h. */
7443 /* Thanks to Mike Rendell for this test. */
7444 #include <sys/types.h>
7445 #define NGID 256
7446 #undef MAX
7447 #define MAX(x, y) ((x) > (y) ? (x) : (y))
7450 main ()
7452 gid_t gidset[NGID];
7453 int i, n;
7454 union { gid_t gval; long lval; } val;
7456 val.lval = -1;
7457 for (i = 0; i < NGID; i++)
7458 gidset[i] = val.gval;
7459 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
7460 gidset);
7461 /* Exit non-zero if getgroups seems to require an array of ints. This
7462 happens when gid_t is short but getgroups modifies an array of ints. */
7463 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
7465 _ACEOF
7466 rm -f conftest$ac_exeext
7467 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7468 (eval $ac_link) 2>&5
7469 ac_status=$?
7470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7471 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7473 (eval $ac_try) 2>&5
7474 ac_status=$?
7475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7476 (exit $ac_status); }; }; then
7477 ac_cv_type_getgroups=gid_t
7478 else
7479 echo "$as_me: program exited with status $ac_status" >&5
7480 echo "$as_me: failed program was:" >&5
7481 sed 's/^/| /' conftest.$ac_ext >&5
7483 ( exit $ac_status )
7484 ac_cv_type_getgroups=int
7486 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7488 if test $ac_cv_type_getgroups = cross; then
7489 cat >conftest.$ac_ext <<_ACEOF
7490 /* confdefs.h. */
7491 _ACEOF
7492 cat confdefs.h >>conftest.$ac_ext
7493 cat >>conftest.$ac_ext <<_ACEOF
7494 /* end confdefs.h. */
7495 #include <unistd.h>
7497 _ACEOF
7498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7499 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
7500 ac_cv_type_getgroups=gid_t
7501 else
7502 ac_cv_type_getgroups=int
7504 rm -f conftest*
7508 echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
7509 echo "${ECHO_T}$ac_cv_type_getgroups" >&6
7511 cat >>confdefs.h <<_ACEOF
7512 #define GETGROUPS_T $ac_cv_type_getgroups
7513 _ACEOF
7516 echo "$as_me:$LINENO: checking for mode_t" >&5
7517 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
7518 if test "${ac_cv_type_mode_t+set}" = set; then
7519 echo $ECHO_N "(cached) $ECHO_C" >&6
7520 else
7521 cat >conftest.$ac_ext <<_ACEOF
7522 /* confdefs.h. */
7523 _ACEOF
7524 cat confdefs.h >>conftest.$ac_ext
7525 cat >>conftest.$ac_ext <<_ACEOF
7526 /* end confdefs.h. */
7527 $ac_includes_default
7529 main ()
7531 if ((mode_t *) 0)
7532 return 0;
7533 if (sizeof (mode_t))
7534 return 0;
7536 return 0;
7538 _ACEOF
7539 rm -f conftest.$ac_objext
7540 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7541 (eval $ac_compile) 2>conftest.er1
7542 ac_status=$?
7543 grep -v '^ *+' conftest.er1 >conftest.err
7544 rm -f conftest.er1
7545 cat conftest.err >&5
7546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7547 (exit $ac_status); } &&
7548 { ac_try='test -z "$ac_c_werror_flag"
7549 || test ! -s conftest.err'
7550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7551 (eval $ac_try) 2>&5
7552 ac_status=$?
7553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7554 (exit $ac_status); }; } &&
7555 { ac_try='test -s conftest.$ac_objext'
7556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7557 (eval $ac_try) 2>&5
7558 ac_status=$?
7559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7560 (exit $ac_status); }; }; then
7561 ac_cv_type_mode_t=yes
7562 else
7563 echo "$as_me: failed program was:" >&5
7564 sed 's/^/| /' conftest.$ac_ext >&5
7566 ac_cv_type_mode_t=no
7568 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7570 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
7571 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
7572 if test $ac_cv_type_mode_t = yes; then
7574 else
7576 cat >>confdefs.h <<_ACEOF
7577 #define mode_t int
7578 _ACEOF
7582 echo "$as_me:$LINENO: checking for off_t" >&5
7583 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
7584 if test "${ac_cv_type_off_t+set}" = set; then
7585 echo $ECHO_N "(cached) $ECHO_C" >&6
7586 else
7587 cat >conftest.$ac_ext <<_ACEOF
7588 /* confdefs.h. */
7589 _ACEOF
7590 cat confdefs.h >>conftest.$ac_ext
7591 cat >>conftest.$ac_ext <<_ACEOF
7592 /* end confdefs.h. */
7593 $ac_includes_default
7595 main ()
7597 if ((off_t *) 0)
7598 return 0;
7599 if (sizeof (off_t))
7600 return 0;
7602 return 0;
7604 _ACEOF
7605 rm -f conftest.$ac_objext
7606 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7607 (eval $ac_compile) 2>conftest.er1
7608 ac_status=$?
7609 grep -v '^ *+' conftest.er1 >conftest.err
7610 rm -f conftest.er1
7611 cat conftest.err >&5
7612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7613 (exit $ac_status); } &&
7614 { ac_try='test -z "$ac_c_werror_flag"
7615 || test ! -s conftest.err'
7616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7617 (eval $ac_try) 2>&5
7618 ac_status=$?
7619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7620 (exit $ac_status); }; } &&
7621 { ac_try='test -s conftest.$ac_objext'
7622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7623 (eval $ac_try) 2>&5
7624 ac_status=$?
7625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7626 (exit $ac_status); }; }; then
7627 ac_cv_type_off_t=yes
7628 else
7629 echo "$as_me: failed program was:" >&5
7630 sed 's/^/| /' conftest.$ac_ext >&5
7632 ac_cv_type_off_t=no
7634 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7636 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7637 echo "${ECHO_T}$ac_cv_type_off_t" >&6
7638 if test $ac_cv_type_off_t = yes; then
7640 else
7642 cat >>confdefs.h <<_ACEOF
7643 #define off_t long
7644 _ACEOF
7648 echo "$as_me:$LINENO: checking for pid_t" >&5
7649 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
7650 if test "${ac_cv_type_pid_t+set}" = set; then
7651 echo $ECHO_N "(cached) $ECHO_C" >&6
7652 else
7653 cat >conftest.$ac_ext <<_ACEOF
7654 /* confdefs.h. */
7655 _ACEOF
7656 cat confdefs.h >>conftest.$ac_ext
7657 cat >>conftest.$ac_ext <<_ACEOF
7658 /* end confdefs.h. */
7659 $ac_includes_default
7661 main ()
7663 if ((pid_t *) 0)
7664 return 0;
7665 if (sizeof (pid_t))
7666 return 0;
7668 return 0;
7670 _ACEOF
7671 rm -f conftest.$ac_objext
7672 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7673 (eval $ac_compile) 2>conftest.er1
7674 ac_status=$?
7675 grep -v '^ *+' conftest.er1 >conftest.err
7676 rm -f conftest.er1
7677 cat conftest.err >&5
7678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679 (exit $ac_status); } &&
7680 { ac_try='test -z "$ac_c_werror_flag"
7681 || test ! -s conftest.err'
7682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7683 (eval $ac_try) 2>&5
7684 ac_status=$?
7685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7686 (exit $ac_status); }; } &&
7687 { ac_try='test -s conftest.$ac_objext'
7688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7689 (eval $ac_try) 2>&5
7690 ac_status=$?
7691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7692 (exit $ac_status); }; }; then
7693 ac_cv_type_pid_t=yes
7694 else
7695 echo "$as_me: failed program was:" >&5
7696 sed 's/^/| /' conftest.$ac_ext >&5
7698 ac_cv_type_pid_t=no
7700 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7702 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7703 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
7704 if test $ac_cv_type_pid_t = yes; then
7706 else
7708 cat >>confdefs.h <<_ACEOF
7709 #define pid_t int
7710 _ACEOF
7714 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7715 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
7716 if test "${ac_cv_type_signal+set}" = set; then
7717 echo $ECHO_N "(cached) $ECHO_C" >&6
7718 else
7719 cat >conftest.$ac_ext <<_ACEOF
7720 /* confdefs.h. */
7721 _ACEOF
7722 cat confdefs.h >>conftest.$ac_ext
7723 cat >>conftest.$ac_ext <<_ACEOF
7724 /* end confdefs.h. */
7725 #include <sys/types.h>
7726 #include <signal.h>
7727 #ifdef signal
7728 # undef signal
7729 #endif
7730 #ifdef __cplusplus
7731 extern "C" void (*signal (int, void (*)(int)))(int);
7732 #else
7733 void (*signal ()) ();
7734 #endif
7737 main ()
7739 int i;
7741 return 0;
7743 _ACEOF
7744 rm -f conftest.$ac_objext
7745 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7746 (eval $ac_compile) 2>conftest.er1
7747 ac_status=$?
7748 grep -v '^ *+' conftest.er1 >conftest.err
7749 rm -f conftest.er1
7750 cat conftest.err >&5
7751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7752 (exit $ac_status); } &&
7753 { ac_try='test -z "$ac_c_werror_flag"
7754 || test ! -s conftest.err'
7755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7756 (eval $ac_try) 2>&5
7757 ac_status=$?
7758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7759 (exit $ac_status); }; } &&
7760 { ac_try='test -s conftest.$ac_objext'
7761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7762 (eval $ac_try) 2>&5
7763 ac_status=$?
7764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7765 (exit $ac_status); }; }; then
7766 ac_cv_type_signal=void
7767 else
7768 echo "$as_me: failed program was:" >&5
7769 sed 's/^/| /' conftest.$ac_ext >&5
7771 ac_cv_type_signal=int
7773 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7775 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7776 echo "${ECHO_T}$ac_cv_type_signal" >&6
7778 cat >>confdefs.h <<_ACEOF
7779 #define RETSIGTYPE $ac_cv_type_signal
7780 _ACEOF
7783 echo "$as_me:$LINENO: checking for size_t" >&5
7784 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
7785 if test "${ac_cv_type_size_t+set}" = set; then
7786 echo $ECHO_N "(cached) $ECHO_C" >&6
7787 else
7788 cat >conftest.$ac_ext <<_ACEOF
7789 /* confdefs.h. */
7790 _ACEOF
7791 cat confdefs.h >>conftest.$ac_ext
7792 cat >>conftest.$ac_ext <<_ACEOF
7793 /* end confdefs.h. */
7794 $ac_includes_default
7796 main ()
7798 if ((size_t *) 0)
7799 return 0;
7800 if (sizeof (size_t))
7801 return 0;
7803 return 0;
7805 _ACEOF
7806 rm -f conftest.$ac_objext
7807 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7808 (eval $ac_compile) 2>conftest.er1
7809 ac_status=$?
7810 grep -v '^ *+' conftest.er1 >conftest.err
7811 rm -f conftest.er1
7812 cat conftest.err >&5
7813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7814 (exit $ac_status); } &&
7815 { ac_try='test -z "$ac_c_werror_flag"
7816 || test ! -s conftest.err'
7817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7818 (eval $ac_try) 2>&5
7819 ac_status=$?
7820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7821 (exit $ac_status); }; } &&
7822 { ac_try='test -s conftest.$ac_objext'
7823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7824 (eval $ac_try) 2>&5
7825 ac_status=$?
7826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7827 (exit $ac_status); }; }; then
7828 ac_cv_type_size_t=yes
7829 else
7830 echo "$as_me: failed program was:" >&5
7831 sed 's/^/| /' conftest.$ac_ext >&5
7833 ac_cv_type_size_t=no
7835 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7837 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7838 echo "${ECHO_T}$ac_cv_type_size_t" >&6
7839 if test $ac_cv_type_size_t = yes; then
7841 else
7843 cat >>confdefs.h <<_ACEOF
7844 #define size_t unsigned
7845 _ACEOF
7849 echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7850 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
7851 if test "${ac_cv_type_uid_t+set}" = set; then
7852 echo $ECHO_N "(cached) $ECHO_C" >&6
7853 else
7854 cat >conftest.$ac_ext <<_ACEOF
7855 /* confdefs.h. */
7856 _ACEOF
7857 cat confdefs.h >>conftest.$ac_ext
7858 cat >>conftest.$ac_ext <<_ACEOF
7859 /* end confdefs.h. */
7860 #include <sys/types.h>
7862 _ACEOF
7863 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7864 $EGREP "uid_t" >/dev/null 2>&1; then
7865 ac_cv_type_uid_t=yes
7866 else
7867 ac_cv_type_uid_t=no
7869 rm -f conftest*
7872 echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7873 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
7874 if test $ac_cv_type_uid_t = no; then
7876 cat >>confdefs.h <<\_ACEOF
7877 #define uid_t int
7878 _ACEOF
7881 cat >>confdefs.h <<\_ACEOF
7882 #define gid_t int
7883 _ACEOF
7887 echo "$as_me:$LINENO: checking for socklen_t" >&5
7888 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
7889 cat >conftest.$ac_ext <<_ACEOF
7890 /* confdefs.h. */
7891 _ACEOF
7892 cat confdefs.h >>conftest.$ac_ext
7893 cat >>conftest.$ac_ext <<_ACEOF
7894 /* end confdefs.h. */
7896 #include <sys/types.h>
7897 #include <sys/socket.h>
7898 socklen_t x;
7901 main ()
7905 return 0;
7907 _ACEOF
7908 rm -f conftest.$ac_objext
7909 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7910 (eval $ac_compile) 2>conftest.er1
7911 ac_status=$?
7912 grep -v '^ *+' conftest.er1 >conftest.err
7913 rm -f conftest.er1
7914 cat conftest.err >&5
7915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7916 (exit $ac_status); } &&
7917 { ac_try='test -z "$ac_c_werror_flag"
7918 || test ! -s conftest.err'
7919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7920 (eval $ac_try) 2>&5
7921 ac_status=$?
7922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7923 (exit $ac_status); }; } &&
7924 { ac_try='test -s conftest.$ac_objext'
7925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7926 (eval $ac_try) 2>&5
7927 ac_status=$?
7928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7929 (exit $ac_status); }; }; then
7930 echo "$as_me:$LINENO: result: yes" >&5
7931 echo "${ECHO_T}yes" >&6
7932 else
7933 echo "$as_me: failed program was:" >&5
7934 sed 's/^/| /' conftest.$ac_ext >&5
7937 cat >conftest.$ac_ext <<_ACEOF
7938 /* confdefs.h. */
7939 _ACEOF
7940 cat confdefs.h >>conftest.$ac_ext
7941 cat >>conftest.$ac_ext <<_ACEOF
7942 /* end confdefs.h. */
7944 #include <sys/types.h>
7945 #include <sys/socket.h>
7946 int accept (int, struct sockaddr *, size_t *);
7949 main ()
7953 return 0;
7955 _ACEOF
7956 rm -f conftest.$ac_objext
7957 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7958 (eval $ac_compile) 2>conftest.er1
7959 ac_status=$?
7960 grep -v '^ *+' conftest.er1 >conftest.err
7961 rm -f conftest.er1
7962 cat conftest.err >&5
7963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7964 (exit $ac_status); } &&
7965 { ac_try='test -z "$ac_c_werror_flag"
7966 || test ! -s conftest.err'
7967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7968 (eval $ac_try) 2>&5
7969 ac_status=$?
7970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7971 (exit $ac_status); }; } &&
7972 { ac_try='test -s conftest.$ac_objext'
7973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7974 (eval $ac_try) 2>&5
7975 ac_status=$?
7976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7977 (exit $ac_status); }; }; then
7979 echo "$as_me:$LINENO: result: size_t" >&5
7980 echo "${ECHO_T}size_t" >&6
7981 cat >>confdefs.h <<\_ACEOF
7982 #define socklen_t size_t
7983 _ACEOF
7985 else
7986 echo "$as_me: failed program was:" >&5
7987 sed 's/^/| /' conftest.$ac_ext >&5
7990 echo "$as_me:$LINENO: result: int" >&5
7991 echo "${ECHO_T}int" >&6
7992 cat >>confdefs.h <<\_ACEOF
7993 #define socklen_t int
7994 _ACEOF
7997 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7999 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8002 echo "$as_me:$LINENO: checking for int32_t" >&5
8003 echo $ECHO_N "checking for int32_t... $ECHO_C" >&6
8004 if test "${ac_cv_type_int32_t+set}" = set; then
8005 echo $ECHO_N "(cached) $ECHO_C" >&6
8006 else
8007 cat >conftest.$ac_ext <<_ACEOF
8008 /* confdefs.h. */
8009 _ACEOF
8010 cat confdefs.h >>conftest.$ac_ext
8011 cat >>conftest.$ac_ext <<_ACEOF
8012 /* end confdefs.h. */
8013 $ac_includes_default
8015 main ()
8017 if ((int32_t *) 0)
8018 return 0;
8019 if (sizeof (int32_t))
8020 return 0;
8022 return 0;
8024 _ACEOF
8025 rm -f conftest.$ac_objext
8026 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8027 (eval $ac_compile) 2>conftest.er1
8028 ac_status=$?
8029 grep -v '^ *+' conftest.er1 >conftest.err
8030 rm -f conftest.er1
8031 cat conftest.err >&5
8032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8033 (exit $ac_status); } &&
8034 { ac_try='test -z "$ac_c_werror_flag"
8035 || test ! -s conftest.err'
8036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8037 (eval $ac_try) 2>&5
8038 ac_status=$?
8039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8040 (exit $ac_status); }; } &&
8041 { ac_try='test -s conftest.$ac_objext'
8042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8043 (eval $ac_try) 2>&5
8044 ac_status=$?
8045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8046 (exit $ac_status); }; }; then
8047 ac_cv_type_int32_t=yes
8048 else
8049 echo "$as_me: failed program was:" >&5
8050 sed 's/^/| /' conftest.$ac_ext >&5
8052 ac_cv_type_int32_t=no
8054 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8056 echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
8057 echo "${ECHO_T}$ac_cv_type_int32_t" >&6
8058 if test $ac_cv_type_int32_t = yes; then
8060 else
8062 cat >>confdefs.h <<_ACEOF
8063 #define int32_t int
8064 _ACEOF
8069 echo "$as_me:$LINENO: checking for X" >&5
8070 echo $ECHO_N "checking for X... $ECHO_C" >&6
8073 # Check whether --with-x or --without-x was given.
8074 if test "${with_x+set}" = set; then
8075 withval="$with_x"
8078 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8079 if test "x$with_x" = xno; then
8080 # The user explicitly disabled X.
8081 have_x=disabled
8082 else
8083 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8084 # Both variables are already set.
8085 have_x=yes
8086 else
8087 if test "${ac_cv_have_x+set}" = set; then
8088 echo $ECHO_N "(cached) $ECHO_C" >&6
8089 else
8090 # One or both of the vars are not set, and there is no cached value.
8091 ac_x_includes=no ac_x_libraries=no
8092 rm -fr conftest.dir
8093 if mkdir conftest.dir; then
8094 cd conftest.dir
8095 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8096 cat >Imakefile <<'_ACEOF'
8097 acfindx:
8098 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8099 _ACEOF
8100 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8101 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8102 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8103 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8104 for ac_extension in a so sl; do
8105 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
8106 test -f $ac_im_libdir/libX11.$ac_extension; then
8107 ac_im_usrlibdir=$ac_im_libdir; break
8109 done
8110 # Screen out bogus values from the imake configuration. They are
8111 # bogus both because they are the default anyway, and because
8112 # using them would break gcc on systems where it needs fixed includes.
8113 case $ac_im_incroot in
8114 /usr/include) ;;
8115 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8116 esac
8117 case $ac_im_usrlibdir in
8118 /usr/lib | /lib) ;;
8119 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8120 esac
8122 cd ..
8123 rm -fr conftest.dir
8126 # Standard set of common directories for X headers.
8127 # Check X11 before X11Rn because it is often a symlink to the current release.
8128 ac_x_header_dirs='
8129 /usr/X11/include
8130 /usr/X11R6/include
8131 /usr/X11R5/include
8132 /usr/X11R4/include
8134 /usr/include/X11
8135 /usr/include/X11R6
8136 /usr/include/X11R5
8137 /usr/include/X11R4
8139 /usr/local/X11/include
8140 /usr/local/X11R6/include
8141 /usr/local/X11R5/include
8142 /usr/local/X11R4/include
8144 /usr/local/include/X11
8145 /usr/local/include/X11R6
8146 /usr/local/include/X11R5
8147 /usr/local/include/X11R4
8149 /usr/X386/include
8150 /usr/x386/include
8151 /usr/XFree86/include/X11
8153 /usr/include
8154 /usr/local/include
8155 /usr/unsupported/include
8156 /usr/athena/include
8157 /usr/local/x11r5/include
8158 /usr/lpp/Xamples/include
8160 /usr/openwin/include
8161 /usr/openwin/share/include'
8163 if test "$ac_x_includes" = no; then
8164 # Guess where to find include files, by looking for Xlib.h.
8165 # First, try using that file with no special directory specified.
8166 cat >conftest.$ac_ext <<_ACEOF
8167 /* confdefs.h. */
8168 _ACEOF
8169 cat confdefs.h >>conftest.$ac_ext
8170 cat >>conftest.$ac_ext <<_ACEOF
8171 /* end confdefs.h. */
8172 #include <X11/Xlib.h>
8173 _ACEOF
8174 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8175 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8176 ac_status=$?
8177 grep -v '^ *+' conftest.er1 >conftest.err
8178 rm -f conftest.er1
8179 cat conftest.err >&5
8180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8181 (exit $ac_status); } >/dev/null; then
8182 if test -s conftest.err; then
8183 ac_cpp_err=$ac_c_preproc_warn_flag
8184 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8185 else
8186 ac_cpp_err=
8188 else
8189 ac_cpp_err=yes
8191 if test -z "$ac_cpp_err"; then
8192 # We can compile using X headers with no special include directory.
8193 ac_x_includes=
8194 else
8195 echo "$as_me: failed program was:" >&5
8196 sed 's/^/| /' conftest.$ac_ext >&5
8198 for ac_dir in $ac_x_header_dirs; do
8199 if test -r "$ac_dir/X11/Xlib.h"; then
8200 ac_x_includes=$ac_dir
8201 break
8203 done
8205 rm -f conftest.err conftest.$ac_ext
8206 fi # $ac_x_includes = no
8208 if test "$ac_x_libraries" = no; then
8209 # Check for the libraries.
8210 # See if we find them without any special options.
8211 # Don't add to $LIBS permanently.
8212 ac_save_LIBS=$LIBS
8213 LIBS="-lX11 $LIBS"
8214 cat >conftest.$ac_ext <<_ACEOF
8215 /* confdefs.h. */
8216 _ACEOF
8217 cat confdefs.h >>conftest.$ac_ext
8218 cat >>conftest.$ac_ext <<_ACEOF
8219 /* end confdefs.h. */
8220 #include <X11/Xlib.h>
8222 main ()
8224 XrmInitialize ()
8226 return 0;
8228 _ACEOF
8229 rm -f conftest.$ac_objext conftest$ac_exeext
8230 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8231 (eval $ac_link) 2>conftest.er1
8232 ac_status=$?
8233 grep -v '^ *+' conftest.er1 >conftest.err
8234 rm -f conftest.er1
8235 cat conftest.err >&5
8236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8237 (exit $ac_status); } &&
8238 { ac_try='test -z "$ac_c_werror_flag"
8239 || test ! -s conftest.err'
8240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8241 (eval $ac_try) 2>&5
8242 ac_status=$?
8243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8244 (exit $ac_status); }; } &&
8245 { ac_try='test -s conftest$ac_exeext'
8246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8247 (eval $ac_try) 2>&5
8248 ac_status=$?
8249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8250 (exit $ac_status); }; }; then
8251 LIBS=$ac_save_LIBS
8252 # We can link X programs with no special library path.
8253 ac_x_libraries=
8254 else
8255 echo "$as_me: failed program was:" >&5
8256 sed 's/^/| /' conftest.$ac_ext >&5
8258 LIBS=$ac_save_LIBS
8259 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8261 # Don't even attempt the hair of trying to link an X program!
8262 for ac_extension in a so sl; do
8263 if test -r $ac_dir/libXt.$ac_extension; then
8264 ac_x_libraries=$ac_dir
8265 break 2
8267 done
8268 done
8270 rm -f conftest.err conftest.$ac_objext \
8271 conftest$ac_exeext conftest.$ac_ext
8272 fi # $ac_x_libraries = no
8274 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8275 # Didn't find X anywhere. Cache the known absence of X.
8276 ac_cv_have_x="have_x=no"
8277 else
8278 # Record where we found X for the cache.
8279 ac_cv_have_x="have_x=yes \
8280 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8285 eval "$ac_cv_have_x"
8286 fi # $with_x != no
8288 if test "$have_x" != yes; then
8289 echo "$as_me:$LINENO: result: $have_x" >&5
8290 echo "${ECHO_T}$have_x" >&6
8291 no_x=yes
8292 else
8293 # If each of the values was on the command line, it overrides each guess.
8294 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8295 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8296 # Update the cache value to reflect the command line values.
8297 ac_cv_have_x="have_x=yes \
8298 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8299 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
8300 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
8303 if test "$no_x" = yes; then
8304 # Not all programs may use this symbol, but it does not hurt to define it.
8306 cat >>confdefs.h <<\_ACEOF
8307 #define X_DISPLAY_MISSING 1
8308 _ACEOF
8310 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8311 else
8312 if test -n "$x_includes"; then
8313 X_CFLAGS="$X_CFLAGS -I$x_includes"
8316 # It would also be nice to do this for all -L options, not just this one.
8317 if test -n "$x_libraries"; then
8318 X_LIBS="$X_LIBS -L$x_libraries"
8319 # For Solaris; some versions of Sun CC require a space after -R and
8320 # others require no space. Words are not sufficient . . . .
8321 case `(uname -sr) 2>/dev/null` in
8322 "SunOS 5"*)
8323 echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
8324 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
8325 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8326 cat >conftest.$ac_ext <<_ACEOF
8327 /* confdefs.h. */
8328 _ACEOF
8329 cat confdefs.h >>conftest.$ac_ext
8330 cat >>conftest.$ac_ext <<_ACEOF
8331 /* end confdefs.h. */
8334 main ()
8338 return 0;
8340 _ACEOF
8341 rm -f conftest.$ac_objext conftest$ac_exeext
8342 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8343 (eval $ac_link) 2>conftest.er1
8344 ac_status=$?
8345 grep -v '^ *+' conftest.er1 >conftest.err
8346 rm -f conftest.er1
8347 cat conftest.err >&5
8348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8349 (exit $ac_status); } &&
8350 { ac_try='test -z "$ac_c_werror_flag"
8351 || test ! -s conftest.err'
8352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8353 (eval $ac_try) 2>&5
8354 ac_status=$?
8355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8356 (exit $ac_status); }; } &&
8357 { ac_try='test -s conftest$ac_exeext'
8358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8359 (eval $ac_try) 2>&5
8360 ac_status=$?
8361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8362 (exit $ac_status); }; }; then
8363 ac_R_nospace=yes
8364 else
8365 echo "$as_me: failed program was:" >&5
8366 sed 's/^/| /' conftest.$ac_ext >&5
8368 ac_R_nospace=no
8370 rm -f conftest.err conftest.$ac_objext \
8371 conftest$ac_exeext conftest.$ac_ext
8372 if test $ac_R_nospace = yes; then
8373 echo "$as_me:$LINENO: result: no" >&5
8374 echo "${ECHO_T}no" >&6
8375 X_LIBS="$X_LIBS -R$x_libraries"
8376 else
8377 LIBS="$ac_xsave_LIBS -R $x_libraries"
8378 cat >conftest.$ac_ext <<_ACEOF
8379 /* confdefs.h. */
8380 _ACEOF
8381 cat confdefs.h >>conftest.$ac_ext
8382 cat >>conftest.$ac_ext <<_ACEOF
8383 /* end confdefs.h. */
8386 main ()
8390 return 0;
8392 _ACEOF
8393 rm -f conftest.$ac_objext conftest$ac_exeext
8394 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8395 (eval $ac_link) 2>conftest.er1
8396 ac_status=$?
8397 grep -v '^ *+' conftest.er1 >conftest.err
8398 rm -f conftest.er1
8399 cat conftest.err >&5
8400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8401 (exit $ac_status); } &&
8402 { ac_try='test -z "$ac_c_werror_flag"
8403 || test ! -s conftest.err'
8404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8405 (eval $ac_try) 2>&5
8406 ac_status=$?
8407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8408 (exit $ac_status); }; } &&
8409 { ac_try='test -s conftest$ac_exeext'
8410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8411 (eval $ac_try) 2>&5
8412 ac_status=$?
8413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8414 (exit $ac_status); }; }; then
8415 ac_R_space=yes
8416 else
8417 echo "$as_me: failed program was:" >&5
8418 sed 's/^/| /' conftest.$ac_ext >&5
8420 ac_R_space=no
8422 rm -f conftest.err conftest.$ac_objext \
8423 conftest$ac_exeext conftest.$ac_ext
8424 if test $ac_R_space = yes; then
8425 echo "$as_me:$LINENO: result: yes" >&5
8426 echo "${ECHO_T}yes" >&6
8427 X_LIBS="$X_LIBS -R $x_libraries"
8428 else
8429 echo "$as_me:$LINENO: result: neither works" >&5
8430 echo "${ECHO_T}neither works" >&6
8433 LIBS=$ac_xsave_LIBS
8434 esac
8437 # Check for system-dependent libraries X programs must link with.
8438 # Do this before checking for the system-independent R6 libraries
8439 # (-lICE), since we may need -lsocket or whatever for X linking.
8441 if test "$ISC" = yes; then
8442 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
8443 else
8444 # Martyn Johnson says this is needed for Ultrix, if the X
8445 # libraries were built with DECnet support. And Karl Berry says
8446 # the Alpha needs dnet_stub (dnet does not exist).
8447 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
8448 cat >conftest.$ac_ext <<_ACEOF
8449 /* confdefs.h. */
8450 _ACEOF
8451 cat confdefs.h >>conftest.$ac_ext
8452 cat >>conftest.$ac_ext <<_ACEOF
8453 /* end confdefs.h. */
8455 /* Override any gcc2 internal prototype to avoid an error. */
8456 #ifdef __cplusplus
8457 extern "C"
8458 #endif
8459 /* We use char because int might match the return type of a gcc2
8460 builtin and then its argument prototype would still apply. */
8461 char XOpenDisplay ();
8463 main ()
8465 XOpenDisplay ();
8467 return 0;
8469 _ACEOF
8470 rm -f conftest.$ac_objext conftest$ac_exeext
8471 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8472 (eval $ac_link) 2>conftest.er1
8473 ac_status=$?
8474 grep -v '^ *+' conftest.er1 >conftest.err
8475 rm -f conftest.er1
8476 cat conftest.err >&5
8477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478 (exit $ac_status); } &&
8479 { ac_try='test -z "$ac_c_werror_flag"
8480 || test ! -s conftest.err'
8481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8482 (eval $ac_try) 2>&5
8483 ac_status=$?
8484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8485 (exit $ac_status); }; } &&
8486 { ac_try='test -s conftest$ac_exeext'
8487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8488 (eval $ac_try) 2>&5
8489 ac_status=$?
8490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491 (exit $ac_status); }; }; then
8493 else
8494 echo "$as_me: failed program was:" >&5
8495 sed 's/^/| /' conftest.$ac_ext >&5
8497 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
8498 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8499 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8500 echo $ECHO_N "(cached) $ECHO_C" >&6
8501 else
8502 ac_check_lib_save_LIBS=$LIBS
8503 LIBS="-ldnet $LIBS"
8504 cat >conftest.$ac_ext <<_ACEOF
8505 /* confdefs.h. */
8506 _ACEOF
8507 cat confdefs.h >>conftest.$ac_ext
8508 cat >>conftest.$ac_ext <<_ACEOF
8509 /* end confdefs.h. */
8511 /* Override any gcc2 internal prototype to avoid an error. */
8512 #ifdef __cplusplus
8513 extern "C"
8514 #endif
8515 /* We use char because int might match the return type of a gcc2
8516 builtin and then its argument prototype would still apply. */
8517 char dnet_ntoa ();
8519 main ()
8521 dnet_ntoa ();
8523 return 0;
8525 _ACEOF
8526 rm -f conftest.$ac_objext conftest$ac_exeext
8527 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8528 (eval $ac_link) 2>conftest.er1
8529 ac_status=$?
8530 grep -v '^ *+' conftest.er1 >conftest.err
8531 rm -f conftest.er1
8532 cat conftest.err >&5
8533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534 (exit $ac_status); } &&
8535 { ac_try='test -z "$ac_c_werror_flag"
8536 || test ! -s conftest.err'
8537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8538 (eval $ac_try) 2>&5
8539 ac_status=$?
8540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8541 (exit $ac_status); }; } &&
8542 { ac_try='test -s conftest$ac_exeext'
8543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8544 (eval $ac_try) 2>&5
8545 ac_status=$?
8546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8547 (exit $ac_status); }; }; then
8548 ac_cv_lib_dnet_dnet_ntoa=yes
8549 else
8550 echo "$as_me: failed program was:" >&5
8551 sed 's/^/| /' conftest.$ac_ext >&5
8553 ac_cv_lib_dnet_dnet_ntoa=no
8555 rm -f conftest.err conftest.$ac_objext \
8556 conftest$ac_exeext conftest.$ac_ext
8557 LIBS=$ac_check_lib_save_LIBS
8559 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8560 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8561 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
8562 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
8565 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
8566 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
8567 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
8568 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
8569 echo $ECHO_N "(cached) $ECHO_C" >&6
8570 else
8571 ac_check_lib_save_LIBS=$LIBS
8572 LIBS="-ldnet_stub $LIBS"
8573 cat >conftest.$ac_ext <<_ACEOF
8574 /* confdefs.h. */
8575 _ACEOF
8576 cat confdefs.h >>conftest.$ac_ext
8577 cat >>conftest.$ac_ext <<_ACEOF
8578 /* end confdefs.h. */
8580 /* Override any gcc2 internal prototype to avoid an error. */
8581 #ifdef __cplusplus
8582 extern "C"
8583 #endif
8584 /* We use char because int might match the return type of a gcc2
8585 builtin and then its argument prototype would still apply. */
8586 char dnet_ntoa ();
8588 main ()
8590 dnet_ntoa ();
8592 return 0;
8594 _ACEOF
8595 rm -f conftest.$ac_objext conftest$ac_exeext
8596 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8597 (eval $ac_link) 2>conftest.er1
8598 ac_status=$?
8599 grep -v '^ *+' conftest.er1 >conftest.err
8600 rm -f conftest.er1
8601 cat conftest.err >&5
8602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8603 (exit $ac_status); } &&
8604 { ac_try='test -z "$ac_c_werror_flag"
8605 || test ! -s conftest.err'
8606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8607 (eval $ac_try) 2>&5
8608 ac_status=$?
8609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8610 (exit $ac_status); }; } &&
8611 { ac_try='test -s conftest$ac_exeext'
8612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8613 (eval $ac_try) 2>&5
8614 ac_status=$?
8615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8616 (exit $ac_status); }; }; then
8617 ac_cv_lib_dnet_stub_dnet_ntoa=yes
8618 else
8619 echo "$as_me: failed program was:" >&5
8620 sed 's/^/| /' conftest.$ac_ext >&5
8622 ac_cv_lib_dnet_stub_dnet_ntoa=no
8624 rm -f conftest.err conftest.$ac_objext \
8625 conftest$ac_exeext conftest.$ac_ext
8626 LIBS=$ac_check_lib_save_LIBS
8628 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
8629 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
8630 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
8631 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
8636 rm -f conftest.err conftest.$ac_objext \
8637 conftest$ac_exeext conftest.$ac_ext
8638 LIBS="$ac_xsave_LIBS"
8640 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
8641 # to get the SysV transport functions.
8642 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
8643 # needs -lnsl.
8644 # The nsl library prevents programs from opening the X display
8645 # on Irix 5.2, according to T.E. Dickey.
8646 # The functions gethostbyname, getservbyname, and inet_addr are
8647 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
8648 echo "$as_me:$LINENO: checking for gethostbyname" >&5
8649 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
8650 if test "${ac_cv_func_gethostbyname+set}" = set; then
8651 echo $ECHO_N "(cached) $ECHO_C" >&6
8652 else
8653 cat >conftest.$ac_ext <<_ACEOF
8654 /* confdefs.h. */
8655 _ACEOF
8656 cat confdefs.h >>conftest.$ac_ext
8657 cat >>conftest.$ac_ext <<_ACEOF
8658 /* end confdefs.h. */
8659 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
8660 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8661 #define gethostbyname innocuous_gethostbyname
8663 /* System header to define __stub macros and hopefully few prototypes,
8664 which can conflict with char gethostbyname (); below.
8665 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8666 <limits.h> exists even on freestanding compilers. */
8668 #ifdef __STDC__
8669 # include <limits.h>
8670 #else
8671 # include <assert.h>
8672 #endif
8674 #undef gethostbyname
8676 /* Override any gcc2 internal prototype to avoid an error. */
8677 #ifdef __cplusplus
8678 extern "C"
8680 #endif
8681 /* We use char because int might match the return type of a gcc2
8682 builtin and then its argument prototype would still apply. */
8683 char gethostbyname ();
8684 /* The GNU C library defines this for functions which it implements
8685 to always fail with ENOSYS. Some functions are actually named
8686 something starting with __ and the normal name is an alias. */
8687 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
8688 choke me
8689 #else
8690 char (*f) () = gethostbyname;
8691 #endif
8692 #ifdef __cplusplus
8694 #endif
8697 main ()
8699 return f != gethostbyname;
8701 return 0;
8703 _ACEOF
8704 rm -f conftest.$ac_objext conftest$ac_exeext
8705 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8706 (eval $ac_link) 2>conftest.er1
8707 ac_status=$?
8708 grep -v '^ *+' conftest.er1 >conftest.err
8709 rm -f conftest.er1
8710 cat conftest.err >&5
8711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8712 (exit $ac_status); } &&
8713 { ac_try='test -z "$ac_c_werror_flag"
8714 || test ! -s conftest.err'
8715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8716 (eval $ac_try) 2>&5
8717 ac_status=$?
8718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8719 (exit $ac_status); }; } &&
8720 { ac_try='test -s conftest$ac_exeext'
8721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8722 (eval $ac_try) 2>&5
8723 ac_status=$?
8724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8725 (exit $ac_status); }; }; then
8726 ac_cv_func_gethostbyname=yes
8727 else
8728 echo "$as_me: failed program was:" >&5
8729 sed 's/^/| /' conftest.$ac_ext >&5
8731 ac_cv_func_gethostbyname=no
8733 rm -f conftest.err conftest.$ac_objext \
8734 conftest$ac_exeext conftest.$ac_ext
8736 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
8737 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
8739 if test $ac_cv_func_gethostbyname = no; then
8740 echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
8741 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
8742 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
8743 echo $ECHO_N "(cached) $ECHO_C" >&6
8744 else
8745 ac_check_lib_save_LIBS=$LIBS
8746 LIBS="-lnsl $LIBS"
8747 cat >conftest.$ac_ext <<_ACEOF
8748 /* confdefs.h. */
8749 _ACEOF
8750 cat confdefs.h >>conftest.$ac_ext
8751 cat >>conftest.$ac_ext <<_ACEOF
8752 /* end confdefs.h. */
8754 /* Override any gcc2 internal prototype to avoid an error. */
8755 #ifdef __cplusplus
8756 extern "C"
8757 #endif
8758 /* We use char because int might match the return type of a gcc2
8759 builtin and then its argument prototype would still apply. */
8760 char gethostbyname ();
8762 main ()
8764 gethostbyname ();
8766 return 0;
8768 _ACEOF
8769 rm -f conftest.$ac_objext conftest$ac_exeext
8770 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8771 (eval $ac_link) 2>conftest.er1
8772 ac_status=$?
8773 grep -v '^ *+' conftest.er1 >conftest.err
8774 rm -f conftest.er1
8775 cat conftest.err >&5
8776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8777 (exit $ac_status); } &&
8778 { ac_try='test -z "$ac_c_werror_flag"
8779 || test ! -s conftest.err'
8780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8781 (eval $ac_try) 2>&5
8782 ac_status=$?
8783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8784 (exit $ac_status); }; } &&
8785 { ac_try='test -s conftest$ac_exeext'
8786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8787 (eval $ac_try) 2>&5
8788 ac_status=$?
8789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8790 (exit $ac_status); }; }; then
8791 ac_cv_lib_nsl_gethostbyname=yes
8792 else
8793 echo "$as_me: failed program was:" >&5
8794 sed 's/^/| /' conftest.$ac_ext >&5
8796 ac_cv_lib_nsl_gethostbyname=no
8798 rm -f conftest.err conftest.$ac_objext \
8799 conftest$ac_exeext conftest.$ac_ext
8800 LIBS=$ac_check_lib_save_LIBS
8802 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
8803 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
8804 if test $ac_cv_lib_nsl_gethostbyname = yes; then
8805 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
8808 if test $ac_cv_lib_nsl_gethostbyname = no; then
8809 echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
8810 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
8811 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
8812 echo $ECHO_N "(cached) $ECHO_C" >&6
8813 else
8814 ac_check_lib_save_LIBS=$LIBS
8815 LIBS="-lbsd $LIBS"
8816 cat >conftest.$ac_ext <<_ACEOF
8817 /* confdefs.h. */
8818 _ACEOF
8819 cat confdefs.h >>conftest.$ac_ext
8820 cat >>conftest.$ac_ext <<_ACEOF
8821 /* end confdefs.h. */
8823 /* Override any gcc2 internal prototype to avoid an error. */
8824 #ifdef __cplusplus
8825 extern "C"
8826 #endif
8827 /* We use char because int might match the return type of a gcc2
8828 builtin and then its argument prototype would still apply. */
8829 char gethostbyname ();
8831 main ()
8833 gethostbyname ();
8835 return 0;
8837 _ACEOF
8838 rm -f conftest.$ac_objext conftest$ac_exeext
8839 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8840 (eval $ac_link) 2>conftest.er1
8841 ac_status=$?
8842 grep -v '^ *+' conftest.er1 >conftest.err
8843 rm -f conftest.er1
8844 cat conftest.err >&5
8845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8846 (exit $ac_status); } &&
8847 { ac_try='test -z "$ac_c_werror_flag"
8848 || test ! -s conftest.err'
8849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8850 (eval $ac_try) 2>&5
8851 ac_status=$?
8852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8853 (exit $ac_status); }; } &&
8854 { ac_try='test -s conftest$ac_exeext'
8855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8856 (eval $ac_try) 2>&5
8857 ac_status=$?
8858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8859 (exit $ac_status); }; }; then
8860 ac_cv_lib_bsd_gethostbyname=yes
8861 else
8862 echo "$as_me: failed program was:" >&5
8863 sed 's/^/| /' conftest.$ac_ext >&5
8865 ac_cv_lib_bsd_gethostbyname=no
8867 rm -f conftest.err conftest.$ac_objext \
8868 conftest$ac_exeext conftest.$ac_ext
8869 LIBS=$ac_check_lib_save_LIBS
8871 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
8872 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
8873 if test $ac_cv_lib_bsd_gethostbyname = yes; then
8874 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
8880 # lieder@skyler.mavd.honeywell.com says without -lsocket,
8881 # socket/setsockopt and other routines are undefined under SCO ODT
8882 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
8883 # on later versions), says Simon Leinen: it contains gethostby*
8884 # variants that don't use the name server (or something). -lsocket
8885 # must be given before -lnsl if both are needed. We assume that
8886 # if connect needs -lnsl, so does gethostbyname.
8887 echo "$as_me:$LINENO: checking for connect" >&5
8888 echo $ECHO_N "checking for connect... $ECHO_C" >&6
8889 if test "${ac_cv_func_connect+set}" = set; then
8890 echo $ECHO_N "(cached) $ECHO_C" >&6
8891 else
8892 cat >conftest.$ac_ext <<_ACEOF
8893 /* confdefs.h. */
8894 _ACEOF
8895 cat confdefs.h >>conftest.$ac_ext
8896 cat >>conftest.$ac_ext <<_ACEOF
8897 /* end confdefs.h. */
8898 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
8899 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8900 #define connect innocuous_connect
8902 /* System header to define __stub macros and hopefully few prototypes,
8903 which can conflict with char connect (); below.
8904 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8905 <limits.h> exists even on freestanding compilers. */
8907 #ifdef __STDC__
8908 # include <limits.h>
8909 #else
8910 # include <assert.h>
8911 #endif
8913 #undef connect
8915 /* Override any gcc2 internal prototype to avoid an error. */
8916 #ifdef __cplusplus
8917 extern "C"
8919 #endif
8920 /* We use char because int might match the return type of a gcc2
8921 builtin and then its argument prototype would still apply. */
8922 char connect ();
8923 /* The GNU C library defines this for functions which it implements
8924 to always fail with ENOSYS. Some functions are actually named
8925 something starting with __ and the normal name is an alias. */
8926 #if defined (__stub_connect) || defined (__stub___connect)
8927 choke me
8928 #else
8929 char (*f) () = connect;
8930 #endif
8931 #ifdef __cplusplus
8933 #endif
8936 main ()
8938 return f != connect;
8940 return 0;
8942 _ACEOF
8943 rm -f conftest.$ac_objext conftest$ac_exeext
8944 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8945 (eval $ac_link) 2>conftest.er1
8946 ac_status=$?
8947 grep -v '^ *+' conftest.er1 >conftest.err
8948 rm -f conftest.er1
8949 cat conftest.err >&5
8950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8951 (exit $ac_status); } &&
8952 { ac_try='test -z "$ac_c_werror_flag"
8953 || test ! -s conftest.err'
8954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8955 (eval $ac_try) 2>&5
8956 ac_status=$?
8957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8958 (exit $ac_status); }; } &&
8959 { ac_try='test -s conftest$ac_exeext'
8960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8961 (eval $ac_try) 2>&5
8962 ac_status=$?
8963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8964 (exit $ac_status); }; }; then
8965 ac_cv_func_connect=yes
8966 else
8967 echo "$as_me: failed program was:" >&5
8968 sed 's/^/| /' conftest.$ac_ext >&5
8970 ac_cv_func_connect=no
8972 rm -f conftest.err conftest.$ac_objext \
8973 conftest$ac_exeext conftest.$ac_ext
8975 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
8976 echo "${ECHO_T}$ac_cv_func_connect" >&6
8978 if test $ac_cv_func_connect = no; then
8979 echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
8980 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
8981 if test "${ac_cv_lib_socket_connect+set}" = set; then
8982 echo $ECHO_N "(cached) $ECHO_C" >&6
8983 else
8984 ac_check_lib_save_LIBS=$LIBS
8985 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
8986 cat >conftest.$ac_ext <<_ACEOF
8987 /* confdefs.h. */
8988 _ACEOF
8989 cat confdefs.h >>conftest.$ac_ext
8990 cat >>conftest.$ac_ext <<_ACEOF
8991 /* end confdefs.h. */
8993 /* Override any gcc2 internal prototype to avoid an error. */
8994 #ifdef __cplusplus
8995 extern "C"
8996 #endif
8997 /* We use char because int might match the return type of a gcc2
8998 builtin and then its argument prototype would still apply. */
8999 char connect ();
9001 main ()
9003 connect ();
9005 return 0;
9007 _ACEOF
9008 rm -f conftest.$ac_objext conftest$ac_exeext
9009 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9010 (eval $ac_link) 2>conftest.er1
9011 ac_status=$?
9012 grep -v '^ *+' conftest.er1 >conftest.err
9013 rm -f conftest.er1
9014 cat conftest.err >&5
9015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9016 (exit $ac_status); } &&
9017 { ac_try='test -z "$ac_c_werror_flag"
9018 || test ! -s conftest.err'
9019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9020 (eval $ac_try) 2>&5
9021 ac_status=$?
9022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9023 (exit $ac_status); }; } &&
9024 { ac_try='test -s conftest$ac_exeext'
9025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9026 (eval $ac_try) 2>&5
9027 ac_status=$?
9028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9029 (exit $ac_status); }; }; then
9030 ac_cv_lib_socket_connect=yes
9031 else
9032 echo "$as_me: failed program was:" >&5
9033 sed 's/^/| /' conftest.$ac_ext >&5
9035 ac_cv_lib_socket_connect=no
9037 rm -f conftest.err conftest.$ac_objext \
9038 conftest$ac_exeext conftest.$ac_ext
9039 LIBS=$ac_check_lib_save_LIBS
9041 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
9042 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
9043 if test $ac_cv_lib_socket_connect = yes; then
9044 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
9049 # Guillermo Gomez says -lposix is necessary on A/UX.
9050 echo "$as_me:$LINENO: checking for remove" >&5
9051 echo $ECHO_N "checking for remove... $ECHO_C" >&6
9052 if test "${ac_cv_func_remove+set}" = set; then
9053 echo $ECHO_N "(cached) $ECHO_C" >&6
9054 else
9055 cat >conftest.$ac_ext <<_ACEOF
9056 /* confdefs.h. */
9057 _ACEOF
9058 cat confdefs.h >>conftest.$ac_ext
9059 cat >>conftest.$ac_ext <<_ACEOF
9060 /* end confdefs.h. */
9061 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
9062 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9063 #define remove innocuous_remove
9065 /* System header to define __stub macros and hopefully few prototypes,
9066 which can conflict with char remove (); below.
9067 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9068 <limits.h> exists even on freestanding compilers. */
9070 #ifdef __STDC__
9071 # include <limits.h>
9072 #else
9073 # include <assert.h>
9074 #endif
9076 #undef remove
9078 /* Override any gcc2 internal prototype to avoid an error. */
9079 #ifdef __cplusplus
9080 extern "C"
9082 #endif
9083 /* We use char because int might match the return type of a gcc2
9084 builtin and then its argument prototype would still apply. */
9085 char remove ();
9086 /* The GNU C library defines this for functions which it implements
9087 to always fail with ENOSYS. Some functions are actually named
9088 something starting with __ and the normal name is an alias. */
9089 #if defined (__stub_remove) || defined (__stub___remove)
9090 choke me
9091 #else
9092 char (*f) () = remove;
9093 #endif
9094 #ifdef __cplusplus
9096 #endif
9099 main ()
9101 return f != remove;
9103 return 0;
9105 _ACEOF
9106 rm -f conftest.$ac_objext conftest$ac_exeext
9107 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9108 (eval $ac_link) 2>conftest.er1
9109 ac_status=$?
9110 grep -v '^ *+' conftest.er1 >conftest.err
9111 rm -f conftest.er1
9112 cat conftest.err >&5
9113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9114 (exit $ac_status); } &&
9115 { ac_try='test -z "$ac_c_werror_flag"
9116 || test ! -s conftest.err'
9117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9118 (eval $ac_try) 2>&5
9119 ac_status=$?
9120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9121 (exit $ac_status); }; } &&
9122 { ac_try='test -s conftest$ac_exeext'
9123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9124 (eval $ac_try) 2>&5
9125 ac_status=$?
9126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9127 (exit $ac_status); }; }; then
9128 ac_cv_func_remove=yes
9129 else
9130 echo "$as_me: failed program was:" >&5
9131 sed 's/^/| /' conftest.$ac_ext >&5
9133 ac_cv_func_remove=no
9135 rm -f conftest.err conftest.$ac_objext \
9136 conftest$ac_exeext conftest.$ac_ext
9138 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
9139 echo "${ECHO_T}$ac_cv_func_remove" >&6
9141 if test $ac_cv_func_remove = no; then
9142 echo "$as_me:$LINENO: checking for remove in -lposix" >&5
9143 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
9144 if test "${ac_cv_lib_posix_remove+set}" = set; then
9145 echo $ECHO_N "(cached) $ECHO_C" >&6
9146 else
9147 ac_check_lib_save_LIBS=$LIBS
9148 LIBS="-lposix $LIBS"
9149 cat >conftest.$ac_ext <<_ACEOF
9150 /* confdefs.h. */
9151 _ACEOF
9152 cat confdefs.h >>conftest.$ac_ext
9153 cat >>conftest.$ac_ext <<_ACEOF
9154 /* end confdefs.h. */
9156 /* Override any gcc2 internal prototype to avoid an error. */
9157 #ifdef __cplusplus
9158 extern "C"
9159 #endif
9160 /* We use char because int might match the return type of a gcc2
9161 builtin and then its argument prototype would still apply. */
9162 char remove ();
9164 main ()
9166 remove ();
9168 return 0;
9170 _ACEOF
9171 rm -f conftest.$ac_objext conftest$ac_exeext
9172 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9173 (eval $ac_link) 2>conftest.er1
9174 ac_status=$?
9175 grep -v '^ *+' conftest.er1 >conftest.err
9176 rm -f conftest.er1
9177 cat conftest.err >&5
9178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9179 (exit $ac_status); } &&
9180 { ac_try='test -z "$ac_c_werror_flag"
9181 || test ! -s conftest.err'
9182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9183 (eval $ac_try) 2>&5
9184 ac_status=$?
9185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9186 (exit $ac_status); }; } &&
9187 { ac_try='test -s conftest$ac_exeext'
9188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9189 (eval $ac_try) 2>&5
9190 ac_status=$?
9191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9192 (exit $ac_status); }; }; then
9193 ac_cv_lib_posix_remove=yes
9194 else
9195 echo "$as_me: failed program was:" >&5
9196 sed 's/^/| /' conftest.$ac_ext >&5
9198 ac_cv_lib_posix_remove=no
9200 rm -f conftest.err conftest.$ac_objext \
9201 conftest$ac_exeext conftest.$ac_ext
9202 LIBS=$ac_check_lib_save_LIBS
9204 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
9205 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
9206 if test $ac_cv_lib_posix_remove = yes; then
9207 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
9212 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
9213 echo "$as_me:$LINENO: checking for shmat" >&5
9214 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
9215 if test "${ac_cv_func_shmat+set}" = set; then
9216 echo $ECHO_N "(cached) $ECHO_C" >&6
9217 else
9218 cat >conftest.$ac_ext <<_ACEOF
9219 /* confdefs.h. */
9220 _ACEOF
9221 cat confdefs.h >>conftest.$ac_ext
9222 cat >>conftest.$ac_ext <<_ACEOF
9223 /* end confdefs.h. */
9224 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
9225 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9226 #define shmat innocuous_shmat
9228 /* System header to define __stub macros and hopefully few prototypes,
9229 which can conflict with char shmat (); below.
9230 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9231 <limits.h> exists even on freestanding compilers. */
9233 #ifdef __STDC__
9234 # include <limits.h>
9235 #else
9236 # include <assert.h>
9237 #endif
9239 #undef shmat
9241 /* Override any gcc2 internal prototype to avoid an error. */
9242 #ifdef __cplusplus
9243 extern "C"
9245 #endif
9246 /* We use char because int might match the return type of a gcc2
9247 builtin and then its argument prototype would still apply. */
9248 char shmat ();
9249 /* The GNU C library defines this for functions which it implements
9250 to always fail with ENOSYS. Some functions are actually named
9251 something starting with __ and the normal name is an alias. */
9252 #if defined (__stub_shmat) || defined (__stub___shmat)
9253 choke me
9254 #else
9255 char (*f) () = shmat;
9256 #endif
9257 #ifdef __cplusplus
9259 #endif
9262 main ()
9264 return f != shmat;
9266 return 0;
9268 _ACEOF
9269 rm -f conftest.$ac_objext conftest$ac_exeext
9270 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9271 (eval $ac_link) 2>conftest.er1
9272 ac_status=$?
9273 grep -v '^ *+' conftest.er1 >conftest.err
9274 rm -f conftest.er1
9275 cat conftest.err >&5
9276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9277 (exit $ac_status); } &&
9278 { ac_try='test -z "$ac_c_werror_flag"
9279 || test ! -s conftest.err'
9280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9281 (eval $ac_try) 2>&5
9282 ac_status=$?
9283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9284 (exit $ac_status); }; } &&
9285 { ac_try='test -s conftest$ac_exeext'
9286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9287 (eval $ac_try) 2>&5
9288 ac_status=$?
9289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9290 (exit $ac_status); }; }; then
9291 ac_cv_func_shmat=yes
9292 else
9293 echo "$as_me: failed program was:" >&5
9294 sed 's/^/| /' conftest.$ac_ext >&5
9296 ac_cv_func_shmat=no
9298 rm -f conftest.err conftest.$ac_objext \
9299 conftest$ac_exeext conftest.$ac_ext
9301 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
9302 echo "${ECHO_T}$ac_cv_func_shmat" >&6
9304 if test $ac_cv_func_shmat = no; then
9305 echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
9306 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
9307 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
9308 echo $ECHO_N "(cached) $ECHO_C" >&6
9309 else
9310 ac_check_lib_save_LIBS=$LIBS
9311 LIBS="-lipc $LIBS"
9312 cat >conftest.$ac_ext <<_ACEOF
9313 /* confdefs.h. */
9314 _ACEOF
9315 cat confdefs.h >>conftest.$ac_ext
9316 cat >>conftest.$ac_ext <<_ACEOF
9317 /* end confdefs.h. */
9319 /* Override any gcc2 internal prototype to avoid an error. */
9320 #ifdef __cplusplus
9321 extern "C"
9322 #endif
9323 /* We use char because int might match the return type of a gcc2
9324 builtin and then its argument prototype would still apply. */
9325 char shmat ();
9327 main ()
9329 shmat ();
9331 return 0;
9333 _ACEOF
9334 rm -f conftest.$ac_objext conftest$ac_exeext
9335 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9336 (eval $ac_link) 2>conftest.er1
9337 ac_status=$?
9338 grep -v '^ *+' conftest.er1 >conftest.err
9339 rm -f conftest.er1
9340 cat conftest.err >&5
9341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9342 (exit $ac_status); } &&
9343 { ac_try='test -z "$ac_c_werror_flag"
9344 || test ! -s conftest.err'
9345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9346 (eval $ac_try) 2>&5
9347 ac_status=$?
9348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9349 (exit $ac_status); }; } &&
9350 { ac_try='test -s conftest$ac_exeext'
9351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9352 (eval $ac_try) 2>&5
9353 ac_status=$?
9354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9355 (exit $ac_status); }; }; then
9356 ac_cv_lib_ipc_shmat=yes
9357 else
9358 echo "$as_me: failed program was:" >&5
9359 sed 's/^/| /' conftest.$ac_ext >&5
9361 ac_cv_lib_ipc_shmat=no
9363 rm -f conftest.err conftest.$ac_objext \
9364 conftest$ac_exeext conftest.$ac_ext
9365 LIBS=$ac_check_lib_save_LIBS
9367 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
9368 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
9369 if test $ac_cv_lib_ipc_shmat = yes; then
9370 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
9376 # Check for libraries that X11R6 Xt/Xaw programs need.
9377 ac_save_LDFLAGS=$LDFLAGS
9378 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9379 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9380 # check for ICE first), but we must link in the order -lSM -lICE or
9381 # we get undefined symbols. So assume we have SM if we have ICE.
9382 # These have to be linked with before -lX11, unlike the other
9383 # libraries we check for below, so use a different variable.
9384 # John Interrante, Karl Berry
9385 echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
9386 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
9387 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
9388 echo $ECHO_N "(cached) $ECHO_C" >&6
9389 else
9390 ac_check_lib_save_LIBS=$LIBS
9391 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
9392 cat >conftest.$ac_ext <<_ACEOF
9393 /* confdefs.h. */
9394 _ACEOF
9395 cat confdefs.h >>conftest.$ac_ext
9396 cat >>conftest.$ac_ext <<_ACEOF
9397 /* end confdefs.h. */
9399 /* Override any gcc2 internal prototype to avoid an error. */
9400 #ifdef __cplusplus
9401 extern "C"
9402 #endif
9403 /* We use char because int might match the return type of a gcc2
9404 builtin and then its argument prototype would still apply. */
9405 char IceConnectionNumber ();
9407 main ()
9409 IceConnectionNumber ();
9411 return 0;
9413 _ACEOF
9414 rm -f conftest.$ac_objext conftest$ac_exeext
9415 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9416 (eval $ac_link) 2>conftest.er1
9417 ac_status=$?
9418 grep -v '^ *+' conftest.er1 >conftest.err
9419 rm -f conftest.er1
9420 cat conftest.err >&5
9421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9422 (exit $ac_status); } &&
9423 { ac_try='test -z "$ac_c_werror_flag"
9424 || test ! -s conftest.err'
9425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9426 (eval $ac_try) 2>&5
9427 ac_status=$?
9428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9429 (exit $ac_status); }; } &&
9430 { ac_try='test -s conftest$ac_exeext'
9431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9432 (eval $ac_try) 2>&5
9433 ac_status=$?
9434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435 (exit $ac_status); }; }; then
9436 ac_cv_lib_ICE_IceConnectionNumber=yes
9437 else
9438 echo "$as_me: failed program was:" >&5
9439 sed 's/^/| /' conftest.$ac_ext >&5
9441 ac_cv_lib_ICE_IceConnectionNumber=no
9443 rm -f conftest.err conftest.$ac_objext \
9444 conftest$ac_exeext conftest.$ac_ext
9445 LIBS=$ac_check_lib_save_LIBS
9447 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9448 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
9449 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
9450 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
9453 LDFLAGS=$ac_save_LDFLAGS
9456 echo "$as_me:$LINENO: checking whether #! works in shell scripts" >&5
9457 echo $ECHO_N "checking whether #! works in shell scripts... $ECHO_C" >&6
9458 if test "${ac_cv_sys_interpreter+set}" = set; then
9459 echo $ECHO_N "(cached) $ECHO_C" >&6
9460 else
9461 echo '#! /bin/cat
9462 exit 69
9463 ' >conftest
9464 chmod u+x conftest
9465 (SHELL=/bin/sh; export SHELL; ./conftest >/dev/null)
9466 if test $? -ne 69; then
9467 ac_cv_sys_interpreter=yes
9468 else
9469 ac_cv_sys_interpreter=no
9471 rm -f conftest
9473 echo "$as_me:$LINENO: result: $ac_cv_sys_interpreter" >&5
9474 echo "${ECHO_T}$ac_cv_sys_interpreter" >&6
9475 interpval=$ac_cv_sys_interpreter
9478 cat >>confdefs.h <<_ACEOF
9479 #define EXEEXT "$EXEEXT"
9480 _ACEOF
9483 case $host in
9484 *-*-sunos*) cat >>confdefs.h <<\_ACEOF
9485 #define HAVE_SUN_OS 1
9486 _ACEOF
9488 *-*-solaris*) cat >>confdefs.h <<\_ACEOF
9489 #define HAVE_SUN_OS 1
9490 _ACEOF
9492 *-*-osf*) cat >>confdefs.h <<\_ACEOF
9493 #define HAVE_OSF1_OS 1
9494 _ACEOF
9496 *-*-aix*) cat >>confdefs.h <<\_ACEOF
9497 #define HAVE_AIX_OS 1
9498 _ACEOF
9500 *-*-hpux*) cat >>confdefs.h <<\_ACEOF
9501 #define HAVE_HPUX_OS 1
9502 _ACEOF
9504 *-*-linux*) cat >>confdefs.h <<\_ACEOF
9505 #define HAVE_LINUX_OS 1
9506 _ACEOF
9508 *-*-freebsd*) cat >>confdefs.h <<\_ACEOF
9509 #define HAVE_FREEBSD_OS 1
9510 _ACEOF
9512 *-*-netbsd*) cat >>confdefs.h <<\_ACEOF
9513 #define HAVE_NETBSD_OS 1
9514 _ACEOF
9516 *-*-openbsd*) cat >>confdefs.h <<\_ACEOF
9517 #define HAVE_OPENBSD_OS 1
9518 _ACEOF
9520 *-*-bsdi*) cat >>confdefs.h <<\_ACEOF
9521 #define HAVE_BSDI_OS 1
9522 _ACEOF
9524 *-*-irix*) cat >>confdefs.h <<\_ACEOF
9525 #define HAVE_SGI_OS 1
9526 _ACEOF
9528 *-*-darwin*) cat >>confdefs.h <<\_ACEOF
9529 #define HAVE_DARWIN_OS 1
9530 _ACEOF
9532 *-*-nto*) cat >>confdefs.h <<\_ACEOF
9533 #define HAVE_QNX_OS 1
9534 _ACEOF
9536 esac
9539 # Check whether --enable-all or --disable-all was given.
9540 if test "${enable_all+set}" = set; then
9541 enableval="$enable_all"
9542 if test "$enableval" = "yes" ; then
9543 enable_usb=yes
9544 enable_net=yes
9545 enable_snmp=yes
9546 enable_net_snmp=yes
9547 enable_test=yes
9548 enable_pcnet=yes
9549 enable_cgi=yes
9550 enable_gapcmon=yes
9555 case $host in
9556 *-*-linux*)
9557 HALPOLICYDIR="/usr/share/hal/fdi/policy/20thirdparty"
9560 HALPOLICYDIR=""
9562 esac
9565 # Check whether --with-halpolicydir or --without-halpolicydir was given.
9566 if test "${with_halpolicydir+set}" = set; then
9567 withval="$with_halpolicydir"
9568 HALPOLICYDIR=$withval
9571 if test "x$HALPOLICYDIR" != "x" ; then
9572 echo "$as_me:$LINENO: result: Using halpolicydir=$HALPOLICYDIR" >&5
9573 echo "${ECHO_T}Using halpolicydir=$HALPOLICYDIR" >&6
9574 else
9575 echo "$as_me:$LINENO: result: Will not install HAL policy file" >&5
9576 echo "${ECHO_T}Will not install HAL policy file" >&6
9580 #--------------------------------------------------------------------
9581 # Check for TCP wrapper support, code taken from Bacula KES-7Nov03
9582 #--------------------------------------------------------------------
9585 # Check whether --with-libwrap or --without-libwrap was given.
9586 if test "${with_libwrap+set}" = set; then
9587 withval="$with_libwrap"
9589 if test "x$withval" != "xno" ; then
9590 saved_LIBS="$LIBS"
9591 LIBS="$saved_LIBS -lwrap"
9592 echo "$as_me:$LINENO: checking for libwrap" >&5
9593 echo $ECHO_N "checking for libwrap... $ECHO_C" >&6
9594 cat >conftest.$ac_ext <<_ACEOF
9595 /* confdefs.h. */
9596 _ACEOF
9597 cat confdefs.h >>conftest.$ac_ext
9598 cat >>conftest.$ac_ext <<_ACEOF
9599 /* end confdefs.h. */
9600 #include <tcpd.h>
9601 int deny_severity = 0;
9602 int allow_severity = 0;
9603 struct request_info *req;
9605 main ()
9607 hosts_access(req);
9609 return 0;
9611 _ACEOF
9612 rm -f conftest.$ac_objext conftest$ac_exeext
9613 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9614 (eval $ac_link) 2>conftest.er1
9615 ac_status=$?
9616 grep -v '^ *+' conftest.er1 >conftest.err
9617 rm -f conftest.er1
9618 cat conftest.err >&5
9619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9620 (exit $ac_status); } &&
9621 { ac_try='test -z "$ac_c_werror_flag"
9622 || test ! -s conftest.err'
9623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9624 (eval $ac_try) 2>&5
9625 ac_status=$?
9626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9627 (exit $ac_status); }; } &&
9628 { ac_try='test -s conftest$ac_exeext'
9629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9630 (eval $ac_try) 2>&5
9631 ac_status=$?
9632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9633 (exit $ac_status); }; }; then
9634 echo "$as_me:$LINENO: result: yes" >&5
9635 echo "${ECHO_T}yes" >&6
9636 cat >>confdefs.h <<\_ACEOF
9637 #define HAVE_LIBWRAP 1
9638 _ACEOF
9640 TCPW_MSG="yes"
9641 else
9642 echo "$as_me: failed program was:" >&5
9643 sed 's/^/| /' conftest.$ac_ext >&5
9645 LIBS="$saved_LIBS -lwrap -lnsl"
9646 cat >conftest.$ac_ext <<_ACEOF
9647 /* confdefs.h. */
9648 _ACEOF
9649 cat confdefs.h >>conftest.$ac_ext
9650 cat >>conftest.$ac_ext <<_ACEOF
9651 /* end confdefs.h. */
9652 #include <tcpd.h>
9653 int deny_severity = 0;
9654 int allow_severity = 0;
9655 struct request_info *req;
9657 main ()
9659 hosts_access(req);
9661 return 0;
9663 _ACEOF
9664 rm -f conftest.$ac_objext conftest$ac_exeext
9665 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9666 (eval $ac_link) 2>conftest.er1
9667 ac_status=$?
9668 grep -v '^ *+' conftest.er1 >conftest.err
9669 rm -f conftest.er1
9670 cat conftest.err >&5
9671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9672 (exit $ac_status); } &&
9673 { ac_try='test -z "$ac_c_werror_flag"
9674 || test ! -s conftest.err'
9675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9676 (eval $ac_try) 2>&5
9677 ac_status=$?
9678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9679 (exit $ac_status); }; } &&
9680 { ac_try='test -s conftest$ac_exeext'
9681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9682 (eval $ac_try) 2>&5
9683 ac_status=$?
9684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9685 (exit $ac_status); }; }; then
9686 echo "$as_me:$LINENO: result: yes" >&5
9687 echo "${ECHO_T}yes" >&6
9688 cat >>confdefs.h <<\_ACEOF
9689 #define HAVE_LIBWRAP 1
9690 _ACEOF
9692 TCPW_MSG="yes"
9693 else
9694 echo "$as_me: failed program was:" >&5
9695 sed 's/^/| /' conftest.$ac_ext >&5
9697 { { echo "$as_me:$LINENO: error: *** libwrap missing" >&5
9698 echo "$as_me: error: *** libwrap missing" >&2;}
9699 { (exit 1); exit 1; }; }
9702 rm -f conftest.err conftest.$ac_objext \
9703 conftest$ac_exeext conftest.$ac_ext
9706 rm -f conftest.err conftest.$ac_objext \
9707 conftest$ac_exeext conftest.$ac_ext
9714 ENABLE_CGI="no"
9715 CGI=
9716 GD_LIBS=
9717 SYS_GD_FOUND=no
9718 # Check whether --enable-cgi or --disable-cgi was given.
9719 if test "${enable_cgi+set}" = set; then
9720 enableval="$enable_cgi"
9721 if test "$enableval" = "yes"
9722 then
9723 ENABLE_CGI="yes"
9724 CGI=cgi
9726 echo "$as_me:$LINENO: checking for gdImagePng in -lgd" >&5
9727 echo $ECHO_N "checking for gdImagePng in -lgd... $ECHO_C" >&6
9728 if test "${ac_cv_lib_gd_gdImagePng+set}" = set; then
9729 echo $ECHO_N "(cached) $ECHO_C" >&6
9730 else
9731 ac_check_lib_save_LIBS=$LIBS
9732 LIBS="-lgd ${X_LIBS} $LIBS"
9733 cat >conftest.$ac_ext <<_ACEOF
9734 /* confdefs.h. */
9735 _ACEOF
9736 cat confdefs.h >>conftest.$ac_ext
9737 cat >>conftest.$ac_ext <<_ACEOF
9738 /* end confdefs.h. */
9740 /* Override any gcc2 internal prototype to avoid an error. */
9741 #ifdef __cplusplus
9742 extern "C"
9743 #endif
9744 /* We use char because int might match the return type of a gcc2
9745 builtin and then its argument prototype would still apply. */
9746 char gdImagePng ();
9748 main ()
9750 gdImagePng ();
9752 return 0;
9754 _ACEOF
9755 rm -f conftest.$ac_objext conftest$ac_exeext
9756 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9757 (eval $ac_link) 2>conftest.er1
9758 ac_status=$?
9759 grep -v '^ *+' conftest.er1 >conftest.err
9760 rm -f conftest.er1
9761 cat conftest.err >&5
9762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9763 (exit $ac_status); } &&
9764 { ac_try='test -z "$ac_c_werror_flag"
9765 || test ! -s conftest.err'
9766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9767 (eval $ac_try) 2>&5
9768 ac_status=$?
9769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9770 (exit $ac_status); }; } &&
9771 { ac_try='test -s conftest$ac_exeext'
9772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9773 (eval $ac_try) 2>&5
9774 ac_status=$?
9775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9776 (exit $ac_status); }; }; then
9777 ac_cv_lib_gd_gdImagePng=yes
9778 else
9779 echo "$as_me: failed program was:" >&5
9780 sed 's/^/| /' conftest.$ac_ext >&5
9782 ac_cv_lib_gd_gdImagePng=no
9784 rm -f conftest.err conftest.$ac_objext \
9785 conftest$ac_exeext conftest.$ac_ext
9786 LIBS=$ac_check_lib_save_LIBS
9788 echo "$as_me:$LINENO: result: $ac_cv_lib_gd_gdImagePng" >&5
9789 echo "${ECHO_T}$ac_cv_lib_gd_gdImagePng" >&6
9790 if test $ac_cv_lib_gd_gdImagePng = yes; then
9791 echo "$as_me:$LINENO: result: using PNG file format (/usr/lib)." >&5
9792 echo "${ECHO_T}using PNG file format (/usr/lib)." >&6
9793 cat >>confdefs.h <<\_ACEOF
9794 #define SYS_IMGFMT_PNG 1
9795 _ACEOF
9797 GD_LIBS="-lgd"
9798 SYS_GD_FOUND=yes
9802 if test "${SYS_GD_FOUND}" = "no"
9803 then
9804 echo "$as_me:$LINENO: checking for gdImageGif in -lgd" >&5
9805 echo $ECHO_N "checking for gdImageGif in -lgd... $ECHO_C" >&6
9806 if test "${ac_cv_lib_gd_gdImageGif+set}" = set; then
9807 echo $ECHO_N "(cached) $ECHO_C" >&6
9808 else
9809 ac_check_lib_save_LIBS=$LIBS
9810 LIBS="-lgd ${X_LIBS} $LIBS"
9811 cat >conftest.$ac_ext <<_ACEOF
9812 /* confdefs.h. */
9813 _ACEOF
9814 cat confdefs.h >>conftest.$ac_ext
9815 cat >>conftest.$ac_ext <<_ACEOF
9816 /* end confdefs.h. */
9818 /* Override any gcc2 internal prototype to avoid an error. */
9819 #ifdef __cplusplus
9820 extern "C"
9821 #endif
9822 /* We use char because int might match the return type of a gcc2
9823 builtin and then its argument prototype would still apply. */
9824 char gdImageGif ();
9826 main ()
9828 gdImageGif ();
9830 return 0;
9832 _ACEOF
9833 rm -f conftest.$ac_objext conftest$ac_exeext
9834 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9835 (eval $ac_link) 2>conftest.er1
9836 ac_status=$?
9837 grep -v '^ *+' conftest.er1 >conftest.err
9838 rm -f conftest.er1
9839 cat conftest.err >&5
9840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9841 (exit $ac_status); } &&
9842 { ac_try='test -z "$ac_c_werror_flag"
9843 || test ! -s conftest.err'
9844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9845 (eval $ac_try) 2>&5
9846 ac_status=$?
9847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9848 (exit $ac_status); }; } &&
9849 { ac_try='test -s conftest$ac_exeext'
9850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9851 (eval $ac_try) 2>&5
9852 ac_status=$?
9853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9854 (exit $ac_status); }; }; then
9855 ac_cv_lib_gd_gdImageGif=yes
9856 else
9857 echo "$as_me: failed program was:" >&5
9858 sed 's/^/| /' conftest.$ac_ext >&5
9860 ac_cv_lib_gd_gdImageGif=no
9862 rm -f conftest.err conftest.$ac_objext \
9863 conftest$ac_exeext conftest.$ac_ext
9864 LIBS=$ac_check_lib_save_LIBS
9866 echo "$as_me:$LINENO: result: $ac_cv_lib_gd_gdImageGif" >&5
9867 echo "${ECHO_T}$ac_cv_lib_gd_gdImageGif" >&6
9868 if test $ac_cv_lib_gd_gdImageGif = yes; then
9869 echo "$as_me:$LINENO: result: using GIF file format (/usr/lib)." >&5
9870 echo "${ECHO_T}using GIF file format (/usr/lib)." >&6
9871 cat >>confdefs.h <<\_ACEOF
9872 #define SYS_IMGFMT_GIF 1
9873 _ACEOF
9875 GD_LIBS="-lgd"
9876 SYS_GD_FOUND=yes
9881 if test "${SYS_GD_FOUND}" = "no"
9882 then
9883 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
9884 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
9886 unset ac_cv_lib_gd_gdImagePng
9887 echo "$as_me:$LINENO: checking for gdImagePng in -lgd" >&5
9888 echo $ECHO_N "checking for gdImagePng in -lgd... $ECHO_C" >&6
9889 if test "${ac_cv_lib_gd_gdImagePng+set}" = set; then
9890 echo $ECHO_N "(cached) $ECHO_C" >&6
9891 else
9892 ac_check_lib_save_LIBS=$LIBS
9893 LIBS="-lgd ${X_LIBS} $LIBS"
9894 cat >conftest.$ac_ext <<_ACEOF
9895 /* confdefs.h. */
9896 _ACEOF
9897 cat confdefs.h >>conftest.$ac_ext
9898 cat >>conftest.$ac_ext <<_ACEOF
9899 /* end confdefs.h. */
9901 /* Override any gcc2 internal prototype to avoid an error. */
9902 #ifdef __cplusplus
9903 extern "C"
9904 #endif
9905 /* We use char because int might match the return type of a gcc2
9906 builtin and then its argument prototype would still apply. */
9907 char gdImagePng ();
9909 main ()
9911 gdImagePng ();
9913 return 0;
9915 _ACEOF
9916 rm -f conftest.$ac_objext conftest$ac_exeext
9917 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9918 (eval $ac_link) 2>conftest.er1
9919 ac_status=$?
9920 grep -v '^ *+' conftest.er1 >conftest.err
9921 rm -f conftest.er1
9922 cat conftest.err >&5
9923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9924 (exit $ac_status); } &&
9925 { ac_try='test -z "$ac_c_werror_flag"
9926 || test ! -s conftest.err'
9927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9928 (eval $ac_try) 2>&5
9929 ac_status=$?
9930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9931 (exit $ac_status); }; } &&
9932 { ac_try='test -s conftest$ac_exeext'
9933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9934 (eval $ac_try) 2>&5
9935 ac_status=$?
9936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9937 (exit $ac_status); }; }; then
9938 ac_cv_lib_gd_gdImagePng=yes
9939 else
9940 echo "$as_me: failed program was:" >&5
9941 sed 's/^/| /' conftest.$ac_ext >&5
9943 ac_cv_lib_gd_gdImagePng=no
9945 rm -f conftest.err conftest.$ac_objext \
9946 conftest$ac_exeext conftest.$ac_ext
9947 LIBS=$ac_check_lib_save_LIBS
9949 echo "$as_me:$LINENO: result: $ac_cv_lib_gd_gdImagePng" >&5
9950 echo "${ECHO_T}$ac_cv_lib_gd_gdImagePng" >&6
9951 if test $ac_cv_lib_gd_gdImagePng = yes; then
9952 echo "$as_me:$LINENO: result: using PNG file format (/usr/local/lib)." >&5
9953 echo "${ECHO_T}using PNG file format (/usr/local/lib)." >&6
9954 cat >>confdefs.h <<\_ACEOF
9955 #define SYS_IMGFMT_PNG 1
9956 _ACEOF
9958 GD_LIBS="-lgd"
9959 SYS_GD_FOUND=yes
9964 if test "${SYS_GD_FOUND}" = "no"
9965 then
9966 unset ac_cv_lib_gd_gdImageGif
9967 echo "$as_me:$LINENO: checking for gdImageGif in -lgd" >&5
9968 echo $ECHO_N "checking for gdImageGif in -lgd... $ECHO_C" >&6
9969 if test "${ac_cv_lib_gd_gdImageGif+set}" = set; then
9970 echo $ECHO_N "(cached) $ECHO_C" >&6
9971 else
9972 ac_check_lib_save_LIBS=$LIBS
9973 LIBS="-lgd ${X_LIBS} $LIBS"
9974 cat >conftest.$ac_ext <<_ACEOF
9975 /* confdefs.h. */
9976 _ACEOF
9977 cat confdefs.h >>conftest.$ac_ext
9978 cat >>conftest.$ac_ext <<_ACEOF
9979 /* end confdefs.h. */
9981 /* Override any gcc2 internal prototype to avoid an error. */
9982 #ifdef __cplusplus
9983 extern "C"
9984 #endif
9985 /* We use char because int might match the return type of a gcc2
9986 builtin and then its argument prototype would still apply. */
9987 char gdImageGif ();
9989 main ()
9991 gdImageGif ();
9993 return 0;
9995 _ACEOF
9996 rm -f conftest.$ac_objext conftest$ac_exeext
9997 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9998 (eval $ac_link) 2>conftest.er1
9999 ac_status=$?
10000 grep -v '^ *+' conftest.er1 >conftest.err
10001 rm -f conftest.er1
10002 cat conftest.err >&5
10003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10004 (exit $ac_status); } &&
10005 { ac_try='test -z "$ac_c_werror_flag"
10006 || test ! -s conftest.err'
10007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10008 (eval $ac_try) 2>&5
10009 ac_status=$?
10010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10011 (exit $ac_status); }; } &&
10012 { ac_try='test -s conftest$ac_exeext'
10013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10014 (eval $ac_try) 2>&5
10015 ac_status=$?
10016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017 (exit $ac_status); }; }; then
10018 ac_cv_lib_gd_gdImageGif=yes
10019 else
10020 echo "$as_me: failed program was:" >&5
10021 sed 's/^/| /' conftest.$ac_ext >&5
10023 ac_cv_lib_gd_gdImageGif=no
10025 rm -f conftest.err conftest.$ac_objext \
10026 conftest$ac_exeext conftest.$ac_ext
10027 LIBS=$ac_check_lib_save_LIBS
10029 echo "$as_me:$LINENO: result: $ac_cv_lib_gd_gdImageGif" >&5
10030 echo "${ECHO_T}$ac_cv_lib_gd_gdImageGif" >&6
10031 if test $ac_cv_lib_gd_gdImageGif = yes; then
10032 echo "$as_me:$LINENO: result: using GIF file format (/usr/local/lib)." >&5
10033 echo "${ECHO_T}using GIF file format (/usr/local/lib)." >&6
10034 cat >>confdefs.h <<\_ACEOF
10035 #define SYS_IMGFMT_GIF 1
10036 _ACEOF
10038 GD_LIBS="-lgd"
10039 SYS_GD_FOUND=yes
10044 if test "${SYS_GD_FOUND}" = "no"
10045 then
10046 { { echo "$as_me:$LINENO: error: Your system lacks the GD library which is needed for
10047 compiling the apcupsd CGI programs. Please install
10048 libgd and re-run the ./configure script.
10049 Alternatively you can disable the CGI support." >&5
10050 echo "$as_me: error: Your system lacks the GD library which is needed for
10051 compiling the apcupsd CGI programs. Please install
10052 libgd and re-run the ./configure script.
10053 Alternatively you can disable the CGI support." >&2;}
10054 { (exit 1); exit 1; }; }
10057 if test "${ac_cv_header_gd_h+set}" = set; then
10058 echo "$as_me:$LINENO: checking for gd.h" >&5
10059 echo $ECHO_N "checking for gd.h... $ECHO_C" >&6
10060 if test "${ac_cv_header_gd_h+set}" = set; then
10061 echo $ECHO_N "(cached) $ECHO_C" >&6
10063 echo "$as_me:$LINENO: result: $ac_cv_header_gd_h" >&5
10064 echo "${ECHO_T}$ac_cv_header_gd_h" >&6
10065 else
10066 # Is the header compilable?
10067 echo "$as_me:$LINENO: checking gd.h usability" >&5
10068 echo $ECHO_N "checking gd.h usability... $ECHO_C" >&6
10069 cat >conftest.$ac_ext <<_ACEOF
10070 /* confdefs.h. */
10071 _ACEOF
10072 cat confdefs.h >>conftest.$ac_ext
10073 cat >>conftest.$ac_ext <<_ACEOF
10074 /* end confdefs.h. */
10075 $ac_includes_default
10076 #include <gd.h>
10077 _ACEOF
10078 rm -f conftest.$ac_objext
10079 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10080 (eval $ac_compile) 2>conftest.er1
10081 ac_status=$?
10082 grep -v '^ *+' conftest.er1 >conftest.err
10083 rm -f conftest.er1
10084 cat conftest.err >&5
10085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10086 (exit $ac_status); } &&
10087 { ac_try='test -z "$ac_c_werror_flag"
10088 || test ! -s conftest.err'
10089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10090 (eval $ac_try) 2>&5
10091 ac_status=$?
10092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093 (exit $ac_status); }; } &&
10094 { ac_try='test -s conftest.$ac_objext'
10095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10096 (eval $ac_try) 2>&5
10097 ac_status=$?
10098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10099 (exit $ac_status); }; }; then
10100 ac_header_compiler=yes
10101 else
10102 echo "$as_me: failed program was:" >&5
10103 sed 's/^/| /' conftest.$ac_ext >&5
10105 ac_header_compiler=no
10107 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10108 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10109 echo "${ECHO_T}$ac_header_compiler" >&6
10111 # Is the header present?
10112 echo "$as_me:$LINENO: checking gd.h presence" >&5
10113 echo $ECHO_N "checking gd.h presence... $ECHO_C" >&6
10114 cat >conftest.$ac_ext <<_ACEOF
10115 /* confdefs.h. */
10116 _ACEOF
10117 cat confdefs.h >>conftest.$ac_ext
10118 cat >>conftest.$ac_ext <<_ACEOF
10119 /* end confdefs.h. */
10120 #include <gd.h>
10121 _ACEOF
10122 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10123 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10124 ac_status=$?
10125 grep -v '^ *+' conftest.er1 >conftest.err
10126 rm -f conftest.er1
10127 cat conftest.err >&5
10128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10129 (exit $ac_status); } >/dev/null; then
10130 if test -s conftest.err; then
10131 ac_cpp_err=$ac_c_preproc_warn_flag
10132 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10133 else
10134 ac_cpp_err=
10136 else
10137 ac_cpp_err=yes
10139 if test -z "$ac_cpp_err"; then
10140 ac_header_preproc=yes
10141 else
10142 echo "$as_me: failed program was:" >&5
10143 sed 's/^/| /' conftest.$ac_ext >&5
10145 ac_header_preproc=no
10147 rm -f conftest.err conftest.$ac_ext
10148 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10149 echo "${ECHO_T}$ac_header_preproc" >&6
10151 # So? What about this header?
10152 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10153 yes:no: )
10154 { echo "$as_me:$LINENO: WARNING: gd.h: accepted by the compiler, rejected by the preprocessor!" >&5
10155 echo "$as_me: WARNING: gd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10156 { echo "$as_me:$LINENO: WARNING: gd.h: proceeding with the compiler's result" >&5
10157 echo "$as_me: WARNING: gd.h: proceeding with the compiler's result" >&2;}
10158 ac_header_preproc=yes
10160 no:yes:* )
10161 { echo "$as_me:$LINENO: WARNING: gd.h: present but cannot be compiled" >&5
10162 echo "$as_me: WARNING: gd.h: present but cannot be compiled" >&2;}
10163 { echo "$as_me:$LINENO: WARNING: gd.h: check for missing prerequisite headers?" >&5
10164 echo "$as_me: WARNING: gd.h: check for missing prerequisite headers?" >&2;}
10165 { echo "$as_me:$LINENO: WARNING: gd.h: see the Autoconf documentation" >&5
10166 echo "$as_me: WARNING: gd.h: see the Autoconf documentation" >&2;}
10167 { echo "$as_me:$LINENO: WARNING: gd.h: section \"Present But Cannot Be Compiled\"" >&5
10168 echo "$as_me: WARNING: gd.h: section \"Present But Cannot Be Compiled\"" >&2;}
10169 { echo "$as_me:$LINENO: WARNING: gd.h: proceeding with the preprocessor's result" >&5
10170 echo "$as_me: WARNING: gd.h: proceeding with the preprocessor's result" >&2;}
10171 { echo "$as_me:$LINENO: WARNING: gd.h: in the future, the compiler will take precedence" >&5
10172 echo "$as_me: WARNING: gd.h: in the future, the compiler will take precedence" >&2;}
10174 cat <<\_ASBOX
10175 ## ------------------------------------------ ##
10176 ## Report this to the AC_PACKAGE_NAME lists. ##
10177 ## ------------------------------------------ ##
10178 _ASBOX
10180 sed "s/^/$as_me: WARNING: /" >&2
10182 esac
10183 echo "$as_me:$LINENO: checking for gd.h" >&5
10184 echo $ECHO_N "checking for gd.h... $ECHO_C" >&6
10185 if test "${ac_cv_header_gd_h+set}" = set; then
10186 echo $ECHO_N "(cached) $ECHO_C" >&6
10187 else
10188 ac_cv_header_gd_h=$ac_header_preproc
10190 echo "$as_me:$LINENO: result: $ac_cv_header_gd_h" >&5
10191 echo "${ECHO_T}$ac_cv_header_gd_h" >&6
10194 if test $ac_cv_header_gd_h = yes; then
10195 GDHEAD=
10196 else
10197 if test "${ac_cv_header_gd_gd_h+set}" = set; then
10198 echo "$as_me:$LINENO: checking for gd/gd.h" >&5
10199 echo $ECHO_N "checking for gd/gd.h... $ECHO_C" >&6
10200 if test "${ac_cv_header_gd_gd_h+set}" = set; then
10201 echo $ECHO_N "(cached) $ECHO_C" >&6
10203 echo "$as_me:$LINENO: result: $ac_cv_header_gd_gd_h" >&5
10204 echo "${ECHO_T}$ac_cv_header_gd_gd_h" >&6
10205 else
10206 # Is the header compilable?
10207 echo "$as_me:$LINENO: checking gd/gd.h usability" >&5
10208 echo $ECHO_N "checking gd/gd.h usability... $ECHO_C" >&6
10209 cat >conftest.$ac_ext <<_ACEOF
10210 /* confdefs.h. */
10211 _ACEOF
10212 cat confdefs.h >>conftest.$ac_ext
10213 cat >>conftest.$ac_ext <<_ACEOF
10214 /* end confdefs.h. */
10215 $ac_includes_default
10216 #include <gd/gd.h>
10217 _ACEOF
10218 rm -f conftest.$ac_objext
10219 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10220 (eval $ac_compile) 2>conftest.er1
10221 ac_status=$?
10222 grep -v '^ *+' conftest.er1 >conftest.err
10223 rm -f conftest.er1
10224 cat conftest.err >&5
10225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10226 (exit $ac_status); } &&
10227 { ac_try='test -z "$ac_c_werror_flag"
10228 || test ! -s conftest.err'
10229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10230 (eval $ac_try) 2>&5
10231 ac_status=$?
10232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10233 (exit $ac_status); }; } &&
10234 { ac_try='test -s conftest.$ac_objext'
10235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10236 (eval $ac_try) 2>&5
10237 ac_status=$?
10238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10239 (exit $ac_status); }; }; then
10240 ac_header_compiler=yes
10241 else
10242 echo "$as_me: failed program was:" >&5
10243 sed 's/^/| /' conftest.$ac_ext >&5
10245 ac_header_compiler=no
10247 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10248 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10249 echo "${ECHO_T}$ac_header_compiler" >&6
10251 # Is the header present?
10252 echo "$as_me:$LINENO: checking gd/gd.h presence" >&5
10253 echo $ECHO_N "checking gd/gd.h presence... $ECHO_C" >&6
10254 cat >conftest.$ac_ext <<_ACEOF
10255 /* confdefs.h. */
10256 _ACEOF
10257 cat confdefs.h >>conftest.$ac_ext
10258 cat >>conftest.$ac_ext <<_ACEOF
10259 /* end confdefs.h. */
10260 #include <gd/gd.h>
10261 _ACEOF
10262 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10263 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10264 ac_status=$?
10265 grep -v '^ *+' conftest.er1 >conftest.err
10266 rm -f conftest.er1
10267 cat conftest.err >&5
10268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10269 (exit $ac_status); } >/dev/null; then
10270 if test -s conftest.err; then
10271 ac_cpp_err=$ac_c_preproc_warn_flag
10272 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10273 else
10274 ac_cpp_err=
10276 else
10277 ac_cpp_err=yes
10279 if test -z "$ac_cpp_err"; then
10280 ac_header_preproc=yes
10281 else
10282 echo "$as_me: failed program was:" >&5
10283 sed 's/^/| /' conftest.$ac_ext >&5
10285 ac_header_preproc=no
10287 rm -f conftest.err conftest.$ac_ext
10288 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10289 echo "${ECHO_T}$ac_header_preproc" >&6
10291 # So? What about this header?
10292 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10293 yes:no: )
10294 { echo "$as_me:$LINENO: WARNING: gd/gd.h: accepted by the compiler, rejected by the preprocessor!" >&5
10295 echo "$as_me: WARNING: gd/gd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10296 { echo "$as_me:$LINENO: WARNING: gd/gd.h: proceeding with the compiler's result" >&5
10297 echo "$as_me: WARNING: gd/gd.h: proceeding with the compiler's result" >&2;}
10298 ac_header_preproc=yes
10300 no:yes:* )
10301 { echo "$as_me:$LINENO: WARNING: gd/gd.h: present but cannot be compiled" >&5
10302 echo "$as_me: WARNING: gd/gd.h: present but cannot be compiled" >&2;}
10303 { echo "$as_me:$LINENO: WARNING: gd/gd.h: check for missing prerequisite headers?" >&5
10304 echo "$as_me: WARNING: gd/gd.h: check for missing prerequisite headers?" >&2;}
10305 { echo "$as_me:$LINENO: WARNING: gd/gd.h: see the Autoconf documentation" >&5
10306 echo "$as_me: WARNING: gd/gd.h: see the Autoconf documentation" >&2;}
10307 { echo "$as_me:$LINENO: WARNING: gd/gd.h: section \"Present But Cannot Be Compiled\"" >&5
10308 echo "$as_me: WARNING: gd/gd.h: section \"Present But Cannot Be Compiled\"" >&2;}
10309 { echo "$as_me:$LINENO: WARNING: gd/gd.h: proceeding with the preprocessor's result" >&5
10310 echo "$as_me: WARNING: gd/gd.h: proceeding with the preprocessor's result" >&2;}
10311 { echo "$as_me:$LINENO: WARNING: gd/gd.h: in the future, the compiler will take precedence" >&5
10312 echo "$as_me: WARNING: gd/gd.h: in the future, the compiler will take precedence" >&2;}
10314 cat <<\_ASBOX
10315 ## ------------------------------------------ ##
10316 ## Report this to the AC_PACKAGE_NAME lists. ##
10317 ## ------------------------------------------ ##
10318 _ASBOX
10320 sed "s/^/$as_me: WARNING: /" >&2
10322 esac
10323 echo "$as_me:$LINENO: checking for gd/gd.h" >&5
10324 echo $ECHO_N "checking for gd/gd.h... $ECHO_C" >&6
10325 if test "${ac_cv_header_gd_gd_h+set}" = set; then
10326 echo $ECHO_N "(cached) $ECHO_C" >&6
10327 else
10328 ac_cv_header_gd_gd_h=$ac_header_preproc
10330 echo "$as_me:$LINENO: result: $ac_cv_header_gd_gd_h" >&5
10331 echo "${ECHO_T}$ac_cv_header_gd_gd_h" >&6
10334 if test $ac_cv_header_gd_gd_h = yes; then
10335 GDHEAD="gd/"
10336 else
10337 if test "${ac_cv_header_gd2_gd_h+set}" = set; then
10338 echo "$as_me:$LINENO: checking for gd2/gd.h" >&5
10339 echo $ECHO_N "checking for gd2/gd.h... $ECHO_C" >&6
10340 if test "${ac_cv_header_gd2_gd_h+set}" = set; then
10341 echo $ECHO_N "(cached) $ECHO_C" >&6
10343 echo "$as_me:$LINENO: result: $ac_cv_header_gd2_gd_h" >&5
10344 echo "${ECHO_T}$ac_cv_header_gd2_gd_h" >&6
10345 else
10346 # Is the header compilable?
10347 echo "$as_me:$LINENO: checking gd2/gd.h usability" >&5
10348 echo $ECHO_N "checking gd2/gd.h usability... $ECHO_C" >&6
10349 cat >conftest.$ac_ext <<_ACEOF
10350 /* confdefs.h. */
10351 _ACEOF
10352 cat confdefs.h >>conftest.$ac_ext
10353 cat >>conftest.$ac_ext <<_ACEOF
10354 /* end confdefs.h. */
10355 $ac_includes_default
10356 #include <gd2/gd.h>
10357 _ACEOF
10358 rm -f conftest.$ac_objext
10359 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10360 (eval $ac_compile) 2>conftest.er1
10361 ac_status=$?
10362 grep -v '^ *+' conftest.er1 >conftest.err
10363 rm -f conftest.er1
10364 cat conftest.err >&5
10365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10366 (exit $ac_status); } &&
10367 { ac_try='test -z "$ac_c_werror_flag"
10368 || test ! -s conftest.err'
10369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10370 (eval $ac_try) 2>&5
10371 ac_status=$?
10372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10373 (exit $ac_status); }; } &&
10374 { ac_try='test -s conftest.$ac_objext'
10375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10376 (eval $ac_try) 2>&5
10377 ac_status=$?
10378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10379 (exit $ac_status); }; }; then
10380 ac_header_compiler=yes
10381 else
10382 echo "$as_me: failed program was:" >&5
10383 sed 's/^/| /' conftest.$ac_ext >&5
10385 ac_header_compiler=no
10387 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10388 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10389 echo "${ECHO_T}$ac_header_compiler" >&6
10391 # Is the header present?
10392 echo "$as_me:$LINENO: checking gd2/gd.h presence" >&5
10393 echo $ECHO_N "checking gd2/gd.h presence... $ECHO_C" >&6
10394 cat >conftest.$ac_ext <<_ACEOF
10395 /* confdefs.h. */
10396 _ACEOF
10397 cat confdefs.h >>conftest.$ac_ext
10398 cat >>conftest.$ac_ext <<_ACEOF
10399 /* end confdefs.h. */
10400 #include <gd2/gd.h>
10401 _ACEOF
10402 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10403 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10404 ac_status=$?
10405 grep -v '^ *+' conftest.er1 >conftest.err
10406 rm -f conftest.er1
10407 cat conftest.err >&5
10408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10409 (exit $ac_status); } >/dev/null; then
10410 if test -s conftest.err; then
10411 ac_cpp_err=$ac_c_preproc_warn_flag
10412 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10413 else
10414 ac_cpp_err=
10416 else
10417 ac_cpp_err=yes
10419 if test -z "$ac_cpp_err"; then
10420 ac_header_preproc=yes
10421 else
10422 echo "$as_me: failed program was:" >&5
10423 sed 's/^/| /' conftest.$ac_ext >&5
10425 ac_header_preproc=no
10427 rm -f conftest.err conftest.$ac_ext
10428 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10429 echo "${ECHO_T}$ac_header_preproc" >&6
10431 # So? What about this header?
10432 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10433 yes:no: )
10434 { echo "$as_me:$LINENO: WARNING: gd2/gd.h: accepted by the compiler, rejected by the preprocessor!" >&5
10435 echo "$as_me: WARNING: gd2/gd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10436 { echo "$as_me:$LINENO: WARNING: gd2/gd.h: proceeding with the compiler's result" >&5
10437 echo "$as_me: WARNING: gd2/gd.h: proceeding with the compiler's result" >&2;}
10438 ac_header_preproc=yes
10440 no:yes:* )
10441 { echo "$as_me:$LINENO: WARNING: gd2/gd.h: present but cannot be compiled" >&5
10442 echo "$as_me: WARNING: gd2/gd.h: present but cannot be compiled" >&2;}
10443 { echo "$as_me:$LINENO: WARNING: gd2/gd.h: check for missing prerequisite headers?" >&5
10444 echo "$as_me: WARNING: gd2/gd.h: check for missing prerequisite headers?" >&2;}
10445 { echo "$as_me:$LINENO: WARNING: gd2/gd.h: see the Autoconf documentation" >&5
10446 echo "$as_me: WARNING: gd2/gd.h: see the Autoconf documentation" >&2;}
10447 { echo "$as_me:$LINENO: WARNING: gd2/gd.h: section \"Present But Cannot Be Compiled\"" >&5
10448 echo "$as_me: WARNING: gd2/gd.h: section \"Present But Cannot Be Compiled\"" >&2;}
10449 { echo "$as_me:$LINENO: WARNING: gd2/gd.h: proceeding with the preprocessor's result" >&5
10450 echo "$as_me: WARNING: gd2/gd.h: proceeding with the preprocessor's result" >&2;}
10451 { echo "$as_me:$LINENO: WARNING: gd2/gd.h: in the future, the compiler will take precedence" >&5
10452 echo "$as_me: WARNING: gd2/gd.h: in the future, the compiler will take precedence" >&2;}
10454 cat <<\_ASBOX
10455 ## ------------------------------------------ ##
10456 ## Report this to the AC_PACKAGE_NAME lists. ##
10457 ## ------------------------------------------ ##
10458 _ASBOX
10460 sed "s/^/$as_me: WARNING: /" >&2
10462 esac
10463 echo "$as_me:$LINENO: checking for gd2/gd.h" >&5
10464 echo $ECHO_N "checking for gd2/gd.h... $ECHO_C" >&6
10465 if test "${ac_cv_header_gd2_gd_h+set}" = set; then
10466 echo $ECHO_N "(cached) $ECHO_C" >&6
10467 else
10468 ac_cv_header_gd2_gd_h=$ac_header_preproc
10470 echo "$as_me:$LINENO: result: $ac_cv_header_gd2_gd_h" >&5
10471 echo "${ECHO_T}$ac_cv_header_gd2_gd_h" >&6
10474 if test $ac_cv_header_gd2_gd_h = yes; then
10475 GDHEAD="gd2/"
10476 else
10477 { { echo "$as_me:$LINENO: error: Found system GD library but no header file.
10478 Please find the file gd.h in your system
10479 include directories and report its location
10480 to apcupsd-users@lists.sourceforge.net" >&5
10481 echo "$as_me: error: Found system GD library but no header file.
10482 Please find the file gd.h in your system
10483 include directories and report its location
10484 to apcupsd-users@lists.sourceforge.net" >&2;}
10485 { (exit 1); exit 1; }; }
10504 # Check whether --enable-apcsmart or --disable-apcsmart was given.
10505 if test "${enable_apcsmart+set}" = set; then
10506 enableval="$enable_apcsmart"
10507 if test "$enableval" = "yes" ; then
10508 cat >>confdefs.h <<\_ACEOF
10509 #define HAVE_APCSMART_DRIVER 1
10510 _ACEOF
10513 APCSMART_DRIVER="apcsmart"
10516 else
10517 cat >>confdefs.h <<\_ACEOF
10518 #define HAVE_APCSMART_DRIVER 1
10519 _ACEOF
10521 APCSMART_DRIVER="apcsmart"
10525 # Check whether --enable-dumb or --disable-dumb was given.
10526 if test "${enable_dumb+set}" = set; then
10527 enableval="$enable_dumb"
10528 if test "$enableval" = "yes" ; then
10529 cat >>confdefs.h <<\_ACEOF
10530 #define HAVE_DUMB_DRIVER 1
10531 _ACEOF
10533 DUMB_DRIVER="dumb"
10536 else
10537 cat >>confdefs.h <<\_ACEOF
10538 #define HAVE_DUMB_DRIVER 1
10539 _ACEOF
10541 DUMB_DRIVER="dumb"
10545 GENERICUSB="no"
10547 # Check whether --with-generic-usb or --without-generic-usb was given.
10548 if test "${with_generic_usb+set}" = set; then
10549 withval="$with_generic_usb"
10550 GENERICUSB="yes"
10553 # Check whether --enable-usb or --disable-usb was given.
10554 if test "${enable_usb+set}" = set; then
10555 enableval="$enable_usb"
10556 if test "$enableval" = "yes" ; then
10557 if test $GENERICUSB = "yes" ; then
10558 usbhost=forcegeneric
10559 else
10560 usbhost=$host
10563 case $usbhost in
10564 *-*-freebsd*)
10565 tmp=`uname -r`
10566 if test ${tmp%%.*} -ge 8 ; then
10567 usbhost=forcegeneric
10570 esac
10572 case $usbhost in
10573 *-*-linux*)
10574 USB_TYPE="linux"
10575 echo "$as_me:$LINENO: result: Using Linux USB driver." >&5
10576 echo "${ECHO_T}Using Linux USB driver." >&6
10578 *-*-freebsd* | *-*-openbsd* | *-*-netbsd*)
10579 LIBUSBHIDINC="-I\$(topdir)/src/libusbhid"
10580 LIBUSBHID=libusbhid
10581 APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/libusbhid/libusbhid.a"
10584 USB_TYPE="bsd"
10585 echo "$as_me:$LINENO: result: Using BSD USB driver." >&5
10586 echo "${ECHO_T}Using BSD USB driver." >&6
10589 # Extract the first word of "libusb-config", so it can be a program name with args.
10590 set dummy libusb-config; ac_word=$2
10591 echo "$as_me:$LINENO: checking for $ac_word" >&5
10592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10593 if test "${ac_cv_path_usbcfg+set}" = set; then
10594 echo $ECHO_N "(cached) $ECHO_C" >&6
10595 else
10596 case $usbcfg in
10597 [\\/]* | ?:[\\/]*)
10598 ac_cv_path_usbcfg="$usbcfg" # Let the user override the test with a path.
10601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10602 for as_dir in $PATH
10604 IFS=$as_save_IFS
10605 test -z "$as_dir" && as_dir=.
10606 for ac_exec_ext in '' $ac_executable_extensions; do
10607 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10608 ac_cv_path_usbcfg="$as_dir/$ac_word$ac_exec_ext"
10609 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10610 break 2
10612 done
10613 done
10616 esac
10618 usbcfg=$ac_cv_path_usbcfg
10620 if test -n "$usbcfg"; then
10621 echo "$as_me:$LINENO: result: $usbcfg" >&5
10622 echo "${ECHO_T}$usbcfg" >&6
10623 else
10624 echo "$as_me:$LINENO: result: no" >&5
10625 echo "${ECHO_T}no" >&6
10628 if test x$usbcfg != x ; then
10629 LIBUSB=`$usbcfg --libs`
10630 LIBUSBH=`$usbcfg --prefix`/include/usb.h
10631 else
10632 echo "$as_me:$LINENO: checking for usb_init in -lusb" >&5
10633 echo $ECHO_N "checking for usb_init in -lusb... $ECHO_C" >&6
10634 if test "${ac_cv_lib_usb_usb_init+set}" = set; then
10635 echo $ECHO_N "(cached) $ECHO_C" >&6
10636 else
10637 ac_check_lib_save_LIBS=$LIBS
10638 LIBS="-lusb $DRVLIBS $LIBS"
10639 cat >conftest.$ac_ext <<_ACEOF
10640 /* confdefs.h. */
10641 _ACEOF
10642 cat confdefs.h >>conftest.$ac_ext
10643 cat >>conftest.$ac_ext <<_ACEOF
10644 /* end confdefs.h. */
10646 /* Override any gcc2 internal prototype to avoid an error. */
10647 #ifdef __cplusplus
10648 extern "C"
10649 #endif
10650 /* We use char because int might match the return type of a gcc2
10651 builtin and then its argument prototype would still apply. */
10652 char usb_init ();
10654 main ()
10656 usb_init ();
10658 return 0;
10660 _ACEOF
10661 rm -f conftest.$ac_objext conftest$ac_exeext
10662 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10663 (eval $ac_link) 2>conftest.er1
10664 ac_status=$?
10665 grep -v '^ *+' conftest.er1 >conftest.err
10666 rm -f conftest.er1
10667 cat conftest.err >&5
10668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10669 (exit $ac_status); } &&
10670 { ac_try='test -z "$ac_c_werror_flag"
10671 || test ! -s conftest.err'
10672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10673 (eval $ac_try) 2>&5
10674 ac_status=$?
10675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10676 (exit $ac_status); }; } &&
10677 { ac_try='test -s conftest$ac_exeext'
10678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10679 (eval $ac_try) 2>&5
10680 ac_status=$?
10681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10682 (exit $ac_status); }; }; then
10683 ac_cv_lib_usb_usb_init=yes
10684 else
10685 echo "$as_me: failed program was:" >&5
10686 sed 's/^/| /' conftest.$ac_ext >&5
10688 ac_cv_lib_usb_usb_init=no
10690 rm -f conftest.err conftest.$ac_objext \
10691 conftest$ac_exeext conftest.$ac_ext
10692 LIBS=$ac_check_lib_save_LIBS
10694 echo "$as_me:$LINENO: result: $ac_cv_lib_usb_usb_init" >&5
10695 echo "${ECHO_T}$ac_cv_lib_usb_usb_init" >&6
10696 if test $ac_cv_lib_usb_usb_init = yes; then
10697 LIBUSB=-lusb
10698 LIBUSBH=usb.h
10699 else
10700 { { echo "$as_me:$LINENO: error: Unable to find libusb" >&5
10701 echo "$as_me: error: Unable to find libusb" >&2;}
10702 { (exit 1); exit 1; }; }
10709 LIBUSBHIDINC="-I\$(topdir)/src/libusbhid"
10710 LIBUSBHID=libusbhid
10711 DRVLIBS="$DRVLIBS $LIBUSB"
10712 APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/libusbhid/libusbhid.a"
10715 USB_TYPE="generic"
10716 echo "$as_me:$LINENO: result: Using generic libusb USB driver." >&5
10717 echo "${ECHO_T}Using generic libusb USB driver." >&6
10719 esac
10721 cat >>confdefs.h <<\_ACEOF
10722 #define HAVE_USB_DRIVER 1
10723 _ACEOF
10725 USB_DRIVER="usb"
10729 DISPLAY_USB_DRIVER=$USB_TYPE-$USB_DRIVER
10733 # Check whether --enable-net or --disable-net was given.
10734 if test "${enable_net+set}" = set; then
10735 enableval="$enable_net"
10736 if test "$enableval" = "yes" ; then
10737 cat >>confdefs.h <<\_ACEOF
10738 #define HAVE_NET_DRIVER 1
10739 _ACEOF
10741 NET_DRIVER="net"
10744 else
10745 cat >>confdefs.h <<\_ACEOF
10746 #define HAVE_NET_DRIVER 1
10747 _ACEOF
10749 NET_DRIVER="net"
10753 # Check whether --enable-snmp or --disable-snmp was given.
10754 if test "${enable_snmp+set}" = set; then
10755 enableval="$enable_snmp"
10756 if test "$enableval" = "yes" ; then
10757 cat >>confdefs.h <<\_ACEOF
10758 #define HAVE_SNMPLITE_DRIVER 1
10759 _ACEOF
10761 SNMPLITE_DRIVER="snmplite"
10762 DISPLAY_SNMP_DRIVER="snmp"
10765 else
10766 cat >>confdefs.h <<\_ACEOF
10767 #define HAVE_SNMPLITE_DRIVER 1
10768 _ACEOF
10770 SNMPLITE_DRIVER="snmplite"
10771 DISPLAY_SNMP_DRIVER="snmp"
10775 # Check whether --enable-net-snmp or --disable-net-snmp was given.
10776 if test "${enable_net_snmp+set}" = set; then
10777 enableval="$enable_net_snmp"
10778 if test "$enableval" = "yes" ; then
10779 echo "$as_me:$LINENO: checking for EVP_DigestInit in -lcrypto" >&5
10780 echo $ECHO_N "checking for EVP_DigestInit in -lcrypto... $ECHO_C" >&6
10781 if test "${ac_cv_lib_crypto_EVP_DigestInit+set}" = set; then
10782 echo $ECHO_N "(cached) $ECHO_C" >&6
10783 else
10784 ac_check_lib_save_LIBS=$LIBS
10785 LIBS="-lcrypto $LIBS"
10786 cat >conftest.$ac_ext <<_ACEOF
10787 /* confdefs.h. */
10788 _ACEOF
10789 cat confdefs.h >>conftest.$ac_ext
10790 cat >>conftest.$ac_ext <<_ACEOF
10791 /* end confdefs.h. */
10793 /* Override any gcc2 internal prototype to avoid an error. */
10794 #ifdef __cplusplus
10795 extern "C"
10796 #endif
10797 /* We use char because int might match the return type of a gcc2
10798 builtin and then its argument prototype would still apply. */
10799 char EVP_DigestInit ();
10801 main ()
10803 EVP_DigestInit ();
10805 return 0;
10807 _ACEOF
10808 rm -f conftest.$ac_objext conftest$ac_exeext
10809 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10810 (eval $ac_link) 2>conftest.er1
10811 ac_status=$?
10812 grep -v '^ *+' conftest.er1 >conftest.err
10813 rm -f conftest.er1
10814 cat conftest.err >&5
10815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10816 (exit $ac_status); } &&
10817 { ac_try='test -z "$ac_c_werror_flag"
10818 || test ! -s conftest.err'
10819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10820 (eval $ac_try) 2>&5
10821 ac_status=$?
10822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10823 (exit $ac_status); }; } &&
10824 { ac_try='test -s conftest$ac_exeext'
10825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10826 (eval $ac_try) 2>&5
10827 ac_status=$?
10828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10829 (exit $ac_status); }; }; then
10830 ac_cv_lib_crypto_EVP_DigestInit=yes
10831 else
10832 echo "$as_me: failed program was:" >&5
10833 sed 's/^/| /' conftest.$ac_ext >&5
10835 ac_cv_lib_crypto_EVP_DigestInit=no
10837 rm -f conftest.err conftest.$ac_objext \
10838 conftest$ac_exeext conftest.$ac_ext
10839 LIBS=$ac_check_lib_save_LIBS
10841 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_EVP_DigestInit" >&5
10842 echo "${ECHO_T}$ac_cv_lib_crypto_EVP_DigestInit" >&6
10843 if test $ac_cv_lib_crypto_EVP_DigestInit = yes; then
10844 echo ' including crypto library for snmp.'
10845 DRVLIBS="$DRVLIBS -lcrypto"
10849 SNMP_LIB_FOUND="no"
10851 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
10852 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
10854 if test "$SNMP_LIB_FOUND" = "no" ; then
10855 echo "$as_me:$LINENO: checking for snmp_open in -lnetsnmp" >&5
10856 echo $ECHO_N "checking for snmp_open in -lnetsnmp... $ECHO_C" >&6
10857 if test "${ac_cv_lib_netsnmp_snmp_open+set}" = set; then
10858 echo $ECHO_N "(cached) $ECHO_C" >&6
10859 else
10860 ac_check_lib_save_LIBS=$LIBS
10861 LIBS="-lnetsnmp $DRVLIBS $LIBS"
10862 cat >conftest.$ac_ext <<_ACEOF
10863 /* confdefs.h. */
10864 _ACEOF
10865 cat confdefs.h >>conftest.$ac_ext
10866 cat >>conftest.$ac_ext <<_ACEOF
10867 /* end confdefs.h. */
10869 /* Override any gcc2 internal prototype to avoid an error. */
10870 #ifdef __cplusplus
10871 extern "C"
10872 #endif
10873 /* We use char because int might match the return type of a gcc2
10874 builtin and then its argument prototype would still apply. */
10875 char snmp_open ();
10877 main ()
10879 snmp_open ();
10881 return 0;
10883 _ACEOF
10884 rm -f conftest.$ac_objext conftest$ac_exeext
10885 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10886 (eval $ac_link) 2>conftest.er1
10887 ac_status=$?
10888 grep -v '^ *+' conftest.er1 >conftest.err
10889 rm -f conftest.er1
10890 cat conftest.err >&5
10891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10892 (exit $ac_status); } &&
10893 { ac_try='test -z "$ac_c_werror_flag"
10894 || test ! -s conftest.err'
10895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10896 (eval $ac_try) 2>&5
10897 ac_status=$?
10898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10899 (exit $ac_status); }; } &&
10900 { ac_try='test -s conftest$ac_exeext'
10901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10902 (eval $ac_try) 2>&5
10903 ac_status=$?
10904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10905 (exit $ac_status); }; }; then
10906 ac_cv_lib_netsnmp_snmp_open=yes
10907 else
10908 echo "$as_me: failed program was:" >&5
10909 sed 's/^/| /' conftest.$ac_ext >&5
10911 ac_cv_lib_netsnmp_snmp_open=no
10913 rm -f conftest.err conftest.$ac_objext \
10914 conftest$ac_exeext conftest.$ac_ext
10915 LIBS=$ac_check_lib_save_LIBS
10917 echo "$as_me:$LINENO: result: $ac_cv_lib_netsnmp_snmp_open" >&5
10918 echo "${ECHO_T}$ac_cv_lib_netsnmp_snmp_open" >&6
10919 if test $ac_cv_lib_netsnmp_snmp_open = yes; then
10920 DRVLIBS="$DRVLIBS -lnetsnmp"
10921 cat >>confdefs.h <<\_ACEOF
10922 #define HAVE_NET_SNMP 1
10923 _ACEOF
10925 SNMP_LIB_FOUND="yes"
10930 if test "$SNMP_LIB_FOUND" = "no" ; then
10931 echo "$as_me:$LINENO: checking for snmp_open in -lsnmp" >&5
10932 echo $ECHO_N "checking for snmp_open in -lsnmp... $ECHO_C" >&6
10933 if test "${ac_cv_lib_snmp_snmp_open+set}" = set; then
10934 echo $ECHO_N "(cached) $ECHO_C" >&6
10935 else
10936 ac_check_lib_save_LIBS=$LIBS
10937 LIBS="-lsnmp $DRVLIBS $LIBS"
10938 cat >conftest.$ac_ext <<_ACEOF
10939 /* confdefs.h. */
10940 _ACEOF
10941 cat confdefs.h >>conftest.$ac_ext
10942 cat >>conftest.$ac_ext <<_ACEOF
10943 /* end confdefs.h. */
10945 /* Override any gcc2 internal prototype to avoid an error. */
10946 #ifdef __cplusplus
10947 extern "C"
10948 #endif
10949 /* We use char because int might match the return type of a gcc2
10950 builtin and then its argument prototype would still apply. */
10951 char snmp_open ();
10953 main ()
10955 snmp_open ();
10957 return 0;
10959 _ACEOF
10960 rm -f conftest.$ac_objext conftest$ac_exeext
10961 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10962 (eval $ac_link) 2>conftest.er1
10963 ac_status=$?
10964 grep -v '^ *+' conftest.er1 >conftest.err
10965 rm -f conftest.er1
10966 cat conftest.err >&5
10967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10968 (exit $ac_status); } &&
10969 { ac_try='test -z "$ac_c_werror_flag"
10970 || test ! -s conftest.err'
10971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10972 (eval $ac_try) 2>&5
10973 ac_status=$?
10974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10975 (exit $ac_status); }; } &&
10976 { ac_try='test -s conftest$ac_exeext'
10977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10978 (eval $ac_try) 2>&5
10979 ac_status=$?
10980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10981 (exit $ac_status); }; }; then
10982 ac_cv_lib_snmp_snmp_open=yes
10983 else
10984 echo "$as_me: failed program was:" >&5
10985 sed 's/^/| /' conftest.$ac_ext >&5
10987 ac_cv_lib_snmp_snmp_open=no
10989 rm -f conftest.err conftest.$ac_objext \
10990 conftest$ac_exeext conftest.$ac_ext
10991 LIBS=$ac_check_lib_save_LIBS
10993 echo "$as_me:$LINENO: result: $ac_cv_lib_snmp_snmp_open" >&5
10994 echo "${ECHO_T}$ac_cv_lib_snmp_snmp_open" >&6
10995 if test $ac_cv_lib_snmp_snmp_open = yes; then
10996 DRVLIBS="$DRVLIBS -lsnmp"
10997 cat >>confdefs.h <<\_ACEOF
10998 #define HAVE_UCD_SNMP 1
10999 _ACEOF
11001 SNMP_LIB_FOUND="yes"
11006 if test "$SNMP_LIB_FOUND" = "no" ; then
11007 { { echo "$as_me:$LINENO: error: Cannot find SNMP libraries." >&5
11008 echo "$as_me: error: Cannot find SNMP libraries." >&2;}
11009 { (exit 1); exit 1; }; }
11012 cat >>confdefs.h <<\_ACEOF
11013 #define HAVE_SNMP_DRIVER 1
11014 _ACEOF
11016 DISPLAY_NETSNMP_DRIVER="net-snmp"
11018 SNMP_DRIVER="snmp"
11023 # Check whether --enable-test or --disable-test was given.
11024 if test "${enable_test+set}" = set; then
11025 enableval="$enable_test"
11026 if test "$enableval" = "yes" ; then
11027 cat >>confdefs.h <<\_ACEOF
11028 #define HAVE_TEST_DRIVER 1
11029 _ACEOF
11031 TEST_DRIVER="test"
11036 # Check whether --enable-pcnet or --disable-pcnet was given.
11037 if test "${enable_pcnet+set}" = set; then
11038 enableval="$enable_pcnet"
11039 if test "$enableval" = "yes" ; then
11040 cat >>confdefs.h <<\_ACEOF
11041 #define HAVE_PCNET_DRIVER 1
11042 _ACEOF
11044 PCNET_DRIVER="pcnet"
11047 else
11048 cat >>confdefs.h <<\_ACEOF
11049 #define HAVE_PCNET_DRIVER 1
11050 _ACEOF
11052 PCNET_DRIVER="pcnet"
11056 cat >>confdefs.h <<\_ACEOF
11057 #define HAVE_NISSERVER 1
11058 _ACEOF
11060 cat >>confdefs.h <<\_ACEOF
11061 #define HAVE_NISLIB 1
11062 _ACEOF
11064 NISSRV_ENABLED=yes
11066 NISIP="0.0.0.0"
11068 # Check whether --with-nisip or --without-nisip was given.
11069 if test "${with_nisip+set}" = set; then
11070 withval="$with_nisip"
11071 NISIP="$withval";
11076 CGIBIN="/etc/apcupsd"
11078 # Check whether --with-cgi-bin or --without-cgi-bin was given.
11079 if test "${with_cgi_bin+set}" = set; then
11080 withval="$with_cgi_bin"
11081 CGIBIN="$withval";
11084 GAPCMON=
11085 GAPCMON_ENABLED=no
11088 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11089 if test -n "$ac_tool_prefix"; then
11090 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
11091 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
11092 echo "$as_me:$LINENO: checking for $ac_word" >&5
11093 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11094 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11095 echo $ECHO_N "(cached) $ECHO_C" >&6
11096 else
11097 case $PKG_CONFIG in
11098 [\\/]* | ?:[\\/]*)
11099 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11103 for as_dir in $PATH
11105 IFS=$as_save_IFS
11106 test -z "$as_dir" && as_dir=.
11107 for ac_exec_ext in '' $ac_executable_extensions; do
11108 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11109 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11110 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11111 break 2
11113 done
11114 done
11117 esac
11119 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11121 if test -n "$PKG_CONFIG"; then
11122 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11123 echo "${ECHO_T}$PKG_CONFIG" >&6
11124 else
11125 echo "$as_me:$LINENO: result: no" >&5
11126 echo "${ECHO_T}no" >&6
11130 if test -z "$ac_cv_path_PKG_CONFIG"; then
11131 ac_pt_PKG_CONFIG=$PKG_CONFIG
11132 # Extract the first word of "pkg-config", so it can be a program name with args.
11133 set dummy pkg-config; ac_word=$2
11134 echo "$as_me:$LINENO: checking for $ac_word" >&5
11135 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11136 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
11137 echo $ECHO_N "(cached) $ECHO_C" >&6
11138 else
11139 case $ac_pt_PKG_CONFIG in
11140 [\\/]* | ?:[\\/]*)
11141 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
11144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11145 for as_dir in $PATH
11147 IFS=$as_save_IFS
11148 test -z "$as_dir" && as_dir=.
11149 for ac_exec_ext in '' $ac_executable_extensions; do
11150 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11151 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11152 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11153 break 2
11155 done
11156 done
11159 esac
11161 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
11163 if test -n "$ac_pt_PKG_CONFIG"; then
11164 echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
11165 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
11166 else
11167 echo "$as_me:$LINENO: result: no" >&5
11168 echo "${ECHO_T}no" >&6
11171 PKG_CONFIG=$ac_pt_PKG_CONFIG
11172 else
11173 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
11177 if test -n "$PKG_CONFIG"; then
11178 _pkg_min_version=0.9.0
11179 echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
11180 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6
11181 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
11182 echo "$as_me:$LINENO: result: yes" >&5
11183 echo "${ECHO_T}yes" >&6
11184 else
11185 echo "$as_me:$LINENO: result: no" >&5
11186 echo "${ECHO_T}no" >&6
11187 PKG_CONFIG=""
11191 # Check whether --enable-gapcmon or --disable-gapcmon was given.
11192 if test "${enable_gapcmon+set}" = set; then
11193 enableval="$enable_gapcmon"
11194 if test "$enableval" = "yes" ; then
11195 GAPCMON=gapcmon
11196 GAPCMON_ENABLED=yes
11199 pkg_failed=no
11200 echo "$as_me:$LINENO: checking for GAPCMON" >&5
11201 echo $ECHO_N "checking for GAPCMON... $ECHO_C" >&6
11203 if test -n "$PKG_CONFIG"; then
11204 if test -n "$GAPCMON_CFLAGS"; then
11205 pkg_cv_GAPCMON_CFLAGS="$GAPCMON_CFLAGS"
11206 else
11207 if test -n "$PKG_CONFIG" && \
11208 { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0\"") >&5
11209 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0") 2>&5
11210 ac_status=$?
11211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11212 (exit $ac_status); }; then
11213 pkg_cv_GAPCMON_CFLAGS=`$PKG_CONFIG --cflags-only-I "gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0" 2>/dev/null`
11214 else
11215 pkg_failed=yes
11218 else
11219 pkg_failed=untried
11221 if test -n "$PKG_CONFIG"; then
11222 if test -n "$GAPCMON_LIBS"; then
11223 pkg_cv_GAPCMON_LIBS="$GAPCMON_LIBS"
11224 else
11225 if test -n "$PKG_CONFIG" && \
11226 { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0\"") >&5
11227 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0") 2>&5
11228 ac_status=$?
11229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11230 (exit $ac_status); }; then
11231 pkg_cv_GAPCMON_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0" 2>/dev/null`
11232 else
11233 pkg_failed=yes
11236 else
11237 pkg_failed=untried
11242 if test $pkg_failed = yes; then
11244 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11245 _pkg_short_errors_supported=yes
11246 else
11247 _pkg_short_errors_supported=no
11249 if test $_pkg_short_errors_supported = yes; then
11250 GAPCMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0"`
11251 else
11252 GAPCMON_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0"`
11254 # Put the nasty error message in config.log where it belongs
11255 echo "$GAPCMON_PKG_ERRORS" >&5
11257 { { echo "$as_me:$LINENO: error: Package requirements (gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0) were not met:
11259 $GAPCMON_PKG_ERRORS
11261 Consider adjusting the PKG_CONFIG_PATH environment variable if you
11262 installed software in a non-standard prefix.
11264 Alternatively, you may set the environment variables GAPCMON_CFLAGS
11265 and GAPCMON_LIBS to avoid the need to call pkg-config.
11266 See the pkg-config man page for more details.
11267 " >&5
11268 echo "$as_me: error: Package requirements (gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0) were not met:
11270 $GAPCMON_PKG_ERRORS
11272 Consider adjusting the PKG_CONFIG_PATH environment variable if you
11273 installed software in a non-standard prefix.
11275 Alternatively, you may set the environment variables GAPCMON_CFLAGS
11276 and GAPCMON_LIBS to avoid the need to call pkg-config.
11277 See the pkg-config man page for more details.
11278 " >&2;}
11279 { (exit 1); exit 1; }; }
11280 elif test $pkg_failed = untried; then
11281 { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
11282 is in your PATH or set the PKG_CONFIG environment variable to the full
11283 path to pkg-config.
11285 Alternatively, you may set the environment variables GAPCMON_CFLAGS
11286 and GAPCMON_LIBS to avoid the need to call pkg-config.
11287 See the pkg-config man page for more details.
11289 To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
11290 See \`config.log' for more details." >&5
11291 echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
11292 is in your PATH or set the PKG_CONFIG environment variable to the full
11293 path to pkg-config.
11295 Alternatively, you may set the environment variables GAPCMON_CFLAGS
11296 and GAPCMON_LIBS to avoid the need to call pkg-config.
11297 See the pkg-config man page for more details.
11299 To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
11300 See \`config.log' for more details." >&2;}
11301 { (exit 1); exit 1; }; }
11302 else
11303 GAPCMON_CFLAGS=$pkg_cv_GAPCMON_CFLAGS
11304 GAPCMON_LIBS=$pkg_cv_GAPCMON_LIBS
11305 echo "$as_me:$LINENO: result: yes" >&5
11306 echo "${ECHO_T}yes" >&6
11309 GAPCMON_CFLAGS="$GAPCMON_CFLAGS -DVERSION=\\\"$VERSION\\\""
11314 APCAGENT=
11315 APCAGENT_ENABLED=no
11316 # Check whether --enable-apcagent or --disable-apcagent was given.
11317 if test "${enable_apcagent+set}" = set; then
11318 enableval="$enable_apcagent"
11319 if test "$enableval" = "yes" ; then
11320 case $host in
11321 *-*-darwin*)
11322 APCAGENT=apcagent
11323 APCAGENT_ENABLED=yes
11326 { { echo "$as_me:$LINENO: error: apcagent can only be built on Mac OS X" >&5
11327 echo "$as_me: error: apcagent can only be built on Mac OS X" >&2;}
11328 { (exit 1); exit 1; }; }
11330 esac
11332 else
11333 case $host in
11334 *-*-darwin*)
11335 APCAGENT=apcagent
11336 APCAGENT_ENABLED=yes
11338 esac
11344 ac_ext=c
11345 ac_cpp='$CPP $CPPFLAGS'
11346 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11347 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11348 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11350 echo "$as_me:$LINENO: checking how many arguments gethostbyname_r() takes" >&5
11351 echo $ECHO_N "checking how many arguments gethostbyname_r() takes... $ECHO_C" >&6
11353 if test "${ac_cv_func_which_gethostbyname_r+set}" = set; then
11354 echo $ECHO_N "(cached) $ECHO_C" >&6
11355 else
11358 ################################################################
11360 ac_cv_func_which_gethostbyname_r=unknown
11363 # ONE ARGUMENT (sanity check)
11366 # This should fail, as there is no variant of gethostbyname_r() that takes
11367 # a single argument. If it actually compiles, then we can assume that
11368 # netdb.h is not declaring the function, and the compiler is thereby
11369 # assuming an implicit prototype. In which case, we're out of luck.
11371 cat >conftest.$ac_ext <<_ACEOF
11372 /* confdefs.h. */
11373 _ACEOF
11374 cat confdefs.h >>conftest.$ac_ext
11375 cat >>conftest.$ac_ext <<_ACEOF
11376 /* end confdefs.h. */
11377 #include <netdb.h>
11379 main ()
11382 char *name = "www.gnu.org";
11383 (void)gethostbyname_r(name) /* ; */
11386 return 0;
11388 _ACEOF
11389 rm -f conftest.$ac_objext
11390 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11391 (eval $ac_compile) 2>conftest.er1
11392 ac_status=$?
11393 grep -v '^ *+' conftest.er1 >conftest.err
11394 rm -f conftest.er1
11395 cat conftest.err >&5
11396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11397 (exit $ac_status); } &&
11398 { ac_try='test -z "$ac_c_werror_flag"
11399 || test ! -s conftest.err'
11400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11401 (eval $ac_try) 2>&5
11402 ac_status=$?
11403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11404 (exit $ac_status); }; } &&
11405 { ac_try='test -s conftest.$ac_objext'
11406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11407 (eval $ac_try) 2>&5
11408 ac_status=$?
11409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11410 (exit $ac_status); }; }; then
11411 ac_cv_func_which_gethostbyname_r=no
11412 else
11413 echo "$as_me: failed program was:" >&5
11414 sed 's/^/| /' conftest.$ac_ext >&5
11417 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11420 # SIX ARGUMENTS
11421 # (e.g. Linux)
11424 if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
11426 cat >conftest.$ac_ext <<_ACEOF
11427 /* confdefs.h. */
11428 _ACEOF
11429 cat confdefs.h >>conftest.$ac_ext
11430 cat >>conftest.$ac_ext <<_ACEOF
11431 /* end confdefs.h. */
11432 #include <netdb.h>
11434 main ()
11437 char *name = "www.gnu.org";
11438 struct hostent ret, *retp;
11439 char buf[1024];
11440 int buflen = 1024;
11441 int my_h_errno;
11442 (void)gethostbyname_r(name, &ret, buf, buflen, &retp, &my_h_errno) /* ; */
11445 return 0;
11447 _ACEOF
11448 rm -f conftest.$ac_objext
11449 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11450 (eval $ac_compile) 2>conftest.er1
11451 ac_status=$?
11452 grep -v '^ *+' conftest.er1 >conftest.err
11453 rm -f conftest.er1
11454 cat conftest.err >&5
11455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11456 (exit $ac_status); } &&
11457 { ac_try='test -z "$ac_c_werror_flag"
11458 || test ! -s conftest.err'
11459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11460 (eval $ac_try) 2>&5
11461 ac_status=$?
11462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11463 (exit $ac_status); }; } &&
11464 { ac_try='test -s conftest.$ac_objext'
11465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11466 (eval $ac_try) 2>&5
11467 ac_status=$?
11468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11469 (exit $ac_status); }; }; then
11470 ac_cv_func_which_gethostbyname_r=six
11471 else
11472 echo "$as_me: failed program was:" >&5
11473 sed 's/^/| /' conftest.$ac_ext >&5
11476 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11481 # FIVE ARGUMENTS
11482 # (e.g. Solaris)
11485 if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
11487 cat >conftest.$ac_ext <<_ACEOF
11488 /* confdefs.h. */
11489 _ACEOF
11490 cat confdefs.h >>conftest.$ac_ext
11491 cat >>conftest.$ac_ext <<_ACEOF
11492 /* end confdefs.h. */
11493 #include <netdb.h>
11495 main ()
11498 char *name = "www.gnu.org";
11499 struct hostent ret;
11500 char buf[1024];
11501 int buflen = 1024;
11502 int my_h_errno;
11503 (void)gethostbyname_r(name, &ret, buf, buflen, &my_h_errno) /* ; */
11506 return 0;
11508 _ACEOF
11509 rm -f conftest.$ac_objext
11510 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11511 (eval $ac_compile) 2>conftest.er1
11512 ac_status=$?
11513 grep -v '^ *+' conftest.er1 >conftest.err
11514 rm -f conftest.er1
11515 cat conftest.err >&5
11516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11517 (exit $ac_status); } &&
11518 { ac_try='test -z "$ac_c_werror_flag"
11519 || test ! -s conftest.err'
11520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11521 (eval $ac_try) 2>&5
11522 ac_status=$?
11523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11524 (exit $ac_status); }; } &&
11525 { ac_try='test -s conftest.$ac_objext'
11526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11527 (eval $ac_try) 2>&5
11528 ac_status=$?
11529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11530 (exit $ac_status); }; }; then
11531 ac_cv_func_which_gethostbyname_r=five
11532 else
11533 echo "$as_me: failed program was:" >&5
11534 sed 's/^/| /' conftest.$ac_ext >&5
11537 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11542 # THREE ARGUMENTS
11543 # (e.g. AIX, HP-UX, Tru64)
11546 if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
11548 cat >conftest.$ac_ext <<_ACEOF
11549 /* confdefs.h. */
11550 _ACEOF
11551 cat confdefs.h >>conftest.$ac_ext
11552 cat >>conftest.$ac_ext <<_ACEOF
11553 /* end confdefs.h. */
11554 #include <netdb.h>
11556 main ()
11559 char *name = "www.gnu.org";
11560 struct hostent ret;
11561 struct hostent_data data;
11562 (void)gethostbyname_r(name, &ret, &data) /* ; */
11565 return 0;
11567 _ACEOF
11568 rm -f conftest.$ac_objext
11569 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11570 (eval $ac_compile) 2>conftest.er1
11571 ac_status=$?
11572 grep -v '^ *+' conftest.er1 >conftest.err
11573 rm -f conftest.er1
11574 cat conftest.err >&5
11575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11576 (exit $ac_status); } &&
11577 { ac_try='test -z "$ac_c_werror_flag"
11578 || test ! -s conftest.err'
11579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11580 (eval $ac_try) 2>&5
11581 ac_status=$?
11582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11583 (exit $ac_status); }; } &&
11584 { ac_try='test -s conftest.$ac_objext'
11585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11586 (eval $ac_try) 2>&5
11587 ac_status=$?
11588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11589 (exit $ac_status); }; }; then
11590 ac_cv_func_which_gethostbyname_r=three
11591 else
11592 echo "$as_me: failed program was:" >&5
11593 sed 's/^/| /' conftest.$ac_ext >&5
11596 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11600 ################################################################
11605 case "$ac_cv_func_which_gethostbyname_r" in
11606 three)
11607 echo "$as_me:$LINENO: result: three" >&5
11608 echo "${ECHO_T}three" >&6
11609 cat >>confdefs.h <<\_ACEOF
11610 #define HAVE_FUNC_GETHOSTBYNAME_R_3 1
11611 _ACEOF
11615 five)
11616 echo "$as_me:$LINENO: result: five" >&5
11617 echo "${ECHO_T}five" >&6
11618 cat >>confdefs.h <<\_ACEOF
11619 #define HAVE_FUNC_GETHOSTBYNAME_R_5 1
11620 _ACEOF
11624 six)
11625 echo "$as_me:$LINENO: result: six" >&5
11626 echo "${ECHO_T}six" >&6
11627 cat >>confdefs.h <<\_ACEOF
11628 #define HAVE_FUNC_GETHOSTBYNAME_R_6 1
11629 _ACEOF
11634 echo "$as_me:$LINENO: result: cannot find function declaration in netdb.h" >&5
11635 echo "${ECHO_T}cannot find function declaration in netdb.h" >&6
11638 unknown)
11639 echo "$as_me:$LINENO: result: can't tell" >&5
11640 echo "${ECHO_T}can't tell" >&6
11644 { { echo "$as_me:$LINENO: error: internal error" >&5
11645 echo "$as_me: error: internal error" >&2;}
11646 { (exit 1); exit 1; }; }
11648 esac
11650 ac_ext=c
11651 ac_cpp='$CPP $CPPFLAGS'
11652 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11653 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11654 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11658 case "$ac_cv_func_which_gethostbyname_r" in
11659 three)
11660 cat >>confdefs.h <<\_ACEOF
11661 #define HAVE_FUNC_GETHOSTBYNAME_R_3 1
11662 _ACEOF
11664 GAPCMON_CFLAGS="$GAPCMON_CFLAGS -DHAVE_FUNC_GETHOSTBYNAME_R_3"
11667 five)
11668 cat >>confdefs.h <<\_ACEOF
11669 #define HAVE_FUNC_GETHOSTBYNAME_R_5 1
11670 _ACEOF
11672 GAPCMON_CFLAGS="$GAPCMON_CFLAGS -DHAVE_FUNC_GETHOSTBYNAME_R_5"
11675 six)
11676 cat >>confdefs.h <<\_ACEOF
11677 #define HAVE_FUNC_GETHOSTBYNAME_R_6 1
11678 _ACEOF
11680 GAPCMON_CFLAGS="$GAPCMON_CFLAGS -DHAVE_FUNC_GETHOSTBYNAME_R_6"
11684 cat >>confdefs.h <<\_ACEOF
11685 #define HAVE_FUNC_GETHOSTBYNAME_R_0 1
11686 _ACEOF
11688 GAPCMON_CFLAGS="$GAPCMON_CFLAGS -DHAVE_FUNC_GETHOSTBYNAME_R_0"
11692 { { echo "$as_me:$LINENO: error: gethostbyname_r is required" >&5
11693 echo "$as_me: error: gethostbyname_r is required" >&2;}
11694 { (exit 1); exit 1; }; }
11696 esac
11698 if test -n "$GCC"; then
11699 # Starting with GCC 3.0, you must link C++ programs against either
11700 # libstdc++ (shared by default), or libsupc++ (always static). If
11701 # you care about binary portability between Linux distributions,
11702 # you need to either 1) build your own GCC with static C++ libraries
11703 # or 2) link using gcc and libsupc++. We choose the latter since
11704 # CUPS doesn't (currently) use any of the stdc++ library.
11706 # Previous versions of GCC do not have the reliance on the stdc++
11707 # or g++ libraries, so the extra supc++ library is not needed.
11708 echo "$as_me:$LINENO: checking if libsupc++ is required" >&5
11709 echo $ECHO_N "checking if libsupc++ is required... $ECHO_C" >&6
11711 SUPC="`$CXX -print-file-name=libsupc++.a 2>/dev/null`"
11712 case "$SUPC" in
11713 libsupc++.a*)
11714 # Library not found, so this is and older GCC...
11715 echo "$as_me:$LINENO: result: no" >&5
11716 echo "${ECHO_T}no" >&6
11719 # This is gcc 3.x, and it knows of libsupc++, so we need it
11720 LIBS="$LIBS -lsupc++"
11721 echo "$as_me:$LINENO: result: yes" >&5
11722 echo "${ECHO_T}yes" >&6
11724 # See if this system has a broken libsupc++ that requires
11725 # a workaround (FreeBSD 5.x, 6.x)
11726 case $host in
11727 *-*-freebsd*)
11728 echo "$as_me:$LINENO: checking if libsupc++ is missing __terminate_handler" >&5
11729 echo $ECHO_N "checking if libsupc++ is missing __terminate_handler... $ECHO_C" >&6
11730 nm -C --defined-only "$SUPC" 2>/dev/null | grep __terminate_handler > /dev/null
11731 if test $? -eq 0 ; then
11732 echo "$as_me:$LINENO: result: no" >&5
11733 echo "${ECHO_T}no" >&6
11734 else
11735 echo "$as_me:$LINENO: result: yes -- will attempt workaround" >&5
11736 echo "${ECHO_T}yes -- will attempt workaround" >&6
11737 CPPFLAGS="$CPPFLAGS -DFREEBSD_SUPCPP_FIX"
11740 esac
11742 esac
11744 # See if GCC supports -fno-exceptions...
11745 echo "$as_me:$LINENO: checking if GCC supports -fno-exceptions" >&5
11746 echo $ECHO_N "checking if GCC supports -fno-exceptions... $ECHO_C" >&6
11747 OLDCXXFLAGS="$CXXFLAGS"
11748 CXXFLAGS="$CXXFLAGS -fno-exceptions"
11749 cat >conftest.$ac_ext <<_ACEOF
11750 /* confdefs.h. */
11751 _ACEOF
11752 cat confdefs.h >>conftest.$ac_ext
11753 cat >>conftest.$ac_ext <<_ACEOF
11754 /* end confdefs.h. */
11757 main ()
11761 return 0;
11763 _ACEOF
11764 rm -f conftest.$ac_objext
11765 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11766 (eval $ac_compile) 2>conftest.er1
11767 ac_status=$?
11768 grep -v '^ *+' conftest.er1 >conftest.err
11769 rm -f conftest.er1
11770 cat conftest.err >&5
11771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11772 (exit $ac_status); } &&
11773 { ac_try='test -z "$ac_c_werror_flag"
11774 || test ! -s conftest.err'
11775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11776 (eval $ac_try) 2>&5
11777 ac_status=$?
11778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11779 (exit $ac_status); }; } &&
11780 { ac_try='test -s conftest.$ac_objext'
11781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11782 (eval $ac_try) 2>&5
11783 ac_status=$?
11784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11785 (exit $ac_status); }; }; then
11786 echo "$as_me:$LINENO: result: yes" >&5
11787 echo "${ECHO_T}yes" >&6
11788 else
11789 echo "$as_me: failed program was:" >&5
11790 sed 's/^/| /' conftest.$ac_ext >&5
11792 echo "$as_me:$LINENO: result: no" >&5
11793 echo "${ECHO_T}no" >&6
11794 CXXFLAGS="$OLDCXXFLAGS"
11796 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11798 # See if GCC supports -fno-rtti...
11799 echo "$as_me:$LINENO: checking if GCC supports -fno-rtti" >&5
11800 echo $ECHO_N "checking if GCC supports -fno-rtti... $ECHO_C" >&6
11801 OLDCXXFLAGS="$CXXFLAGS"
11802 CXXFLAGS="$CXXFLAGS -fno-rtti"
11803 cat >conftest.$ac_ext <<_ACEOF
11804 /* confdefs.h. */
11805 _ACEOF
11806 cat confdefs.h >>conftest.$ac_ext
11807 cat >>conftest.$ac_ext <<_ACEOF
11808 /* end confdefs.h. */
11811 main ()
11815 return 0;
11817 _ACEOF
11818 rm -f conftest.$ac_objext
11819 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11820 (eval $ac_compile) 2>conftest.er1
11821 ac_status=$?
11822 grep -v '^ *+' conftest.er1 >conftest.err
11823 rm -f conftest.er1
11824 cat conftest.err >&5
11825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11826 (exit $ac_status); } &&
11827 { ac_try='test -z "$ac_c_werror_flag"
11828 || test ! -s conftest.err'
11829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11830 (eval $ac_try) 2>&5
11831 ac_status=$?
11832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11833 (exit $ac_status); }; } &&
11834 { ac_try='test -s conftest.$ac_objext'
11835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11836 (eval $ac_try) 2>&5
11837 ac_status=$?
11838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11839 (exit $ac_status); }; }; then
11840 echo "$as_me:$LINENO: result: yes" >&5
11841 echo "${ECHO_T}yes" >&6
11842 else
11843 echo "$as_me: failed program was:" >&5
11844 sed 's/^/| /' conftest.$ac_ext >&5
11846 echo "$as_me:$LINENO: result: no" >&5
11847 echo "${ECHO_T}no" >&6
11848 CXXFLAGS="$OLDCXXFLAGS"
11850 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11852 # Use -Wall on gcc only
11853 CFLAGS="$CFLAGS -Wall"
11854 CXXFLAGS="$CXXFLAGS -Wall"
11873 cat >>confdefs.h <<_ACEOF
11874 #define SYSCONFDIR "$sysconfdir"
11875 _ACEOF
11881 MKINSTALLDIRS=
11882 if test -n "$ac_aux_dir"; then
11883 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
11885 if test x$MKINSTALLDIRS = x ; then
11886 MKINSTALLDIRS="\$(topdir)/autoconf/mkinstalldirs"
11899 for ac_func in wait waitpid wait3
11901 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11902 echo "$as_me:$LINENO: checking for $ac_func" >&5
11903 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11904 if eval "test \"\${$as_ac_var+set}\" = set"; then
11905 echo $ECHO_N "(cached) $ECHO_C" >&6
11906 else
11907 cat >conftest.$ac_ext <<_ACEOF
11908 /* confdefs.h. */
11909 _ACEOF
11910 cat confdefs.h >>conftest.$ac_ext
11911 cat >>conftest.$ac_ext <<_ACEOF
11912 /* end confdefs.h. */
11913 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11914 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11915 #define $ac_func innocuous_$ac_func
11917 /* System header to define __stub macros and hopefully few prototypes,
11918 which can conflict with char $ac_func (); below.
11919 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11920 <limits.h> exists even on freestanding compilers. */
11922 #ifdef __STDC__
11923 # include <limits.h>
11924 #else
11925 # include <assert.h>
11926 #endif
11928 #undef $ac_func
11930 /* Override any gcc2 internal prototype to avoid an error. */
11931 #ifdef __cplusplus
11932 extern "C"
11934 #endif
11935 /* We use char because int might match the return type of a gcc2
11936 builtin and then its argument prototype would still apply. */
11937 char $ac_func ();
11938 /* The GNU C library defines this for functions which it implements
11939 to always fail with ENOSYS. Some functions are actually named
11940 something starting with __ and the normal name is an alias. */
11941 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11942 choke me
11943 #else
11944 char (*f) () = $ac_func;
11945 #endif
11946 #ifdef __cplusplus
11948 #endif
11951 main ()
11953 return f != $ac_func;
11955 return 0;
11957 _ACEOF
11958 rm -f conftest.$ac_objext conftest$ac_exeext
11959 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11960 (eval $ac_link) 2>conftest.er1
11961 ac_status=$?
11962 grep -v '^ *+' conftest.er1 >conftest.err
11963 rm -f conftest.er1
11964 cat conftest.err >&5
11965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11966 (exit $ac_status); } &&
11967 { ac_try='test -z "$ac_c_werror_flag"
11968 || test ! -s conftest.err'
11969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11970 (eval $ac_try) 2>&5
11971 ac_status=$?
11972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11973 (exit $ac_status); }; } &&
11974 { ac_try='test -s conftest$ac_exeext'
11975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11976 (eval $ac_try) 2>&5
11977 ac_status=$?
11978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11979 (exit $ac_status); }; }; then
11980 eval "$as_ac_var=yes"
11981 else
11982 echo "$as_me: failed program was:" >&5
11983 sed 's/^/| /' conftest.$ac_ext >&5
11985 eval "$as_ac_var=no"
11987 rm -f conftest.err conftest.$ac_objext \
11988 conftest$ac_exeext conftest.$ac_ext
11990 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11991 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11992 if test `eval echo '${'$as_ac_var'}'` = yes; then
11993 cat >>confdefs.h <<_ACEOF
11994 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11995 _ACEOF
11998 done
12000 echo "$as_me:$LINENO: checking for union wait" >&5
12001 echo $ECHO_N "checking for union wait... $ECHO_C" >&6;
12002 cat >conftest.$ac_ext <<_ACEOF
12003 /* confdefs.h. */
12004 _ACEOF
12005 cat confdefs.h >>conftest.$ac_ext
12006 cat >>conftest.$ac_ext <<_ACEOF
12007 /* end confdefs.h. */
12008 #include <sys/types.h>
12009 #include <sys/wait.h>
12011 main ()
12013 union wait status; int pid; pid = wait (&status);
12014 #ifdef WEXITSTATUS
12015 /* Some POSIXoid systems have both the new-style macros and the old
12016 union wait type, and they do not work together. If union wait
12017 conflicts with WEXITSTATUS et al, we don't want to use it at all. */
12018 if (WEXITSTATUS (status) != 0) pid = -1;
12019 #endif
12020 #ifdef HAVE_WAITPID
12021 /* Make sure union wait works with waitpid. */
12022 pid = waitpid (-1, &status, 0);
12023 #endif
12026 return 0;
12028 _ACEOF
12029 rm -f conftest.$ac_objext conftest$ac_exeext
12030 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12031 (eval $ac_link) 2>conftest.er1
12032 ac_status=$?
12033 grep -v '^ *+' conftest.er1 >conftest.err
12034 rm -f conftest.er1
12035 cat conftest.err >&5
12036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12037 (exit $ac_status); } &&
12038 { ac_try='test -z "$ac_c_werror_flag"
12039 || test ! -s conftest.err'
12040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12041 (eval $ac_try) 2>&5
12042 ac_status=$?
12043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12044 (exit $ac_status); }; } &&
12045 { ac_try='test -s conftest$ac_exeext'
12046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12047 (eval $ac_try) 2>&5
12048 ac_status=$?
12049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12050 (exit $ac_status); }; }; then
12051 cat >>confdefs.h <<\_ACEOF
12052 #define HAVE_UNION_WAIT 1
12053 _ACEOF
12054 echo "$as_me:$LINENO: result: yes" >&5
12055 echo "${ECHO_T}yes" >&6
12056 else
12057 echo "$as_me: failed program was:" >&5
12058 sed 's/^/| /' conftest.$ac_ext >&5
12060 echo "$as_me:$LINENO: result: no" >&5
12061 echo "${ECHO_T}no" >&6
12063 rm -f conftest.err conftest.$ac_objext \
12064 conftest$ac_exeext conftest.$ac_ext
12066 if test "$ENABLE_CGI" = "yes"
12067 then
12069 for ac_func in snprintf
12071 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12072 echo "$as_me:$LINENO: checking for $ac_func" >&5
12073 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12074 if eval "test \"\${$as_ac_var+set}\" = set"; then
12075 echo $ECHO_N "(cached) $ECHO_C" >&6
12076 else
12077 cat >conftest.$ac_ext <<_ACEOF
12078 /* confdefs.h. */
12079 _ACEOF
12080 cat confdefs.h >>conftest.$ac_ext
12081 cat >>conftest.$ac_ext <<_ACEOF
12082 /* end confdefs.h. */
12083 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12084 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12085 #define $ac_func innocuous_$ac_func
12087 /* System header to define __stub macros and hopefully few prototypes,
12088 which can conflict with char $ac_func (); below.
12089 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12090 <limits.h> exists even on freestanding compilers. */
12092 #ifdef __STDC__
12093 # include <limits.h>
12094 #else
12095 # include <assert.h>
12096 #endif
12098 #undef $ac_func
12100 /* Override any gcc2 internal prototype to avoid an error. */
12101 #ifdef __cplusplus
12102 extern "C"
12104 #endif
12105 /* We use char because int might match the return type of a gcc2
12106 builtin and then its argument prototype would still apply. */
12107 char $ac_func ();
12108 /* The GNU C library defines this for functions which it implements
12109 to always fail with ENOSYS. Some functions are actually named
12110 something starting with __ and the normal name is an alias. */
12111 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12112 choke me
12113 #else
12114 char (*f) () = $ac_func;
12115 #endif
12116 #ifdef __cplusplus
12118 #endif
12121 main ()
12123 return f != $ac_func;
12125 return 0;
12127 _ACEOF
12128 rm -f conftest.$ac_objext conftest$ac_exeext
12129 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12130 (eval $ac_link) 2>conftest.er1
12131 ac_status=$?
12132 grep -v '^ *+' conftest.er1 >conftest.err
12133 rm -f conftest.er1
12134 cat conftest.err >&5
12135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12136 (exit $ac_status); } &&
12137 { ac_try='test -z "$ac_c_werror_flag"
12138 || test ! -s conftest.err'
12139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12140 (eval $ac_try) 2>&5
12141 ac_status=$?
12142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12143 (exit $ac_status); }; } &&
12144 { ac_try='test -s conftest$ac_exeext'
12145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12146 (eval $ac_try) 2>&5
12147 ac_status=$?
12148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12149 (exit $ac_status); }; }; then
12150 eval "$as_ac_var=yes"
12151 else
12152 echo "$as_me: failed program was:" >&5
12153 sed 's/^/| /' conftest.$ac_ext >&5
12155 eval "$as_ac_var=no"
12157 rm -f conftest.err conftest.$ac_objext \
12158 conftest$ac_exeext conftest.$ac_ext
12160 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12161 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12162 if test `eval echo '${'$as_ac_var'}'` = yes; then
12163 cat >>confdefs.h <<_ACEOF
12164 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12165 _ACEOF
12167 else
12168 { { echo "$as_me:$LINENO: error: cannot find required function." >&5
12169 echo "$as_me: error: cannot find required function." >&2;}
12170 { (exit 1); exit 1; }; }
12172 done
12174 echo 'Enabling cgi program support...'
12175 else
12176 echo 'Disabling cgi support...'
12180 # now allow user to specify DISTNAME
12182 # Check whether --with-distname or --without-distname was given.
12183 if test "${with_distname+set}" = set; then
12184 withval="$with_distname"
12185 DISTNAME=$withval
12188 if test "x$DISTNAME" != "x"
12189 then
12190 echo "distname set to $DISTNAME"
12191 elif test $HAVE_UNAME=yes -a x`uname -s` = xOSF1
12192 then
12193 DISTNAME=alpha
12194 elif test $HAVE_UNAME=yes -a x`uname -s` = xHP-UX
12195 then
12196 DISTNAME=hpux
12197 elif test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
12198 then
12199 DISTNAME=sun
12200 elif test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD
12201 then
12202 DISTNAME=freebsd
12203 elif test $HAVE_UNAME=yes -a x`uname -s` = xNetBSD
12204 then
12205 DISTNAME=netbsd
12206 elif test $HAVE_UNAME=yes -a x`uname -s` = xOpenBSD
12207 then
12208 DISTNAME=openbsd
12209 elif test $HAVE_UNAME=yes -a x`uname -s` = xBSD/OS
12210 then
12211 DISTNAME=bsdi
12212 elif test $HAVE_UNAME=yes -a x`uname -s` = xDarwin
12213 then
12214 DISTNAME=darwin
12215 elif test $HAVE_UNAME=yes -a x`uname -s` = xQNX
12216 then
12217 DISTNAME=qnx
12218 elif test -f /etc/SuSE-release
12219 then
12220 DISTNAME=suse
12221 elif test -d /etc/SuSEconfig
12222 then
12223 DISTNAME=suse5
12224 elif test -f /etc/mandrake-release
12225 then
12226 DISTNAME=mandrake
12227 elif test -f /etc/whitebox-release
12228 then
12229 DISTNAME=redhat
12230 elif test -f /etc/redhat-release
12231 then
12232 DISTNAME=redhat
12233 elif test -f /etc/yellowdog-release
12234 then
12235 DISTNAME=yellowdog
12236 elif test -f /etc/debian_version
12237 then
12238 DISTNAME=debian
12239 elif test -f /etc/slackware-version
12240 then
12241 DISTNAME=slackware
12242 elif test -f /etc/gentoo-release
12243 then
12244 DISTNAME=gentoo
12245 elif test -f /etc/engarde-version
12246 then
12247 DISTNAME=engarde
12248 else
12249 DISTNAME=unknown
12252 DISTDIR=$DISTNAME
12253 with_distdir="yes"
12254 # Check whether --enable-install-distdir or --disable-install-distdir was given.
12255 if test "${enable_install_distdir+set}" = set; then
12256 enableval="$enable_install_distdir"
12257 if test "$enableval" = "no" ; then
12258 DISTDIR=""
12259 with_distdir="no"
12265 # Define the default UPS
12266 UPSTYPE=apcsmart
12268 # Define the default Cable
12269 UPSCABLE=smart
12271 # set the default nologin directory
12272 nologdir=/etc
12274 # Find the default directory to put the root-mode PID file in
12275 for PIDDIR in "/var/run" "/etc/apcupsd"
12277 if test -d $PIDDIR
12278 then
12279 break;
12281 done
12283 # Find the default directory to put the apcupsd.events and apcupsd.status files
12284 for LOGDIR in "/var/log" "/etc/apcupsd"
12286 if test -d $LOGDIR
12287 then
12288 break;
12290 done
12292 # set the default serial port lock director
12293 for LOCKDIR in "/var/lock" "/var/spool/locks" "/etc/apcupsd"
12295 if test -d $LOCKDIR
12296 then
12297 break;
12299 done
12301 # set the default PWRFAILDIR
12302 PWRFAILDIR=${sysconfdir}
12304 # define the default serial port device
12305 SERIALDEV=/dev/ttyS0
12307 # define the default NIS (Network Information Server -- CGI) port
12308 NISPORT=3551
12311 # Now we set appropriate distribution specific
12312 # variables and defaults
12314 case "$DISTNAME" in
12315 alpha)
12316 PTHREAD_LFLAGS="-lpthread -lexc"
12317 DISTVER=`uname -r`
12318 SERIALDEV=/dev/tty01
12319 LOCKDIR=/var/spool/locks
12320 LOGDIR=/etc/apcupsd
12321 DFILES="\
12322 platforms/alpha/apcupsd \
12323 platforms/alpha/awkhaltprog"
12325 bsdi)
12326 DISTVER=`uname -a |awk '{print $3}'`
12328 debian)
12329 DISTVER=`cat /etc/debian_version`
12330 DFILES="\
12331 platforms/debian/apcupsd \
12332 platforms/debian/ups-monitor"
12334 freebsd)
12335 DISTVER=`uname -a |awk '{print $3}'`
12336 SERIALDEV=/dev/cuaa0
12337 nologdir=/var/run
12338 PWRFAILDIR=/var/run
12339 LOCKDIR=/var/spool/lock
12340 PTHREAD_CFLAGS="-pthread"
12341 PTHREAD_LFLAGS=""
12342 LDFLAGS="$LDFLAGS -pthread"
12343 DFILES="\
12344 platforms/freebsd/apcupsd \
12345 platforms/freebsd/apccontrol"
12347 gentoo)
12348 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
12349 DFILES="\
12350 platforms/gentoo/apcupsd \
12351 platforms/gentoo/halt"
12353 hpux)
12354 DISTVER=`uname -r`
12355 SERIALDEV=/dev/tty0p0
12356 PTHREAD_CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
12357 DFILES="\
12358 platforms/hpux/apcupsd \
12359 platforms/hpux/halt"
12361 netbsd)
12362 DISTVER=`uname -a |awk '{print $3}'`
12363 SERIALDEV=/dev/cua01
12364 PTHREAD_CFLAGS="-pthread"
12365 PTHREAD_LFLAGS=""
12366 LDFLAGS="$LDFLAGS -pthread"
12367 DFILES="\
12368 platforms/netbsd/apcupsd"
12370 openbsd)
12371 DISTVER=`uname -a |awk '{print $3}'`
12372 SERIALDEV=/dev/cua01
12373 LOCKDIR=/var/spool/lock
12374 PTHREAD_CFLAGS="-pthread"
12375 PTHREAD_LFLAGS=""
12376 LDFLAGS="$LDFLAGS -pthread"
12377 DFILES="\
12378 platforms/openbsd/apcupsd \
12379 platforms/openbsd/apccontrol"
12381 mandrake)
12382 DISTVER=`cat /etc/mandrake-release | grep release | cut -f 5 -d ' '`
12383 DFILES="\
12384 platforms/mandrake/apcupsd \
12385 platforms/mandrake/apcupsd.spec \
12386 platforms/mandrake/awkhaltprog"
12388 redhat)
12389 if test -f /etc/whitebox-release ; then
12390 f=/etc/whitebox-release
12391 else
12392 f=/etc/redhat-release
12394 if test `cat $f | grep release | cut -f 3 -d ' '`x = "Enterprise"x ; then
12395 DISTVER="Enterprise "`cat $f | grep release | cut -f 6 -d ' '`
12396 else
12397 DISTVER=`cat /etc/redhat-release | grep release | cut -f 5 -d ' '`
12399 DFILES="\
12400 platforms/redhat/apcupsd \
12401 platforms/redhat/apcupsd.spec \
12402 platforms/redhat/awkhaltprog"
12404 yellowdog)
12405 if test `cat /etc/yellowdog-release | grep release | cut -f 3 -d ' '`x = "Enterprise"x ; then
12406 DISTVER="Enterprise "`cat /etc/yellowdog-release | grep release | cut -f 6 -d ' '`
12407 else
12408 DISTVER=`cat /etc/yellowdog-release | grep release | cut -f 5 -d ' '`
12410 DFILES="\
12411 platforms/yellowdog/apcupsd \
12412 platforms/yellowdog/apcupsd.spec \
12413 platforms/yellowdog/awkhaltprog"
12415 engarde)
12416 DISTVER=`cat /etc/engarde-release | grep ersion | cut -f 5 -d ' '`
12417 DFILES="\
12418 platforms/engarde/apcupsd \
12419 platforms/engarde/apcupsd.spec \
12420 platforms/engarde/awkhaltprog"
12422 slackware)
12423 DISTVER=`cat /etc/slackware-version`
12424 DFILES="\
12425 platforms/slackware/apcupsd \
12426 platforms/slackware/rc6.patch"
12428 sun)
12429 DISTVER=Solaris
12430 SERIALDEV=/dev/ttya
12431 PWRFAILDIR=/etc
12432 PIDDIR=/var/run
12433 LOCKDIR=/var/spool/locks
12434 LOGDIR=${sysconfdir}
12435 APCUPSD_MAIL=/usr/bin/mailx
12436 PTHREAD_CFLAGS="-D_POSIX_PTHREAD_SEMANTICS"
12437 DFILES="\
12438 platforms/sun/apcupsd \
12439 platforms/sun/rc0.solaris \
12440 platforms/sun/apccontrol"
12442 suse)
12443 DISTVER=`cat /etc/SuSE-release |grep VERSION| cut -f 3 -d ' '`
12444 DFILES="\
12445 platforms/suse/apcupsd \
12446 platforms/suse/awkhaltprog"
12448 suse5)
12449 DISTNAME=suse
12450 DISTVER=5.x
12451 DFILES="\
12452 platforms/suse/apcupsd \
12453 platforms/suse/halt-setup.sh \
12454 platforms/suse/halt"
12456 darwin)
12457 DISTVER=`uname -r`
12458 SERIALDEV=
12459 UPSTYPE=usb
12460 UPSCABLE=usb
12461 PIDDIR=/var/run
12462 LOCKDIR=/var/tmp
12463 DFILES="\
12464 platforms/darwin/apcupsd \
12465 platforms/darwin/apccontrol"
12467 qnx)
12468 PTHREAD_LFLAGS=""
12469 DISTVER=`uname -r`
12470 SERIALDEV=/dev/ser1
12471 DFILES="\
12472 platforms/qnx/apcupsd \
12473 platforms/qnx/apccontrol"
12475 unknown)
12476 DISTVER=unknown
12477 DFILES="\
12478 platforms/unknown/apcupsd \
12479 platforms/unknown/halt"
12482 { echo "$as_me:$LINENO: WARNING: Something went wrong. Unknown DISTNAME $DISTNAME" >&5
12483 echo "$as_me: WARNING: Something went wrong. Unknown DISTNAME $DISTNAME" >&2;}
12485 esac
12488 # Check whether --with-nologin or --without-nologin was given.
12489 if test "${with_nologin+set}" = set; then
12490 withval="$with_nologin"
12491 nologdir="$withval";
12494 # now allow the user to specify the PID directory
12496 # Check whether --with-pid-dir or --without-pid-dir was given.
12497 if test "${with_pid_dir+set}" = set; then
12498 withval="$with_pid_dir"
12499 PIDDIR="$withval";
12502 # now allow user to specify LOGDIR
12504 # Check whether --with-log-dir or --without-log-dir was given.
12505 if test "${with_log_dir+set}" = set; then
12506 withval="$with_log_dir"
12507 LOGDIR="$withval";
12510 # now allow user to specify LOCKDIR
12512 # Check whether --with-lock-dir or --without-lock-dir was given.
12513 if test "${with_lock_dir+set}" = set; then
12514 withval="$with_lock_dir"
12515 LOCKDIR="$withval";
12518 # now allow user to specify PWRFAILDIR
12520 # Check whether --with-pwrfail-dir or --without-pwrfail-dir was given.
12521 if test "${with_pwrfail_dir+set}" = set; then
12522 withval="$with_pwrfail_dir"
12523 PWRFAILDIR="$withval";
12526 # now allow user to specify SERIALDEV
12528 # Check whether --with-serial-dev or --without-serial-dev was given.
12529 if test "${with_serial_dev+set}" = set; then
12530 withval="$with_serial_dev"
12531 SERIALDEV="$withval";
12535 # Check whether --with-dev or --without-dev was given.
12536 if test "${with_dev+set}" = set; then
12537 withval="$with_dev"
12538 SERIALDEV="$withval";
12541 # now allow user to specify NISPORT
12543 # Check whether --with-nis-port or --without-nis-port was given.
12544 if test "${with_nis_port+set}" = set; then
12545 withval="$with_nis_port"
12546 NISPORT="$withval";
12549 # now allow user to specify UPSTYPE
12551 # Check whether --with-upstype or --without-upstype was given.
12552 if test "${with_upstype+set}" = set; then
12553 withval="$with_upstype"
12554 UPSTYPE="$withval";
12557 # now allow user to specify UPSCABLE
12559 # Check whether --with-upscable or --without-upscable was given.
12560 if test "${with_upscable+set}" = set; then
12561 withval="$with_upscable"
12562 UPSCABLE="$withval";
12568 cat >>confdefs.h <<_ACEOF
12569 #define PIDDIR "$PIDDIR"
12570 _ACEOF
12573 cat >>confdefs.h <<_ACEOF
12574 #define LOGDIR "$LOGDIR"
12575 _ACEOF
12578 cat >>confdefs.h <<_ACEOF
12579 #define NOLOGDIR "$nologdir"
12580 _ACEOF
12583 cat >>confdefs.h <<_ACEOF
12584 #define PWRFAILDIR "$PWRFAILDIR"
12585 _ACEOF
12590 cat >>confdefs.h <<_ACEOF
12591 #define NISPORT $NISPORT
12592 _ACEOF
12597 HOST=$DISTNAME
12598 cat >>confdefs.h <<_ACEOF
12599 #define HOST "$HOST"
12600 _ACEOF
12604 gccinclude="."
12606 if test "$CC" = "gcc"
12607 then
12608 rm -f $srcdir/gcc.v
12609 $CC -v 2> $srcdir/gcc.v
12610 gccinclude=`cat $srcdir/gcc.v|grep specs|awk '{print $4}'| \
12611 sed -e 's|specs|include|g'`
12612 echo "gcc private include directory found."
12613 rm -f $srcdir/gcc.v
12616 GENERATE_FILES="\
12617 autoconf/variables.mak \
12618 platforms/apccontrol \
12619 platforms/etc/changeme \
12620 platforms/etc/commfailure \
12621 platforms/etc/commok \
12622 platforms/etc/offbattery \
12623 platforms/etc/onbattery \
12624 platforms/etc/apcupsd.conf \
12625 examples/safe.apccontrol \
12626 src/win32/Makefile \
12627 $DFILES"
12629 if test "$USB_TYPE"x = "generic"x
12630 then
12631 GENERATE_FILES="$GENERATE_FILES \
12632 src/drivers/usb/generic/libusb.h"
12635 if test "$ENABLE_CGI" = "yes"
12636 then
12637 GENERATE_FILES="$GENERATE_FILES src/cgi/cgiconfig.h"
12640 ac_config_files="$ac_config_files ${GENERATE_FILES}"
12641 cat >confcache <<\_ACEOF
12642 # This file is a shell script that caches the results of configure
12643 # tests run on this system so they can be shared between configure
12644 # scripts and configure runs, see configure's option --config-cache.
12645 # It is not useful on other systems. If it contains results you don't
12646 # want to keep, you may remove or edit it.
12648 # config.status only pays attention to the cache file if you give it
12649 # the --recheck option to rerun configure.
12651 # `ac_cv_env_foo' variables (set or unset) will be overridden when
12652 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12653 # following values.
12655 _ACEOF
12657 # The following way of writing the cache mishandles newlines in values,
12658 # but we know of no workaround that is simple, portable, and efficient.
12659 # So, don't put newlines in cache variables' values.
12660 # Ultrix sh set writes to stderr and can't be redirected directly,
12661 # and sets the high bit in the cache file unless we assign to the vars.
12663 (set) 2>&1 |
12664 case `(ac_space=' '; set | grep ac_space) 2>&1` in
12665 *ac_space=\ *)
12666 # `set' does not quote correctly, so add quotes (double-quote
12667 # substitution turns \\\\ into \\, and sed turns \\ into \).
12668 sed -n \
12669 "s/'/'\\\\''/g;
12670 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12673 # `set' quotes correctly as required by POSIX, so do not add quotes.
12674 sed -n \
12675 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
12677 esac;
12679 sed '
12680 t clear
12681 : clear
12682 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12683 t end
12684 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12685 : end' >>confcache
12686 if diff $cache_file confcache >/dev/null 2>&1; then :; else
12687 if test -w $cache_file; then
12688 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12689 cat confcache >$cache_file
12690 else
12691 echo "not updating unwritable cache $cache_file"
12694 rm -f confcache
12696 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12697 # Let make expand exec_prefix.
12698 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12700 # VPATH may cause trouble with some makes, so we remove $(srcdir),
12701 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12702 # trailing colons and then remove the whole line if VPATH becomes empty
12703 # (actually we leave an empty line to preserve line numbers).
12704 if test "x$srcdir" = x.; then
12705 ac_vpsub='/^[ ]*VPATH[ ]*=/{
12706 s/:*\$(srcdir):*/:/;
12707 s/:*\${srcdir}:*/:/;
12708 s/:*@srcdir@:*/:/;
12709 s/^\([^=]*=[ ]*\):*/\1/;
12710 s/:*$//;
12711 s/^[^=]*=[ ]*$//;
12715 DEFS=-DHAVE_CONFIG_H
12717 ac_libobjs=
12718 ac_ltlibobjs=
12719 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12720 # 1. Remove the extension, and $U if already installed.
12721 ac_i=`echo "$ac_i" |
12722 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
12723 # 2. Add them.
12724 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
12725 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
12726 done
12727 LIBOBJS=$ac_libobjs
12729 LTLIBOBJS=$ac_ltlibobjs
12733 : ${CONFIG_STATUS=./config.status}
12734 ac_clean_files_save=$ac_clean_files
12735 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12736 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
12737 echo "$as_me: creating $CONFIG_STATUS" >&6;}
12738 cat >$CONFIG_STATUS <<_ACEOF
12739 #! $SHELL
12740 # Generated by $as_me.
12741 # Run this file to recreate the current configuration.
12742 # Compiler output produced by configure, useful for debugging
12743 # configure, is in config.log if it exists.
12745 debug=false
12746 ac_cs_recheck=false
12747 ac_cs_silent=false
12748 SHELL=\${CONFIG_SHELL-$SHELL}
12749 _ACEOF
12751 cat >>$CONFIG_STATUS <<\_ACEOF
12752 ## --------------------- ##
12753 ## M4sh Initialization. ##
12754 ## --------------------- ##
12756 # Be Bourne compatible
12757 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12758 emulate sh
12759 NULLCMD=:
12760 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
12761 # is contrary to our usage. Disable this feature.
12762 alias -g '${1+"$@"}'='"$@"'
12763 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12764 set -o posix
12766 DUALCASE=1; export DUALCASE # for MKS sh
12768 # Support unset when possible.
12769 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
12770 as_unset=unset
12771 else
12772 as_unset=false
12776 # Work around bugs in pre-3.0 UWIN ksh.
12777 $as_unset ENV MAIL MAILPATH
12778 PS1='$ '
12779 PS2='> '
12780 PS4='+ '
12782 # NLS nuisances.
12783 for as_var in \
12784 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
12785 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
12786 LC_TELEPHONE LC_TIME
12788 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
12789 eval $as_var=C; export $as_var
12790 else
12791 $as_unset $as_var
12793 done
12795 # Required to use basename.
12796 if expr a : '\(a\)' >/dev/null 2>&1; then
12797 as_expr=expr
12798 else
12799 as_expr=false
12802 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
12803 as_basename=basename
12804 else
12805 as_basename=false
12809 # Name of the executable.
12810 as_me=`$as_basename "$0" ||
12811 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
12812 X"$0" : 'X\(//\)$' \| \
12813 X"$0" : 'X\(/\)$' \| \
12814 . : '\(.\)' 2>/dev/null ||
12815 echo X/"$0" |
12816 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
12817 /^X\/\(\/\/\)$/{ s//\1/; q; }
12818 /^X\/\(\/\).*/{ s//\1/; q; }
12819 s/.*/./; q'`
12822 # PATH needs CR, and LINENO needs CR and PATH.
12823 # Avoid depending upon Character Ranges.
12824 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12825 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12826 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
12827 as_cr_digits='0123456789'
12828 as_cr_alnum=$as_cr_Letters$as_cr_digits
12830 # The user is always right.
12831 if test "${PATH_SEPARATOR+set}" != set; then
12832 echo "#! /bin/sh" >conf$$.sh
12833 echo "exit 0" >>conf$$.sh
12834 chmod +x conf$$.sh
12835 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
12836 PATH_SEPARATOR=';'
12837 else
12838 PATH_SEPARATOR=:
12840 rm -f conf$$.sh
12844 as_lineno_1=$LINENO
12845 as_lineno_2=$LINENO
12846 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
12847 test "x$as_lineno_1" != "x$as_lineno_2" &&
12848 test "x$as_lineno_3" = "x$as_lineno_2" || {
12849 # Find who we are. Look in the path if we contain no path at all
12850 # relative or not.
12851 case $0 in
12852 *[\\/]* ) as_myself=$0 ;;
12853 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12854 for as_dir in $PATH
12856 IFS=$as_save_IFS
12857 test -z "$as_dir" && as_dir=.
12858 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12859 done
12862 esac
12863 # We did not find ourselves, most probably we were run as `sh COMMAND'
12864 # in which case we are not to be found in the path.
12865 if test "x$as_myself" = x; then
12866 as_myself=$0
12868 if test ! -f "$as_myself"; then
12869 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
12870 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
12871 { (exit 1); exit 1; }; }
12873 case $CONFIG_SHELL in
12875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12876 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
12878 IFS=$as_save_IFS
12879 test -z "$as_dir" && as_dir=.
12880 for as_base in sh bash ksh sh5; do
12881 case $as_dir in
12883 if ("$as_dir/$as_base" -c '
12884 as_lineno_1=$LINENO
12885 as_lineno_2=$LINENO
12886 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
12887 test "x$as_lineno_1" != "x$as_lineno_2" &&
12888 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
12889 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
12890 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
12891 CONFIG_SHELL=$as_dir/$as_base
12892 export CONFIG_SHELL
12893 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
12894 fi;;
12895 esac
12896 done
12897 done
12899 esac
12901 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
12902 # uniformly replaced by the line number. The first 'sed' inserts a
12903 # line-number line before each line; the second 'sed' does the real
12904 # work. The second script uses 'N' to pair each line-number line
12905 # with the numbered line, and appends trailing '-' during
12906 # substitution so that $LINENO is not a special case at line end.
12907 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
12908 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
12909 sed '=' <$as_myself |
12910 sed '
12912 s,$,-,
12913 : loop
12914 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
12915 t loop
12916 s,-$,,
12917 s,^['$as_cr_digits']*\n,,
12918 ' >$as_me.lineno &&
12919 chmod +x $as_me.lineno ||
12920 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
12921 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
12922 { (exit 1); exit 1; }; }
12924 # Don't try to exec as it changes $[0], causing all sort of problems
12925 # (the dirname of $[0] is not the place where we might find the
12926 # original and so on. Autoconf is especially sensible to this).
12927 . ./$as_me.lineno
12928 # Exit status is that of the last command.
12929 exit
12933 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
12934 *c*,-n*) ECHO_N= ECHO_C='
12935 ' ECHO_T=' ' ;;
12936 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
12937 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
12938 esac
12940 if expr a : '\(a\)' >/dev/null 2>&1; then
12941 as_expr=expr
12942 else
12943 as_expr=false
12946 rm -f conf$$ conf$$.exe conf$$.file
12947 echo >conf$$.file
12948 if ln -s conf$$.file conf$$ 2>/dev/null; then
12949 # We could just check for DJGPP; but this test a) works b) is more generic
12950 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12951 if test -f conf$$.exe; then
12952 # Don't use ln at all; we don't have any links
12953 as_ln_s='cp -p'
12954 else
12955 as_ln_s='ln -s'
12957 elif ln conf$$.file conf$$ 2>/dev/null; then
12958 as_ln_s=ln
12959 else
12960 as_ln_s='cp -p'
12962 rm -f conf$$ conf$$.exe conf$$.file
12964 if mkdir -p . 2>/dev/null; then
12965 as_mkdir_p=:
12966 else
12967 test -d ./-p && rmdir ./-p
12968 as_mkdir_p=false
12971 as_executable_p="test -f"
12973 # Sed expression to map a string onto a valid CPP name.
12974 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
12976 # Sed expression to map a string onto a valid variable name.
12977 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
12980 # IFS
12981 # We need space, tab and new line, in precisely that order.
12982 as_nl='
12984 IFS=" $as_nl"
12986 # CDPATH.
12987 $as_unset CDPATH
12989 exec 6>&1
12991 # Open the log real soon, to keep \$[0] and so on meaningful, and to
12992 # report actual input values of CONFIG_FILES etc. instead of their
12993 # values after options handling. Logging --version etc. is OK.
12994 exec 5>>config.log
12996 echo
12997 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12998 ## Running $as_me. ##
12999 _ASBOX
13000 } >&5
13001 cat >&5 <<_CSEOF
13003 This file was extended by $as_me, which was
13004 generated by GNU Autoconf 2.59. Invocation command line was
13006 CONFIG_FILES = $CONFIG_FILES
13007 CONFIG_HEADERS = $CONFIG_HEADERS
13008 CONFIG_LINKS = $CONFIG_LINKS
13009 CONFIG_COMMANDS = $CONFIG_COMMANDS
13010 $ $0 $@
13012 _CSEOF
13013 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
13014 echo >&5
13015 _ACEOF
13017 # Files that config.status was made for.
13018 if test -n "$ac_config_files"; then
13019 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
13022 if test -n "$ac_config_headers"; then
13023 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
13026 if test -n "$ac_config_links"; then
13027 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
13030 if test -n "$ac_config_commands"; then
13031 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
13034 cat >>$CONFIG_STATUS <<\_ACEOF
13036 ac_cs_usage="\
13037 \`$as_me' instantiates files from templates according to the
13038 current configuration.
13040 Usage: $0 [OPTIONS] [FILE]...
13042 -h, --help print this help, then exit
13043 -V, --version print version number, then exit
13044 -q, --quiet do not print progress messages
13045 -d, --debug don't remove temporary files
13046 --recheck update $as_me by reconfiguring in the same conditions
13047 --file=FILE[:TEMPLATE]
13048 instantiate the configuration file FILE
13049 --header=FILE[:TEMPLATE]
13050 instantiate the configuration header FILE
13052 Configuration files:
13053 $config_files
13055 Configuration headers:
13056 $config_headers
13058 Report bugs to <bug-autoconf@gnu.org>."
13059 _ACEOF
13061 cat >>$CONFIG_STATUS <<_ACEOF
13062 ac_cs_version="\\
13063 config.status
13064 configured by $0, generated by GNU Autoconf 2.59,
13065 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
13067 Copyright (C) 2003 Free Software Foundation, Inc.
13068 This config.status script is free software; the Free Software Foundation
13069 gives unlimited permission to copy, distribute and modify it."
13070 srcdir=$srcdir
13071 INSTALL="$INSTALL"
13072 _ACEOF
13074 cat >>$CONFIG_STATUS <<\_ACEOF
13075 # If no file are specified by the user, then we need to provide default
13076 # value. By we need to know if files were specified by the user.
13077 ac_need_defaults=:
13078 while test $# != 0
13080 case $1 in
13081 --*=*)
13082 ac_option=`expr "x$1" : 'x\([^=]*\)='`
13083 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
13084 ac_shift=:
13087 ac_option=$1
13088 ac_optarg=$2
13089 ac_shift=shift
13091 *) # This is not an option, so the user has probably given explicit
13092 # arguments.
13093 ac_option=$1
13094 ac_need_defaults=false;;
13095 esac
13097 case $ac_option in
13098 # Handling of the options.
13099 _ACEOF
13100 cat >>$CONFIG_STATUS <<\_ACEOF
13101 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13102 ac_cs_recheck=: ;;
13103 --version | --vers* | -V )
13104 echo "$ac_cs_version"; exit 0 ;;
13105 --he | --h)
13106 # Conflict between --help and --header
13107 { { echo "$as_me:$LINENO: error: ambiguous option: $1
13108 Try \`$0 --help' for more information." >&5
13109 echo "$as_me: error: ambiguous option: $1
13110 Try \`$0 --help' for more information." >&2;}
13111 { (exit 1); exit 1; }; };;
13112 --help | --hel | -h )
13113 echo "$ac_cs_usage"; exit 0 ;;
13114 --debug | --d* | -d )
13115 debug=: ;;
13116 --file | --fil | --fi | --f )
13117 $ac_shift
13118 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
13119 ac_need_defaults=false;;
13120 --header | --heade | --head | --hea )
13121 $ac_shift
13122 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
13123 ac_need_defaults=false;;
13124 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
13125 | -silent | --silent | --silen | --sile | --sil | --si | --s)
13126 ac_cs_silent=: ;;
13128 # This is an error.
13129 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
13130 Try \`$0 --help' for more information." >&5
13131 echo "$as_me: error: unrecognized option: $1
13132 Try \`$0 --help' for more information." >&2;}
13133 { (exit 1); exit 1; }; } ;;
13135 *) ac_config_targets="$ac_config_targets $1" ;;
13137 esac
13138 shift
13139 done
13141 ac_configure_extra_args=
13143 if $ac_cs_silent; then
13144 exec 6>/dev/null
13145 ac_configure_extra_args="$ac_configure_extra_args --silent"
13148 _ACEOF
13149 cat >>$CONFIG_STATUS <<_ACEOF
13150 if \$ac_cs_recheck; then
13151 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
13152 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
13155 _ACEOF
13161 cat >>$CONFIG_STATUS <<\_ACEOF
13162 for ac_config_target in $ac_config_targets
13164 case "$ac_config_target" in
13165 # Handling of arguments.
13166 "${GENERATE_FILES}" ) CONFIG_FILES="$CONFIG_FILES ${GENERATE_FILES}" ;;
13167 "include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h:autoconf/config.h.in" ;;
13168 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
13169 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
13170 { (exit 1); exit 1; }; };;
13171 esac
13172 done
13174 # If the user did not use the arguments to specify the items to instantiate,
13175 # then the envvar interface is used. Set only those that are not.
13176 # We use the long form for the default assignment because of an extremely
13177 # bizarre bug on SunOS 4.1.3.
13178 if $ac_need_defaults; then
13179 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
13180 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
13183 # Have a temporary directory for convenience. Make it in the build tree
13184 # simply because there is no reason to put it here, and in addition,
13185 # creating and moving files from /tmp can sometimes cause problems.
13186 # Create a temporary directory, and hook for its removal unless debugging.
13187 $debug ||
13189 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
13190 trap '{ (exit 1); exit 1; }' 1 2 13 15
13193 # Create a (secure) tmp directory for tmp files.
13196 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
13197 test -n "$tmp" && test -d "$tmp"
13198 } ||
13200 tmp=./confstat$$-$RANDOM
13201 (umask 077 && mkdir $tmp)
13202 } ||
13204 echo "$me: cannot create a temporary directory in ." >&2
13205 { (exit 1); exit 1; }
13208 _ACEOF
13210 cat >>$CONFIG_STATUS <<_ACEOF
13213 # CONFIG_FILES section.
13216 # No need to generate the scripts if there are no CONFIG_FILES.
13217 # This happens for instance when ./config.status config.h
13218 if test -n "\$CONFIG_FILES"; then
13219 # Protect against being on the right side of a sed subst in config.status.
13220 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
13221 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
13222 s,@SHELL@,$SHELL,;t t
13223 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
13224 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
13225 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
13226 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
13227 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
13228 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
13229 s,@exec_prefix@,$exec_prefix,;t t
13230 s,@prefix@,$prefix,;t t
13231 s,@program_transform_name@,$program_transform_name,;t t
13232 s,@bindir@,$bindir,;t t
13233 s,@sbindir@,$sbindir,;t t
13234 s,@libexecdir@,$libexecdir,;t t
13235 s,@datadir@,$datadir,;t t
13236 s,@sysconfdir@,$sysconfdir,;t t
13237 s,@sharedstatedir@,$sharedstatedir,;t t
13238 s,@localstatedir@,$localstatedir,;t t
13239 s,@libdir@,$libdir,;t t
13240 s,@includedir@,$includedir,;t t
13241 s,@oldincludedir@,$oldincludedir,;t t
13242 s,@infodir@,$infodir,;t t
13243 s,@mandir@,$mandir,;t t
13244 s,@build_alias@,$build_alias,;t t
13245 s,@host_alias@,$host_alias,;t t
13246 s,@target_alias@,$target_alias,;t t
13247 s,@DEFS@,$DEFS,;t t
13248 s,@ECHO_C@,$ECHO_C,;t t
13249 s,@ECHO_N@,$ECHO_N,;t t
13250 s,@ECHO_T@,$ECHO_T,;t t
13251 s,@LIBS@,$LIBS,;t t
13252 s,@ABSSRCDIR@,$ABSSRCDIR,;t t
13253 s,@topdir@,$topdir,;t t
13254 s,@TOP_DIR@,$TOP_DIR,;t t
13255 s,@VERSION@,$VERSION,;t t
13256 s,@DATE@,$DATE,;t t
13257 s,@TRUEPRG@,$TRUEPRG,;t t
13258 s,@FALSEPRG@,$FALSEPRG,;t t
13259 s,@build@,$build,;t t
13260 s,@build_cpu@,$build_cpu,;t t
13261 s,@build_vendor@,$build_vendor,;t t
13262 s,@build_os@,$build_os,;t t
13263 s,@host@,$host,;t t
13264 s,@host_cpu@,$host_cpu,;t t
13265 s,@host_vendor@,$host_vendor,;t t
13266 s,@host_os@,$host_os,;t t
13267 s,@CXX@,$CXX,;t t
13268 s,@CXXFLAGS@,$CXXFLAGS,;t t
13269 s,@LDFLAGS@,$LDFLAGS,;t t
13270 s,@CPPFLAGS@,$CPPFLAGS,;t t
13271 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
13272 s,@EXEEXT@,$EXEEXT,;t t
13273 s,@OBJEXT@,$OBJEXT,;t t
13274 s,@CC@,$CC,;t t
13275 s,@CFLAGS@,$CFLAGS,;t t
13276 s,@ac_ct_CC@,$ac_ct_CC,;t t
13277 s,@CPP@,$CPP,;t t
13278 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
13279 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
13280 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
13281 s,@AWK@,$AWK,;t t
13282 s,@HAVE_GCC_TRUE@,$HAVE_GCC_TRUE,;t t
13283 s,@HAVE_GCC_FALSE@,$HAVE_GCC_FALSE,;t t
13284 s,@DEBUG@,$DEBUG,;t t
13285 s,@DRVLIBS@,$DRVLIBS,;t t
13286 s,@APCDRVLIBS@,$APCDRVLIBS,;t t
13287 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
13288 s,@PTHREAD_LFLAGS@,$PTHREAD_LFLAGS,;t t
13289 s,@APCACCESS@,$APCACCESS,;t t
13290 s,@SMTP@,$SMTP,;t t
13291 s,@APCTEST@,$APCTEST,;t t
13292 s,@SHUTDOWN@,$SHUTDOWN,;t t
13293 s,@APCUPSD_MAIL@,$APCUPSD_MAIL,;t t
13294 s,@WALL@,$WALL,;t t
13295 s,@SCRIPTSHELL@,$SCRIPTSHELL,;t t
13296 s,@RANLIB@,$RANLIB,;t t
13297 s,@RM@,$RM,;t t
13298 s,@CP@,$CP,;t t
13299 s,@ECHO@,$ECHO,;t t
13300 s,@LN@,$LN,;t t
13301 s,@SED@,$SED,;t t
13302 s,@AR@,$AR,;t t
13303 s,@MV@,$MV,;t t
13304 s,@RST2HTML@,$RST2HTML,;t t
13305 s,@RST2PDF@,$RST2PDF,;t t
13306 s,@EGREP@,$EGREP,;t t
13307 s,@X_CFLAGS@,$X_CFLAGS,;t t
13308 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
13309 s,@X_LIBS@,$X_LIBS,;t t
13310 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
13311 s,@HALPOLICYDIR@,$HALPOLICYDIR,;t t
13312 s,@GDHEAD@,$GDHEAD,;t t
13313 s,@APCSMART_DRIVER@,$APCSMART_DRIVER,;t t
13314 s,@DUMB_DRIVER@,$DUMB_DRIVER,;t t
13315 s,@LIBUSBHID@,$LIBUSBHID,;t t
13316 s,@LIBUSBHIDINC@,$LIBUSBHIDINC,;t t
13317 s,@usbcfg@,$usbcfg,;t t
13318 s,@LIBUSBH@,$LIBUSBH,;t t
13319 s,@USB_DRIVER@,$USB_DRIVER,;t t
13320 s,@USB_TYPE@,$USB_TYPE,;t t
13321 s,@NET_DRIVER@,$NET_DRIVER,;t t
13322 s,@SNMPLITE_DRIVER@,$SNMPLITE_DRIVER,;t t
13323 s,@SNMP_DRIVER@,$SNMP_DRIVER,;t t
13324 s,@TEST_DRIVER@,$TEST_DRIVER,;t t
13325 s,@PCNET_DRIVER@,$PCNET_DRIVER,;t t
13326 s,@NISIP@,$NISIP,;t t
13327 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
13328 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
13329 s,@GAPCMON_CFLAGS@,$GAPCMON_CFLAGS,;t t
13330 s,@GAPCMON_LIBS@,$GAPCMON_LIBS,;t t
13331 s,@GAPCMON@,$GAPCMON,;t t
13332 s,@APCAGENT@,$APCAGENT,;t t
13333 s,@POWERFLUTE@,$POWERFLUTE,;t t
13334 s,@POWERLIBS@,$POWERLIBS,;t t
13335 s,@MAKE@,$MAKE,;t t
13336 s,@LD@,$LD,;t t
13337 s,@CGI@,$CGI,;t t
13338 s,@GD_LIBS@,$GD_LIBS,;t t
13339 s,@CGIBIN@,$CGIBIN,;t t
13340 s,@SYSCONFDIR@,$SYSCONFDIR,;t t
13341 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
13342 s,@EXTRADEFS@,$EXTRADEFS,;t t
13343 s,@LIBEXTRAOBJ@,$LIBEXTRAOBJ,;t t
13344 s,@EXTRAOBJ@,$EXTRAOBJ,;t t
13345 s,@DISTDIR@,$DISTDIR,;t t
13346 s,@DISTNAME@,$DISTNAME,;t t
13347 s,@DISTVER@,$DISTVER,;t t
13348 s,@SERIALDEV@,$SERIALDEV,;t t
13349 s,@PIDDIR@,$PIDDIR,;t t
13350 s,@LOGDIR@,$LOGDIR,;t t
13351 s,@nologdir@,$nologdir,;t t
13352 s,@PWRFAILDIR@,$PWRFAILDIR,;t t
13353 s,@LOCKDIR@,$LOCKDIR,;t t
13354 s,@NISPORT@,$NISPORT,;t t
13355 s,@UPSTYPE@,$UPSTYPE,;t t
13356 s,@UPSCABLE@,$UPSCABLE,;t t
13357 s,@HOST@,$HOST,;t t
13358 s,@LIBOBJS@,$LIBOBJS,;t t
13359 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
13360 CEOF
13362 _ACEOF
13364 cat >>$CONFIG_STATUS <<\_ACEOF
13365 # Split the substitutions into bite-sized pieces for seds with
13366 # small command number limits, like on Digital OSF/1 and HP-UX.
13367 ac_max_sed_lines=48
13368 ac_sed_frag=1 # Number of current file.
13369 ac_beg=1 # First line for current file.
13370 ac_end=$ac_max_sed_lines # Line after last line for current file.
13371 ac_more_lines=:
13372 ac_sed_cmds=
13373 while $ac_more_lines; do
13374 if test $ac_beg -gt 1; then
13375 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
13376 else
13377 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
13379 if test ! -s $tmp/subs.frag; then
13380 ac_more_lines=false
13381 else
13382 # The purpose of the label and of the branching condition is to
13383 # speed up the sed processing (if there are no `@' at all, there
13384 # is no need to browse any of the substitutions).
13385 # These are the two extra sed commands mentioned above.
13386 (echo ':t
13387 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
13388 if test -z "$ac_sed_cmds"; then
13389 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
13390 else
13391 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
13393 ac_sed_frag=`expr $ac_sed_frag + 1`
13394 ac_beg=$ac_end
13395 ac_end=`expr $ac_end + $ac_max_sed_lines`
13397 done
13398 if test -z "$ac_sed_cmds"; then
13399 ac_sed_cmds=cat
13401 fi # test -n "$CONFIG_FILES"
13403 _ACEOF
13404 cat >>$CONFIG_STATUS <<\_ACEOF
13405 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
13406 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13407 case $ac_file in
13408 - | *:- | *:-:* ) # input from stdin
13409 cat >$tmp/stdin
13410 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13411 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13412 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13413 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13414 * ) ac_file_in=$ac_file.in ;;
13415 esac
13417 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
13418 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
13419 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13420 X"$ac_file" : 'X\(//\)[^/]' \| \
13421 X"$ac_file" : 'X\(//\)$' \| \
13422 X"$ac_file" : 'X\(/\)' \| \
13423 . : '\(.\)' 2>/dev/null ||
13424 echo X"$ac_file" |
13425 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13426 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13427 /^X\(\/\/\)$/{ s//\1/; q; }
13428 /^X\(\/\).*/{ s//\1/; q; }
13429 s/.*/./; q'`
13430 { if $as_mkdir_p; then
13431 mkdir -p "$ac_dir"
13432 else
13433 as_dir="$ac_dir"
13434 as_dirs=
13435 while test ! -d "$as_dir"; do
13436 as_dirs="$as_dir $as_dirs"
13437 as_dir=`(dirname "$as_dir") 2>/dev/null ||
13438 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13439 X"$as_dir" : 'X\(//\)[^/]' \| \
13440 X"$as_dir" : 'X\(//\)$' \| \
13441 X"$as_dir" : 'X\(/\)' \| \
13442 . : '\(.\)' 2>/dev/null ||
13443 echo X"$as_dir" |
13444 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13445 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13446 /^X\(\/\/\)$/{ s//\1/; q; }
13447 /^X\(\/\).*/{ s//\1/; q; }
13448 s/.*/./; q'`
13449 done
13450 test ! -n "$as_dirs" || mkdir $as_dirs
13451 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
13452 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
13453 { (exit 1); exit 1; }; }; }
13455 ac_builddir=.
13457 if test "$ac_dir" != .; then
13458 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
13459 # A "../" for each directory in $ac_dir_suffix.
13460 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
13461 else
13462 ac_dir_suffix= ac_top_builddir=
13465 case $srcdir in
13466 .) # No --srcdir option. We are building in place.
13467 ac_srcdir=.
13468 if test -z "$ac_top_builddir"; then
13469 ac_top_srcdir=.
13470 else
13471 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
13472 fi ;;
13473 [\\/]* | ?:[\\/]* ) # Absolute path.
13474 ac_srcdir=$srcdir$ac_dir_suffix;
13475 ac_top_srcdir=$srcdir ;;
13476 *) # Relative path.
13477 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
13478 ac_top_srcdir=$ac_top_builddir$srcdir ;;
13479 esac
13481 # Do not use `cd foo && pwd` to compute absolute paths, because
13482 # the directories may not exist.
13483 case `pwd` in
13484 .) ac_abs_builddir="$ac_dir";;
13486 case "$ac_dir" in
13487 .) ac_abs_builddir=`pwd`;;
13488 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
13489 *) ac_abs_builddir=`pwd`/"$ac_dir";;
13490 esac;;
13491 esac
13492 case $ac_abs_builddir in
13493 .) ac_abs_top_builddir=${ac_top_builddir}.;;
13495 case ${ac_top_builddir}. in
13496 .) ac_abs_top_builddir=$ac_abs_builddir;;
13497 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
13498 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
13499 esac;;
13500 esac
13501 case $ac_abs_builddir in
13502 .) ac_abs_srcdir=$ac_srcdir;;
13504 case $ac_srcdir in
13505 .) ac_abs_srcdir=$ac_abs_builddir;;
13506 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
13507 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
13508 esac;;
13509 esac
13510 case $ac_abs_builddir in
13511 .) ac_abs_top_srcdir=$ac_top_srcdir;;
13513 case $ac_top_srcdir in
13514 .) ac_abs_top_srcdir=$ac_abs_builddir;;
13515 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
13516 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
13517 esac;;
13518 esac
13521 case $INSTALL in
13522 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
13523 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
13524 esac
13526 if test x"$ac_file" != x-; then
13527 { echo "$as_me:$LINENO: creating $ac_file" >&5
13528 echo "$as_me: creating $ac_file" >&6;}
13529 rm -f "$ac_file"
13531 # Let's still pretend it is `configure' which instantiates (i.e., don't
13532 # use $as_me), people would be surprised to read:
13533 # /* config.h. Generated by config.status. */
13534 if test x"$ac_file" = x-; then
13535 configure_input=
13536 else
13537 configure_input="$ac_file. "
13539 configure_input=$configure_input"Generated from `echo $ac_file_in |
13540 sed 's,.*/,,'` by configure."
13542 # First look for the input files in the build tree, otherwise in the
13543 # src tree.
13544 ac_file_inputs=`IFS=:
13545 for f in $ac_file_in; do
13546 case $f in
13547 -) echo $tmp/stdin ;;
13548 [\\/$]*)
13549 # Absolute (can't be DOS-style, as IFS=:)
13550 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
13551 echo "$as_me: error: cannot find input file: $f" >&2;}
13552 { (exit 1); exit 1; }; }
13553 echo "$f";;
13554 *) # Relative
13555 if test -f "$f"; then
13556 # Build tree
13557 echo "$f"
13558 elif test -f "$srcdir/$f"; then
13559 # Source tree
13560 echo "$srcdir/$f"
13561 else
13562 # /dev/null tree
13563 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
13564 echo "$as_me: error: cannot find input file: $f" >&2;}
13565 { (exit 1); exit 1; }; }
13566 fi;;
13567 esac
13568 done` || { (exit 1); exit 1; }
13569 _ACEOF
13570 cat >>$CONFIG_STATUS <<_ACEOF
13571 sed "$ac_vpsub
13572 $extrasub
13573 _ACEOF
13574 cat >>$CONFIG_STATUS <<\_ACEOF
13576 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13577 s,@configure_input@,$configure_input,;t t
13578 s,@srcdir@,$ac_srcdir,;t t
13579 s,@abs_srcdir@,$ac_abs_srcdir,;t t
13580 s,@top_srcdir@,$ac_top_srcdir,;t t
13581 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
13582 s,@builddir@,$ac_builddir,;t t
13583 s,@abs_builddir@,$ac_abs_builddir,;t t
13584 s,@top_builddir@,$ac_top_builddir,;t t
13585 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
13586 s,@INSTALL@,$ac_INSTALL,;t t
13587 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
13588 rm -f $tmp/stdin
13589 if test x"$ac_file" != x-; then
13590 mv $tmp/out $ac_file
13591 else
13592 cat $tmp/out
13593 rm -f $tmp/out
13596 done
13597 _ACEOF
13598 cat >>$CONFIG_STATUS <<\_ACEOF
13601 # CONFIG_HEADER section.
13604 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13605 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13607 # ac_d sets the value in "#define NAME VALUE" lines.
13608 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
13609 ac_dB='[ ].*$,\1#\2'
13610 ac_dC=' '
13611 ac_dD=',;t'
13612 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13613 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
13614 ac_uB='$,\1#\2define\3'
13615 ac_uC=' '
13616 ac_uD=',;t'
13618 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
13619 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13620 case $ac_file in
13621 - | *:- | *:-:* ) # input from stdin
13622 cat >$tmp/stdin
13623 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13624 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13625 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13626 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13627 * ) ac_file_in=$ac_file.in ;;
13628 esac
13630 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
13631 echo "$as_me: creating $ac_file" >&6;}
13633 # First look for the input files in the build tree, otherwise in the
13634 # src tree.
13635 ac_file_inputs=`IFS=:
13636 for f in $ac_file_in; do
13637 case $f in
13638 -) echo $tmp/stdin ;;
13639 [\\/$]*)
13640 # Absolute (can't be DOS-style, as IFS=:)
13641 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
13642 echo "$as_me: error: cannot find input file: $f" >&2;}
13643 { (exit 1); exit 1; }; }
13644 # Do quote $f, to prevent DOS paths from being IFS'd.
13645 echo "$f";;
13646 *) # Relative
13647 if test -f "$f"; then
13648 # Build tree
13649 echo "$f"
13650 elif test -f "$srcdir/$f"; then
13651 # Source tree
13652 echo "$srcdir/$f"
13653 else
13654 # /dev/null tree
13655 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
13656 echo "$as_me: error: cannot find input file: $f" >&2;}
13657 { (exit 1); exit 1; }; }
13658 fi;;
13659 esac
13660 done` || { (exit 1); exit 1; }
13661 # Remove the trailing spaces.
13662 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
13664 _ACEOF
13666 # Transform confdefs.h into two sed scripts, `conftest.defines' and
13667 # `conftest.undefs', that substitutes the proper values into
13668 # config.h.in to produce config.h. The first handles `#define'
13669 # templates, and the second `#undef' templates.
13670 # And first: Protect against being on the right side of a sed subst in
13671 # config.status. Protect against being in an unquoted here document
13672 # in config.status.
13673 rm -f conftest.defines conftest.undefs
13674 # Using a here document instead of a string reduces the quoting nightmare.
13675 # Putting comments in sed scripts is not portable.
13677 # `end' is used to avoid that the second main sed command (meant for
13678 # 0-ary CPP macros) applies to n-ary macro definitions.
13679 # See the Autoconf documentation for `clear'.
13680 cat >confdef2sed.sed <<\_ACEOF
13681 s/[\\&,]/\\&/g
13682 s,[\\$`],\\&,g
13683 t clear
13684 : clear
13685 s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
13686 t end
13687 s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
13688 : end
13689 _ACEOF
13690 # If some macros were called several times there might be several times
13691 # the same #defines, which is useless. Nevertheless, we may not want to
13692 # sort them, since we want the *last* AC-DEFINE to be honored.
13693 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
13694 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
13695 rm -f confdef2sed.sed
13697 # This sed command replaces #undef with comments. This is necessary, for
13698 # example, in the case of _POSIX_SOURCE, which is predefined and required
13699 # on some systems where configure will not decide to define it.
13700 cat >>conftest.undefs <<\_ACEOF
13701 s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
13702 _ACEOF
13704 # Break up conftest.defines because some shells have a limit on the size
13705 # of here documents, and old seds have small limits too (100 cmds).
13706 echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
13707 echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
13708 echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
13709 echo ' :' >>$CONFIG_STATUS
13710 rm -f conftest.tail
13711 while grep . conftest.defines >/dev/null
13713 # Write a limited-size here document to $tmp/defines.sed.
13714 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
13715 # Speed up: don't consider the non `#define' lines.
13716 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
13717 # Work around the forget-to-reset-the-flag bug.
13718 echo 't clr' >>$CONFIG_STATUS
13719 echo ': clr' >>$CONFIG_STATUS
13720 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
13721 echo 'CEOF
13722 sed -f $tmp/defines.sed $tmp/in >$tmp/out
13723 rm -f $tmp/in
13724 mv $tmp/out $tmp/in
13725 ' >>$CONFIG_STATUS
13726 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
13727 rm -f conftest.defines
13728 mv conftest.tail conftest.defines
13729 done
13730 rm -f conftest.defines
13731 echo ' fi # grep' >>$CONFIG_STATUS
13732 echo >>$CONFIG_STATUS
13734 # Break up conftest.undefs because some shells have a limit on the size
13735 # of here documents, and old seds have small limits too (100 cmds).
13736 echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
13737 rm -f conftest.tail
13738 while grep . conftest.undefs >/dev/null
13740 # Write a limited-size here document to $tmp/undefs.sed.
13741 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
13742 # Speed up: don't consider the non `#undef'
13743 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
13744 # Work around the forget-to-reset-the-flag bug.
13745 echo 't clr' >>$CONFIG_STATUS
13746 echo ': clr' >>$CONFIG_STATUS
13747 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
13748 echo 'CEOF
13749 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
13750 rm -f $tmp/in
13751 mv $tmp/out $tmp/in
13752 ' >>$CONFIG_STATUS
13753 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
13754 rm -f conftest.undefs
13755 mv conftest.tail conftest.undefs
13756 done
13757 rm -f conftest.undefs
13759 cat >>$CONFIG_STATUS <<\_ACEOF
13760 # Let's still pretend it is `configure' which instantiates (i.e., don't
13761 # use $as_me), people would be surprised to read:
13762 # /* config.h. Generated by config.status. */
13763 if test x"$ac_file" = x-; then
13764 echo "/* Generated by configure. */" >$tmp/config.h
13765 else
13766 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
13768 cat $tmp/in >>$tmp/config.h
13769 rm -f $tmp/in
13770 if test x"$ac_file" != x-; then
13771 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
13772 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
13773 echo "$as_me: $ac_file is unchanged" >&6;}
13774 else
13775 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
13776 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13777 X"$ac_file" : 'X\(//\)[^/]' \| \
13778 X"$ac_file" : 'X\(//\)$' \| \
13779 X"$ac_file" : 'X\(/\)' \| \
13780 . : '\(.\)' 2>/dev/null ||
13781 echo X"$ac_file" |
13782 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13783 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13784 /^X\(\/\/\)$/{ s//\1/; q; }
13785 /^X\(\/\).*/{ s//\1/; q; }
13786 s/.*/./; q'`
13787 { if $as_mkdir_p; then
13788 mkdir -p "$ac_dir"
13789 else
13790 as_dir="$ac_dir"
13791 as_dirs=
13792 while test ! -d "$as_dir"; do
13793 as_dirs="$as_dir $as_dirs"
13794 as_dir=`(dirname "$as_dir") 2>/dev/null ||
13795 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13796 X"$as_dir" : 'X\(//\)[^/]' \| \
13797 X"$as_dir" : 'X\(//\)$' \| \
13798 X"$as_dir" : 'X\(/\)' \| \
13799 . : '\(.\)' 2>/dev/null ||
13800 echo X"$as_dir" |
13801 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13802 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13803 /^X\(\/\/\)$/{ s//\1/; q; }
13804 /^X\(\/\).*/{ s//\1/; q; }
13805 s/.*/./; q'`
13806 done
13807 test ! -n "$as_dirs" || mkdir $as_dirs
13808 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
13809 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
13810 { (exit 1); exit 1; }; }; }
13812 rm -f $ac_file
13813 mv $tmp/config.h $ac_file
13815 else
13816 cat $tmp/config.h
13817 rm -f $tmp/config.h
13819 done
13820 _ACEOF
13822 cat >>$CONFIG_STATUS <<\_ACEOF
13824 { (exit 0); exit 0; }
13825 _ACEOF
13826 chmod +x $CONFIG_STATUS
13827 ac_clean_files=$ac_clean_files_save
13830 # configure is writing to config.log, and then calls config.status.
13831 # config.status does its own redirection, appending to config.log.
13832 # Unfortunately, on DOS this fails, as config.log is still kept open
13833 # by configure, so config.status won't be able to write to it; its
13834 # output is simply discarded. So we exec the FD to /dev/null,
13835 # effectively closing config.log, so it can be properly (re)opened and
13836 # appended to by config.status. When coming back to configure, we
13837 # need to make the FD available again.
13838 if test "$no_create" != yes; then
13839 ac_cs_success=:
13840 ac_config_status_args=
13841 test "$silent" = yes &&
13842 ac_config_status_args="$ac_config_status_args --quiet"
13843 exec 5>/dev/null
13844 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13845 exec 5>>config.log
13846 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13847 # would make configure fail if this is the last instruction.
13848 $ac_cs_success || { (exit 1); exit 1; }
13852 chmod 755 examples/safe.apccontrol
13853 $MAKE clean
13856 # A whole lot of hand springs to get the compiler version.
13857 # This is because gcc changed the output in version 3.0
13859 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
13860 if test "x${CXXVERSION}" = "x" ; then
13861 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
13864 eval srcdir=${srcdir}
13865 eval sbindir=${sbindir}
13866 eval sysconfdir=${sysconfdir}
13867 eval mandir=${mandir}
13869 echo "
13871 Configuration on `date`:
13873 Host: $host -- ${DISTNAME} ${DISTVER}
13874 Apcupsd version: ${VERSION} (${DATE})
13875 Source code location: ${srcdir}
13876 Install binaries: ${sbindir}
13877 Install config files: ${sysconfdir}
13878 Install man files: ${mandir}
13879 Nologin file in: ${nologdir}
13880 PID directory: ${PIDDIR}
13881 LOG dir (events, status) ${LOGDIR}
13882 LOCK dir (for serial port) ${LOCKDIR}
13883 Power Fail dir ${PWRFAILDIR}
13884 Compiler: ${CXX} ${CXXVERSION}
13885 Compiler flags: ${CPPFLAGS} ${CXXFLAGS} ${PTHREAD_FLAGS}
13886 Linker: ${LD}
13887 Linker flags: ${LDFLAGS}
13888 Host and version: ${DISTNAME} ${DISTVER}
13889 Shutdown Program: ${SHUTDOWN}
13890 Port/Device: ${SERIALDEV}
13891 Network Info Port (CGI): ${NISPORT}
13892 UPSTYPE ${UPSTYPE}
13893 UPSCABLE ${UPSCABLE}
13895 drivers (no-* are disabled): ${APCSMART_DRIVER:-no-apcsmart} ${DUMB_DRIVER:-no-dumb} ${NET_DRIVER:-no-net} ${DISPLAY_USB_DRIVER:-no-usb} ${DISPLAY_SNMP_DRIVER:-no-snmp} ${DISPLAY_NETSNMP_DRIVER:-no-net-snmp} ${PCNET_DRIVER:-no-pcnet} ${TEST_DRIVER:-no-test}
13897 enable-nis: ${NISSRV_ENABLED}
13898 with-nisip: ${NISIP}
13899 enable-cgi: ${ENABLE_CGI}
13900 with-cgi-bin: ${CGIBIN}
13901 with-libwrap: ${with_libwrap}
13902 enable-pthreads: ${with_pthreads}
13903 enable-dist-install: ${with_distdir}
13904 enable-gapcmon: ${GAPCMON_ENABLED}
13905 enable-apcagent: ${APCAGENT_ENABLED}
13906 " > config.out
13908 cat config.out
13910 echo Configuration complete: Run \'$MAKE\' to build apcuspd.
13911 echo
13913 echo $PATH | grep /usr/ucb >/dev/null
13914 if test $? = 0 ; then
13915 { echo "$as_me:$LINENO: WARNING:
13916 WARNING! You have /usr/ucb on your path. We STRONGLY recommend
13917 that you remove it and rerun configure. Otherwise
13918 apcupsd may be unable to shutdown your system.
13919 " >&5
13920 echo "$as_me: WARNING:
13921 WARNING! You have /usr/ucb on your path. We STRONGLY recommend
13922 that you remove it and rerun configure. Otherwise
13923 apcupsd may be unable to shutdown your system.
13924 " >&2;};