1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18  emulate sh
19  NULLCMD=:
20  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21  # is contrary to our usage.  Disable this feature.
22  alias -g '${1+"$@"}'='"$@"'
23  setopt NO_GLOB_SUBST
24else
25  case `(set -o) 2>/dev/null` in #(
26  *posix*) :
27    set -o posix ;; #(
28  *) :
29     ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45  as_echo='print -r --'
46  as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48  as_echo='printf %s\n'
49  as_echo_n='printf %s'
50else
51  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53    as_echo_n='/usr/ucb/echo -n'
54  else
55    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56    as_echo_n_body='eval
57      arg=$1;
58      case $arg in #(
59      *"$as_nl"*)
60	expr "X$arg" : "X\\(.*\\)$as_nl";
61	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62      esac;
63      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64    '
65    export as_echo_n_body
66    as_echo_n='sh -c $as_echo_n_body as_echo'
67  fi
68  export as_echo_body
69  as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74  PATH_SEPARATOR=:
75  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77      PATH_SEPARATOR=';'
78  }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order.  Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" ""	$as_nl"
88
89# Find who we are.  Look in the path if we contain no directory separator.
90as_myself=
91case $0 in #((
92  *[\\/]* ) as_myself=$0 ;;
93  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96  IFS=$as_save_IFS
97  test -z "$as_dir" && as_dir=.
98    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99  done
100IFS=$as_save_IFS
101
102     ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107  as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111  exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there.  '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135# Use a proper internal environment variable to ensure we don't fall
136  # into an infinite loop, continuously re-executing ourselves.
137  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138    _as_can_reexec=no; export _as_can_reexec;
139    # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147  *v*x* | *x*v* ) as_opts=-vx ;;
148  *v* ) as_opts=-v ;;
149  *x* ) as_opts=-x ;;
150  * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157  fi
158  # We don't want this to propagate to other subprocesses.
159          { _as_can_reexec=; unset _as_can_reexec;}
160if test "x$CONFIG_SHELL" = x; then
161  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162  emulate sh
163  NULLCMD=:
164  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165  # is contrary to our usage.  Disable this feature.
166  alias -g '\${1+\"\$@\"}'='\"\$@\"'
167  setopt NO_GLOB_SUBST
168else
169  case \`(set -o) 2>/dev/null\` in #(
170  *posix*) :
171    set -o posix ;; #(
172  *) :
173     ;;
174esac
175fi
176"
177  as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191  exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
195  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200  if (eval "$as_required") 2>/dev/null; then :
201  as_have_required=yes
202else
203  as_have_required=no
204fi
205  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212  IFS=$as_save_IFS
213  test -z "$as_dir" && as_dir=.
214  as_found=:
215  case $as_dir in #(
216	 /*)
217	   for as_base in sh bash ksh sh5; do
218	     # Try only shells that exist, to save several forks.
219	     as_shell=$as_dir/$as_base
220	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222  CONFIG_SHELL=$as_shell as_have_required=yes
223		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  break 2
225fi
226fi
227	   done;;
228       esac
229  as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233  CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238      if test "x$CONFIG_SHELL" != x; then :
239  export CONFIG_SHELL
240             # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248  *v*x* | *x*v* ) as_opts=-vx ;;
249  *v* ) as_opts=-v ;;
250  *x* ) as_opts=-x ;;
251  * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
258fi
259
260    if test x$as_have_required = xno; then :
261  $as_echo "$0: This script requires a shell more modern than all"
262  $as_echo "$0: the shells that I found on your system."
263  if test x${ZSH_VERSION+set} = xset ; then
264    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266  else
267    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271  fi
272  exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290  { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299  return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307  set +e
308  as_fn_set_status $1
309  exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318  case $as_dir in #(
319  -*) as_dir=./$as_dir;;
320  esac
321  test -d "$as_dir" || eval $as_mkdir_p || {
322    as_dirs=
323    while :; do
324      case $as_dir in #(
325      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326      *) as_qdir=$as_dir;;
327      esac
328      as_dirs="'$as_qdir' $as_dirs"
329      as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331	 X"$as_dir" : 'X\(//\)[^/]' \| \
332	 X"$as_dir" : 'X\(//\)$' \| \
333	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336	    s//\1/
337	    q
338	  }
339	  /^X\(\/\/\)[^/].*/{
340	    s//\1/
341	    q
342	  }
343	  /^X\(\/\/\)$/{
344	    s//\1/
345	    q
346	  }
347	  /^X\(\/\).*/{
348	    s//\1/
349	    q
350	  }
351	  s/.*/./; q'`
352      test -d "$as_dir" && break
353    done
354    test -z "$as_dirs" || eval "mkdir $as_dirs"
355  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358} # as_fn_mkdir_p
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365  test -f "$1" && test -x "$1"
366} # as_fn_executable_p
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374  eval 'as_fn_append ()
375  {
376    eval $1+=\$2
377  }'
378else
379  as_fn_append ()
380  {
381    eval $1=\$$1\$2
382  }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391  eval 'as_fn_arith ()
392  {
393    as_val=$(( $* ))
394  }'
395else
396  as_fn_arith ()
397  {
398    as_val=`expr "$@" || test $? -eq 1`
399  }
400fi # as_fn_arith
401
402
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407# script with STATUS, using 1 if that was 0.
408as_fn_error ()
409{
410  as_status=$1; test $as_status -eq 0 && as_status=1
411  if test "$4"; then
412    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414  fi
415  $as_echo "$as_me: error: $2" >&2
416  as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420   test "X`expr 00001 : '.*\(...\)'`" = X001; then
421  as_expr=expr
422else
423  as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427  as_basename=basename
428else
429  as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433  as_dirname=dirname
434else
435  as_dirname=false
436fi
437
438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440	 X"$0" : 'X\(//\)$' \| \
441	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443    sed '/^.*\/\([^/][^/]*\)\/*$/{
444	    s//\1/
445	    q
446	  }
447	  /^X\/\(\/\/\)$/{
448	    s//\1/
449	    q
450	  }
451	  /^X\/\(\/\).*/{
452	    s//\1/
453	    q
454	  }
455	  s/.*/./; q'`
456
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465  as_lineno_1=$LINENO as_lineno_1a=$LINENO
466  as_lineno_2=$LINENO as_lineno_2a=$LINENO
467  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470  sed -n '
471    p
472    /[$]LINENO/=
473  ' <$as_myself |
474    sed '
475      s/[$]LINENO.*/&-/
476      t lineno
477      b
478      :lineno
479      N
480      :loop
481      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482      t loop
483      s/-\n.*//
484    ' >$as_me.lineno &&
485  chmod +x "$as_me.lineno" ||
486    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489  # already done that, so ensure we don't try to do so again and fall
490  # in an infinite loop.  This has already happened in practice.
491  _as_can_reexec=no; export _as_can_reexec
492  # Don't try to exec as it changes $[0], causing all sort of problems
493  # (the dirname of $[0] is not the place where we might find the
494  # original and so on.  Autoconf is especially sensitive to this).
495  . "./$as_me.lineno"
496  # Exit status is that of the last command.
497  exit
498}
499
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503  case `echo 'xy\c'` in
504  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
505  xy)  ECHO_C='\c';;
506  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507       ECHO_T='	';;
508  esac;;
509*)
510  ECHO_N='-n';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515  rm -f conf$$.dir/conf$$.file
516else
517  rm -f conf$$.dir
518  mkdir conf$$.dir 2>/dev/null
519fi
520if (echo >conf$$.file) 2>/dev/null; then
521  if ln -s conf$$.file conf$$ 2>/dev/null; then
522    as_ln_s='ln -s'
523    # ... but there are two gotchas:
524    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526    # In both cases, we have to default to `cp -pR'.
527    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528      as_ln_s='cp -pR'
529  elif ln conf$$.file conf$$ 2>/dev/null; then
530    as_ln_s=ln
531  else
532    as_ln_s='cp -pR'
533  fi
534else
535  as_ln_s='cp -pR'
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541  as_mkdir_p='mkdir -p "$as_dir"'
542else
543  test -d ./-p && rmdir ./-p
544  as_mkdir_p=false
545fi
546
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
559
560# Name of the host.
561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
583PACKAGE_URL=
584
585ac_unique_file="Developers"
586ac_default_prefix=/opt/apcctrl
587ac_default_prefix=/usr
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626HOST
627UPSCABLE
628UPSTYPE
629NISPORT
630LOCKDIR
631PWRFAILDIR
632nologdir
633LOGDIR
634PIDDIR
635SERIALDEV
636DISTVER
637DISTNAME
638WIN32
639DISTDIR
640EXTRAOBJ
641LIBEXTRAOBJ
642EXTRADEFS
643MKINSTALLDIRS
644SYSCONFDIR
645CGIBIN
646GD_LIBS
647CGI
648LD
649MAKE
650APCAGENT
651GAPCMON
652GAPCMON_LIBS
653GAPCMON_CFLAGS
654PKG_CONFIG
655NISIP
656LIBUSBHID
657LIBUSBH
658usbcfg
659MODBUS_DRIVER
660MODBUS_USB_DRIVER
661PCNET_DRIVER
662BRAZIL_DRIVER
663TEST_DRIVER
664SNMPLITE_DRIVER
665NET_DRIVER
666USB_TYPE
667USB_DRIVER
668DUMB_DRIVER
669APCSMART_DRIVER
670GDHEAD
671HALPOLICYDIR
672X_EXTRA_LIBS
673X_LIBS
674X_PRE_LIBS
675X_CFLAGS
676XMKMF
677EGREP
678GREP
679RST2PDF
680RST2HTML
681ac_ct_STRP
682STRP
683WINDRES
684MV
685AR
686SED
687LN
688ECHO
689CP
690RM
691RANLIB
692SCRIPTSHELL
693WALL
694APCCTRL_MAIL
695SHUTDOWN
696APCTEST
697SMTP
698APCACCESS
699PTHREAD_LFLAGS
700PTHREAD_CFLAGS
701APCDRVLIBS
702DRVLIBS
703DEBUG
704AWK
705INSTALL_DATA
706INSTALL_SCRIPT
707INSTALL_PROGRAM
708CPP
709ac_ct_CC
710CFLAGS
711CC
712OBJEXT
713EXEEXT
714ac_ct_CXX
715CPPFLAGS
716LDFLAGS
717CXXFLAGS
718CXX
719DEPKGS
720CROSSTOOLS
721BG
722host_os
723host_vendor
724host_cpu
725host
726build_os
727build_vendor
728build_cpu
729build
730FALSEPRG
731TRUEPRG
732DATE
733VERSION
734TOP_DIR
735topdir
736ABSSRCDIR
737target_alias
738host_alias
739build_alias
740LIBS
741ECHO_T
742ECHO_N
743ECHO_C
744DEFS
745mandir
746localedir
747libdir
748psdir
749pdfdir
750dvidir
751htmldir
752infodir
753docdir
754oldincludedir
755includedir
756runstatedir
757localstatedir
758sharedstatedir
759sysconfdir
760datadir
761datarootdir
762libexecdir
763sbindir
764bindir
765program_transform_name
766prefix
767exec_prefix
768PACKAGE_URL
769PACKAGE_BUGREPORT
770PACKAGE_STRING
771PACKAGE_VERSION
772PACKAGE_TARNAME
773PACKAGE_NAME
774PATH_SEPARATOR
775SHELL'
776ac_subst_files=''
777ac_user_opts='
778enable_option_checking
779with_x
780enable_all
781with_halpolicydir
782with_libwrap
783enable_cgi
784enable_apcsmart
785enable_dumb
786with_generic_usb
787enable_usb
788enable_net
789enable_snmp
790enable_test
791enable_brazil
792enable_pcnet
793enable_modbus_usb
794enable_modbus
795with_nisip
796with_cgi_bin
797enable_gapcmon
798enable_apcagent
799with_distname
800enable_install_distdir
801with_nologin
802with_pid_dir
803with_log_dir
804with_lock_dir
805with_pwrfail_dir
806with_serial_dev
807with_dev
808with_nis_port
809with_upstype
810with_upscable
811'
812      ac_precious_vars='build_alias
813host_alias
814target_alias
815CXX
816CXXFLAGS
817LDFLAGS
818LIBS
819CPPFLAGS
820CCC
821CC
822CFLAGS
823CPP
824XMKMF
825PKG_CONFIG
826GAPCMON_CFLAGS
827GAPCMON_LIBS'
828
829
830# Initialize some variables set by options.
831ac_init_help=
832ac_init_version=false
833ac_unrecognized_opts=
834ac_unrecognized_sep=
835# The variables have the same names as the options, with
836# dashes changed to underlines.
837cache_file=/dev/null
838exec_prefix=NONE
839no_create=
840no_recursion=
841prefix=NONE
842program_prefix=NONE
843program_suffix=NONE
844program_transform_name=s,x,x,
845silent=
846site=
847srcdir=
848verbose=
849x_includes=NONE
850x_libraries=NONE
851
852# Installation directory options.
853# These are left unexpanded so users can "make install exec_prefix=/foo"
854# and all the variables that are supposed to be based on exec_prefix
855# by default will actually change.
856# Use braces instead of parens because sh, perl, etc. also accept them.
857# (The list follows the same order as the GNU Coding Standards.)
858bindir='${exec_prefix}/bin'
859sbindir='${exec_prefix}/sbin'
860libexecdir='${exec_prefix}/libexec'
861datarootdir='${prefix}/share'
862datadir='${datarootdir}'
863sysconfdir='${prefix}/etc'
864sharedstatedir='${prefix}/com'
865localstatedir='${prefix}/var'
866runstatedir='${localstatedir}/run'
867includedir='${prefix}/include'
868oldincludedir='/usr/include'
869docdir='${datarootdir}/doc/${PACKAGE}'
870infodir='${datarootdir}/info'
871htmldir='${docdir}'
872dvidir='${docdir}'
873pdfdir='${docdir}'
874psdir='${docdir}'
875libdir='${exec_prefix}/lib'
876localedir='${datarootdir}/locale'
877mandir='${datarootdir}/man'
878
879ac_prev=
880ac_dashdash=
881for ac_option
882do
883  # If the previous option needs an argument, assign it.
884  if test -n "$ac_prev"; then
885    eval $ac_prev=\$ac_option
886    ac_prev=
887    continue
888  fi
889
890  case $ac_option in
891  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
892  *=)   ac_optarg= ;;
893  *)    ac_optarg=yes ;;
894  esac
895
896  # Accept the important Cygnus configure options, so we can diagnose typos.
897
898  case $ac_dashdash$ac_option in
899  --)
900    ac_dashdash=yes ;;
901
902  -bindir | --bindir | --bindi | --bind | --bin | --bi)
903    ac_prev=bindir ;;
904  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
905    bindir=$ac_optarg ;;
906
907  -build | --build | --buil | --bui | --bu)
908    ac_prev=build_alias ;;
909  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
910    build_alias=$ac_optarg ;;
911
912  -cache-file | --cache-file | --cache-fil | --cache-fi \
913  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
914    ac_prev=cache_file ;;
915  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
916  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
917    cache_file=$ac_optarg ;;
918
919  --config-cache | -C)
920    cache_file=config.cache ;;
921
922  -datadir | --datadir | --datadi | --datad)
923    ac_prev=datadir ;;
924  -datadir=* | --datadir=* | --datadi=* | --datad=*)
925    datadir=$ac_optarg ;;
926
927  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
928  | --dataroo | --dataro | --datar)
929    ac_prev=datarootdir ;;
930  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
931  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
932    datarootdir=$ac_optarg ;;
933
934  -disable-* | --disable-*)
935    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
936    # Reject names that are not valid shell variable names.
937    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
938      as_fn_error $? "invalid feature name: $ac_useropt"
939    ac_useropt_orig=$ac_useropt
940    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
941    case $ac_user_opts in
942      *"
943"enable_$ac_useropt"
944"*) ;;
945      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
946	 ac_unrecognized_sep=', ';;
947    esac
948    eval enable_$ac_useropt=no ;;
949
950  -docdir | --docdir | --docdi | --doc | --do)
951    ac_prev=docdir ;;
952  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
953    docdir=$ac_optarg ;;
954
955  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
956    ac_prev=dvidir ;;
957  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
958    dvidir=$ac_optarg ;;
959
960  -enable-* | --enable-*)
961    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
962    # Reject names that are not valid shell variable names.
963    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
964      as_fn_error $? "invalid feature name: $ac_useropt"
965    ac_useropt_orig=$ac_useropt
966    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
967    case $ac_user_opts in
968      *"
969"enable_$ac_useropt"
970"*) ;;
971      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
972	 ac_unrecognized_sep=', ';;
973    esac
974    eval enable_$ac_useropt=\$ac_optarg ;;
975
976  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
977  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
978  | --exec | --exe | --ex)
979    ac_prev=exec_prefix ;;
980  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
981  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
982  | --exec=* | --exe=* | --ex=*)
983    exec_prefix=$ac_optarg ;;
984
985  -gas | --gas | --ga | --g)
986    # Obsolete; use --with-gas.
987    with_gas=yes ;;
988
989  -help | --help | --hel | --he | -h)
990    ac_init_help=long ;;
991  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
992    ac_init_help=recursive ;;
993  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
994    ac_init_help=short ;;
995
996  -host | --host | --hos | --ho)
997    ac_prev=host_alias ;;
998  -host=* | --host=* | --hos=* | --ho=*)
999    host_alias=$ac_optarg ;;
1000
1001  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1002    ac_prev=htmldir ;;
1003  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1004  | --ht=*)
1005    htmldir=$ac_optarg ;;
1006
1007  -includedir | --includedir | --includedi | --included | --include \
1008  | --includ | --inclu | --incl | --inc)
1009    ac_prev=includedir ;;
1010  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1011  | --includ=* | --inclu=* | --incl=* | --inc=*)
1012    includedir=$ac_optarg ;;
1013
1014  -infodir | --infodir | --infodi | --infod | --info | --inf)
1015    ac_prev=infodir ;;
1016  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1017    infodir=$ac_optarg ;;
1018
1019  -libdir | --libdir | --libdi | --libd)
1020    ac_prev=libdir ;;
1021  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1022    libdir=$ac_optarg ;;
1023
1024  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1025  | --libexe | --libex | --libe)
1026    ac_prev=libexecdir ;;
1027  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1028  | --libexe=* | --libex=* | --libe=*)
1029    libexecdir=$ac_optarg ;;
1030
1031  -localedir | --localedir | --localedi | --localed | --locale)
1032    ac_prev=localedir ;;
1033  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1034    localedir=$ac_optarg ;;
1035
1036  -localstatedir | --localstatedir | --localstatedi | --localstated \
1037  | --localstate | --localstat | --localsta | --localst | --locals)
1038    ac_prev=localstatedir ;;
1039  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1040  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1041    localstatedir=$ac_optarg ;;
1042
1043  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1044    ac_prev=mandir ;;
1045  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1046    mandir=$ac_optarg ;;
1047
1048  -nfp | --nfp | --nf)
1049    # Obsolete; use --without-fp.
1050    with_fp=no ;;
1051
1052  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1053  | --no-cr | --no-c | -n)
1054    no_create=yes ;;
1055
1056  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1057  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1058    no_recursion=yes ;;
1059
1060  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1061  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1062  | --oldin | --oldi | --old | --ol | --o)
1063    ac_prev=oldincludedir ;;
1064  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1065  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1066  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1067    oldincludedir=$ac_optarg ;;
1068
1069  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1070    ac_prev=prefix ;;
1071  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1072    prefix=$ac_optarg ;;
1073
1074  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1075  | --program-pre | --program-pr | --program-p)
1076    ac_prev=program_prefix ;;
1077  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1078  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1079    program_prefix=$ac_optarg ;;
1080
1081  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1082  | --program-suf | --program-su | --program-s)
1083    ac_prev=program_suffix ;;
1084  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1085  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1086    program_suffix=$ac_optarg ;;
1087
1088  -program-transform-name | --program-transform-name \
1089  | --program-transform-nam | --program-transform-na \
1090  | --program-transform-n | --program-transform- \
1091  | --program-transform | --program-transfor \
1092  | --program-transfo | --program-transf \
1093  | --program-trans | --program-tran \
1094  | --progr-tra | --program-tr | --program-t)
1095    ac_prev=program_transform_name ;;
1096  -program-transform-name=* | --program-transform-name=* \
1097  | --program-transform-nam=* | --program-transform-na=* \
1098  | --program-transform-n=* | --program-transform-=* \
1099  | --program-transform=* | --program-transfor=* \
1100  | --program-transfo=* | --program-transf=* \
1101  | --program-trans=* | --program-tran=* \
1102  | --progr-tra=* | --program-tr=* | --program-t=*)
1103    program_transform_name=$ac_optarg ;;
1104
1105  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1106    ac_prev=pdfdir ;;
1107  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1108    pdfdir=$ac_optarg ;;
1109
1110  -psdir | --psdir | --psdi | --psd | --ps)
1111    ac_prev=psdir ;;
1112  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1113    psdir=$ac_optarg ;;
1114
1115  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1116  | -silent | --silent | --silen | --sile | --sil)
1117    silent=yes ;;
1118
1119  -runstatedir | --runstatedir | --runstatedi | --runstated \
1120  | --runstate | --runstat | --runsta | --runst | --runs \
1121  | --run | --ru | --r)
1122    ac_prev=runstatedir ;;
1123  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1124  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1125  | --run=* | --ru=* | --r=*)
1126    runstatedir=$ac_optarg ;;
1127
1128  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1129    ac_prev=sbindir ;;
1130  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1131  | --sbi=* | --sb=*)
1132    sbindir=$ac_optarg ;;
1133
1134  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1135  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1136  | --sharedst | --shareds | --shared | --share | --shar \
1137  | --sha | --sh)
1138    ac_prev=sharedstatedir ;;
1139  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1140  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1141  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1142  | --sha=* | --sh=*)
1143    sharedstatedir=$ac_optarg ;;
1144
1145  -site | --site | --sit)
1146    ac_prev=site ;;
1147  -site=* | --site=* | --sit=*)
1148    site=$ac_optarg ;;
1149
1150  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1151    ac_prev=srcdir ;;
1152  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1153    srcdir=$ac_optarg ;;
1154
1155  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1156  | --syscon | --sysco | --sysc | --sys | --sy)
1157    ac_prev=sysconfdir ;;
1158  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1159  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1160    sysconfdir=$ac_optarg ;;
1161
1162  -target | --target | --targe | --targ | --tar | --ta | --t)
1163    ac_prev=target_alias ;;
1164  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1165    target_alias=$ac_optarg ;;
1166
1167  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1168    verbose=yes ;;
1169
1170  -version | --version | --versio | --versi | --vers | -V)
1171    ac_init_version=: ;;
1172
1173  -with-* | --with-*)
1174    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1175    # Reject names that are not valid shell variable names.
1176    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1177      as_fn_error $? "invalid package name: $ac_useropt"
1178    ac_useropt_orig=$ac_useropt
1179    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1180    case $ac_user_opts in
1181      *"
1182"with_$ac_useropt"
1183"*) ;;
1184      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1185	 ac_unrecognized_sep=', ';;
1186    esac
1187    eval with_$ac_useropt=\$ac_optarg ;;
1188
1189  -without-* | --without-*)
1190    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1191    # Reject names that are not valid shell variable names.
1192    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1193      as_fn_error $? "invalid package name: $ac_useropt"
1194    ac_useropt_orig=$ac_useropt
1195    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1196    case $ac_user_opts in
1197      *"
1198"with_$ac_useropt"
1199"*) ;;
1200      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1201	 ac_unrecognized_sep=', ';;
1202    esac
1203    eval with_$ac_useropt=no ;;
1204
1205  --x)
1206    # Obsolete; use --with-x.
1207    with_x=yes ;;
1208
1209  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1210  | --x-incl | --x-inc | --x-in | --x-i)
1211    ac_prev=x_includes ;;
1212  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1213  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1214    x_includes=$ac_optarg ;;
1215
1216  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1217  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1218    ac_prev=x_libraries ;;
1219  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1220  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1221    x_libraries=$ac_optarg ;;
1222
1223  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1224Try \`$0 --help' for more information"
1225    ;;
1226
1227  *=*)
1228    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1229    # Reject names that are not valid shell variable names.
1230    case $ac_envvar in #(
1231      '' | [0-9]* | *[!_$as_cr_alnum]* )
1232      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1233    esac
1234    eval $ac_envvar=\$ac_optarg
1235    export $ac_envvar ;;
1236
1237  *)
1238    # FIXME: should be removed in autoconf 3.0.
1239    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1240    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1241      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1242    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1243    ;;
1244
1245  esac
1246done
1247
1248if test -n "$ac_prev"; then
1249  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1250  as_fn_error $? "missing argument to $ac_option"
1251fi
1252
1253if test -n "$ac_unrecognized_opts"; then
1254  case $enable_option_checking in
1255    no) ;;
1256    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1257    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1258  esac
1259fi
1260
1261# Check all directory arguments for consistency.
1262for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1263		datadir sysconfdir sharedstatedir localstatedir includedir \
1264		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1265		libdir localedir mandir runstatedir
1266do
1267  eval ac_val=\$$ac_var
1268  # Remove trailing slashes.
1269  case $ac_val in
1270    */ )
1271      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1272      eval $ac_var=\$ac_val;;
1273  esac
1274  # Be sure to have absolute directory names.
1275  case $ac_val in
1276    [\\/$]* | ?:[\\/]* )  continue;;
1277    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1278  esac
1279  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1280done
1281
1282# There might be people who depend on the old broken behavior: `$host'
1283# used to hold the argument of --host etc.
1284# FIXME: To remove some day.
1285build=$build_alias
1286host=$host_alias
1287target=$target_alias
1288
1289# FIXME: To remove some day.
1290if test "x$host_alias" != x; then
1291  if test "x$build_alias" = x; then
1292    cross_compiling=maybe
1293  elif test "x$build_alias" != "x$host_alias"; then
1294    cross_compiling=yes
1295  fi
1296fi
1297
1298ac_tool_prefix=
1299test -n "$host_alias" && ac_tool_prefix=$host_alias-
1300
1301test "$silent" = yes && exec 6>/dev/null
1302
1303
1304ac_pwd=`pwd` && test -n "$ac_pwd" &&
1305ac_ls_di=`ls -di .` &&
1306ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1307  as_fn_error $? "working directory cannot be determined"
1308test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1309  as_fn_error $? "pwd does not report name of working directory"
1310
1311
1312# Find the source files, if location was not specified.
1313if test -z "$srcdir"; then
1314  ac_srcdir_defaulted=yes
1315  # Try the directory containing this script, then the parent directory.
1316  ac_confdir=`$as_dirname -- "$as_myself" ||
1317$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1318	 X"$as_myself" : 'X\(//\)[^/]' \| \
1319	 X"$as_myself" : 'X\(//\)$' \| \
1320	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1321$as_echo X"$as_myself" |
1322    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1323	    s//\1/
1324	    q
1325	  }
1326	  /^X\(\/\/\)[^/].*/{
1327	    s//\1/
1328	    q
1329	  }
1330	  /^X\(\/\/\)$/{
1331	    s//\1/
1332	    q
1333	  }
1334	  /^X\(\/\).*/{
1335	    s//\1/
1336	    q
1337	  }
1338	  s/.*/./; q'`
1339  srcdir=$ac_confdir
1340  if test ! -r "$srcdir/$ac_unique_file"; then
1341    srcdir=..
1342  fi
1343else
1344  ac_srcdir_defaulted=no
1345fi
1346if test ! -r "$srcdir/$ac_unique_file"; then
1347  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1348  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1349fi
1350ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1351ac_abs_confdir=`(
1352	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1353	pwd)`
1354# When building in place, set srcdir=.
1355if test "$ac_abs_confdir" = "$ac_pwd"; then
1356  srcdir=.
1357fi
1358# Remove unnecessary trailing slashes from srcdir.
1359# Double slashes in file names in object file debugging info
1360# mess up M-x gdb in Emacs.
1361case $srcdir in
1362*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1363esac
1364for ac_var in $ac_precious_vars; do
1365  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1366  eval ac_env_${ac_var}_value=\$${ac_var}
1367  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1368  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1369done
1370
1371#
1372# Report the --help message.
1373#
1374if test "$ac_init_help" = "long"; then
1375  # Omit some internal or obsolete options to make the list less imposing.
1376  # This message is too long to be a string in the A/UX 3.1 sh.
1377  cat <<_ACEOF
1378\`configure' configures this package to adapt to many kinds of systems.
1379
1380Usage: $0 [OPTION]... [VAR=VALUE]...
1381
1382To assign environment variables (e.g., CC, CFLAGS...), specify them as
1383VAR=VALUE.  See below for descriptions of some of the useful variables.
1384
1385Defaults for the options are specified in brackets.
1386
1387Configuration:
1388  -h, --help              display this help and exit
1389      --help=short        display options specific to this package
1390      --help=recursive    display the short help of all the included packages
1391  -V, --version           display version information and exit
1392  -q, --quiet, --silent   do not print \`checking ...' messages
1393      --cache-file=FILE   cache test results in FILE [disabled]
1394  -C, --config-cache      alias for \`--cache-file=config.cache'
1395  -n, --no-create         do not create output files
1396      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1397
1398Installation directories:
1399  --prefix=PREFIX         install architecture-independent files in PREFIX
1400                          [$ac_default_prefix]
1401  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1402                          [PREFIX]
1403
1404By default, \`make install' will install all the files in
1405\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1406an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1407for instance \`--prefix=\$HOME'.
1408
1409For better control, use the options below.
1410
1411Fine tuning of the installation directories:
1412  --bindir=DIR            user executables [EPREFIX/bin]
1413  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1414  --libexecdir=DIR        program executables [EPREFIX/libexec]
1415  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1416  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1417  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1418  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1419  --libdir=DIR            object code libraries [EPREFIX/lib]
1420  --includedir=DIR        C header files [PREFIX/include]
1421  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1422  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1423  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1424  --infodir=DIR           info documentation [DATAROOTDIR/info]
1425  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1426  --mandir=DIR            man documentation [DATAROOTDIR/man]
1427  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1428  --htmldir=DIR           html documentation [DOCDIR]
1429  --dvidir=DIR            dvi documentation [DOCDIR]
1430  --pdfdir=DIR            pdf documentation [DOCDIR]
1431  --psdir=DIR             ps documentation [DOCDIR]
1432_ACEOF
1433
1434  cat <<\_ACEOF
1435
1436X features:
1437  --x-includes=DIR    X include files are in DIR
1438  --x-libraries=DIR   X library files are in DIR
1439
1440System types:
1441  --build=BUILD     configure for building on BUILD [guessed]
1442  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1443_ACEOF
1444fi
1445
1446if test -n "$ac_init_help"; then
1447
1448  cat <<\_ACEOF
1449
1450Optional Features:
1451  --disable-option-checking  ignore unrecognized --enable/--with options
1452  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1453  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1454
1455  --enable-all            Enable all optional modules
1456  --enable-cgi            Compile CGI programs
1457
1458  --enable-apcsmart       Compile APC SmartUPS serial driver (default)
1459  --disable-apcsmart      No APC SmartUPS serial driver
1460
1461  --enable-dumb           Compile dumb UPS driver (default)
1462  --disable-dumb          No dumb UPS driver
1463
1464  --enable-usb            Compile USB UPS code (default)
1465  --disable-usb           No USB UPS code
1466
1467  --enable-net            Compile networking driver for slaves (default)
1468  --disable-net           No network driver for slaves
1469
1470  --enable-snmp           Compile SNMP driver (default)
1471  --disable-snmp          No SNMP driver
1472
1473  --enable-test           Compile TEST driver code
1474  --disable-test          No TEST driver (default)
1475
1476  --enable-brazil         Compile APC Brazil driver code
1477  --disable-brazil        No APC Brazil driver
1478
1479  --enable-pcnet          Compile PCNET driver code (default)
1480  --disable-pcnet         No PCNET driver
1481
1482  --enable-modbus-usb     Compile MODBUS/USB driver code
1483  --disable-modbus-usb    No MODBUS/USB driver (default)
1484
1485  --enable-modbus         Compile MODBUS driver code (default)
1486  --disable-modbus        No MODBUS driver
1487  --enable-gapcmon        Build GTK/GUI front-end to apcctrl (default=no)
1488  --enable-apcagent       Build menubar app for Mac OS X (default=no)
1489  --enable-install-distdir
1490                          Install distribution
1491
1492Optional Packages:
1493  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1494  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1495  --with-x                use the X Window System
1496  --with-halpolicydir=DIR HAL policy directory (default is platform dependent)
1497  --with-libwrap=DIR      Compile in libwrap (tcp_wrappers) support
1498  --with-generic-usb      Force use of generic USB driver
1499  --with-nisip=IP-ADDRESS Specify the IP address to bind to (default=0.0.0.0)
1500  --with-cgi-bin=DIR      Specify cgi-bin directory (default=/etc/apcctrl)
1501  --with-distname=NAME    Specify DISTNAME
1502  --with-nologin=DIR      Specify nologin file directory (default /etc)
1503  --with-pid-dir=DIR      Specify PIDDIR directory (default is OS dependent)
1504  --with-log-dir=DIR      Specify EVENTS and STATUS directory (default is OS
1505                          dependent)
1506  --with-lock-dir=DIR     Specify serial port lock directory (default is OS
1507                          dependent)
1508  --with-pwrfail-dir=DIR  Specify power failure file directory (default is OS
1509                          dependent)
1510  --with-serial-dev=DEV   Specify serial port device
1511  --with-dev=DEV          Specify port or device
1512  --with-nis-port=PORT    Specify NIS (CGI) port (default 3551 except Debian)
1513  --with-upstype=TYPE     Specify the UPS type
1514  --with-upscable=CABLE   Specify the UPS cable
1515
1516Some influential environment variables:
1517  CXX         C++ compiler command
1518  CXXFLAGS    C++ compiler flags
1519  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1520              nonstandard directory <lib dir>
1521  LIBS        libraries to pass to the linker, e.g. -l<library>
1522  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1523              you have headers in a nonstandard directory <include dir>
1524  CC          C compiler command
1525  CFLAGS      C compiler flags
1526  CPP         C preprocessor
1527  XMKMF       Path to xmkmf, Makefile generator for X Window System
1528  PKG_CONFIG  path to pkg-config utility
1529  GAPCMON_CFLAGS
1530              C compiler flags for GAPCMON, overriding pkg-config
1531  GAPCMON_LIBS
1532              linker flags for GAPCMON, overriding pkg-config
1533
1534Use these variables to override the choices made by `configure' or to help
1535it to find libraries and programs with nonstandard names/locations.
1536
1537Report bugs to the package provider.
1538_ACEOF
1539ac_status=$?
1540fi
1541
1542if test "$ac_init_help" = "recursive"; then
1543  # If there are subdirs, report their specific --help.
1544  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1545    test -d "$ac_dir" ||
1546      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1547      continue
1548    ac_builddir=.
1549
1550case "$ac_dir" in
1551.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1552*)
1553  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1554  # A ".." for each directory in $ac_dir_suffix.
1555  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1556  case $ac_top_builddir_sub in
1557  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1558  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1559  esac ;;
1560esac
1561ac_abs_top_builddir=$ac_pwd
1562ac_abs_builddir=$ac_pwd$ac_dir_suffix
1563# for backward compatibility:
1564ac_top_builddir=$ac_top_build_prefix
1565
1566case $srcdir in
1567  .)  # We are building in place.
1568    ac_srcdir=.
1569    ac_top_srcdir=$ac_top_builddir_sub
1570    ac_abs_top_srcdir=$ac_pwd ;;
1571  [\\/]* | ?:[\\/]* )  # Absolute name.
1572    ac_srcdir=$srcdir$ac_dir_suffix;
1573    ac_top_srcdir=$srcdir
1574    ac_abs_top_srcdir=$srcdir ;;
1575  *) # Relative name.
1576    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1577    ac_top_srcdir=$ac_top_build_prefix$srcdir
1578    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1579esac
1580ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1581
1582    cd "$ac_dir" || { ac_status=$?; continue; }
1583    # Check for guested configure.
1584    if test -f "$ac_srcdir/configure.gnu"; then
1585      echo &&
1586      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1587    elif test -f "$ac_srcdir/configure"; then
1588      echo &&
1589      $SHELL "$ac_srcdir/configure" --help=recursive
1590    else
1591      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1592    fi || ac_status=$?
1593    cd "$ac_pwd" || { ac_status=$?; break; }
1594  done
1595fi
1596
1597test -n "$ac_init_help" && exit $ac_status
1598if $ac_init_version; then
1599  cat <<\_ACEOF
1600configure
1601generated by GNU Autoconf 2.69
1602
1603Copyright (C) 2012 Free Software Foundation, Inc.
1604This configure script is free software; the Free Software Foundation
1605gives unlimited permission to copy, distribute and modify it.
1606_ACEOF
1607  exit
1608fi
1609
1610## ------------------------ ##
1611## Autoconf initialization. ##
1612## ------------------------ ##
1613
1614# ac_fn_cxx_try_compile LINENO
1615# ----------------------------
1616# Try to compile conftest.$ac_ext, and return whether this succeeded.
1617ac_fn_cxx_try_compile ()
1618{
1619  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1620  rm -f conftest.$ac_objext
1621  if { { ac_try="$ac_compile"
1622case "(($ac_try" in
1623  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1624  *) ac_try_echo=$ac_try;;
1625esac
1626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1627$as_echo "$ac_try_echo"; } >&5
1628  (eval "$ac_compile") 2>conftest.err
1629  ac_status=$?
1630  if test -s conftest.err; then
1631    grep -v '^ *+' conftest.err >conftest.er1
1632    cat conftest.er1 >&5
1633    mv -f conftest.er1 conftest.err
1634  fi
1635  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1636  test $ac_status = 0; } && {
1637	 test -z "$ac_cxx_werror_flag" ||
1638	 test ! -s conftest.err
1639       } && test -s conftest.$ac_objext; then :
1640  ac_retval=0
1641else
1642  $as_echo "$as_me: failed program was:" >&5
1643sed 's/^/| /' conftest.$ac_ext >&5
1644
1645	ac_retval=1
1646fi
1647  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1648  as_fn_set_status $ac_retval
1649
1650} # ac_fn_cxx_try_compile
1651
1652# ac_fn_c_try_compile LINENO
1653# --------------------------
1654# Try to compile conftest.$ac_ext, and return whether this succeeded.
1655ac_fn_c_try_compile ()
1656{
1657  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1658  rm -f conftest.$ac_objext
1659  if { { ac_try="$ac_compile"
1660case "(($ac_try" in
1661  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1662  *) ac_try_echo=$ac_try;;
1663esac
1664eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1665$as_echo "$ac_try_echo"; } >&5
1666  (eval "$ac_compile") 2>conftest.err
1667  ac_status=$?
1668  if test -s conftest.err; then
1669    grep -v '^ *+' conftest.err >conftest.er1
1670    cat conftest.er1 >&5
1671    mv -f conftest.er1 conftest.err
1672  fi
1673  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1674  test $ac_status = 0; } && {
1675	 test -z "$ac_c_werror_flag" ||
1676	 test ! -s conftest.err
1677       } && test -s conftest.$ac_objext; then :
1678  ac_retval=0
1679else
1680  $as_echo "$as_me: failed program was:" >&5
1681sed 's/^/| /' conftest.$ac_ext >&5
1682
1683	ac_retval=1
1684fi
1685  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1686  as_fn_set_status $ac_retval
1687
1688} # ac_fn_c_try_compile
1689
1690# ac_fn_c_try_cpp LINENO
1691# ----------------------
1692# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1693ac_fn_c_try_cpp ()
1694{
1695  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1696  if { { ac_try="$ac_cpp conftest.$ac_ext"
1697case "(($ac_try" in
1698  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699  *) ac_try_echo=$ac_try;;
1700esac
1701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702$as_echo "$ac_try_echo"; } >&5
1703  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1704  ac_status=$?
1705  if test -s conftest.err; then
1706    grep -v '^ *+' conftest.err >conftest.er1
1707    cat conftest.er1 >&5
1708    mv -f conftest.er1 conftest.err
1709  fi
1710  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711  test $ac_status = 0; } > conftest.i && {
1712	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1713	 test ! -s conftest.err
1714       }; then :
1715  ac_retval=0
1716else
1717  $as_echo "$as_me: failed program was:" >&5
1718sed 's/^/| /' conftest.$ac_ext >&5
1719
1720    ac_retval=1
1721fi
1722  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1723  as_fn_set_status $ac_retval
1724
1725} # ac_fn_c_try_cpp
1726
1727# ac_fn_c_try_link LINENO
1728# -----------------------
1729# Try to link conftest.$ac_ext, and return whether this succeeded.
1730ac_fn_c_try_link ()
1731{
1732  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1733  rm -f conftest.$ac_objext conftest$ac_exeext
1734  if { { ac_try="$ac_link"
1735case "(($ac_try" in
1736  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1737  *) ac_try_echo=$ac_try;;
1738esac
1739eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1740$as_echo "$ac_try_echo"; } >&5
1741  (eval "$ac_link") 2>conftest.err
1742  ac_status=$?
1743  if test -s conftest.err; then
1744    grep -v '^ *+' conftest.err >conftest.er1
1745    cat conftest.er1 >&5
1746    mv -f conftest.er1 conftest.err
1747  fi
1748  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1749  test $ac_status = 0; } && {
1750	 test -z "$ac_c_werror_flag" ||
1751	 test ! -s conftest.err
1752       } && test -s conftest$ac_exeext && {
1753	 test "$cross_compiling" = yes ||
1754	 test -x conftest$ac_exeext
1755       }; then :
1756  ac_retval=0
1757else
1758  $as_echo "$as_me: failed program was:" >&5
1759sed 's/^/| /' conftest.$ac_ext >&5
1760
1761	ac_retval=1
1762fi
1763  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1764  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1765  # interfere with the next link command; also delete a directory that is
1766  # left behind by Apple's compiler.  We do this before executing the actions.
1767  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1768  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1769  as_fn_set_status $ac_retval
1770
1771} # ac_fn_c_try_link
1772
1773# ac_fn_c_check_func LINENO FUNC VAR
1774# ----------------------------------
1775# Tests whether FUNC exists, setting the cache variable VAR accordingly
1776ac_fn_c_check_func ()
1777{
1778  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1779  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1780$as_echo_n "checking for $2... " >&6; }
1781if eval \${$3+:} false; then :
1782  $as_echo_n "(cached) " >&6
1783else
1784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1785/* end confdefs.h.  */
1786/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1787   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1788#define $2 innocuous_$2
1789
1790/* System header to define __stub macros and hopefully few prototypes,
1791    which can conflict with char $2 (); below.
1792    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1793    <limits.h> exists even on freestanding compilers.  */
1794
1795#ifdef __STDC__
1796# include <limits.h>
1797#else
1798# include <assert.h>
1799#endif
1800
1801#undef $2
1802
1803/* Override any GCC internal prototype to avoid an error.
1804   Use char because int might match the return type of a GCC
1805   builtin and then its argument prototype would still apply.  */
1806#ifdef __cplusplus
1807extern "C"
1808#endif
1809char $2 ();
1810/* The GNU C library defines this for functions which it implements
1811    to always fail with ENOSYS.  Some functions are actually named
1812    something starting with __ and the normal name is an alias.  */
1813#if defined __stub_$2 || defined __stub___$2
1814choke me
1815#endif
1816
1817int
1818main ()
1819{
1820return $2 ();
1821  ;
1822  return 0;
1823}
1824_ACEOF
1825if ac_fn_c_try_link "$LINENO"; then :
1826  eval "$3=yes"
1827else
1828  eval "$3=no"
1829fi
1830rm -f core conftest.err conftest.$ac_objext \
1831    conftest$ac_exeext conftest.$ac_ext
1832fi
1833eval ac_res=\$$3
1834	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1835$as_echo "$ac_res" >&6; }
1836  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1837
1838} # ac_fn_c_check_func
1839
1840# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1841# -------------------------------------------------------
1842# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1843# the include files in INCLUDES and setting the cache variable VAR
1844# accordingly.
1845ac_fn_c_check_header_mongrel ()
1846{
1847  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1848  if eval \${$3+:} false; then :
1849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1850$as_echo_n "checking for $2... " >&6; }
1851if eval \${$3+:} false; then :
1852  $as_echo_n "(cached) " >&6
1853fi
1854eval ac_res=\$$3
1855	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1856$as_echo "$ac_res" >&6; }
1857else
1858  # Is the header compilable?
1859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1860$as_echo_n "checking $2 usability... " >&6; }
1861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1862/* end confdefs.h.  */
1863$4
1864#include <$2>
1865_ACEOF
1866if ac_fn_c_try_compile "$LINENO"; then :
1867  ac_header_compiler=yes
1868else
1869  ac_header_compiler=no
1870fi
1871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1873$as_echo "$ac_header_compiler" >&6; }
1874
1875# Is the header present?
1876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1877$as_echo_n "checking $2 presence... " >&6; }
1878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879/* end confdefs.h.  */
1880#include <$2>
1881_ACEOF
1882if ac_fn_c_try_cpp "$LINENO"; then :
1883  ac_header_preproc=yes
1884else
1885  ac_header_preproc=no
1886fi
1887rm -f conftest.err conftest.i conftest.$ac_ext
1888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1889$as_echo "$ac_header_preproc" >&6; }
1890
1891# So?  What about this header?
1892case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1893  yes:no: )
1894    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1895$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1896    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1897$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1898    ;;
1899  no:yes:* )
1900    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1901$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1902    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1903$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1904    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1905$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1906    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1907$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1908    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1909$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1910    ;;
1911esac
1912  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1913$as_echo_n "checking for $2... " >&6; }
1914if eval \${$3+:} false; then :
1915  $as_echo_n "(cached) " >&6
1916else
1917  eval "$3=\$ac_header_compiler"
1918fi
1919eval ac_res=\$$3
1920	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1921$as_echo "$ac_res" >&6; }
1922fi
1923  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1924
1925} # ac_fn_c_check_header_mongrel
1926
1927# ac_fn_c_try_run LINENO
1928# ----------------------
1929# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1930# that executables *can* be run.
1931ac_fn_c_try_run ()
1932{
1933  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934  if { { ac_try="$ac_link"
1935case "(($ac_try" in
1936  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1937  *) ac_try_echo=$ac_try;;
1938esac
1939eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1940$as_echo "$ac_try_echo"; } >&5
1941  (eval "$ac_link") 2>&5
1942  ac_status=$?
1943  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1944  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1945  { { case "(($ac_try" in
1946  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1947  *) ac_try_echo=$ac_try;;
1948esac
1949eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1950$as_echo "$ac_try_echo"; } >&5
1951  (eval "$ac_try") 2>&5
1952  ac_status=$?
1953  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1954  test $ac_status = 0; }; }; then :
1955  ac_retval=0
1956else
1957  $as_echo "$as_me: program exited with status $ac_status" >&5
1958       $as_echo "$as_me: failed program was:" >&5
1959sed 's/^/| /' conftest.$ac_ext >&5
1960
1961       ac_retval=$ac_status
1962fi
1963  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1964  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1965  as_fn_set_status $ac_retval
1966
1967} # ac_fn_c_try_run
1968
1969# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1970# -------------------------------------------------------
1971# Tests whether HEADER exists and can be compiled using the include files in
1972# INCLUDES, setting the cache variable VAR accordingly.
1973ac_fn_c_check_header_compile ()
1974{
1975  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1977$as_echo_n "checking for $2... " >&6; }
1978if eval \${$3+:} false; then :
1979  $as_echo_n "(cached) " >&6
1980else
1981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1982/* end confdefs.h.  */
1983$4
1984#include <$2>
1985_ACEOF
1986if ac_fn_c_try_compile "$LINENO"; then :
1987  eval "$3=yes"
1988else
1989  eval "$3=no"
1990fi
1991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1992fi
1993eval ac_res=\$$3
1994	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1995$as_echo "$ac_res" >&6; }
1996  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1997
1998} # ac_fn_c_check_header_compile
1999
2000# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2001# ----------------------------------------------------
2002# Tries to find if the field MEMBER exists in type AGGR, after including
2003# INCLUDES, setting cache variable VAR accordingly.
2004ac_fn_c_check_member ()
2005{
2006  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2008$as_echo_n "checking for $2.$3... " >&6; }
2009if eval \${$4+:} false; then :
2010  $as_echo_n "(cached) " >&6
2011else
2012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h.  */
2014$5
2015int
2016main ()
2017{
2018static $2 ac_aggr;
2019if (ac_aggr.$3)
2020return 0;
2021  ;
2022  return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026  eval "$4=yes"
2027else
2028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h.  */
2030$5
2031int
2032main ()
2033{
2034static $2 ac_aggr;
2035if (sizeof ac_aggr.$3)
2036return 0;
2037  ;
2038  return 0;
2039}
2040_ACEOF
2041if ac_fn_c_try_compile "$LINENO"; then :
2042  eval "$4=yes"
2043else
2044  eval "$4=no"
2045fi
2046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2047fi
2048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2049fi
2050eval ac_res=\$$4
2051	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2052$as_echo "$ac_res" >&6; }
2053  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2054
2055} # ac_fn_c_check_member
2056
2057# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2058# ---------------------------------------------
2059# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2060# accordingly.
2061ac_fn_c_check_decl ()
2062{
2063  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2064  as_decl_name=`echo $2|sed 's/ *(.*//'`
2065  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2066  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2067$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2068if eval \${$3+:} false; then :
2069  $as_echo_n "(cached) " >&6
2070else
2071  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h.  */
2073$4
2074int
2075main ()
2076{
2077#ifndef $as_decl_name
2078#ifdef __cplusplus
2079  (void) $as_decl_use;
2080#else
2081  (void) $as_decl_name;
2082#endif
2083#endif
2084
2085  ;
2086  return 0;
2087}
2088_ACEOF
2089if ac_fn_c_try_compile "$LINENO"; then :
2090  eval "$3=yes"
2091else
2092  eval "$3=no"
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095fi
2096eval ac_res=\$$3
2097	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2098$as_echo "$ac_res" >&6; }
2099  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2100
2101} # ac_fn_c_check_decl
2102
2103# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2104# -------------------------------------------
2105# Tests whether TYPE exists after having included INCLUDES, setting cache
2106# variable VAR accordingly.
2107ac_fn_c_check_type ()
2108{
2109  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2111$as_echo_n "checking for $2... " >&6; }
2112if eval \${$3+:} false; then :
2113  $as_echo_n "(cached) " >&6
2114else
2115  eval "$3=no"
2116  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h.  */
2118$4
2119int
2120main ()
2121{
2122if (sizeof ($2))
2123	 return 0;
2124  ;
2125  return 0;
2126}
2127_ACEOF
2128if ac_fn_c_try_compile "$LINENO"; then :
2129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h.  */
2131$4
2132int
2133main ()
2134{
2135if (sizeof (($2)))
2136	    return 0;
2137  ;
2138  return 0;
2139}
2140_ACEOF
2141if ac_fn_c_try_compile "$LINENO"; then :
2142
2143else
2144  eval "$3=yes"
2145fi
2146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147fi
2148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2149fi
2150eval ac_res=\$$3
2151	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2152$as_echo "$ac_res" >&6; }
2153  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2154
2155} # ac_fn_c_check_type
2156cat >config.log <<_ACEOF
2157This file contains any messages produced by compilers while
2158running configure, to aid debugging if configure makes a mistake.
2159
2160It was created by $as_me, which was
2161generated by GNU Autoconf 2.69.  Invocation command line was
2162
2163  $ $0 $@
2164
2165_ACEOF
2166exec 5>>config.log
2167{
2168cat <<_ASUNAME
2169## --------- ##
2170## Platform. ##
2171## --------- ##
2172
2173hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2174uname -m = `(uname -m) 2>/dev/null || echo unknown`
2175uname -r = `(uname -r) 2>/dev/null || echo unknown`
2176uname -s = `(uname -s) 2>/dev/null || echo unknown`
2177uname -v = `(uname -v) 2>/dev/null || echo unknown`
2178
2179/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2180/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2181
2182/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2183/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2184/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2185/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2186/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2187/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2188/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2189
2190_ASUNAME
2191
2192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2193for as_dir in $PATH
2194do
2195  IFS=$as_save_IFS
2196  test -z "$as_dir" && as_dir=.
2197    $as_echo "PATH: $as_dir"
2198  done
2199IFS=$as_save_IFS
2200
2201} >&5
2202
2203cat >&5 <<_ACEOF
2204
2205
2206## ----------- ##
2207## Core tests. ##
2208## ----------- ##
2209
2210_ACEOF
2211
2212
2213# Keep a trace of the command line.
2214# Strip out --no-create and --no-recursion so they do not pile up.
2215# Strip out --silent because we don't want to record it for future runs.
2216# Also quote any args containing shell meta-characters.
2217# Make two passes to allow for proper duplicate-argument suppression.
2218ac_configure_args=
2219ac_configure_args0=
2220ac_configure_args1=
2221ac_must_keep_next=false
2222for ac_pass in 1 2
2223do
2224  for ac_arg
2225  do
2226    case $ac_arg in
2227    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2228    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2229    | -silent | --silent | --silen | --sile | --sil)
2230      continue ;;
2231    *\'*)
2232      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2233    esac
2234    case $ac_pass in
2235    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2236    2)
2237      as_fn_append ac_configure_args1 " '$ac_arg'"
2238      if test $ac_must_keep_next = true; then
2239	ac_must_keep_next=false # Got value, back to normal.
2240      else
2241	case $ac_arg in
2242	  *=* | --config-cache | -C | -disable-* | --disable-* \
2243	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2244	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2245	  | -with-* | --with-* | -without-* | --without-* | --x)
2246	    case "$ac_configure_args0 " in
2247	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2248	    esac
2249	    ;;
2250	  -* ) ac_must_keep_next=true ;;
2251	esac
2252      fi
2253      as_fn_append ac_configure_args " '$ac_arg'"
2254      ;;
2255    esac
2256  done
2257done
2258{ ac_configure_args0=; unset ac_configure_args0;}
2259{ ac_configure_args1=; unset ac_configure_args1;}
2260
2261# When interrupted or exit'd, cleanup temporary files, and complete
2262# config.log.  We remove comments because anyway the quotes in there
2263# would cause problems or look ugly.
2264# WARNING: Use '\'' to represent an apostrophe within the trap.
2265# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2266trap 'exit_status=$?
2267  # Save into config.log some information that might help in debugging.
2268  {
2269    echo
2270
2271    $as_echo "## ---------------- ##
2272## Cache variables. ##
2273## ---------------- ##"
2274    echo
2275    # The following way of writing the cache mishandles newlines in values,
2276(
2277  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2278    eval ac_val=\$$ac_var
2279    case $ac_val in #(
2280    *${as_nl}*)
2281      case $ac_var in #(
2282      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2283$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2284      esac
2285      case $ac_var in #(
2286      _ | IFS | as_nl) ;; #(
2287      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2288      *) { eval $ac_var=; unset $ac_var;} ;;
2289      esac ;;
2290    esac
2291  done
2292  (set) 2>&1 |
2293    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2294    *${as_nl}ac_space=\ *)
2295      sed -n \
2296	"s/'\''/'\''\\\\'\'''\''/g;
2297	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2298      ;; #(
2299    *)
2300      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2301      ;;
2302    esac |
2303    sort
2304)
2305    echo
2306
2307    $as_echo "## ----------------- ##
2308## Output variables. ##
2309## ----------------- ##"
2310    echo
2311    for ac_var in $ac_subst_vars
2312    do
2313      eval ac_val=\$$ac_var
2314      case $ac_val in
2315      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2316      esac
2317      $as_echo "$ac_var='\''$ac_val'\''"
2318    done | sort
2319    echo
2320
2321    if test -n "$ac_subst_files"; then
2322      $as_echo "## ------------------- ##
2323## File substitutions. ##
2324## ------------------- ##"
2325      echo
2326      for ac_var in $ac_subst_files
2327      do
2328	eval ac_val=\$$ac_var
2329	case $ac_val in
2330	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2331	esac
2332	$as_echo "$ac_var='\''$ac_val'\''"
2333      done | sort
2334      echo
2335    fi
2336
2337    if test -s confdefs.h; then
2338      $as_echo "## ----------- ##
2339## confdefs.h. ##
2340## ----------- ##"
2341      echo
2342      cat confdefs.h
2343      echo
2344    fi
2345    test "$ac_signal" != 0 &&
2346      $as_echo "$as_me: caught signal $ac_signal"
2347    $as_echo "$as_me: exit $exit_status"
2348  } >&5
2349  rm -f core *.core core.conftest.* &&
2350    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2351    exit $exit_status
2352' 0
2353for ac_signal in 1 2 13 15; do
2354  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2355done
2356ac_signal=0
2357
2358# confdefs.h avoids OS command line length limits that DEFS can exceed.
2359rm -f -r conftest* confdefs.h
2360
2361$as_echo "/* confdefs.h */" > confdefs.h
2362
2363# Predefined preprocessor variables.
2364
2365cat >>confdefs.h <<_ACEOF
2366#define PACKAGE_NAME "$PACKAGE_NAME"
2367_ACEOF
2368
2369cat >>confdefs.h <<_ACEOF
2370#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2371_ACEOF
2372
2373cat >>confdefs.h <<_ACEOF
2374#define PACKAGE_VERSION "$PACKAGE_VERSION"
2375_ACEOF
2376
2377cat >>confdefs.h <<_ACEOF
2378#define PACKAGE_STRING "$PACKAGE_STRING"
2379_ACEOF
2380
2381cat >>confdefs.h <<_ACEOF
2382#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2383_ACEOF
2384
2385cat >>confdefs.h <<_ACEOF
2386#define PACKAGE_URL "$PACKAGE_URL"
2387_ACEOF
2388
2389
2390# Let the site file select an alternate cache file if it wants to.
2391# Prefer an explicitly selected file to automatically selected ones.
2392ac_site_file1=NONE
2393ac_site_file2=NONE
2394if test -n "$CONFIG_SITE"; then
2395  # We do not want a PATH search for config.site.
2396  case $CONFIG_SITE in #((
2397    -*)  ac_site_file1=./$CONFIG_SITE;;
2398    */*) ac_site_file1=$CONFIG_SITE;;
2399    *)   ac_site_file1=./$CONFIG_SITE;;
2400  esac
2401elif test "x$prefix" != xNONE; then
2402  ac_site_file1=$prefix/share/config.site
2403  ac_site_file2=$prefix/etc/config.site
2404else
2405  ac_site_file1=$ac_default_prefix/share/config.site
2406  ac_site_file2=$ac_default_prefix/etc/config.site
2407fi
2408for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2409do
2410  test "x$ac_site_file" = xNONE && continue
2411  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2412    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2413$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2414    sed 's/^/| /' "$ac_site_file" >&5
2415    . "$ac_site_file" \
2416      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2418as_fn_error $? "failed to load site script $ac_site_file
2419See \`config.log' for more details" "$LINENO" 5; }
2420  fi
2421done
2422
2423if test -r "$cache_file"; then
2424  # Some versions of bash will fail to source /dev/null (special files
2425  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2426  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2427    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2428$as_echo "$as_me: loading cache $cache_file" >&6;}
2429    case $cache_file in
2430      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2431      *)                      . "./$cache_file";;
2432    esac
2433  fi
2434else
2435  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2436$as_echo "$as_me: creating cache $cache_file" >&6;}
2437  >$cache_file
2438fi
2439
2440# Check that the precious variables saved in the cache have kept the same
2441# value.
2442ac_cache_corrupted=false
2443for ac_var in $ac_precious_vars; do
2444  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2445  eval ac_new_set=\$ac_env_${ac_var}_set
2446  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2447  eval ac_new_val=\$ac_env_${ac_var}_value
2448  case $ac_old_set,$ac_new_set in
2449    set,)
2450      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2451$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2452      ac_cache_corrupted=: ;;
2453    ,set)
2454      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2455$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2456      ac_cache_corrupted=: ;;
2457    ,);;
2458    *)
2459      if test "x$ac_old_val" != "x$ac_new_val"; then
2460	# differences in whitespace do not lead to failure.
2461	ac_old_val_w=`echo x $ac_old_val`
2462	ac_new_val_w=`echo x $ac_new_val`
2463	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2464	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2465$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2466	  ac_cache_corrupted=:
2467	else
2468	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2469$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2470	  eval $ac_var=\$ac_old_val
2471	fi
2472	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2473$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2474	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2475$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2476      fi;;
2477  esac
2478  # Pass precious variables to config.status.
2479  if test "$ac_new_set" = set; then
2480    case $ac_new_val in
2481    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2482    *) ac_arg=$ac_var=$ac_new_val ;;
2483    esac
2484    case " $ac_configure_args " in
2485      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2486      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2487    esac
2488  fi
2489done
2490if $ac_cache_corrupted; then
2491  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2493  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2494$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2495  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2496fi
2497## -------------------- ##
2498## Main body of script. ##
2499## -------------------- ##
2500
2501ac_ext=c
2502ac_cpp='$CPP $CPPFLAGS'
2503ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2504ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2505ac_compiler_gnu=$ac_cv_c_compiler_gnu
2506
2507
2508
2509ac_config_headers="$ac_config_headers include/apcconfig.h:autoconf/config.h.in"
2510
2511
2512topdir=`pwd`
2513ac_aux_dir=
2514for ac_dir in ${topdir}/autoconf "$srcdir"/${topdir}/autoconf; do
2515  if test -f "$ac_dir/install-sh"; then
2516    ac_aux_dir=$ac_dir
2517    ac_install_sh="$ac_aux_dir/install-sh -c"
2518    break
2519  elif test -f "$ac_dir/install.sh"; then
2520    ac_aux_dir=$ac_dir
2521    ac_install_sh="$ac_aux_dir/install.sh -c"
2522    break
2523  elif test -f "$ac_dir/shtool"; then
2524    ac_aux_dir=$ac_dir
2525    ac_install_sh="$ac_aux_dir/shtool install -c"
2526    break
2527  fi
2528done
2529if test -z "$ac_aux_dir"; then
2530  as_fn_error $? "cannot find install-sh, install.sh, or shtool in ${topdir}/autoconf \"$srcdir\"/${topdir}/autoconf" "$LINENO" 5
2531fi
2532
2533# These three variables are undocumented and unsupported,
2534# and are intended to be withdrawn in a future Autoconf release.
2535# They can cause serious problems if a builder's source tree is in a directory
2536# whose full name contains unusual characters.
2537ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2538ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2539ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2540
2541
2542
2543ABSSRCDIR=`pwd`
2544
2545
2546
2547cd ..
2548TOP_DIR=`pwd`
2549cd ${topdir}
2550
2551
2552VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/include/version.h`
2553
2554
2555DATE=`sed -n -e 's/^.* \t*ADATE.*"\(.*\)"$/\1/p' ${srcdir}/include/version.h`
2556
2557
2558
2559
2560for ac_prog in true
2561do
2562  # Extract the first word of "$ac_prog", so it can be a program name with args.
2563set dummy $ac_prog; ac_word=$2
2564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2565$as_echo_n "checking for $ac_word... " >&6; }
2566if ${ac_cv_path_TRUEPRG+:} false; then :
2567  $as_echo_n "(cached) " >&6
2568else
2569  case $TRUEPRG in
2570  [\\/]* | ?:[\\/]*)
2571  ac_cv_path_TRUEPRG="$TRUEPRG" # Let the user override the test with a path.
2572  ;;
2573  *)
2574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2575for as_dir in $PATH
2576do
2577  IFS=$as_save_IFS
2578  test -z "$as_dir" && as_dir=.
2579    for ac_exec_ext in '' $ac_executable_extensions; do
2580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2581    ac_cv_path_TRUEPRG="$as_dir/$ac_word$ac_exec_ext"
2582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2583    break 2
2584  fi
2585done
2586  done
2587IFS=$as_save_IFS
2588
2589  ;;
2590esac
2591fi
2592TRUEPRG=$ac_cv_path_TRUEPRG
2593if test -n "$TRUEPRG"; then
2594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUEPRG" >&5
2595$as_echo "$TRUEPRG" >&6; }
2596else
2597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2598$as_echo "no" >&6; }
2599fi
2600
2601
2602  test -n "$TRUEPRG" && break
2603done
2604test -n "$TRUEPRG" || TRUEPRG=":"
2605
2606for ac_prog in false
2607do
2608  # Extract the first word of "$ac_prog", so it can be a program name with args.
2609set dummy $ac_prog; ac_word=$2
2610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2611$as_echo_n "checking for $ac_word... " >&6; }
2612if ${ac_cv_path_FALSEPRG+:} false; then :
2613  $as_echo_n "(cached) " >&6
2614else
2615  case $FALSEPRG in
2616  [\\/]* | ?:[\\/]*)
2617  ac_cv_path_FALSEPRG="$FALSEPRG" # Let the user override the test with a path.
2618  ;;
2619  *)
2620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2621for as_dir in $PATH
2622do
2623  IFS=$as_save_IFS
2624  test -z "$as_dir" && as_dir=.
2625    for ac_exec_ext in '' $ac_executable_extensions; do
2626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2627    ac_cv_path_FALSEPRG="$as_dir/$ac_word$ac_exec_ext"
2628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2629    break 2
2630  fi
2631done
2632  done
2633IFS=$as_save_IFS
2634
2635  ;;
2636esac
2637fi
2638FALSEPRG=$ac_cv_path_FALSEPRG
2639if test -n "$FALSEPRG"; then
2640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FALSEPRG" >&5
2641$as_echo "$FALSEPRG" >&6; }
2642else
2643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2644$as_echo "no" >&6; }
2645fi
2646
2647
2648  test -n "$FALSEPRG" && break
2649done
2650test -n "$FALSEPRG" || FALSEPRG=":"
2651
2652
2653PATH=$PATH:/bin:/sbin:/etc:/usr/bin:/usr/bin/X11:/usr/sbin:/usr/local/bin:/usr/local/sbin
2654export PATH
2655
2656# Make sure we can run config.sub.
2657$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2658  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2659
2660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2661$as_echo_n "checking build system type... " >&6; }
2662if ${ac_cv_build+:} false; then :
2663  $as_echo_n "(cached) " >&6
2664else
2665  ac_build_alias=$build_alias
2666test "x$ac_build_alias" = x &&
2667  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2668test "x$ac_build_alias" = x &&
2669  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2670ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2671  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2672
2673fi
2674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2675$as_echo "$ac_cv_build" >&6; }
2676case $ac_cv_build in
2677*-*-*) ;;
2678*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2679esac
2680build=$ac_cv_build
2681ac_save_IFS=$IFS; IFS='-'
2682set x $ac_cv_build
2683shift
2684build_cpu=$1
2685build_vendor=$2
2686shift; shift
2687# Remember, the first character of IFS is used to create $*,
2688# except with old shells:
2689build_os=$*
2690IFS=$ac_save_IFS
2691case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2692
2693
2694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2695$as_echo_n "checking host system type... " >&6; }
2696if ${ac_cv_host+:} false; then :
2697  $as_echo_n "(cached) " >&6
2698else
2699  if test "x$host_alias" = x; then
2700  ac_cv_host=$ac_cv_build
2701else
2702  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2703    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2704fi
2705
2706fi
2707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2708$as_echo "$ac_cv_host" >&6; }
2709case $ac_cv_host in
2710*-*-*) ;;
2711*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2712esac
2713host=$ac_cv_host
2714ac_save_IFS=$IFS; IFS='-'
2715set x $ac_cv_host
2716shift
2717host_cpu=$1
2718host_vendor=$2
2719shift; shift
2720# Remember, the first character of IFS is used to create $*,
2721# except with old shells:
2722host_os=$*
2723IFS=$ac_save_IFS
2724case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2725
2726
2727
2728if test "$cross_compiling" = "no" ; then
2729   for incdir in /usr/local/include ; do
2730      if test -d "$incdir" ; then
2731         CPPFLAGS="${CPPFLAGS} -I$incdir"
2732      fi
2733   done
2734   for libdir in /usr/local/lib64 /usr/local/lib ; do
2735      if test -d "$libdir" ; then
2736         LDFLAGS="${LDFLAGS} -L$libdir"
2737       fi
2738   done
2739fi
2740
2741if test "$host_os" = "mingw32" ; then
2742   if test -z "$CROSSTOOLS" ; then
2743      CROSSTOOLS=${topdir}/../cross-tools
2744   fi
2745   if test -z "$DEPKGS"; then
2746      DEPKGS=${topdir}/../depkgs-win32
2747   fi
2748   CPPFLAGS="-I${topdir}/src/win32/compat -I$DEPKGS/libroot/include -I$DEPKGS/libroot/include/pthread ${CPPFLAGS}"
2749   PATH=$CROSSTOOLS/mingw32/bin:$PATH
2750   LDFLAGS="-L$DEPKGS/libroot/lib ${LDFLAGS}"
2751   BG=-mwindows
2752fi
2753
2754
2755
2756
2757if test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
2758then
2759
2760   if test x$sysconfdir = x'${prefix}/etc' ; then
2761      sysconfdir='/etc/opt/apcctrl'
2762   fi
2763   if test x$sbindir = x'${exec_prefix}/sbin' ; then
2764      sbindir='/etc/opt/apcctrl/sbin'
2765   fi
2766
2767      CPPFLAGS="${CPPFLAGS} -I/usr/sfw/include"
2768   LDFLAGS="${LDFLAGS} -L/usr/sfw/lib"
2769else
2770
2771   if test x$sysconfdir = x'${prefix}/etc' ; then
2772      sysconfdir='/etc/apcctrl'
2773   fi
2774
2775   if test x$sbindir = x'${exec_prefix}/sbin' ; then
2776      sbindir='/sbin'
2777   fi
2778fi
2779
2780
2781ac_ext=cpp
2782ac_cpp='$CXXCPP $CPPFLAGS'
2783ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2784ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2785ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2786if test -z "$CXX"; then
2787  if test -n "$CCC"; then
2788    CXX=$CCC
2789  else
2790    if test -n "$ac_tool_prefix"; then
2791  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
2792  do
2793    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2794set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2796$as_echo_n "checking for $ac_word... " >&6; }
2797if ${ac_cv_prog_CXX+:} false; then :
2798  $as_echo_n "(cached) " >&6
2799else
2800  if test -n "$CXX"; then
2801  ac_cv_prog_CXX="$CXX" # Let the user override the test.
2802else
2803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2804for as_dir in $PATH
2805do
2806  IFS=$as_save_IFS
2807  test -z "$as_dir" && as_dir=.
2808    for ac_exec_ext in '' $ac_executable_extensions; do
2809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2810    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2812    break 2
2813  fi
2814done
2815  done
2816IFS=$as_save_IFS
2817
2818fi
2819fi
2820CXX=$ac_cv_prog_CXX
2821if test -n "$CXX"; then
2822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
2823$as_echo "$CXX" >&6; }
2824else
2825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2826$as_echo "no" >&6; }
2827fi
2828
2829
2830    test -n "$CXX" && break
2831  done
2832fi
2833if test -z "$CXX"; then
2834  ac_ct_CXX=$CXX
2835  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
2836do
2837  # Extract the first word of "$ac_prog", so it can be a program name with args.
2838set dummy $ac_prog; ac_word=$2
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2840$as_echo_n "checking for $ac_word... " >&6; }
2841if ${ac_cv_prog_ac_ct_CXX+:} false; then :
2842  $as_echo_n "(cached) " >&6
2843else
2844  if test -n "$ac_ct_CXX"; then
2845  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2846else
2847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2848for as_dir in $PATH
2849do
2850  IFS=$as_save_IFS
2851  test -z "$as_dir" && as_dir=.
2852    for ac_exec_ext in '' $ac_executable_extensions; do
2853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2854    ac_cv_prog_ac_ct_CXX="$ac_prog"
2855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2856    break 2
2857  fi
2858done
2859  done
2860IFS=$as_save_IFS
2861
2862fi
2863fi
2864ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2865if test -n "$ac_ct_CXX"; then
2866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
2867$as_echo "$ac_ct_CXX" >&6; }
2868else
2869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2870$as_echo "no" >&6; }
2871fi
2872
2873
2874  test -n "$ac_ct_CXX" && break
2875done
2876
2877  if test "x$ac_ct_CXX" = x; then
2878    CXX="g++"
2879  else
2880    case $cross_compiling:$ac_tool_warned in
2881yes:)
2882{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2883$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2884ac_tool_warned=yes ;;
2885esac
2886    CXX=$ac_ct_CXX
2887  fi
2888fi
2889
2890  fi
2891fi
2892# Provide some information about the compiler.
2893$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
2894set X $ac_compile
2895ac_compiler=$2
2896for ac_option in --version -v -V -qversion; do
2897  { { ac_try="$ac_compiler $ac_option >&5"
2898case "(($ac_try" in
2899  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2900  *) ac_try_echo=$ac_try;;
2901esac
2902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2903$as_echo "$ac_try_echo"; } >&5
2904  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2905  ac_status=$?
2906  if test -s conftest.err; then
2907    sed '10a\
2908... rest of stderr output deleted ...
2909         10q' conftest.err >conftest.er1
2910    cat conftest.er1 >&5
2911  fi
2912  rm -f conftest.er1 conftest.err
2913  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2914  test $ac_status = 0; }
2915done
2916
2917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2918/* end confdefs.h.  */
2919
2920int
2921main ()
2922{
2923
2924  ;
2925  return 0;
2926}
2927_ACEOF
2928ac_clean_files_save=$ac_clean_files
2929ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2930# Try to create an executable without -o first, disregard a.out.
2931# It will help us diagnose broken compilers, and finding out an intuition
2932# of exeext.
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5
2934$as_echo_n "checking whether the C++ compiler works... " >&6; }
2935ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2936
2937# The possible output files:
2938ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2939
2940ac_rmfiles=
2941for ac_file in $ac_files
2942do
2943  case $ac_file in
2944    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2945    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2946  esac
2947done
2948rm -f $ac_rmfiles
2949
2950if { { ac_try="$ac_link_default"
2951case "(($ac_try" in
2952  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2953  *) ac_try_echo=$ac_try;;
2954esac
2955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2956$as_echo "$ac_try_echo"; } >&5
2957  (eval "$ac_link_default") 2>&5
2958  ac_status=$?
2959  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2960  test $ac_status = 0; }; then :
2961  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2962# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2963# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2964# so that the user can short-circuit this test for compilers unknown to
2965# Autoconf.
2966for ac_file in $ac_files ''
2967do
2968  test -f "$ac_file" || continue
2969  case $ac_file in
2970    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2971	;;
2972    [ab].out )
2973	# We found the default executable, but exeext='' is most
2974	# certainly right.
2975	break;;
2976    *.* )
2977	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2978	then :; else
2979	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2980	fi
2981	# We set ac_cv_exeext here because the later test for it is not
2982	# safe: cross compilers may not add the suffix if given an `-o'
2983	# argument, so we may need to know it at that point already.
2984	# Even if this section looks crufty: it has the advantage of
2985	# actually working.
2986	break;;
2987    * )
2988	break;;
2989  esac
2990done
2991test "$ac_cv_exeext" = no && ac_cv_exeext=
2992
2993else
2994  ac_file=''
2995fi
2996if test -z "$ac_file"; then :
2997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2998$as_echo "no" >&6; }
2999$as_echo "$as_me: failed program was:" >&5
3000sed 's/^/| /' conftest.$ac_ext >&5
3001
3002{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3004as_fn_error 77 "C++ compiler cannot create executables
3005See \`config.log' for more details" "$LINENO" 5; }
3006else
3007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3008$as_echo "yes" >&6; }
3009fi
3010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5
3011$as_echo_n "checking for C++ compiler default output file name... " >&6; }
3012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3013$as_echo "$ac_file" >&6; }
3014ac_exeext=$ac_cv_exeext
3015
3016rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3017ac_clean_files=$ac_clean_files_save
3018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3019$as_echo_n "checking for suffix of executables... " >&6; }
3020if { { ac_try="$ac_link"
3021case "(($ac_try" in
3022  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3023  *) ac_try_echo=$ac_try;;
3024esac
3025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3026$as_echo "$ac_try_echo"; } >&5
3027  (eval "$ac_link") 2>&5
3028  ac_status=$?
3029  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3030  test $ac_status = 0; }; then :
3031  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3032# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3033# work properly (i.e., refer to `conftest.exe'), while it won't with
3034# `rm'.
3035for ac_file in conftest.exe conftest conftest.*; do
3036  test -f "$ac_file" || continue
3037  case $ac_file in
3038    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3039    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3040	  break;;
3041    * ) break;;
3042  esac
3043done
3044else
3045  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3046$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3047as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3048See \`config.log' for more details" "$LINENO" 5; }
3049fi
3050rm -f conftest conftest$ac_cv_exeext
3051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3052$as_echo "$ac_cv_exeext" >&6; }
3053
3054rm -f conftest.$ac_ext
3055EXEEXT=$ac_cv_exeext
3056ac_exeext=$EXEEXT
3057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3058/* end confdefs.h.  */
3059#include <stdio.h>
3060int
3061main ()
3062{
3063FILE *f = fopen ("conftest.out", "w");
3064 return ferror (f) || fclose (f) != 0;
3065
3066  ;
3067  return 0;
3068}
3069_ACEOF
3070ac_clean_files="$ac_clean_files conftest.out"
3071# Check that the compiler produces executables we can run.  If not, either
3072# the compiler is broken, or we cross compile.
3073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3074$as_echo_n "checking whether we are cross compiling... " >&6; }
3075if test "$cross_compiling" != yes; then
3076  { { ac_try="$ac_link"
3077case "(($ac_try" in
3078  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3079  *) ac_try_echo=$ac_try;;
3080esac
3081eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3082$as_echo "$ac_try_echo"; } >&5
3083  (eval "$ac_link") 2>&5
3084  ac_status=$?
3085  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3086  test $ac_status = 0; }
3087  if { ac_try='./conftest$ac_cv_exeext'
3088  { { case "(($ac_try" in
3089  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3090  *) ac_try_echo=$ac_try;;
3091esac
3092eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3093$as_echo "$ac_try_echo"; } >&5
3094  (eval "$ac_try") 2>&5
3095  ac_status=$?
3096  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3097  test $ac_status = 0; }; }; then
3098    cross_compiling=no
3099  else
3100    if test "$cross_compiling" = maybe; then
3101	cross_compiling=yes
3102    else
3103	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3104$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3105as_fn_error $? "cannot run C++ compiled programs.
3106If you meant to cross compile, use \`--host'.
3107See \`config.log' for more details" "$LINENO" 5; }
3108    fi
3109  fi
3110fi
3111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3112$as_echo "$cross_compiling" >&6; }
3113
3114rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3115ac_clean_files=$ac_clean_files_save
3116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3117$as_echo_n "checking for suffix of object files... " >&6; }
3118if ${ac_cv_objext+:} false; then :
3119  $as_echo_n "(cached) " >&6
3120else
3121  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3122/* end confdefs.h.  */
3123
3124int
3125main ()
3126{
3127
3128  ;
3129  return 0;
3130}
3131_ACEOF
3132rm -f conftest.o conftest.obj
3133if { { ac_try="$ac_compile"
3134case "(($ac_try" in
3135  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3136  *) ac_try_echo=$ac_try;;
3137esac
3138eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3139$as_echo "$ac_try_echo"; } >&5
3140  (eval "$ac_compile") 2>&5
3141  ac_status=$?
3142  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3143  test $ac_status = 0; }; then :
3144  for ac_file in conftest.o conftest.obj conftest.*; do
3145  test -f "$ac_file" || continue;
3146  case $ac_file in
3147    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3148    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3149       break;;
3150  esac
3151done
3152else
3153  $as_echo "$as_me: failed program was:" >&5
3154sed 's/^/| /' conftest.$ac_ext >&5
3155
3156{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3158as_fn_error $? "cannot compute suffix of object files: cannot compile
3159See \`config.log' for more details" "$LINENO" 5; }
3160fi
3161rm -f conftest.$ac_cv_objext conftest.$ac_ext
3162fi
3163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3164$as_echo "$ac_cv_objext" >&6; }
3165OBJEXT=$ac_cv_objext
3166ac_objext=$OBJEXT
3167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3168$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3169if ${ac_cv_cxx_compiler_gnu+:} false; then :
3170  $as_echo_n "(cached) " >&6
3171else
3172  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3173/* end confdefs.h.  */
3174
3175int
3176main ()
3177{
3178#ifndef __GNUC__
3179       choke me
3180#endif
3181
3182  ;
3183  return 0;
3184}
3185_ACEOF
3186if ac_fn_cxx_try_compile "$LINENO"; then :
3187  ac_compiler_gnu=yes
3188else
3189  ac_compiler_gnu=no
3190fi
3191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3192ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3193
3194fi
3195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3196$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3197if test $ac_compiler_gnu = yes; then
3198  GXX=yes
3199else
3200  GXX=
3201fi
3202ac_test_CXXFLAGS=${CXXFLAGS+set}
3203ac_save_CXXFLAGS=$CXXFLAGS
3204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3205$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3206if ${ac_cv_prog_cxx_g+:} false; then :
3207  $as_echo_n "(cached) " >&6
3208else
3209  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3210   ac_cxx_werror_flag=yes
3211   ac_cv_prog_cxx_g=no
3212   CXXFLAGS="-g"
3213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3214/* end confdefs.h.  */
3215
3216int
3217main ()
3218{
3219
3220  ;
3221  return 0;
3222}
3223_ACEOF
3224if ac_fn_cxx_try_compile "$LINENO"; then :
3225  ac_cv_prog_cxx_g=yes
3226else
3227  CXXFLAGS=""
3228      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3229/* end confdefs.h.  */
3230
3231int
3232main ()
3233{
3234
3235  ;
3236  return 0;
3237}
3238_ACEOF
3239if ac_fn_cxx_try_compile "$LINENO"; then :
3240
3241else
3242  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3243	 CXXFLAGS="-g"
3244	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3245/* end confdefs.h.  */
3246
3247int
3248main ()
3249{
3250
3251  ;
3252  return 0;
3253}
3254_ACEOF
3255if ac_fn_cxx_try_compile "$LINENO"; then :
3256  ac_cv_prog_cxx_g=yes
3257fi
3258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3259fi
3260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3261fi
3262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3263   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3264fi
3265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3266$as_echo "$ac_cv_prog_cxx_g" >&6; }
3267if test "$ac_test_CXXFLAGS" = set; then
3268  CXXFLAGS=$ac_save_CXXFLAGS
3269elif test $ac_cv_prog_cxx_g = yes; then
3270  if test "$GXX" = yes; then
3271    CXXFLAGS="-g -O2"
3272  else
3273    CXXFLAGS="-g"
3274  fi
3275else
3276  if test "$GXX" = yes; then
3277    CXXFLAGS="-O2"
3278  else
3279    CXXFLAGS=
3280  fi
3281fi
3282ac_ext=c
3283ac_cpp='$CPP $CPPFLAGS'
3284ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3285ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3286ac_compiler_gnu=$ac_cv_c_compiler_gnu
3287                ac_ext=c
3288ac_cpp='$CPP $CPPFLAGS'
3289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3291ac_compiler_gnu=$ac_cv_c_compiler_gnu
3292if test -n "$ac_tool_prefix"; then
3293  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3294set dummy ${ac_tool_prefix}gcc; ac_word=$2
3295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3296$as_echo_n "checking for $ac_word... " >&6; }
3297if ${ac_cv_prog_CC+:} false; then :
3298  $as_echo_n "(cached) " >&6
3299else
3300  if test -n "$CC"; then
3301  ac_cv_prog_CC="$CC" # Let the user override the test.
3302else
3303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3304for as_dir in $PATH
3305do
3306  IFS=$as_save_IFS
3307  test -z "$as_dir" && as_dir=.
3308    for ac_exec_ext in '' $ac_executable_extensions; do
3309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3310    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3312    break 2
3313  fi
3314done
3315  done
3316IFS=$as_save_IFS
3317
3318fi
3319fi
3320CC=$ac_cv_prog_CC
3321if test -n "$CC"; then
3322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3323$as_echo "$CC" >&6; }
3324else
3325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3326$as_echo "no" >&6; }
3327fi
3328
3329
3330fi
3331if test -z "$ac_cv_prog_CC"; then
3332  ac_ct_CC=$CC
3333  # Extract the first word of "gcc", so it can be a program name with args.
3334set dummy gcc; ac_word=$2
3335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3336$as_echo_n "checking for $ac_word... " >&6; }
3337if ${ac_cv_prog_ac_ct_CC+:} false; then :
3338  $as_echo_n "(cached) " >&6
3339else
3340  if test -n "$ac_ct_CC"; then
3341  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3342else
3343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3344for as_dir in $PATH
3345do
3346  IFS=$as_save_IFS
3347  test -z "$as_dir" && as_dir=.
3348    for ac_exec_ext in '' $ac_executable_extensions; do
3349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3350    ac_cv_prog_ac_ct_CC="gcc"
3351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3352    break 2
3353  fi
3354done
3355  done
3356IFS=$as_save_IFS
3357
3358fi
3359fi
3360ac_ct_CC=$ac_cv_prog_ac_ct_CC
3361if test -n "$ac_ct_CC"; then
3362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3363$as_echo "$ac_ct_CC" >&6; }
3364else
3365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3366$as_echo "no" >&6; }
3367fi
3368
3369  if test "x$ac_ct_CC" = x; then
3370    CC=""
3371  else
3372    case $cross_compiling:$ac_tool_warned in
3373yes:)
3374{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3375$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3376ac_tool_warned=yes ;;
3377esac
3378    CC=$ac_ct_CC
3379  fi
3380else
3381  CC="$ac_cv_prog_CC"
3382fi
3383
3384if test -z "$CC"; then
3385          if test -n "$ac_tool_prefix"; then
3386    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3387set dummy ${ac_tool_prefix}cc; ac_word=$2
3388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3389$as_echo_n "checking for $ac_word... " >&6; }
3390if ${ac_cv_prog_CC+:} false; then :
3391  $as_echo_n "(cached) " >&6
3392else
3393  if test -n "$CC"; then
3394  ac_cv_prog_CC="$CC" # Let the user override the test.
3395else
3396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3397for as_dir in $PATH
3398do
3399  IFS=$as_save_IFS
3400  test -z "$as_dir" && as_dir=.
3401    for ac_exec_ext in '' $ac_executable_extensions; do
3402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3403    ac_cv_prog_CC="${ac_tool_prefix}cc"
3404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3405    break 2
3406  fi
3407done
3408  done
3409IFS=$as_save_IFS
3410
3411fi
3412fi
3413CC=$ac_cv_prog_CC
3414if test -n "$CC"; then
3415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3416$as_echo "$CC" >&6; }
3417else
3418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3419$as_echo "no" >&6; }
3420fi
3421
3422
3423  fi
3424fi
3425if test -z "$CC"; then
3426  # Extract the first word of "cc", so it can be a program name with args.
3427set dummy cc; ac_word=$2
3428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3429$as_echo_n "checking for $ac_word... " >&6; }
3430if ${ac_cv_prog_CC+:} false; then :
3431  $as_echo_n "(cached) " >&6
3432else
3433  if test -n "$CC"; then
3434  ac_cv_prog_CC="$CC" # Let the user override the test.
3435else
3436  ac_prog_rejected=no
3437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3438for as_dir in $PATH
3439do
3440  IFS=$as_save_IFS
3441  test -z "$as_dir" && as_dir=.
3442    for ac_exec_ext in '' $ac_executable_extensions; do
3443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3444    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3445       ac_prog_rejected=yes
3446       continue
3447     fi
3448    ac_cv_prog_CC="cc"
3449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3450    break 2
3451  fi
3452done
3453  done
3454IFS=$as_save_IFS
3455
3456if test $ac_prog_rejected = yes; then
3457  # We found a bogon in the path, so make sure we never use it.
3458  set dummy $ac_cv_prog_CC
3459  shift
3460  if test $# != 0; then
3461    # We chose a different compiler from the bogus one.
3462    # However, it has the same basename, so the bogon will be chosen
3463    # first if we set CC to just the basename; use the full file name.
3464    shift
3465    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3466  fi
3467fi
3468fi
3469fi
3470CC=$ac_cv_prog_CC
3471if test -n "$CC"; then
3472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3473$as_echo "$CC" >&6; }
3474else
3475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3476$as_echo "no" >&6; }
3477fi
3478
3479
3480fi
3481if test -z "$CC"; then
3482  if test -n "$ac_tool_prefix"; then
3483  for ac_prog in cl.exe
3484  do
3485    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3486set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3488$as_echo_n "checking for $ac_word... " >&6; }
3489if ${ac_cv_prog_CC+:} false; then :
3490  $as_echo_n "(cached) " >&6
3491else
3492  if test -n "$CC"; then
3493  ac_cv_prog_CC="$CC" # Let the user override the test.
3494else
3495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3496for as_dir in $PATH
3497do
3498  IFS=$as_save_IFS
3499  test -z "$as_dir" && as_dir=.
3500    for ac_exec_ext in '' $ac_executable_extensions; do
3501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3502    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3504    break 2
3505  fi
3506done
3507  done
3508IFS=$as_save_IFS
3509
3510fi
3511fi
3512CC=$ac_cv_prog_CC
3513if test -n "$CC"; then
3514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3515$as_echo "$CC" >&6; }
3516else
3517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3518$as_echo "no" >&6; }
3519fi
3520
3521
3522    test -n "$CC" && break
3523  done
3524fi
3525if test -z "$CC"; then
3526  ac_ct_CC=$CC
3527  for ac_prog in cl.exe
3528do
3529  # Extract the first word of "$ac_prog", so it can be a program name with args.
3530set dummy $ac_prog; ac_word=$2
3531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3532$as_echo_n "checking for $ac_word... " >&6; }
3533if ${ac_cv_prog_ac_ct_CC+:} false; then :
3534  $as_echo_n "(cached) " >&6
3535else
3536  if test -n "$ac_ct_CC"; then
3537  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3538else
3539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3540for as_dir in $PATH
3541do
3542  IFS=$as_save_IFS
3543  test -z "$as_dir" && as_dir=.
3544    for ac_exec_ext in '' $ac_executable_extensions; do
3545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3546    ac_cv_prog_ac_ct_CC="$ac_prog"
3547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3548    break 2
3549  fi
3550done
3551  done
3552IFS=$as_save_IFS
3553
3554fi
3555fi
3556ac_ct_CC=$ac_cv_prog_ac_ct_CC
3557if test -n "$ac_ct_CC"; then
3558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3559$as_echo "$ac_ct_CC" >&6; }
3560else
3561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3562$as_echo "no" >&6; }
3563fi
3564
3565
3566  test -n "$ac_ct_CC" && break
3567done
3568
3569  if test "x$ac_ct_CC" = x; then
3570    CC=""
3571  else
3572    case $cross_compiling:$ac_tool_warned in
3573yes:)
3574{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3575$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3576ac_tool_warned=yes ;;
3577esac
3578    CC=$ac_ct_CC
3579  fi
3580fi
3581
3582fi
3583
3584
3585test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3586$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3587as_fn_error $? "no acceptable C compiler found in \$PATH
3588See \`config.log' for more details" "$LINENO" 5; }
3589
3590# Provide some information about the compiler.
3591$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3592set X $ac_compile
3593ac_compiler=$2
3594for ac_option in --version -v -V -qversion; do
3595  { { ac_try="$ac_compiler $ac_option >&5"
3596case "(($ac_try" in
3597  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3598  *) ac_try_echo=$ac_try;;
3599esac
3600eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3601$as_echo "$ac_try_echo"; } >&5
3602  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3603  ac_status=$?
3604  if test -s conftest.err; then
3605    sed '10a\
3606... rest of stderr output deleted ...
3607         10q' conftest.err >conftest.er1
3608    cat conftest.er1 >&5
3609  fi
3610  rm -f conftest.er1 conftest.err
3611  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3612  test $ac_status = 0; }
3613done
3614
3615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3616$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3617if ${ac_cv_c_compiler_gnu+:} false; then :
3618  $as_echo_n "(cached) " >&6
3619else
3620  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3621/* end confdefs.h.  */
3622
3623int
3624main ()
3625{
3626#ifndef __GNUC__
3627       choke me
3628#endif
3629
3630  ;
3631  return 0;
3632}
3633_ACEOF
3634if ac_fn_c_try_compile "$LINENO"; then :
3635  ac_compiler_gnu=yes
3636else
3637  ac_compiler_gnu=no
3638fi
3639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3640ac_cv_c_compiler_gnu=$ac_compiler_gnu
3641
3642fi
3643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3644$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3645if test $ac_compiler_gnu = yes; then
3646  GCC=yes
3647else
3648  GCC=
3649fi
3650ac_test_CFLAGS=${CFLAGS+set}
3651ac_save_CFLAGS=$CFLAGS
3652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3653$as_echo_n "checking whether $CC accepts -g... " >&6; }
3654if ${ac_cv_prog_cc_g+:} false; then :
3655  $as_echo_n "(cached) " >&6
3656else
3657  ac_save_c_werror_flag=$ac_c_werror_flag
3658   ac_c_werror_flag=yes
3659   ac_cv_prog_cc_g=no
3660   CFLAGS="-g"
3661   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3662/* end confdefs.h.  */
3663
3664int
3665main ()
3666{
3667
3668  ;
3669  return 0;
3670}
3671_ACEOF
3672if ac_fn_c_try_compile "$LINENO"; then :
3673  ac_cv_prog_cc_g=yes
3674else
3675  CFLAGS=""
3676      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3677/* end confdefs.h.  */
3678
3679int
3680main ()
3681{
3682
3683  ;
3684  return 0;
3685}
3686_ACEOF
3687if ac_fn_c_try_compile "$LINENO"; then :
3688
3689else
3690  ac_c_werror_flag=$ac_save_c_werror_flag
3691	 CFLAGS="-g"
3692	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3693/* end confdefs.h.  */
3694
3695int
3696main ()
3697{
3698
3699  ;
3700  return 0;
3701}
3702_ACEOF
3703if ac_fn_c_try_compile "$LINENO"; then :
3704  ac_cv_prog_cc_g=yes
3705fi
3706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3707fi
3708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3709fi
3710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3711   ac_c_werror_flag=$ac_save_c_werror_flag
3712fi
3713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3714$as_echo "$ac_cv_prog_cc_g" >&6; }
3715if test "$ac_test_CFLAGS" = set; then
3716  CFLAGS=$ac_save_CFLAGS
3717elif test $ac_cv_prog_cc_g = yes; then
3718  if test "$GCC" = yes; then
3719    CFLAGS="-g -O2"
3720  else
3721    CFLAGS="-g"
3722  fi
3723else
3724  if test "$GCC" = yes; then
3725    CFLAGS="-O2"
3726  else
3727    CFLAGS=
3728  fi
3729fi
3730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3731$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3732if ${ac_cv_prog_cc_c89+:} false; then :
3733  $as_echo_n "(cached) " >&6
3734else
3735  ac_cv_prog_cc_c89=no
3736ac_save_CC=$CC
3737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3738/* end confdefs.h.  */
3739#include <stdarg.h>
3740#include <stdio.h>
3741struct stat;
3742/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3743struct buf { int x; };
3744FILE * (*rcsopen) (struct buf *, struct stat *, int);
3745static char *e (p, i)
3746     char **p;
3747     int i;
3748{
3749  return p[i];
3750}
3751static char *f (char * (*g) (char **, int), char **p, ...)
3752{
3753  char *s;
3754  va_list v;
3755  va_start (v,p);
3756  s = g (p, va_arg (v,int));
3757  va_end (v);
3758  return s;
3759}
3760
3761/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3762   function prototypes and stuff, but not '\xHH' hex character constants.
3763   These don't provoke an error unfortunately, instead are silently treated
3764   as 'x'.  The following induces an error, until -std is added to get
3765   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3766   array size at least.  It's necessary to write '\x00'==0 to get something
3767   that's true only with -std.  */
3768int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3769
3770/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3771   inside strings and character constants.  */
3772#define FOO(x) 'x'
3773int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3774
3775int test (int i, double x);
3776struct s1 {int (*f) (int a);};
3777struct s2 {int (*f) (double a);};
3778int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3779int argc;
3780char **argv;
3781int
3782main ()
3783{
3784return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3785  ;
3786  return 0;
3787}
3788_ACEOF
3789for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3790	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3791do
3792  CC="$ac_save_CC $ac_arg"
3793  if ac_fn_c_try_compile "$LINENO"; then :
3794  ac_cv_prog_cc_c89=$ac_arg
3795fi
3796rm -f core conftest.err conftest.$ac_objext
3797  test "x$ac_cv_prog_cc_c89" != "xno" && break
3798done
3799rm -f conftest.$ac_ext
3800CC=$ac_save_CC
3801
3802fi
3803# AC_CACHE_VAL
3804case "x$ac_cv_prog_cc_c89" in
3805  x)
3806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3807$as_echo "none needed" >&6; } ;;
3808  xno)
3809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3810$as_echo "unsupported" >&6; } ;;
3811  *)
3812    CC="$CC $ac_cv_prog_cc_c89"
3813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3814$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3815esac
3816if test "x$ac_cv_prog_cc_c89" != xno; then :
3817
3818fi
3819
3820ac_ext=c
3821ac_cpp='$CPP $CPPFLAGS'
3822ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3823ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3824ac_compiler_gnu=$ac_cv_c_compiler_gnu
3825                 ac_ext=c
3826ac_cpp='$CPP $CPPFLAGS'
3827ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3828ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3829ac_compiler_gnu=$ac_cv_c_compiler_gnu
3830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3831$as_echo_n "checking how to run the C preprocessor... " >&6; }
3832# On Suns, sometimes $CPP names a directory.
3833if test -n "$CPP" && test -d "$CPP"; then
3834  CPP=
3835fi
3836if test -z "$CPP"; then
3837  if ${ac_cv_prog_CPP+:} false; then :
3838  $as_echo_n "(cached) " >&6
3839else
3840      # Double quotes because CPP needs to be expanded
3841    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3842    do
3843      ac_preproc_ok=false
3844for ac_c_preproc_warn_flag in '' yes
3845do
3846  # Use a header file that comes with gcc, so configuring glibc
3847  # with a fresh cross-compiler works.
3848  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3849  # <limits.h> exists even on freestanding compilers.
3850  # On the NeXT, cc -E runs the code through the compiler's parser,
3851  # not just through cpp. "Syntax error" is here to catch this case.
3852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3853/* end confdefs.h.  */
3854#ifdef __STDC__
3855# include <limits.h>
3856#else
3857# include <assert.h>
3858#endif
3859		     Syntax error
3860_ACEOF
3861if ac_fn_c_try_cpp "$LINENO"; then :
3862
3863else
3864  # Broken: fails on valid input.
3865continue
3866fi
3867rm -f conftest.err conftest.i conftest.$ac_ext
3868
3869  # OK, works on sane cases.  Now check whether nonexistent headers
3870  # can be detected and how.
3871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3872/* end confdefs.h.  */
3873#include <ac_nonexistent.h>
3874_ACEOF
3875if ac_fn_c_try_cpp "$LINENO"; then :
3876  # Broken: success on invalid input.
3877continue
3878else
3879  # Passes both tests.
3880ac_preproc_ok=:
3881break
3882fi
3883rm -f conftest.err conftest.i conftest.$ac_ext
3884
3885done
3886# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3887rm -f conftest.i conftest.err conftest.$ac_ext
3888if $ac_preproc_ok; then :
3889  break
3890fi
3891
3892    done
3893    ac_cv_prog_CPP=$CPP
3894
3895fi
3896  CPP=$ac_cv_prog_CPP
3897else
3898  ac_cv_prog_CPP=$CPP
3899fi
3900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3901$as_echo "$CPP" >&6; }
3902ac_preproc_ok=false
3903for ac_c_preproc_warn_flag in '' yes
3904do
3905  # Use a header file that comes with gcc, so configuring glibc
3906  # with a fresh cross-compiler works.
3907  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3908  # <limits.h> exists even on freestanding compilers.
3909  # On the NeXT, cc -E runs the code through the compiler's parser,
3910  # not just through cpp. "Syntax error" is here to catch this case.
3911  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3912/* end confdefs.h.  */
3913#ifdef __STDC__
3914# include <limits.h>
3915#else
3916# include <assert.h>
3917#endif
3918		     Syntax error
3919_ACEOF
3920if ac_fn_c_try_cpp "$LINENO"; then :
3921
3922else
3923  # Broken: fails on valid input.
3924continue
3925fi
3926rm -f conftest.err conftest.i conftest.$ac_ext
3927
3928  # OK, works on sane cases.  Now check whether nonexistent headers
3929  # can be detected and how.
3930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3931/* end confdefs.h.  */
3932#include <ac_nonexistent.h>
3933_ACEOF
3934if ac_fn_c_try_cpp "$LINENO"; then :
3935  # Broken: success on invalid input.
3936continue
3937else
3938  # Passes both tests.
3939ac_preproc_ok=:
3940break
3941fi
3942rm -f conftest.err conftest.i conftest.$ac_ext
3943
3944done
3945# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3946rm -f conftest.i conftest.err conftest.$ac_ext
3947if $ac_preproc_ok; then :
3948
3949else
3950  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3951$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3952as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3953See \`config.log' for more details" "$LINENO" 5; }
3954fi
3955
3956ac_ext=c
3957ac_cpp='$CPP $CPPFLAGS'
3958ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3959ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3960ac_compiler_gnu=$ac_cv_c_compiler_gnu
3961                # Find a good install program.  We prefer a C program (faster),
3962# so one script is as good as another.  But avoid the broken or
3963# incompatible versions:
3964# SysV /etc/install, /usr/sbin/install
3965# SunOS /usr/etc/install
3966# IRIX /sbin/install
3967# AIX /bin/install
3968# AmigaOS /C/install, which installs bootblocks on floppy discs
3969# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3970# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3971# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3972# OS/2's system install, which has a completely different semantic
3973# ./install, which can be erroneously created by make from ./install.sh.
3974# Reject install programs that cannot install multiple files.
3975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3976$as_echo_n "checking for a BSD-compatible install... " >&6; }
3977if test -z "$INSTALL"; then
3978if ${ac_cv_path_install+:} false; then :
3979  $as_echo_n "(cached) " >&6
3980else
3981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3982for as_dir in $PATH
3983do
3984  IFS=$as_save_IFS
3985  test -z "$as_dir" && as_dir=.
3986    # Account for people who put trailing slashes in PATH elements.
3987case $as_dir/ in #((
3988  ./ | .// | /[cC]/* | \
3989  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3990  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3991  /usr/ucb/* ) ;;
3992  *)
3993    # OSF1 and SCO ODT 3.0 have their own names for install.
3994    # Don't use installbsd from OSF since it installs stuff as root
3995    # by default.
3996    for ac_prog in ginstall scoinst install; do
3997      for ac_exec_ext in '' $ac_executable_extensions; do
3998	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3999	  if test $ac_prog = install &&
4000	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4001	    # AIX install.  It has an incompatible calling convention.
4002	    :
4003	  elif test $ac_prog = install &&
4004	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4005	    # program-specific install script used by HP pwplus--don't use.
4006	    :
4007	  else
4008	    rm -rf conftest.one conftest.two conftest.dir
4009	    echo one > conftest.one
4010	    echo two > conftest.two
4011	    mkdir conftest.dir
4012	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4013	      test -s conftest.one && test -s conftest.two &&
4014	      test -s conftest.dir/conftest.one &&
4015	      test -s conftest.dir/conftest.two
4016	    then
4017	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4018	      break 3
4019	    fi
4020	  fi
4021	fi
4022      done
4023    done
4024    ;;
4025esac
4026
4027  done
4028IFS=$as_save_IFS
4029
4030rm -rf conftest.one conftest.two conftest.dir
4031
4032fi
4033  if test "${ac_cv_path_install+set}" = set; then
4034    INSTALL=$ac_cv_path_install
4035  else
4036    # As a last resort, use the slow shell script.  Don't cache a
4037    # value for INSTALL within a source directory, because that will
4038    # break other packages using the cache if that directory is
4039    # removed, or if the value is a relative name.
4040    INSTALL=$ac_install_sh
4041  fi
4042fi
4043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4044$as_echo "$INSTALL" >&6; }
4045
4046# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4047# It thinks the first close brace ends the variable substitution.
4048test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4049
4050test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4051
4052test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4053            for ac_prog in gawk mawk nawk awk
4054do
4055  # Extract the first word of "$ac_prog", so it can be a program name with args.
4056set dummy $ac_prog; ac_word=$2
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4058$as_echo_n "checking for $ac_word... " >&6; }
4059if ${ac_cv_prog_AWK+:} false; then :
4060  $as_echo_n "(cached) " >&6
4061else
4062  if test -n "$AWK"; then
4063  ac_cv_prog_AWK="$AWK" # Let the user override the test.
4064else
4065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4066for as_dir in $PATH
4067do
4068  IFS=$as_save_IFS
4069  test -z "$as_dir" && as_dir=.
4070    for ac_exec_ext in '' $ac_executable_extensions; do
4071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4072    ac_cv_prog_AWK="$ac_prog"
4073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4074    break 2
4075  fi
4076done
4077  done
4078IFS=$as_save_IFS
4079
4080fi
4081fi
4082AWK=$ac_cv_prog_AWK
4083if test -n "$AWK"; then
4084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4085$as_echo "$AWK" >&6; }
4086else
4087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4088$as_echo "no" >&6; }
4089fi
4090
4091
4092  test -n "$AWK" && break
4093done
4094
4095
4096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
4097$as_echo_n "checking for library containing strerror... " >&6; }
4098if ${ac_cv_search_strerror+:} false; then :
4099  $as_echo_n "(cached) " >&6
4100else
4101  ac_func_search_save_LIBS=$LIBS
4102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4103/* end confdefs.h.  */
4104
4105/* Override any GCC internal prototype to avoid an error.
4106   Use char because int might match the return type of a GCC
4107   builtin and then its argument prototype would still apply.  */
4108#ifdef __cplusplus
4109extern "C"
4110#endif
4111char strerror ();
4112int
4113main ()
4114{
4115return strerror ();
4116  ;
4117  return 0;
4118}
4119_ACEOF
4120for ac_lib in '' cposix; do
4121  if test -z "$ac_lib"; then
4122    ac_res="none required"
4123  else
4124    ac_res=-l$ac_lib
4125    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4126  fi
4127  if ac_fn_c_try_link "$LINENO"; then :
4128  ac_cv_search_strerror=$ac_res
4129fi
4130rm -f core conftest.err conftest.$ac_objext \
4131    conftest$ac_exeext
4132  if ${ac_cv_search_strerror+:} false; then :
4133  break
4134fi
4135done
4136if ${ac_cv_search_strerror+:} false; then :
4137
4138else
4139  ac_cv_search_strerror=no
4140fi
4141rm conftest.$ac_ext
4142LIBS=$ac_func_search_save_LIBS
4143fi
4144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
4145$as_echo "$ac_cv_search_strerror" >&6; }
4146ac_res=$ac_cv_search_strerror
4147if test "$ac_res" != no; then :
4148  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4149
4150fi
4151
4152
4153if test x$LD = x ; then
4154   LD="$CC"
4155fi
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/libdrivers.a"
4166
4167
4168PTHREAD_CFLAGS=""
4169PTHREAD_LFLAGS="-lpthread"
4170with_pthreads=yes
4171
4172
4173$as_echo "#define HAVE_PTHREADS 1" >>confdefs.h
4174
4175
4176
4177
4178APCACCESS=apcaccess
4179SMTP=smtp
4180APCTEST=apctest
4181
4182
4183
4184
4185for ac_prog in shutdown shutdown.bsd
4186do
4187  # Extract the first word of "$ac_prog", so it can be a program name with args.
4188set dummy $ac_prog; ac_word=$2
4189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4190$as_echo_n "checking for $ac_word... " >&6; }
4191if ${ac_cv_path_SHUTDOWN+:} false; then :
4192  $as_echo_n "(cached) " >&6
4193else
4194  case $SHUTDOWN in
4195  [\\/]* | ?:[\\/]*)
4196  ac_cv_path_SHUTDOWN="$SHUTDOWN" # Let the user override the test with a path.
4197  ;;
4198  *)
4199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4200for as_dir in $PATH
4201do
4202  IFS=$as_save_IFS
4203  test -z "$as_dir" && as_dir=.
4204    for ac_exec_ext in '' $ac_executable_extensions; do
4205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4206    ac_cv_path_SHUTDOWN="$as_dir/$ac_word$ac_exec_ext"
4207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4208    break 2
4209  fi
4210done
4211  done
4212IFS=$as_save_IFS
4213
4214  ;;
4215esac
4216fi
4217SHUTDOWN=$ac_cv_path_SHUTDOWN
4218if test -n "$SHUTDOWN"; then
4219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHUTDOWN" >&5
4220$as_echo "$SHUTDOWN" >&6; }
4221else
4222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4223$as_echo "no" >&6; }
4224fi
4225
4226
4227  test -n "$SHUTDOWN" && break
4228done
4229
4230    if test "$SHUTDOWN" = "" ; then
4231       as_fn_error $? "Missing required tool; need any one of: shutdown shutdown.bsd" "$LINENO" 5
4232    fi
4233
4234
4235for ac_prog in mail
4236do
4237  # Extract the first word of "$ac_prog", so it can be a program name with args.
4238set dummy $ac_prog; ac_word=$2
4239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4240$as_echo_n "checking for $ac_word... " >&6; }
4241if ${ac_cv_path_APCCTRL_MAIL+:} false; then :
4242  $as_echo_n "(cached) " >&6
4243else
4244  case $APCCTRL_MAIL in
4245  [\\/]* | ?:[\\/]*)
4246  ac_cv_path_APCCTRL_MAIL="$APCCTRL_MAIL" # Let the user override the test with a path.
4247  ;;
4248  *)
4249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4250for as_dir in $PATH
4251do
4252  IFS=$as_save_IFS
4253  test -z "$as_dir" && as_dir=.
4254    for ac_exec_ext in '' $ac_executable_extensions; do
4255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4256    ac_cv_path_APCCTRL_MAIL="$as_dir/$ac_word$ac_exec_ext"
4257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4258    break 2
4259  fi
4260done
4261  done
4262IFS=$as_save_IFS
4263
4264  ;;
4265esac
4266fi
4267APCCTRL_MAIL=$ac_cv_path_APCCTRL_MAIL
4268if test -n "$APCCTRL_MAIL"; then
4269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $APCCTRL_MAIL" >&5
4270$as_echo "$APCCTRL_MAIL" >&6; }
4271else
4272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4273$as_echo "no" >&6; }
4274fi
4275
4276
4277  test -n "$APCCTRL_MAIL" && break
4278done
4279test -n "$APCCTRL_MAIL" || APCCTRL_MAIL="no"
4280
4281if test "$APCCTRL_MAIL" = "no"
4282then
4283   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mail program not found !" >&5
4284$as_echo "$as_me: WARNING: mail program not found !" >&2;}
4285   APCCTRL_MAIL=mail
4286fi
4287
4288for ac_prog in wall
4289do
4290  # Extract the first word of "$ac_prog", so it can be a program name with args.
4291set dummy $ac_prog; ac_word=$2
4292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4293$as_echo_n "checking for $ac_word... " >&6; }
4294if ${ac_cv_path_WALL+:} false; then :
4295  $as_echo_n "(cached) " >&6
4296else
4297  case $WALL in
4298  [\\/]* | ?:[\\/]*)
4299  ac_cv_path_WALL="$WALL" # Let the user override the test with a path.
4300  ;;
4301  *)
4302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4303for as_dir in $PATH
4304do
4305  IFS=$as_save_IFS
4306  test -z "$as_dir" && as_dir=.
4307    for ac_exec_ext in '' $ac_executable_extensions; do
4308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4309    ac_cv_path_WALL="$as_dir/$ac_word$ac_exec_ext"
4310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4311    break 2
4312  fi
4313done
4314  done
4315IFS=$as_save_IFS
4316
4317  ;;
4318esac
4319fi
4320WALL=$ac_cv_path_WALL
4321if test -n "$WALL"; then
4322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WALL" >&5
4323$as_echo "$WALL" >&6; }
4324else
4325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4326$as_echo "no" >&6; }
4327fi
4328
4329
4330  test -n "$WALL" && break
4331done
4332
4333    if test "$WALL" = "" ; then
4334       as_fn_error $? "Missing required tool; need any one of: wall" "$LINENO" 5
4335    fi
4336
4337for ac_prog in sh bash
4338do
4339  # Extract the first word of "$ac_prog", so it can be a program name with args.
4340set dummy $ac_prog; ac_word=$2
4341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4342$as_echo_n "checking for $ac_word... " >&6; }
4343if ${ac_cv_path_SCRIPTSHELL+:} false; then :
4344  $as_echo_n "(cached) " >&6
4345else
4346  case $SCRIPTSHELL in
4347  [\\/]* | ?:[\\/]*)
4348  ac_cv_path_SCRIPTSHELL="$SCRIPTSHELL" # Let the user override the test with a path.
4349  ;;
4350  *)
4351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4352for as_dir in $PATH
4353do
4354  IFS=$as_save_IFS
4355  test -z "$as_dir" && as_dir=.
4356    for ac_exec_ext in '' $ac_executable_extensions; do
4357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4358    ac_cv_path_SCRIPTSHELL="$as_dir/$ac_word$ac_exec_ext"
4359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4360    break 2
4361  fi
4362done
4363  done
4364IFS=$as_save_IFS
4365
4366  ;;
4367esac
4368fi
4369SCRIPTSHELL=$ac_cv_path_SCRIPTSHELL
4370if test -n "$SCRIPTSHELL"; then
4371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SCRIPTSHELL" >&5
4372$as_echo "$SCRIPTSHELL" >&6; }
4373else
4374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4375$as_echo "no" >&6; }
4376fi
4377
4378
4379  test -n "$SCRIPTSHELL" && break
4380done
4381
4382    if test "$SCRIPTSHELL" = "" ; then
4383       as_fn_error $? "Missing required tool; need any one of: sh bash" "$LINENO" 5
4384    fi
4385
4386
4387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5
4388$as_echo_n "checking for GNU make... " >&6; }
4389if ${_cv_gnu_make_command+:} false; then :
4390  $as_echo_n "(cached) " >&6
4391else
4392  _cv_gnu_make_command='' ;
4393            for a in "$MAKE" make gmake gnumake ; do
4394         if test -z "$a" ; then continue ; fi ;
4395         if  ( sh -c "$a --version" 2> /dev/null | grep GNU  2>&1 > /dev/null ) ; then
4396            _cv_gnu_make_command=$a ;
4397            break;
4398         fi
4399      done ;
4400
4401fi
4402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5
4403$as_echo "$_cv_gnu_make_command" >&6; } ;
4404   MAKE=$_cv_gnu_make_command;
4405   if test -z "$_cv_gnu_make_command" ; then
4406      as_fn_error $? "Could not find GNU make" "$LINENO" 5 ;
4407   fi ;
4408
4409if test -n "$ac_tool_prefix"; then
4410  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4411set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4413$as_echo_n "checking for $ac_word... " >&6; }
4414if ${ac_cv_prog_RANLIB+:} false; then :
4415  $as_echo_n "(cached) " >&6
4416else
4417  if test -n "$RANLIB"; then
4418  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4419else
4420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4421for as_dir in $PATH
4422do
4423  IFS=$as_save_IFS
4424  test -z "$as_dir" && as_dir=.
4425    for ac_exec_ext in '' $ac_executable_extensions; do
4426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4427    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4429    break 2
4430  fi
4431done
4432  done
4433IFS=$as_save_IFS
4434
4435fi
4436fi
4437RANLIB=$ac_cv_prog_RANLIB
4438if test -n "$RANLIB"; then
4439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4440$as_echo "$RANLIB" >&6; }
4441else
4442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4443$as_echo "no" >&6; }
4444fi
4445
4446
4447fi
4448if test -z "$ac_cv_prog_RANLIB"; then
4449  ac_ct_RANLIB=$RANLIB
4450  # Extract the first word of "ranlib", so it can be a program name with args.
4451set dummy ranlib; ac_word=$2
4452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4453$as_echo_n "checking for $ac_word... " >&6; }
4454if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4455  $as_echo_n "(cached) " >&6
4456else
4457  if test -n "$ac_ct_RANLIB"; then
4458  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4459else
4460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4461for as_dir in $PATH
4462do
4463  IFS=$as_save_IFS
4464  test -z "$as_dir" && as_dir=.
4465    for ac_exec_ext in '' $ac_executable_extensions; do
4466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4467    ac_cv_prog_ac_ct_RANLIB="ranlib"
4468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4469    break 2
4470  fi
4471done
4472  done
4473IFS=$as_save_IFS
4474
4475fi
4476fi
4477ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4478if test -n "$ac_ct_RANLIB"; then
4479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4480$as_echo "$ac_ct_RANLIB" >&6; }
4481else
4482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4483$as_echo "no" >&6; }
4484fi
4485
4486  if test "x$ac_ct_RANLIB" = x; then
4487    RANLIB=""
4488  else
4489    case $cross_compiling:$ac_tool_warned in
4490yes:)
4491{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4492$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4493ac_tool_warned=yes ;;
4494esac
4495    RANLIB=$ac_ct_RANLIB
4496  fi
4497else
4498  RANLIB="$ac_cv_prog_RANLIB"
4499fi
4500
4501    if test "$RANLIB" = "" ; then
4502       as_fn_error $? "Missing required tool: ranlib" "$LINENO" 5
4503    fi
4504
4505# Extract the first word of "rm", so it can be a program name with args.
4506set dummy rm; ac_word=$2
4507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4508$as_echo_n "checking for $ac_word... " >&6; }
4509if ${ac_cv_path_RM+:} false; then :
4510  $as_echo_n "(cached) " >&6
4511else
4512  case $RM in
4513  [\\/]* | ?:[\\/]*)
4514  ac_cv_path_RM="$RM" # Let the user override the test with a path.
4515  ;;
4516  *)
4517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518for as_dir in $PATH
4519do
4520  IFS=$as_save_IFS
4521  test -z "$as_dir" && as_dir=.
4522    for ac_exec_ext in '' $ac_executable_extensions; do
4523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4524    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
4525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4526    break 2
4527  fi
4528done
4529  done
4530IFS=$as_save_IFS
4531
4532  ;;
4533esac
4534fi
4535RM=$ac_cv_path_RM
4536if test -n "$RM"; then
4537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
4538$as_echo "$RM" >&6; }
4539else
4540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4541$as_echo "no" >&6; }
4542fi
4543
4544
4545    if test "$RM" = "" ; then
4546       as_fn_error $? "Missing required tool: rm" "$LINENO" 5
4547    fi
4548
4549# Extract the first word of "cp", so it can be a program name with args.
4550set dummy cp; ac_word=$2
4551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4552$as_echo_n "checking for $ac_word... " >&6; }
4553if ${ac_cv_path_CP+:} false; then :
4554  $as_echo_n "(cached) " >&6
4555else
4556  case $CP in
4557  [\\/]* | ?:[\\/]*)
4558  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4559  ;;
4560  *)
4561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4562for as_dir in $PATH
4563do
4564  IFS=$as_save_IFS
4565  test -z "$as_dir" && as_dir=.
4566    for ac_exec_ext in '' $ac_executable_extensions; do
4567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4568    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4570    break 2
4571  fi
4572done
4573  done
4574IFS=$as_save_IFS
4575
4576  ;;
4577esac
4578fi
4579CP=$ac_cv_path_CP
4580if test -n "$CP"; then
4581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4582$as_echo "$CP" >&6; }
4583else
4584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4585$as_echo "no" >&6; }
4586fi
4587
4588
4589    if test "$CP" = "" ; then
4590       as_fn_error $? "Missing required tool: cp" "$LINENO" 5
4591    fi
4592
4593# Extract the first word of "echo", so it can be a program name with args.
4594set dummy echo; ac_word=$2
4595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4596$as_echo_n "checking for $ac_word... " >&6; }
4597if ${ac_cv_path_ECHO+:} false; then :
4598  $as_echo_n "(cached) " >&6
4599else
4600  case $ECHO in
4601  [\\/]* | ?:[\\/]*)
4602  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4603  ;;
4604  *)
4605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4606for as_dir in $PATH
4607do
4608  IFS=$as_save_IFS
4609  test -z "$as_dir" && as_dir=.
4610    for ac_exec_ext in '' $ac_executable_extensions; do
4611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4612    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4614    break 2
4615  fi
4616done
4617  done
4618IFS=$as_save_IFS
4619
4620  ;;
4621esac
4622fi
4623ECHO=$ac_cv_path_ECHO
4624if test -n "$ECHO"; then
4625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4626$as_echo "$ECHO" >&6; }
4627else
4628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4629$as_echo "no" >&6; }
4630fi
4631
4632
4633    if test "$ECHO" = "" ; then
4634       as_fn_error $? "Missing required tool: echo" "$LINENO" 5
4635    fi
4636
4637# Extract the first word of "ln", so it can be a program name with args.
4638set dummy ln; ac_word=$2
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4640$as_echo_n "checking for $ac_word... " >&6; }
4641if ${ac_cv_path_LN+:} false; then :
4642  $as_echo_n "(cached) " >&6
4643else
4644  case $LN in
4645  [\\/]* | ?:[\\/]*)
4646  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4647  ;;
4648  *)
4649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4650for as_dir in $PATH
4651do
4652  IFS=$as_save_IFS
4653  test -z "$as_dir" && as_dir=.
4654    for ac_exec_ext in '' $ac_executable_extensions; do
4655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4656    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4658    break 2
4659  fi
4660done
4661  done
4662IFS=$as_save_IFS
4663
4664  ;;
4665esac
4666fi
4667LN=$ac_cv_path_LN
4668if test -n "$LN"; then
4669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4670$as_echo "$LN" >&6; }
4671else
4672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4673$as_echo "no" >&6; }
4674fi
4675
4676
4677    if test "$LN" = "" ; then
4678       as_fn_error $? "Missing required tool: ln" "$LINENO" 5
4679    fi
4680
4681# Extract the first word of "sed", so it can be a program name with args.
4682set dummy sed; ac_word=$2
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684$as_echo_n "checking for $ac_word... " >&6; }
4685if ${ac_cv_path_SED+:} false; then :
4686  $as_echo_n "(cached) " >&6
4687else
4688  case $SED in
4689  [\\/]* | ?:[\\/]*)
4690  ac_cv_path_SED="$SED" # Let the user override the test with a path.
4691  ;;
4692  *)
4693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694for as_dir in $PATH
4695do
4696  IFS=$as_save_IFS
4697  test -z "$as_dir" && as_dir=.
4698    for ac_exec_ext in '' $ac_executable_extensions; do
4699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4700    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
4701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4702    break 2
4703  fi
4704done
4705  done
4706IFS=$as_save_IFS
4707
4708  ;;
4709esac
4710fi
4711SED=$ac_cv_path_SED
4712if test -n "$SED"; then
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
4714$as_echo "$SED" >&6; }
4715else
4716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717$as_echo "no" >&6; }
4718fi
4719
4720
4721    if test "$SED" = "" ; then
4722       as_fn_error $? "Missing required tool: sed" "$LINENO" 5
4723    fi
4724
4725if test -n "$ac_tool_prefix"; then
4726  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4727set dummy ${ac_tool_prefix}ar; ac_word=$2
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4729$as_echo_n "checking for $ac_word... " >&6; }
4730if ${ac_cv_prog_AR+:} false; then :
4731  $as_echo_n "(cached) " >&6
4732else
4733  if test -n "$AR"; then
4734  ac_cv_prog_AR="$AR" # Let the user override the test.
4735else
4736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4737for as_dir in $PATH
4738do
4739  IFS=$as_save_IFS
4740  test -z "$as_dir" && as_dir=.
4741    for ac_exec_ext in '' $ac_executable_extensions; do
4742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4743    ac_cv_prog_AR="${ac_tool_prefix}ar"
4744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4745    break 2
4746  fi
4747done
4748  done
4749IFS=$as_save_IFS
4750
4751fi
4752fi
4753AR=$ac_cv_prog_AR
4754if test -n "$AR"; then
4755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4756$as_echo "$AR" >&6; }
4757else
4758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4759$as_echo "no" >&6; }
4760fi
4761
4762
4763fi
4764if test -z "$ac_cv_prog_AR"; then
4765  ac_ct_AR=$AR
4766  # Extract the first word of "ar", so it can be a program name with args.
4767set dummy ar; ac_word=$2
4768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4769$as_echo_n "checking for $ac_word... " >&6; }
4770if ${ac_cv_prog_ac_ct_AR+:} false; then :
4771  $as_echo_n "(cached) " >&6
4772else
4773  if test -n "$ac_ct_AR"; then
4774  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4775else
4776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4777for as_dir in $PATH
4778do
4779  IFS=$as_save_IFS
4780  test -z "$as_dir" && as_dir=.
4781    for ac_exec_ext in '' $ac_executable_extensions; do
4782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4783    ac_cv_prog_ac_ct_AR="ar"
4784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4785    break 2
4786  fi
4787done
4788  done
4789IFS=$as_save_IFS
4790
4791fi
4792fi
4793ac_ct_AR=$ac_cv_prog_ac_ct_AR
4794if test -n "$ac_ct_AR"; then
4795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4796$as_echo "$ac_ct_AR" >&6; }
4797else
4798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4799$as_echo "no" >&6; }
4800fi
4801
4802  if test "x$ac_ct_AR" = x; then
4803    AR=""
4804  else
4805    case $cross_compiling:$ac_tool_warned in
4806yes:)
4807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4809ac_tool_warned=yes ;;
4810esac
4811    AR=$ac_ct_AR
4812  fi
4813else
4814  AR="$ac_cv_prog_AR"
4815fi
4816
4817    if test "$AR" = "" ; then
4818       as_fn_error $? "Missing required tool: ar" "$LINENO" 5
4819    fi
4820
4821# Extract the first word of "mv", so it can be a program name with args.
4822set dummy mv; ac_word=$2
4823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4824$as_echo_n "checking for $ac_word... " >&6; }
4825if ${ac_cv_path_MV+:} false; then :
4826  $as_echo_n "(cached) " >&6
4827else
4828  case $MV in
4829  [\\/]* | ?:[\\/]*)
4830  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4831  ;;
4832  *)
4833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4834for as_dir in $PATH
4835do
4836  IFS=$as_save_IFS
4837  test -z "$as_dir" && as_dir=.
4838    for ac_exec_ext in '' $ac_executable_extensions; do
4839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4840    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4842    break 2
4843  fi
4844done
4845  done
4846IFS=$as_save_IFS
4847
4848  ;;
4849esac
4850fi
4851MV=$ac_cv_path_MV
4852if test -n "$MV"; then
4853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4854$as_echo "$MV" >&6; }
4855else
4856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4857$as_echo "no" >&6; }
4858fi
4859
4860
4861    if test "$MV" = "" ; then
4862       as_fn_error $? "Missing required tool: mv" "$LINENO" 5
4863    fi
4864
4865if test -n "$ac_tool_prefix"; then
4866  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
4867set dummy ${ac_tool_prefix}windres; ac_word=$2
4868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4869$as_echo_n "checking for $ac_word... " >&6; }
4870if ${ac_cv_prog_WINDRES+:} false; then :
4871  $as_echo_n "(cached) " >&6
4872else
4873  if test -n "$WINDRES"; then
4874  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
4875else
4876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4877for as_dir in $PATH
4878do
4879  IFS=$as_save_IFS
4880  test -z "$as_dir" && as_dir=.
4881    for ac_exec_ext in '' $ac_executable_extensions; do
4882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4883    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
4884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4885    break 2
4886  fi
4887done
4888  done
4889IFS=$as_save_IFS
4890
4891fi
4892fi
4893WINDRES=$ac_cv_prog_WINDRES
4894if test -n "$WINDRES"; then
4895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
4896$as_echo "$WINDRES" >&6; }
4897else
4898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4899$as_echo "no" >&6; }
4900fi
4901
4902
4903fi
4904if test -z "$ac_cv_prog_WINDRES"; then
4905  ac_ct_WINDRES=$WINDRES
4906  # Extract the first word of "windres", so it can be a program name with args.
4907set dummy windres; ac_word=$2
4908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4909$as_echo_n "checking for $ac_word... " >&6; }
4910if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
4911  $as_echo_n "(cached) " >&6
4912else
4913  if test -n "$ac_ct_WINDRES"; then
4914  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
4915else
4916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4917for as_dir in $PATH
4918do
4919  IFS=$as_save_IFS
4920  test -z "$as_dir" && as_dir=.
4921    for ac_exec_ext in '' $ac_executable_extensions; do
4922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4923    ac_cv_prog_ac_ct_WINDRES="windres"
4924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4925    break 2
4926  fi
4927done
4928  done
4929IFS=$as_save_IFS
4930
4931fi
4932fi
4933ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
4934if test -n "$ac_ct_WINDRES"; then
4935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
4936$as_echo "$ac_ct_WINDRES" >&6; }
4937else
4938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4939$as_echo "no" >&6; }
4940fi
4941
4942  if test "x$ac_ct_WINDRES" = x; then
4943    WINDRES=""
4944  else
4945    case $cross_compiling:$ac_tool_warned in
4946yes:)
4947{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4948$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4949ac_tool_warned=yes ;;
4950esac
4951    WINDRES=$ac_ct_WINDRES
4952  fi
4953else
4954  WINDRES="$ac_cv_prog_WINDRES"
4955fi
4956
4957if test -n "$ac_tool_prefix"; then
4958  for ac_prog in strip true
4959  do
4960    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4961set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4963$as_echo_n "checking for $ac_word... " >&6; }
4964if ${ac_cv_prog_STRP+:} false; then :
4965  $as_echo_n "(cached) " >&6
4966else
4967  if test -n "$STRP"; then
4968  ac_cv_prog_STRP="$STRP" # Let the user override the test.
4969else
4970as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4971for as_dir in $PATH
4972do
4973  IFS=$as_save_IFS
4974  test -z "$as_dir" && as_dir=.
4975    for ac_exec_ext in '' $ac_executable_extensions; do
4976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4977    ac_cv_prog_STRP="$ac_tool_prefix$ac_prog"
4978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4979    break 2
4980  fi
4981done
4982  done
4983IFS=$as_save_IFS
4984
4985fi
4986fi
4987STRP=$ac_cv_prog_STRP
4988if test -n "$STRP"; then
4989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRP" >&5
4990$as_echo "$STRP" >&6; }
4991else
4992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4993$as_echo "no" >&6; }
4994fi
4995
4996
4997    test -n "$STRP" && break
4998  done
4999fi
5000if test -z "$STRP"; then
5001  ac_ct_STRP=$STRP
5002  for ac_prog in strip true
5003do
5004  # Extract the first word of "$ac_prog", so it can be a program name with args.
5005set dummy $ac_prog; ac_word=$2
5006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5007$as_echo_n "checking for $ac_word... " >&6; }
5008if ${ac_cv_prog_ac_ct_STRP+:} false; then :
5009  $as_echo_n "(cached) " >&6
5010else
5011  if test -n "$ac_ct_STRP"; then
5012  ac_cv_prog_ac_ct_STRP="$ac_ct_STRP" # Let the user override the test.
5013else
5014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5015for as_dir in $PATH
5016do
5017  IFS=$as_save_IFS
5018  test -z "$as_dir" && as_dir=.
5019    for ac_exec_ext in '' $ac_executable_extensions; do
5020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5021    ac_cv_prog_ac_ct_STRP="$ac_prog"
5022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5023    break 2
5024  fi
5025done
5026  done
5027IFS=$as_save_IFS
5028
5029fi
5030fi
5031ac_ct_STRP=$ac_cv_prog_ac_ct_STRP
5032if test -n "$ac_ct_STRP"; then
5033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRP" >&5
5034$as_echo "$ac_ct_STRP" >&6; }
5035else
5036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5037$as_echo "no" >&6; }
5038fi
5039
5040
5041  test -n "$ac_ct_STRP" && break
5042done
5043
5044  if test "x$ac_ct_STRP" = x; then
5045    STRP=""
5046  else
5047    case $cross_compiling:$ac_tool_warned in
5048yes:)
5049{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5050$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5051ac_tool_warned=yes ;;
5052esac
5053    STRP=$ac_ct_STRP
5054  fi
5055fi
5056
5057
5058# Extract the first word of "rst2html", so it can be a program name with args.
5059set dummy rst2html; ac_word=$2
5060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061$as_echo_n "checking for $ac_word... " >&6; }
5062if ${ac_cv_path_RST2HTML+:} false; then :
5063  $as_echo_n "(cached) " >&6
5064else
5065  case $RST2HTML in
5066  [\\/]* | ?:[\\/]*)
5067  ac_cv_path_RST2HTML="$RST2HTML" # Let the user override the test with a path.
5068  ;;
5069  *)
5070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071for as_dir in $PATH
5072do
5073  IFS=$as_save_IFS
5074  test -z "$as_dir" && as_dir=.
5075    for ac_exec_ext in '' $ac_executable_extensions; do
5076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5077    ac_cv_path_RST2HTML="$as_dir/$ac_word$ac_exec_ext"
5078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5079    break 2
5080  fi
5081done
5082  done
5083IFS=$as_save_IFS
5084
5085  ;;
5086esac
5087fi
5088RST2HTML=$ac_cv_path_RST2HTML
5089if test -n "$RST2HTML"; then
5090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RST2HTML" >&5
5091$as_echo "$RST2HTML" >&6; }
5092else
5093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094$as_echo "no" >&6; }
5095fi
5096
5097
5098# Extract the first word of "rst2html.py", so it can be a program name with args.
5099set dummy rst2html.py; ac_word=$2
5100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101$as_echo_n "checking for $ac_word... " >&6; }
5102if ${ac_cv_path_RST2HTML+:} false; then :
5103  $as_echo_n "(cached) " >&6
5104else
5105  case $RST2HTML in
5106  [\\/]* | ?:[\\/]*)
5107  ac_cv_path_RST2HTML="$RST2HTML" # Let the user override the test with a path.
5108  ;;
5109  *)
5110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113  IFS=$as_save_IFS
5114  test -z "$as_dir" && as_dir=.
5115    for ac_exec_ext in '' $ac_executable_extensions; do
5116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5117    ac_cv_path_RST2HTML="$as_dir/$ac_word$ac_exec_ext"
5118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5119    break 2
5120  fi
5121done
5122  done
5123IFS=$as_save_IFS
5124
5125  ;;
5126esac
5127fi
5128RST2HTML=$ac_cv_path_RST2HTML
5129if test -n "$RST2HTML"; then
5130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RST2HTML" >&5
5131$as_echo "$RST2HTML" >&6; }
5132else
5133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5134$as_echo "no" >&6; }
5135fi
5136
5137
5138# Extract the first word of "rst2pdf", so it can be a program name with args.
5139set dummy rst2pdf; ac_word=$2
5140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5141$as_echo_n "checking for $ac_word... " >&6; }
5142if ${ac_cv_path_RST2PDF+:} false; then :
5143  $as_echo_n "(cached) " >&6
5144else
5145  case $RST2PDF in
5146  [\\/]* | ?:[\\/]*)
5147  ac_cv_path_RST2PDF="$RST2PDF" # Let the user override the test with a path.
5148  ;;
5149  *)
5150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5151for as_dir in $PATH
5152do
5153  IFS=$as_save_IFS
5154  test -z "$as_dir" && as_dir=.
5155    for ac_exec_ext in '' $ac_executable_extensions; do
5156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5157    ac_cv_path_RST2PDF="$as_dir/$ac_word$ac_exec_ext"
5158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5159    break 2
5160  fi
5161done
5162  done
5163IFS=$as_save_IFS
5164
5165  ;;
5166esac
5167fi
5168RST2PDF=$ac_cv_path_RST2PDF
5169if test -n "$RST2PDF"; then
5170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RST2PDF" >&5
5171$as_echo "$RST2PDF" >&6; }
5172else
5173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174$as_echo "no" >&6; }
5175fi
5176
5177
5178
5179# -------------------------------------------------------------------------
5180#  If the user has not set --mandir, we default to /usr/share/man
5181# -------------------------------------------------------------------------
5182if test x$mandir = x'${prefix}/man' ; then
5183   mandir=/usr/share/man
5184fi
5185
5186
5187for ac_func in abort calloc getpid \
5188   rewind signal strerror strncmp \
5189   strncpy vfprintf
5190do :
5191  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5192ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5193if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5194  cat >>confdefs.h <<_ACEOF
5195#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5196_ACEOF
5197
5198else
5199  as_fn_error $? "cannot find required function." "$LINENO" 5
5200
5201fi
5202done
5203
5204
5205for ac_func in snprintf vsnprintf strlcpy strlcat accept4
5206do :
5207  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5208ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5209if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5210  cat >>confdefs.h <<_ACEOF
5211#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5212_ACEOF
5213
5214fi
5215done
5216
5217
5218if test "$host_os" != "mingw32" ; then
5219   for ac_func in fork ioctl kill select setsid tcgetattr
5220
5221do :
5222  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5223ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5224if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5225  cat >>confdefs.h <<_ACEOF
5226#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5227_ACEOF
5228
5229else
5230  as_fn_error $? "cannot find required function." "$LINENO" 5
5231
5232fi
5233done
5234
5235
5236   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syslog" >&5
5237$as_echo_n "checking for syslog... " >&6; }
5238
5239   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5240/* end confdefs.h.  */
5241#include <syslog.h>
5242int
5243main ()
5244{
5245syslog(0, "%s", "test");
5246  ;
5247  return 0;
5248}
5249_ACEOF
5250if ac_fn_c_try_link "$LINENO"; then :
5251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5252$as_echo "yes" >&6; }
5253else
5254  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std_syslog in -lsocket" >&5
5255$as_echo_n "checking for std_syslog in -lsocket... " >&6; }
5256if ${ac_cv_lib_socket_std_syslog+:} false; then :
5257  $as_echo_n "(cached) " >&6
5258else
5259  ac_check_lib_save_LIBS=$LIBS
5260LIBS="-lsocket  $LIBS"
5261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5262/* end confdefs.h.  */
5263
5264/* Override any GCC internal prototype to avoid an error.
5265   Use char because int might match the return type of a GCC
5266   builtin and then its argument prototype would still apply.  */
5267#ifdef __cplusplus
5268extern "C"
5269#endif
5270char std_syslog ();
5271int
5272main ()
5273{
5274return std_syslog ();
5275  ;
5276  return 0;
5277}
5278_ACEOF
5279if ac_fn_c_try_link "$LINENO"; then :
5280  ac_cv_lib_socket_std_syslog=yes
5281else
5282  ac_cv_lib_socket_std_syslog=no
5283fi
5284rm -f core conftest.err conftest.$ac_objext \
5285    conftest$ac_exeext conftest.$ac_ext
5286LIBS=$ac_check_lib_save_LIBS
5287fi
5288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_std_syslog" >&5
5289$as_echo "$ac_cv_lib_socket_std_syslog" >&6; }
5290if test "x$ac_cv_lib_socket_std_syslog" = xyes; then :
5291  cat >>confdefs.h <<_ACEOF
5292#define HAVE_LIBSOCKET 1
5293_ACEOF
5294
5295  LIBS="-lsocket $LIBS"
5296
5297else
5298  as_fn_error $? "cannot find required function." "$LINENO" 5
5299fi
5300
5301      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5302/* end confdefs.h.  */
5303#include <syslog.h>
5304int
5305main ()
5306{
5307syslog(0, "%s", "test");
5308  ;
5309  return 0;
5310}
5311_ACEOF
5312if ac_fn_c_try_link "$LINENO"; then :
5313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5314$as_echo "yes" >&6; }
5315else
5316  as_fn_error $? "cannot find required function." "$LINENO" 5
5317fi
5318rm -f core conftest.err conftest.$ac_objext \
5319    conftest$ac_exeext conftest.$ac_ext
5320
5321fi
5322rm -f core conftest.err conftest.$ac_objext \
5323    conftest$ac_exeext conftest.$ac_ext
5324fi
5325
5326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
5327$as_echo_n "checking for library containing nanosleep... " >&6; }
5328if ${ac_cv_search_nanosleep+:} false; then :
5329  $as_echo_n "(cached) " >&6
5330else
5331  ac_func_search_save_LIBS=$LIBS
5332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5333/* end confdefs.h.  */
5334
5335/* Override any GCC internal prototype to avoid an error.
5336   Use char because int might match the return type of a GCC
5337   builtin and then its argument prototype would still apply.  */
5338#ifdef __cplusplus
5339extern "C"
5340#endif
5341char nanosleep ();
5342int
5343main ()
5344{
5345return nanosleep ();
5346  ;
5347  return 0;
5348}
5349_ACEOF
5350for ac_lib in '' rt posix4; do
5351  if test -z "$ac_lib"; then
5352    ac_res="none required"
5353  else
5354    ac_res=-l$ac_lib
5355    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5356  fi
5357  if ac_fn_c_try_link "$LINENO"; then :
5358  ac_cv_search_nanosleep=$ac_res
5359fi
5360rm -f core conftest.err conftest.$ac_objext \
5361    conftest$ac_exeext
5362  if ${ac_cv_search_nanosleep+:} false; then :
5363  break
5364fi
5365done
5366if ${ac_cv_search_nanosleep+:} false; then :
5367
5368else
5369  ac_cv_search_nanosleep=no
5370fi
5371rm conftest.$ac_ext
5372LIBS=$ac_func_search_save_LIBS
5373fi
5374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
5375$as_echo "$ac_cv_search_nanosleep" >&6; }
5376ac_res=$ac_cv_search_nanosleep
5377if test "$ac_res" != no; then :
5378  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5379
5380$as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
5381
5382else
5383  LIBEXTRAOBJ="$LIBEXTRAOBJ nanosleep.c"
5384fi
5385
5386
5387for ac_func in strftime
5388do :
5389  ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
5390if test "x$ac_cv_func_strftime" = xyes; then :
5391  cat >>confdefs.h <<_ACEOF
5392#define HAVE_STRFTIME 1
5393_ACEOF
5394
5395else
5396  # strftime is in -lintl on SCO UNIX.
5397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
5398$as_echo_n "checking for strftime in -lintl... " >&6; }
5399if ${ac_cv_lib_intl_strftime+:} false; then :
5400  $as_echo_n "(cached) " >&6
5401else
5402  ac_check_lib_save_LIBS=$LIBS
5403LIBS="-lintl  $LIBS"
5404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5405/* end confdefs.h.  */
5406
5407/* Override any GCC internal prototype to avoid an error.
5408   Use char because int might match the return type of a GCC
5409   builtin and then its argument prototype would still apply.  */
5410#ifdef __cplusplus
5411extern "C"
5412#endif
5413char strftime ();
5414int
5415main ()
5416{
5417return strftime ();
5418  ;
5419  return 0;
5420}
5421_ACEOF
5422if ac_fn_c_try_link "$LINENO"; then :
5423  ac_cv_lib_intl_strftime=yes
5424else
5425  ac_cv_lib_intl_strftime=no
5426fi
5427rm -f core conftest.err conftest.$ac_objext \
5428    conftest$ac_exeext conftest.$ac_ext
5429LIBS=$ac_check_lib_save_LIBS
5430fi
5431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
5432$as_echo "$ac_cv_lib_intl_strftime" >&6; }
5433if test "x$ac_cv_lib_intl_strftime" = xyes; then :
5434  $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
5435
5436LIBS="-lintl $LIBS"
5437fi
5438
5439fi
5440done
5441
5442# Under sysV68, socket and friends are provided by the C library.
5443# -linet does not provide socket, but causes multiple definition
5444# errors at link-time.  It is thus better to only use the C library.
5445# So don't add -linet to the link list unless it's necessary
5446#
5447# With Solaris socket and friends seem not to be in C library.
5448# I hope that if socket is found, all the BSD friends are in the same library
5449#
5450# - RF
5451#
5452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
5453$as_echo_n "checking for library containing socket... " >&6; }
5454if ${ac_cv_search_socket+:} false; then :
5455  $as_echo_n "(cached) " >&6
5456else
5457  ac_func_search_save_LIBS=$LIBS
5458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5459/* end confdefs.h.  */
5460
5461/* Override any GCC internal prototype to avoid an error.
5462   Use char because int might match the return type of a GCC
5463   builtin and then its argument prototype would still apply.  */
5464#ifdef __cplusplus
5465extern "C"
5466#endif
5467char socket ();
5468int
5469main ()
5470{
5471return socket ();
5472  ;
5473  return 0;
5474}
5475_ACEOF
5476for ac_lib in '' xnet socket inet; do
5477  if test -z "$ac_lib"; then
5478    ac_res="none required"
5479  else
5480    ac_res=-l$ac_lib
5481    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5482  fi
5483  if ac_fn_c_try_link "$LINENO"; then :
5484  ac_cv_search_socket=$ac_res
5485fi
5486rm -f core conftest.err conftest.$ac_objext \
5487    conftest$ac_exeext
5488  if ${ac_cv_search_socket+:} false; then :
5489  break
5490fi
5491done
5492if ${ac_cv_search_socket+:} false; then :
5493
5494else
5495  ac_cv_search_socket=no
5496fi
5497rm conftest.$ac_ext
5498LIBS=$ac_func_search_save_LIBS
5499fi
5500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
5501$as_echo "$ac_cv_search_socket" >&6; }
5502ac_res=$ac_cv_search_socket
5503if test "$ac_res" != no; then :
5504  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5505
5506fi
5507
5508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostname" >&5
5509$as_echo_n "checking for library containing gethostname... " >&6; }
5510if ${ac_cv_search_gethostname+:} false; then :
5511  $as_echo_n "(cached) " >&6
5512else
5513  ac_func_search_save_LIBS=$LIBS
5514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5515/* end confdefs.h.  */
5516
5517/* Override any GCC internal prototype to avoid an error.
5518   Use char because int might match the return type of a GCC
5519   builtin and then its argument prototype would still apply.  */
5520#ifdef __cplusplus
5521extern "C"
5522#endif
5523char gethostname ();
5524int
5525main ()
5526{
5527return gethostname ();
5528  ;
5529  return 0;
5530}
5531_ACEOF
5532for ac_lib in '' xnet socket inet; do
5533  if test -z "$ac_lib"; then
5534    ac_res="none required"
5535  else
5536    ac_res=-l$ac_lib
5537    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5538  fi
5539  if ac_fn_c_try_link "$LINENO"; then :
5540  ac_cv_search_gethostname=$ac_res
5541fi
5542rm -f core conftest.err conftest.$ac_objext \
5543    conftest$ac_exeext
5544  if ${ac_cv_search_gethostname+:} false; then :
5545  break
5546fi
5547done
5548if ${ac_cv_search_gethostname+:} false; then :
5549
5550else
5551  ac_cv_search_gethostname=no
5552fi
5553rm conftest.$ac_ext
5554LIBS=$ac_func_search_save_LIBS
5555fi
5556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostname" >&5
5557$as_echo "$ac_cv_search_gethostname" >&6; }
5558ac_res=$ac_cv_search_gethostname
5559if test "$ac_res" != no; then :
5560  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5561
5562fi
5563
5564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
5565$as_echo_n "checking for library containing gethostbyname... " >&6; }
5566if ${ac_cv_search_gethostbyname+:} false; then :
5567  $as_echo_n "(cached) " >&6
5568else
5569  ac_func_search_save_LIBS=$LIBS
5570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5571/* end confdefs.h.  */
5572
5573/* Override any GCC internal prototype to avoid an error.
5574   Use char because int might match the return type of a GCC
5575   builtin and then its argument prototype would still apply.  */
5576#ifdef __cplusplus
5577extern "C"
5578#endif
5579char gethostbyname ();
5580int
5581main ()
5582{
5583return gethostbyname ();
5584  ;
5585  return 0;
5586}
5587_ACEOF
5588for ac_lib in '' nsl resolv; do
5589  if test -z "$ac_lib"; then
5590    ac_res="none required"
5591  else
5592    ac_res=-l$ac_lib
5593    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5594  fi
5595  if ac_fn_c_try_link "$LINENO"; then :
5596  ac_cv_search_gethostbyname=$ac_res
5597fi
5598rm -f core conftest.err conftest.$ac_objext \
5599    conftest$ac_exeext
5600  if ${ac_cv_search_gethostbyname+:} false; then :
5601  break
5602fi
5603done
5604if ${ac_cv_search_gethostbyname+:} false; then :
5605
5606else
5607  ac_cv_search_gethostbyname=no
5608fi
5609rm conftest.$ac_ext
5610LIBS=$ac_func_search_save_LIBS
5611fi
5612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
5613$as_echo "$ac_cv_search_gethostbyname" >&6; }
5614ac_res=$ac_cv_search_gethostbyname
5615if test "$ac_res" != no; then :
5616  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5617
5618fi
5619
5620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
5621$as_echo_n "checking for library containing gethostbyname_r... " >&6; }
5622if ${ac_cv_search_gethostbyname_r+:} false; then :
5623  $as_echo_n "(cached) " >&6
5624else
5625  ac_func_search_save_LIBS=$LIBS
5626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5627/* end confdefs.h.  */
5628
5629/* Override any GCC internal prototype to avoid an error.
5630   Use char because int might match the return type of a GCC
5631   builtin and then its argument prototype would still apply.  */
5632#ifdef __cplusplus
5633extern "C"
5634#endif
5635char gethostbyname_r ();
5636int
5637main ()
5638{
5639return gethostbyname_r ();
5640  ;
5641  return 0;
5642}
5643_ACEOF
5644for ac_lib in '' nsl resolv; do
5645  if test -z "$ac_lib"; then
5646    ac_res="none required"
5647  else
5648    ac_res=-l$ac_lib
5649    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5650  fi
5651  if ac_fn_c_try_link "$LINENO"; then :
5652  ac_cv_search_gethostbyname_r=$ac_res
5653fi
5654rm -f core conftest.err conftest.$ac_objext \
5655    conftest$ac_exeext
5656  if ${ac_cv_search_gethostbyname_r+:} false; then :
5657  break
5658fi
5659done
5660if ${ac_cv_search_gethostbyname_r+:} false; then :
5661
5662else
5663  ac_cv_search_gethostbyname_r=no
5664fi
5665rm conftest.$ac_ext
5666LIBS=$ac_func_search_save_LIBS
5667fi
5668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
5669$as_echo "$ac_cv_search_gethostbyname_r" >&6; }
5670ac_res=$ac_cv_search_gethostbyname_r
5671if test "$ac_res" != no; then :
5672  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5673
5674fi
5675
5676
5677# The condition in this test copes with the presence of inet_addr in libc6.
5678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_addr" >&5
5679$as_echo_n "checking for library containing inet_addr... " >&6; }
5680if ${ac_cv_search_inet_addr+:} false; then :
5681  $as_echo_n "(cached) " >&6
5682else
5683  ac_func_search_save_LIBS=$LIBS
5684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5685/* end confdefs.h.  */
5686
5687/* Override any GCC internal prototype to avoid an error.
5688   Use char because int might match the return type of a GCC
5689   builtin and then its argument prototype would still apply.  */
5690#ifdef __cplusplus
5691extern "C"
5692#endif
5693char inet_addr ();
5694int
5695main ()
5696{
5697return inet_addr ();
5698  ;
5699  return 0;
5700}
5701_ACEOF
5702for ac_lib in '' nsl; do
5703  if test -z "$ac_lib"; then
5704    ac_res="none required"
5705  else
5706    ac_res=-l$ac_lib
5707    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5708  fi
5709  if ac_fn_c_try_link "$LINENO"; then :
5710  ac_cv_search_inet_addr=$ac_res
5711fi
5712rm -f core conftest.err conftest.$ac_objext \
5713    conftest$ac_exeext
5714  if ${ac_cv_search_inet_addr+:} false; then :
5715  break
5716fi
5717done
5718if ${ac_cv_search_inet_addr+:} false; then :
5719
5720else
5721  ac_cv_search_inet_addr=no
5722fi
5723rm conftest.$ac_ext
5724LIBS=$ac_func_search_save_LIBS
5725fi
5726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_addr" >&5
5727$as_echo "$ac_cv_search_inet_addr" >&6; }
5728ac_res=$ac_cv_search_inet_addr
5729if test "$ac_res" != no; then :
5730  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5731
5732fi
5733
5734
5735ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
5736if test "x$ac_cv_func_strchr" = xyes; then :
5737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: using libc's strchr" >&5
5738$as_echo "using libc's strchr" >&6; }
5739else
5740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strchr in -lcposix" >&5
5741$as_echo_n "checking for strchr in -lcposix... " >&6; }
5742if ${ac_cv_lib_cposix_strchr+:} false; then :
5743  $as_echo_n "(cached) " >&6
5744else
5745  ac_check_lib_save_LIBS=$LIBS
5746LIBS="-lcposix  $LIBS"
5747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5748/* end confdefs.h.  */
5749
5750/* Override any GCC internal prototype to avoid an error.
5751   Use char because int might match the return type of a GCC
5752   builtin and then its argument prototype would still apply.  */
5753#ifdef __cplusplus
5754extern "C"
5755#endif
5756char strchr ();
5757int
5758main ()
5759{
5760return strchr ();
5761  ;
5762  return 0;
5763}
5764_ACEOF
5765if ac_fn_c_try_link "$LINENO"; then :
5766  ac_cv_lib_cposix_strchr=yes
5767else
5768  ac_cv_lib_cposix_strchr=no
5769fi
5770rm -f core conftest.err conftest.$ac_objext \
5771    conftest$ac_exeext conftest.$ac_ext
5772LIBS=$ac_check_lib_save_LIBS
5773fi
5774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cposix_strchr" >&5
5775$as_echo "$ac_cv_lib_cposix_strchr" >&6; }
5776if test "x$ac_cv_lib_cposix_strchr" = xyes; then :
5777  EXTRADEFS="$EXTRADEFS -D_SYSV3"
5778    LIBS="$LIBS -lcposix"
5779fi
5780
5781fi
5782
5783
5784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
5785$as_echo_n "checking for sqrt in -lm... " >&6; }
5786if ${ac_cv_lib_m_sqrt+:} false; then :
5787  $as_echo_n "(cached) " >&6
5788else
5789  ac_check_lib_save_LIBS=$LIBS
5790LIBS="-lm  $LIBS"
5791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5792/* end confdefs.h.  */
5793
5794/* Override any GCC internal prototype to avoid an error.
5795   Use char because int might match the return type of a GCC
5796   builtin and then its argument prototype would still apply.  */
5797#ifdef __cplusplus
5798extern "C"
5799#endif
5800char sqrt ();
5801int
5802main ()
5803{
5804return sqrt ();
5805  ;
5806  return 0;
5807}
5808_ACEOF
5809if ac_fn_c_try_link "$LINENO"; then :
5810  ac_cv_lib_m_sqrt=yes
5811else
5812  ac_cv_lib_m_sqrt=no
5813fi
5814rm -f core conftest.err conftest.$ac_objext \
5815    conftest$ac_exeext conftest.$ac_ext
5816LIBS=$ac_check_lib_save_LIBS
5817fi
5818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
5819$as_echo "$ac_cv_lib_m_sqrt" >&6; }
5820if test "x$ac_cv_lib_m_sqrt" = xyes; then :
5821
5822$as_echo "#define HAVE_LIBM 1" >>confdefs.h
5823 LIBS="$LIBS -lm"
5824else
5825  as_fn_error $? "*** Missing working libm math lib ***" "$LINENO" 5
5826
5827fi
5828
5829
5830ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
5831if test "x$ac_cv_func_strstr" = xyes; then :
5832
5833$as_echo "#define HAVE_STRSTR /**/" >>confdefs.h
5834
5835else
5836  LIBEXTRAOBJ="$LIBEXTRAOBJ strstr.c"
5837fi
5838
5839
5840ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
5841if test "x$ac_cv_func_strcasecmp" = xyes; then :
5842
5843$as_echo "#define HAVE_STRCASECMP /**/" >>confdefs.h
5844
5845else
5846  LIBEXTRAOBJ="$LIBEXTRAOBJ strcasecmp.c"
5847fi
5848
5849
5850ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
5851if test "x$ac_cv_func_memmove" = xyes; then :
5852
5853$as_echo "#define HAVE_MEMMOVE /**/" >>confdefs.h
5854
5855else
5856  LIBEXTRAOBJ="$LIBEXTRAOBJ memmove.c"
5857fi
5858
5859
5860ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
5861if test "x$ac_cv_func_getopt_long" = xyes; then :
5862
5863$as_echo "#define HAVE_GETOPTLONG /**/" >>confdefs.h
5864
5865else
5866  LIBEXTRAOBJ="$LIBEXTRAOBJ getopt.c getopt1.c"
5867fi
5868
5869
5870ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
5871if test "x$ac_cv_func_inet_pton" = xyes; then :
5872
5873$as_echo "#define HAVE_INETPTON /**/" >>confdefs.h
5874
5875else
5876  LIBEXTRAOBJ="$LIBEXTRAOBJ inet_pton.c"
5877fi
5878
5879
5880ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
5881if test "x$ac_cv_func_localtime_r" = xyes; then :
5882
5883$as_echo "#define HAVE_LOCALTIME_R /**/" >>confdefs.h
5884
5885else
5886  LIBEXTRAOBJ="$LIBEXTRAOBJ localtime_r.c"
5887fi
5888
5889
5890
5891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5892$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5893if ${ac_cv_path_GREP+:} false; then :
5894  $as_echo_n "(cached) " >&6
5895else
5896  if test -z "$GREP"; then
5897  ac_path_GREP_found=false
5898  # Loop through the user's path and test for each of PROGNAME-LIST
5899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5900for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5901do
5902  IFS=$as_save_IFS
5903  test -z "$as_dir" && as_dir=.
5904    for ac_prog in grep ggrep; do
5905    for ac_exec_ext in '' $ac_executable_extensions; do
5906      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5907      as_fn_executable_p "$ac_path_GREP" || continue
5908# Check for GNU ac_path_GREP and select it if it is found.
5909  # Check for GNU $ac_path_GREP
5910case `"$ac_path_GREP" --version 2>&1` in
5911*GNU*)
5912  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5913*)
5914  ac_count=0
5915  $as_echo_n 0123456789 >"conftest.in"
5916  while :
5917  do
5918    cat "conftest.in" "conftest.in" >"conftest.tmp"
5919    mv "conftest.tmp" "conftest.in"
5920    cp "conftest.in" "conftest.nl"
5921    $as_echo 'GREP' >> "conftest.nl"
5922    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5923    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5924    as_fn_arith $ac_count + 1 && ac_count=$as_val
5925    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5926      # Best one so far, save it but keep looking for a better one
5927      ac_cv_path_GREP="$ac_path_GREP"
5928      ac_path_GREP_max=$ac_count
5929    fi
5930    # 10*(2^10) chars as input seems more than enough
5931    test $ac_count -gt 10 && break
5932  done
5933  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5934esac
5935
5936      $ac_path_GREP_found && break 3
5937    done
5938  done
5939  done
5940IFS=$as_save_IFS
5941  if test -z "$ac_cv_path_GREP"; then
5942    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5943  fi
5944else
5945  ac_cv_path_GREP=$GREP
5946fi
5947
5948fi
5949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5950$as_echo "$ac_cv_path_GREP" >&6; }
5951 GREP="$ac_cv_path_GREP"
5952
5953
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5955$as_echo_n "checking for egrep... " >&6; }
5956if ${ac_cv_path_EGREP+:} false; then :
5957  $as_echo_n "(cached) " >&6
5958else
5959  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5960   then ac_cv_path_EGREP="$GREP -E"
5961   else
5962     if test -z "$EGREP"; then
5963  ac_path_EGREP_found=false
5964  # Loop through the user's path and test for each of PROGNAME-LIST
5965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5967do
5968  IFS=$as_save_IFS
5969  test -z "$as_dir" && as_dir=.
5970    for ac_prog in egrep; do
5971    for ac_exec_ext in '' $ac_executable_extensions; do
5972      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5973      as_fn_executable_p "$ac_path_EGREP" || continue
5974# Check for GNU ac_path_EGREP and select it if it is found.
5975  # Check for GNU $ac_path_EGREP
5976case `"$ac_path_EGREP" --version 2>&1` in
5977*GNU*)
5978  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5979*)
5980  ac_count=0
5981  $as_echo_n 0123456789 >"conftest.in"
5982  while :
5983  do
5984    cat "conftest.in" "conftest.in" >"conftest.tmp"
5985    mv "conftest.tmp" "conftest.in"
5986    cp "conftest.in" "conftest.nl"
5987    $as_echo 'EGREP' >> "conftest.nl"
5988    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5989    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5990    as_fn_arith $ac_count + 1 && ac_count=$as_val
5991    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5992      # Best one so far, save it but keep looking for a better one
5993      ac_cv_path_EGREP="$ac_path_EGREP"
5994      ac_path_EGREP_max=$ac_count
5995    fi
5996    # 10*(2^10) chars as input seems more than enough
5997    test $ac_count -gt 10 && break
5998  done
5999  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6000esac
6001
6002      $ac_path_EGREP_found && break 3
6003    done
6004  done
6005  done
6006IFS=$as_save_IFS
6007  if test -z "$ac_cv_path_EGREP"; then
6008    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6009  fi
6010else
6011  ac_cv_path_EGREP=$EGREP
6012fi
6013
6014   fi
6015fi
6016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6017$as_echo "$ac_cv_path_EGREP" >&6; }
6018 EGREP="$ac_cv_path_EGREP"
6019
6020
6021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6022$as_echo_n "checking for ANSI C header files... " >&6; }
6023if ${ac_cv_header_stdc+:} false; then :
6024  $as_echo_n "(cached) " >&6
6025else
6026  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6027/* end confdefs.h.  */
6028#include <stdlib.h>
6029#include <stdarg.h>
6030#include <string.h>
6031#include <float.h>
6032
6033int
6034main ()
6035{
6036
6037  ;
6038  return 0;
6039}
6040_ACEOF
6041if ac_fn_c_try_compile "$LINENO"; then :
6042  ac_cv_header_stdc=yes
6043else
6044  ac_cv_header_stdc=no
6045fi
6046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6047
6048if test $ac_cv_header_stdc = yes; then
6049  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6051/* end confdefs.h.  */
6052#include <string.h>
6053
6054_ACEOF
6055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6056  $EGREP "memchr" >/dev/null 2>&1; then :
6057
6058else
6059  ac_cv_header_stdc=no
6060fi
6061rm -f conftest*
6062
6063fi
6064
6065if test $ac_cv_header_stdc = yes; then
6066  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6067  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6068/* end confdefs.h.  */
6069#include <stdlib.h>
6070
6071_ACEOF
6072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6073  $EGREP "free" >/dev/null 2>&1; then :
6074
6075else
6076  ac_cv_header_stdc=no
6077fi
6078rm -f conftest*
6079
6080fi
6081
6082if test $ac_cv_header_stdc = yes; then
6083  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6084  if test "$cross_compiling" = yes; then :
6085  :
6086else
6087  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6088/* end confdefs.h.  */
6089#include <ctype.h>
6090#include <stdlib.h>
6091#if ((' ' & 0x0FF) == 0x020)
6092# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6093# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6094#else
6095# define ISLOWER(c) \
6096		   (('a' <= (c) && (c) <= 'i') \
6097		     || ('j' <= (c) && (c) <= 'r') \
6098		     || ('s' <= (c) && (c) <= 'z'))
6099# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6100#endif
6101
6102#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6103int
6104main ()
6105{
6106  int i;
6107  for (i = 0; i < 256; i++)
6108    if (XOR (islower (i), ISLOWER (i))
6109	|| toupper (i) != TOUPPER (i))
6110      return 2;
6111  return 0;
6112}
6113_ACEOF
6114if ac_fn_c_try_run "$LINENO"; then :
6115
6116else
6117  ac_cv_header_stdc=no
6118fi
6119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6120  conftest.$ac_objext conftest.beam conftest.$ac_ext
6121fi
6122
6123fi
6124fi
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6126$as_echo "$ac_cv_header_stdc" >&6; }
6127if test $ac_cv_header_stdc = yes; then
6128
6129$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6130
6131fi
6132
6133# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6134for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6135		  inttypes.h stdint.h unistd.h
6136do :
6137  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6138ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6139"
6140if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6141  cat >>confdefs.h <<_ACEOF
6142#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6143_ACEOF
6144
6145fi
6146
6147done
6148
6149
6150for ac_header in arpa/inet.h ctype.h errno.h fcntl.h \
6151   limits.h netdb.h netinet/in.h signal.h \
6152   stdarg.h stdio.h stdlib.h string.h strings.h sys/ioctl.h \
6153   sys/socket.h sys/types.h syslog.h termios.h \
6154   unistd.h
6155
6156do :
6157  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6158ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6159if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6160  cat >>confdefs.h <<_ACEOF
6161#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6162_ACEOF
6163
6164else
6165  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: at least 1 header file is missing. This may not compile." >&5
6166$as_echo "$as_me: WARNING: at least 1 header file is missing. This may not compile." >&2;}
6167fi
6168
6169done
6170
6171
6172for ac_header in arpa/nameser.h
6173do :
6174  ac_fn_c_check_header_mongrel "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "$ac_includes_default"
6175if test "x$ac_cv_header_arpa_nameser_h" = xyes; then :
6176  cat >>confdefs.h <<_ACEOF
6177#define HAVE_ARPA_NAMESER_H 1
6178_ACEOF
6179
6180$as_echo "#define HAVE_NAMESER_H /**/" >>confdefs.h
6181
6182fi
6183
6184done
6185
6186
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
6188$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
6189if ${ac_cv_header_stat_broken+:} false; then :
6190  $as_echo_n "(cached) " >&6
6191else
6192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6193/* end confdefs.h.  */
6194#include <sys/types.h>
6195#include <sys/stat.h>
6196
6197#if defined S_ISBLK && defined S_IFDIR
6198extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
6199#endif
6200
6201#if defined S_ISBLK && defined S_IFCHR
6202extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
6203#endif
6204
6205#if defined S_ISLNK && defined S_IFREG
6206extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
6207#endif
6208
6209#if defined S_ISSOCK && defined S_IFREG
6210extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
6211#endif
6212
6213_ACEOF
6214if ac_fn_c_try_compile "$LINENO"; then :
6215  ac_cv_header_stat_broken=no
6216else
6217  ac_cv_header_stat_broken=yes
6218fi
6219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6220fi
6221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
6222$as_echo "$ac_cv_header_stat_broken" >&6; }
6223if test $ac_cv_header_stat_broken = yes; then
6224
6225$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
6226
6227fi
6228       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
6229$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
6230if ${ac_cv_header_time+:} false; then :
6231  $as_echo_n "(cached) " >&6
6232else
6233  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6234/* end confdefs.h.  */
6235#include <sys/types.h>
6236#include <sys/time.h>
6237#include <time.h>
6238
6239int
6240main ()
6241{
6242if ((struct tm *) 0)
6243return 0;
6244  ;
6245  return 0;
6246}
6247_ACEOF
6248if ac_fn_c_try_compile "$LINENO"; then :
6249  ac_cv_header_time=yes
6250else
6251  ac_cv_header_time=no
6252fi
6253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6254fi
6255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
6256$as_echo "$ac_cv_header_time" >&6; }
6257if test $ac_cv_header_time = yes; then
6258
6259$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
6260
6261fi
6262       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
6263$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
6264if ${ac_cv_header_sys_wait_h+:} false; then :
6265  $as_echo_n "(cached) " >&6
6266else
6267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6268/* end confdefs.h.  */
6269#include <sys/types.h>
6270#include <sys/wait.h>
6271#ifndef WEXITSTATUS
6272# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
6273#endif
6274#ifndef WIFEXITED
6275# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6276#endif
6277
6278int
6279main ()
6280{
6281  int s;
6282  wait (&s);
6283  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6284  ;
6285  return 0;
6286}
6287_ACEOF
6288if ac_fn_c_try_compile "$LINENO"; then :
6289  ac_cv_header_sys_wait_h=yes
6290else
6291  ac_cv_header_sys_wait_h=no
6292fi
6293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6294fi
6295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
6296$as_echo "$ac_cv_header_sys_wait_h" >&6; }
6297if test $ac_cv_header_sys_wait_h = yes; then
6298
6299$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
6300
6301fi
6302
6303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
6304$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
6305if ${ac_cv_struct_tm+:} false; then :
6306  $as_echo_n "(cached) " >&6
6307else
6308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6309/* end confdefs.h.  */
6310#include <sys/types.h>
6311#include <time.h>
6312
6313int
6314main ()
6315{
6316struct tm tm;
6317				     int *p = &tm.tm_sec;
6318				     return !p;
6319  ;
6320  return 0;
6321}
6322_ACEOF
6323if ac_fn_c_try_compile "$LINENO"; then :
6324  ac_cv_struct_tm=time.h
6325else
6326  ac_cv_struct_tm=sys/time.h
6327fi
6328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6329fi
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
6331$as_echo "$ac_cv_struct_tm" >&6; }
6332if test $ac_cv_struct_tm = sys/time.h; then
6333
6334$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
6335
6336fi
6337         ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
6338#include <$ac_cv_struct_tm>
6339
6340"
6341if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
6342
6343cat >>confdefs.h <<_ACEOF
6344#define HAVE_STRUCT_TM_TM_ZONE 1
6345_ACEOF
6346
6347
6348fi
6349
6350if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
6351
6352$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
6353
6354else
6355  ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
6356"
6357if test "x$ac_cv_have_decl_tzname" = xyes; then :
6358  ac_have_decl=1
6359else
6360  ac_have_decl=0
6361fi
6362
6363cat >>confdefs.h <<_ACEOF
6364#define HAVE_DECL_TZNAME $ac_have_decl
6365_ACEOF
6366
6367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
6368$as_echo_n "checking for tzname... " >&6; }
6369if ${ac_cv_var_tzname+:} false; then :
6370  $as_echo_n "(cached) " >&6
6371else
6372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6373/* end confdefs.h.  */
6374#include <time.h>
6375#if !HAVE_DECL_TZNAME
6376extern char *tzname[];
6377#endif
6378
6379int
6380main ()
6381{
6382return tzname[0][0];
6383  ;
6384  return 0;
6385}
6386_ACEOF
6387if ac_fn_c_try_link "$LINENO"; then :
6388  ac_cv_var_tzname=yes
6389else
6390  ac_cv_var_tzname=no
6391fi
6392rm -f core conftest.err conftest.$ac_objext \
6393    conftest$ac_exeext conftest.$ac_ext
6394fi
6395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
6396$as_echo "$ac_cv_var_tzname" >&6; }
6397  if test $ac_cv_var_tzname = yes; then
6398
6399$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
6400
6401  fi
6402fi
6403
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6405$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6406if ${ac_cv_type_uid_t+:} false; then :
6407  $as_echo_n "(cached) " >&6
6408else
6409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6410/* end confdefs.h.  */
6411#include <sys/types.h>
6412
6413_ACEOF
6414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6415  $EGREP "uid_t" >/dev/null 2>&1; then :
6416  ac_cv_type_uid_t=yes
6417else
6418  ac_cv_type_uid_t=no
6419fi
6420rm -f conftest*
6421
6422fi
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6424$as_echo "$ac_cv_type_uid_t" >&6; }
6425if test $ac_cv_type_uid_t = no; then
6426
6427$as_echo "#define uid_t int" >>confdefs.h
6428
6429
6430$as_echo "#define gid_t int" >>confdefs.h
6431
6432fi
6433
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
6435$as_echo_n "checking type of array argument to getgroups... " >&6; }
6436if ${ac_cv_type_getgroups+:} false; then :
6437  $as_echo_n "(cached) " >&6
6438else
6439  if test "$cross_compiling" = yes; then :
6440  ac_cv_type_getgroups=cross
6441else
6442  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6443/* end confdefs.h.  */
6444/* Thanks to Mike Rendell for this test.  */
6445$ac_includes_default
6446#define NGID 256
6447#undef MAX
6448#define MAX(x, y) ((x) > (y) ? (x) : (y))
6449
6450int
6451main ()
6452{
6453  gid_t gidset[NGID];
6454  int i, n;
6455  union { gid_t gval; long int lval; }  val;
6456
6457  val.lval = -1;
6458  for (i = 0; i < NGID; i++)
6459    gidset[i] = val.gval;
6460  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
6461		 gidset);
6462  /* Exit non-zero if getgroups seems to require an array of ints.  This
6463     happens when gid_t is short int but getgroups modifies an array
6464     of ints.  */
6465  return n > 0 && gidset[n] != val.gval;
6466}
6467_ACEOF
6468if ac_fn_c_try_run "$LINENO"; then :
6469  ac_cv_type_getgroups=gid_t
6470else
6471  ac_cv_type_getgroups=int
6472fi
6473rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6474  conftest.$ac_objext conftest.beam conftest.$ac_ext
6475fi
6476
6477if test $ac_cv_type_getgroups = cross; then
6478        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479/* end confdefs.h.  */
6480#include <unistd.h>
6481
6482_ACEOF
6483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6484  $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
6485  ac_cv_type_getgroups=gid_t
6486else
6487  ac_cv_type_getgroups=int
6488fi
6489rm -f conftest*
6490
6491fi
6492fi
6493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
6494$as_echo "$ac_cv_type_getgroups" >&6; }
6495
6496cat >>confdefs.h <<_ACEOF
6497#define GETGROUPS_T $ac_cv_type_getgroups
6498_ACEOF
6499
6500
6501ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6502if test "x$ac_cv_type_mode_t" = xyes; then :
6503
6504else
6505
6506cat >>confdefs.h <<_ACEOF
6507#define mode_t int
6508_ACEOF
6509
6510fi
6511
6512ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6513if test "x$ac_cv_type_off_t" = xyes; then :
6514
6515else
6516
6517cat >>confdefs.h <<_ACEOF
6518#define off_t long int
6519_ACEOF
6520
6521fi
6522
6523ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6524if test "x$ac_cv_type_pid_t" = xyes; then :
6525
6526else
6527
6528cat >>confdefs.h <<_ACEOF
6529#define pid_t int
6530_ACEOF
6531
6532fi
6533
6534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
6535$as_echo_n "checking return type of signal handlers... " >&6; }
6536if ${ac_cv_type_signal+:} false; then :
6537  $as_echo_n "(cached) " >&6
6538else
6539  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6540/* end confdefs.h.  */
6541#include <sys/types.h>
6542#include <signal.h>
6543
6544int
6545main ()
6546{
6547return *(signal (0, 0)) (0) == 1;
6548  ;
6549  return 0;
6550}
6551_ACEOF
6552if ac_fn_c_try_compile "$LINENO"; then :
6553  ac_cv_type_signal=int
6554else
6555  ac_cv_type_signal=void
6556fi
6557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6558fi
6559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
6560$as_echo "$ac_cv_type_signal" >&6; }
6561
6562cat >>confdefs.h <<_ACEOF
6563#define RETSIGTYPE $ac_cv_type_signal
6564_ACEOF
6565
6566
6567ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6568if test "x$ac_cv_type_size_t" = xyes; then :
6569
6570else
6571
6572cat >>confdefs.h <<_ACEOF
6573#define size_t unsigned int
6574_ACEOF
6575
6576fi
6577
6578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6579$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6580if ${ac_cv_type_uid_t+:} false; then :
6581  $as_echo_n "(cached) " >&6
6582else
6583  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6584/* end confdefs.h.  */
6585#include <sys/types.h>
6586
6587_ACEOF
6588if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6589  $EGREP "uid_t" >/dev/null 2>&1; then :
6590  ac_cv_type_uid_t=yes
6591else
6592  ac_cv_type_uid_t=no
6593fi
6594rm -f conftest*
6595
6596fi
6597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6598$as_echo "$ac_cv_type_uid_t" >&6; }
6599if test $ac_cv_type_uid_t = no; then
6600
6601$as_echo "#define uid_t int" >>confdefs.h
6602
6603
6604$as_echo "#define gid_t int" >>confdefs.h
6605
6606fi
6607
6608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
6609$as_echo_n "checking for socklen_t... " >&6; }
6610  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6611/* end confdefs.h.  */
6612
6613  #include <sys/types.h>
6614  #include <sys/socket.h>
6615  socklen_t x;
6616
6617int
6618main ()
6619{
6620
6621  ;
6622  return 0;
6623}
6624_ACEOF
6625if ac_fn_c_try_compile "$LINENO"; then :
6626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6627$as_echo "yes" >&6; }
6628else
6629
6630  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6631/* end confdefs.h.  */
6632
6633  #include <sys/types.h>
6634  #include <sys/socket.h>
6635  int accept (int, struct sockaddr *, size_t *);
6636
6637int
6638main ()
6639{
6640
6641  ;
6642  return 0;
6643}
6644_ACEOF
6645if ac_fn_c_try_compile "$LINENO"; then :
6646
6647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: size_t" >&5
6648$as_echo "size_t" >&6; }
6649
6650$as_echo "#define socklen_t size_t" >>confdefs.h
6651
6652else
6653
6654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5
6655$as_echo "int" >&6; }
6656  $as_echo "#define socklen_t int" >>confdefs.h
6657
6658fi
6659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6660fi
6661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6662
6663
6664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
6665$as_echo_n "checking for X... " >&6; }
6666
6667
6668# Check whether --with-x was given.
6669if test "${with_x+set}" = set; then :
6670  withval=$with_x;
6671fi
6672
6673# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6674if test "x$with_x" = xno; then
6675  # The user explicitly disabled X.
6676  have_x=disabled
6677else
6678  case $x_includes,$x_libraries in #(
6679    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
6680    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
6681  $as_echo_n "(cached) " >&6
6682else
6683  # One or both of the vars are not set, and there is no cached value.
6684ac_x_includes=no ac_x_libraries=no
6685rm -f -r conftest.dir
6686if mkdir conftest.dir; then
6687  cd conftest.dir
6688  cat >Imakefile <<'_ACEOF'
6689incroot:
6690	@echo incroot='${INCROOT}'
6691usrlibdir:
6692	@echo usrlibdir='${USRLIBDIR}'
6693libdir:
6694	@echo libdir='${LIBDIR}'
6695_ACEOF
6696  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6697    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6698    for ac_var in incroot usrlibdir libdir; do
6699      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6700    done
6701    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6702    for ac_extension in a so sl dylib la dll; do
6703      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6704	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
6705	ac_im_usrlibdir=$ac_im_libdir; break
6706      fi
6707    done
6708    # Screen out bogus values from the imake configuration.  They are
6709    # bogus both because they are the default anyway, and because
6710    # using them would break gcc on systems where it needs fixed includes.
6711    case $ac_im_incroot in
6712	/usr/include) ac_x_includes= ;;
6713	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6714    esac
6715    case $ac_im_usrlibdir in
6716	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
6717	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6718    esac
6719  fi
6720  cd ..
6721  rm -f -r conftest.dir
6722fi
6723
6724# Standard set of common directories for X headers.
6725# Check X11 before X11Rn because it is often a symlink to the current release.
6726ac_x_header_dirs='
6727/usr/X11/include
6728/usr/X11R7/include
6729/usr/X11R6/include
6730/usr/X11R5/include
6731/usr/X11R4/include
6732
6733/usr/include/X11
6734/usr/include/X11R7
6735/usr/include/X11R6
6736/usr/include/X11R5
6737/usr/include/X11R4
6738
6739/usr/local/X11/include
6740/usr/local/X11R7/include
6741/usr/local/X11R6/include
6742/usr/local/X11R5/include
6743/usr/local/X11R4/include
6744
6745/usr/local/include/X11
6746/usr/local/include/X11R7
6747/usr/local/include/X11R6
6748/usr/local/include/X11R5
6749/usr/local/include/X11R4
6750
6751/usr/X386/include
6752/usr/x386/include
6753/usr/XFree86/include/X11
6754
6755/usr/include
6756/usr/local/include
6757/usr/unsupported/include
6758/usr/athena/include
6759/usr/local/x11r5/include
6760/usr/lpp/Xamples/include
6761
6762/usr/openwin/include
6763/usr/openwin/share/include'
6764
6765if test "$ac_x_includes" = no; then
6766  # Guess where to find include files, by looking for Xlib.h.
6767  # First, try using that file with no special directory specified.
6768  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6769/* end confdefs.h.  */
6770#include <X11/Xlib.h>
6771_ACEOF
6772if ac_fn_c_try_cpp "$LINENO"; then :
6773  # We can compile using X headers with no special include directory.
6774ac_x_includes=
6775else
6776  for ac_dir in $ac_x_header_dirs; do
6777  if test -r "$ac_dir/X11/Xlib.h"; then
6778    ac_x_includes=$ac_dir
6779    break
6780  fi
6781done
6782fi
6783rm -f conftest.err conftest.i conftest.$ac_ext
6784fi # $ac_x_includes = no
6785
6786if test "$ac_x_libraries" = no; then
6787  # Check for the libraries.
6788  # See if we find them without any special options.
6789  # Don't add to $LIBS permanently.
6790  ac_save_LIBS=$LIBS
6791  LIBS="-lX11 $LIBS"
6792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6793/* end confdefs.h.  */
6794#include <X11/Xlib.h>
6795int
6796main ()
6797{
6798XrmInitialize ()
6799  ;
6800  return 0;
6801}
6802_ACEOF
6803if ac_fn_c_try_link "$LINENO"; then :
6804  LIBS=$ac_save_LIBS
6805# We can link X programs with no special library path.
6806ac_x_libraries=
6807else
6808  LIBS=$ac_save_LIBS
6809for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6810do
6811  # Don't even attempt the hair of trying to link an X program!
6812  for ac_extension in a so sl dylib la dll; do
6813    if test -r "$ac_dir/libX11.$ac_extension"; then
6814      ac_x_libraries=$ac_dir
6815      break 2
6816    fi
6817  done
6818done
6819fi
6820rm -f core conftest.err conftest.$ac_objext \
6821    conftest$ac_exeext conftest.$ac_ext
6822fi # $ac_x_libraries = no
6823
6824case $ac_x_includes,$ac_x_libraries in #(
6825  no,* | *,no | *\'*)
6826    # Didn't find X, or a directory has "'" in its name.
6827    ac_cv_have_x="have_x=no";; #(
6828  *)
6829    # Record where we found X for the cache.
6830    ac_cv_have_x="have_x=yes\
6831	ac_x_includes='$ac_x_includes'\
6832	ac_x_libraries='$ac_x_libraries'"
6833esac
6834fi
6835;; #(
6836    *) have_x=yes;;
6837  esac
6838  eval "$ac_cv_have_x"
6839fi # $with_x != no
6840
6841if test "$have_x" != yes; then
6842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
6843$as_echo "$have_x" >&6; }
6844  no_x=yes
6845else
6846  # If each of the values was on the command line, it overrides each guess.
6847  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6848  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6849  # Update the cache value to reflect the command line values.
6850  ac_cv_have_x="have_x=yes\
6851	ac_x_includes='$x_includes'\
6852	ac_x_libraries='$x_libraries'"
6853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
6854$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
6855fi
6856
6857if test "$no_x" = yes; then
6858  # Not all programs may use this symbol, but it does not hurt to define it.
6859
6860$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
6861
6862  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6863else
6864  if test -n "$x_includes"; then
6865    X_CFLAGS="$X_CFLAGS -I$x_includes"
6866  fi
6867
6868  # It would also be nice to do this for all -L options, not just this one.
6869  if test -n "$x_libraries"; then
6870    X_LIBS="$X_LIBS -L$x_libraries"
6871    # For Solaris; some versions of Sun CC require a space after -R and
6872    # others require no space.  Words are not sufficient . . . .
6873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
6874$as_echo_n "checking whether -R must be followed by a space... " >&6; }
6875    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6876    ac_xsave_c_werror_flag=$ac_c_werror_flag
6877    ac_c_werror_flag=yes
6878    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6879/* end confdefs.h.  */
6880
6881int
6882main ()
6883{
6884
6885  ;
6886  return 0;
6887}
6888_ACEOF
6889if ac_fn_c_try_link "$LINENO"; then :
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6891$as_echo "no" >&6; }
6892       X_LIBS="$X_LIBS -R$x_libraries"
6893else
6894  LIBS="$ac_xsave_LIBS -R $x_libraries"
6895       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6896/* end confdefs.h.  */
6897
6898int
6899main ()
6900{
6901
6902  ;
6903  return 0;
6904}
6905_ACEOF
6906if ac_fn_c_try_link "$LINENO"; then :
6907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6908$as_echo "yes" >&6; }
6909	  X_LIBS="$X_LIBS -R $x_libraries"
6910else
6911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
6912$as_echo "neither works" >&6; }
6913fi
6914rm -f core conftest.err conftest.$ac_objext \
6915    conftest$ac_exeext conftest.$ac_ext
6916fi
6917rm -f core conftest.err conftest.$ac_objext \
6918    conftest$ac_exeext conftest.$ac_ext
6919    ac_c_werror_flag=$ac_xsave_c_werror_flag
6920    LIBS=$ac_xsave_LIBS
6921  fi
6922
6923  # Check for system-dependent libraries X programs must link with.
6924  # Do this before checking for the system-independent R6 libraries
6925  # (-lICE), since we may need -lsocket or whatever for X linking.
6926
6927  if test "$ISC" = yes; then
6928    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6929  else
6930    # Martyn Johnson says this is needed for Ultrix, if the X
6931    # libraries were built with DECnet support.  And Karl Berry says
6932    # the Alpha needs dnet_stub (dnet does not exist).
6933    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6934    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6935/* end confdefs.h.  */
6936
6937/* Override any GCC internal prototype to avoid an error.
6938   Use char because int might match the return type of a GCC
6939   builtin and then its argument prototype would still apply.  */
6940#ifdef __cplusplus
6941extern "C"
6942#endif
6943char XOpenDisplay ();
6944int
6945main ()
6946{
6947return XOpenDisplay ();
6948  ;
6949  return 0;
6950}
6951_ACEOF
6952if ac_fn_c_try_link "$LINENO"; then :
6953
6954else
6955  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
6956$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
6957if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
6958  $as_echo_n "(cached) " >&6
6959else
6960  ac_check_lib_save_LIBS=$LIBS
6961LIBS="-ldnet  $LIBS"
6962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6963/* end confdefs.h.  */
6964
6965/* Override any GCC internal prototype to avoid an error.
6966   Use char because int might match the return type of a GCC
6967   builtin and then its argument prototype would still apply.  */
6968#ifdef __cplusplus
6969extern "C"
6970#endif
6971char dnet_ntoa ();
6972int
6973main ()
6974{
6975return dnet_ntoa ();
6976  ;
6977  return 0;
6978}
6979_ACEOF
6980if ac_fn_c_try_link "$LINENO"; then :
6981  ac_cv_lib_dnet_dnet_ntoa=yes
6982else
6983  ac_cv_lib_dnet_dnet_ntoa=no
6984fi
6985rm -f core conftest.err conftest.$ac_objext \
6986    conftest$ac_exeext conftest.$ac_ext
6987LIBS=$ac_check_lib_save_LIBS
6988fi
6989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6990$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
6991if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
6992  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6993fi
6994
6995    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6996      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
6997$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
6998if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
6999  $as_echo_n "(cached) " >&6
7000else
7001  ac_check_lib_save_LIBS=$LIBS
7002LIBS="-ldnet_stub  $LIBS"
7003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7004/* end confdefs.h.  */
7005
7006/* Override any GCC internal prototype to avoid an error.
7007   Use char because int might match the return type of a GCC
7008   builtin and then its argument prototype would still apply.  */
7009#ifdef __cplusplus
7010extern "C"
7011#endif
7012char dnet_ntoa ();
7013int
7014main ()
7015{
7016return dnet_ntoa ();
7017  ;
7018  return 0;
7019}
7020_ACEOF
7021if ac_fn_c_try_link "$LINENO"; then :
7022  ac_cv_lib_dnet_stub_dnet_ntoa=yes
7023else
7024  ac_cv_lib_dnet_stub_dnet_ntoa=no
7025fi
7026rm -f core conftest.err conftest.$ac_objext \
7027    conftest$ac_exeext conftest.$ac_ext
7028LIBS=$ac_check_lib_save_LIBS
7029fi
7030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
7031$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
7032if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
7033  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
7034fi
7035
7036    fi
7037fi
7038rm -f core conftest.err conftest.$ac_objext \
7039    conftest$ac_exeext conftest.$ac_ext
7040    LIBS="$ac_xsave_LIBS"
7041
7042    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
7043    # to get the SysV transport functions.
7044    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
7045    # needs -lnsl.
7046    # The nsl library prevents programs from opening the X display
7047    # on Irix 5.2, according to T.E. Dickey.
7048    # The functions gethostbyname, getservbyname, and inet_addr are
7049    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
7050    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
7051if test "x$ac_cv_func_gethostbyname" = xyes; then :
7052
7053fi
7054
7055    if test $ac_cv_func_gethostbyname = no; then
7056      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
7057$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
7058if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
7059  $as_echo_n "(cached) " >&6
7060else
7061  ac_check_lib_save_LIBS=$LIBS
7062LIBS="-lnsl  $LIBS"
7063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7064/* end confdefs.h.  */
7065
7066/* Override any GCC internal prototype to avoid an error.
7067   Use char because int might match the return type of a GCC
7068   builtin and then its argument prototype would still apply.  */
7069#ifdef __cplusplus
7070extern "C"
7071#endif
7072char gethostbyname ();
7073int
7074main ()
7075{
7076return gethostbyname ();
7077  ;
7078  return 0;
7079}
7080_ACEOF
7081if ac_fn_c_try_link "$LINENO"; then :
7082  ac_cv_lib_nsl_gethostbyname=yes
7083else
7084  ac_cv_lib_nsl_gethostbyname=no
7085fi
7086rm -f core conftest.err conftest.$ac_objext \
7087    conftest$ac_exeext conftest.$ac_ext
7088LIBS=$ac_check_lib_save_LIBS
7089fi
7090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
7091$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
7092if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
7093  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7094fi
7095
7096      if test $ac_cv_lib_nsl_gethostbyname = no; then
7097	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
7098$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
7099if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
7100  $as_echo_n "(cached) " >&6
7101else
7102  ac_check_lib_save_LIBS=$LIBS
7103LIBS="-lbsd  $LIBS"
7104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7105/* end confdefs.h.  */
7106
7107/* Override any GCC internal prototype to avoid an error.
7108   Use char because int might match the return type of a GCC
7109   builtin and then its argument prototype would still apply.  */
7110#ifdef __cplusplus
7111extern "C"
7112#endif
7113char gethostbyname ();
7114int
7115main ()
7116{
7117return gethostbyname ();
7118  ;
7119  return 0;
7120}
7121_ACEOF
7122if ac_fn_c_try_link "$LINENO"; then :
7123  ac_cv_lib_bsd_gethostbyname=yes
7124else
7125  ac_cv_lib_bsd_gethostbyname=no
7126fi
7127rm -f core conftest.err conftest.$ac_objext \
7128    conftest$ac_exeext conftest.$ac_ext
7129LIBS=$ac_check_lib_save_LIBS
7130fi
7131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
7132$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
7133if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
7134  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
7135fi
7136
7137      fi
7138    fi
7139
7140    # lieder@skyler.mavd.honeywell.com says without -lsocket,
7141    # socket/setsockopt and other routines are undefined under SCO ODT
7142    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
7143    # on later versions), says Simon Leinen: it contains gethostby*
7144    # variants that don't use the name server (or something).  -lsocket
7145    # must be given before -lnsl if both are needed.  We assume that
7146    # if connect needs -lnsl, so does gethostbyname.
7147    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
7148if test "x$ac_cv_func_connect" = xyes; then :
7149
7150fi
7151
7152    if test $ac_cv_func_connect = no; then
7153      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
7154$as_echo_n "checking for connect in -lsocket... " >&6; }
7155if ${ac_cv_lib_socket_connect+:} false; then :
7156  $as_echo_n "(cached) " >&6
7157else
7158  ac_check_lib_save_LIBS=$LIBS
7159LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7161/* end confdefs.h.  */
7162
7163/* Override any GCC internal prototype to avoid an error.
7164   Use char because int might match the return type of a GCC
7165   builtin and then its argument prototype would still apply.  */
7166#ifdef __cplusplus
7167extern "C"
7168#endif
7169char connect ();
7170int
7171main ()
7172{
7173return connect ();
7174  ;
7175  return 0;
7176}
7177_ACEOF
7178if ac_fn_c_try_link "$LINENO"; then :
7179  ac_cv_lib_socket_connect=yes
7180else
7181  ac_cv_lib_socket_connect=no
7182fi
7183rm -f core conftest.err conftest.$ac_objext \
7184    conftest$ac_exeext conftest.$ac_ext
7185LIBS=$ac_check_lib_save_LIBS
7186fi
7187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
7188$as_echo "$ac_cv_lib_socket_connect" >&6; }
7189if test "x$ac_cv_lib_socket_connect" = xyes; then :
7190  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7191fi
7192
7193    fi
7194
7195    # Guillermo Gomez says -lposix is necessary on A/UX.
7196    ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
7197if test "x$ac_cv_func_remove" = xyes; then :
7198
7199fi
7200
7201    if test $ac_cv_func_remove = no; then
7202      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
7203$as_echo_n "checking for remove in -lposix... " >&6; }
7204if ${ac_cv_lib_posix_remove+:} false; then :
7205  $as_echo_n "(cached) " >&6
7206else
7207  ac_check_lib_save_LIBS=$LIBS
7208LIBS="-lposix  $LIBS"
7209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7210/* end confdefs.h.  */
7211
7212/* Override any GCC internal prototype to avoid an error.
7213   Use char because int might match the return type of a GCC
7214   builtin and then its argument prototype would still apply.  */
7215#ifdef __cplusplus
7216extern "C"
7217#endif
7218char remove ();
7219int
7220main ()
7221{
7222return remove ();
7223  ;
7224  return 0;
7225}
7226_ACEOF
7227if ac_fn_c_try_link "$LINENO"; then :
7228  ac_cv_lib_posix_remove=yes
7229else
7230  ac_cv_lib_posix_remove=no
7231fi
7232rm -f core conftest.err conftest.$ac_objext \
7233    conftest$ac_exeext conftest.$ac_ext
7234LIBS=$ac_check_lib_save_LIBS
7235fi
7236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
7237$as_echo "$ac_cv_lib_posix_remove" >&6; }
7238if test "x$ac_cv_lib_posix_remove" = xyes; then :
7239  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7240fi
7241
7242    fi
7243
7244    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7245    ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
7246if test "x$ac_cv_func_shmat" = xyes; then :
7247
7248fi
7249
7250    if test $ac_cv_func_shmat = no; then
7251      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
7252$as_echo_n "checking for shmat in -lipc... " >&6; }
7253if ${ac_cv_lib_ipc_shmat+:} false; then :
7254  $as_echo_n "(cached) " >&6
7255else
7256  ac_check_lib_save_LIBS=$LIBS
7257LIBS="-lipc  $LIBS"
7258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7259/* end confdefs.h.  */
7260
7261/* Override any GCC internal prototype to avoid an error.
7262   Use char because int might match the return type of a GCC
7263   builtin and then its argument prototype would still apply.  */
7264#ifdef __cplusplus
7265extern "C"
7266#endif
7267char shmat ();
7268int
7269main ()
7270{
7271return shmat ();
7272  ;
7273  return 0;
7274}
7275_ACEOF
7276if ac_fn_c_try_link "$LINENO"; then :
7277  ac_cv_lib_ipc_shmat=yes
7278else
7279  ac_cv_lib_ipc_shmat=no
7280fi
7281rm -f core conftest.err conftest.$ac_objext \
7282    conftest$ac_exeext conftest.$ac_ext
7283LIBS=$ac_check_lib_save_LIBS
7284fi
7285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
7286$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
7287if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
7288  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7289fi
7290
7291    fi
7292  fi
7293
7294  # Check for libraries that X11R6 Xt/Xaw programs need.
7295  ac_save_LDFLAGS=$LDFLAGS
7296  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7297  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7298  # check for ICE first), but we must link in the order -lSM -lICE or
7299  # we get undefined symbols.  So assume we have SM if we have ICE.
7300  # These have to be linked with before -lX11, unlike the other
7301  # libraries we check for below, so use a different variable.
7302  # John Interrante, Karl Berry
7303  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
7304$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
7305if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
7306  $as_echo_n "(cached) " >&6
7307else
7308  ac_check_lib_save_LIBS=$LIBS
7309LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7311/* end confdefs.h.  */
7312
7313/* Override any GCC internal prototype to avoid an error.
7314   Use char because int might match the return type of a GCC
7315   builtin and then its argument prototype would still apply.  */
7316#ifdef __cplusplus
7317extern "C"
7318#endif
7319char IceConnectionNumber ();
7320int
7321main ()
7322{
7323return IceConnectionNumber ();
7324  ;
7325  return 0;
7326}
7327_ACEOF
7328if ac_fn_c_try_link "$LINENO"; then :
7329  ac_cv_lib_ICE_IceConnectionNumber=yes
7330else
7331  ac_cv_lib_ICE_IceConnectionNumber=no
7332fi
7333rm -f core conftest.err conftest.$ac_objext \
7334    conftest$ac_exeext conftest.$ac_ext
7335LIBS=$ac_check_lib_save_LIBS
7336fi
7337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7338$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
7339if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
7340  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7341fi
7342
7343  LDFLAGS=$ac_save_LDFLAGS
7344
7345fi
7346       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5
7347$as_echo_n "checking whether #! works in shell scripts... " >&6; }
7348if ${ac_cv_sys_interpreter+:} false; then :
7349  $as_echo_n "(cached) " >&6
7350else
7351  echo '#! /bin/cat
7352exit 69
7353' >conftest
7354chmod u+x conftest
7355(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1)
7356if test $? -ne 69; then
7357   ac_cv_sys_interpreter=yes
7358else
7359   ac_cv_sys_interpreter=no
7360fi
7361rm -f conftest
7362fi
7363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5
7364$as_echo "$ac_cv_sys_interpreter" >&6; }
7365interpval=$ac_cv_sys_interpreter
7366
7367case $host in
7368   *-*-sunos*)
7369$as_echo "#define HAVE_SUN_OS /**/" >>confdefs.h
7370   ;;
7371   *-*-solaris*)
7372$as_echo "#define HAVE_SUN_OS /**/" >>confdefs.h
7373   ;;
7374   *-*-osf*)
7375$as_echo "#define HAVE_OSF1_OS /**/" >>confdefs.h
7376    ;;
7377   *-*-aix*)
7378$as_echo "#define HAVE_AIX_OS /**/" >>confdefs.h
7379     ;;
7380   *-*-hpux*)
7381$as_echo "#define HAVE_HPUX_OS /**/" >>confdefs.h
7382    ;;
7383   *-*-linux*)
7384$as_echo "#define HAVE_LINUX_OS /**/" >>confdefs.h
7385   ;;
7386   *-*-freebsd*)
7387$as_echo "#define HAVE_FREEBSD_OS /**/" >>confdefs.h
7388 ;;
7389   *-*-netbsd*)
7390$as_echo "#define HAVE_NETBSD_OS /**/" >>confdefs.h
7391  ;;
7392   *-*-openbsd*)
7393$as_echo "#define HAVE_OPENBSD_OS /**/" >>confdefs.h
7394 ;;
7395   *-*-bsdi*)
7396$as_echo "#define HAVE_BSDI_OS /**/" >>confdefs.h
7397    ;;
7398   *-*-irix*)
7399$as_echo "#define HAVE_SGI_OS /**/" >>confdefs.h
7400    ;;
7401   *-*-darwin*)
7402$as_echo "#define HAVE_DARWIN_OS /**/" >>confdefs.h
7403  ;;
7404   *-*-nto*)
7405$as_echo "#define HAVE_QNX_OS /**/" >>confdefs.h
7406     ;;
7407   *-*-mingw*)
7408$as_echo "#define HAVE_MINGW /**/" >>confdefs.h
7409   ;;
7410esac
7411
7412
7413# Check whether --enable-all was given.
7414if test "${enable_all+set}" = set; then :
7415  enableval=$enable_all;  if test "$enableval" = "yes" ; then
7416      enable_usb=yes
7417      enable_net=yes
7418      enable_snmp=yes
7419      enable_test=yes
7420      enable_brazil=yes
7421      enable_pcnet=yes
7422      enable_modbus=yes
7423      enable_modbus_usb=yes
7424      enable_cgi=yes
7425      if test "$host_os" != "mingw32" ; then
7426         enable_gapcmon=yes
7427      fi
7428   fi
7429fi
7430
7431
7432
7433case $host in
7434   *-*-linux*)
7435      HALPOLICYDIR="/usr/share/hal/fdi/policy/20thirdparty"
7436      ;;
7437   *)
7438      HALPOLICYDIR=""
7439      ;;
7440esac
7441
7442
7443# Check whether --with-halpolicydir was given.
7444if test "${with_halpolicydir+set}" = set; then :
7445  withval=$with_halpolicydir; HALPOLICYDIR=$withval
7446fi
7447
7448
7449if test "x$HALPOLICYDIR" != "x" ; then
7450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using halpolicydir=$HALPOLICYDIR" >&5
7451$as_echo "Using halpolicydir=$HALPOLICYDIR" >&6; }
7452else
7453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: Will not install HAL policy file" >&5
7454$as_echo "Will not install HAL policy file" >&6; }
7455fi
7456
7457
7458#--------------------------------------------------------------------
7459# Check for TCP wrapper support, code taken from Bacula KES-7Nov03
7460#--------------------------------------------------------------------
7461
7462
7463# Check whether --with-libwrap was given.
7464if test "${with_libwrap+set}" = set; then :
7465  withval=$with_libwrap;
7466      if test "x$withval" != "xno" ; then
7467         saved_LIBS="$LIBS"
7468         LIBS="$saved_LIBS -lwrap"
7469         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libwrap" >&5
7470$as_echo_n "checking for libwrap... " >&6; }
7471         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7472/* end confdefs.h.  */
7473 #include "tcpd.h"
7474              int deny_severity = 0;
7475              int allow_severity = 0;
7476              struct request_info *req;
7477int
7478main ()
7479{
7480 hosts_access(req);
7481  ;
7482  return 0;
7483}
7484_ACEOF
7485if ac_fn_c_try_link "$LINENO"; then :
7486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7487$as_echo "yes" >&6; }
7488
7489$as_echo "#define HAVE_LIBWRAP /**/" >>confdefs.h
7490
7491              TCPW_MSG="yes"
7492else
7493   LIBS="$saved_LIBS -lwrap -lnsl"
7494              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7495/* end confdefs.h.  */
7496 ##include "tcpd.h"
7497                   int deny_severity = 0;
7498                   int allow_severity = 0;
7499                   struct request_info *req;
7500int
7501main ()
7502{
7503 hosts_access(req);
7504  ;
7505  return 0;
7506}
7507_ACEOF
7508if ac_fn_c_try_link "$LINENO"; then :
7509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7510$as_echo "yes" >&6; }
7511                   $as_echo "#define HAVE_LIBWRAP 1" >>confdefs.h
7512
7513                   TCPW_MSG="yes"
7514else
7515  as_fn_error $? "*** libwrap missing" "$LINENO" 5
7516
7517fi
7518rm -f core conftest.err conftest.$ac_objext \
7519    conftest$ac_exeext conftest.$ac_ext
7520
7521fi
7522rm -f core conftest.err conftest.$ac_objext \
7523    conftest$ac_exeext conftest.$ac_ext
7524      fi
7525
7526
7527fi
7528
7529
7530
7531ENABLE_CGI="no"
7532CGI=
7533GD_LIBS=
7534SYS_GD_FOUND=no
7535# Check whether --enable-cgi was given.
7536if test "${enable_cgi+set}" = set; then :
7537  enableval=$enable_cgi;  if test "$enableval" = "yes"
7538     then
7539        ENABLE_CGI="yes"
7540        CGI=cgi
7541
7542                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImagePng in -lgd" >&5
7543$as_echo_n "checking for gdImagePng in -lgd... " >&6; }
7544if ${ac_cv_lib_gd_gdImagePng+:} false; then :
7545  $as_echo_n "(cached) " >&6
7546else
7547  ac_check_lib_save_LIBS=$LIBS
7548LIBS="-lgd  $LIBS"
7549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7550/* end confdefs.h.  */
7551
7552/* Override any GCC internal prototype to avoid an error.
7553   Use char because int might match the return type of a GCC
7554   builtin and then its argument prototype would still apply.  */
7555#ifdef __cplusplus
7556extern "C"
7557#endif
7558char gdImagePng ();
7559int
7560main ()
7561{
7562return gdImagePng ();
7563  ;
7564  return 0;
7565}
7566_ACEOF
7567if ac_fn_c_try_link "$LINENO"; then :
7568  ac_cv_lib_gd_gdImagePng=yes
7569else
7570  ac_cv_lib_gd_gdImagePng=no
7571fi
7572rm -f core conftest.err conftest.$ac_objext \
7573    conftest$ac_exeext conftest.$ac_ext
7574LIBS=$ac_check_lib_save_LIBS
7575fi
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImagePng" >&5
7577$as_echo "$ac_cv_lib_gd_gdImagePng" >&6; }
7578if test "x$ac_cv_lib_gd_gdImagePng" = xyes; then :
7579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: using PNG file format." >&5
7580$as_echo "using PNG file format." >&6; }
7581
7582$as_echo "#define SYS_IMGFMT_PNG /**/" >>confdefs.h
7583
7584             GD_LIBS="-lgd"
7585             SYS_GD_FOUND=yes
7586else
7587  $as_unset ac_cv_lib_gd_gdImagePng
7588fi
7589
7590
7591                        if test "${SYS_GD_FOUND}" = "no"
7592        then
7593           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImagePng in -lgd" >&5
7594$as_echo_n "checking for gdImagePng in -lgd... " >&6; }
7595if ${ac_cv_lib_gd_gdImagePng+:} false; then :
7596  $as_echo_n "(cached) " >&6
7597else
7598  ac_check_lib_save_LIBS=$LIBS
7599LIBS="-lgd -lpng12 -lz $LIBS"
7600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7601/* end confdefs.h.  */
7602
7603/* Override any GCC internal prototype to avoid an error.
7604   Use char because int might match the return type of a GCC
7605   builtin and then its argument prototype would still apply.  */
7606#ifdef __cplusplus
7607extern "C"
7608#endif
7609char gdImagePng ();
7610int
7611main ()
7612{
7613return gdImagePng ();
7614  ;
7615  return 0;
7616}
7617_ACEOF
7618if ac_fn_c_try_link "$LINENO"; then :
7619  ac_cv_lib_gd_gdImagePng=yes
7620else
7621  ac_cv_lib_gd_gdImagePng=no
7622fi
7623rm -f core conftest.err conftest.$ac_objext \
7624    conftest$ac_exeext conftest.$ac_ext
7625LIBS=$ac_check_lib_save_LIBS
7626fi
7627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImagePng" >&5
7628$as_echo "$ac_cv_lib_gd_gdImagePng" >&6; }
7629if test "x$ac_cv_lib_gd_gdImagePng" = xyes; then :
7630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: using PNG file format." >&5
7631$as_echo "using PNG file format." >&6; }
7632
7633$as_echo "#define SYS_IMGFMT_PNG /**/" >>confdefs.h
7634
7635                GD_LIBS="-lgd -lpng12 -lz"
7636                SYS_GD_FOUND=yes
7637fi
7638
7639        fi
7640
7641                        if test "${SYS_GD_FOUND}" = "no"
7642        then
7643           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageGif in -lgd" >&5
7644$as_echo_n "checking for gdImageGif in -lgd... " >&6; }
7645if ${ac_cv_lib_gd_gdImageGif+:} false; then :
7646  $as_echo_n "(cached) " >&6
7647else
7648  ac_check_lib_save_LIBS=$LIBS
7649LIBS="-lgd  $LIBS"
7650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7651/* end confdefs.h.  */
7652
7653/* Override any GCC internal prototype to avoid an error.
7654   Use char because int might match the return type of a GCC
7655   builtin and then its argument prototype would still apply.  */
7656#ifdef __cplusplus
7657extern "C"
7658#endif
7659char gdImageGif ();
7660int
7661main ()
7662{
7663return gdImageGif ();
7664  ;
7665  return 0;
7666}
7667_ACEOF
7668if ac_fn_c_try_link "$LINENO"; then :
7669  ac_cv_lib_gd_gdImageGif=yes
7670else
7671  ac_cv_lib_gd_gdImageGif=no
7672fi
7673rm -f core conftest.err conftest.$ac_objext \
7674    conftest$ac_exeext conftest.$ac_ext
7675LIBS=$ac_check_lib_save_LIBS
7676fi
7677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageGif" >&5
7678$as_echo "$ac_cv_lib_gd_gdImageGif" >&6; }
7679if test "x$ac_cv_lib_gd_gdImageGif" = xyes; then :
7680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: using GIF file format." >&5
7681$as_echo "using GIF file format." >&6; }
7682
7683$as_echo "#define SYS_IMGFMT_GIF /**/" >>confdefs.h
7684
7685                GD_LIBS="-lgd"
7686                SYS_GD_FOUND=yes
7687fi
7688
7689        fi
7690
7691        if test "${SYS_GD_FOUND}" = "no"
7692        then
7693           as_fn_error $? "Your system lacks the GD library which is needed for
7694                         compiling the apcctrl CGI programs. Please install
7695                         libgd and re-run the ./configure script.
7696                         Alternatively you can disable the CGI support." "$LINENO" 5
7697        fi
7698
7699        ac_fn_c_check_header_mongrel "$LINENO" "gd.h" "ac_cv_header_gd_h" "$ac_includes_default"
7700if test "x$ac_cv_header_gd_h" = xyes; then :
7701   GDHEAD=
7702else
7703   ac_fn_c_check_header_mongrel "$LINENO" "gd/gd.h" "ac_cv_header_gd_gd_h" "$ac_includes_default"
7704if test "x$ac_cv_header_gd_gd_h" = xyes; then :
7705   GDHEAD="gd/"
7706else
7707   ac_fn_c_check_header_mongrel "$LINENO" "gd2/gd.h" "ac_cv_header_gd2_gd_h" "$ac_includes_default"
7708if test "x$ac_cv_header_gd2_gd_h" = xyes; then :
7709   GDHEAD="gd2/"
7710else
7711   as_fn_error $? "Found system GD library but no header file.
7712                                 Please find the file gd.h in your system
7713                                 include directories and report its location
7714                                 to apcctrl-users@lists.sourceforge.net" "$LINENO" 5
7715fi
7716
7717
7718
7719fi
7720
7721
7722
7723fi
7724
7725
7726
7727
7728    fi
7729
7730fi
7731
7732
7733
7734# Check whether --enable-apcsmart was given.
7735if test "${enable_apcsmart+set}" = set; then :
7736  enableval=$enable_apcsmart;  if test "$enableval" = "yes" ; then
7737
7738$as_echo "#define HAVE_APCSMART_DRIVER /**/" >>confdefs.h
7739
7740
7741              APCSMART_DRIVER="apcsmart"
7742
7743       APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/apcsmart/libapcsmartdrv.a"
7744     fi
7745else
7746   $as_echo "#define HAVE_APCSMART_DRIVER 1" >>confdefs.h
7747
7748     APCSMART_DRIVER="apcsmart"
7749
7750     APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/apcsmart/libapcsmartdrv.a"
7751fi
7752
7753
7754# Check whether --enable-dumb was given.
7755if test "${enable_dumb+set}" = set; then :
7756  enableval=$enable_dumb;  if test "$enableval" = "yes" ; then
7757
7758$as_echo "#define HAVE_DUMB_DRIVER /**/" >>confdefs.h
7759
7760        DUMB_DRIVER="dumb"
7761
7762        APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/dumb/libdumbdrv.a"
7763     fi
7764else
7765   $as_echo "#define HAVE_DUMB_DRIVER 1" >>confdefs.h
7766
7767     DUMB_DRIVER="dumb"
7768
7769     APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/dumb/libdumbdrv.a"
7770fi
7771
7772
7773GENERICUSB="no"
7774
7775# Check whether --with-generic-usb was given.
7776if test "${with_generic_usb+set}" = set; then :
7777  withval=$with_generic_usb; GENERICUSB="yes"
7778fi
7779
7780
7781BOOL_ENABLE_USB="no"
7782# Check whether --enable-usb was given.
7783if test "${enable_usb+set}" = set; then :
7784  enableval=$enable_usb;  if test "$enableval" = "yes" ; then
7785		BOOL_ENABLE_USB="yes"
7786     fi
7787else
7788   BOOL_ENABLE_USB="yes"
7789fi
7790
7791
7792if test $BOOL_ENABLE_USB = "yes" ; then
7793
7794
7795      if test $GENERICUSB = "yes" ; then
7796         usbhost=forcegeneric
7797      else
7798         usbhost=$host
7799      fi
7800
7801
7802$as_echo "#define HAVE_USB_DRIVER /**/" >>confdefs.h
7803
7804      USB_DRIVER="usb"
7805
7806      APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/usb/libusbdrv.a"
7807
7808      case $usbhost in
7809         *-*-linux*)
7810            USB_TYPE="linux"
7811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using Linux USB driver." >&5
7812$as_echo "Using Linux USB driver." >&6; }
7813            ;;
7814         *)
7815            needlibusb=true
7816            USB_TYPE="generic"
7817            ;;
7818      esac
7819
7820
7821      DISPLAY_USB_DRIVER=$USB_TYPE-$USB_DRIVER
7822fi
7823
7824# Check whether --enable-net was given.
7825if test "${enable_net+set}" = set; then :
7826  enableval=$enable_net;  if test "$enableval" = "yes" ; then
7827
7828$as_echo "#define HAVE_NET_DRIVER /**/" >>confdefs.h
7829
7830        NET_DRIVER="net"
7831
7832        APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/net/libnetdrv.a"
7833     fi
7834else
7835   $as_echo "#define HAVE_NET_DRIVER 1" >>confdefs.h
7836
7837     NET_DRIVER="net"
7838
7839     APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/net/libnetdrv.a"
7840fi
7841
7842
7843# Check whether --enable-snmp was given.
7844if test "${enable_snmp+set}" = set; then :
7845  enableval=$enable_snmp;  if test "$enableval" = "yes" ; then
7846
7847$as_echo "#define HAVE_SNMPLITE_DRIVER /**/" >>confdefs.h
7848
7849        SNMPLITE_DRIVER="snmplite"
7850        DISPLAY_SNMP_DRIVER="snmp"
7851
7852        APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/snmplite/libsnmplitedrv.a"
7853     fi
7854else
7855   $as_echo "#define HAVE_SNMPLITE_DRIVER 1" >>confdefs.h
7856
7857     SNMPLITE_DRIVER="snmplite"
7858     DISPLAY_SNMP_DRIVER="snmp"
7859
7860     APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/snmplite/libsnmplitedrv.a"
7861fi
7862
7863
7864# Check whether --enable-test was given.
7865if test "${enable_test+set}" = set; then :
7866  enableval=$enable_test;  if test "$enableval" = "yes" ; then
7867
7868$as_echo "#define HAVE_TEST_DRIVER /**/" >>confdefs.h
7869
7870        TEST_DRIVER="test"
7871
7872        APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/test/libtestdrv.a"
7873     fi
7874fi
7875
7876
7877# Check whether --enable-brazil was given.
7878if test "${enable_brazil+set}" = set; then :
7879  enableval=$enable_brazil;  if test "$enableval" = "yes" ; then
7880
7881$as_echo "#define HAVE_BRAZIL_DRIVER /**/" >>confdefs.h
7882
7883        BRAZIL_DRIVER="brazil"
7884
7885        APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/brazil/libbrazildrv.a"
7886     fi
7887else
7888  $as_echo "#define HAVE_BRAZIL_DRIVER 1" >>confdefs.h
7889
7890     BRAZIL_DRIVER="brazil"
7891
7892     APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/brazil/libbrazildrv.a"
7893fi
7894
7895
7896# Check whether --enable-pcnet was given.
7897if test "${enable_pcnet+set}" = set; then :
7898  enableval=$enable_pcnet;  if test "$enableval" = "yes" ; then
7899
7900$as_echo "#define HAVE_PCNET_DRIVER /**/" >>confdefs.h
7901
7902        PCNET_DRIVER="pcnet"
7903
7904        APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/pcnet/libpcnetdrv.a"
7905     fi
7906else
7907   $as_echo "#define HAVE_PCNET_DRIVER 1" >>confdefs.h
7908
7909     PCNET_DRIVER="pcnet"
7910
7911     APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/pcnet/libpcnetdrv.a"
7912fi
7913
7914
7915# Check whether --enable-modbus-usb was given.
7916if test "${enable_modbus_usb+set}" = set; then :
7917  enableval=$enable_modbus_usb;  if test "$enableval" = "yes" ; then
7918
7919$as_echo "#define HAVE_MODBUS_USB_DRIVER /**/" >>confdefs.h
7920
7921        MODBUS_USB_DRIVER="modbus-usb"
7922
7923        enable_modbus=yes
7924        needlibusb=true
7925     fi
7926fi
7927
7928
7929# Check whether --enable-modbus was given.
7930if test "${enable_modbus+set}" = set; then :
7931  enableval=$enable_modbus;  if test "$enableval" = "yes" ; then
7932
7933$as_echo "#define HAVE_MODBUS_DRIVER /**/" >>confdefs.h
7934
7935        MODBUS_DRIVER="modbus"
7936
7937        APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/drivers/modbus/libmodbusdrv.a"
7938     fi
7939fi
7940
7941
7942if test "$needlibusb" = "true" ; then
7943   case $host in
7944      *-*-mingw*)
7945         LIBUSBH=libusb-winusb-bridge.h
7946         DRVLIBS="$DRVLIBS -lsetupapi"
7947         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using generic winusb USB driver." >&5
7948$as_echo "Using generic winusb USB driver." >&6; }
7949         ;;
7950      *)
7951                  # Extract the first word of "libusb-config", so it can be a program name with args.
7952set dummy libusb-config; ac_word=$2
7953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7954$as_echo_n "checking for $ac_word... " >&6; }
7955if ${ac_cv_path_usbcfg+:} false; then :
7956  $as_echo_n "(cached) " >&6
7957else
7958  case $usbcfg in
7959  [\\/]* | ?:[\\/]*)
7960  ac_cv_path_usbcfg="$usbcfg" # Let the user override the test with a path.
7961  ;;
7962  *)
7963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7964for as_dir in $PATH
7965do
7966  IFS=$as_save_IFS
7967  test -z "$as_dir" && as_dir=.
7968    for ac_exec_ext in '' $ac_executable_extensions; do
7969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7970    ac_cv_path_usbcfg="$as_dir/$ac_word$ac_exec_ext"
7971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7972    break 2
7973  fi
7974done
7975  done
7976IFS=$as_save_IFS
7977
7978  ;;
7979esac
7980fi
7981usbcfg=$ac_cv_path_usbcfg
7982if test -n "$usbcfg"; then
7983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $usbcfg" >&5
7984$as_echo "$usbcfg" >&6; }
7985else
7986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7987$as_echo "no" >&6; }
7988fi
7989
7990
7991         if test x$usbcfg != x ; then
7992            LIBUSB=`$usbcfg --libs`
7993            LIBUSBH=`$usbcfg --prefix`/include/usb.h
7994         else
7995            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usb_init in -lusb" >&5
7996$as_echo_n "checking for usb_init in -lusb... " >&6; }
7997if ${ac_cv_lib_usb_usb_init+:} false; then :
7998  $as_echo_n "(cached) " >&6
7999else
8000  ac_check_lib_save_LIBS=$LIBS
8001LIBS="-lusb $DRVLIBS $LIBS"
8002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8003/* end confdefs.h.  */
8004
8005/* Override any GCC internal prototype to avoid an error.
8006   Use char because int might match the return type of a GCC
8007   builtin and then its argument prototype would still apply.  */
8008#ifdef __cplusplus
8009extern "C"
8010#endif
8011char usb_init ();
8012int
8013main ()
8014{
8015return usb_init ();
8016  ;
8017  return 0;
8018}
8019_ACEOF
8020if ac_fn_c_try_link "$LINENO"; then :
8021  ac_cv_lib_usb_usb_init=yes
8022else
8023  ac_cv_lib_usb_usb_init=no
8024fi
8025rm -f core conftest.err conftest.$ac_objext \
8026    conftest$ac_exeext conftest.$ac_ext
8027LIBS=$ac_check_lib_save_LIBS
8028fi
8029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_usb_usb_init" >&5
8030$as_echo "$ac_cv_lib_usb_usb_init" >&6; }
8031if test "x$ac_cv_lib_usb_usb_init" = xyes; then :
8032  LIBUSB=-lusb
8033                          LIBUSBH=usb.h
8034else
8035  as_fn_error $? "Unable to find libusb" "$LINENO" 5
8036fi
8037
8038         fi
8039
8040         DRVLIBS="$DRVLIBS $LIBUSB"
8041         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using generic libusb USB driver." >&5
8042$as_echo "Using generic libusb USB driver." >&6; }
8043         ;;
8044   esac
8045
8046
8047   LIBUSBHID=libusbhid
8048
8049   APCDRVLIBS="$APCDRVLIBS \$(topdir)/src/libusbhid/libusbhid.a"
8050   CPPFLAGS="$CPPFLAGS -I\$(topdir)/src/libusbhid"
8051fi
8052
8053
8054$as_echo "#define HAVE_NISSERVER /**/" >>confdefs.h
8055
8056
8057$as_echo "#define HAVE_NISLIB /**/" >>confdefs.h
8058
8059NISSRV_ENABLED=yes
8060
8061NISIP="0.0.0.0"
8062
8063# Check whether --with-nisip was given.
8064if test "${with_nisip+set}" = set; then :
8065  withval=$with_nisip; NISIP="$withval";
8066fi
8067
8068
8069
8070
8071CGIBIN="/etc/apcctrl"
8072
8073# Check whether --with-cgi-bin was given.
8074if test "${with_cgi_bin+set}" = set; then :
8075  withval=$with_cgi_bin; CGIBIN="$withval";
8076fi
8077
8078
8079GAPCMON=
8080GAPCMON_ENABLED=no
8081
8082
8083if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8084	if test -n "$ac_tool_prefix"; then
8085  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8086set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
8087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8088$as_echo_n "checking for $ac_word... " >&6; }
8089if ${ac_cv_path_PKG_CONFIG+:} false; then :
8090  $as_echo_n "(cached) " >&6
8091else
8092  case $PKG_CONFIG in
8093  [\\/]* | ?:[\\/]*)
8094  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8095  ;;
8096  *)
8097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8098for as_dir in $PATH
8099do
8100  IFS=$as_save_IFS
8101  test -z "$as_dir" && as_dir=.
8102    for ac_exec_ext in '' $ac_executable_extensions; do
8103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8104    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8106    break 2
8107  fi
8108done
8109  done
8110IFS=$as_save_IFS
8111
8112  ;;
8113esac
8114fi
8115PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8116if test -n "$PKG_CONFIG"; then
8117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8118$as_echo "$PKG_CONFIG" >&6; }
8119else
8120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8121$as_echo "no" >&6; }
8122fi
8123
8124
8125fi
8126if test -z "$ac_cv_path_PKG_CONFIG"; then
8127  ac_pt_PKG_CONFIG=$PKG_CONFIG
8128  # Extract the first word of "pkg-config", so it can be a program name with args.
8129set dummy pkg-config; ac_word=$2
8130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8131$as_echo_n "checking for $ac_word... " >&6; }
8132if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
8133  $as_echo_n "(cached) " >&6
8134else
8135  case $ac_pt_PKG_CONFIG in
8136  [\\/]* | ?:[\\/]*)
8137  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8138  ;;
8139  *)
8140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8141for as_dir in $PATH
8142do
8143  IFS=$as_save_IFS
8144  test -z "$as_dir" && as_dir=.
8145    for ac_exec_ext in '' $ac_executable_extensions; do
8146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8147    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8149    break 2
8150  fi
8151done
8152  done
8153IFS=$as_save_IFS
8154
8155  ;;
8156esac
8157fi
8158ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8159if test -n "$ac_pt_PKG_CONFIG"; then
8160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8161$as_echo "$ac_pt_PKG_CONFIG" >&6; }
8162else
8163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8164$as_echo "no" >&6; }
8165fi
8166
8167  if test "x$ac_pt_PKG_CONFIG" = x; then
8168    PKG_CONFIG=""
8169  else
8170    case $cross_compiling:$ac_tool_warned in
8171yes:)
8172{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8173$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8174ac_tool_warned=yes ;;
8175esac
8176    PKG_CONFIG=$ac_pt_PKG_CONFIG
8177  fi
8178else
8179  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8180fi
8181
8182fi
8183if test -n "$PKG_CONFIG"; then
8184	_pkg_min_version=0.9.0
8185	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
8186$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
8187	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8188		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8189$as_echo "yes" >&6; }
8190	else
8191		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8192$as_echo "no" >&6; }
8193		PKG_CONFIG=""
8194	fi
8195
8196fi
8197# Check whether --enable-gapcmon was given.
8198if test "${enable_gapcmon+set}" = set; then :
8199  enableval=$enable_gapcmon;  if test "$enableval" = "yes" ; then
8200      GAPCMON=gapcmon
8201      GAPCMON_ENABLED=yes
8202
8203
8204pkg_failed=no
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GAPCMON" >&5
8206$as_echo_n "checking for GAPCMON... " >&6; }
8207
8208if test -n "$PKG_CONFIG"; then
8209    if test -n "$GAPCMON_CFLAGS"; then
8210        pkg_cv_GAPCMON_CFLAGS="$GAPCMON_CFLAGS"
8211    else
8212        if test -n "$PKG_CONFIG" && \
8213    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0\""; } >&5
8214  ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0") 2>&5
8215  ac_status=$?
8216  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8217  test $ac_status = 0; }; then
8218  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`
8219else
8220  pkg_failed=yes
8221fi
8222    fi
8223else
8224	pkg_failed=untried
8225fi
8226if test -n "$PKG_CONFIG"; then
8227    if test -n "$GAPCMON_LIBS"; then
8228        pkg_cv_GAPCMON_LIBS="$GAPCMON_LIBS"
8229    else
8230        if test -n "$PKG_CONFIG" && \
8231    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0\""; } >&5
8232  ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0") 2>&5
8233  ac_status=$?
8234  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8235  test $ac_status = 0; }; then
8236  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`
8237else
8238  pkg_failed=yes
8239fi
8240    fi
8241else
8242	pkg_failed=untried
8243fi
8244
8245
8246
8247if test $pkg_failed = yes; then
8248
8249if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8250        _pkg_short_errors_supported=yes
8251else
8252        _pkg_short_errors_supported=no
8253fi
8254        if test $_pkg_short_errors_supported = yes; then
8255	        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"`
8256        else
8257	        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"`
8258        fi
8259	# Put the nasty error message in config.log where it belongs
8260	echo "$GAPCMON_PKG_ERRORS" >&5
8261
8262	as_fn_error $? "Package requirements (gtk+-2.0 >= 2.4.0 glib-2.0 gthread-2.0 gconf-2.0) were not met:
8263
8264$GAPCMON_PKG_ERRORS
8265
8266Consider adjusting the PKG_CONFIG_PATH environment variable if you
8267installed software in a non-standard prefix.
8268
8269Alternatively, you may set the environment variables GAPCMON_CFLAGS
8270and GAPCMON_LIBS to avoid the need to call pkg-config.
8271See the pkg-config man page for more details.
8272" "$LINENO" 5
8273elif test $pkg_failed = untried; then
8274	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8275$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8276as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
8277is in your PATH or set the PKG_CONFIG environment variable to the full
8278path to pkg-config.
8279
8280Alternatively, you may set the environment variables GAPCMON_CFLAGS
8281and GAPCMON_LIBS to avoid the need to call pkg-config.
8282See the pkg-config man page for more details.
8283
8284To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
8285See \`config.log' for more details" "$LINENO" 5; }
8286else
8287	GAPCMON_CFLAGS=$pkg_cv_GAPCMON_CFLAGS
8288	GAPCMON_LIBS=$pkg_cv_GAPCMON_LIBS
8289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8290$as_echo "yes" >&6; }
8291	:
8292fi
8293      GAPCMON_CFLAGS="$GAPCMON_CFLAGS -DVERSION=\\\"$VERSION\\\""
8294   fi
8295fi
8296
8297
8298
8299APCAGENT=
8300APCAGENT_ENABLED=no
8301# Check whether --enable-apcagent was given.
8302if test "${enable_apcagent+set}" = set; then :
8303  enableval=$enable_apcagent;  if test "$enableval" = "yes" ; then
8304      case $host in
8305      *-*-darwin*)
8306         APCAGENT=apcagent
8307         APCAGENT_ENABLED=yes
8308         ;;
8309      *)
8310         as_fn_error $? "apcagent can only be built on Mac OS X" "$LINENO" 5
8311         ;;
8312      esac
8313   fi
8314else
8315  case $host in
8316   *-*-darwin*)
8317      APCAGENT=apcagent
8318      APCAGENT_ENABLED=yes
8319      ;;
8320   esac
8321fi
8322
8323
8324
8325
8326
8327    ac_ext=c
8328ac_cpp='$CPP $CPPFLAGS'
8329ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8330ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8331ac_compiler_gnu=$ac_cv_c_compiler_gnu
8332
8333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how many arguments gethostbyname_r() takes" >&5
8334$as_echo_n "checking how many arguments gethostbyname_r() takes... " >&6; }
8335
8336    if ${ac_cv_func_which_gethostbyname_r+:} false; then :
8337  $as_echo_n "(cached) " >&6
8338else
8339
8340
8341################################################################
8342
8343ac_cv_func_which_gethostbyname_r=unknown
8344
8345#
8346# ONE ARGUMENT (sanity check)
8347#
8348
8349# This should fail, as there is no variant of gethostbyname_r() that takes
8350# a single argument. If it actually compiles, then we can assume that
8351# netdb.h is not declaring the function, and the compiler is thereby
8352# assuming an implicit prototype. In which case, we're out of luck.
8353#
8354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8355/* end confdefs.h.  */
8356#include <netdb.h>
8357int
8358main ()
8359{
8360
8361	    char *name = "www.gnu.org";
8362	    (void)gethostbyname_r(name) /* ; */
8363
8364  ;
8365  return 0;
8366}
8367_ACEOF
8368if ac_fn_c_try_compile "$LINENO"; then :
8369  ac_cv_func_which_gethostbyname_r=no
8370fi
8371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8372
8373#
8374# SIX ARGUMENTS
8375# (e.g. Linux)
8376#
8377
8378if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
8379
8380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8381/* end confdefs.h.  */
8382#include <netdb.h>
8383int
8384main ()
8385{
8386
8387	    char *name = "www.gnu.org";
8388	    struct hostent ret, *retp;
8389	    char buf[1024];
8390	    int buflen = 1024;
8391	    int my_h_errno;
8392	    (void)gethostbyname_r(name, &ret, buf, buflen, &retp, &my_h_errno) /* ; */
8393
8394  ;
8395  return 0;
8396}
8397_ACEOF
8398if ac_fn_c_try_compile "$LINENO"; then :
8399  ac_cv_func_which_gethostbyname_r=six
8400fi
8401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8402
8403fi
8404
8405#
8406# FIVE ARGUMENTS
8407# (e.g. Solaris)
8408#
8409
8410if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
8411
8412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8413/* end confdefs.h.  */
8414#include <netdb.h>
8415int
8416main ()
8417{
8418
8419	    char *name = "www.gnu.org";
8420	    struct hostent ret;
8421	    char buf[1024];
8422	    int buflen = 1024;
8423	    int my_h_errno;
8424	    (void)gethostbyname_r(name, &ret, buf, buflen, &my_h_errno) /* ; */
8425
8426  ;
8427  return 0;
8428}
8429_ACEOF
8430if ac_fn_c_try_compile "$LINENO"; then :
8431  ac_cv_func_which_gethostbyname_r=five
8432fi
8433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8434
8435fi
8436
8437#
8438# THREE ARGUMENTS
8439# (e.g. AIX, HP-UX, Tru64)
8440#
8441
8442if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
8443
8444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8445/* end confdefs.h.  */
8446#include <netdb.h>
8447int
8448main ()
8449{
8450
8451	    char *name = "www.gnu.org";
8452	    struct hostent ret;
8453	    struct hostent_data data;
8454	    (void)gethostbyname_r(name, &ret, &data) /* ; */
8455
8456  ;
8457  return 0;
8458}
8459_ACEOF
8460if ac_fn_c_try_compile "$LINENO"; then :
8461  ac_cv_func_which_gethostbyname_r=three
8462fi
8463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8464
8465fi
8466
8467################################################################
8468
8469
8470fi
8471
8472case "$ac_cv_func_which_gethostbyname_r" in
8473    three)
8474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: three" >&5
8475$as_echo "three" >&6; }
8476    $as_echo "#define HAVE_FUNC_GETHOSTBYNAME_R_3 1" >>confdefs.h
8477
8478    ;;
8479
8480    five)
8481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: five" >&5
8482$as_echo "five" >&6; }
8483    $as_echo "#define HAVE_FUNC_GETHOSTBYNAME_R_5 1" >>confdefs.h
8484
8485    ;;
8486
8487    six)
8488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: six" >&5
8489$as_echo "six" >&6; }
8490    $as_echo "#define HAVE_FUNC_GETHOSTBYNAME_R_6 1" >>confdefs.h
8491
8492    ;;
8493
8494    no)
8495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find function declaration in netdb.h" >&5
8496$as_echo "cannot find function declaration in netdb.h" >&6; }
8497    ;;
8498
8499    unknown)
8500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't tell" >&5
8501$as_echo "can't tell" >&6; }
8502    ;;
8503
8504    *)
8505    as_fn_error $? "internal error" "$LINENO" 5
8506    ;;
8507esac
8508
8509ac_ext=c
8510ac_cpp='$CPP $CPPFLAGS'
8511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8513ac_compiler_gnu=$ac_cv_c_compiler_gnu
8514
8515
8516
8517case "$ac_cv_func_which_gethostbyname_r" in
8518   three)
8519
8520$as_echo "#define HAVE_FUNC_GETHOSTBYNAME_R_3 /**/" >>confdefs.h
8521
8522   GAPCMON_CFLAGS="$GAPCMON_CFLAGS -DHAVE_FUNC_GETHOSTBYNAME_R_3"
8523   ;;
8524
8525   five)
8526
8527$as_echo "#define HAVE_FUNC_GETHOSTBYNAME_R_5 /**/" >>confdefs.h
8528
8529   GAPCMON_CFLAGS="$GAPCMON_CFLAGS -DHAVE_FUNC_GETHOSTBYNAME_R_5"
8530   ;;
8531
8532   six)
8533
8534$as_echo "#define HAVE_FUNC_GETHOSTBYNAME_R_6 /**/" >>confdefs.h
8535
8536   GAPCMON_CFLAGS="$GAPCMON_CFLAGS -DHAVE_FUNC_GETHOSTBYNAME_R_6"
8537   ;;
8538
8539   no)
8540
8541$as_echo "#define HAVE_FUNC_GETHOSTBYNAME_R_0 /**/" >>confdefs.h
8542
8543   GAPCMON_CFLAGS="$GAPCMON_CFLAGS -DHAVE_FUNC_GETHOSTBYNAME_R_0"
8544   ;;
8545
8546   *)
8547   as_fn_error $? "gethostbyname_r is required" "$LINENO" 5
8548   ;;
8549esac
8550
8551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-exceptions" >&5
8552$as_echo_n "checking whether C compiler accepts -fno-exceptions... " >&6; }
8553if ${ax_cv_check_cflags___fno_exceptions+:} false; then :
8554  $as_echo_n "(cached) " >&6
8555else
8556
8557  ax_check_save_flags=$CFLAGS
8558  CFLAGS="$CFLAGS  -fno-exceptions"
8559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8560/* end confdefs.h.  */
8561
8562int
8563main ()
8564{
8565
8566  ;
8567  return 0;
8568}
8569_ACEOF
8570if ac_fn_c_try_compile "$LINENO"; then :
8571  ax_cv_check_cflags___fno_exceptions=yes
8572else
8573  ax_cv_check_cflags___fno_exceptions=no
8574fi
8575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8576  CFLAGS=$ax_check_save_flags
8577fi
8578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_exceptions" >&5
8579$as_echo "$ax_cv_check_cflags___fno_exceptions" >&6; }
8580if test x"$ax_cv_check_cflags___fno_exceptions" = xyes; then :
8581  CXXFLAGS="$CXXFLAGS -fno-exceptions"
8582else
8583  :
8584fi
8585
8586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-rtti" >&5
8587$as_echo_n "checking whether C compiler accepts -fno-rtti... " >&6; }
8588if ${ax_cv_check_cflags___fno_rtti+:} false; then :
8589  $as_echo_n "(cached) " >&6
8590else
8591
8592  ax_check_save_flags=$CFLAGS
8593  CFLAGS="$CFLAGS  -fno-rtti"
8594  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8595/* end confdefs.h.  */
8596
8597int
8598main ()
8599{
8600
8601  ;
8602  return 0;
8603}
8604_ACEOF
8605if ac_fn_c_try_compile "$LINENO"; then :
8606  ax_cv_check_cflags___fno_rtti=yes
8607else
8608  ax_cv_check_cflags___fno_rtti=no
8609fi
8610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8611  CFLAGS=$ax_check_save_flags
8612fi
8613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_rtti" >&5
8614$as_echo "$ax_cv_check_cflags___fno_rtti" >&6; }
8615if test x"$ax_cv_check_cflags___fno_rtti" = xyes; then :
8616  CXXFLAGS="$CXXFLAGS -fno-rtti"
8617else
8618  :
8619fi
8620
8621
8622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wall" >&5
8623$as_echo_n "checking whether C compiler accepts -Wall... " >&6; }
8624if ${ax_cv_check_cflags___Wall+:} false; then :
8625  $as_echo_n "(cached) " >&6
8626else
8627
8628  ax_check_save_flags=$CFLAGS
8629  CFLAGS="$CFLAGS  -Wall"
8630  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8631/* end confdefs.h.  */
8632
8633int
8634main ()
8635{
8636
8637  ;
8638  return 0;
8639}
8640_ACEOF
8641if ac_fn_c_try_compile "$LINENO"; then :
8642  ax_cv_check_cflags___Wall=yes
8643else
8644  ax_cv_check_cflags___Wall=no
8645fi
8646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8647  CFLAGS=$ax_check_save_flags
8648fi
8649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wall" >&5
8650$as_echo "$ax_cv_check_cflags___Wall" >&6; }
8651if test x"$ax_cv_check_cflags___Wall" = xyes; then :
8652  CXXFLAGS="$CXXFLAGS -Wall"
8653else
8654  :
8655fi
8656
8657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wno-unused-result" >&5
8658$as_echo_n "checking whether C compiler accepts -Wno-unused-result... " >&6; }
8659if ${ax_cv_check_cflags___Wno_unused_result+:} false; then :
8660  $as_echo_n "(cached) " >&6
8661else
8662
8663  ax_check_save_flags=$CFLAGS
8664  CFLAGS="$CFLAGS  -Wno-unused-result"
8665  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8666/* end confdefs.h.  */
8667
8668int
8669main ()
8670{
8671
8672  ;
8673  return 0;
8674}
8675_ACEOF
8676if ac_fn_c_try_compile "$LINENO"; then :
8677  ax_cv_check_cflags___Wno_unused_result=yes
8678else
8679  ax_cv_check_cflags___Wno_unused_result=no
8680fi
8681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8682  CFLAGS=$ax_check_save_flags
8683fi
8684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wno_unused_result" >&5
8685$as_echo "$ax_cv_check_cflags___Wno_unused_result" >&6; }
8686if test x"$ax_cv_check_cflags___Wno_unused_result" = xyes; then :
8687  CXXFLAGS="$CXXFLAGS -Wno-unused-result"
8688else
8689  :
8690fi
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708cat >>confdefs.h <<_ACEOF
8709#define SYSCONFDIR "$sysconfdir"
8710_ACEOF
8711
8712
8713
8714
8715
8716MKINSTALLDIRS=
8717if test -n "$ac_aux_dir"; then
8718   MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8719fi
8720if test x$MKINSTALLDIRS = x ; then
8721   MKINSTALLDIRS="\$(topdir)/autoconf/mkinstalldirs"
8722fi
8723
8724
8725
8726
8727
8728
8729
8730
8731for ac_func in wait waitpid wait3
8732do :
8733  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8734ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8735if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8736  cat >>confdefs.h <<_ACEOF
8737#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8738_ACEOF
8739
8740fi
8741done
8742
8743
8744if test "$ENABLE_CGI" = "yes"
8745then
8746   for ac_func in snprintf
8747do :
8748  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
8749if test "x$ac_cv_func_snprintf" = xyes; then :
8750  cat >>confdefs.h <<_ACEOF
8751#define HAVE_SNPRINTF 1
8752_ACEOF
8753
8754else
8755  as_fn_error $? "cannot find required function." "$LINENO" 5
8756fi
8757done
8758
8759   echo 'Enabling cgi program support...'
8760else
8761   echo 'Disabling cgi support...'
8762fi
8763
8764
8765# now allow user to specify DISTNAME
8766
8767# Check whether --with-distname was given.
8768if test "${with_distname+set}" = set; then :
8769  withval=$with_distname; DISTNAME=$withval
8770fi
8771
8772
8773if test "x$DISTNAME" != "x"
8774then
8775   echo "distname set to $DISTNAME"
8776elif test "$host_os" = "mingw32" ; then
8777   DISTNAME=mingw
8778elif test $HAVE_UNAME=yes -a x`uname -s` = xOSF1
8779then
8780   DISTNAME=alpha
8781elif test $HAVE_UNAME=yes -a x`uname -s` = xHP-UX
8782then
8783   DISTNAME=hpux
8784elif test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
8785then
8786   DISTNAME=sun
8787elif test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD
8788then
8789   DISTNAME=freebsd
8790elif test $HAVE_UNAME=yes -a x`uname -s` = xNetBSD
8791then
8792   DISTNAME=netbsd
8793elif test $HAVE_UNAME=yes -a x`uname -s` = xOpenBSD
8794then
8795   DISTNAME=openbsd
8796elif test $HAVE_UNAME=yes -a x`uname -s` = xBSD/OS
8797then
8798   DISTNAME=bsdi
8799elif test $HAVE_UNAME=yes -a x`uname -s` = xDarwin
8800then
8801    DISTNAME=darwin
8802elif test $HAVE_UNAME=yes -a x`uname -s` = xQNX
8803then
8804   DISTNAME=qnx
8805elif test -f /etc/SuSE-release
8806then
8807   DISTNAME=suse
8808elif test -d /etc/SuSEconfig
8809then
8810   DISTNAME=suse5
8811elif test -f /etc/mandrake-release
8812then
8813    DISTNAME=mandrake
8814elif test -f /etc/whitebox-release
8815then
8816   DISTNAME=redhat
8817elif test -f /etc/redhat-release
8818then
8819   DISTNAME=redhat
8820elif test -f /etc/yellowdog-release
8821then
8822   DISTNAME=yellowdog
8823elif test -f /etc/debian_version
8824then
8825   DISTNAME=debian
8826elif test -f /etc/slackware-version
8827then
8828   DISTNAME=slackware
8829elif test -f /etc/gentoo-release
8830then
8831   DISTNAME=gentoo
8832elif test -f /etc/arch-release
8833then
8834   DISTNAME=archlinux
8835elif test -f /etc/engarde-version
8836then
8837   DISTNAME=engarde
8838else
8839   DISTNAME=unknown
8840fi
8841
8842DISTDIR=$DISTNAME
8843with_distdir="yes"
8844# Check whether --enable-install-distdir was given.
8845if test "${enable_install_distdir+set}" = set; then :
8846  enableval=$enable_install_distdir;  if test "$enableval" = "no" ; then
8847        DISTDIR=""
8848        with_distdir="no"
8849     fi
8850fi
8851
8852
8853
8854
8855# Define the default UPS
8856UPSTYPE=brazil
8857
8858# Define the default Cable
8859UPSCABLE=simple
8860
8861# set the default nologin directory
8862nologdir=/etc
8863
8864# Find the default directory to put the root-mode PID file in
8865for PIDDIR in "/var/run" "/etc/apcctrl"
8866do
8867   if test -d $PIDDIR
8868   then
8869      break;
8870   fi
8871done
8872
8873# Find the default directory to put the apcctrl.events and apcctrl.status files
8874for LOGDIR in "/var/log" "/etc/apcctrl"
8875do
8876   if test -d $LOGDIR
8877   then
8878      break;
8879   fi
8880done
8881
8882# set the default serial port lock director
8883for LOCKDIR in "/var/lock" "/var/spool/locks" "/etc/apcctrl"
8884do
8885   if test -d $LOCKDIR
8886   then
8887      break;
8888   fi
8889done
8890
8891# set the default PWRFAILDIR
8892PWRFAILDIR=${sysconfdir}
8893
8894# define the default serial port device
8895SERIALDEV=/dev/ttyS0
8896
8897# define the default NIS (Network Information Server -- CGI) port
8898NISPORT=3551
8899
8900#
8901# Now we set appropriate distribution specific
8902#  variables and defaults
8903#
8904case "$DISTNAME" in
8905alpha)
8906   PTHREAD_LFLAGS="-lpthread -lexc"
8907   DISTVER=`uname -r`
8908   SERIALDEV=/dev/tty01
8909   LOCKDIR=/var/spool/locks
8910   LOGDIR=/etc/apcctrl
8911   DFILES="\
8912      platforms/alpha/apcctrl \
8913      platforms/alpha/awkhaltprog"
8914   ;;
8915bsdi)
8916   DISTVER=`uname -a |awk '{print $3}'`
8917   ;;
8918debian)
8919   DISTVER=`cat /etc/debian_version`
8920   DFILES="\
8921      platforms/debian/apcctrl \
8922      platforms/debian/ups-monitor"
8923   ;;
8924freebsd)
8925   DISTVER=`uname -a |awk '{print $3}'`
8926   SERIALDEV=/dev/cuaa0
8927   nologdir=/var/run
8928   PWRFAILDIR=/var/run
8929   LOCKDIR=/var/spool/lock
8930   PTHREAD_CFLAGS="-pthread"
8931   PTHREAD_LFLAGS=""
8932   LDFLAGS="$LDFLAGS -pthread"
8933   DFILES="\
8934      platforms/freebsd/apcctrl \
8935      platforms/freebsd/apccontrol"
8936   ;;
8937gentoo)
8938   DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
8939   DFILES="\
8940      platforms/gentoo/apcctrl \
8941      platforms/gentoo/halt"
8942   ;;
8943hpux)
8944   DISTVER=`uname -r`
8945   SERIALDEV=/dev/tty0p0
8946   PTHREAD_CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
8947   DFILES="\
8948      platforms/hpux/apcctrl \
8949      platforms/hpux/halt"
8950   ;;
8951netbsd)
8952   DISTVER=`uname -a |awk '{print $3}'`
8953   SERIALDEV=/dev/cua01
8954   PTHREAD_CFLAGS="-pthread"
8955   PTHREAD_LFLAGS=""
8956   LDFLAGS="$LDFLAGS -pthread"
8957   DFILES="\
8958      platforms/netbsd/apcctrl"
8959   ;;
8960openbsd)
8961   DISTVER=`uname -a |awk '{print $3}'`
8962   SERIALDEV=/dev/cua01
8963   LOCKDIR=/var/spool/lock
8964   PTHREAD_CFLAGS="-pthread"
8965   PTHREAD_LFLAGS=""
8966   LDFLAGS="$LDFLAGS -pthread"
8967   DFILES="\
8968      platforms/openbsd/apcctrl \
8969      platforms/openbsd/apccontrol"
8970  ;;
8971mandrake)
8972   DISTVER=`cat /etc/mandrake-release | grep release | cut -f 5 -d ' '`
8973   DFILES="\
8974      platforms/mandrake/apcctrl \
8975      platforms/mandrake/apcctrl.spec \
8976      platforms/mandrake/awkhaltprog"
8977   ;;
8978redhat)
8979   if test -f /etc/whitebox-release ; then
8980      f=/etc/whitebox-release
8981   else
8982      f=/etc/redhat-release
8983   fi
8984   if test `cat $f | grep release | cut -f 3 -d ' '`x = "Enterprise"x ; then
8985      DISTVER="Enterprise "`cat $f | grep release | cut -f 6 -d ' '`
8986   else
8987      DISTVER=`cat /etc/redhat-release | grep release | cut -f 5 -d ' '`
8988   fi
8989   DFILES="\
8990      platforms/redhat/apcctrl \
8991      platforms/redhat/apcctrl.spec \
8992      platforms/redhat/awkhaltprog"
8993   ;;
8994yellowdog)
8995    if test `cat /etc/yellowdog-release | grep release | cut -f 3 -d ' '`x = "Enterprise"x ; then
8996       DISTVER="Enterprise "`cat /etc/yellowdog-release | grep release | cut -f 6 -d ' '`
8997    else
8998       DISTVER=`cat /etc/yellowdog-release | grep release | cut -f 5 -d ' '`
8999   fi
9000   DFILES="\
9001      platforms/yellowdog/apcctrl \
9002      platforms/yellowdog/apcctrl.spec \
9003      platforms/yellowdog/awkhaltprog"
9004   ;;
9005engarde)
9006   DISTVER=`cat /etc/engarde-release | grep ersion | cut -f 5 -d ' '`
9007   DFILES="\
9008      platforms/engarde/apcctrl \
9009      platforms/engarde/apcctrl.spec \
9010      platforms/engarde/awkhaltprog"
9011   ;;
9012slackware)
9013   DISTVER=`cat /etc/slackware-version`
9014   DFILES="\
9015      platforms/slackware/apcctrl \
9016      platforms/slackware/rc6.patch"
9017   ;;
9018archlinux)
9019   DISTVER="Arch Linux"
9020   SERIALDEV=/dev/ttyACM0
9021   sbindir=/usr/sbin
9022   ;;
9023sun)
9024   DISTVER=Solaris
9025   SERIALDEV=/dev/ttya
9026   PWRFAILDIR=/etc
9027   PIDDIR=/var/run
9028   LOCKDIR=/var/spool/locks
9029   LOGDIR=${sysconfdir}
9030   APCCTRL_MAIL=/usr/bin/mailx
9031   PTHREAD_CFLAGS="-D_POSIX_PTHREAD_SEMANTICS"
9032   DFILES="\
9033      platforms/sun/apcctrl \
9034      platforms/sun/rc0.solaris \
9035      platforms/sun/apccontrol"
9036   ;;
9037suse)
9038   DISTVER=`cat /etc/SuSE-release |grep VERSION| cut -f 3 -d ' '`
9039   DFILES="\
9040      platforms/suse/apcctrl \
9041      platforms/suse/awkhaltprog"
9042   ;;
9043suse5)
9044   DISTNAME=suse
9045   DISTVER=5.x
9046   DFILES="\
9047      platforms/suse/apcctrl \
9048      platforms/suse/halt-setup.sh \
9049      platforms/suse/halt"
9050   ;;
9051darwin)
9052   DISTVER=`uname -r`
9053   SERIALDEV=
9054   UPSTYPE=usb
9055   UPSCABLE=usb
9056   PIDDIR=/var/run
9057   LOCKDIR=/var/tmp
9058   DFILES="\
9059      platforms/darwin/apccontrol \
9060      platforms/darwin/apcctrl-start \
9061      platforms/darwin/apcctrl-uninstall \
9062      platforms/darwin/org.apcctrl.apcctrl.plist"
9063   ;;
9064qnx)
9065   PTHREAD_LFLAGS=""
9066   DISTVER=`uname -r`
9067   SERIALDEV=/dev/ser1
9068   DFILES="\
9069      platforms/qnx/apcctrl \
9070      platforms/qnx/apccontrol"
9071   ;;
9072mingw)
9073   PTHREAD_LFLAGS="-lpthreadGCE"
9074   LIBS="${LIBS} -luser32 -lgdi32 -lwsock32 -lnetapi32"
9075   CPPFLAGS="${CPPFLAGS} -D_WIN32_IE=0x0500"
9076   WIN32=win32
9077
9078   ;;
9079unknown)
9080   DISTVER=unknown
9081   DFILES="\
9082      platforms/unknown/apcctrl \
9083      platforms/unknown/halt"
9084  ;;
9085*)
9086  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Something went wrong. Unknown DISTNAME $DISTNAME" >&5
9087$as_echo "$as_me: WARNING: Something went wrong. Unknown DISTNAME $DISTNAME" >&2;}
9088  ;;
9089esac
9090
9091
9092# Check whether --with-nologin was given.
9093if test "${with_nologin+set}" = set; then :
9094  withval=$with_nologin;  nologdir="$withval";
9095fi
9096
9097
9098# now allow the user to specify the PID directory
9099
9100# Check whether --with-pid-dir was given.
9101if test "${with_pid_dir+set}" = set; then :
9102  withval=$with_pid_dir; PIDDIR="$withval";
9103fi
9104
9105
9106# now allow user to specify LOGDIR
9107
9108# Check whether --with-log-dir was given.
9109if test "${with_log_dir+set}" = set; then :
9110  withval=$with_log_dir; LOGDIR="$withval";
9111fi
9112
9113
9114# now allow user to specify LOCKDIR
9115
9116# Check whether --with-lock-dir was given.
9117if test "${with_lock_dir+set}" = set; then :
9118  withval=$with_lock_dir; LOCKDIR="$withval";
9119fi
9120
9121
9122# now allow user to specify PWRFAILDIR
9123
9124# Check whether --with-pwrfail-dir was given.
9125if test "${with_pwrfail_dir+set}" = set; then :
9126  withval=$with_pwrfail_dir; PWRFAILDIR="$withval";
9127fi
9128
9129
9130# now allow user to specify SERIALDEV
9131
9132# Check whether --with-serial-dev was given.
9133if test "${with_serial_dev+set}" = set; then :
9134  withval=$with_serial_dev; SERIALDEV="$withval";
9135fi
9136
9137
9138
9139# Check whether --with-dev was given.
9140if test "${with_dev+set}" = set; then :
9141  withval=$with_dev; SERIALDEV="$withval";
9142fi
9143
9144
9145# now allow user to specify NISPORT
9146
9147# Check whether --with-nis-port was given.
9148if test "${with_nis_port+set}" = set; then :
9149  withval=$with_nis_port; NISPORT="$withval";
9150fi
9151
9152
9153# now allow user to specify UPSTYPE
9154
9155# Check whether --with-upstype was given.
9156if test "${with_upstype+set}" = set; then :
9157  withval=$with_upstype; UPSTYPE="$withval";
9158fi
9159
9160
9161# now allow user to specify UPSCABLE
9162
9163# Check whether --with-upscable was given.
9164if test "${with_upscable+set}" = set; then :
9165  withval=$with_upscable; UPSCABLE="$withval";
9166fi
9167
9168
9169
9170
9171
9172
9173cat >>confdefs.h <<_ACEOF
9174#define PIDDIR "$PIDDIR"
9175_ACEOF
9176
9177
9178
9179cat >>confdefs.h <<_ACEOF
9180#define LOGDIR "$LOGDIR"
9181_ACEOF
9182
9183
9184
9185cat >>confdefs.h <<_ACEOF
9186#define NOLOGDIR "$nologdir"
9187_ACEOF
9188
9189
9190
9191cat >>confdefs.h <<_ACEOF
9192#define PWRFAILDIR "$PWRFAILDIR"
9193_ACEOF
9194
9195
9196
9197
9198
9199cat >>confdefs.h <<_ACEOF
9200#define NISPORT $NISPORT
9201_ACEOF
9202
9203
9204
9205
9206HOST=$DISTNAME
9207
9208cat >>confdefs.h <<_ACEOF
9209#define HOST "$HOST"
9210_ACEOF
9211
9212
9213
9214gccinclude="."
9215
9216if test "$CC" = "gcc"
9217then
9218   rm -f $srcdir/gcc.v
9219   $CC -v 2> $srcdir/gcc.v
9220   gccinclude=`cat $srcdir/gcc.v|grep specs|awk '{print $4}'| \
9221      sed -e 's|specs|include|g'`
9222   echo "gcc private include directory found."
9223   rm -f $srcdir/gcc.v
9224fi
9225
9226GENERATE_FILES="\
9227   autoconf/variables.mak \
9228   platforms/apccontrol \
9229   platforms/etc/changeme \
9230   platforms/etc/commfailure \
9231   platforms/etc/commok \
9232   platforms/etc/offbattery \
9233   platforms/etc/onbattery \
9234   platforms/etc/apcctrl.conf \
9235   examples/safe.apccontrol \
9236   $DFILES"
9237
9238if test "$needlibusb"x = "true"x
9239then
9240   GENERATE_FILES="$GENERATE_FILES \
9241   include/libusb.h"
9242fi
9243
9244if test "$ENABLE_CGI" = "yes"
9245then
9246   GENERATE_FILES="$GENERATE_FILES src/cgi/cgiconfig.h"
9247fi
9248
9249ac_config_files="$ac_config_files ${GENERATE_FILES}"
9250
9251cat >confcache <<\_ACEOF
9252# This file is a shell script that caches the results of configure
9253# tests run on this system so they can be shared between configure
9254# scripts and configure runs, see configure's option --config-cache.
9255# It is not useful on other systems.  If it contains results you don't
9256# want to keep, you may remove or edit it.
9257#
9258# config.status only pays attention to the cache file if you give it
9259# the --recheck option to rerun configure.
9260#
9261# `ac_cv_env_foo' variables (set or unset) will be overridden when
9262# loading this file, other *unset* `ac_cv_foo' will be assigned the
9263# following values.
9264
9265_ACEOF
9266
9267# The following way of writing the cache mishandles newlines in values,
9268# but we know of no workaround that is simple, portable, and efficient.
9269# So, we kill variables containing newlines.
9270# Ultrix sh set writes to stderr and can't be redirected directly,
9271# and sets the high bit in the cache file unless we assign to the vars.
9272(
9273  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
9274    eval ac_val=\$$ac_var
9275    case $ac_val in #(
9276    *${as_nl}*)
9277      case $ac_var in #(
9278      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
9279$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
9280      esac
9281      case $ac_var in #(
9282      _ | IFS | as_nl) ;; #(
9283      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
9284      *) { eval $ac_var=; unset $ac_var;} ;;
9285      esac ;;
9286    esac
9287  done
9288
9289  (set) 2>&1 |
9290    case $as_nl`(ac_space=' '; set) 2>&1` in #(
9291    *${as_nl}ac_space=\ *)
9292      # `set' does not quote correctly, so add quotes: double-quote
9293      # substitution turns \\\\ into \\, and sed turns \\ into \.
9294      sed -n \
9295	"s/'/'\\\\''/g;
9296	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
9297      ;; #(
9298    *)
9299      # `set' quotes correctly as required by POSIX, so do not add quotes.
9300      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
9301      ;;
9302    esac |
9303    sort
9304) |
9305  sed '
9306     /^ac_cv_env_/b end
9307     t clear
9308     :clear
9309     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
9310     t end
9311     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9312     :end' >>confcache
9313if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
9314  if test -w "$cache_file"; then
9315    if test "x$cache_file" != "x/dev/null"; then
9316      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
9317$as_echo "$as_me: updating cache $cache_file" >&6;}
9318      if test ! -f "$cache_file" || test -h "$cache_file"; then
9319	cat confcache >"$cache_file"
9320      else
9321        case $cache_file in #(
9322        */* | ?:*)
9323	  mv -f confcache "$cache_file"$$ &&
9324	  mv -f "$cache_file"$$ "$cache_file" ;; #(
9325        *)
9326	  mv -f confcache "$cache_file" ;;
9327	esac
9328      fi
9329    fi
9330  else
9331    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
9332$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
9333  fi
9334fi
9335rm -f confcache
9336
9337test "x$prefix" = xNONE && prefix=$ac_default_prefix
9338# Let make expand exec_prefix.
9339test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9340
9341DEFS=-DHAVE_CONFIG_H
9342
9343ac_libobjs=
9344ac_ltlibobjs=
9345U=
9346for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9347  # 1. Remove the extension, and $U if already installed.
9348  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
9349  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
9350  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
9351  #    will be set to the directory where LIBOBJS objects are built.
9352  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
9353  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
9354done
9355LIBOBJS=$ac_libobjs
9356
9357LTLIBOBJS=$ac_ltlibobjs
9358
9359
9360
9361: "${CONFIG_STATUS=./config.status}"
9362ac_write_fail=0
9363ac_clean_files_save=$ac_clean_files
9364ac_clean_files="$ac_clean_files $CONFIG_STATUS"
9365{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
9366$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
9367as_write_fail=0
9368cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
9369#! $SHELL
9370# Generated by $as_me.
9371# Run this file to recreate the current configuration.
9372# Compiler output produced by configure, useful for debugging
9373# configure, is in config.log if it exists.
9374
9375debug=false
9376ac_cs_recheck=false
9377ac_cs_silent=false
9378
9379SHELL=\${CONFIG_SHELL-$SHELL}
9380export SHELL
9381_ASEOF
9382cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
9383## -------------------- ##
9384## M4sh Initialization. ##
9385## -------------------- ##
9386
9387# Be more Bourne compatible
9388DUALCASE=1; export DUALCASE # for MKS sh
9389if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
9390  emulate sh
9391  NULLCMD=:
9392  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
9393  # is contrary to our usage.  Disable this feature.
9394  alias -g '${1+"$@"}'='"$@"'
9395  setopt NO_GLOB_SUBST
9396else
9397  case `(set -o) 2>/dev/null` in #(
9398  *posix*) :
9399    set -o posix ;; #(
9400  *) :
9401     ;;
9402esac
9403fi
9404
9405
9406as_nl='
9407'
9408export as_nl
9409# Printing a long string crashes Solaris 7 /usr/bin/printf.
9410as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
9411as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
9412as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
9413# Prefer a ksh shell builtin over an external printf program on Solaris,
9414# but without wasting forks for bash or zsh.
9415if test -z "$BASH_VERSION$ZSH_VERSION" \
9416    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
9417  as_echo='print -r --'
9418  as_echo_n='print -rn --'
9419elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
9420  as_echo='printf %s\n'
9421  as_echo_n='printf %s'
9422else
9423  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
9424    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
9425    as_echo_n='/usr/ucb/echo -n'
9426  else
9427    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
9428    as_echo_n_body='eval
9429      arg=$1;
9430      case $arg in #(
9431      *"$as_nl"*)
9432	expr "X$arg" : "X\\(.*\\)$as_nl";
9433	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
9434      esac;
9435      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
9436    '
9437    export as_echo_n_body
9438    as_echo_n='sh -c $as_echo_n_body as_echo'
9439  fi
9440  export as_echo_body
9441  as_echo='sh -c $as_echo_body as_echo'
9442fi
9443
9444# The user is always right.
9445if test "${PATH_SEPARATOR+set}" != set; then
9446  PATH_SEPARATOR=:
9447  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
9448    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
9449      PATH_SEPARATOR=';'
9450  }
9451fi
9452
9453
9454# IFS
9455# We need space, tab and new line, in precisely that order.  Quoting is
9456# there to prevent editors from complaining about space-tab.
9457# (If _AS_PATH_WALK were called with IFS unset, it would disable word
9458# splitting by setting IFS to empty value.)
9459IFS=" ""	$as_nl"
9460
9461# Find who we are.  Look in the path if we contain no directory separator.
9462as_myself=
9463case $0 in #((
9464  *[\\/]* ) as_myself=$0 ;;
9465  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9466for as_dir in $PATH
9467do
9468  IFS=$as_save_IFS
9469  test -z "$as_dir" && as_dir=.
9470    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9471  done
9472IFS=$as_save_IFS
9473
9474     ;;
9475esac
9476# We did not find ourselves, most probably we were run as `sh COMMAND'
9477# in which case we are not to be found in the path.
9478if test "x$as_myself" = x; then
9479  as_myself=$0
9480fi
9481if test ! -f "$as_myself"; then
9482  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
9483  exit 1
9484fi
9485
9486# Unset variables that we do not need and which cause bugs (e.g. in
9487# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
9488# suppresses any "Segmentation fault" message there.  '((' could
9489# trigger a bug in pdksh 5.2.14.
9490for as_var in BASH_ENV ENV MAIL MAILPATH
9491do eval test x\${$as_var+set} = xset \
9492  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
9493done
9494PS1='$ '
9495PS2='> '
9496PS4='+ '
9497
9498# NLS nuisances.
9499LC_ALL=C
9500export LC_ALL
9501LANGUAGE=C
9502export LANGUAGE
9503
9504# CDPATH.
9505(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9506
9507
9508# as_fn_error STATUS ERROR [LINENO LOG_FD]
9509# ----------------------------------------
9510# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
9511# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
9512# script with STATUS, using 1 if that was 0.
9513as_fn_error ()
9514{
9515  as_status=$1; test $as_status -eq 0 && as_status=1
9516  if test "$4"; then
9517    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9518    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
9519  fi
9520  $as_echo "$as_me: error: $2" >&2
9521  as_fn_exit $as_status
9522} # as_fn_error
9523
9524
9525# as_fn_set_status STATUS
9526# -----------------------
9527# Set $? to STATUS, without forking.
9528as_fn_set_status ()
9529{
9530  return $1
9531} # as_fn_set_status
9532
9533# as_fn_exit STATUS
9534# -----------------
9535# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
9536as_fn_exit ()
9537{
9538  set +e
9539  as_fn_set_status $1
9540  exit $1
9541} # as_fn_exit
9542
9543# as_fn_unset VAR
9544# ---------------
9545# Portably unset VAR.
9546as_fn_unset ()
9547{
9548  { eval $1=; unset $1;}
9549}
9550as_unset=as_fn_unset
9551# as_fn_append VAR VALUE
9552# ----------------------
9553# Append the text in VALUE to the end of the definition contained in VAR. Take
9554# advantage of any shell optimizations that allow amortized linear growth over
9555# repeated appends, instead of the typical quadratic growth present in naive
9556# implementations.
9557if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
9558  eval 'as_fn_append ()
9559  {
9560    eval $1+=\$2
9561  }'
9562else
9563  as_fn_append ()
9564  {
9565    eval $1=\$$1\$2
9566  }
9567fi # as_fn_append
9568
9569# as_fn_arith ARG...
9570# ------------------
9571# Perform arithmetic evaluation on the ARGs, and store the result in the
9572# global $as_val. Take advantage of shells that can avoid forks. The arguments
9573# must be portable across $(()) and expr.
9574if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
9575  eval 'as_fn_arith ()
9576  {
9577    as_val=$(( $* ))
9578  }'
9579else
9580  as_fn_arith ()
9581  {
9582    as_val=`expr "$@" || test $? -eq 1`
9583  }
9584fi # as_fn_arith
9585
9586
9587if expr a : '\(a\)' >/dev/null 2>&1 &&
9588   test "X`expr 00001 : '.*\(...\)'`" = X001; then
9589  as_expr=expr
9590else
9591  as_expr=false
9592fi
9593
9594if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
9595  as_basename=basename
9596else
9597  as_basename=false
9598fi
9599
9600if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
9601  as_dirname=dirname
9602else
9603  as_dirname=false
9604fi
9605
9606as_me=`$as_basename -- "$0" ||
9607$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9608	 X"$0" : 'X\(//\)$' \| \
9609	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
9610$as_echo X/"$0" |
9611    sed '/^.*\/\([^/][^/]*\)\/*$/{
9612	    s//\1/
9613	    q
9614	  }
9615	  /^X\/\(\/\/\)$/{
9616	    s//\1/
9617	    q
9618	  }
9619	  /^X\/\(\/\).*/{
9620	    s//\1/
9621	    q
9622	  }
9623	  s/.*/./; q'`
9624
9625# Avoid depending upon Character Ranges.
9626as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9627as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9628as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9629as_cr_digits='0123456789'
9630as_cr_alnum=$as_cr_Letters$as_cr_digits
9631
9632ECHO_C= ECHO_N= ECHO_T=
9633case `echo -n x` in #(((((
9634-n*)
9635  case `echo 'xy\c'` in
9636  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
9637  xy)  ECHO_C='\c';;
9638  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
9639       ECHO_T='	';;
9640  esac;;
9641*)
9642  ECHO_N='-n';;
9643esac
9644
9645rm -f conf$$ conf$$.exe conf$$.file
9646if test -d conf$$.dir; then
9647  rm -f conf$$.dir/conf$$.file
9648else
9649  rm -f conf$$.dir
9650  mkdir conf$$.dir 2>/dev/null
9651fi
9652if (echo >conf$$.file) 2>/dev/null; then
9653  if ln -s conf$$.file conf$$ 2>/dev/null; then
9654    as_ln_s='ln -s'
9655    # ... but there are two gotchas:
9656    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
9657    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
9658    # In both cases, we have to default to `cp -pR'.
9659    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
9660      as_ln_s='cp -pR'
9661  elif ln conf$$.file conf$$ 2>/dev/null; then
9662    as_ln_s=ln
9663  else
9664    as_ln_s='cp -pR'
9665  fi
9666else
9667  as_ln_s='cp -pR'
9668fi
9669rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
9670rmdir conf$$.dir 2>/dev/null
9671
9672
9673# as_fn_mkdir_p
9674# -------------
9675# Create "$as_dir" as a directory, including parents if necessary.
9676as_fn_mkdir_p ()
9677{
9678
9679  case $as_dir in #(
9680  -*) as_dir=./$as_dir;;
9681  esac
9682  test -d "$as_dir" || eval $as_mkdir_p || {
9683    as_dirs=
9684    while :; do
9685      case $as_dir in #(
9686      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
9687      *) as_qdir=$as_dir;;
9688      esac
9689      as_dirs="'$as_qdir' $as_dirs"
9690      as_dir=`$as_dirname -- "$as_dir" ||
9691$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9692	 X"$as_dir" : 'X\(//\)[^/]' \| \
9693	 X"$as_dir" : 'X\(//\)$' \| \
9694	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
9695$as_echo X"$as_dir" |
9696    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9697	    s//\1/
9698	    q
9699	  }
9700	  /^X\(\/\/\)[^/].*/{
9701	    s//\1/
9702	    q
9703	  }
9704	  /^X\(\/\/\)$/{
9705	    s//\1/
9706	    q
9707	  }
9708	  /^X\(\/\).*/{
9709	    s//\1/
9710	    q
9711	  }
9712	  s/.*/./; q'`
9713      test -d "$as_dir" && break
9714    done
9715    test -z "$as_dirs" || eval "mkdir $as_dirs"
9716  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
9717
9718
9719} # as_fn_mkdir_p
9720if mkdir -p . 2>/dev/null; then
9721  as_mkdir_p='mkdir -p "$as_dir"'
9722else
9723  test -d ./-p && rmdir ./-p
9724  as_mkdir_p=false
9725fi
9726
9727
9728# as_fn_executable_p FILE
9729# -----------------------
9730# Test if FILE is an executable regular file.
9731as_fn_executable_p ()
9732{
9733  test -f "$1" && test -x "$1"
9734} # as_fn_executable_p
9735as_test_x='test -x'
9736as_executable_p=as_fn_executable_p
9737
9738# Sed expression to map a string onto a valid CPP name.
9739as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
9740
9741# Sed expression to map a string onto a valid variable name.
9742as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
9743
9744
9745exec 6>&1
9746## ----------------------------------- ##
9747## Main body of $CONFIG_STATUS script. ##
9748## ----------------------------------- ##
9749_ASEOF
9750test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
9751
9752cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9753# Save the log message, to keep $0 and so on meaningful, and to
9754# report actual input values of CONFIG_FILES etc. instead of their
9755# values after options handling.
9756ac_log="
9757This file was extended by $as_me, which was
9758generated by GNU Autoconf 2.69.  Invocation command line was
9759
9760  CONFIG_FILES    = $CONFIG_FILES
9761  CONFIG_HEADERS  = $CONFIG_HEADERS
9762  CONFIG_LINKS    = $CONFIG_LINKS
9763  CONFIG_COMMANDS = $CONFIG_COMMANDS
9764  $ $0 $@
9765
9766on `(hostname || uname -n) 2>/dev/null | sed 1q`
9767"
9768
9769_ACEOF
9770
9771case $ac_config_files in *"
9772"*) set x $ac_config_files; shift; ac_config_files=$*;;
9773esac
9774
9775case $ac_config_headers in *"
9776"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
9777esac
9778
9779
9780cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9781# Files that config.status was made for.
9782config_files="$ac_config_files"
9783config_headers="$ac_config_headers"
9784
9785_ACEOF
9786
9787cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9788ac_cs_usage="\
9789\`$as_me' instantiates files and other configuration actions
9790from templates according to the current configuration.  Unless the files
9791and actions are specified as TAGs, all are instantiated by default.
9792
9793Usage: $0 [OPTION]... [TAG]...
9794
9795  -h, --help       print this help, then exit
9796  -V, --version    print version number and configuration settings, then exit
9797      --config     print configuration, then exit
9798  -q, --quiet, --silent
9799                   do not print progress messages
9800  -d, --debug      don't remove temporary files
9801      --recheck    update $as_me by reconfiguring in the same conditions
9802      --file=FILE[:TEMPLATE]
9803                   instantiate the configuration file FILE
9804      --header=FILE[:TEMPLATE]
9805                   instantiate the configuration header FILE
9806
9807Configuration files:
9808$config_files
9809
9810Configuration headers:
9811$config_headers
9812
9813Report bugs to the package provider."
9814
9815_ACEOF
9816cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9817ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
9818ac_cs_version="\\
9819config.status
9820configured by $0, generated by GNU Autoconf 2.69,
9821  with options \\"\$ac_cs_config\\"
9822
9823Copyright (C) 2012 Free Software Foundation, Inc.
9824This config.status script is free software; the Free Software Foundation
9825gives unlimited permission to copy, distribute and modify it."
9826
9827ac_pwd='$ac_pwd'
9828srcdir='$srcdir'
9829INSTALL='$INSTALL'
9830AWK='$AWK'
9831test -n "\$AWK" || AWK=awk
9832_ACEOF
9833
9834cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9835# The default lists apply if the user does not specify any file.
9836ac_need_defaults=:
9837while test $# != 0
9838do
9839  case $1 in
9840  --*=?*)
9841    ac_option=`expr "X$1" : 'X\([^=]*\)='`
9842    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
9843    ac_shift=:
9844    ;;
9845  --*=)
9846    ac_option=`expr "X$1" : 'X\([^=]*\)='`
9847    ac_optarg=
9848    ac_shift=:
9849    ;;
9850  *)
9851    ac_option=$1
9852    ac_optarg=$2
9853    ac_shift=shift
9854    ;;
9855  esac
9856
9857  case $ac_option in
9858  # Handling of the options.
9859  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9860    ac_cs_recheck=: ;;
9861  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
9862    $as_echo "$ac_cs_version"; exit ;;
9863  --config | --confi | --conf | --con | --co | --c )
9864    $as_echo "$ac_cs_config"; exit ;;
9865  --debug | --debu | --deb | --de | --d | -d )
9866    debug=: ;;
9867  --file | --fil | --fi | --f )
9868    $ac_shift
9869    case $ac_optarg in
9870    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9871    '') as_fn_error $? "missing file argument" ;;
9872    esac
9873    as_fn_append CONFIG_FILES " '$ac_optarg'"
9874    ac_need_defaults=false;;
9875  --header | --heade | --head | --hea )
9876    $ac_shift
9877    case $ac_optarg in
9878    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9879    esac
9880    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
9881    ac_need_defaults=false;;
9882  --he | --h)
9883    # Conflict between --help and --header
9884    as_fn_error $? "ambiguous option: \`$1'
9885Try \`$0 --help' for more information.";;
9886  --help | --hel | -h )
9887    $as_echo "$ac_cs_usage"; exit ;;
9888  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9889  | -silent | --silent | --silen | --sile | --sil | --si | --s)
9890    ac_cs_silent=: ;;
9891
9892  # This is an error.
9893  -*) as_fn_error $? "unrecognized option: \`$1'
9894Try \`$0 --help' for more information." ;;
9895
9896  *) as_fn_append ac_config_targets " $1"
9897     ac_need_defaults=false ;;
9898
9899  esac
9900  shift
9901done
9902
9903ac_configure_extra_args=
9904
9905if $ac_cs_silent; then
9906  exec 6>/dev/null
9907  ac_configure_extra_args="$ac_configure_extra_args --silent"
9908fi
9909
9910_ACEOF
9911cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9912if \$ac_cs_recheck; then
9913  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
9914  shift
9915  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
9916  CONFIG_SHELL='$SHELL'
9917  export CONFIG_SHELL
9918  exec "\$@"
9919fi
9920
9921_ACEOF
9922cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9923exec 5>>config.log
9924{
9925  echo
9926  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9927## Running $as_me. ##
9928_ASBOX
9929  $as_echo "$ac_log"
9930} >&5
9931
9932_ACEOF
9933cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9934_ACEOF
9935
9936cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9937
9938# Handling of arguments.
9939for ac_config_target in $ac_config_targets
9940do
9941  case $ac_config_target in
9942    "include/apcconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS include/apcconfig.h:autoconf/config.h.in" ;;
9943    "${GENERATE_FILES}") CONFIG_FILES="$CONFIG_FILES ${GENERATE_FILES}" ;;
9944
9945  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
9946  esac
9947done
9948
9949
9950# If the user did not use the arguments to specify the items to instantiate,
9951# then the envvar interface is used.  Set only those that are not.
9952# We use the long form for the default assignment because of an extremely
9953# bizarre bug on SunOS 4.1.3.
9954if $ac_need_defaults; then
9955  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
9956  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
9957fi
9958
9959# Have a temporary directory for convenience.  Make it in the build tree
9960# simply because there is no reason against having it here, and in addition,
9961# creating and moving files from /tmp can sometimes cause problems.
9962# Hook for its removal unless debugging.
9963# Note that there is a small window in which the directory will not be cleaned:
9964# after its creation but before its name has been assigned to `$tmp'.
9965$debug ||
9966{
9967  tmp= ac_tmp=
9968  trap 'exit_status=$?
9969  : "${ac_tmp:=$tmp}"
9970  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
9971' 0
9972  trap 'as_fn_exit 1' 1 2 13 15
9973}
9974# Create a (secure) tmp directory for tmp files.
9975
9976{
9977  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
9978  test -d "$tmp"
9979}  ||
9980{
9981  tmp=./conf$$-$RANDOM
9982  (umask 077 && mkdir "$tmp")
9983} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
9984ac_tmp=$tmp
9985
9986# Set up the scripts for CONFIG_FILES section.
9987# No need to generate them if there are no CONFIG_FILES.
9988# This happens for instance with `./config.status config.h'.
9989if test -n "$CONFIG_FILES"; then
9990
9991
9992ac_cr=`echo X | tr X '\015'`
9993# On cygwin, bash can eat \r inside `` if the user requested igncr.
9994# But we know of no other shell where ac_cr would be empty at this
9995# point, so we can use a bashism as a fallback.
9996if test "x$ac_cr" = x; then
9997  eval ac_cr=\$\'\\r\'
9998fi
9999ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
10000if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
10001  ac_cs_awk_cr='\\r'
10002else
10003  ac_cs_awk_cr=$ac_cr
10004fi
10005
10006echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
10007_ACEOF
10008
10009
10010{
10011  echo "cat >conf$$subs.awk <<_ACEOF" &&
10012  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
10013  echo "_ACEOF"
10014} >conf$$subs.sh ||
10015  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10016ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
10017ac_delim='%!_!# '
10018for ac_last_try in false false false false false :; do
10019  . ./conf$$subs.sh ||
10020    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10021
10022  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
10023  if test $ac_delim_n = $ac_delim_num; then
10024    break
10025  elif $ac_last_try; then
10026    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10027  else
10028    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
10029  fi
10030done
10031rm -f conf$$subs.sh
10032
10033cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10034cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
10035_ACEOF
10036sed -n '
10037h
10038s/^/S["/; s/!.*/"]=/
10039p
10040g
10041s/^[^!]*!//
10042:repl
10043t repl
10044s/'"$ac_delim"'$//
10045t delim
10046:nl
10047h
10048s/\(.\{148\}\)..*/\1/
10049t more1
10050s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
10051p
10052n
10053b repl
10054:more1
10055s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10056p
10057g
10058s/.\{148\}//
10059t nl
10060:delim
10061h
10062s/\(.\{148\}\)..*/\1/
10063t more2
10064s/["\\]/\\&/g; s/^/"/; s/$/"/
10065p
10066b
10067:more2
10068s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10069p
10070g
10071s/.\{148\}//
10072t delim
10073' <conf$$subs.awk | sed '
10074/^[^""]/{
10075  N
10076  s/\n//
10077}
10078' >>$CONFIG_STATUS || ac_write_fail=1
10079rm -f conf$$subs.awk
10080cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10081_ACAWK
10082cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
10083  for (key in S) S_is_set[key] = 1
10084  FS = ""
10085
10086}
10087{
10088  line = $ 0
10089  nfields = split(line, field, "@")
10090  substed = 0
10091  len = length(field[1])
10092  for (i = 2; i < nfields; i++) {
10093    key = field[i]
10094    keylen = length(key)
10095    if (S_is_set[key]) {
10096      value = S[key]
10097      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
10098      len += length(value) + length(field[++i])
10099      substed = 1
10100    } else
10101      len += 1 + keylen
10102  }
10103
10104  print line
10105}
10106
10107_ACAWK
10108_ACEOF
10109cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10110if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
10111  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
10112else
10113  cat
10114fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
10115  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
10116_ACEOF
10117
10118# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
10119# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
10120# trailing colons and then remove the whole line if VPATH becomes empty
10121# (actually we leave an empty line to preserve line numbers).
10122if test "x$srcdir" = x.; then
10123  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
10124h
10125s///
10126s/^/:/
10127s/[	 ]*$/:/
10128s/:\$(srcdir):/:/g
10129s/:\${srcdir}:/:/g
10130s/:@srcdir@:/:/g
10131s/^:*//
10132s/:*$//
10133x
10134s/\(=[	 ]*\).*/\1/
10135G
10136s/\n//
10137s/^[^=]*=[	 ]*$//
10138}'
10139fi
10140
10141cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10142fi # test -n "$CONFIG_FILES"
10143
10144# Set up the scripts for CONFIG_HEADERS section.
10145# No need to generate them if there are no CONFIG_HEADERS.
10146# This happens for instance with `./config.status Makefile'.
10147if test -n "$CONFIG_HEADERS"; then
10148cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
10149BEGIN {
10150_ACEOF
10151
10152# Transform confdefs.h into an awk script `defines.awk', embedded as
10153# here-document in config.status, that substitutes the proper values into
10154# config.h.in to produce config.h.
10155
10156# Create a delimiter string that does not exist in confdefs.h, to ease
10157# handling of long lines.
10158ac_delim='%!_!# '
10159for ac_last_try in false false :; do
10160  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
10161  if test -z "$ac_tt"; then
10162    break
10163  elif $ac_last_try; then
10164    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
10165  else
10166    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
10167  fi
10168done
10169
10170# For the awk script, D is an array of macro values keyed by name,
10171# likewise P contains macro parameters if any.  Preserve backslash
10172# newline sequences.
10173
10174ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
10175sed -n '
10176s/.\{148\}/&'"$ac_delim"'/g
10177t rset
10178:rset
10179s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
10180t def
10181d
10182:def
10183s/\\$//
10184t bsnl
10185s/["\\]/\\&/g
10186s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
10187D["\1"]=" \3"/p
10188s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
10189d
10190:bsnl
10191s/["\\]/\\&/g
10192s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
10193D["\1"]=" \3\\\\\\n"\\/p
10194t cont
10195s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
10196t cont
10197d
10198:cont
10199n
10200s/.\{148\}/&'"$ac_delim"'/g
10201t clear
10202:clear
10203s/\\$//
10204t bsnlc
10205s/["\\]/\\&/g; s/^/"/; s/$/"/p
10206d
10207:bsnlc
10208s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
10209b cont
10210' <confdefs.h | sed '
10211s/'"$ac_delim"'/"\\\
10212"/g' >>$CONFIG_STATUS || ac_write_fail=1
10213
10214cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10215  for (key in D) D_is_set[key] = 1
10216  FS = ""
10217}
10218/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
10219  line = \$ 0
10220  split(line, arg, " ")
10221  if (arg[1] == "#") {
10222    defundef = arg[2]
10223    mac1 = arg[3]
10224  } else {
10225    defundef = substr(arg[1], 2)
10226    mac1 = arg[2]
10227  }
10228  split(mac1, mac2, "(") #)
10229  macro = mac2[1]
10230  prefix = substr(line, 1, index(line, defundef) - 1)
10231  if (D_is_set[macro]) {
10232    # Preserve the white space surrounding the "#".
10233    print prefix "define", macro P[macro] D[macro]
10234    next
10235  } else {
10236    # Replace #undef with comments.  This is necessary, for example,
10237    # in the case of _POSIX_SOURCE, which is predefined and required
10238    # on some systems where configure will not decide to define it.
10239    if (defundef == "undef") {
10240      print "/*", prefix defundef, macro, "*/"
10241      next
10242    }
10243  }
10244}
10245{ print }
10246_ACAWK
10247_ACEOF
10248cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10249  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
10250fi # test -n "$CONFIG_HEADERS"
10251
10252
10253eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
10254shift
10255for ac_tag
10256do
10257  case $ac_tag in
10258  :[FHLC]) ac_mode=$ac_tag; continue;;
10259  esac
10260  case $ac_mode$ac_tag in
10261  :[FHL]*:*);;
10262  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
10263  :[FH]-) ac_tag=-:-;;
10264  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
10265  esac
10266  ac_save_IFS=$IFS
10267  IFS=:
10268  set x $ac_tag
10269  IFS=$ac_save_IFS
10270  shift
10271  ac_file=$1
10272  shift
10273
10274  case $ac_mode in
10275  :L) ac_source=$1;;
10276  :[FH])
10277    ac_file_inputs=
10278    for ac_f
10279    do
10280      case $ac_f in
10281      -) ac_f="$ac_tmp/stdin";;
10282      *) # Look for the file first in the build tree, then in the source tree
10283	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
10284	 # because $ac_f cannot contain `:'.
10285	 test -f "$ac_f" ||
10286	   case $ac_f in
10287	   [\\/$]*) false;;
10288	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
10289	   esac ||
10290	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
10291      esac
10292      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
10293      as_fn_append ac_file_inputs " '$ac_f'"
10294    done
10295
10296    # Let's still pretend it is `configure' which instantiates (i.e., don't
10297    # use $as_me), people would be surprised to read:
10298    #    /* config.h.  Generated by config.status.  */
10299    configure_input='Generated from '`
10300	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
10301	`' by configure.'
10302    if test x"$ac_file" != x-; then
10303      configure_input="$ac_file.  $configure_input"
10304      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
10305$as_echo "$as_me: creating $ac_file" >&6;}
10306    fi
10307    # Neutralize special characters interpreted by sed in replacement strings.
10308    case $configure_input in #(
10309    *\&* | *\|* | *\\* )
10310       ac_sed_conf_input=`$as_echo "$configure_input" |
10311       sed 's/[\\\\&|]/\\\\&/g'`;; #(
10312    *) ac_sed_conf_input=$configure_input;;
10313    esac
10314
10315    case $ac_tag in
10316    *:-:* | *:-) cat >"$ac_tmp/stdin" \
10317      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
10318    esac
10319    ;;
10320  esac
10321
10322  ac_dir=`$as_dirname -- "$ac_file" ||
10323$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10324	 X"$ac_file" : 'X\(//\)[^/]' \| \
10325	 X"$ac_file" : 'X\(//\)$' \| \
10326	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
10327$as_echo X"$ac_file" |
10328    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10329	    s//\1/
10330	    q
10331	  }
10332	  /^X\(\/\/\)[^/].*/{
10333	    s//\1/
10334	    q
10335	  }
10336	  /^X\(\/\/\)$/{
10337	    s//\1/
10338	    q
10339	  }
10340	  /^X\(\/\).*/{
10341	    s//\1/
10342	    q
10343	  }
10344	  s/.*/./; q'`
10345  as_dir="$ac_dir"; as_fn_mkdir_p
10346  ac_builddir=.
10347
10348case "$ac_dir" in
10349.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
10350*)
10351  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
10352  # A ".." for each directory in $ac_dir_suffix.
10353  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
10354  case $ac_top_builddir_sub in
10355  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
10356  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
10357  esac ;;
10358esac
10359ac_abs_top_builddir=$ac_pwd
10360ac_abs_builddir=$ac_pwd$ac_dir_suffix
10361# for backward compatibility:
10362ac_top_builddir=$ac_top_build_prefix
10363
10364case $srcdir in
10365  .)  # We are building in place.
10366    ac_srcdir=.
10367    ac_top_srcdir=$ac_top_builddir_sub
10368    ac_abs_top_srcdir=$ac_pwd ;;
10369  [\\/]* | ?:[\\/]* )  # Absolute name.
10370    ac_srcdir=$srcdir$ac_dir_suffix;
10371    ac_top_srcdir=$srcdir
10372    ac_abs_top_srcdir=$srcdir ;;
10373  *) # Relative name.
10374    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
10375    ac_top_srcdir=$ac_top_build_prefix$srcdir
10376    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
10377esac
10378ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
10379
10380
10381  case $ac_mode in
10382  :F)
10383  #
10384  # CONFIG_FILE
10385  #
10386
10387  case $INSTALL in
10388  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
10389  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
10390  esac
10391_ACEOF
10392
10393cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10394# If the template does not know about datarootdir, expand it.
10395# FIXME: This hack should be removed a few years after 2.60.
10396ac_datarootdir_hack=; ac_datarootdir_seen=
10397ac_sed_dataroot='
10398/datarootdir/ {
10399  p
10400  q
10401}
10402/@datadir@/p
10403/@docdir@/p
10404/@infodir@/p
10405/@localedir@/p
10406/@mandir@/p'
10407case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
10408*datarootdir*) ac_datarootdir_seen=yes;;
10409*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
10410  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
10411$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
10412_ACEOF
10413cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10414  ac_datarootdir_hack='
10415  s&@datadir@&$datadir&g
10416  s&@docdir@&$docdir&g
10417  s&@infodir@&$infodir&g
10418  s&@localedir@&$localedir&g
10419  s&@mandir@&$mandir&g
10420  s&\\\${datarootdir}&$datarootdir&g' ;;
10421esac
10422_ACEOF
10423
10424# Neutralize VPATH when `$srcdir' = `.'.
10425# Shell code in configure.ac might set extrasub.
10426# FIXME: do we really want to maintain this feature?
10427cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10428ac_sed_extra="$ac_vpsub
10429$extrasub
10430_ACEOF
10431cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10432:t
10433/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
10434s|@configure_input@|$ac_sed_conf_input|;t t
10435s&@top_builddir@&$ac_top_builddir_sub&;t t
10436s&@top_build_prefix@&$ac_top_build_prefix&;t t
10437s&@srcdir@&$ac_srcdir&;t t
10438s&@abs_srcdir@&$ac_abs_srcdir&;t t
10439s&@top_srcdir@&$ac_top_srcdir&;t t
10440s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
10441s&@builddir@&$ac_builddir&;t t
10442s&@abs_builddir@&$ac_abs_builddir&;t t
10443s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
10444s&@INSTALL@&$ac_INSTALL&;t t
10445$ac_datarootdir_hack
10446"
10447eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
10448  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10449
10450test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
10451  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
10452  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
10453      "$ac_tmp/out"`; test -z "$ac_out"; } &&
10454  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10455which seems to be undefined.  Please make sure it is defined" >&5
10456$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10457which seems to be undefined.  Please make sure it is defined" >&2;}
10458
10459  rm -f "$ac_tmp/stdin"
10460  case $ac_file in
10461  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
10462  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
10463  esac \
10464  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10465 ;;
10466  :H)
10467  #
10468  # CONFIG_HEADER
10469  #
10470  if test x"$ac_file" != x-; then
10471    {
10472      $as_echo "/* $configure_input  */" \
10473      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
10474    } >"$ac_tmp/config.h" \
10475      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10476    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
10477      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
10478$as_echo "$as_me: $ac_file is unchanged" >&6;}
10479    else
10480      rm -f "$ac_file"
10481      mv "$ac_tmp/config.h" "$ac_file" \
10482	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
10483    fi
10484  else
10485    $as_echo "/* $configure_input  */" \
10486      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
10487      || as_fn_error $? "could not create -" "$LINENO" 5
10488  fi
10489 ;;
10490
10491
10492  esac
10493
10494done # for ac_tag
10495
10496
10497as_fn_exit 0
10498_ACEOF
10499ac_clean_files=$ac_clean_files_save
10500
10501test $ac_write_fail = 0 ||
10502  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
10503
10504
10505# configure is writing to config.log, and then calls config.status.
10506# config.status does its own redirection, appending to config.log.
10507# Unfortunately, on DOS this fails, as config.log is still kept open
10508# by configure, so config.status won't be able to write to it; its
10509# output is simply discarded.  So we exec the FD to /dev/null,
10510# effectively closing config.log, so it can be properly (re)opened and
10511# appended to by config.status.  When coming back to configure, we
10512# need to make the FD available again.
10513if test "$no_create" != yes; then
10514  ac_cs_success=:
10515  ac_config_status_args=
10516  test "$silent" = yes &&
10517    ac_config_status_args="$ac_config_status_args --quiet"
10518  exec 5>/dev/null
10519  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
10520  exec 5>>config.log
10521  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10522  # would make configure fail if this is the last instruction.
10523  $ac_cs_success || as_fn_exit 1
10524fi
10525if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
10526  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
10527$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
10528fi
10529
10530
10531chmod 755 examples/safe.apccontrol
10532$MAKE clean
10533
10534#
10535# A whole lot of hand springs to get the compiler version.
10536#  This is because gcc changed the output in version 3.0
10537#
10538CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
10539if test "x${CXXVERSION}" = "x" ; then
10540   CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
10541fi
10542
10543eval srcdir=${srcdir}
10544eval sbindir=${sbindir}
10545eval sysconfdir=${sysconfdir}
10546eval mandir=${mandir}
10547
10548echo "
10549
10550Configuration on `date`:
10551
10552  Host:                       $host -- ${DISTNAME} ${DISTVER}
10553  apcctrl version:            ${VERSION} (${DATE})
10554  Source code location:       ${srcdir}
10555  Install binaries:           ${sbindir}
10556  Install config files:       ${sysconfdir}
10557  Install man files:          ${mandir}
10558  Nologin file in:            ${nologdir}
10559  PID directory:              ${PIDDIR}
10560  LOG dir (events, status)    ${LOGDIR}
10561  LOCK dir (for serial port)  ${LOCKDIR}
10562  Power Fail dir              ${PWRFAILDIR}
10563  Compiler:                   ${CXX} ${CXXVERSION}
10564  Preprocessor flags:         ${CPPFLAGS}
10565  Compiler flags:             ${CXXFLAGS} ${PTHREAD_FLAGS}
10566  Linker:                     ${LD}
10567  Linker flags:               ${LDFLAGS}
10568  Host and version:           ${DISTNAME} ${DISTVER}
10569  Shutdown Program:           ${SHUTDOWN}
10570  Port/Device:                ${SERIALDEV}
10571  Network Info Port (CGI):    ${NISPORT}
10572  UPSTYPE                     ${UPSTYPE}
10573  UPSCABLE                    ${UPSCABLE}
10574
10575  drivers (no-* are disabled): ${APCSMART_DRIVER:-no-apcsmart} ${DUMB_DRIVER:-no-dumb} ${NET_DRIVER:-no-net} ${DISPLAY_USB_DRIVER:-no-usb} ${PCNET_DRIVER:-no-pcnet} ${MODBUS_DRIVER:-no-modbus} ${MODBUS_USB_DRIVER:-no-modbus-usb} ${TEST_DRIVER:-no-test} ${BRAZIL_DRIVER:-no-brazil}
10576
10577  enable-nis:                 ${NISSRV_ENABLED}
10578  with-nisip:                 ${NISIP}
10579  enable-cgi:                 ${ENABLE_CGI}
10580  with-cgi-bin:               ${CGIBIN}
10581  with-libwrap:               ${with_libwrap}
10582  enable-pthreads:            ${with_pthreads}
10583  enable-dist-install:        ${with_distdir}
10584  enable-gapcmon:             ${GAPCMON_ENABLED}
10585  enable-apcagent:            ${APCAGENT_ENABLED}
10586
10587  ****** ATENÇÃO ******
10588
10589  O projeto ApcCtrl necessita da sua ajuda! Informe todos os resultados do seu teste
10590  para os desenvolvedores através do site www.apcctrl.com.br. Modelos atualmente reportados
10591  - BACK UPS BR 1200VA
10592  - BACK UPS BR 1500VA
10593  - BACK UPS BR 2200VA
10594  - SMART UPS BR 3000VA
10595
10596  Deixe um review sobre o projeto no link:
10597  https://sourceforge.net/projects/apcctrl/reviews/
10598
10599  " > config.out
10600
10601cat config.out
10602
10603echo Configuration complete: Run \'$MAKE\' to build apcuspd.
10604echo
10605
10606echo $PATH | grep /usr/ucb >/dev/null
10607if test $? = 0 ; then
10608   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10609      WARNING! You have /usr/ucb on your path. We STRONGLY recommend
10610         that you remove it and rerun configure. Otherwise
10611         apcctrl may be unable to shutdown your system.
10612   " >&5
10613$as_echo "$as_me: WARNING:
10614      WARNING! You have /usr/ucb on your path. We STRONGLY recommend
10615         that you remove it and rerun configure. Otherwise
10616         apcctrl may be unable to shutdown your system.
10617   " >&2;};
10618fi
10619