1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for Zabbix 5.0.19.
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='Zabbix'
579PACKAGE_TARNAME='zabbix'
580PACKAGE_VERSION='5.0.19'
581PACKAGE_STRING='Zabbix 5.0.19'
582PACKAGE_BUGREPORT=''
583PACKAGE_URL=''
584
585ac_unique_file="src/zabbix_server/server.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
589#ifdef HAVE_SYS_TYPES_H
590# include <sys/types.h>
591#endif
592#ifdef HAVE_SYS_STAT_H
593# include <sys/stat.h>
594#endif
595#ifdef STDC_HEADERS
596# include <stdlib.h>
597# include <stddef.h>
598#else
599# ifdef HAVE_STDLIB_H
600#  include <stdlib.h>
601# endif
602#endif
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605#  include <memory.h>
606# endif
607# include <string.h>
608#endif
609#ifdef HAVE_STRINGS_H
610# include <strings.h>
611#endif
612#ifdef HAVE_INTTYPES_H
613# include <inttypes.h>
614#endif
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
619# include <unistd.h>
620#endif"
621
622ac_subst_vars='am__EXEEXT_FALSE
623am__EXEEXT_TRUE
624LTLIBOBJS
625GOWORKDIR
626GOCMD
627GOBIN
628LOAD_MODULE_PATH
629CURL_SSL_KEY_LOCATION
630CURL_SSL_CERT_LOCATION
631ALERT_SCRIPTS_PATH
632EXTERNAL_SCRIPTS_PATH
633AGENT2_CONFIG_FILE
634AGENT_CONFIG_FILE
635PROXY_CONFIG_FILE
636SERVER_CONFIG_FILE
637ZBXJS_LIBS
638ZBXJS_LDFLAGS
639SENDER_LIBS
640SENDER_LDFLAGS
641ZBXGET_LIBS
642ZBXGET_LDFLAGS
643CGO_LDFLAGS
644CGO_CFLAGS
645AGENT2_LIBS
646AGENT2_LDFLAGS
647AGENT_LIBS
648AGENT_LDFLAGS
649PROXY_LIBS
650PROXY_LDFLAGS
651SERVER_LIBS
652SERVER_LDFLAGS
653RANLIB
654ICONV_LDFLAGS
655ICONV_CFLAGS
656ICONV_LIBS
657LIBPCRE_LIBS
658LIBPCRE_LDFLAGS
659LIBPCRE_CFLAGS
660HAVE_LIBCURL_FALSE
661HAVE_LIBCURL_TRUE
662LIBCURL_LIBS
663LIBCURL_LDFLAGS
664LIBCURL_CFLAGS
665_libcurl_config
666LDAP_LIBS
667LDAP_LDFLAGS
668LDAP_CPPFLAGS
669JAR
670JAVAC
671GO
672TLS_CFLAGS
673OPENSSL_LIBS
674OPENSSL_LDFLAGS
675OPENSSL_CFLAGS
676GNUTLS_LIBS
677GNUTLS_LDFLAGS
678GNUTLS_CFLAGS
679LIBEVENT_LIBS
680LIBEVENT_LDFLAGS
681LIBEVENT_CFLAGS
682PROXY_IPCSERVICE_FALSE
683PROXY_IPCSERVICE_TRUE
684HAVE_LIBXML2_FALSE
685HAVE_LIBXML2_TRUE
686HAVE_IPMI_FALSE
687HAVE_IPMI_TRUE
688LIBPTHREAD_LIBS
689LIBPTHREAD_LDFLAGS
690LIBPTHREAD_CFLAGS
691ZLIB_LIBS
692ZLIB_LDFLAGS
693ZLIB_CFLAGS
694OPENIPMI_LIBS
695OPENIPMI_LDFLAGS
696OPENIPMI_CFLAGS
697SSH_LIBS
698SSH_LDFLAGS
699SSH_CFLAGS
700SSH2_LIBS
701SSH2_LDFLAGS
702SSH2_CFLAGS
703SNMP_LIBS
704SNMP_LDFLAGS
705SNMP_CFLAGS
706_libnetsnmp_config
707UNIXODBC_LIBS
708UNIXODBC_CFLAGS
709UNIXODBC_LDFLAGS
710ODBC_CONFIG
711LIBXML2_LIBS
712LIBXML2_LDFLAGS
713LIBXML2_CFLAGS
714LIBXML2_VERSION
715PKG_CONFIG_LIBDIR
716PKG_CONFIG_PATH
717PKG_CONFIG
718DB_LIBS
719DB_LDFLAGS
720DB_CFLAGS
721SQLITE3_VERSION
722SQLITE3_LIBS
723SQLITE3_LDFLAGS
724SQLITE3_CPPFLAGS
725POSTGRESQL_VERSION
726POSTGRESQL_LIBS
727POSTGRESQL_LDFLAGS
728POSTGRESQL_CFLAGS
729PG_CONFIG
730ORACLE_OCI_LIBS
731ORACLE_OCI_LDFLAGS
732ORACLE_OCI_CFLAGS
733ORACLE_OCI_VERSION
734MYSQL_LIBS
735MYSQL_LDFLAGS
736MYSQL_CFLAGS
737MYSQL_VERSION
738MYSQL_CONFIG
739ZBXCMOCKA_FALSE
740ZBXCMOCKA_TRUE
741DBSCHEMA_FALSE
742DBSCHEMA_TRUE
743IPV6_FALSE
744IPV6_TRUE
745JAVA_FALSE
746JAVA_TRUE
747AGENT2_FALSE
748AGENT2_TRUE
749AGENT_FALSE
750AGENT_TRUE
751PROXY_FALSE
752PROXY_TRUE
753SERVER_FALSE
754SERVER_TRUE
755ARCH
756LIBOBJS
757RESOLV_LIBS
758EGREP
759GREP
760CPP
761am__fastdepCC_FALSE
762am__fastdepCC_TRUE
763CCDEPMODE
764am__nodep
765AMDEPBACKSLASH
766AMDEP_FALSE
767AMDEP_TRUE
768am__include
769DEPDIR
770OBJEXT
771EXEEXT
772ac_ct_CC
773CPPFLAGS
774LDFLAGS
775CFLAGS
776CC
777host_os
778host_vendor
779host_cpu
780host
781build_os
782build_vendor
783build_cpu
784build
785AM_BACKSLASH
786AM_DEFAULT_VERBOSITY
787AM_DEFAULT_V
788AM_V
789am__untar
790am__tar
791AMTAR
792am__leading_dot
793SET_MAKE
794AWK
795mkdir_p
796MKDIR_P
797INSTALL_STRIP_PROGRAM
798STRIP
799install_sh
800MAKEINFO
801AUTOHEADER
802AUTOMAKE
803AUTOCONF
804ACLOCAL
805VERSION
806PACKAGE
807CYGPATH_W
808am__isrc
809INSTALL_DATA
810INSTALL_SCRIPT
811INSTALL_PROGRAM
812target_alias
813host_alias
814build_alias
815LIBS
816ECHO_T
817ECHO_N
818ECHO_C
819DEFS
820mandir
821localedir
822libdir
823psdir
824pdfdir
825dvidir
826htmldir
827infodir
828docdir
829oldincludedir
830includedir
831runstatedir
832localstatedir
833sharedstatedir
834sysconfdir
835datadir
836datarootdir
837libexecdir
838sbindir
839bindir
840program_transform_name
841prefix
842exec_prefix
843PACKAGE_URL
844PACKAGE_BUGREPORT
845PACKAGE_STRING
846PACKAGE_VERSION
847PACKAGE_TARNAME
848PACKAGE_NAME
849PATH_SEPARATOR
850SHELL
851am__quote'
852ac_subst_files=''
853ac_user_opts='
854enable_option_checking
855enable_silent_rules
856enable_dependency_tracking
857enable_largefile
858enable_static
859enable_static_libs
860enable_server
861enable_proxy
862enable_agent
863enable_agent2
864enable_java
865enable_ipv6
866with_mysql
867with_oracle
868with_oracle_include
869with_oracle_lib
870with_postgresql
871with_sqlite3
872with_libxml2
873with_unixodbc
874with_net_snmp
875with_ssh2
876with_ssh
877with_openipmi
878with_zlib
879with_zlib_include
880with_zlib_lib
881with_libpthread
882with_libpthread_include
883with_libpthread_lib
884with_libevent
885with_libevent_include
886with_libevent_lib
887with_gnutls
888with_openssl
889with_ldap
890with_libcurl
891with_libpcre
892with_libpcre_include
893with_libpcre_lib
894with_iconv
895with_iconv_include
896with_iconv_lib
897'
898      ac_precious_vars='build_alias
899host_alias
900target_alias
901CC
902CFLAGS
903LDFLAGS
904LIBS
905CPPFLAGS
906CPP
907PKG_CONFIG
908PKG_CONFIG_PATH
909PKG_CONFIG_LIBDIR'
910
911
912# Initialize some variables set by options.
913ac_init_help=
914ac_init_version=false
915ac_unrecognized_opts=
916ac_unrecognized_sep=
917# The variables have the same names as the options, with
918# dashes changed to underlines.
919cache_file=/dev/null
920exec_prefix=NONE
921no_create=
922no_recursion=
923prefix=NONE
924program_prefix=NONE
925program_suffix=NONE
926program_transform_name=s,x,x,
927silent=
928site=
929srcdir=
930verbose=
931x_includes=NONE
932x_libraries=NONE
933
934# Installation directory options.
935# These are left unexpanded so users can "make install exec_prefix=/foo"
936# and all the variables that are supposed to be based on exec_prefix
937# by default will actually change.
938# Use braces instead of parens because sh, perl, etc. also accept them.
939# (The list follows the same order as the GNU Coding Standards.)
940bindir='${exec_prefix}/bin'
941sbindir='${exec_prefix}/sbin'
942libexecdir='${exec_prefix}/libexec'
943datarootdir='${prefix}/share'
944datadir='${datarootdir}'
945sysconfdir='${prefix}/etc'
946sharedstatedir='${prefix}/com'
947localstatedir='${prefix}/var'
948runstatedir='${localstatedir}/run'
949includedir='${prefix}/include'
950oldincludedir='/usr/include'
951docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
952infodir='${datarootdir}/info'
953htmldir='${docdir}'
954dvidir='${docdir}'
955pdfdir='${docdir}'
956psdir='${docdir}'
957libdir='${exec_prefix}/lib'
958localedir='${datarootdir}/locale'
959mandir='${datarootdir}/man'
960
961ac_prev=
962ac_dashdash=
963for ac_option
964do
965  # If the previous option needs an argument, assign it.
966  if test -n "$ac_prev"; then
967    eval $ac_prev=\$ac_option
968    ac_prev=
969    continue
970  fi
971
972  case $ac_option in
973  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
974  *=)   ac_optarg= ;;
975  *)    ac_optarg=yes ;;
976  esac
977
978  # Accept the important Cygnus configure options, so we can diagnose typos.
979
980  case $ac_dashdash$ac_option in
981  --)
982    ac_dashdash=yes ;;
983
984  -bindir | --bindir | --bindi | --bind | --bin | --bi)
985    ac_prev=bindir ;;
986  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
987    bindir=$ac_optarg ;;
988
989  -build | --build | --buil | --bui | --bu)
990    ac_prev=build_alias ;;
991  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
992    build_alias=$ac_optarg ;;
993
994  -cache-file | --cache-file | --cache-fil | --cache-fi \
995  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
996    ac_prev=cache_file ;;
997  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
998  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
999    cache_file=$ac_optarg ;;
1000
1001  --config-cache | -C)
1002    cache_file=config.cache ;;
1003
1004  -datadir | --datadir | --datadi | --datad)
1005    ac_prev=datadir ;;
1006  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1007    datadir=$ac_optarg ;;
1008
1009  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1010  | --dataroo | --dataro | --datar)
1011    ac_prev=datarootdir ;;
1012  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1013  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1014    datarootdir=$ac_optarg ;;
1015
1016  -disable-* | --disable-*)
1017    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1018    # Reject names that are not valid shell variable names.
1019    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1020      as_fn_error $? "invalid feature name: $ac_useropt"
1021    ac_useropt_orig=$ac_useropt
1022    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1023    case $ac_user_opts in
1024      *"
1025"enable_$ac_useropt"
1026"*) ;;
1027      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1028	 ac_unrecognized_sep=', ';;
1029    esac
1030    eval enable_$ac_useropt=no ;;
1031
1032  -docdir | --docdir | --docdi | --doc | --do)
1033    ac_prev=docdir ;;
1034  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1035    docdir=$ac_optarg ;;
1036
1037  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1038    ac_prev=dvidir ;;
1039  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1040    dvidir=$ac_optarg ;;
1041
1042  -enable-* | --enable-*)
1043    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1044    # Reject names that are not valid shell variable names.
1045    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1046      as_fn_error $? "invalid feature name: $ac_useropt"
1047    ac_useropt_orig=$ac_useropt
1048    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1049    case $ac_user_opts in
1050      *"
1051"enable_$ac_useropt"
1052"*) ;;
1053      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1054	 ac_unrecognized_sep=', ';;
1055    esac
1056    eval enable_$ac_useropt=\$ac_optarg ;;
1057
1058  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1059  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1060  | --exec | --exe | --ex)
1061    ac_prev=exec_prefix ;;
1062  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1063  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1064  | --exec=* | --exe=* | --ex=*)
1065    exec_prefix=$ac_optarg ;;
1066
1067  -gas | --gas | --ga | --g)
1068    # Obsolete; use --with-gas.
1069    with_gas=yes ;;
1070
1071  -help | --help | --hel | --he | -h)
1072    ac_init_help=long ;;
1073  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1074    ac_init_help=recursive ;;
1075  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1076    ac_init_help=short ;;
1077
1078  -host | --host | --hos | --ho)
1079    ac_prev=host_alias ;;
1080  -host=* | --host=* | --hos=* | --ho=*)
1081    host_alias=$ac_optarg ;;
1082
1083  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1084    ac_prev=htmldir ;;
1085  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1086  | --ht=*)
1087    htmldir=$ac_optarg ;;
1088
1089  -includedir | --includedir | --includedi | --included | --include \
1090  | --includ | --inclu | --incl | --inc)
1091    ac_prev=includedir ;;
1092  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1093  | --includ=* | --inclu=* | --incl=* | --inc=*)
1094    includedir=$ac_optarg ;;
1095
1096  -infodir | --infodir | --infodi | --infod | --info | --inf)
1097    ac_prev=infodir ;;
1098  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1099    infodir=$ac_optarg ;;
1100
1101  -libdir | --libdir | --libdi | --libd)
1102    ac_prev=libdir ;;
1103  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1104    libdir=$ac_optarg ;;
1105
1106  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1107  | --libexe | --libex | --libe)
1108    ac_prev=libexecdir ;;
1109  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1110  | --libexe=* | --libex=* | --libe=*)
1111    libexecdir=$ac_optarg ;;
1112
1113  -localedir | --localedir | --localedi | --localed | --locale)
1114    ac_prev=localedir ;;
1115  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1116    localedir=$ac_optarg ;;
1117
1118  -localstatedir | --localstatedir | --localstatedi | --localstated \
1119  | --localstate | --localstat | --localsta | --localst | --locals)
1120    ac_prev=localstatedir ;;
1121  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1122  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1123    localstatedir=$ac_optarg ;;
1124
1125  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1126    ac_prev=mandir ;;
1127  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1128    mandir=$ac_optarg ;;
1129
1130  -nfp | --nfp | --nf)
1131    # Obsolete; use --without-fp.
1132    with_fp=no ;;
1133
1134  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1135  | --no-cr | --no-c | -n)
1136    no_create=yes ;;
1137
1138  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1139  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1140    no_recursion=yes ;;
1141
1142  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1143  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1144  | --oldin | --oldi | --old | --ol | --o)
1145    ac_prev=oldincludedir ;;
1146  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1147  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1148  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1149    oldincludedir=$ac_optarg ;;
1150
1151  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1152    ac_prev=prefix ;;
1153  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1154    prefix=$ac_optarg ;;
1155
1156  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1157  | --program-pre | --program-pr | --program-p)
1158    ac_prev=program_prefix ;;
1159  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1160  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1161    program_prefix=$ac_optarg ;;
1162
1163  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1164  | --program-suf | --program-su | --program-s)
1165    ac_prev=program_suffix ;;
1166  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1167  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1168    program_suffix=$ac_optarg ;;
1169
1170  -program-transform-name | --program-transform-name \
1171  | --program-transform-nam | --program-transform-na \
1172  | --program-transform-n | --program-transform- \
1173  | --program-transform | --program-transfor \
1174  | --program-transfo | --program-transf \
1175  | --program-trans | --program-tran \
1176  | --progr-tra | --program-tr | --program-t)
1177    ac_prev=program_transform_name ;;
1178  -program-transform-name=* | --program-transform-name=* \
1179  | --program-transform-nam=* | --program-transform-na=* \
1180  | --program-transform-n=* | --program-transform-=* \
1181  | --program-transform=* | --program-transfor=* \
1182  | --program-transfo=* | --program-transf=* \
1183  | --program-trans=* | --program-tran=* \
1184  | --progr-tra=* | --program-tr=* | --program-t=*)
1185    program_transform_name=$ac_optarg ;;
1186
1187  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1188    ac_prev=pdfdir ;;
1189  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1190    pdfdir=$ac_optarg ;;
1191
1192  -psdir | --psdir | --psdi | --psd | --ps)
1193    ac_prev=psdir ;;
1194  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1195    psdir=$ac_optarg ;;
1196
1197  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1198  | -silent | --silent | --silen | --sile | --sil)
1199    silent=yes ;;
1200
1201  -runstatedir | --runstatedir | --runstatedi | --runstated \
1202  | --runstate | --runstat | --runsta | --runst | --runs \
1203  | --run | --ru | --r)
1204    ac_prev=runstatedir ;;
1205  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1206  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1207  | --run=* | --ru=* | --r=*)
1208    runstatedir=$ac_optarg ;;
1209
1210  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1211    ac_prev=sbindir ;;
1212  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1213  | --sbi=* | --sb=*)
1214    sbindir=$ac_optarg ;;
1215
1216  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1217  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1218  | --sharedst | --shareds | --shared | --share | --shar \
1219  | --sha | --sh)
1220    ac_prev=sharedstatedir ;;
1221  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1222  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1223  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1224  | --sha=* | --sh=*)
1225    sharedstatedir=$ac_optarg ;;
1226
1227  -site | --site | --sit)
1228    ac_prev=site ;;
1229  -site=* | --site=* | --sit=*)
1230    site=$ac_optarg ;;
1231
1232  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1233    ac_prev=srcdir ;;
1234  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1235    srcdir=$ac_optarg ;;
1236
1237  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1238  | --syscon | --sysco | --sysc | --sys | --sy)
1239    ac_prev=sysconfdir ;;
1240  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1241  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1242    sysconfdir=$ac_optarg ;;
1243
1244  -target | --target | --targe | --targ | --tar | --ta | --t)
1245    ac_prev=target_alias ;;
1246  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1247    target_alias=$ac_optarg ;;
1248
1249  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1250    verbose=yes ;;
1251
1252  -version | --version | --versio | --versi | --vers | -V)
1253    ac_init_version=: ;;
1254
1255  -with-* | --with-*)
1256    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1257    # Reject names that are not valid shell variable names.
1258    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1259      as_fn_error $? "invalid package name: $ac_useropt"
1260    ac_useropt_orig=$ac_useropt
1261    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1262    case $ac_user_opts in
1263      *"
1264"with_$ac_useropt"
1265"*) ;;
1266      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1267	 ac_unrecognized_sep=', ';;
1268    esac
1269    eval with_$ac_useropt=\$ac_optarg ;;
1270
1271  -without-* | --without-*)
1272    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1273    # Reject names that are not valid shell variable names.
1274    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1275      as_fn_error $? "invalid package name: $ac_useropt"
1276    ac_useropt_orig=$ac_useropt
1277    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1278    case $ac_user_opts in
1279      *"
1280"with_$ac_useropt"
1281"*) ;;
1282      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1283	 ac_unrecognized_sep=', ';;
1284    esac
1285    eval with_$ac_useropt=no ;;
1286
1287  --x)
1288    # Obsolete; use --with-x.
1289    with_x=yes ;;
1290
1291  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1292  | --x-incl | --x-inc | --x-in | --x-i)
1293    ac_prev=x_includes ;;
1294  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1295  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1296    x_includes=$ac_optarg ;;
1297
1298  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1299  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1300    ac_prev=x_libraries ;;
1301  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1302  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1303    x_libraries=$ac_optarg ;;
1304
1305  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1306Try \`$0 --help' for more information"
1307    ;;
1308
1309  *=*)
1310    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1311    # Reject names that are not valid shell variable names.
1312    case $ac_envvar in #(
1313      '' | [0-9]* | *[!_$as_cr_alnum]* )
1314      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1315    esac
1316    eval $ac_envvar=\$ac_optarg
1317    export $ac_envvar ;;
1318
1319  *)
1320    # FIXME: should be removed in autoconf 3.0.
1321    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1322    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1323      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1324    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1325    ;;
1326
1327  esac
1328done
1329
1330if test -n "$ac_prev"; then
1331  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1332  as_fn_error $? "missing argument to $ac_option"
1333fi
1334
1335if test -n "$ac_unrecognized_opts"; then
1336  case $enable_option_checking in
1337    no) ;;
1338    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1339    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1340  esac
1341fi
1342
1343# Check all directory arguments for consistency.
1344for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1345		datadir sysconfdir sharedstatedir localstatedir includedir \
1346		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1347		libdir localedir mandir runstatedir
1348do
1349  eval ac_val=\$$ac_var
1350  # Remove trailing slashes.
1351  case $ac_val in
1352    */ )
1353      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1354      eval $ac_var=\$ac_val;;
1355  esac
1356  # Be sure to have absolute directory names.
1357  case $ac_val in
1358    [\\/$]* | ?:[\\/]* )  continue;;
1359    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1360  esac
1361  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1362done
1363
1364# There might be people who depend on the old broken behavior: `$host'
1365# used to hold the argument of --host etc.
1366# FIXME: To remove some day.
1367build=$build_alias
1368host=$host_alias
1369target=$target_alias
1370
1371# FIXME: To remove some day.
1372if test "x$host_alias" != x; then
1373  if test "x$build_alias" = x; then
1374    cross_compiling=maybe
1375  elif test "x$build_alias" != "x$host_alias"; then
1376    cross_compiling=yes
1377  fi
1378fi
1379
1380ac_tool_prefix=
1381test -n "$host_alias" && ac_tool_prefix=$host_alias-
1382
1383test "$silent" = yes && exec 6>/dev/null
1384
1385
1386ac_pwd=`pwd` && test -n "$ac_pwd" &&
1387ac_ls_di=`ls -di .` &&
1388ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1389  as_fn_error $? "working directory cannot be determined"
1390test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1391  as_fn_error $? "pwd does not report name of working directory"
1392
1393
1394# Find the source files, if location was not specified.
1395if test -z "$srcdir"; then
1396  ac_srcdir_defaulted=yes
1397  # Try the directory containing this script, then the parent directory.
1398  ac_confdir=`$as_dirname -- "$as_myself" ||
1399$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1400	 X"$as_myself" : 'X\(//\)[^/]' \| \
1401	 X"$as_myself" : 'X\(//\)$' \| \
1402	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1403$as_echo X"$as_myself" |
1404    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1405	    s//\1/
1406	    q
1407	  }
1408	  /^X\(\/\/\)[^/].*/{
1409	    s//\1/
1410	    q
1411	  }
1412	  /^X\(\/\/\)$/{
1413	    s//\1/
1414	    q
1415	  }
1416	  /^X\(\/\).*/{
1417	    s//\1/
1418	    q
1419	  }
1420	  s/.*/./; q'`
1421  srcdir=$ac_confdir
1422  if test ! -r "$srcdir/$ac_unique_file"; then
1423    srcdir=..
1424  fi
1425else
1426  ac_srcdir_defaulted=no
1427fi
1428if test ! -r "$srcdir/$ac_unique_file"; then
1429  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1430  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1431fi
1432ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1433ac_abs_confdir=`(
1434	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1435	pwd)`
1436# When building in place, set srcdir=.
1437if test "$ac_abs_confdir" = "$ac_pwd"; then
1438  srcdir=.
1439fi
1440# Remove unnecessary trailing slashes from srcdir.
1441# Double slashes in file names in object file debugging info
1442# mess up M-x gdb in Emacs.
1443case $srcdir in
1444*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1445esac
1446for ac_var in $ac_precious_vars; do
1447  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1448  eval ac_env_${ac_var}_value=\$${ac_var}
1449  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1450  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1451done
1452
1453#
1454# Report the --help message.
1455#
1456if test "$ac_init_help" = "long"; then
1457  # Omit some internal or obsolete options to make the list less imposing.
1458  # This message is too long to be a string in the A/UX 3.1 sh.
1459  cat <<_ACEOF
1460\`configure' configures Zabbix 5.0.19 to adapt to many kinds of systems.
1461
1462Usage: $0 [OPTION]... [VAR=VALUE]...
1463
1464To assign environment variables (e.g., CC, CFLAGS...), specify them as
1465VAR=VALUE.  See below for descriptions of some of the useful variables.
1466
1467Defaults for the options are specified in brackets.
1468
1469Configuration:
1470  -h, --help              display this help and exit
1471      --help=short        display options specific to this package
1472      --help=recursive    display the short help of all the included packages
1473  -V, --version           display version information and exit
1474  -q, --quiet, --silent   do not print \`checking ...' messages
1475      --cache-file=FILE   cache test results in FILE [disabled]
1476  -C, --config-cache      alias for \`--cache-file=config.cache'
1477  -n, --no-create         do not create output files
1478      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1479
1480Installation directories:
1481  --prefix=PREFIX         install architecture-independent files in PREFIX
1482                          [$ac_default_prefix]
1483  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1484                          [PREFIX]
1485
1486By default, \`make install' will install all the files in
1487\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1488an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1489for instance \`--prefix=\$HOME'.
1490
1491For better control, use the options below.
1492
1493Fine tuning of the installation directories:
1494  --bindir=DIR            user executables [EPREFIX/bin]
1495  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1496  --libexecdir=DIR        program executables [EPREFIX/libexec]
1497  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1498  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1499  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1500  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1501  --libdir=DIR            object code libraries [EPREFIX/lib]
1502  --includedir=DIR        C header files [PREFIX/include]
1503  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1504  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1505  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1506  --infodir=DIR           info documentation [DATAROOTDIR/info]
1507  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1508  --mandir=DIR            man documentation [DATAROOTDIR/man]
1509  --docdir=DIR            documentation root [DATAROOTDIR/doc/zabbix]
1510  --htmldir=DIR           html documentation [DOCDIR]
1511  --dvidir=DIR            dvi documentation [DOCDIR]
1512  --pdfdir=DIR            pdf documentation [DOCDIR]
1513  --psdir=DIR             ps documentation [DOCDIR]
1514_ACEOF
1515
1516  cat <<\_ACEOF
1517
1518Program names:
1519  --program-prefix=PREFIX            prepend PREFIX to installed program names
1520  --program-suffix=SUFFIX            append SUFFIX to installed program names
1521  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1522
1523System types:
1524  --build=BUILD     configure for building on BUILD [guessed]
1525  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1526_ACEOF
1527fi
1528
1529if test -n "$ac_init_help"; then
1530  case $ac_init_help in
1531     short | recursive ) echo "Configuration of Zabbix 5.0.19:";;
1532   esac
1533  cat <<\_ACEOF
1534
1535Optional Features:
1536  --disable-option-checking  ignore unrecognized --enable/--with options
1537  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1538  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1539  --enable-silent-rules   less verbose build output (undo: "make V=1")
1540  --disable-silent-rules  verbose build output (undo: "make V=0")
1541  --enable-dependency-tracking
1542                          do not reject slow dependency extractors
1543  --disable-dependency-tracking
1544                          speeds up one-time build
1545  --disable-largefile     omit support for large files
1546  --enable-static         Build statically linked binaries
1547  --enable-static-libs    Build statically linked binaries with selected libs from default folders
1548  --enable-server         Turn on build of Zabbix server
1549  --enable-proxy          Turn on build of Zabbix proxy
1550  --enable-agent          Turn on build of Zabbix agent and client utilities
1551  --enable-agent2         Turn on build of Zabbix agent 2
1552  --enable-java           Turn on build of Zabbix Java gateway
1553  --enable-ipv6           Turn on support of IPv6
1554
1555Optional Packages:
1556  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1557  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1558  --with-mysql[=ARG]      use MySQL client library [default=no], optionally
1559                          specify path to mysql_config
1560  --with-oracle[=ARG]     use Oracle OCI API from given Oracle home
1561                          (ARG=path); use existing ORACLE_HOME (ARG=yes);
1562                          disable Oracle OCI support (ARG=no)
1563  --with-oracle-include[=DIR]
1564                          use Oracle OCI API headers from given path
1565  --with-oracle-lib[=DIR] use Oracle OCI API libraries from given path
1566  --with-postgresql[=ARG] use PostgreSQL library [default=no], optionally
1567                          specify path to pg_config
1568  --with-sqlite3[=ARG]    use SQLite 3 library [default=no], optionally
1569                          specify the prefix for sqlite3 library
1570
1571If you want to use XML library:
1572  --with-libxml2[=ARG]    use libxml2 client library [default=no], see
1573                          PKG_CONFIG_PATH environment variable to specify .pc
1574                          file location
1575
1576If you want to use unixODBC library:
1577  --with-unixodbc[=ARG]   use ODBC driver against unixODBC package
1578                          [default=no], optionally specify full path to
1579                          odbc_config binary.
1580
1581If you want to use Net-SNMP library:
1582  --with-net-snmp[=ARG]   use Net-SNMP package [default=no], optionally
1583                          specify path to net-snmp-config
1584
1585If you want to use SSH2 based checks:
1586  --with-ssh2[=DIR]       use SSH2 package [default=no], DIR is the SSH2
1587                          library install directory.
1588
1589If you want to use SSH based checks:
1590  --with-ssh[=DIR]        use SSH package [default=no], DIR is the SSH library
1591                          install directory.
1592
1593If you want to check IPMI devices:
1594  --with-openipmi[=DIR]   Include OPENIPMI support [default=no]. DIR is the
1595                          OPENIPMI base install directory, default is to
1596                          search through a number of common places for the
1597                          OPENIPMI files.
1598
1599If you want to specify zlib installation directories:
1600  --with-zlib[=DIR]       use zlib from given base install directory (DIR),
1601                          default is to search through a number of common
1602                          places for the zlib files.
1603  --with-zlib-include=DIR use zlib include headers from given path.
1604  --with-zlib-lib=DIR     use zlib libraries from given path.
1605
1606If you want to specify pthread installation directories:
1607  --with-libpthread[=DIR] use libpthread from given base install directory
1608                          (DIR), default is to search through a number of
1609                          common places for the libpthread files.
1610  --with-libpthread-include[=DIR]
1611                          use libpthread include headers from given path.
1612  --with-libpthread-lib[=DIR]
1613                          use libpthread libraries from given path.
1614
1615If you want to specify libevent installation directories:
1616  --with-libevent[=DIR]   use libevent from given base install directory
1617                          (DIR), default is to search through a number of
1618                          common places for the libevent files.
1619  --with-libevent-include[=DIR]
1620                          use libevent include headers from given path.
1621  --with-libevent-lib[=DIR]
1622                          use libevent libraries from given path.
1623
1624If you want to use encryption provided by GnuTLS library:
1625  --with-gnutls[=DIR]     use GnuTLS package [default=no], DIR is the
1626                          libgnutls install directory.
1627
1628If you want to use encryption provided by OpenSSL library:
1629  --with-openssl[=DIR]    use OpenSSL package [default=no], DIR is the libssl
1630                          and libcrypto install directory.
1631
1632If you want to check LDAP servers:
1633  --with-ldap[=DIR]       Include LDAP support [default=no]. DIR is the LDAP
1634                          base install directory, default is to search through
1635                          a number of common places for the LDAP files.
1636
1637If you want to use cURL library:
1638  --with-libcurl[=DIR]    use cURL package [default=no], optionally specify
1639                          path to curl-config
1640
1641If you want to specify libpcre installation directories:
1642  --with-libpcre[=DIR]    use libpcre from given base install directory (DIR),
1643                          default is to search through a number of common
1644                          places for the libpcre files.
1645  --with-libpcre-include[=DIR]
1646                          use libpcre include headers from given path.
1647  --with-libpcre-lib[=DIR]
1648                          use libpcre libraries from given path.
1649
1650If you want to specify iconv installation directories:
1651  --with-iconv[=DIR]      use iconv from given base install directory (DIR),
1652                          default is to search through a number of common
1653                          places for the iconv files.
1654  --with-iconv-include[=DIR]
1655                          use iconv include headers from given path.
1656  --with-iconv-lib[=DIR]  use iconv libraries from given path.
1657
1658Some influential environment variables:
1659  CC          C compiler command
1660  CFLAGS      C compiler flags
1661  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1662              nonstandard directory <lib dir>
1663  LIBS        libraries to pass to the linker, e.g. -l<library>
1664  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1665              you have headers in a nonstandard directory <include dir>
1666  CPP         C preprocessor
1667  PKG_CONFIG  path to pkg-config utility
1668  PKG_CONFIG_PATH
1669              directories to add to pkg-config's search path
1670  PKG_CONFIG_LIBDIR
1671              path overriding pkg-config's built-in search path
1672
1673Use these variables to override the choices made by `configure' or to help
1674it to find libraries and programs with nonstandard names/locations.
1675
1676Report bugs to the package provider.
1677_ACEOF
1678ac_status=$?
1679fi
1680
1681if test "$ac_init_help" = "recursive"; then
1682  # If there are subdirs, report their specific --help.
1683  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1684    test -d "$ac_dir" ||
1685      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1686      continue
1687    ac_builddir=.
1688
1689case "$ac_dir" in
1690.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1691*)
1692  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1693  # A ".." for each directory in $ac_dir_suffix.
1694  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1695  case $ac_top_builddir_sub in
1696  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1697  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1698  esac ;;
1699esac
1700ac_abs_top_builddir=$ac_pwd
1701ac_abs_builddir=$ac_pwd$ac_dir_suffix
1702# for backward compatibility:
1703ac_top_builddir=$ac_top_build_prefix
1704
1705case $srcdir in
1706  .)  # We are building in place.
1707    ac_srcdir=.
1708    ac_top_srcdir=$ac_top_builddir_sub
1709    ac_abs_top_srcdir=$ac_pwd ;;
1710  [\\/]* | ?:[\\/]* )  # Absolute name.
1711    ac_srcdir=$srcdir$ac_dir_suffix;
1712    ac_top_srcdir=$srcdir
1713    ac_abs_top_srcdir=$srcdir ;;
1714  *) # Relative name.
1715    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1716    ac_top_srcdir=$ac_top_build_prefix$srcdir
1717    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1718esac
1719ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1720
1721    cd "$ac_dir" || { ac_status=$?; continue; }
1722    # Check for guested configure.
1723    if test -f "$ac_srcdir/configure.gnu"; then
1724      echo &&
1725      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1726    elif test -f "$ac_srcdir/configure"; then
1727      echo &&
1728      $SHELL "$ac_srcdir/configure" --help=recursive
1729    else
1730      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1731    fi || ac_status=$?
1732    cd "$ac_pwd" || { ac_status=$?; break; }
1733  done
1734fi
1735
1736test -n "$ac_init_help" && exit $ac_status
1737if $ac_init_version; then
1738  cat <<\_ACEOF
1739Zabbix configure 5.0.19
1740generated by GNU Autoconf 2.69
1741
1742Copyright (C) 2012 Free Software Foundation, Inc.
1743This configure script is free software; the Free Software Foundation
1744gives unlimited permission to copy, distribute and modify it.
1745_ACEOF
1746  exit
1747fi
1748
1749## ------------------------ ##
1750## Autoconf initialization. ##
1751## ------------------------ ##
1752
1753# ac_fn_c_try_compile LINENO
1754# --------------------------
1755# Try to compile conftest.$ac_ext, and return whether this succeeded.
1756ac_fn_c_try_compile ()
1757{
1758  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1759  rm -f conftest.$ac_objext
1760  if { { ac_try="$ac_compile"
1761case "(($ac_try" in
1762  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1763  *) ac_try_echo=$ac_try;;
1764esac
1765eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1766$as_echo "$ac_try_echo"; } >&5
1767  (eval "$ac_compile") 2>conftest.err
1768  ac_status=$?
1769  if test -s conftest.err; then
1770    grep -v '^ *+' conftest.err >conftest.er1
1771    cat conftest.er1 >&5
1772    mv -f conftest.er1 conftest.err
1773  fi
1774  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1775  test $ac_status = 0; } && {
1776	 test -z "$ac_c_werror_flag" ||
1777	 test ! -s conftest.err
1778       } && test -s conftest.$ac_objext; then :
1779  ac_retval=0
1780else
1781  $as_echo "$as_me: failed program was:" >&5
1782sed 's/^/| /' conftest.$ac_ext >&5
1783
1784	ac_retval=1
1785fi
1786  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1787  as_fn_set_status $ac_retval
1788
1789} # ac_fn_c_try_compile
1790
1791# ac_fn_c_try_cpp LINENO
1792# ----------------------
1793# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1794ac_fn_c_try_cpp ()
1795{
1796  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1797  if { { ac_try="$ac_cpp conftest.$ac_ext"
1798case "(($ac_try" in
1799  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1800  *) ac_try_echo=$ac_try;;
1801esac
1802eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1803$as_echo "$ac_try_echo"; } >&5
1804  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1805  ac_status=$?
1806  if test -s conftest.err; then
1807    grep -v '^ *+' conftest.err >conftest.er1
1808    cat conftest.er1 >&5
1809    mv -f conftest.er1 conftest.err
1810  fi
1811  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1812  test $ac_status = 0; } > conftest.i && {
1813	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1814	 test ! -s conftest.err
1815       }; then :
1816  ac_retval=0
1817else
1818  $as_echo "$as_me: failed program was:" >&5
1819sed 's/^/| /' conftest.$ac_ext >&5
1820
1821    ac_retval=1
1822fi
1823  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1824  as_fn_set_status $ac_retval
1825
1826} # ac_fn_c_try_cpp
1827
1828# ac_fn_c_try_run LINENO
1829# ----------------------
1830# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1831# that executables *can* be run.
1832ac_fn_c_try_run ()
1833{
1834  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1835  if { { ac_try="$ac_link"
1836case "(($ac_try" in
1837  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1838  *) ac_try_echo=$ac_try;;
1839esac
1840eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1841$as_echo "$ac_try_echo"; } >&5
1842  (eval "$ac_link") 2>&5
1843  ac_status=$?
1844  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1845  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1846  { { case "(($ac_try" in
1847  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1848  *) ac_try_echo=$ac_try;;
1849esac
1850eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1851$as_echo "$ac_try_echo"; } >&5
1852  (eval "$ac_try") 2>&5
1853  ac_status=$?
1854  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1855  test $ac_status = 0; }; }; then :
1856  ac_retval=0
1857else
1858  $as_echo "$as_me: program exited with status $ac_status" >&5
1859       $as_echo "$as_me: failed program was:" >&5
1860sed 's/^/| /' conftest.$ac_ext >&5
1861
1862       ac_retval=$ac_status
1863fi
1864  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1865  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1866  as_fn_set_status $ac_retval
1867
1868} # ac_fn_c_try_run
1869
1870# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1871# -------------------------------------------------------
1872# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1873# the include files in INCLUDES and setting the cache variable VAR
1874# accordingly.
1875ac_fn_c_check_header_mongrel ()
1876{
1877  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1878  if eval \${$3+:} false; then :
1879  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1880$as_echo_n "checking for $2... " >&6; }
1881if eval \${$3+:} false; then :
1882  $as_echo_n "(cached) " >&6
1883fi
1884eval ac_res=\$$3
1885	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1886$as_echo "$ac_res" >&6; }
1887else
1888  # Is the header compilable?
1889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1890$as_echo_n "checking $2 usability... " >&6; }
1891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h.  */
1893$4
1894#include <$2>
1895_ACEOF
1896if ac_fn_c_try_compile "$LINENO"; then :
1897  ac_header_compiler=yes
1898else
1899  ac_header_compiler=no
1900fi
1901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1903$as_echo "$ac_header_compiler" >&6; }
1904
1905# Is the header present?
1906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1907$as_echo_n "checking $2 presence... " >&6; }
1908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1909/* end confdefs.h.  */
1910#include <$2>
1911_ACEOF
1912if ac_fn_c_try_cpp "$LINENO"; then :
1913  ac_header_preproc=yes
1914else
1915  ac_header_preproc=no
1916fi
1917rm -f conftest.err conftest.i conftest.$ac_ext
1918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1919$as_echo "$ac_header_preproc" >&6; }
1920
1921# So?  What about this header?
1922case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1923  yes:no: )
1924    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1925$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1926    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1927$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1928    ;;
1929  no:yes:* )
1930    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1931$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1932    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1933$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1934    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1935$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1936    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1937$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1938    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1939$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1940    ;;
1941esac
1942  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1943$as_echo_n "checking for $2... " >&6; }
1944if eval \${$3+:} false; then :
1945  $as_echo_n "(cached) " >&6
1946else
1947  eval "$3=\$ac_header_compiler"
1948fi
1949eval ac_res=\$$3
1950	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1951$as_echo "$ac_res" >&6; }
1952fi
1953  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1954
1955} # ac_fn_c_check_header_mongrel
1956
1957# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1958# -------------------------------------------------------
1959# Tests whether HEADER exists and can be compiled using the include files in
1960# INCLUDES, setting the cache variable VAR accordingly.
1961ac_fn_c_check_header_compile ()
1962{
1963  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1964  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1965$as_echo_n "checking for $2... " >&6; }
1966if eval \${$3+:} false; then :
1967  $as_echo_n "(cached) " >&6
1968else
1969  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1970/* end confdefs.h.  */
1971$4
1972#include <$2>
1973_ACEOF
1974if ac_fn_c_try_compile "$LINENO"; then :
1975  eval "$3=yes"
1976else
1977  eval "$3=no"
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1980fi
1981eval ac_res=\$$3
1982	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
1984  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1985
1986} # ac_fn_c_check_header_compile
1987
1988# ac_fn_c_try_link LINENO
1989# -----------------------
1990# Try to link conftest.$ac_ext, and return whether this succeeded.
1991ac_fn_c_try_link ()
1992{
1993  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994  rm -f conftest.$ac_objext conftest$ac_exeext
1995  if { { ac_try="$ac_link"
1996case "(($ac_try" in
1997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998  *) ac_try_echo=$ac_try;;
1999esac
2000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001$as_echo "$ac_try_echo"; } >&5
2002  (eval "$ac_link") 2>conftest.err
2003  ac_status=$?
2004  if test -s conftest.err; then
2005    grep -v '^ *+' conftest.err >conftest.er1
2006    cat conftest.er1 >&5
2007    mv -f conftest.er1 conftest.err
2008  fi
2009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010  test $ac_status = 0; } && {
2011	 test -z "$ac_c_werror_flag" ||
2012	 test ! -s conftest.err
2013       } && test -s conftest$ac_exeext && {
2014	 test "$cross_compiling" = yes ||
2015	 test -x conftest$ac_exeext
2016       }; then :
2017  ac_retval=0
2018else
2019  $as_echo "$as_me: failed program was:" >&5
2020sed 's/^/| /' conftest.$ac_ext >&5
2021
2022	ac_retval=1
2023fi
2024  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2025  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2026  # interfere with the next link command; also delete a directory that is
2027  # left behind by Apple's compiler.  We do this before executing the actions.
2028  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2029  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2030  as_fn_set_status $ac_retval
2031
2032} # ac_fn_c_try_link
2033
2034# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2035# -------------------------------------------
2036# Tests whether TYPE exists after having included INCLUDES, setting cache
2037# variable VAR accordingly.
2038ac_fn_c_check_type ()
2039{
2040  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2042$as_echo_n "checking for $2... " >&6; }
2043if eval \${$3+:} false; then :
2044  $as_echo_n "(cached) " >&6
2045else
2046  eval "$3=no"
2047  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h.  */
2049$4
2050int
2051main ()
2052{
2053if (sizeof ($2))
2054	 return 0;
2055  ;
2056  return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"; then :
2060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h.  */
2062$4
2063int
2064main ()
2065{
2066if (sizeof (($2)))
2067	    return 0;
2068  ;
2069  return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073
2074else
2075  eval "$3=yes"
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080fi
2081eval ac_res=\$$3
2082	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2083$as_echo "$ac_res" >&6; }
2084  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2085
2086} # ac_fn_c_check_type
2087
2088# ac_fn_c_check_func LINENO FUNC VAR
2089# ----------------------------------
2090# Tests whether FUNC exists, setting the cache variable VAR accordingly
2091ac_fn_c_check_func ()
2092{
2093  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2095$as_echo_n "checking for $2... " >&6; }
2096if eval \${$3+:} false; then :
2097  $as_echo_n "(cached) " >&6
2098else
2099  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2100/* end confdefs.h.  */
2101/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2102   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2103#define $2 innocuous_$2
2104
2105/* System header to define __stub macros and hopefully few prototypes,
2106    which can conflict with char $2 (); below.
2107    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2108    <limits.h> exists even on freestanding compilers.  */
2109
2110#ifdef __STDC__
2111# include <limits.h>
2112#else
2113# include <assert.h>
2114#endif
2115
2116#undef $2
2117
2118/* Override any GCC internal prototype to avoid an error.
2119   Use char because int might match the return type of a GCC
2120   builtin and then its argument prototype would still apply.  */
2121#ifdef __cplusplus
2122extern "C"
2123#endif
2124char $2 ();
2125/* The GNU C library defines this for functions which it implements
2126    to always fail with ENOSYS.  Some functions are actually named
2127    something starting with __ and the normal name is an alias.  */
2128#if defined __stub_$2 || defined __stub___$2
2129choke me
2130#endif
2131
2132int
2133main ()
2134{
2135return $2 ();
2136  ;
2137  return 0;
2138}
2139_ACEOF
2140if ac_fn_c_try_link "$LINENO"; then :
2141  eval "$3=yes"
2142else
2143  eval "$3=no"
2144fi
2145rm -f core conftest.err conftest.$ac_objext \
2146    conftest$ac_exeext conftest.$ac_ext
2147fi
2148eval ac_res=\$$3
2149	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2150$as_echo "$ac_res" >&6; }
2151  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2152
2153} # ac_fn_c_check_func
2154
2155# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2156# --------------------------------------------
2157# Tries to find the compile-time value of EXPR in a program that includes
2158# INCLUDES, setting VAR accordingly. Returns whether the value could be
2159# computed
2160ac_fn_c_compute_int ()
2161{
2162  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2163  if test "$cross_compiling" = yes; then
2164    # Depending upon the size, compute the lo and hi bounds.
2165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2166/* end confdefs.h.  */
2167$4
2168int
2169main ()
2170{
2171static int test_array [1 - 2 * !(($2) >= 0)];
2172test_array [0] = 0;
2173return test_array [0];
2174
2175  ;
2176  return 0;
2177}
2178_ACEOF
2179if ac_fn_c_try_compile "$LINENO"; then :
2180  ac_lo=0 ac_mid=0
2181  while :; do
2182    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h.  */
2184$4
2185int
2186main ()
2187{
2188static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2189test_array [0] = 0;
2190return test_array [0];
2191
2192  ;
2193  return 0;
2194}
2195_ACEOF
2196if ac_fn_c_try_compile "$LINENO"; then :
2197  ac_hi=$ac_mid; break
2198else
2199  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2200			if test $ac_lo -le $ac_mid; then
2201			  ac_lo= ac_hi=
2202			  break
2203			fi
2204			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2205fi
2206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2207  done
2208else
2209  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210/* end confdefs.h.  */
2211$4
2212int
2213main ()
2214{
2215static int test_array [1 - 2 * !(($2) < 0)];
2216test_array [0] = 0;
2217return test_array [0];
2218
2219  ;
2220  return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_compile "$LINENO"; then :
2224  ac_hi=-1 ac_mid=-1
2225  while :; do
2226    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h.  */
2228$4
2229int
2230main ()
2231{
2232static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2233test_array [0] = 0;
2234return test_array [0];
2235
2236  ;
2237  return 0;
2238}
2239_ACEOF
2240if ac_fn_c_try_compile "$LINENO"; then :
2241  ac_lo=$ac_mid; break
2242else
2243  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2244			if test $ac_mid -le $ac_hi; then
2245			  ac_lo= ac_hi=
2246			  break
2247			fi
2248			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2249fi
2250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2251  done
2252else
2253  ac_lo= ac_hi=
2254fi
2255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2256fi
2257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2258# Binary search between lo and hi bounds.
2259while test "x$ac_lo" != "x$ac_hi"; do
2260  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2261  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h.  */
2263$4
2264int
2265main ()
2266{
2267static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2268test_array [0] = 0;
2269return test_array [0];
2270
2271  ;
2272  return 0;
2273}
2274_ACEOF
2275if ac_fn_c_try_compile "$LINENO"; then :
2276  ac_hi=$ac_mid
2277else
2278  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2279fi
2280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281done
2282case $ac_lo in #((
2283?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2284'') ac_retval=1 ;;
2285esac
2286  else
2287    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2288/* end confdefs.h.  */
2289$4
2290static long int longval () { return $2; }
2291static unsigned long int ulongval () { return $2; }
2292#include <stdio.h>
2293#include <stdlib.h>
2294int
2295main ()
2296{
2297
2298  FILE *f = fopen ("conftest.val", "w");
2299  if (! f)
2300    return 1;
2301  if (($2) < 0)
2302    {
2303      long int i = longval ();
2304      if (i != ($2))
2305	return 1;
2306      fprintf (f, "%ld", i);
2307    }
2308  else
2309    {
2310      unsigned long int i = ulongval ();
2311      if (i != ($2))
2312	return 1;
2313      fprintf (f, "%lu", i);
2314    }
2315  /* Do not output a trailing newline, as this causes \r\n confusion
2316     on some platforms.  */
2317  return ferror (f) || fclose (f) != 0;
2318
2319  ;
2320  return 0;
2321}
2322_ACEOF
2323if ac_fn_c_try_run "$LINENO"; then :
2324  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2325else
2326  ac_retval=1
2327fi
2328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2329  conftest.$ac_objext conftest.beam conftest.$ac_ext
2330rm -f conftest.val
2331
2332  fi
2333  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2334  as_fn_set_status $ac_retval
2335
2336} # ac_fn_c_compute_int
2337cat >config.log <<_ACEOF
2338This file contains any messages produced by compilers while
2339running configure, to aid debugging if configure makes a mistake.
2340
2341It was created by Zabbix $as_me 5.0.19, which was
2342generated by GNU Autoconf 2.69.  Invocation command line was
2343
2344  $ $0 $@
2345
2346_ACEOF
2347exec 5>>config.log
2348{
2349cat <<_ASUNAME
2350## --------- ##
2351## Platform. ##
2352## --------- ##
2353
2354hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2355uname -m = `(uname -m) 2>/dev/null || echo unknown`
2356uname -r = `(uname -r) 2>/dev/null || echo unknown`
2357uname -s = `(uname -s) 2>/dev/null || echo unknown`
2358uname -v = `(uname -v) 2>/dev/null || echo unknown`
2359
2360/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2361/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2362
2363/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2364/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2365/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2366/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2367/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2368/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2369/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2370
2371_ASUNAME
2372
2373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2374for as_dir in $PATH
2375do
2376  IFS=$as_save_IFS
2377  test -z "$as_dir" && as_dir=.
2378    $as_echo "PATH: $as_dir"
2379  done
2380IFS=$as_save_IFS
2381
2382} >&5
2383
2384cat >&5 <<_ACEOF
2385
2386
2387## ----------- ##
2388## Core tests. ##
2389## ----------- ##
2390
2391_ACEOF
2392
2393
2394# Keep a trace of the command line.
2395# Strip out --no-create and --no-recursion so they do not pile up.
2396# Strip out --silent because we don't want to record it for future runs.
2397# Also quote any args containing shell meta-characters.
2398# Make two passes to allow for proper duplicate-argument suppression.
2399ac_configure_args=
2400ac_configure_args0=
2401ac_configure_args1=
2402ac_must_keep_next=false
2403for ac_pass in 1 2
2404do
2405  for ac_arg
2406  do
2407    case $ac_arg in
2408    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2409    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2410    | -silent | --silent | --silen | --sile | --sil)
2411      continue ;;
2412    *\'*)
2413      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2414    esac
2415    case $ac_pass in
2416    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2417    2)
2418      as_fn_append ac_configure_args1 " '$ac_arg'"
2419      if test $ac_must_keep_next = true; then
2420	ac_must_keep_next=false # Got value, back to normal.
2421      else
2422	case $ac_arg in
2423	  *=* | --config-cache | -C | -disable-* | --disable-* \
2424	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2425	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2426	  | -with-* | --with-* | -without-* | --without-* | --x)
2427	    case "$ac_configure_args0 " in
2428	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2429	    esac
2430	    ;;
2431	  -* ) ac_must_keep_next=true ;;
2432	esac
2433      fi
2434      as_fn_append ac_configure_args " '$ac_arg'"
2435      ;;
2436    esac
2437  done
2438done
2439{ ac_configure_args0=; unset ac_configure_args0;}
2440{ ac_configure_args1=; unset ac_configure_args1;}
2441
2442# When interrupted or exit'd, cleanup temporary files, and complete
2443# config.log.  We remove comments because anyway the quotes in there
2444# would cause problems or look ugly.
2445# WARNING: Use '\'' to represent an apostrophe within the trap.
2446# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2447trap 'exit_status=$?
2448  # Save into config.log some information that might help in debugging.
2449  {
2450    echo
2451
2452    $as_echo "## ---------------- ##
2453## Cache variables. ##
2454## ---------------- ##"
2455    echo
2456    # The following way of writing the cache mishandles newlines in values,
2457(
2458  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2459    eval ac_val=\$$ac_var
2460    case $ac_val in #(
2461    *${as_nl}*)
2462      case $ac_var in #(
2463      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2464$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2465      esac
2466      case $ac_var in #(
2467      _ | IFS | as_nl) ;; #(
2468      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2469      *) { eval $ac_var=; unset $ac_var;} ;;
2470      esac ;;
2471    esac
2472  done
2473  (set) 2>&1 |
2474    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2475    *${as_nl}ac_space=\ *)
2476      sed -n \
2477	"s/'\''/'\''\\\\'\'''\''/g;
2478	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2479      ;; #(
2480    *)
2481      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2482      ;;
2483    esac |
2484    sort
2485)
2486    echo
2487
2488    $as_echo "## ----------------- ##
2489## Output variables. ##
2490## ----------------- ##"
2491    echo
2492    for ac_var in $ac_subst_vars
2493    do
2494      eval ac_val=\$$ac_var
2495      case $ac_val in
2496      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2497      esac
2498      $as_echo "$ac_var='\''$ac_val'\''"
2499    done | sort
2500    echo
2501
2502    if test -n "$ac_subst_files"; then
2503      $as_echo "## ------------------- ##
2504## File substitutions. ##
2505## ------------------- ##"
2506      echo
2507      for ac_var in $ac_subst_files
2508      do
2509	eval ac_val=\$$ac_var
2510	case $ac_val in
2511	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2512	esac
2513	$as_echo "$ac_var='\''$ac_val'\''"
2514      done | sort
2515      echo
2516    fi
2517
2518    if test -s confdefs.h; then
2519      $as_echo "## ----------- ##
2520## confdefs.h. ##
2521## ----------- ##"
2522      echo
2523      cat confdefs.h
2524      echo
2525    fi
2526    test "$ac_signal" != 0 &&
2527      $as_echo "$as_me: caught signal $ac_signal"
2528    $as_echo "$as_me: exit $exit_status"
2529  } >&5
2530  rm -f core *.core core.conftest.* &&
2531    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2532    exit $exit_status
2533' 0
2534for ac_signal in 1 2 13 15; do
2535  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2536done
2537ac_signal=0
2538
2539# confdefs.h avoids OS command line length limits that DEFS can exceed.
2540rm -f -r conftest* confdefs.h
2541
2542$as_echo "/* confdefs.h */" > confdefs.h
2543
2544# Predefined preprocessor variables.
2545
2546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_NAME "$PACKAGE_NAME"
2548_ACEOF
2549
2550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2552_ACEOF
2553
2554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_VERSION "$PACKAGE_VERSION"
2556_ACEOF
2557
2558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_STRING "$PACKAGE_STRING"
2560_ACEOF
2561
2562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2564_ACEOF
2565
2566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_URL "$PACKAGE_URL"
2568_ACEOF
2569
2570
2571# Let the site file select an alternate cache file if it wants to.
2572# Prefer an explicitly selected file to automatically selected ones.
2573ac_site_file1=NONE
2574ac_site_file2=NONE
2575if test -n "$CONFIG_SITE"; then
2576  # We do not want a PATH search for config.site.
2577  case $CONFIG_SITE in #((
2578    -*)  ac_site_file1=./$CONFIG_SITE;;
2579    */*) ac_site_file1=$CONFIG_SITE;;
2580    *)   ac_site_file1=./$CONFIG_SITE;;
2581  esac
2582elif test "x$prefix" != xNONE; then
2583  ac_site_file1=$prefix/share/config.site
2584  ac_site_file2=$prefix/etc/config.site
2585else
2586  ac_site_file1=$ac_default_prefix/share/config.site
2587  ac_site_file2=$ac_default_prefix/etc/config.site
2588fi
2589for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2590do
2591  test "x$ac_site_file" = xNONE && continue
2592  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2593    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2594$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2595    sed 's/^/| /' "$ac_site_file" >&5
2596    . "$ac_site_file" \
2597      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2599as_fn_error $? "failed to load site script $ac_site_file
2600See \`config.log' for more details" "$LINENO" 5; }
2601  fi
2602done
2603
2604if test -r "$cache_file"; then
2605  # Some versions of bash will fail to source /dev/null (special files
2606  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2607  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2608    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2609$as_echo "$as_me: loading cache $cache_file" >&6;}
2610    case $cache_file in
2611      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2612      *)                      . "./$cache_file";;
2613    esac
2614  fi
2615else
2616  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2617$as_echo "$as_me: creating cache $cache_file" >&6;}
2618  >$cache_file
2619fi
2620
2621# Check that the precious variables saved in the cache have kept the same
2622# value.
2623ac_cache_corrupted=false
2624for ac_var in $ac_precious_vars; do
2625  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2626  eval ac_new_set=\$ac_env_${ac_var}_set
2627  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2628  eval ac_new_val=\$ac_env_${ac_var}_value
2629  case $ac_old_set,$ac_new_set in
2630    set,)
2631      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2632$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2633      ac_cache_corrupted=: ;;
2634    ,set)
2635      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2636$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2637      ac_cache_corrupted=: ;;
2638    ,);;
2639    *)
2640      if test "x$ac_old_val" != "x$ac_new_val"; then
2641	# differences in whitespace do not lead to failure.
2642	ac_old_val_w=`echo x $ac_old_val`
2643	ac_new_val_w=`echo x $ac_new_val`
2644	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2645	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2646$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2647	  ac_cache_corrupted=:
2648	else
2649	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2650$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2651	  eval $ac_var=\$ac_old_val
2652	fi
2653	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2654$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2655	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2656$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2657      fi;;
2658  esac
2659  # Pass precious variables to config.status.
2660  if test "$ac_new_set" = set; then
2661    case $ac_new_val in
2662    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2663    *) ac_arg=$ac_var=$ac_new_val ;;
2664    esac
2665    case " $ac_configure_args " in
2666      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2667      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2668    esac
2669  fi
2670done
2671if $ac_cache_corrupted; then
2672  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2674  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2675$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2676  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2677fi
2678## -------------------- ##
2679## Main body of script. ##
2680## -------------------- ##
2681
2682ac_ext=c
2683ac_cpp='$CPP $CPPFLAGS'
2684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2686ac_compiler_gnu=$ac_cv_c_compiler_gnu
2687
2688
2689
2690am__api_version='1.16'
2691
2692ac_aux_dir=
2693for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2694  if test -f "$ac_dir/install-sh"; then
2695    ac_aux_dir=$ac_dir
2696    ac_install_sh="$ac_aux_dir/install-sh -c"
2697    break
2698  elif test -f "$ac_dir/install.sh"; then
2699    ac_aux_dir=$ac_dir
2700    ac_install_sh="$ac_aux_dir/install.sh -c"
2701    break
2702  elif test -f "$ac_dir/shtool"; then
2703    ac_aux_dir=$ac_dir
2704    ac_install_sh="$ac_aux_dir/shtool install -c"
2705    break
2706  fi
2707done
2708if test -z "$ac_aux_dir"; then
2709  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2710fi
2711
2712# These three variables are undocumented and unsupported,
2713# and are intended to be withdrawn in a future Autoconf release.
2714# They can cause serious problems if a builder's source tree is in a directory
2715# whose full name contains unusual characters.
2716ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2717ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2718ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2719
2720
2721# Find a good install program.  We prefer a C program (faster),
2722# so one script is as good as another.  But avoid the broken or
2723# incompatible versions:
2724# SysV /etc/install, /usr/sbin/install
2725# SunOS /usr/etc/install
2726# IRIX /sbin/install
2727# AIX /bin/install
2728# AmigaOS /C/install, which installs bootblocks on floppy discs
2729# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2730# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2731# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2732# OS/2's system install, which has a completely different semantic
2733# ./install, which can be erroneously created by make from ./install.sh.
2734# Reject install programs that cannot install multiple files.
2735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2736$as_echo_n "checking for a BSD-compatible install... " >&6; }
2737if test -z "$INSTALL"; then
2738if ${ac_cv_path_install+:} false; then :
2739  $as_echo_n "(cached) " >&6
2740else
2741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2742for as_dir in $PATH
2743do
2744  IFS=$as_save_IFS
2745  test -z "$as_dir" && as_dir=.
2746    # Account for people who put trailing slashes in PATH elements.
2747case $as_dir/ in #((
2748  ./ | .// | /[cC]/* | \
2749  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2750  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2751  /usr/ucb/* ) ;;
2752  *)
2753    # OSF1 and SCO ODT 3.0 have their own names for install.
2754    # Don't use installbsd from OSF since it installs stuff as root
2755    # by default.
2756    for ac_prog in ginstall scoinst install; do
2757      for ac_exec_ext in '' $ac_executable_extensions; do
2758	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2759	  if test $ac_prog = install &&
2760	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2761	    # AIX install.  It has an incompatible calling convention.
2762	    :
2763	  elif test $ac_prog = install &&
2764	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2765	    # program-specific install script used by HP pwplus--don't use.
2766	    :
2767	  else
2768	    rm -rf conftest.one conftest.two conftest.dir
2769	    echo one > conftest.one
2770	    echo two > conftest.two
2771	    mkdir conftest.dir
2772	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2773	      test -s conftest.one && test -s conftest.two &&
2774	      test -s conftest.dir/conftest.one &&
2775	      test -s conftest.dir/conftest.two
2776	    then
2777	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2778	      break 3
2779	    fi
2780	  fi
2781	fi
2782      done
2783    done
2784    ;;
2785esac
2786
2787  done
2788IFS=$as_save_IFS
2789
2790rm -rf conftest.one conftest.two conftest.dir
2791
2792fi
2793  if test "${ac_cv_path_install+set}" = set; then
2794    INSTALL=$ac_cv_path_install
2795  else
2796    # As a last resort, use the slow shell script.  Don't cache a
2797    # value for INSTALL within a source directory, because that will
2798    # break other packages using the cache if that directory is
2799    # removed, or if the value is a relative name.
2800    INSTALL=$ac_install_sh
2801  fi
2802fi
2803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2804$as_echo "$INSTALL" >&6; }
2805
2806# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2807# It thinks the first close brace ends the variable substitution.
2808test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2809
2810test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2811
2812test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2813
2814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2815$as_echo_n "checking whether build environment is sane... " >&6; }
2816# Reject unsafe characters in $srcdir or the absolute working directory
2817# name.  Accept space and tab only in the latter.
2818am_lf='
2819'
2820case `pwd` in
2821  *[\\\"\#\$\&\'\`$am_lf]*)
2822    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
2823esac
2824case $srcdir in
2825  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
2826    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
2827esac
2828
2829# Do 'set' in a subshell so we don't clobber the current shell's
2830# arguments.  Must try -L first in case configure is actually a
2831# symlink; some systems play weird games with the mod time of symlinks
2832# (eg FreeBSD returns the mod time of the symlink's containing
2833# directory).
2834if (
2835   am_has_slept=no
2836   for am_try in 1 2; do
2837     echo "timestamp, slept: $am_has_slept" > conftest.file
2838     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2839     if test "$*" = "X"; then
2840	# -L didn't work.
2841	set X `ls -t "$srcdir/configure" conftest.file`
2842     fi
2843     if test "$*" != "X $srcdir/configure conftest.file" \
2844	&& test "$*" != "X conftest.file $srcdir/configure"; then
2845
2846	# If neither matched, then we have a broken ls.  This can happen
2847	# if, for instance, CONFIG_SHELL is bash and it inherits a
2848	# broken ls alias from the environment.  This has actually
2849	# happened.  Such a system could not be considered "sane".
2850	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
2851  alias in your environment" "$LINENO" 5
2852     fi
2853     if test "$2" = conftest.file || test $am_try -eq 2; then
2854       break
2855     fi
2856     # Just in case.
2857     sleep 1
2858     am_has_slept=yes
2859   done
2860   test "$2" = conftest.file
2861   )
2862then
2863   # Ok.
2864   :
2865else
2866   as_fn_error $? "newly created file is older than distributed files!
2867Check your system clock" "$LINENO" 5
2868fi
2869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2870$as_echo "yes" >&6; }
2871# If we didn't sleep, we still need to ensure time stamps of config.status and
2872# generated files are strictly newer.
2873am_sleep_pid=
2874if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2875  ( sleep 1 ) &
2876  am_sleep_pid=$!
2877fi
2878
2879rm -f conftest.file
2880
2881test "$program_prefix" != NONE &&
2882  program_transform_name="s&^&$program_prefix&;$program_transform_name"
2883# Use a double $ so make ignores it.
2884test "$program_suffix" != NONE &&
2885  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2886# Double any \ or $.
2887# By default was `s,x,x', remove it if useless.
2888ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2889program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2890
2891# Expand $ac_aux_dir to an absolute path.
2892am_aux_dir=`cd "$ac_aux_dir" && pwd`
2893
2894if test x"${MISSING+set}" != xset; then
2895  MISSING="\${SHELL} '$am_aux_dir/missing'"
2896fi
2897# Use eval to expand $SHELL
2898if eval "$MISSING --is-lightweight"; then
2899  am_missing_run="$MISSING "
2900else
2901  am_missing_run=
2902  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
2903$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
2904fi
2905
2906if test x"${install_sh+set}" != xset; then
2907  case $am_aux_dir in
2908  *\ * | *\	*)
2909    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2910  *)
2911    install_sh="\${SHELL} $am_aux_dir/install-sh"
2912  esac
2913fi
2914
2915# Installed binaries are usually stripped using 'strip' when the user
2916# run "make install-strip".  However 'strip' might not be the right
2917# tool to use in cross-compilation environments, therefore Automake
2918# will honor the 'STRIP' environment variable to overrule this program.
2919if test "$cross_compiling" != no; then
2920  if test -n "$ac_tool_prefix"; then
2921  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2922set dummy ${ac_tool_prefix}strip; ac_word=$2
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2924$as_echo_n "checking for $ac_word... " >&6; }
2925if ${ac_cv_prog_STRIP+:} false; then :
2926  $as_echo_n "(cached) " >&6
2927else
2928  if test -n "$STRIP"; then
2929  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2930else
2931as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2932for as_dir in $PATH
2933do
2934  IFS=$as_save_IFS
2935  test -z "$as_dir" && as_dir=.
2936    for ac_exec_ext in '' $ac_executable_extensions; do
2937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2938    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2940    break 2
2941  fi
2942done
2943  done
2944IFS=$as_save_IFS
2945
2946fi
2947fi
2948STRIP=$ac_cv_prog_STRIP
2949if test -n "$STRIP"; then
2950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2951$as_echo "$STRIP" >&6; }
2952else
2953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2954$as_echo "no" >&6; }
2955fi
2956
2957
2958fi
2959if test -z "$ac_cv_prog_STRIP"; then
2960  ac_ct_STRIP=$STRIP
2961  # Extract the first word of "strip", so it can be a program name with args.
2962set dummy strip; ac_word=$2
2963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2964$as_echo_n "checking for $ac_word... " >&6; }
2965if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
2966  $as_echo_n "(cached) " >&6
2967else
2968  if test -n "$ac_ct_STRIP"; then
2969  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2970else
2971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2972for as_dir in $PATH
2973do
2974  IFS=$as_save_IFS
2975  test -z "$as_dir" && as_dir=.
2976    for ac_exec_ext in '' $ac_executable_extensions; do
2977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2978    ac_cv_prog_ac_ct_STRIP="strip"
2979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2980    break 2
2981  fi
2982done
2983  done
2984IFS=$as_save_IFS
2985
2986fi
2987fi
2988ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2989if test -n "$ac_ct_STRIP"; then
2990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
2991$as_echo "$ac_ct_STRIP" >&6; }
2992else
2993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2994$as_echo "no" >&6; }
2995fi
2996
2997  if test "x$ac_ct_STRIP" = x; then
2998    STRIP=":"
2999  else
3000    case $cross_compiling:$ac_tool_warned in
3001yes:)
3002{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3003$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3004ac_tool_warned=yes ;;
3005esac
3006    STRIP=$ac_ct_STRIP
3007  fi
3008else
3009  STRIP="$ac_cv_prog_STRIP"
3010fi
3011
3012fi
3013INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3014
3015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3016$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3017if test -z "$MKDIR_P"; then
3018  if ${ac_cv_path_mkdir+:} false; then :
3019  $as_echo_n "(cached) " >&6
3020else
3021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3022for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3023do
3024  IFS=$as_save_IFS
3025  test -z "$as_dir" && as_dir=.
3026    for ac_prog in mkdir gmkdir; do
3027	 for ac_exec_ext in '' $ac_executable_extensions; do
3028	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3029	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3030	     'mkdir (GNU coreutils) '* | \
3031	     'mkdir (coreutils) '* | \
3032	     'mkdir (fileutils) '4.1*)
3033	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3034	       break 3;;
3035	   esac
3036	 done
3037       done
3038  done
3039IFS=$as_save_IFS
3040
3041fi
3042
3043  test -d ./--version && rmdir ./--version
3044  if test "${ac_cv_path_mkdir+set}" = set; then
3045    MKDIR_P="$ac_cv_path_mkdir -p"
3046  else
3047    # As a last resort, use the slow shell script.  Don't cache a
3048    # value for MKDIR_P within a source directory, because that will
3049    # break other packages using the cache if that directory is
3050    # removed, or if the value is a relative name.
3051    MKDIR_P="$ac_install_sh -d"
3052  fi
3053fi
3054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3055$as_echo "$MKDIR_P" >&6; }
3056
3057for ac_prog in gawk mawk nawk awk
3058do
3059  # Extract the first word of "$ac_prog", so it can be a program name with args.
3060set dummy $ac_prog; ac_word=$2
3061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3062$as_echo_n "checking for $ac_word... " >&6; }
3063if ${ac_cv_prog_AWK+:} false; then :
3064  $as_echo_n "(cached) " >&6
3065else
3066  if test -n "$AWK"; then
3067  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3068else
3069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3070for as_dir in $PATH
3071do
3072  IFS=$as_save_IFS
3073  test -z "$as_dir" && as_dir=.
3074    for ac_exec_ext in '' $ac_executable_extensions; do
3075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3076    ac_cv_prog_AWK="$ac_prog"
3077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3078    break 2
3079  fi
3080done
3081  done
3082IFS=$as_save_IFS
3083
3084fi
3085fi
3086AWK=$ac_cv_prog_AWK
3087if test -n "$AWK"; then
3088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3089$as_echo "$AWK" >&6; }
3090else
3091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3092$as_echo "no" >&6; }
3093fi
3094
3095
3096  test -n "$AWK" && break
3097done
3098
3099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3100$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3101set x ${MAKE-make}
3102ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3103if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3104  $as_echo_n "(cached) " >&6
3105else
3106  cat >conftest.make <<\_ACEOF
3107SHELL = /bin/sh
3108all:
3109	@echo '@@@%%%=$(MAKE)=@@@%%%'
3110_ACEOF
3111# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3112case `${MAKE-make} -f conftest.make 2>/dev/null` in
3113  *@@@%%%=?*=@@@%%%*)
3114    eval ac_cv_prog_make_${ac_make}_set=yes;;
3115  *)
3116    eval ac_cv_prog_make_${ac_make}_set=no;;
3117esac
3118rm -f conftest.make
3119fi
3120if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3122$as_echo "yes" >&6; }
3123  SET_MAKE=
3124else
3125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3126$as_echo "no" >&6; }
3127  SET_MAKE="MAKE=${MAKE-make}"
3128fi
3129
3130rm -rf .tst 2>/dev/null
3131mkdir .tst 2>/dev/null
3132if test -d .tst; then
3133  am__leading_dot=.
3134else
3135  am__leading_dot=_
3136fi
3137rmdir .tst 2>/dev/null
3138
3139# Check whether --enable-silent-rules was given.
3140if test "${enable_silent_rules+set}" = set; then :
3141  enableval=$enable_silent_rules;
3142fi
3143
3144case $enable_silent_rules in # (((
3145  yes) AM_DEFAULT_VERBOSITY=0;;
3146   no) AM_DEFAULT_VERBOSITY=1;;
3147    *) AM_DEFAULT_VERBOSITY=1;;
3148esac
3149am_make=${MAKE-make}
3150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3151$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3152if ${am_cv_make_support_nested_variables+:} false; then :
3153  $as_echo_n "(cached) " >&6
3154else
3155  if $as_echo 'TRUE=$(BAR$(V))
3156BAR0=false
3157BAR1=true
3158V=1
3159am__doit:
3160	@$(TRUE)
3161.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3162  am_cv_make_support_nested_variables=yes
3163else
3164  am_cv_make_support_nested_variables=no
3165fi
3166fi
3167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3168$as_echo "$am_cv_make_support_nested_variables" >&6; }
3169if test $am_cv_make_support_nested_variables = yes; then
3170    AM_V='$(V)'
3171  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3172else
3173  AM_V=$AM_DEFAULT_VERBOSITY
3174  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3175fi
3176AM_BACKSLASH='\'
3177
3178if test "`cd $srcdir && pwd`" != "`pwd`"; then
3179  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3180  # is not polluted with repeated "-I."
3181  am__isrc=' -I$(srcdir)'
3182  # test to see if srcdir already configured
3183  if test -f $srcdir/config.status; then
3184    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3185  fi
3186fi
3187
3188# test whether we have cygpath
3189if test -z "$CYGPATH_W"; then
3190  if (cygpath --version) >/dev/null 2>/dev/null; then
3191    CYGPATH_W='cygpath -w'
3192  else
3193    CYGPATH_W=echo
3194  fi
3195fi
3196
3197
3198# Define the identity of the package.
3199 PACKAGE='zabbix'
3200 VERSION='5.0.19'
3201
3202
3203cat >>confdefs.h <<_ACEOF
3204#define PACKAGE "$PACKAGE"
3205_ACEOF
3206
3207
3208cat >>confdefs.h <<_ACEOF
3209#define VERSION "$VERSION"
3210_ACEOF
3211
3212# Some tools Automake needs.
3213
3214ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3215
3216
3217AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3218
3219
3220AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3221
3222
3223AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3224
3225
3226MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3227
3228# For better backward compatibility.  To be removed once Automake 1.9.x
3229# dies out for good.  For more background, see:
3230# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3231# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3232mkdir_p='$(MKDIR_P)'
3233
3234# We need awk for the "check" target (and possibly the TAP driver).  The
3235# system "awk" is bad on some platforms.
3236# Always define AMTAR for backward compatibility.  Yes, it's still used
3237# in the wild :-(  We should find a proper way to deprecate it ...
3238AMTAR='$${TAR-tar}'
3239
3240
3241# We'll loop over all known methods to create a tar archive until one works.
3242_am_tools='gnutar  pax cpio none'
3243
3244am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3245
3246
3247
3248
3249
3250
3251# POSIX will say in a future version that running "rm -f" with no argument
3252# is OK; and we want to be able to make that assumption in our Makefile
3253# recipes.  So use an aggressive probe to check that the usage we want is
3254# actually supported "in the wild" to an acceptable degree.
3255# See automake bug#10828.
3256# To make any issue more visible, cause the running configure to be aborted
3257# by default if the 'rm' program in use doesn't match our expectations; the
3258# user can still override this though.
3259if rm -f && rm -fr && rm -rf; then : OK; else
3260  cat >&2 <<'END'
3261Oops!
3262
3263Your 'rm' program seems unable to run without file operands specified
3264on the command line, even when the '-f' option is present.  This is contrary
3265to the behaviour of most rm programs out there, and not conforming with
3266the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3267
3268Please tell bug-automake@gnu.org about your system, including the value
3269of your $PATH and any error possibly output before this message.  This
3270can help us improve future automake versions.
3271
3272END
3273  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3274    echo 'Configuration will proceed anyway, since you have set the' >&2
3275    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3276    echo >&2
3277  else
3278    cat >&2 <<'END'
3279Aborting the configuration process, to ensure you take notice of the issue.
3280
3281You can download and install GNU coreutils to get an 'rm' implementation
3282that behaves properly: <https://www.gnu.org/software/coreutils/>.
3283
3284If you want to complete the configuration process using your problematic
3285'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3286to "yes", and re-run configure.
3287
3288END
3289    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3290  fi
3291fi
3292
3293
3294{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring $PACKAGE_NAME $PACKAGE_VERSION" >&5
3295$as_echo "$as_me: Configuring $PACKAGE_NAME $PACKAGE_VERSION" >&6;}
3296
3297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3298$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3299set x ${MAKE-make}
3300ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3301if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3302  $as_echo_n "(cached) " >&6
3303else
3304  cat >conftest.make <<\_ACEOF
3305SHELL = /bin/sh
3306all:
3307	@echo '@@@%%%=$(MAKE)=@@@%%%'
3308_ACEOF
3309# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3310case `${MAKE-make} -f conftest.make 2>/dev/null` in
3311  *@@@%%%=?*=@@@%%%*)
3312    eval ac_cv_prog_make_${ac_make}_set=yes;;
3313  *)
3314    eval ac_cv_prog_make_${ac_make}_set=no;;
3315esac
3316rm -f conftest.make
3317fi
3318if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3320$as_echo "yes" >&6; }
3321  SET_MAKE=
3322else
3323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3324$as_echo "no" >&6; }
3325  SET_MAKE="MAKE=${MAKE-make}"
3326fi
3327
3328
3329ac_config_headers="$ac_config_headers include/config.h"
3330
3331
3332# Make sure we can run config.sub.
3333$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3334  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3335
3336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3337$as_echo_n "checking build system type... " >&6; }
3338if ${ac_cv_build+:} false; then :
3339  $as_echo_n "(cached) " >&6
3340else
3341  ac_build_alias=$build_alias
3342test "x$ac_build_alias" = x &&
3343  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3344test "x$ac_build_alias" = x &&
3345  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3346ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3347  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3348
3349fi
3350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3351$as_echo "$ac_cv_build" >&6; }
3352case $ac_cv_build in
3353*-*-*) ;;
3354*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3355esac
3356build=$ac_cv_build
3357ac_save_IFS=$IFS; IFS='-'
3358set x $ac_cv_build
3359shift
3360build_cpu=$1
3361build_vendor=$2
3362shift; shift
3363# Remember, the first character of IFS is used to create $*,
3364# except with old shells:
3365build_os=$*
3366IFS=$ac_save_IFS
3367case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3368
3369
3370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3371$as_echo_n "checking host system type... " >&6; }
3372if ${ac_cv_host+:} false; then :
3373  $as_echo_n "(cached) " >&6
3374else
3375  if test "x$host_alias" = x; then
3376  ac_cv_host=$ac_cv_build
3377else
3378  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3379    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3380fi
3381
3382fi
3383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3384$as_echo "$ac_cv_host" >&6; }
3385case $ac_cv_host in
3386*-*-*) ;;
3387*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3388esac
3389host=$ac_cv_host
3390ac_save_IFS=$IFS; IFS='-'
3391set x $ac_cv_host
3392shift
3393host_cpu=$1
3394host_vendor=$2
3395shift; shift
3396# Remember, the first character of IFS is used to create $*,
3397# except with old shells:
3398host_os=$*
3399IFS=$ac_save_IFS
3400case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3401
3402
3403
3404
3405ac_ext=c
3406ac_cpp='$CPP $CPPFLAGS'
3407ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3408ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3409ac_compiler_gnu=$ac_cv_c_compiler_gnu
3410if test -n "$ac_tool_prefix"; then
3411  for ac_prog in cc c99 gcc clang
3412  do
3413    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3414set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3416$as_echo_n "checking for $ac_word... " >&6; }
3417if ${ac_cv_prog_CC+:} false; then :
3418  $as_echo_n "(cached) " >&6
3419else
3420  if test -n "$CC"; then
3421  ac_cv_prog_CC="$CC" # Let the user override the test.
3422else
3423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3424for as_dir in $PATH
3425do
3426  IFS=$as_save_IFS
3427  test -z "$as_dir" && as_dir=.
3428    for ac_exec_ext in '' $ac_executable_extensions; do
3429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3430    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3432    break 2
3433  fi
3434done
3435  done
3436IFS=$as_save_IFS
3437
3438fi
3439fi
3440CC=$ac_cv_prog_CC
3441if test -n "$CC"; then
3442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3443$as_echo "$CC" >&6; }
3444else
3445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3446$as_echo "no" >&6; }
3447fi
3448
3449
3450    test -n "$CC" && break
3451  done
3452fi
3453if test -z "$CC"; then
3454  ac_ct_CC=$CC
3455  for ac_prog in cc c99 gcc clang
3456do
3457  # Extract the first word of "$ac_prog", so it can be a program name with args.
3458set dummy $ac_prog; ac_word=$2
3459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3460$as_echo_n "checking for $ac_word... " >&6; }
3461if ${ac_cv_prog_ac_ct_CC+:} false; then :
3462  $as_echo_n "(cached) " >&6
3463else
3464  if test -n "$ac_ct_CC"; then
3465  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3466else
3467as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3468for as_dir in $PATH
3469do
3470  IFS=$as_save_IFS
3471  test -z "$as_dir" && as_dir=.
3472    for ac_exec_ext in '' $ac_executable_extensions; do
3473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3474    ac_cv_prog_ac_ct_CC="$ac_prog"
3475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3476    break 2
3477  fi
3478done
3479  done
3480IFS=$as_save_IFS
3481
3482fi
3483fi
3484ac_ct_CC=$ac_cv_prog_ac_ct_CC
3485if test -n "$ac_ct_CC"; then
3486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3487$as_echo "$ac_ct_CC" >&6; }
3488else
3489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3490$as_echo "no" >&6; }
3491fi
3492
3493
3494  test -n "$ac_ct_CC" && break
3495done
3496
3497  if test "x$ac_ct_CC" = x; then
3498    CC=""
3499  else
3500    case $cross_compiling:$ac_tool_warned in
3501yes:)
3502{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3503$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3504ac_tool_warned=yes ;;
3505esac
3506    CC=$ac_ct_CC
3507  fi
3508fi
3509
3510
3511test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3512$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3513as_fn_error $? "no acceptable C compiler found in \$PATH
3514See \`config.log' for more details" "$LINENO" 5; }
3515
3516# Provide some information about the compiler.
3517$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3518set X $ac_compile
3519ac_compiler=$2
3520for ac_option in --version -v -V -qversion; do
3521  { { ac_try="$ac_compiler $ac_option >&5"
3522case "(($ac_try" in
3523  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3524  *) ac_try_echo=$ac_try;;
3525esac
3526eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3527$as_echo "$ac_try_echo"; } >&5
3528  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3529  ac_status=$?
3530  if test -s conftest.err; then
3531    sed '10a\
3532... rest of stderr output deleted ...
3533         10q' conftest.err >conftest.er1
3534    cat conftest.er1 >&5
3535  fi
3536  rm -f conftest.er1 conftest.err
3537  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3538  test $ac_status = 0; }
3539done
3540
3541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3542/* end confdefs.h.  */
3543
3544int
3545main ()
3546{
3547
3548  ;
3549  return 0;
3550}
3551_ACEOF
3552ac_clean_files_save=$ac_clean_files
3553ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3554# Try to create an executable without -o first, disregard a.out.
3555# It will help us diagnose broken compilers, and finding out an intuition
3556# of exeext.
3557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3558$as_echo_n "checking whether the C compiler works... " >&6; }
3559ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3560
3561# The possible output files:
3562ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3563
3564ac_rmfiles=
3565for ac_file in $ac_files
3566do
3567  case $ac_file in
3568    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3569    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3570  esac
3571done
3572rm -f $ac_rmfiles
3573
3574if { { ac_try="$ac_link_default"
3575case "(($ac_try" in
3576  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3577  *) ac_try_echo=$ac_try;;
3578esac
3579eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3580$as_echo "$ac_try_echo"; } >&5
3581  (eval "$ac_link_default") 2>&5
3582  ac_status=$?
3583  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3584  test $ac_status = 0; }; then :
3585  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3586# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3587# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3588# so that the user can short-circuit this test for compilers unknown to
3589# Autoconf.
3590for ac_file in $ac_files ''
3591do
3592  test -f "$ac_file" || continue
3593  case $ac_file in
3594    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3595	;;
3596    [ab].out )
3597	# We found the default executable, but exeext='' is most
3598	# certainly right.
3599	break;;
3600    *.* )
3601	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3602	then :; else
3603	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3604	fi
3605	# We set ac_cv_exeext here because the later test for it is not
3606	# safe: cross compilers may not add the suffix if given an `-o'
3607	# argument, so we may need to know it at that point already.
3608	# Even if this section looks crufty: it has the advantage of
3609	# actually working.
3610	break;;
3611    * )
3612	break;;
3613  esac
3614done
3615test "$ac_cv_exeext" = no && ac_cv_exeext=
3616
3617else
3618  ac_file=''
3619fi
3620if test -z "$ac_file"; then :
3621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3622$as_echo "no" >&6; }
3623$as_echo "$as_me: failed program was:" >&5
3624sed 's/^/| /' conftest.$ac_ext >&5
3625
3626{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3627$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3628as_fn_error 77 "C compiler cannot create executables
3629See \`config.log' for more details" "$LINENO" 5; }
3630else
3631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3632$as_echo "yes" >&6; }
3633fi
3634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3635$as_echo_n "checking for C compiler default output file name... " >&6; }
3636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3637$as_echo "$ac_file" >&6; }
3638ac_exeext=$ac_cv_exeext
3639
3640rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3641ac_clean_files=$ac_clean_files_save
3642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3643$as_echo_n "checking for suffix of executables... " >&6; }
3644if { { ac_try="$ac_link"
3645case "(($ac_try" in
3646  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3647  *) ac_try_echo=$ac_try;;
3648esac
3649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3650$as_echo "$ac_try_echo"; } >&5
3651  (eval "$ac_link") 2>&5
3652  ac_status=$?
3653  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3654  test $ac_status = 0; }; then :
3655  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3656# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3657# work properly (i.e., refer to `conftest.exe'), while it won't with
3658# `rm'.
3659for ac_file in conftest.exe conftest conftest.*; do
3660  test -f "$ac_file" || continue
3661  case $ac_file in
3662    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3663    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3664	  break;;
3665    * ) break;;
3666  esac
3667done
3668else
3669  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3671as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3672See \`config.log' for more details" "$LINENO" 5; }
3673fi
3674rm -f conftest conftest$ac_cv_exeext
3675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3676$as_echo "$ac_cv_exeext" >&6; }
3677
3678rm -f conftest.$ac_ext
3679EXEEXT=$ac_cv_exeext
3680ac_exeext=$EXEEXT
3681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3682/* end confdefs.h.  */
3683#include <stdio.h>
3684int
3685main ()
3686{
3687FILE *f = fopen ("conftest.out", "w");
3688 return ferror (f) || fclose (f) != 0;
3689
3690  ;
3691  return 0;
3692}
3693_ACEOF
3694ac_clean_files="$ac_clean_files conftest.out"
3695# Check that the compiler produces executables we can run.  If not, either
3696# the compiler is broken, or we cross compile.
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3698$as_echo_n "checking whether we are cross compiling... " >&6; }
3699if test "$cross_compiling" != yes; then
3700  { { ac_try="$ac_link"
3701case "(($ac_try" in
3702  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3703  *) ac_try_echo=$ac_try;;
3704esac
3705eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3706$as_echo "$ac_try_echo"; } >&5
3707  (eval "$ac_link") 2>&5
3708  ac_status=$?
3709  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3710  test $ac_status = 0; }
3711  if { ac_try='./conftest$ac_cv_exeext'
3712  { { case "(($ac_try" in
3713  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3714  *) ac_try_echo=$ac_try;;
3715esac
3716eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3717$as_echo "$ac_try_echo"; } >&5
3718  (eval "$ac_try") 2>&5
3719  ac_status=$?
3720  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3721  test $ac_status = 0; }; }; then
3722    cross_compiling=no
3723  else
3724    if test "$cross_compiling" = maybe; then
3725	cross_compiling=yes
3726    else
3727	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3729as_fn_error $? "cannot run C compiled programs.
3730If you meant to cross compile, use \`--host'.
3731See \`config.log' for more details" "$LINENO" 5; }
3732    fi
3733  fi
3734fi
3735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3736$as_echo "$cross_compiling" >&6; }
3737
3738rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3739ac_clean_files=$ac_clean_files_save
3740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3741$as_echo_n "checking for suffix of object files... " >&6; }
3742if ${ac_cv_objext+:} false; then :
3743  $as_echo_n "(cached) " >&6
3744else
3745  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3746/* end confdefs.h.  */
3747
3748int
3749main ()
3750{
3751
3752  ;
3753  return 0;
3754}
3755_ACEOF
3756rm -f conftest.o conftest.obj
3757if { { ac_try="$ac_compile"
3758case "(($ac_try" in
3759  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3760  *) ac_try_echo=$ac_try;;
3761esac
3762eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3763$as_echo "$ac_try_echo"; } >&5
3764  (eval "$ac_compile") 2>&5
3765  ac_status=$?
3766  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3767  test $ac_status = 0; }; then :
3768  for ac_file in conftest.o conftest.obj conftest.*; do
3769  test -f "$ac_file" || continue;
3770  case $ac_file in
3771    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3772    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3773       break;;
3774  esac
3775done
3776else
3777  $as_echo "$as_me: failed program was:" >&5
3778sed 's/^/| /' conftest.$ac_ext >&5
3779
3780{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3781$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3782as_fn_error $? "cannot compute suffix of object files: cannot compile
3783See \`config.log' for more details" "$LINENO" 5; }
3784fi
3785rm -f conftest.$ac_cv_objext conftest.$ac_ext
3786fi
3787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3788$as_echo "$ac_cv_objext" >&6; }
3789OBJEXT=$ac_cv_objext
3790ac_objext=$OBJEXT
3791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3792$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3793if ${ac_cv_c_compiler_gnu+:} false; then :
3794  $as_echo_n "(cached) " >&6
3795else
3796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3797/* end confdefs.h.  */
3798
3799int
3800main ()
3801{
3802#ifndef __GNUC__
3803       choke me
3804#endif
3805
3806  ;
3807  return 0;
3808}
3809_ACEOF
3810if ac_fn_c_try_compile "$LINENO"; then :
3811  ac_compiler_gnu=yes
3812else
3813  ac_compiler_gnu=no
3814fi
3815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3816ac_cv_c_compiler_gnu=$ac_compiler_gnu
3817
3818fi
3819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3820$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3821if test $ac_compiler_gnu = yes; then
3822  GCC=yes
3823else
3824  GCC=
3825fi
3826ac_test_CFLAGS=${CFLAGS+set}
3827ac_save_CFLAGS=$CFLAGS
3828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3829$as_echo_n "checking whether $CC accepts -g... " >&6; }
3830if ${ac_cv_prog_cc_g+:} false; then :
3831  $as_echo_n "(cached) " >&6
3832else
3833  ac_save_c_werror_flag=$ac_c_werror_flag
3834   ac_c_werror_flag=yes
3835   ac_cv_prog_cc_g=no
3836   CFLAGS="-g"
3837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3838/* end confdefs.h.  */
3839
3840int
3841main ()
3842{
3843
3844  ;
3845  return 0;
3846}
3847_ACEOF
3848if ac_fn_c_try_compile "$LINENO"; then :
3849  ac_cv_prog_cc_g=yes
3850else
3851  CFLAGS=""
3852      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3853/* end confdefs.h.  */
3854
3855int
3856main ()
3857{
3858
3859  ;
3860  return 0;
3861}
3862_ACEOF
3863if ac_fn_c_try_compile "$LINENO"; then :
3864
3865else
3866  ac_c_werror_flag=$ac_save_c_werror_flag
3867	 CFLAGS="-g"
3868	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3869/* end confdefs.h.  */
3870
3871int
3872main ()
3873{
3874
3875  ;
3876  return 0;
3877}
3878_ACEOF
3879if ac_fn_c_try_compile "$LINENO"; then :
3880  ac_cv_prog_cc_g=yes
3881fi
3882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3883fi
3884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3885fi
3886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3887   ac_c_werror_flag=$ac_save_c_werror_flag
3888fi
3889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3890$as_echo "$ac_cv_prog_cc_g" >&6; }
3891if test "$ac_test_CFLAGS" = set; then
3892  CFLAGS=$ac_save_CFLAGS
3893elif test $ac_cv_prog_cc_g = yes; then
3894  if test "$GCC" = yes; then
3895    CFLAGS="-g -O2"
3896  else
3897    CFLAGS="-g"
3898  fi
3899else
3900  if test "$GCC" = yes; then
3901    CFLAGS="-O2"
3902  else
3903    CFLAGS=
3904  fi
3905fi
3906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3907$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3908if ${ac_cv_prog_cc_c89+:} false; then :
3909  $as_echo_n "(cached) " >&6
3910else
3911  ac_cv_prog_cc_c89=no
3912ac_save_CC=$CC
3913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3914/* end confdefs.h.  */
3915#include <stdarg.h>
3916#include <stdio.h>
3917struct stat;
3918/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3919struct buf { int x; };
3920FILE * (*rcsopen) (struct buf *, struct stat *, int);
3921static char *e (p, i)
3922     char **p;
3923     int i;
3924{
3925  return p[i];
3926}
3927static char *f (char * (*g) (char **, int), char **p, ...)
3928{
3929  char *s;
3930  va_list v;
3931  va_start (v,p);
3932  s = g (p, va_arg (v,int));
3933  va_end (v);
3934  return s;
3935}
3936
3937/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3938   function prototypes and stuff, but not '\xHH' hex character constants.
3939   These don't provoke an error unfortunately, instead are silently treated
3940   as 'x'.  The following induces an error, until -std is added to get
3941   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3942   array size at least.  It's necessary to write '\x00'==0 to get something
3943   that's true only with -std.  */
3944int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3945
3946/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3947   inside strings and character constants.  */
3948#define FOO(x) 'x'
3949int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3950
3951int test (int i, double x);
3952struct s1 {int (*f) (int a);};
3953struct s2 {int (*f) (double a);};
3954int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3955int argc;
3956char **argv;
3957int
3958main ()
3959{
3960return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3961  ;
3962  return 0;
3963}
3964_ACEOF
3965for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3966	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3967do
3968  CC="$ac_save_CC $ac_arg"
3969  if ac_fn_c_try_compile "$LINENO"; then :
3970  ac_cv_prog_cc_c89=$ac_arg
3971fi
3972rm -f core conftest.err conftest.$ac_objext
3973  test "x$ac_cv_prog_cc_c89" != "xno" && break
3974done
3975rm -f conftest.$ac_ext
3976CC=$ac_save_CC
3977
3978fi
3979# AC_CACHE_VAL
3980case "x$ac_cv_prog_cc_c89" in
3981  x)
3982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3983$as_echo "none needed" >&6; } ;;
3984  xno)
3985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3986$as_echo "unsupported" >&6; } ;;
3987  *)
3988    CC="$CC $ac_cv_prog_cc_c89"
3989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3990$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3991esac
3992if test "x$ac_cv_prog_cc_c89" != xno; then :
3993
3994fi
3995
3996ac_ext=c
3997ac_cpp='$CPP $CPPFLAGS'
3998ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3999ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4000ac_compiler_gnu=$ac_cv_c_compiler_gnu
4001
4002ac_ext=c
4003ac_cpp='$CPP $CPPFLAGS'
4004ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4005ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4006ac_compiler_gnu=$ac_cv_c_compiler_gnu
4007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4008$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4009if ${am_cv_prog_cc_c_o+:} false; then :
4010  $as_echo_n "(cached) " >&6
4011else
4012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4013/* end confdefs.h.  */
4014
4015int
4016main ()
4017{
4018
4019  ;
4020  return 0;
4021}
4022_ACEOF
4023  # Make sure it works both with $CC and with simple cc.
4024  # Following AC_PROG_CC_C_O, we do the test twice because some
4025  # compilers refuse to overwrite an existing .o file with -o,
4026  # though they will create one.
4027  am_cv_prog_cc_c_o=yes
4028  for am_i in 1 2; do
4029    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4030   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4031   ac_status=$?
4032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4033   (exit $ac_status); } \
4034         && test -f conftest2.$ac_objext; then
4035      : OK
4036    else
4037      am_cv_prog_cc_c_o=no
4038      break
4039    fi
4040  done
4041  rm -f core conftest*
4042  unset am_i
4043fi
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4045$as_echo "$am_cv_prog_cc_c_o" >&6; }
4046if test "$am_cv_prog_cc_c_o" != yes; then
4047   # Losing compiler, so override with the script.
4048   # FIXME: It is wrong to rewrite CC.
4049   # But if we don't then we get into trouble of one sort or another.
4050   # A longer-term fix would be to have automake use am__CC in this case,
4051   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4052   CC="$am_aux_dir/compile $CC"
4053fi
4054ac_ext=c
4055ac_cpp='$CPP $CPPFLAGS'
4056ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4057ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4058ac_compiler_gnu=$ac_cv_c_compiler_gnu
4059
4060DEPDIR="${am__leading_dot}deps"
4061
4062ac_config_commands="$ac_config_commands depfiles"
4063
4064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4065$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
4066cat > confinc.mk << 'END'
4067am__doit:
4068	@echo this is the am__doit target >confinc.out
4069.PHONY: am__doit
4070END
4071am__include="#"
4072am__quote=
4073# BSD make does it like this.
4074echo '.include "confinc.mk" # ignored' > confmf.BSD
4075# Other make implementations (GNU, Solaris 10, AIX) do it like this.
4076echo 'include confinc.mk # ignored' > confmf.GNU
4077_am_result=no
4078for s in GNU BSD; do
4079  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4080   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4081   ac_status=$?
4082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4083   (exit $ac_status); }
4084  case $?:`cat confinc.out 2>/dev/null` in #(
4085  '0:this is the am__doit target') :
4086    case $s in #(
4087  BSD) :
4088    am__include='.include' am__quote='"' ;; #(
4089  *) :
4090    am__include='include' am__quote='' ;;
4091esac ;; #(
4092  *) :
4093     ;;
4094esac
4095  if test "$am__include" != "#"; then
4096    _am_result="yes ($s style)"
4097    break
4098  fi
4099done
4100rm -f confinc.* confmf.*
4101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4102$as_echo "${_am_result}" >&6; }
4103
4104# Check whether --enable-dependency-tracking was given.
4105if test "${enable_dependency_tracking+set}" = set; then :
4106  enableval=$enable_dependency_tracking;
4107fi
4108
4109if test "x$enable_dependency_tracking" != xno; then
4110  am_depcomp="$ac_aux_dir/depcomp"
4111  AMDEPBACKSLASH='\'
4112  am__nodep='_no'
4113fi
4114 if test "x$enable_dependency_tracking" != xno; then
4115  AMDEP_TRUE=
4116  AMDEP_FALSE='#'
4117else
4118  AMDEP_TRUE='#'
4119  AMDEP_FALSE=
4120fi
4121
4122
4123
4124depcc="$CC"   am_compiler_list=
4125
4126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4127$as_echo_n "checking dependency style of $depcc... " >&6; }
4128if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4129  $as_echo_n "(cached) " >&6
4130else
4131  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4132  # We make a subdir and do the tests there.  Otherwise we can end up
4133  # making bogus files that we don't know about and never remove.  For
4134  # instance it was reported that on HP-UX the gcc test will end up
4135  # making a dummy file named 'D' -- because '-MD' means "put the output
4136  # in D".
4137  rm -rf conftest.dir
4138  mkdir conftest.dir
4139  # Copy depcomp to subdir because otherwise we won't find it if we're
4140  # using a relative directory.
4141  cp "$am_depcomp" conftest.dir
4142  cd conftest.dir
4143  # We will build objects and dependencies in a subdirectory because
4144  # it helps to detect inapplicable dependency modes.  For instance
4145  # both Tru64's cc and ICC support -MD to output dependencies as a
4146  # side effect of compilation, but ICC will put the dependencies in
4147  # the current directory while Tru64 will put them in the object
4148  # directory.
4149  mkdir sub
4150
4151  am_cv_CC_dependencies_compiler_type=none
4152  if test "$am_compiler_list" = ""; then
4153     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4154  fi
4155  am__universal=false
4156  case " $depcc " in #(
4157     *\ -arch\ *\ -arch\ *) am__universal=true ;;
4158     esac
4159
4160  for depmode in $am_compiler_list; do
4161    # Setup a source with many dependencies, because some compilers
4162    # like to wrap large dependency lists on column 80 (with \), and
4163    # we should not choose a depcomp mode which is confused by this.
4164    #
4165    # We need to recreate these files for each test, as the compiler may
4166    # overwrite some of them when testing with obscure command lines.
4167    # This happens at least with the AIX C compiler.
4168    : > sub/conftest.c
4169    for i in 1 2 3 4 5 6; do
4170      echo '#include "conftst'$i'.h"' >> sub/conftest.c
4171      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4172      # Solaris 10 /bin/sh.
4173      echo '/* dummy */' > sub/conftst$i.h
4174    done
4175    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4176
4177    # We check with '-c' and '-o' for the sake of the "dashmstdout"
4178    # mode.  It turns out that the SunPro C++ compiler does not properly
4179    # handle '-M -o', and we need to detect this.  Also, some Intel
4180    # versions had trouble with output in subdirs.
4181    am__obj=sub/conftest.${OBJEXT-o}
4182    am__minus_obj="-o $am__obj"
4183    case $depmode in
4184    gcc)
4185      # This depmode causes a compiler race in universal mode.
4186      test "$am__universal" = false || continue
4187      ;;
4188    nosideeffect)
4189      # After this tag, mechanisms are not by side-effect, so they'll
4190      # only be used when explicitly requested.
4191      if test "x$enable_dependency_tracking" = xyes; then
4192	continue
4193      else
4194	break
4195      fi
4196      ;;
4197    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4198      # This compiler won't grok '-c -o', but also, the minuso test has
4199      # not run yet.  These depmodes are late enough in the game, and
4200      # so weak that their functioning should not be impacted.
4201      am__obj=conftest.${OBJEXT-o}
4202      am__minus_obj=
4203      ;;
4204    none) break ;;
4205    esac
4206    if depmode=$depmode \
4207       source=sub/conftest.c object=$am__obj \
4208       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4209       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4210         >/dev/null 2>conftest.err &&
4211       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4212       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4213       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4214       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4215      # icc doesn't choke on unknown options, it will just issue warnings
4216      # or remarks (even with -Werror).  So we grep stderr for any message
4217      # that says an option was ignored or not supported.
4218      # When given -MP, icc 7.0 and 7.1 complain thusly:
4219      #   icc: Command line warning: ignoring option '-M'; no argument required
4220      # The diagnosis changed in icc 8.0:
4221      #   icc: Command line remark: option '-MP' not supported
4222      if (grep 'ignoring option' conftest.err ||
4223          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4224        am_cv_CC_dependencies_compiler_type=$depmode
4225        break
4226      fi
4227    fi
4228  done
4229
4230  cd ..
4231  rm -rf conftest.dir
4232else
4233  am_cv_CC_dependencies_compiler_type=none
4234fi
4235
4236fi
4237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4238$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4239CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4240
4241 if
4242  test "x$enable_dependency_tracking" != xno \
4243  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4244  am__fastdepCC_TRUE=
4245  am__fastdepCC_FALSE='#'
4246else
4247  am__fastdepCC_TRUE='#'
4248  am__fastdepCC_FALSE=
4249fi
4250
4251
4252
4253
4254
4255
4256ac_ext=c
4257ac_cpp='$CPP $CPPFLAGS'
4258ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4259ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4260ac_compiler_gnu=$ac_cv_c_compiler_gnu
4261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4262$as_echo_n "checking how to run the C preprocessor... " >&6; }
4263# On Suns, sometimes $CPP names a directory.
4264if test -n "$CPP" && test -d "$CPP"; then
4265  CPP=
4266fi
4267if test -z "$CPP"; then
4268  if ${ac_cv_prog_CPP+:} false; then :
4269  $as_echo_n "(cached) " >&6
4270else
4271      # Double quotes because CPP needs to be expanded
4272    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4273    do
4274      ac_preproc_ok=false
4275for ac_c_preproc_warn_flag in '' yes
4276do
4277  # Use a header file that comes with gcc, so configuring glibc
4278  # with a fresh cross-compiler works.
4279  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4280  # <limits.h> exists even on freestanding compilers.
4281  # On the NeXT, cc -E runs the code through the compiler's parser,
4282  # not just through cpp. "Syntax error" is here to catch this case.
4283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4284/* end confdefs.h.  */
4285#ifdef __STDC__
4286# include <limits.h>
4287#else
4288# include <assert.h>
4289#endif
4290		     Syntax error
4291_ACEOF
4292if ac_fn_c_try_cpp "$LINENO"; then :
4293
4294else
4295  # Broken: fails on valid input.
4296continue
4297fi
4298rm -f conftest.err conftest.i conftest.$ac_ext
4299
4300  # OK, works on sane cases.  Now check whether nonexistent headers
4301  # can be detected and how.
4302  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4303/* end confdefs.h.  */
4304#include <ac_nonexistent.h>
4305_ACEOF
4306if ac_fn_c_try_cpp "$LINENO"; then :
4307  # Broken: success on invalid input.
4308continue
4309else
4310  # Passes both tests.
4311ac_preproc_ok=:
4312break
4313fi
4314rm -f conftest.err conftest.i conftest.$ac_ext
4315
4316done
4317# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4318rm -f conftest.i conftest.err conftest.$ac_ext
4319if $ac_preproc_ok; then :
4320  break
4321fi
4322
4323    done
4324    ac_cv_prog_CPP=$CPP
4325
4326fi
4327  CPP=$ac_cv_prog_CPP
4328else
4329  ac_cv_prog_CPP=$CPP
4330fi
4331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4332$as_echo "$CPP" >&6; }
4333ac_preproc_ok=false
4334for ac_c_preproc_warn_flag in '' yes
4335do
4336  # Use a header file that comes with gcc, so configuring glibc
4337  # with a fresh cross-compiler works.
4338  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4339  # <limits.h> exists even on freestanding compilers.
4340  # On the NeXT, cc -E runs the code through the compiler's parser,
4341  # not just through cpp. "Syntax error" is here to catch this case.
4342  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4343/* end confdefs.h.  */
4344#ifdef __STDC__
4345# include <limits.h>
4346#else
4347# include <assert.h>
4348#endif
4349		     Syntax error
4350_ACEOF
4351if ac_fn_c_try_cpp "$LINENO"; then :
4352
4353else
4354  # Broken: fails on valid input.
4355continue
4356fi
4357rm -f conftest.err conftest.i conftest.$ac_ext
4358
4359  # OK, works on sane cases.  Now check whether nonexistent headers
4360  # can be detected and how.
4361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4362/* end confdefs.h.  */
4363#include <ac_nonexistent.h>
4364_ACEOF
4365if ac_fn_c_try_cpp "$LINENO"; then :
4366  # Broken: success on invalid input.
4367continue
4368else
4369  # Passes both tests.
4370ac_preproc_ok=:
4371break
4372fi
4373rm -f conftest.err conftest.i conftest.$ac_ext
4374
4375done
4376# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4377rm -f conftest.i conftest.err conftest.$ac_ext
4378if $ac_preproc_ok; then :
4379
4380else
4381  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4382$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4383as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4384See \`config.log' for more details" "$LINENO" 5; }
4385fi
4386
4387ac_ext=c
4388ac_cpp='$CPP $CPPFLAGS'
4389ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4390ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4391ac_compiler_gnu=$ac_cv_c_compiler_gnu
4392
4393
4394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4395$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4396if ${ac_cv_path_GREP+:} false; then :
4397  $as_echo_n "(cached) " >&6
4398else
4399  if test -z "$GREP"; then
4400  ac_path_GREP_found=false
4401  # Loop through the user's path and test for each of PROGNAME-LIST
4402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4403for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4404do
4405  IFS=$as_save_IFS
4406  test -z "$as_dir" && as_dir=.
4407    for ac_prog in grep ggrep; do
4408    for ac_exec_ext in '' $ac_executable_extensions; do
4409      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4410      as_fn_executable_p "$ac_path_GREP" || continue
4411# Check for GNU ac_path_GREP and select it if it is found.
4412  # Check for GNU $ac_path_GREP
4413case `"$ac_path_GREP" --version 2>&1` in
4414*GNU*)
4415  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4416*)
4417  ac_count=0
4418  $as_echo_n 0123456789 >"conftest.in"
4419  while :
4420  do
4421    cat "conftest.in" "conftest.in" >"conftest.tmp"
4422    mv "conftest.tmp" "conftest.in"
4423    cp "conftest.in" "conftest.nl"
4424    $as_echo 'GREP' >> "conftest.nl"
4425    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4426    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4427    as_fn_arith $ac_count + 1 && ac_count=$as_val
4428    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4429      # Best one so far, save it but keep looking for a better one
4430      ac_cv_path_GREP="$ac_path_GREP"
4431      ac_path_GREP_max=$ac_count
4432    fi
4433    # 10*(2^10) chars as input seems more than enough
4434    test $ac_count -gt 10 && break
4435  done
4436  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4437esac
4438
4439      $ac_path_GREP_found && break 3
4440    done
4441  done
4442  done
4443IFS=$as_save_IFS
4444  if test -z "$ac_cv_path_GREP"; then
4445    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4446  fi
4447else
4448  ac_cv_path_GREP=$GREP
4449fi
4450
4451fi
4452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4453$as_echo "$ac_cv_path_GREP" >&6; }
4454 GREP="$ac_cv_path_GREP"
4455
4456
4457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4458$as_echo_n "checking for egrep... " >&6; }
4459if ${ac_cv_path_EGREP+:} false; then :
4460  $as_echo_n "(cached) " >&6
4461else
4462  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4463   then ac_cv_path_EGREP="$GREP -E"
4464   else
4465     if test -z "$EGREP"; then
4466  ac_path_EGREP_found=false
4467  # Loop through the user's path and test for each of PROGNAME-LIST
4468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4469for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4470do
4471  IFS=$as_save_IFS
4472  test -z "$as_dir" && as_dir=.
4473    for ac_prog in egrep; do
4474    for ac_exec_ext in '' $ac_executable_extensions; do
4475      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4476      as_fn_executable_p "$ac_path_EGREP" || continue
4477# Check for GNU ac_path_EGREP and select it if it is found.
4478  # Check for GNU $ac_path_EGREP
4479case `"$ac_path_EGREP" --version 2>&1` in
4480*GNU*)
4481  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4482*)
4483  ac_count=0
4484  $as_echo_n 0123456789 >"conftest.in"
4485  while :
4486  do
4487    cat "conftest.in" "conftest.in" >"conftest.tmp"
4488    mv "conftest.tmp" "conftest.in"
4489    cp "conftest.in" "conftest.nl"
4490    $as_echo 'EGREP' >> "conftest.nl"
4491    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4492    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4493    as_fn_arith $ac_count + 1 && ac_count=$as_val
4494    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4495      # Best one so far, save it but keep looking for a better one
4496      ac_cv_path_EGREP="$ac_path_EGREP"
4497      ac_path_EGREP_max=$ac_count
4498    fi
4499    # 10*(2^10) chars as input seems more than enough
4500    test $ac_count -gt 10 && break
4501  done
4502  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4503esac
4504
4505      $ac_path_EGREP_found && break 3
4506    done
4507  done
4508  done
4509IFS=$as_save_IFS
4510  if test -z "$ac_cv_path_EGREP"; then
4511    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4512  fi
4513else
4514  ac_cv_path_EGREP=$EGREP
4515fi
4516
4517   fi
4518fi
4519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4520$as_echo "$ac_cv_path_EGREP" >&6; }
4521 EGREP="$ac_cv_path_EGREP"
4522
4523
4524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4525$as_echo_n "checking for ANSI C header files... " >&6; }
4526if ${ac_cv_header_stdc+:} false; then :
4527  $as_echo_n "(cached) " >&6
4528else
4529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4530/* end confdefs.h.  */
4531#include <stdlib.h>
4532#include <stdarg.h>
4533#include <string.h>
4534#include <float.h>
4535
4536int
4537main ()
4538{
4539
4540  ;
4541  return 0;
4542}
4543_ACEOF
4544if ac_fn_c_try_compile "$LINENO"; then :
4545  ac_cv_header_stdc=yes
4546else
4547  ac_cv_header_stdc=no
4548fi
4549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4550
4551if test $ac_cv_header_stdc = yes; then
4552  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4554/* end confdefs.h.  */
4555#include <string.h>
4556
4557_ACEOF
4558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4559  $EGREP "memchr" >/dev/null 2>&1; then :
4560
4561else
4562  ac_cv_header_stdc=no
4563fi
4564rm -f conftest*
4565
4566fi
4567
4568if test $ac_cv_header_stdc = yes; then
4569  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4571/* end confdefs.h.  */
4572#include <stdlib.h>
4573
4574_ACEOF
4575if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4576  $EGREP "free" >/dev/null 2>&1; then :
4577
4578else
4579  ac_cv_header_stdc=no
4580fi
4581rm -f conftest*
4582
4583fi
4584
4585if test $ac_cv_header_stdc = yes; then
4586  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4587  if test "$cross_compiling" = yes; then :
4588  :
4589else
4590  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4591/* end confdefs.h.  */
4592#include <ctype.h>
4593#include <stdlib.h>
4594#if ((' ' & 0x0FF) == 0x020)
4595# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4596# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4597#else
4598# define ISLOWER(c) \
4599		   (('a' <= (c) && (c) <= 'i') \
4600		     || ('j' <= (c) && (c) <= 'r') \
4601		     || ('s' <= (c) && (c) <= 'z'))
4602# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4603#endif
4604
4605#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4606int
4607main ()
4608{
4609  int i;
4610  for (i = 0; i < 256; i++)
4611    if (XOR (islower (i), ISLOWER (i))
4612	|| toupper (i) != TOUPPER (i))
4613      return 2;
4614  return 0;
4615}
4616_ACEOF
4617if ac_fn_c_try_run "$LINENO"; then :
4618
4619else
4620  ac_cv_header_stdc=no
4621fi
4622rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4623  conftest.$ac_objext conftest.beam conftest.$ac_ext
4624fi
4625
4626fi
4627fi
4628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4629$as_echo "$ac_cv_header_stdc" >&6; }
4630if test $ac_cv_header_stdc = yes; then
4631
4632$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4633
4634fi
4635
4636# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4637for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4638		  inttypes.h stdint.h unistd.h
4639do :
4640  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4641ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4642"
4643if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4644  cat >>confdefs.h <<_ACEOF
4645#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4646_ACEOF
4647
4648fi
4649
4650done
4651
4652
4653for ac_header in stdio.h stdlib.h string.h unistd.h netdb.h signal.h \
4654  syslog.h time.h errno.h sys/types.h sys/stat.h netinet/in.h \
4655  math.h sys/socket.h dirent.h ctype.h \
4656  mtent.h fcntl.h sys/param.h arpa/inet.h \
4657  sys/vfs.h sys/pstat.h sys/sysinfo.h sys/statvfs.h sys/statfs.h \
4658  sys/socket.h sys/loadavg.h arpa/inet.h \
4659  sys/vmmeter.h strings.h vm/vm_param.h \
4660  sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \
4661  stdint.h mach/host_info.h mach/mach_host.h knlist.h pwd.h \
4662  sys/var.h arpa/nameser.h assert.h sys/dkstat.h sys/disk.h sys/sched.h \
4663  zone.h nlist.h kvm.h linux/kernel.h procinfo.h sys/dk.h \
4664  sys/resource.h pthread.h windows.h process.h conio.h sys/wait.h \
4665  stdarg.h winsock2.h pdh.h psapi.h sys/sem.h sys/ipc.h sys/shm.h Winldap.h \
4666  Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \
4667  execinfo.h sys/systemcfg.h sys/mnttab.h mntent.h sys/times.h \
4668  dlfcn.h sys/utsname.h sys/un.h sys/protosw.h stddef.h limits.h float.h
4669do :
4670  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4671ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4672if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4673  cat >>confdefs.h <<_ACEOF
4674#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4675_ACEOF
4676
4677fi
4678
4679done
4680
4681for ac_header in resolv.h
4682do :
4683  ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
4684#ifdef HAVE_SYS_TYPES_H
4685#  include <sys/types.h>
4686#endif
4687#ifdef HAVE_NETINET_IN_H
4688#  include <netinet/in.h>
4689#endif
4690#ifdef HAVE_ARPA_NAMESER_H
4691#  include <arpa/nameser.h>
4692#endif
4693#ifdef HAVE_NETDB_H
4694#  include <netdb.h>
4695#endif
4696
4697"
4698if test "x$ac_cv_header_resolv_h" = xyes; then :
4699  cat >>confdefs.h <<_ACEOF
4700#define HAVE_RESOLV_H 1
4701_ACEOF
4702
4703fi
4704
4705done
4706
4707for ac_header in net/if.h net/if_mib.h
4708do :
4709  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4710ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
4711#include <stdio.h>
4712#ifdef STDC_HEADERS
4713#  include <stdlib.h>
4714#  include <stddef.h>
4715#else
4716#  ifdef HAVE_STDLIB_H
4717#    include <stdlib.h>
4718#  endif
4719#endif
4720#ifdef HAVE_SYS_TYPES_H
4721#  include <sys/types.h>
4722#endif
4723#ifdef HAVE_SYS_SOCKET_H
4724#  include <sys/socket.h>
4725#endif
4726/* for net/if_mib.h */
4727#ifdef HAVE_NET_IF_H
4728#  include <net/if.h>
4729#endif
4730
4731"
4732if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4733  cat >>confdefs.h <<_ACEOF
4734#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4735_ACEOF
4736
4737fi
4738
4739done
4740
4741
4742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -Werror=cpp" >&5
4743$as_echo_n "checking whether compiler supports -Werror=cpp... " >&6; }
4744checked_werror_cpp_CFLAGS=""
4745saved_CFLAGS="$CFLAGS"
4746CFLAGS="$CFLAGS -Werror=cpp"
4747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4748/* end confdefs.h.  */
4749
4750int
4751main ()
4752{
4753
4754  void f() {};
4755
4756  ;
4757  return 0;
4758}
4759_ACEOF
4760if ac_fn_c_try_compile "$LINENO"; then :
4761  checked_werror_cpp_CFLAGS="-Werror=cpp"
4762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4763$as_echo "yes" >&6; }
4764else
4765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766$as_echo "no" >&6; }
4767
4768fi
4769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4770CFLAGS="$saved_CFLAGS"
4771
4772saved_CFLAGS="$CFLAGS"
4773CFLAGS="$checked_werror_cpp_CFLAGS $CFLAGS"
4774for ac_header in sys/mount.h sys/proc.h sys/sysctl.h sys/user.h
4775do :
4776  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4777ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
4778#ifdef HAVE_SYS_TYPES_H
4779#  include <sys/types.h>
4780#endif
4781#ifdef HAVE_SYS_PARAM_H
4782#  include <sys/param.h>
4783#endif
4784
4785"
4786if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4787  cat >>confdefs.h <<_ACEOF
4788#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4789_ACEOF
4790
4791fi
4792
4793done
4794
4795CFLAGS="$saved_CFLAGS"
4796
4797for ac_header in sys/swap.h
4798do :
4799  ac_fn_c_check_header_compile "$LINENO" "sys/swap.h" "ac_cv_header_sys_swap_h" "
4800#ifdef HAVE_SYS_PARAM_H
4801#  include <sys/param.h>
4802#endif
4803
4804"
4805if test "x$ac_cv_header_sys_swap_h" = xyes; then :
4806  cat >>confdefs.h <<_ACEOF
4807#define HAVE_SYS_SWAP_H 1
4808_ACEOF
4809
4810fi
4811
4812done
4813
4814for ac_header in sys/ucontext.h
4815do :
4816  ac_fn_c_check_header_compile "$LINENO" "sys/ucontext.h" "ac_cv_header_sys_ucontext_h" "
4817#ifdef HAVE_SIGNAL_H
4818#  include <signal.h>
4819#endif
4820
4821"
4822if test "x$ac_cv_header_sys_ucontext_h" = xyes; then :
4823  cat >>confdefs.h <<_ACEOF
4824#define HAVE_SYS_UCONTEXT_H 1
4825_ACEOF
4826
4827fi
4828
4829done
4830
4831for ac_header in devstat.h
4832do :
4833  ac_fn_c_check_header_compile "$LINENO" "devstat.h" "ac_cv_header_devstat_h" "
4834#ifdef HAVE_SYS_DKSTAT_H
4835#  include <sys/dkstat.h>
4836#endif
4837
4838"
4839if test "x$ac_cv_header_devstat_h" = xyes; then :
4840  cat >>confdefs.h <<_ACEOF
4841#define HAVE_DEVSTAT_H 1
4842_ACEOF
4843
4844fi
4845
4846done
4847
4848for ac_header in linux/netlink.h
4849do :
4850  ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
4851#ifdef HAVE_SYS_SOCKET_H
4852#  include <sys/socket.h>
4853#endif
4854
4855"
4856if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
4857  cat >>confdefs.h <<_ACEOF
4858#define HAVE_LINUX_NETLINK_H 1
4859_ACEOF
4860
4861	for ac_header in linux/inet_diag.h
4862do :
4863  ac_fn_c_check_header_mongrel "$LINENO" "linux/inet_diag.h" "ac_cv_header_linux_inet_diag_h" "$ac_includes_default"
4864if test "x$ac_cv_header_linux_inet_diag_h" = xyes; then :
4865  cat >>confdefs.h <<_ACEOF
4866#define HAVE_LINUX_INET_DIAG_H 1
4867_ACEOF
4868
4869
4870$as_echo "#define HAVE_INET_DIAG 1" >>confdefs.h
4871
4872
4873fi
4874
4875done
4876
4877
4878fi
4879
4880done
4881
4882for ac_header in libperfstat.h
4883do :
4884  ac_fn_c_check_header_compile "$LINENO" "libperfstat.h" "ac_cv_header_libperfstat_h" "
4885#ifdef HAVE_SYS_PROTOSW_H
4886#  include <sys/protosw.h>
4887#endif
4888
4889"
4890if test "x$ac_cv_header_libperfstat_h" = xyes; then :
4891  cat >>confdefs.h <<_ACEOF
4892#define HAVE_LIBPERFSTAT_H 1
4893_ACEOF
4894
4895fi
4896
4897done
4898
4899
4900
4901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
4902$as_echo_n "checking for library containing socket... " >&6; }
4903if ${ac_cv_search_socket+:} false; then :
4904  $as_echo_n "(cached) " >&6
4905else
4906  ac_func_search_save_LIBS=$LIBS
4907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4908/* end confdefs.h.  */
4909
4910/* Override any GCC internal prototype to avoid an error.
4911   Use char because int might match the return type of a GCC
4912   builtin and then its argument prototype would still apply.  */
4913#ifdef __cplusplus
4914extern "C"
4915#endif
4916char socket ();
4917int
4918main ()
4919{
4920return socket ();
4921  ;
4922  return 0;
4923}
4924_ACEOF
4925for ac_lib in '' socket; do
4926  if test -z "$ac_lib"; then
4927    ac_res="none required"
4928  else
4929    ac_res=-l$ac_lib
4930    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4931  fi
4932  if ac_fn_c_try_link "$LINENO"; then :
4933  ac_cv_search_socket=$ac_res
4934fi
4935rm -f core conftest.err conftest.$ac_objext \
4936    conftest$ac_exeext
4937  if ${ac_cv_search_socket+:} false; then :
4938  break
4939fi
4940done
4941if ${ac_cv_search_socket+:} false; then :
4942
4943else
4944  ac_cv_search_socket=no
4945fi
4946rm conftest.$ac_ext
4947LIBS=$ac_func_search_save_LIBS
4948fi
4949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
4950$as_echo "$ac_cv_search_socket" >&6; }
4951ac_res=$ac_cv_search_socket
4952if test "$ac_res" != no; then :
4953  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4954
4955fi
4956
4957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kstat_open" >&5
4958$as_echo_n "checking for library containing kstat_open... " >&6; }
4959if ${ac_cv_search_kstat_open+:} false; then :
4960  $as_echo_n "(cached) " >&6
4961else
4962  ac_func_search_save_LIBS=$LIBS
4963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4964/* end confdefs.h.  */
4965
4966/* Override any GCC internal prototype to avoid an error.
4967   Use char because int might match the return type of a GCC
4968   builtin and then its argument prototype would still apply.  */
4969#ifdef __cplusplus
4970extern "C"
4971#endif
4972char kstat_open ();
4973int
4974main ()
4975{
4976return kstat_open ();
4977  ;
4978  return 0;
4979}
4980_ACEOF
4981for ac_lib in '' kstat; do
4982  if test -z "$ac_lib"; then
4983    ac_res="none required"
4984  else
4985    ac_res=-l$ac_lib
4986    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4987  fi
4988  if ac_fn_c_try_link "$LINENO"; then :
4989  ac_cv_search_kstat_open=$ac_res
4990fi
4991rm -f core conftest.err conftest.$ac_objext \
4992    conftest$ac_exeext
4993  if ${ac_cv_search_kstat_open+:} false; then :
4994  break
4995fi
4996done
4997if ${ac_cv_search_kstat_open+:} false; then :
4998
4999else
5000  ac_cv_search_kstat_open=no
5001fi
5002rm conftest.$ac_ext
5003LIBS=$ac_func_search_save_LIBS
5004fi
5005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kstat_open" >&5
5006$as_echo "$ac_cv_search_kstat_open" >&6; }
5007ac_res=$ac_cv_search_kstat_open
5008if test "$ac_res" != no; then :
5009  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5010
5011fi
5012
5013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
5014$as_echo_n "checking for library containing gethostbyname... " >&6; }
5015if ${ac_cv_search_gethostbyname+:} false; then :
5016  $as_echo_n "(cached) " >&6
5017else
5018  ac_func_search_save_LIBS=$LIBS
5019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5020/* end confdefs.h.  */
5021
5022/* Override any GCC internal prototype to avoid an error.
5023   Use char because int might match the return type of a GCC
5024   builtin and then its argument prototype would still apply.  */
5025#ifdef __cplusplus
5026extern "C"
5027#endif
5028char gethostbyname ();
5029int
5030main ()
5031{
5032return gethostbyname ();
5033  ;
5034  return 0;
5035}
5036_ACEOF
5037for ac_lib in '' nsl; do
5038  if test -z "$ac_lib"; then
5039    ac_res="none required"
5040  else
5041    ac_res=-l$ac_lib
5042    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5043  fi
5044  if ac_fn_c_try_link "$LINENO"; then :
5045  ac_cv_search_gethostbyname=$ac_res
5046fi
5047rm -f core conftest.err conftest.$ac_objext \
5048    conftest$ac_exeext
5049  if ${ac_cv_search_gethostbyname+:} false; then :
5050  break
5051fi
5052done
5053if ${ac_cv_search_gethostbyname+:} false; then :
5054
5055else
5056  ac_cv_search_gethostbyname=no
5057fi
5058rm conftest.$ac_ext
5059LIBS=$ac_func_search_save_LIBS
5060fi
5061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
5062$as_echo "$ac_cv_search_gethostbyname" >&6; }
5063ac_res=$ac_cv_search_gethostbyname
5064if test "$ac_res" != no; then :
5065  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5066
5067fi
5068
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
5070$as_echo_n "checking for library containing clock_gettime... " >&6; }
5071if ${ac_cv_search_clock_gettime+:} false; then :
5072  $as_echo_n "(cached) " >&6
5073else
5074  ac_func_search_save_LIBS=$LIBS
5075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5076/* end confdefs.h.  */
5077
5078/* Override any GCC internal prototype to avoid an error.
5079   Use char because int might match the return type of a GCC
5080   builtin and then its argument prototype would still apply.  */
5081#ifdef __cplusplus
5082extern "C"
5083#endif
5084char clock_gettime ();
5085int
5086main ()
5087{
5088return clock_gettime ();
5089  ;
5090  return 0;
5091}
5092_ACEOF
5093for ac_lib in '' rt; do
5094  if test -z "$ac_lib"; then
5095    ac_res="none required"
5096  else
5097    ac_res=-l$ac_lib
5098    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5099  fi
5100  if ac_fn_c_try_link "$LINENO"; then :
5101  ac_cv_search_clock_gettime=$ac_res
5102fi
5103rm -f core conftest.err conftest.$ac_objext \
5104    conftest$ac_exeext
5105  if ${ac_cv_search_clock_gettime+:} false; then :
5106  break
5107fi
5108done
5109if ${ac_cv_search_clock_gettime+:} false; then :
5110
5111else
5112  ac_cv_search_clock_gettime=no
5113fi
5114rm conftest.$ac_ext
5115LIBS=$ac_func_search_save_LIBS
5116fi
5117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
5118$as_echo "$ac_cv_search_clock_gettime" >&6; }
5119ac_res=$ac_cv_search_clock_gettime
5120if test "$ac_res" != no; then :
5121  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5122
5123fi
5124
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
5126$as_echo_n "checking for library containing dlopen... " >&6; }
5127if ${ac_cv_search_dlopen+:} false; then :
5128  $as_echo_n "(cached) " >&6
5129else
5130  ac_func_search_save_LIBS=$LIBS
5131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5132/* end confdefs.h.  */
5133
5134/* Override any GCC internal prototype to avoid an error.
5135   Use char because int might match the return type of a GCC
5136   builtin and then its argument prototype would still apply.  */
5137#ifdef __cplusplus
5138extern "C"
5139#endif
5140char dlopen ();
5141int
5142main ()
5143{
5144return dlopen ();
5145  ;
5146  return 0;
5147}
5148_ACEOF
5149for ac_lib in '' dl; do
5150  if test -z "$ac_lib"; then
5151    ac_res="none required"
5152  else
5153    ac_res=-l$ac_lib
5154    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5155  fi
5156  if ac_fn_c_try_link "$LINENO"; then :
5157  ac_cv_search_dlopen=$ac_res
5158fi
5159rm -f core conftest.err conftest.$ac_objext \
5160    conftest$ac_exeext
5161  if ${ac_cv_search_dlopen+:} false; then :
5162  break
5163fi
5164done
5165if ${ac_cv_search_dlopen+:} false; then :
5166
5167else
5168  ac_cv_search_dlopen=no
5169fi
5170rm conftest.$ac_ext
5171LIBS=$ac_func_search_save_LIBS
5172fi
5173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
5174$as_echo "$ac_cv_search_dlopen" >&6; }
5175ac_res=$ac_cv_search_dlopen
5176if test "$ac_res" != no; then :
5177  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5178
5179fi
5180
5181
5182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing perfstat_memory_total" >&5
5183$as_echo_n "checking for library containing perfstat_memory_total... " >&6; }
5184if ${ac_cv_search_perfstat_memory_total+:} false; then :
5185  $as_echo_n "(cached) " >&6
5186else
5187  ac_func_search_save_LIBS=$LIBS
5188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5189/* end confdefs.h.  */
5190
5191/* Override any GCC internal prototype to avoid an error.
5192   Use char because int might match the return type of a GCC
5193   builtin and then its argument prototype would still apply.  */
5194#ifdef __cplusplus
5195extern "C"
5196#endif
5197char perfstat_memory_total ();
5198int
5199main ()
5200{
5201return perfstat_memory_total ();
5202  ;
5203  return 0;
5204}
5205_ACEOF
5206for ac_lib in '' perfstat; do
5207  if test -z "$ac_lib"; then
5208    ac_res="none required"
5209  else
5210    ac_res=-l$ac_lib
5211    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5212  fi
5213  if ac_fn_c_try_link "$LINENO"; then :
5214  ac_cv_search_perfstat_memory_total=$ac_res
5215fi
5216rm -f core conftest.err conftest.$ac_objext \
5217    conftest$ac_exeext
5218  if ${ac_cv_search_perfstat_memory_total+:} false; then :
5219  break
5220fi
5221done
5222if ${ac_cv_search_perfstat_memory_total+:} false; then :
5223
5224else
5225  ac_cv_search_perfstat_memory_total=no
5226fi
5227rm conftest.$ac_ext
5228LIBS=$ac_func_search_save_LIBS
5229fi
5230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_perfstat_memory_total" >&5
5231$as_echo "$ac_cv_search_perfstat_memory_total" >&6; }
5232ac_res=$ac_cv_search_perfstat_memory_total
5233if test "$ac_res" != no; then :
5234  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5235
5236$as_echo "#define HAVE_LIBPERFSTAT 1" >>confdefs.h
5237
5238fi
5239
5240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing devstat_getdevs" >&5
5241$as_echo_n "checking for library containing devstat_getdevs... " >&6; }
5242if ${ac_cv_search_devstat_getdevs+:} false; then :
5243  $as_echo_n "(cached) " >&6
5244else
5245  ac_func_search_save_LIBS=$LIBS
5246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5247/* end confdefs.h.  */
5248
5249/* Override any GCC internal prototype to avoid an error.
5250   Use char because int might match the return type of a GCC
5251   builtin and then its argument prototype would still apply.  */
5252#ifdef __cplusplus
5253extern "C"
5254#endif
5255char devstat_getdevs ();
5256int
5257main ()
5258{
5259return devstat_getdevs ();
5260  ;
5261  return 0;
5262}
5263_ACEOF
5264for ac_lib in '' devstat; do
5265  if test -z "$ac_lib"; then
5266    ac_res="none required"
5267  else
5268    ac_res=-l$ac_lib
5269    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5270  fi
5271  if ac_fn_c_try_link "$LINENO"; then :
5272  ac_cv_search_devstat_getdevs=$ac_res
5273fi
5274rm -f core conftest.err conftest.$ac_objext \
5275    conftest$ac_exeext
5276  if ${ac_cv_search_devstat_getdevs+:} false; then :
5277  break
5278fi
5279done
5280if ${ac_cv_search_devstat_getdevs+:} false; then :
5281
5282else
5283  ac_cv_search_devstat_getdevs=no
5284fi
5285rm conftest.$ac_ext
5286LIBS=$ac_func_search_save_LIBS
5287fi
5288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_devstat_getdevs" >&5
5289$as_echo "$ac_cv_search_devstat_getdevs" >&6; }
5290ac_res=$ac_cv_search_devstat_getdevs
5291if test "$ac_res" != no; then :
5292  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5293
5294$as_echo "#define HAVE_LIBDEVSTAT 1" >>confdefs.h
5295
5296fi
5297
5298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getdevs" >&5
5299$as_echo_n "checking for library containing getdevs... " >&6; }
5300if ${ac_cv_search_getdevs+:} false; then :
5301  $as_echo_n "(cached) " >&6
5302else
5303  ac_func_search_save_LIBS=$LIBS
5304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5305/* end confdefs.h.  */
5306
5307/* Override any GCC internal prototype to avoid an error.
5308   Use char because int might match the return type of a GCC
5309   builtin and then its argument prototype would still apply.  */
5310#ifdef __cplusplus
5311extern "C"
5312#endif
5313char getdevs ();
5314int
5315main ()
5316{
5317return getdevs ();
5318  ;
5319  return 0;
5320}
5321_ACEOF
5322for ac_lib in '' devstat; do
5323  if test -z "$ac_lib"; then
5324    ac_res="none required"
5325  else
5326    ac_res=-l$ac_lib
5327    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5328  fi
5329  if ac_fn_c_try_link "$LINENO"; then :
5330  ac_cv_search_getdevs=$ac_res
5331fi
5332rm -f core conftest.err conftest.$ac_objext \
5333    conftest$ac_exeext
5334  if ${ac_cv_search_getdevs+:} false; then :
5335  break
5336fi
5337done
5338if ${ac_cv_search_getdevs+:} false; then :
5339
5340else
5341  ac_cv_search_getdevs=no
5342fi
5343rm conftest.$ac_ext
5344LIBS=$ac_func_search_save_LIBS
5345fi
5346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getdevs" >&5
5347$as_echo "$ac_cv_search_getdevs" >&6; }
5348ac_res=$ac_cv_search_getdevs
5349if test "$ac_res" != no; then :
5350  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5351
5352$as_echo "#define HAVE_LIBDEVSTAT 1" >>confdefs.h
5353
5354fi
5355
5356
5357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
5358$as_echo_n "checking for library containing backtrace_symbols... " >&6; }
5359if ${ac_cv_search_backtrace_symbols+:} false; then :
5360  $as_echo_n "(cached) " >&6
5361else
5362  ac_func_search_save_LIBS=$LIBS
5363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5364/* end confdefs.h.  */
5365
5366/* Override any GCC internal prototype to avoid an error.
5367   Use char because int might match the return type of a GCC
5368   builtin and then its argument prototype would still apply.  */
5369#ifdef __cplusplus
5370extern "C"
5371#endif
5372char backtrace_symbols ();
5373int
5374main ()
5375{
5376return backtrace_symbols ();
5377  ;
5378  return 0;
5379}
5380_ACEOF
5381for ac_lib in '' execinfo; do
5382  if test -z "$ac_lib"; then
5383    ac_res="none required"
5384  else
5385    ac_res=-l$ac_lib
5386    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5387  fi
5388  if ac_fn_c_try_link "$LINENO"; then :
5389  ac_cv_search_backtrace_symbols=$ac_res
5390fi
5391rm -f core conftest.err conftest.$ac_objext \
5392    conftest$ac_exeext
5393  if ${ac_cv_search_backtrace_symbols+:} false; then :
5394  break
5395fi
5396done
5397if ${ac_cv_search_backtrace_symbols+:} false; then :
5398
5399else
5400  ac_cv_search_backtrace_symbols=no
5401fi
5402rm conftest.$ac_ext
5403LIBS=$ac_func_search_save_LIBS
5404fi
5405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
5406$as_echo "$ac_cv_search_backtrace_symbols" >&6; }
5407ac_res=$ac_cv_search_backtrace_symbols
5408if test "$ac_res" != no; then :
5409  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5410
5411$as_echo "#define HAVE_LIBEXECINFO 1" >>confdefs.h
5412
5413fi
5414
5415
5416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
5417$as_echo_n "checking for main in -lm... " >&6; }
5418if ${ac_cv_lib_m_main+:} false; then :
5419  $as_echo_n "(cached) " >&6
5420else
5421  ac_check_lib_save_LIBS=$LIBS
5422LIBS="-lm  $LIBS"
5423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5424/* end confdefs.h.  */
5425
5426
5427int
5428main ()
5429{
5430return main ();
5431  ;
5432  return 0;
5433}
5434_ACEOF
5435if ac_fn_c_try_link "$LINENO"; then :
5436  ac_cv_lib_m_main=yes
5437else
5438  ac_cv_lib_m_main=no
5439fi
5440rm -f core conftest.err conftest.$ac_objext \
5441    conftest$ac_exeext conftest.$ac_ext
5442LIBS=$ac_check_lib_save_LIBS
5443fi
5444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
5445$as_echo "$ac_cv_lib_m_main" >&6; }
5446if test "x$ac_cv_lib_m_main" = xyes; then :
5447  cat >>confdefs.h <<_ACEOF
5448#define HAVE_LIBM 1
5449_ACEOF
5450
5451  LIBS="-lm $LIBS"
5452
5453fi
5454
5455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lkvm" >&5
5456$as_echo_n "checking for main in -lkvm... " >&6; }
5457if ${ac_cv_lib_kvm_main+:} false; then :
5458  $as_echo_n "(cached) " >&6
5459else
5460  ac_check_lib_save_LIBS=$LIBS
5461LIBS="-lkvm  $LIBS"
5462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5463/* end confdefs.h.  */
5464
5465
5466int
5467main ()
5468{
5469return main ();
5470  ;
5471  return 0;
5472}
5473_ACEOF
5474if ac_fn_c_try_link "$LINENO"; then :
5475  ac_cv_lib_kvm_main=yes
5476else
5477  ac_cv_lib_kvm_main=no
5478fi
5479rm -f core conftest.err conftest.$ac_objext \
5480    conftest$ac_exeext conftest.$ac_ext
5481LIBS=$ac_check_lib_save_LIBS
5482fi
5483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_main" >&5
5484$as_echo "$ac_cv_lib_kvm_main" >&6; }
5485if test "x$ac_cv_lib_kvm_main" = xyes; then :
5486  cat >>confdefs.h <<_ACEOF
5487#define HAVE_LIBKVM 1
5488_ACEOF
5489
5490  LIBS="-lkvm $LIBS"
5491
5492fi
5493
5494
5495found_resolv="no"
5496
5497	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DNS lookup functions" >&5
5498$as_echo_n "checking for DNS lookup functions... " >&6; }
5499
5500
5501am_save_LIBS="$LIBS"
5502LIBS="$LIBS "
5503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5504/* end confdefs.h.  */
5505
5506#ifdef HAVE_SYS_TYPES_H
5507#	include <sys/types.h>
5508#endif
5509#ifdef HAVE_NETINET_IN_H
5510#	include <netinet/in.h>
5511#endif
5512#ifdef HAVE_ARPA_NAMESER_H
5513#	include <arpa/nameser.h>
5514#endif
5515#ifdef HAVE_RESOLV_H
5516#	include <resolv.h>
5517#endif
5518#ifndef C_IN
5519#	define C_IN	ns_c_in
5520#endif	/* C_IN */
5521#ifndef T_SOA
5522#	define T_SOA	ns_t_soa
5523#endif	/* T_SOA */
5524
5525int
5526main ()
5527{
5528
5529	char	*buf;
5530
5531	res_init();
5532	res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
5533
5534  ;
5535  return 0;
5536}
5537_ACEOF
5538if ac_fn_c_try_link "$LINENO"; then :
5539  found_resolv="yes"
5540RESOLV_LIBS=""
5541fi
5542rm -f core conftest.err conftest.$ac_objext \
5543    conftest$ac_exeext conftest.$ac_ext
5544LIBS="$am_save_LIBS"
5545
5546
5547	if test "x$found_resolv" != "xyes"; then
5548
5549am_save_LIBS="$LIBS"
5550LIBS="$LIBS -lresolv"
5551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5552/* end confdefs.h.  */
5553
5554#ifdef HAVE_SYS_TYPES_H
5555#	include <sys/types.h>
5556#endif
5557#ifdef HAVE_NETINET_IN_H
5558#	include <netinet/in.h>
5559#endif
5560#ifdef HAVE_ARPA_NAMESER_H
5561#	include <arpa/nameser.h>
5562#endif
5563#ifdef HAVE_RESOLV_H
5564#	include <resolv.h>
5565#endif
5566#ifndef C_IN
5567#	define C_IN	ns_c_in
5568#endif	/* C_IN */
5569#ifndef T_SOA
5570#	define T_SOA	ns_t_soa
5571#endif	/* T_SOA */
5572
5573int
5574main ()
5575{
5576
5577	char	*buf;
5578
5579	res_init();
5580	res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
5581
5582  ;
5583  return 0;
5584}
5585_ACEOF
5586if ac_fn_c_try_link "$LINENO"; then :
5587  found_resolv="yes"
5588RESOLV_LIBS="-lresolv"
5589fi
5590rm -f core conftest.err conftest.$ac_objext \
5591    conftest$ac_exeext conftest.$ac_ext
5592LIBS="$am_save_LIBS"
5593
5594	fi
5595	if test "x$found_resolv" != "xyes"; then
5596
5597am_save_LIBS="$LIBS"
5598LIBS="$LIBS -lbind"
5599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5600/* end confdefs.h.  */
5601
5602#ifdef HAVE_SYS_TYPES_H
5603#	include <sys/types.h>
5604#endif
5605#ifdef HAVE_NETINET_IN_H
5606#	include <netinet/in.h>
5607#endif
5608#ifdef HAVE_ARPA_NAMESER_H
5609#	include <arpa/nameser.h>
5610#endif
5611#ifdef HAVE_RESOLV_H
5612#	include <resolv.h>
5613#endif
5614#ifndef C_IN
5615#	define C_IN	ns_c_in
5616#endif	/* C_IN */
5617#ifndef T_SOA
5618#	define T_SOA	ns_t_soa
5619#endif	/* T_SOA */
5620
5621int
5622main ()
5623{
5624
5625	char	*buf;
5626
5627	res_init();
5628	res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
5629
5630  ;
5631  return 0;
5632}
5633_ACEOF
5634if ac_fn_c_try_link "$LINENO"; then :
5635  found_resolv="yes"
5636RESOLV_LIBS="-lbind"
5637fi
5638rm -f core conftest.err conftest.$ac_objext \
5639    conftest$ac_exeext conftest.$ac_ext
5640LIBS="$am_save_LIBS"
5641
5642	fi
5643	if test "x$found_resolv" != "xyes"; then
5644
5645am_save_LIBS="$LIBS"
5646LIBS="$LIBS -lsocket"
5647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5648/* end confdefs.h.  */
5649
5650#ifdef HAVE_SYS_TYPES_H
5651#	include <sys/types.h>
5652#endif
5653#ifdef HAVE_NETINET_IN_H
5654#	include <netinet/in.h>
5655#endif
5656#ifdef HAVE_ARPA_NAMESER_H
5657#	include <arpa/nameser.h>
5658#endif
5659#ifdef HAVE_RESOLV_H
5660#	include <resolv.h>
5661#endif
5662#ifndef C_IN
5663#	define C_IN	ns_c_in
5664#endif	/* C_IN */
5665#ifndef T_SOA
5666#	define T_SOA	ns_t_soa
5667#endif	/* T_SOA */
5668
5669int
5670main ()
5671{
5672
5673	char	*buf;
5674
5675	res_init();
5676	res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
5677
5678  ;
5679  return 0;
5680}
5681_ACEOF
5682if ac_fn_c_try_link "$LINENO"; then :
5683  found_resolv="yes"
5684RESOLV_LIBS="-lsocket"
5685fi
5686rm -f core conftest.err conftest.$ac_objext \
5687    conftest$ac_exeext conftest.$ac_ext
5688LIBS="$am_save_LIBS"
5689
5690	fi
5691
5692	if test "x$found_resolv" = "xyes"; then
5693
5694$as_echo "#define HAVE_RES_QUERY 1" >>confdefs.h
5695
5696	else
5697		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5698$as_echo "no" >&6; }
5699	fi
5700
5701	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found_resolv" >&5
5702$as_echo "$found_resolv" >&6; }
5703
5704
5705
5706if test "x$found_resolv" != "xyes"; then
5707	as_fn_error $? "Unable to do DNS lookups (libresolv check failed)" "$LINENO" 5
5708fi
5709LIBS="${LIBS} ${RESOLV_LIBS}"
5710
5711
5712largefile=yes
5713
5714case "${host_os}" in
5715	solaris*)
5716		largefile=no
5717		;;
5718esac
5719
5720if test "x$largefile" = "xyes"; then
5721	# Check whether --enable-largefile was given.
5722if test "${enable_largefile+set}" = set; then :
5723  enableval=$enable_largefile;
5724fi
5725
5726if test "$enable_largefile" != no; then
5727
5728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5729$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5730if ${ac_cv_sys_largefile_CC+:} false; then :
5731  $as_echo_n "(cached) " >&6
5732else
5733  ac_cv_sys_largefile_CC=no
5734     if test "$GCC" != yes; then
5735       ac_save_CC=$CC
5736       while :; do
5737	 # IRIX 6.2 and later do not support large files by default,
5738	 # so use the C compiler's -n32 option if that helps.
5739	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5740/* end confdefs.h.  */
5741#include <sys/types.h>
5742 /* Check that off_t can represent 2**63 - 1 correctly.
5743    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5744    since some C++ compilers masquerading as C compilers
5745    incorrectly reject 9223372036854775807.  */
5746#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5747  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5748		       && LARGE_OFF_T % 2147483647 == 1)
5749		      ? 1 : -1];
5750int
5751main ()
5752{
5753
5754  ;
5755  return 0;
5756}
5757_ACEOF
5758	 if ac_fn_c_try_compile "$LINENO"; then :
5759  break
5760fi
5761rm -f core conftest.err conftest.$ac_objext
5762	 CC="$CC -n32"
5763	 if ac_fn_c_try_compile "$LINENO"; then :
5764  ac_cv_sys_largefile_CC=' -n32'; break
5765fi
5766rm -f core conftest.err conftest.$ac_objext
5767	 break
5768       done
5769       CC=$ac_save_CC
5770       rm -f conftest.$ac_ext
5771    fi
5772fi
5773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5774$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5775  if test "$ac_cv_sys_largefile_CC" != no; then
5776    CC=$CC$ac_cv_sys_largefile_CC
5777  fi
5778
5779  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5780$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5781if ${ac_cv_sys_file_offset_bits+:} false; then :
5782  $as_echo_n "(cached) " >&6
5783else
5784  while :; do
5785  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5786/* end confdefs.h.  */
5787#include <sys/types.h>
5788 /* Check that off_t can represent 2**63 - 1 correctly.
5789    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5790    since some C++ compilers masquerading as C compilers
5791    incorrectly reject 9223372036854775807.  */
5792#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5793  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5794		       && LARGE_OFF_T % 2147483647 == 1)
5795		      ? 1 : -1];
5796int
5797main ()
5798{
5799
5800  ;
5801  return 0;
5802}
5803_ACEOF
5804if ac_fn_c_try_compile "$LINENO"; then :
5805  ac_cv_sys_file_offset_bits=no; break
5806fi
5807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5808  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5809/* end confdefs.h.  */
5810#define _FILE_OFFSET_BITS 64
5811#include <sys/types.h>
5812 /* Check that off_t can represent 2**63 - 1 correctly.
5813    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5814    since some C++ compilers masquerading as C compilers
5815    incorrectly reject 9223372036854775807.  */
5816#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5817  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5818		       && LARGE_OFF_T % 2147483647 == 1)
5819		      ? 1 : -1];
5820int
5821main ()
5822{
5823
5824  ;
5825  return 0;
5826}
5827_ACEOF
5828if ac_fn_c_try_compile "$LINENO"; then :
5829  ac_cv_sys_file_offset_bits=64; break
5830fi
5831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5832  ac_cv_sys_file_offset_bits=unknown
5833  break
5834done
5835fi
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5837$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5838case $ac_cv_sys_file_offset_bits in #(
5839  no | unknown) ;;
5840  *)
5841cat >>confdefs.h <<_ACEOF
5842#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5843_ACEOF
5844;;
5845esac
5846rm -rf conftest*
5847  if test $ac_cv_sys_file_offset_bits = unknown; then
5848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5849$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5850if ${ac_cv_sys_large_files+:} false; then :
5851  $as_echo_n "(cached) " >&6
5852else
5853  while :; do
5854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5855/* end confdefs.h.  */
5856#include <sys/types.h>
5857 /* Check that off_t can represent 2**63 - 1 correctly.
5858    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5859    since some C++ compilers masquerading as C compilers
5860    incorrectly reject 9223372036854775807.  */
5861#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5862  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5863		       && LARGE_OFF_T % 2147483647 == 1)
5864		      ? 1 : -1];
5865int
5866main ()
5867{
5868
5869  ;
5870  return 0;
5871}
5872_ACEOF
5873if ac_fn_c_try_compile "$LINENO"; then :
5874  ac_cv_sys_large_files=no; break
5875fi
5876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5878/* end confdefs.h.  */
5879#define _LARGE_FILES 1
5880#include <sys/types.h>
5881 /* Check that off_t can represent 2**63 - 1 correctly.
5882    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5883    since some C++ compilers masquerading as C compilers
5884    incorrectly reject 9223372036854775807.  */
5885#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
5886  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5887		       && LARGE_OFF_T % 2147483647 == 1)
5888		      ? 1 : -1];
5889int
5890main ()
5891{
5892
5893  ;
5894  return 0;
5895}
5896_ACEOF
5897if ac_fn_c_try_compile "$LINENO"; then :
5898  ac_cv_sys_large_files=1; break
5899fi
5900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5901  ac_cv_sys_large_files=unknown
5902  break
5903done
5904fi
5905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5906$as_echo "$ac_cv_sys_large_files" >&6; }
5907case $ac_cv_sys_large_files in #(
5908  no | unknown) ;;
5909  *)
5910cat >>confdefs.h <<_ACEOF
5911#define _LARGE_FILES $ac_cv_sys_large_files
5912_ACEOF
5913;;
5914esac
5915rm -rf conftest*
5916  fi
5917
5918
5919fi
5920
5921fi
5922
5923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
5924$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
5925if ${ac_cv_c_const+:} false; then :
5926  $as_echo_n "(cached) " >&6
5927else
5928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929/* end confdefs.h.  */
5930
5931int
5932main ()
5933{
5934
5935#ifndef __cplusplus
5936  /* Ultrix mips cc rejects this sort of thing.  */
5937  typedef int charset[2];
5938  const charset cs = { 0, 0 };
5939  /* SunOS 4.1.1 cc rejects this.  */
5940  char const *const *pcpcc;
5941  char **ppc;
5942  /* NEC SVR4.0.2 mips cc rejects this.  */
5943  struct point {int x, y;};
5944  static struct point const zero = {0,0};
5945  /* AIX XL C 1.02.0.0 rejects this.
5946     It does not let you subtract one const X* pointer from another in
5947     an arm of an if-expression whose if-part is not a constant
5948     expression */
5949  const char *g = "string";
5950  pcpcc = &g + (g ? g-g : 0);
5951  /* HPUX 7.0 cc rejects these. */
5952  ++pcpcc;
5953  ppc = (char**) pcpcc;
5954  pcpcc = (char const *const *) ppc;
5955  { /* SCO 3.2v4 cc rejects this sort of thing.  */
5956    char tx;
5957    char *t = &tx;
5958    char const *s = 0 ? (char *) 0 : (char const *) 0;
5959
5960    *t++ = 0;
5961    if (s) return 0;
5962  }
5963  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5964    int x[] = {25, 17};
5965    const int *foo = &x[0];
5966    ++foo;
5967  }
5968  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5969    typedef const int *iptr;
5970    iptr p = 0;
5971    ++p;
5972  }
5973  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
5974       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5975    struct s { int j; const int *ap[3]; } bx;
5976    struct s *b = &bx; b->j = 5;
5977  }
5978  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5979    const int foo = 10;
5980    if (!foo) return 0;
5981  }
5982  return !cs[0] && !zero.x;
5983#endif
5984
5985  ;
5986  return 0;
5987}
5988_ACEOF
5989if ac_fn_c_try_compile "$LINENO"; then :
5990  ac_cv_c_const=yes
5991else
5992  ac_cv_c_const=no
5993fi
5994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5995fi
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
5997$as_echo "$ac_cv_c_const" >&6; }
5998if test $ac_cv_c_const = no; then
5999
6000$as_echo "#define const /**/" >>confdefs.h
6001
6002fi
6003
6004ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6005if test "x$ac_cv_type_pid_t" = xyes; then :
6006
6007else
6008
6009cat >>confdefs.h <<_ACEOF
6010#define pid_t int
6011_ACEOF
6012
6013fi
6014
6015
6016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
6017$as_echo_n "checking for socklen_t... " >&6; }
6018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6019/* end confdefs.h.  */
6020
6021#include <sys/types.h>
6022#include <unistd.h>
6023#include <sys/socket.h>
6024
6025int
6026main ()
6027{
6028socklen_t s;
6029  ;
6030  return 0;
6031}
6032_ACEOF
6033if ac_fn_c_try_compile "$LINENO"; then :
6034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6035$as_echo "yes" >&6; }
6036else
6037
6038$as_echo "#define socklen_t int" >>confdefs.h
6039
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6041$as_echo "no" >&6; }
6042fi
6043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6044
6045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for actual socklen_t parameter type in socket functions" >&5
6046$as_echo_n "checking for actual socklen_t parameter type in socket functions... " >&6; }
6047zbx_socklen_t=
6048for arg2 in "struct sockaddr" void; do
6049  for arg3 in socklen_t size_t int; do
6050    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6051/* end confdefs.h.  */
6052
6053#ifdef HAVE_SYS_TYPES_H
6054#  include <sys/types.h>
6055#endif
6056#ifdef HAVE_SYS_SOCKET_H
6057#  include <sys/socket.h>
6058#endif
6059      extern int getpeername(int sockfd, $arg2 *addr, $arg3 *addrlen);
6060
6061int
6062main ()
6063{
6064
6065      $arg3 addrlen;
6066      getpeername(0, 0, &addrlen);
6067
6068  ;
6069  return 0;
6070}
6071_ACEOF
6072if ac_fn_c_try_compile "$LINENO"; then :
6073
6074      zbx_socklen_t="$arg3"
6075      break 2
6076
6077fi
6078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6079  done
6080done
6081if test "x$zbx_socklen_t" != "x"; then
6082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $zbx_socklen_t" >&5
6083$as_echo "$zbx_socklen_t" >&6; }
6084
6085cat >>confdefs.h <<_ACEOF
6086#define ZBX_SOCKLEN_T $zbx_socklen_t
6087_ACEOF
6088
6089else
6090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: leaving undefined" >&5
6091$as_echo "leaving undefined" >&6; }
6092fi
6093
6094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for integer field name in union sigval of struct siginfo_t" >&5
6095$as_echo_n "checking for integer field name in union sigval of struct siginfo_t... " >&6; }
6096zbx_sival_int=
6097for field in sival_int sigval_int; do
6098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6099/* end confdefs.h.  */
6100
6101#ifdef HAVE_SIGNAL_H
6102#  include <signal.h>
6103#endif
6104
6105int
6106main ()
6107{
6108
6109    siginfo_t siginfo;
6110    siginfo.si_value.$field = 0;
6111
6112  ;
6113  return 0;
6114}
6115_ACEOF
6116if ac_fn_c_try_compile "$LINENO"; then :
6117
6118    zbx_sival_int="$field"
6119    break
6120
6121fi
6122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6123done
6124if test "x$zbx_sival_int" != "x"; then
6125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $zbx_sival_int" >&5
6126$as_echo "$zbx_sival_int" >&6; }
6127
6128cat >>confdefs.h <<_ACEOF
6129#define ZBX_SIVAL_INT $zbx_sival_int
6130_ACEOF
6131
6132else
6133  as_fn_error $? "Unable to find integer field name in union sigval of struct siginfo_t" "$LINENO" 5
6134fi
6135
6136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_ninit" >&5
6137$as_echo_n "checking for res_ninit... " >&6; }
6138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6139/* end confdefs.h.  */
6140
6141#ifdef HAVE_SYS_TYPES_H
6142#	include <sys/types.h>
6143#endif
6144#ifdef HAVE_NETINET_IN_H
6145#	include <netinet/in.h>
6146#endif
6147#ifdef HAVE_ARPA_NAMESER_H
6148#	include <arpa/nameser.h>
6149#endif
6150#ifdef HAVE_RESOLV_H
6151#	include <resolv.h>
6152#endif
6153#ifndef C_IN
6154#	define C_IN	ns_c_in
6155#endif	/* C_IN */
6156#ifndef T_SOA
6157#	define T_SOA	ns_t_soa
6158#endif	/* T_SOA */
6159
6160int
6161main ()
6162{
6163
6164	struct __res_state	res_state_local;
6165
6166	res_ninit(&res_state_local);
6167
6168  ;
6169  return 0;
6170}
6171_ACEOF
6172if ac_fn_c_try_link "$LINENO"; then :
6173
6174$as_echo "#define HAVE_RES_NINIT 1" >>confdefs.h
6175
6176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6177$as_echo "yes" >&6; }
6178else
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6180$as_echo "no" >&6; }
6181fi
6182rm -f core conftest.err conftest.$ac_objext \
6183    conftest$ac_exeext conftest.$ac_ext
6184
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_ndestroy" >&5
6186$as_echo_n "checking for res_ndestroy... " >&6; }
6187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6188/* end confdefs.h.  */
6189
6190#ifdef HAVE_SYS_TYPES_H
6191#	include <sys/types.h>
6192#endif
6193#ifdef HAVE_NETINET_IN_H
6194#	include <netinet/in.h>
6195#endif
6196#ifdef HAVE_ARPA_NAMESER_H
6197#	include <arpa/nameser.h>
6198#endif
6199#ifdef HAVE_RESOLV_H
6200#	include <resolv.h>
6201#endif
6202#ifndef C_IN
6203#	define C_IN	ns_c_in
6204#endif	/* C_IN */
6205#ifndef T_SOA
6206#	define T_SOA	ns_t_soa
6207#endif	/* T_SOA */
6208
6209int
6210main ()
6211{
6212
6213	struct __res_state	res_state_local;
6214
6215	res_ninit(&res_state_local);
6216	res_ndestroy(&res_state_local);
6217
6218  ;
6219  return 0;
6220}
6221_ACEOF
6222if ac_fn_c_try_link "$LINENO"; then :
6223
6224$as_echo "#define HAVE_RES_NDESTROY 1" >>confdefs.h
6225
6226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6227$as_echo "yes" >&6; }
6228else
6229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6230$as_echo "no" >&6; }
6231fi
6232rm -f core conftest.err conftest.$ac_objext \
6233    conftest$ac_exeext conftest.$ac_ext
6234
6235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _res._u._ext.nsaddrs" >&5
6236$as_echo_n "checking for _res._u._ext.nsaddrs... " >&6; }
6237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6238/* end confdefs.h.  */
6239
6240#ifdef HAVE_SYS_TYPES_H
6241#	include <sys/types.h>
6242#endif
6243#ifdef HAVE_NETINET_IN_H
6244#	include <netinet/in.h>
6245#endif
6246#ifdef HAVE_ARPA_NAMESER_H
6247#	include <arpa/nameser.h>
6248#endif
6249#ifdef HAVE_RESOLV_H
6250#	include <resolv.h>
6251#endif
6252#ifndef C_IN
6253#	define C_IN	ns_c_in
6254#endif	/* C_IN */
6255#ifndef T_SOA
6256#	define T_SOA	ns_t_soa
6257#endif	/* T_SOA */
6258
6259int
6260main ()
6261{
6262
6263	struct sockaddr_in6	*sockaddrin6;
6264
6265	sockaddrin6 = _res._u._ext.nsaddrs[0];
6266
6267  ;
6268  return 0;
6269}
6270_ACEOF
6271if ac_fn_c_try_link "$LINENO"; then :
6272
6273$as_echo "#define HAVE_RES_U_EXT 1" >>confdefs.h
6274
6275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6276$as_echo "yes" >&6; }
6277else
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6279$as_echo "no" >&6; }
6280fi
6281rm -f core conftest.err conftest.$ac_objext \
6282    conftest$ac_exeext conftest.$ac_ext
6283
6284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _res._u._ext.ext" >&5
6285$as_echo_n "checking for _res._u._ext.ext... " >&6; }
6286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6287/* end confdefs.h.  */
6288
6289#ifdef HAVE_SYS_TYPES_H
6290#	include <sys/types.h>
6291#endif
6292#ifdef HAVE_NETINET_IN_H
6293#	include <netinet/in.h>
6294#endif
6295#ifdef HAVE_ARPA_NAMESER_H
6296#	include <arpa/nameser.h>
6297#endif
6298#ifdef HAVE_RESOLV_H
6299#	include <resolv.h>
6300#endif
6301#ifndef C_IN
6302#	define C_IN	ns_c_in
6303#endif	/* C_IN */
6304#ifndef T_SOA
6305#	define T_SOA	ns_t_soa
6306#endif	/* T_SOA */
6307
6308int
6309main ()
6310{
6311
6312	struct __res_state_ext	*ext;
6313
6314	ext = _res._u._ext.ext;
6315
6316  ;
6317  return 0;
6318}
6319_ACEOF
6320if ac_fn_c_try_link "$LINENO"; then :
6321
6322$as_echo "#define HAVE_RES_U_EXT_EXT 1" >>confdefs.h
6323
6324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6325$as_echo "yes" >&6; }
6326else
6327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6328$as_echo "no" >&6; }
6329fi
6330rm -f core conftest.err conftest.$ac_objext \
6331    conftest$ac_exeext conftest.$ac_ext
6332
6333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _res._ext.ext.nsaddrs" >&5
6334$as_echo_n "checking for _res._ext.ext.nsaddrs... " >&6; }
6335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6336/* end confdefs.h.  */
6337
6338#ifdef HAVE_SYS_TYPES_H
6339#	include <sys/types.h>
6340#endif
6341#ifdef HAVE_NETINET_IN_H
6342#	include <netinet/in.h>
6343#endif
6344#ifdef HAVE_ARPA_NAMESER_H
6345#	include <arpa/nameser.h>
6346#endif
6347#ifdef HAVE_RESOLV_H
6348#	include <resolv.h>
6349#endif
6350#ifndef C_IN
6351#	define C_IN	ns_c_in
6352#endif	/* C_IN */
6353#ifndef T_SOA
6354#	define T_SOA	ns_t_soa
6355#endif	/* T_SOA */
6356
6357int
6358main ()
6359{
6360
6361	union res_sockaddr_union	*na;
6362
6363	na = &_res._ext.ext.nsaddrs[0];
6364
6365  ;
6366  return 0;
6367}
6368_ACEOF
6369if ac_fn_c_try_link "$LINENO"; then :
6370
6371$as_echo "#define HAVE_RES_EXT_EXT 1" >>confdefs.h
6372
6373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6374$as_echo "yes" >&6; }
6375else
6376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6377$as_echo "no" >&6; }
6378fi
6379rm -f core conftest.err conftest.$ac_objext \
6380    conftest$ac_exeext conftest.$ac_ext
6381
6382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6.sin6_len" >&5
6383$as_echo_n "checking for struct sockaddr_in6.sin6_len... " >&6; }
6384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6385/* end confdefs.h.  */
6386
6387#ifdef HAVE_SYS_TYPES_H
6388#	include <sys/types.h>
6389#endif
6390#ifdef HAVE_NETINET_IN_H
6391#	include <netinet/in.h>
6392#endif
6393#ifdef HAVE_ARPA_NAMESER_H
6394#	include <arpa/nameser.h>
6395#endif
6396#ifdef HAVE_RESOLV_H
6397#	include <resolv.h>
6398#endif
6399#ifndef C_IN
6400#	define C_IN	ns_c_in
6401#endif	/* C_IN */
6402#ifndef T_SOA
6403#	define T_SOA	ns_t_soa
6404#endif	/* T_SOA */
6405
6406int
6407main ()
6408{
6409
6410	struct sockaddr_in6	sin6;
6411	unsigned int		len;
6412
6413	len = sin6.sin6_len;
6414
6415  ;
6416  return 0;
6417}
6418_ACEOF
6419if ac_fn_c_try_link "$LINENO"; then :
6420
6421$as_echo "#define HAVE_RES_SIN6_LEN 1" >>confdefs.h
6422
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6424$as_echo "yes" >&6; }
6425else
6426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6427$as_echo "no" >&6; }
6428fi
6429rm -f core conftest.err conftest.$ac_objext \
6430    conftest$ac_exeext conftest.$ac_ext
6431
6432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for union semun" >&5
6433$as_echo_n "checking for union semun... " >&6; }
6434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6435/* end confdefs.h.  */
6436
6437#include <sys/types.h>
6438#include <sys/ipc.h>
6439#include <sys/sem.h>
6440
6441int
6442main ()
6443{
6444union semun foo;
6445  ;
6446  return 0;
6447}
6448_ACEOF
6449if ac_fn_c_try_compile "$LINENO"; then :
6450
6451$as_echo "#define HAVE_SEMUN 1" >>confdefs.h
6452
6453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6454$as_echo "yes" >&6; }
6455else
6456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
6458fi
6459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6460
6461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct swaptable in sys/swap.h" >&5
6462$as_echo_n "checking for struct swaptable in sys/swap.h... " >&6; }
6463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6464/* end confdefs.h.  */
6465
6466#include <stdlib.h>
6467#include <sys/types.h>
6468#include <sys/syscall.h>
6469#include <sys/swap.h>
6470
6471#ifndef NULL
6472#define NULL (void *)0
6473#endif
6474
6475int
6476main ()
6477{
6478
6479    register int cnt, i;
6480    register int t, f;
6481    struct swaptable *swt;
6482    struct swapent *ste;
6483    static char path[256];
6484
6485    /* get total number of swap entries */
6486    cnt = swapctl(SC_GETNSWP, 0);
6487
6488    /* allocate enough space to hold count + n swapents */
6489    swt = (struct swaptable *)malloc(sizeof(int) +
6490             cnt * sizeof(struct swapent));
6491    if (swt == NULL)
6492    {
6493  return;
6494    }
6495    swt->swt_n = cnt;
6496
6497    /* fill in ste_path pointers: we do not care about the paths, so we
6498point
6499       them all to the same buffer */
6500    ste = &(swt->swt_ent[0]);
6501    i = cnt;
6502    while (--i >= 0)
6503    {
6504  ste++->ste_path = path;
6505    }
6506
6507    /* grab all swap info */
6508    swapctl(SC_LIST, swt);
6509
6510    /* walk through the structs and sum up the fields */
6511    t = f = 0;
6512    ste = &(swt->swt_ent[0]);
6513    i = cnt;
6514    while (--i >= 0)
6515    {
6516  /* do not count slots being deleted */
6517  if (!(ste->ste_flags & ST_INDEL) &&
6518      !(ste->ste_flags & ST_DOINGDEL))
6519  {
6520      t += ste->ste_pages;
6521      f += ste->ste_free;
6522  } ste++;
6523    }
6524
6525    /* fill in the results */
6526    free(swt);
6527
6528
6529  ;
6530  return 0;
6531}
6532_ACEOF
6533if ac_fn_c_try_compile "$LINENO"; then :
6534
6535$as_echo "#define HAVE_SYS_SWAP_SWAPTABLE 1" >>confdefs.h
6536
6537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6538$as_echo "yes" >&6; }
6539else
6540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6541$as_echo "no" >&6; }
6542fi
6543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6544
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sensordev in sys/sensors.h" >&5
6546$as_echo_n "checking for struct sensordev in sys/sensors.h... " >&6; }
6547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6548/* end confdefs.h.  */
6549
6550#include <stdlib.h>
6551#include <sys/queue.h>
6552#include <sys/sensors.h>
6553int
6554main ()
6555{
6556struct sensordev sensordev;
6557sensordev.xname[0]='\0';
6558sensordev.maxnumt[0]=0;
6559
6560  ;
6561  return 0;
6562}
6563_ACEOF
6564if ac_fn_c_try_compile "$LINENO"; then :
6565
6566$as_echo "#define HAVE_SENSORDEV 1" >>confdefs.h
6567
6568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6569$as_echo "yes" >&6; }
6570else
6571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6572$as_echo "no" >&6; }
6573fi
6574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6575
6576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct statvfs64 in sys/statvfs.h" >&5
6577$as_echo_n "checking for struct statvfs64 in sys/statvfs.h... " >&6; }
6578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6579/* end confdefs.h.  */
6580
6581#ifdef HAVE_SYS_TYPES_H
6582#	include <sys/types.h>
6583#endif
6584#ifdef HAVE_SYS_STATVFS_H
6585#	include <sys/statvfs.h>
6586#endif
6587
6588int
6589main ()
6590{
6591
6592	struct statvfs64	s;
6593	s.f_frsize = s.f_blocks = s.f_bfree = s.f_bavail = 0;
6594	statvfs64("/", &s);
6595
6596  ;
6597  return 0;
6598}
6599_ACEOF
6600if ac_fn_c_try_compile "$LINENO"; then :
6601
6602$as_echo "#define HAVE_SYS_STATVFS64 1" >>confdefs.h
6603
6604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6605$as_echo "yes" >&6; }
6606else
6607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6608$as_echo "no" >&6; }
6609fi
6610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6611
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct statfs64 in sys/statfs.h" >&5
6613$as_echo_n "checking for struct statfs64 in sys/statfs.h... " >&6; }
6614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6615/* end confdefs.h.  */
6616
6617#ifdef HAVE_SYS_TYPES_H
6618#	include <sys/types.h>
6619#endif
6620#ifdef HAVE_SYS_STATFS_H
6621#	include <sys/statfs.h>
6622#endif
6623
6624int
6625main ()
6626{
6627
6628	struct statfs64	s;
6629	s.f_bsize = s.f_blocks = s.f_bfree = s.f_bavail = 0;
6630	statfs64("/", &s);
6631
6632  ;
6633  return 0;
6634}
6635_ACEOF
6636if ac_fn_c_try_compile "$LINENO"; then :
6637
6638$as_echo "#define HAVE_SYS_STATFS64 1" >>confdefs.h
6639
6640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6641$as_echo "yes" >&6; }
6642else
6643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6644$as_echo "no" >&6; }
6645fi
6646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6647
6648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field ss_family in struct sockaddr_storage" >&5
6649$as_echo_n "checking for field ss_family in struct sockaddr_storage... " >&6; }
6650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6651/* end confdefs.h.  */
6652#include <sys/socket.h>
6653int
6654main ()
6655{
6656struct sockaddr_storage ss;
6657ss.ss_family = 0;
6658
6659  ;
6660  return 0;
6661}
6662_ACEOF
6663if ac_fn_c_try_compile "$LINENO"; then :
6664
6665$as_echo "#define HAVE_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
6666
6667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6668$as_echo "yes" >&6; }
6669else
6670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6671$as_echo "no" >&6; }
6672fi
6673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6674
6675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field mem_unit in struct sysinfo" >&5
6676$as_echo_n "checking for field mem_unit in struct sysinfo... " >&6; }
6677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6678/* end confdefs.h.  */
6679#include <sys/sysinfo.h>
6680int
6681main ()
6682{
6683struct sysinfo sysinfo;
6684sysinfo.mem_unit=0;
6685
6686  ;
6687  return 0;
6688}
6689_ACEOF
6690if ac_fn_c_try_compile "$LINENO"; then :
6691
6692$as_echo "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
6693
6694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6695$as_echo "yes" >&6; }
6696else
6697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6698$as_echo "no" >&6; }
6699fi
6700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6701
6702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field freeswap in struct sysinfo" >&5
6703$as_echo_n "checking for field freeswap in struct sysinfo... " >&6; }
6704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6705/* end confdefs.h.  */
6706#include <sys/sysinfo.h>
6707int
6708main ()
6709{
6710struct sysinfo sysinfo;
6711sysinfo.freeswap=0;
6712
6713  ;
6714  return 0;
6715}
6716_ACEOF
6717if ac_fn_c_try_compile "$LINENO"; then :
6718
6719$as_echo "#define HAVE_SYSINFO_FREESWAP 1" >>confdefs.h
6720
6721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6722$as_echo "yes" >&6; }
6723else
6724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6725$as_echo "no" >&6; }
6726fi
6727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6728
6729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field totalswap in struct sysinfo" >&5
6730$as_echo_n "checking for field totalswap in struct sysinfo... " >&6; }
6731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6732/* end confdefs.h.  */
6733#include <sys/sysinfo.h>
6734int
6735main ()
6736{
6737struct sysinfo sysinfo;
6738sysinfo.totalswap=0;
6739
6740  ;
6741  return 0;
6742}
6743_ACEOF
6744if ac_fn_c_try_compile "$LINENO"; then :
6745
6746$as_echo "#define HAVE_SYSINFO_TOTALSWAP 1" >>confdefs.h
6747
6748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6749$as_echo "yes" >&6; }
6750else
6751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6752$as_echo "no" >&6; }
6753fi
6754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6755
6756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field totalram in struct sysinfo" >&5
6757$as_echo_n "checking for field totalram in struct sysinfo... " >&6; }
6758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6759/* end confdefs.h.  */
6760#include <sys/sysinfo.h>
6761int
6762main ()
6763{
6764struct sysinfo sysinfo;
6765sysinfo.totalram=0;
6766
6767  ;
6768  return 0;
6769}
6770_ACEOF
6771if ac_fn_c_try_compile "$LINENO"; then :
6772
6773$as_echo "#define HAVE_SYSINFO_TOTALRAM 1" >>confdefs.h
6774
6775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6776$as_echo "yes" >&6; }
6777else
6778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779$as_echo "no" >&6; }
6780fi
6781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6782
6783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field sharedram in struct sysinfo" >&5
6784$as_echo_n "checking for field sharedram in struct sysinfo... " >&6; }
6785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6786/* end confdefs.h.  */
6787#include <sys/sysinfo.h>
6788int
6789main ()
6790{
6791struct sysinfo sysinfo;
6792sysinfo.sharedram=0;
6793
6794  ;
6795  return 0;
6796}
6797_ACEOF
6798if ac_fn_c_try_compile "$LINENO"; then :
6799
6800$as_echo "#define HAVE_SYSINFO_SHAREDRAM 1" >>confdefs.h
6801
6802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6803$as_echo "yes" >&6; }
6804else
6805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6806$as_echo "no" >&6; }
6807fi
6808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6809
6810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field bufferram in struct sysinfo" >&5
6811$as_echo_n "checking for field bufferram in struct sysinfo... " >&6; }
6812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6813/* end confdefs.h.  */
6814#include <sys/sysinfo.h>
6815int
6816main ()
6817{
6818struct sysinfo sysinfo;
6819sysinfo.bufferram=0;
6820
6821  ;
6822  return 0;
6823}
6824_ACEOF
6825if ac_fn_c_try_compile "$LINENO"; then :
6826
6827$as_echo "#define HAVE_SYSINFO_BUFFERRAM 1" >>confdefs.h
6828
6829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6830$as_echo "yes" >&6; }
6831else
6832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6833$as_echo "no" >&6; }
6834fi
6835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6836
6837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field freeram in struct sysinfo" >&5
6838$as_echo_n "checking for field freeram in struct sysinfo... " >&6; }
6839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6840/* end confdefs.h.  */
6841#include <sys/sysinfo.h>
6842int
6843main ()
6844{
6845struct sysinfo sysinfo;
6846sysinfo.freeram=0;
6847
6848  ;
6849  return 0;
6850}
6851_ACEOF
6852if ac_fn_c_try_compile "$LINENO"; then :
6853
6854$as_echo "#define HAVE_SYSINFO_FREERAM 1" >>confdefs.h
6855
6856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6857$as_echo "yes" >&6; }
6858else
6859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6860$as_echo "no" >&6; }
6861fi
6862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6863
6864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field uptime in struct sysinfo" >&5
6865$as_echo_n "checking for field uptime in struct sysinfo... " >&6; }
6866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6867/* end confdefs.h.  */
6868#include <sys/sysinfo.h>
6869int
6870main ()
6871{
6872struct sysinfo sysinfo;
6873sysinfo.uptime=0;
6874
6875  ;
6876  return 0;
6877}
6878_ACEOF
6879if ac_fn_c_try_compile "$LINENO"; then :
6880
6881$as_echo "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
6882
6883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6884$as_echo "yes" >&6; }
6885else
6886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6887$as_echo "no" >&6; }
6888fi
6889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6890
6891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field procs in struct sysinfo" >&5
6892$as_echo_n "checking for field procs in struct sysinfo... " >&6; }
6893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6894/* end confdefs.h.  */
6895#include <sys/sysinfo.h>
6896int
6897main ()
6898{
6899struct sysinfo sysinfo;
6900sysinfo.procs=0;
6901
6902  ;
6903  return 0;
6904}
6905_ACEOF
6906if ac_fn_c_try_compile "$LINENO"; then :
6907
6908$as_echo "#define HAVE_SYSINFO_PROCS 1" >>confdefs.h
6909
6910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6911$as_echo "yes" >&6; }
6912else
6913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6914$as_echo "no" >&6; }
6915fi
6916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6917
6918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field tm_gmtoff in struct tm" >&5
6919$as_echo_n "checking for field tm_gmtoff in struct tm... " >&6; }
6920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6921/* end confdefs.h.  */
6922
6923#ifdef HAVE_SYS_TIME_H
6924#include <sys/time.h>
6925#endif	/* HAVE_SYS_TIME_H */
6926
6927#ifdef HAVE_TIME_H
6928#include <time.h>
6929#endif	/* HAVE_TIME_H */
6930
6931int
6932main ()
6933{
6934
6935	struct tm tm;
6936	tm.tm_gmtoff;
6937
6938  ;
6939  return 0;
6940}
6941_ACEOF
6942if ac_fn_c_try_compile "$LINENO"; then :
6943
6944$as_echo "#define HAVE_TM_TM_GMTOFF 1" >>confdefs.h
6945
6946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6947$as_echo "yes" >&6; }
6948else
6949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6950$as_echo "no" >&6; }
6951fi
6952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6953
6954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker options --start-group/--end-group" >&5
6955$as_echo_n "checking for linker options --start-group/--end-group... " >&6; }
6956saved_LDFLAGS="$LDFLAGS"
6957LDFLAGS="-Wl,--start-group -Wl,--end-group"
6958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6959/* end confdefs.h.  */
6960
6961int
6962main ()
6963{
6964
6965  ;
6966  return 0;
6967}
6968_ACEOF
6969if ac_fn_c_try_link "$LINENO"; then :
6970  HAVE_START_GROUP="yes"
6971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6972$as_echo "yes" >&6; }
6973else
6974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6975$as_echo "no" >&6; }
6976
6977fi
6978rm -f core conftest.err conftest.$ac_objext \
6979    conftest$ac_exeext conftest.$ac_ext
6980LDFLAGS="$saved_LDFLAGS"
6981
6982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for '__thread' compiler support" >&5
6983$as_echo_n "checking for '__thread' compiler support... " >&6; }
6984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6985/* end confdefs.h.  */
6986#include <stdio.h>
6987int
6988main ()
6989{
6990static __thread int a = 0;
6991  ;
6992  return 0;
6993}
6994_ACEOF
6995if ac_fn_c_try_compile "$LINENO"; then :
6996
6997$as_echo "#define HAVE_THREAD_LOCAL 1" >>confdefs.h
6998
6999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7000$as_echo "yes" >&6; }
7001else
7002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7003$as_echo "no" >&6; }
7004HAVE_THREAD_LOCAL="no"
7005fi
7006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7007
7008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field updates in struct vminfo_t" >&5
7009$as_echo_n "checking for field updates in struct vminfo_t... " >&6; }
7010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7011/* end confdefs.h.  */
7012
7013#include <sys/sysinfo.h>
7014
7015int
7016main ()
7017{
7018
7019	vminfo_t vminfo;
7020	vminfo.updates;
7021
7022  ;
7023  return 0;
7024}
7025_ACEOF
7026if ac_fn_c_try_compile "$LINENO"; then :
7027
7028$as_echo "#define HAVE_VMINFO_T_UPDATES 1" >>confdefs.h
7029
7030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7031$as_echo "yes" >&6; }
7032else
7033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7034$as_echo "no" >&6; }
7035fi
7036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7037
7038
7039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysconf() in unistd.h" >&5
7040$as_echo_n "checking for function sysconf() in unistd.h... " >&6; }
7041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7042/* end confdefs.h.  */
7043
7044#include <unistd.h>
7045
7046int
7047main ()
7048{
7049	int i;
7050
7051	i=sysconf(_SC_PHYS_PAGES)*sysconf(_SC_PHYS_PAGES);
7052	i=sysconf(_SC_AVPHYS_PAGES)*sysconf(_SC_PHYS_PAGES);
7053
7054  ;
7055  return 0;
7056}
7057_ACEOF
7058if ac_fn_c_try_compile "$LINENO"; then :
7059
7060$as_echo "#define HAVE_UNISTD_SYSCONF 1" >>confdefs.h
7061
7062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7063$as_echo "yes" >&6; }
7064else
7065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7066$as_echo "no" >&6; }
7067fi
7068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7069
7070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function initgroups()" >&5
7071$as_echo_n "checking for function initgroups()... " >&6; }
7072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7073/* end confdefs.h.  */
7074
7075#include <sys/types.h>
7076#include <grp.h>
7077
7078int
7079main ()
7080{
7081
7082	char	*user = "zabbix";
7083	initgroups(user, 0);
7084
7085  ;
7086  return 0;
7087}
7088_ACEOF
7089if ac_fn_c_try_link "$LINENO"; then :
7090
7091$as_echo "#define HAVE_FUNCTION_INITGROUPS 1" >>confdefs.h
7092
7093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7094$as_echo "yes" >&6; }
7095else
7096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7097$as_echo "no" >&6; }
7098fi
7099rm -f core conftest.err conftest.$ac_objext \
7100    conftest$ac_exeext conftest.$ac_ext
7101
7102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for functions seteuid() and setegid()" >&5
7103$as_echo_n "checking for functions seteuid() and setegid()... " >&6; }
7104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7105/* end confdefs.h.  */
7106
7107#include <sys/types.h>
7108#include <unistd.h>
7109
7110int
7111main ()
7112{
7113
7114	seteuid(0);
7115	setegid(0);
7116
7117  ;
7118  return 0;
7119}
7120_ACEOF
7121if ac_fn_c_try_link "$LINENO"; then :
7122
7123$as_echo "#define HAVE_FUNCTION_SETEUID 1" >>confdefs.h
7124
7125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7126$as_echo "yes" >&6; }
7127else
7128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7129$as_echo "no" >&6; }
7130fi
7131rm -f core conftest.err conftest.$ac_objext \
7132    conftest$ac_exeext conftest.$ac_ext
7133
7134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function setproctitle()" >&5
7135$as_echo_n "checking for function setproctitle()... " >&6; }
7136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7137/* end confdefs.h.  */
7138
7139#include <sys/types.h>
7140#include <unistd.h>
7141
7142int
7143main ()
7144{
7145
7146	setproctitle("Test %d", 1);
7147
7148  ;
7149  return 0;
7150}
7151_ACEOF
7152if ac_fn_c_try_link "$LINENO"; then :
7153
7154$as_echo "#define HAVE_FUNCTION_SETPROCTITLE 1" >>confdefs.h
7155
7156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7157$as_echo "yes" >&6; }
7158else
7159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7160$as_echo "no" >&6; }
7161fi
7162rm -f core conftest.err conftest.$ac_objext \
7163    conftest$ac_exeext conftest.$ac_ext
7164
7165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctlbyname()" >&5
7166$as_echo_n "checking for function sysctlbyname()... " >&6; }
7167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7168/* end confdefs.h.  */
7169
7170#ifdef HAVE_SYS_TYPES_H
7171#include <sys/types.h>
7172#endif /* HAVE_SYS_TYPES_H */
7173
7174#ifdef HAVE_SYS_PARAM_H
7175#include <sys/param.h>
7176#endif /* HAVE_SYS_PARAM_H */
7177
7178#include <sys/sysctl.h>
7179
7180int
7181main ()
7182{
7183
7184	sysctlbyname("", 0, 0, 0, 0);
7185
7186  ;
7187  return 0;
7188}
7189_ACEOF
7190if ac_fn_c_try_link "$LINENO"; then :
7191
7192$as_echo "#define HAVE_FUNCTION_SYSCTLBYNAME 1" >>confdefs.h
7193
7194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7195$as_echo "yes" >&6; }
7196else
7197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7198$as_echo "no" >&6; }
7199fi
7200rm -f core conftest.err conftest.$ac_objext \
7201    conftest$ac_exeext conftest.$ac_ext
7202
7203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (KERN_BOOTTIME)" >&5
7204$as_echo_n "checking for function sysctl (KERN_BOOTTIME)... " >&6; }
7205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7206/* end confdefs.h.  */
7207
7208#ifdef HAVE_SYS_TYPES_H
7209#include <sys/types.h>
7210#endif /* HAVE_SYS_TYPES_H */
7211
7212#ifdef HAVE_SYS_PARAM_H
7213#include <sys/param.h>
7214#endif /* HAVE_SYS_PARAM_H */
7215
7216#include <sys/sysctl.h>
7217#include <unistd.h>
7218#include <time.h>
7219#include <sys/time.h>
7220
7221int
7222main ()
7223{
7224
7225	size_t		len;
7226	struct timeval	uptime;
7227        int		mib[2];
7228
7229        mib[0] = CTL_KERN;
7230        mib[1] = KERN_BOOTTIME;
7231
7232        len = sizeof(uptime);
7233        sysctl(mib, 2, &uptime, &len, 0, 0);
7234
7235  ;
7236  return 0;
7237}
7238_ACEOF
7239if ac_fn_c_try_compile "$LINENO"; then :
7240
7241$as_echo "#define HAVE_FUNCTION_SYSCTL_KERN_BOOTTIME 1" >>confdefs.h
7242
7243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7244$as_echo "yes" >&6; }
7245else
7246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7247$as_echo "no" >&6; }
7248fi
7249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7250
7251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (HW_NCPU)" >&5
7252$as_echo_n "checking for function sysctl (HW_NCPU)... " >&6; }
7253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7254/* end confdefs.h.  */
7255
7256#ifdef HAVE_SYS_TYPES_H
7257#include <sys/types.h>
7258#endif /* HAVE_SYS_TYPES_H */
7259
7260#ifdef HAVE_SYS_PARAM_H
7261#include <sys/param.h>
7262#endif /* HAVE_SYS_PARAM_H */
7263
7264#include <sys/sysctl.h>
7265
7266int
7267main ()
7268{
7269
7270	size_t	len;
7271	int	mib[2], ncpu;
7272
7273	mib[0] = CTL_HW;
7274	mib[1] = HW_NCPU;
7275
7276	len = sizeof(ncpu);
7277	sysctl(mib, 2, &ncpu, &len, 0, 0);
7278
7279  ;
7280  return 0;
7281}
7282_ACEOF
7283if ac_fn_c_try_compile "$LINENO"; then :
7284
7285$as_echo "#define HAVE_FUNCTION_SYSCTL_HW_NCPU 1" >>confdefs.h
7286
7287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7288$as_echo "yes" >&6; }
7289else
7290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7291$as_echo "no" >&6; }
7292fi
7293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7294
7295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (KERN_MAXFILES)" >&5
7296$as_echo_n "checking for function sysctl (KERN_MAXFILES)... " >&6; }
7297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7298/* end confdefs.h.  */
7299
7300#ifdef HAVE_SYS_TYPES_H
7301#include <sys/types.h>
7302#endif /* HAVE_SYS_TYPES_H */
7303
7304#ifdef HAVE_SYS_PARAM_H
7305#include <sys/param.h>
7306#endif /* HAVE_SYS_PARAM_H */
7307
7308#include <sys/sysctl.h>
7309
7310int
7311main ()
7312{
7313
7314	size_t	len;
7315        int	mib[2], maxfiles;
7316
7317        mib[0] = CTL_KERN;
7318        mib[1] = KERN_MAXFILES;
7319
7320        len = sizeof(maxfiles);
7321        sysctl(mib, 2, &maxfiles, &len, 0, 0);
7322
7323  ;
7324  return 0;
7325}
7326_ACEOF
7327if ac_fn_c_try_compile "$LINENO"; then :
7328
7329$as_echo "#define HAVE_FUNCTION_SYSCTL_KERN_MAXFILES 1" >>confdefs.h
7330
7331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7332$as_echo "yes" >&6; }
7333else
7334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7335$as_echo "no" >&6; }
7336fi
7337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7338
7339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (KERN_MAXPROC)" >&5
7340$as_echo_n "checking for function sysctl (KERN_MAXPROC)... " >&6; }
7341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7342/* end confdefs.h.  */
7343
7344#ifdef HAVE_SYS_TYPES_H
7345#include <sys/types.h>
7346#endif /* HAVE_SYS_TYPES_H */
7347
7348#ifdef HAVE_SYS_PARAM_H
7349#include <sys/param.h>
7350#endif /* HAVE_SYS_PARAM_H */
7351
7352#include <sys/sysctl.h>
7353
7354int
7355main ()
7356{
7357
7358	size_t	len;
7359	int	mib[2], maxproc;
7360
7361        mib[0] = CTL_KERN;
7362        mib[1] = KERN_MAXPROC;
7363
7364        len = sizeof(maxproc);
7365        sysctl(mib, 2, &maxproc, &len, 0, 0);
7366
7367  ;
7368  return 0;
7369}
7370_ACEOF
7371if ac_fn_c_try_compile "$LINENO"; then :
7372
7373$as_echo "#define HAVE_FUNCTION_SYSCTL_KERN_MAXPROC 1" >>confdefs.h
7374
7375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7376$as_echo "yes" >&6; }
7377else
7378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379$as_echo "no" >&6; }
7380fi
7381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7382
7383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sysctl (KERN_CPTIME,KERN_CPTIME2)" >&5
7384$as_echo_n "checking for function sysctl (KERN_CPTIME,KERN_CPTIME2)... " >&6; }
7385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7386/* end confdefs.h.  */
7387
7388#include <sys/param.h>
7389#include <sys/sysctl.h>
7390#if defined(HAVE_SYS_DKSTAT_H)
7391#	include <sys/dkstat.h>
7392#elif defined(HAVE_SYS_SCHED_H)
7393#	include <sys/sched.h>
7394#endif
7395
7396int
7397main ()
7398{
7399
7400size_t	sz;
7401int	i[] = {CP_USER, CP_NICE, CP_SYS, CP_INTR, CP_IDLE};
7402
7403{
7404	long	states[CPUSTATES];
7405	int	mib[2] = {CTL_KERN, KERN_CPTIME};
7406
7407	sz = sizeof(states);
7408	sysctl(mib, 2, &states, &sz, NULL, 0);
7409}
7410
7411{
7412	u_int64_t	states[CPUSTATES];
7413	int		mib[3] = {CTL_KERN, KERN_CPTIME2, 0};
7414
7415	sz = sizeof(states);
7416	sysctl(mib, 3, &states, &sz, NULL, 0);
7417}
7418
7419  ;
7420  return 0;
7421}
7422_ACEOF
7423if ac_fn_c_try_compile "$LINENO"; then :
7424
7425$as_echo "#define HAVE_FUNCTION_SYSCTL_KERN_CPTIME 1" >>confdefs.h
7426
7427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7428$as_echo "yes" >&6; }
7429else
7430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7431$as_echo "no" >&6; }
7432fi
7433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7434
7435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function clock_gettime in time.h" >&5
7436$as_echo_n "checking for function clock_gettime in time.h... " >&6; }
7437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7438/* end confdefs.h.  */
7439
7440#ifdef HAVE_TIME_H
7441#	include <time.h>
7442#elif HAVE_SYS_TIME_H
7443#	include <sys/time.h>
7444#endif	/* HAVE_SYS_TIME_H */
7445
7446int
7447main ()
7448{
7449struct timespec tp;
7450clock_gettime(CLOCK_REALTIME, &tp);
7451
7452  ;
7453  return 0;
7454}
7455_ACEOF
7456if ac_fn_c_try_link "$LINENO"; then :
7457
7458$as_echo "#define HAVE_TIME_CLOCK_GETTIME 1" >>confdefs.h
7459
7460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7461$as_echo "yes" >&6; }
7462else
7463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7464$as_echo "no" >&6; }
7465fi
7466rm -f core conftest.err conftest.$ac_objext \
7467    conftest$ac_exeext conftest.$ac_ext
7468
7469
7470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for macro __va_copy() in stdarg.h" >&5
7471$as_echo_n "checking for macro __va_copy() in stdarg.h... " >&6; }
7472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7473/* end confdefs.h.  */
7474
7475#include <stdarg.h>
7476
7477int
7478main ()
7479{
7480
7481	va_list	src,dst;
7482
7483	__va_copy(dst,src);
7484
7485  ;
7486  return 0;
7487}
7488_ACEOF
7489if ac_fn_c_try_compile "$LINENO"; then :
7490
7491$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
7492
7493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7494$as_echo "yes" >&6; }
7495else
7496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7497$as_echo "no" >&6; }
7498fi
7499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7500
7501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for macro __VA_ARGS__" >&5
7502$as_echo_n "checking for macro __VA_ARGS__... " >&6; }
7503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7504/* end confdefs.h.  */
7505
7506#define ZBX_CONST_STRING(str)   str
7507int test(const char *fmt, ...) { return 0; }
7508
7509int
7510main ()
7511{
7512
7513#define TEST(fmt, ...) test(ZBX_CONST_STRING(fmt), ##__VA_ARGS__)
7514TEST("%s","test");
7515TEST("test");
7516
7517  ;
7518  return 0;
7519}
7520_ACEOF
7521if ac_fn_c_try_compile "$LINENO"; then :
7522
7523$as_echo "#define HAVE___VA_ARGS__ 1" >>confdefs.h
7524
7525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7526$as_echo "yes" >&6; }
7527else
7528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7529$as_echo "no" >&6; }
7530fi
7531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7532
7533
7534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
7535$as_echo_n "checking return type of signal handlers... " >&6; }
7536if ${ac_cv_type_signal+:} false; then :
7537  $as_echo_n "(cached) " >&6
7538else
7539  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7540/* end confdefs.h.  */
7541#include <sys/types.h>
7542#include <signal.h>
7543
7544int
7545main ()
7546{
7547return *(signal (0, 0)) (0) == 1;
7548  ;
7549  return 0;
7550}
7551_ACEOF
7552if ac_fn_c_try_compile "$LINENO"; then :
7553  ac_cv_type_signal=int
7554else
7555  ac_cv_type_signal=void
7556fi
7557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7558fi
7559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
7560$as_echo "$ac_cv_type_signal" >&6; }
7561
7562cat >>confdefs.h <<_ACEOF
7563#define RETSIGTYPE $ac_cv_type_signal
7564_ACEOF
7565
7566
7567ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
7568if test "x$ac_cv_func_getloadavg" = xyes; then :
7569  $as_echo "#define HAVE_GETLOADAVG 1" >>confdefs.h
7570
7571else
7572  case " $LIBOBJS " in
7573  *" getloadavg.$ac_objext "* ) ;;
7574  *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
7575 ;;
7576esac
7577
7578fi
7579
7580
7581for ac_func in hstrerror
7582do :
7583  ac_fn_c_check_func "$LINENO" "hstrerror" "ac_cv_func_hstrerror"
7584if test "x$ac_cv_func_hstrerror" = xyes; then :
7585  cat >>confdefs.h <<_ACEOF
7586#define HAVE_HSTRERROR 1
7587_ACEOF
7588
7589fi
7590done
7591
7592for ac_func in getenv
7593do :
7594  ac_fn_c_check_func "$LINENO" "getenv" "ac_cv_func_getenv"
7595if test "x$ac_cv_func_getenv" = xyes; then :
7596  cat >>confdefs.h <<_ACEOF
7597#define HAVE_GETENV 1
7598_ACEOF
7599
7600fi
7601done
7602
7603for ac_func in putenv
7604do :
7605  ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
7606if test "x$ac_cv_func_putenv" = xyes; then :
7607  cat >>confdefs.h <<_ACEOF
7608#define HAVE_PUTENV 1
7609_ACEOF
7610
7611fi
7612done
7613
7614for ac_func in sigqueue
7615do :
7616  ac_fn_c_check_func "$LINENO" "sigqueue" "ac_cv_func_sigqueue"
7617if test "x$ac_cv_func_sigqueue" = xyes; then :
7618  cat >>confdefs.h <<_ACEOF
7619#define HAVE_SIGQUEUE 1
7620_ACEOF
7621
7622fi
7623done
7624
7625for ac_func in round
7626do :
7627  ac_fn_c_check_func "$LINENO" "round" "ac_cv_func_round"
7628if test "x$ac_cv_func_round" = xyes; then :
7629  cat >>confdefs.h <<_ACEOF
7630#define HAVE_ROUND 1
7631_ACEOF
7632
7633fi
7634done
7635
7636
7637
7638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc filesystem" >&5
7639$as_echo_n "checking for /proc filesystem... " >&6; }
7640if test -d /proc; then
7641	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7642$as_echo "yes" >&6; }
7643
7644$as_echo "#define HAVE_PROC 1" >>confdefs.h
7645
7646else
7647	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7648$as_echo "no" >&6; }
7649fi
7650
7651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/stat" >&5
7652$as_echo_n "checking for file /proc/stat... " >&6; }
7653if test -r /proc/stat; then
7654	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7655$as_echo "yes" >&6; }
7656
7657$as_echo "#define HAVE_PROC_STAT 1" >>confdefs.h
7658
7659else
7660	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7661$as_echo "no" >&6; }
7662fi
7663
7664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/cpuinfo" >&5
7665$as_echo_n "checking for file /proc/cpuinfo... " >&6; }
7666if test -r /proc/cpuinfo; then
7667	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7668$as_echo "yes" >&6; }
7669
7670$as_echo "#define HAVE_PROC_CPUINFO 1" >>confdefs.h
7671
7672else
7673	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7674$as_echo "no" >&6; }
7675fi
7676
7677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/0/psinfo" >&5
7678$as_echo_n "checking for file /proc/0/psinfo... " >&6; }
7679if test -r /proc/0/psinfo; then
7680	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7681$as_echo "yes" >&6; }
7682
7683$as_echo "#define HAVE_PROC_0_PSINFO 1" >>confdefs.h
7684
7685else
7686	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7687$as_echo "no" >&6; }
7688fi
7689
7690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/loadavg" >&5
7691$as_echo_n "checking for file /proc/loadavg... " >&6; }
7692if test -r /proc/loadavg; then
7693	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7694$as_echo "yes" >&6; }
7695
7696$as_echo "#define HAVE_PROC_LOADAVG 1" >>confdefs.h
7697
7698else
7699	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7700$as_echo "no" >&6; }
7701fi
7702
7703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for file /proc/net/dev" >&5
7704$as_echo_n "checking for file /proc/net/dev... " >&6; }
7705if test -r /proc/net/dev; then
7706	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7707$as_echo "yes" >&6; }
7708
7709$as_echo "#define HAVE_PROC_NET_DEV 1" >>confdefs.h
7710
7711else
7712	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7713$as_echo "no" >&6; }
7714fi
7715
7716
7717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long format" >&5
7718$as_echo_n "checking for long long format... " >&6; }
7719if test "$cross_compiling" = yes; then :
7720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7721$as_echo "no" >&6; }
7722else
7723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7724/* end confdefs.h.  */
7725
7726#include <sys/types.h>
7727int main()
7728{
7729        uint64_t i;
7730
7731        sscanf("200000000010020", "%qu", &i);
7732
7733        if (i == 200000000010020) return 0;
7734        else return -1;
7735}
7736
7737_ACEOF
7738if ac_fn_c_try_run "$LINENO"; then :
7739
7740$as_echo "#define HAVE_LONG_LONG_QU 1 " >>confdefs.h
7741
7742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7743$as_echo "yes" >&6; }
7744else
7745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7746$as_echo "no" >&6; }
7747fi
7748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7749  conftest.$ac_objext conftest.beam conftest.$ac_ext
7750fi
7751
7752
7753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic linking option" >&5
7754$as_echo_n "checking for -rdynamic linking option... " >&6; }
7755saved_LDFLAGS="$LDFLAGS"
7756LDFLAGS="-rdynamic $LDFLAGS"
7757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7758/* end confdefs.h.  */
7759#include <execinfo.h>
7760int
7761main ()
7762{
7763void *bcktrc[6];
7764(void)backtrace(bcktrc, 6);
7765
7766  ;
7767  return 0;
7768}
7769_ACEOF
7770if ac_fn_c_try_link "$LINENO"; then :
7771  LDFLAGS="-rdynamic $saved_LDFLAGS"
7772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7773$as_echo "yes" >&6; }
7774else
7775  LDFLAGS="$saved_LDFLAGS"
7776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7777$as_echo "no" >&6; }
7778fi
7779rm -f core conftest.err conftest.$ac_objext \
7780    conftest$ac_exeext conftest.$ac_ext
7781
7782
7783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperfstat 5.2.0.40 fileset" >&5
7784$as_echo_n "checking for libperfstat 5.2.0.40 fileset... " >&6; }
7785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7786/* end confdefs.h.  */
7787#include <sys/protosw.h>
7788#include <libperfstat.h>
7789int
7790main ()
7791{
7792perfstat_memory_total_t	memstats;
7793memstats.virt_active = 0;
7794
7795  ;
7796  return 0;
7797}
7798_ACEOF
7799if ac_fn_c_try_compile "$LINENO"; then :
7800
7801$as_echo "#define HAVE_AIXOSLEVEL_520004 1" >>confdefs.h
7802
7803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7804$as_echo "yes" >&6; }
7805else
7806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7807$as_echo "no" >&6; }
7808fi
7809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7810
7811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperfstat 5.3.0.60 fileset" >&5
7812$as_echo_n "checking for libperfstat 5.3.0.60 fileset... " >&6; }
7813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7814/* end confdefs.h.  */
7815#include <sys/protosw.h>
7816#include <libperfstat.h>
7817int
7818main ()
7819{
7820perfstat_partition_total_t	lparstats;
7821lparstats.type.b.donate_enabled = 0;
7822lparstats.idle_donated_purr = 0;
7823lparstats.busy_donated_purr = 0;
7824lparstats.idle_stolen_purr = 0;
7825lparstats.busy_stolen_purr = 0;
7826
7827  ;
7828  return 0;
7829}
7830_ACEOF
7831if ac_fn_c_try_compile "$LINENO"; then :
7832
7833$as_echo "#define HAVE_AIXOSLEVEL_530006 1" >>confdefs.h
7834
7835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7836$as_echo "yes" >&6; }
7837else
7838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7839$as_echo "no" >&6; }
7840fi
7841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7842
7843case "$host_os" in
7844linux*)
7845	ARCH="linux"
7846	;;
7847aix*)
7848	ARCH="aix"
7849	;;
7850darwin*|rhapsody*)
7851	ARCH="osx"
7852
7853$as_echo "#define MAC_OS_X 1" >>confdefs.h
7854
7855	;;
7856*solaris*)
7857	ARCH="solaris"
7858	;;
7859hpux*)
7860	ARCH="hpux"
7861	;;
7862freebsd*)
7863	ARCH="freebsd"
7864	;;
7865netbsd*)
7866	ARCH="netbsd"
7867	;;
7868osf*)
7869	ARCH="osf"
7870	;;
7871openbsd*)
7872	ARCH="openbsd"
7873	;;
7874*)
7875	ARCH="unknown"
7876	;;
7877esac
7878
7879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for architecture" >&5
7880$as_echo_n "checking for architecture... " >&6; }
7881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARCH ($host_os)" >&5
7882$as_echo "$ARCH ($host_os)" >&6; }
7883
7884if test "x$ARCH" = "xlinux"; then
7885	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the linux kernel version" >&5
7886$as_echo_n "checking for the linux kernel version... " >&6; }
7887
7888	kernel=`uname -r`
7889
7890	case "${kernel}" in
7891		2.6.*)
7892			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.6 family (${kernel})" >&5
7893$as_echo "2.6 family (${kernel})" >&6; }
7894
7895$as_echo "#define KERNEL_2_6 1" >>confdefs.h
7896
7897			;;
7898		2.4.*)
7899			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.4 family (${kernel})" >&5
7900$as_echo "2.4 family (${kernel})" >&6; }
7901
7902$as_echo "#define KERNEL_2_4 1" >>confdefs.h
7903
7904			;;
7905		*)
7906			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown family (${kernel})" >&5
7907$as_echo "unknown family (${kernel})" >&6; }
7908			;;
7909	esac
7910fi
7911
7912if test "x$ARCH" = "xsolaris"; then
7913				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -m64 compilation flag" >&5
7914$as_echo_n "checking for -m64 compilation flag... " >&6; }
7915	saved_CFLAGS="$CFLAGS"
7916	CFLAGS="-m64"
7917	if test "$cross_compiling" = yes; then :
7918  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7920as_fn_error $? "cannot run test program while cross compiling
7921See \`config.log' for more details" "$LINENO" 5; }
7922else
7923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7924/* end confdefs.h.  */
7925int main(void) {return 0;}
7926_ACEOF
7927if ac_fn_c_try_run "$LINENO"; then :
7928  CFLAGS="-m64 $saved_CFLAGS"
7929	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7930$as_echo "yes" >&6; }
7931else
7932  CFLAGS="$saved_CFLAGS"
7933	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7934$as_echo "no" >&6; }
7935fi
7936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7937  conftest.$ac_objext conftest.beam conftest.$ac_ext
7938fi
7939
7940	CFLAGS="${CFLAGS} -DZBX_OLD_SOLARIS"
7941fi
7942
7943if test "x$ARCH" = "xhpux"; then
7944				hpux_version=${host_os#hpux}
7945	hpux_major=${hpux_version%.*}
7946	hpux_minor=${hpux_version#*.}
7947
7948
7949cat >>confdefs.h <<_ACEOF
7950#define HPUX_VERSION $hpux_major$hpux_minor
7951_ACEOF
7952
7953
7954		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -D_HPUX_API_LEVEL=20040821 compilation flag" >&5
7955$as_echo_n "checking for -D_HPUX_API_LEVEL=20040821 compilation flag... " >&6; }
7956	saved_CFLAGS="$CFLAGS"
7957	CFLAGS="-D_HPUX_API_LEVEL=20040821"
7958	if test "$cross_compiling" = yes; then :
7959  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7961as_fn_error $? "cannot run test program while cross compiling
7962See \`config.log' for more details" "$LINENO" 5; }
7963else
7964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7965/* end confdefs.h.  */
7966
7967#ifdef HAVE_DLFCN_H
7968#	include <dlfcn.h>
7969#endif
7970#ifdef HAVE_SYS_UTSNAME_H
7971#	include <sys/utsname.h>
7972#endif
7973
7974int main(void)
7975{
7976	void		*p1, *p2;
7977	struct utsname	name;
7978
7979	/* check that the compiler (e.g., GCC 4.3.0 and above) supports function-level versioning */
7980
7981	p1 = uname;
7982	p2 = dlsym(RTLD_DEFAULT, "uname{20040821}");
7983
7984	if (p1 != p2)
7985		return 1;
7986
7987	/* uname() fails with EFAULT on HP-UX systems that were only partially upgraded to this API level */
7988
7989	return -1 == uname(&name) ? 1 : 0;
7990}
7991
7992_ACEOF
7993if ac_fn_c_try_run "$LINENO"; then :
7994  CFLAGS="-D_HPUX_API_LEVEL=20040821 $saved_CFLAGS"
7995	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7996$as_echo "yes" >&6; }
7997else
7998  CFLAGS="$saved_CFLAGS"
7999	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8000$as_echo "no" >&6; }
8001fi
8002rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8003  conftest.$ac_objext conftest.beam conftest.$ac_ext
8004fi
8005
8006fi
8007
8008
8009cat >>confdefs.h <<_ACEOF
8010#define ARCH "${ARCH}"
8011_ACEOF
8012
8013
8014
8015# The cast to long int works around a bug in the HP C Compiler
8016# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8017# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8018# This bug is HP SR number 8606223364.
8019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8020$as_echo_n "checking size of void *... " >&6; }
8021if ${ac_cv_sizeof_void_p+:} false; then :
8022  $as_echo_n "(cached) " >&6
8023else
8024  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
8025
8026else
8027  if test "$ac_cv_type_void_p" = yes; then
8028     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8030as_fn_error 77 "cannot compute sizeof (void *)
8031See \`config.log' for more details" "$LINENO" 5; }
8032   else
8033     ac_cv_sizeof_void_p=0
8034   fi
8035fi
8036
8037fi
8038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8039$as_echo "$ac_cv_sizeof_void_p" >&6; }
8040
8041
8042
8043cat >>confdefs.h <<_ACEOF
8044#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
8045_ACEOF
8046
8047
8048
8049
8050# Check whether --enable-static was given.
8051if test "${enable_static+set}" = set; then :
8052  enableval=$enable_static; case "${enableval}" in
8053  yes)
8054    LDFLAGS="${LDFLAGS} -static"
8055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static linking is possible" >&5
8056$as_echo_n "checking if static linking is possible... " >&6; }
8057    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8058/* end confdefs.h.  */
8059
8060int
8061main ()
8062{
8063
8064  ;
8065  return 0;
8066}
8067_ACEOF
8068if ac_fn_c_try_link "$LINENO"; then :
8069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8070$as_echo "yes" >&6; }
8071        static_linking=yes
8072else
8073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8074$as_echo "no" >&6; }
8075        static_linking=no
8076fi
8077rm -f core conftest.err conftest.$ac_objext \
8078    conftest$ac_exeext conftest.$ac_ext
8079      if test "x$static_linking" = "xno"; then
8080        as_fn_error $? "static linking is not possible on this system" "$LINENO" 5
8081      fi
8082    ;;
8083  no) ;;
8084  *) as_fn_error $? "bad value ${enableval} for --enable-static" "$LINENO" 5 ;;
8085esac
8086fi
8087
8088
8089# Check whether --enable-static-libs was given.
8090if test "${enable_static_libs+set}" = set; then :
8091  enableval=$enable_static_libs; case "${enableval}" in
8092  yes)
8093    static_linking_libs=yes
8094    saved_LIBS="$LIBS"
8095    LIBS="${saved_LIBS} -Wl,-bstatic -Wl,-bdynamic"
8096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libs static linking with \"-Wl,-b\" is possible" >&5
8097$as_echo_n "checking if libs static linking with \"-Wl,-b\" is possible... " >&6; }
8098    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8099/* end confdefs.h.  */
8100
8101int
8102main ()
8103{
8104
8105  ;
8106  return 0;
8107}
8108_ACEOF
8109if ac_fn_c_try_link "$LINENO"; then :
8110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8111$as_echo "yes" >&6; }
8112        static_linking_support="-Wl,-b"
8113else
8114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8115$as_echo "no" >&6; }
8116        static_linking_support=no
8117fi
8118rm -f core conftest.err conftest.$ac_objext \
8119    conftest$ac_exeext conftest.$ac_ext
8120        LIBS="$saved_LIBS"
8121
8122    if test "x$static_linking_support" = "xno"; then
8123      LIBS="${saved_LIBS} -Wl,-Bstatic -Wl,-Bdynamic"
8124      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libs static linking with \"-Wl,-B\" is possible" >&5
8125$as_echo_n "checking if libs static linking with \"-Wl,-B\" is possible... " >&6; }
8126      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8127/* end confdefs.h.  */
8128
8129int
8130main ()
8131{
8132
8133  ;
8134  return 0;
8135}
8136_ACEOF
8137if ac_fn_c_try_link "$LINENO"; then :
8138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8139$as_echo "yes" >&6; }
8140          static_linking_support="-Wl,-B"
8141else
8142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8143$as_echo "no" >&6; }
8144          static_linking_support=no
8145fi
8146rm -f core conftest.err conftest.$ac_objext \
8147    conftest$ac_exeext conftest.$ac_ext
8148          LIBS="$saved_LIBS"
8149    fi
8150    ;;
8151  no) ;;
8152  *) as_fn_error $? "bad value ${enableval} for --enable-static-libs" "$LINENO" 5 ;;
8153esac
8154fi
8155
8156
8157# Check whether --enable-server was given.
8158if test "${enable_server+set}" = set; then :
8159  enableval=$enable_server; case "${enableval}" in
8160  yes) server=yes ;;
8161  no)  server=no ;;
8162  *) as_fn_error $? "bad value ${enableval} for --enable-server" "$LINENO" 5 ;;
8163esac
8164else
8165  server=no
8166fi
8167
8168 if test "x$server" = "xyes"; then
8169  SERVER_TRUE=
8170  SERVER_FALSE='#'
8171else
8172  SERVER_TRUE='#'
8173  SERVER_FALSE=
8174fi
8175
8176
8177# Check whether --enable-proxy was given.
8178if test "${enable_proxy+set}" = set; then :
8179  enableval=$enable_proxy; case "${enableval}" in
8180  yes) proxy=yes ;;
8181  no)  proxy=no ;;
8182  *) as_fn_error $? "bad value ${enableval} for --enable-proxy" "$LINENO" 5 ;;
8183esac
8184else
8185  proxy=no
8186fi
8187
8188 if test "x$proxy" = "xyes"; then
8189  PROXY_TRUE=
8190  PROXY_FALSE='#'
8191else
8192  PROXY_TRUE='#'
8193  PROXY_FALSE=
8194fi
8195
8196
8197# Check whether --enable-agent was given.
8198if test "${enable_agent+set}" = set; then :
8199  enableval=$enable_agent; case "${enableval}" in
8200  yes) agent=yes ;;
8201  no)  agent=no ;;
8202  *) as_fn_error $? "bad value ${enableval} for --enable-agent" "$LINENO" 5 ;;
8203esac
8204else
8205  agent=no
8206fi
8207
8208 if test "x$agent" = "xyes"; then
8209  AGENT_TRUE=
8210  AGENT_FALSE='#'
8211else
8212  AGENT_TRUE='#'
8213  AGENT_FALSE=
8214fi
8215
8216
8217# Check whether --enable-agent2 was given.
8218if test "${enable_agent2+set}" = set; then :
8219  enableval=$enable_agent2; case "${enableval}" in
8220  yes) agent2=yes ;;
8221  no)  agent2=no ;;
8222  *) as_fn_error $? "bad value ${enableval} for --enable-agent2" "$LINENO" 5 ;;
8223esac
8224test "x$agent2" = "xyes" -a "x$HAVE_THREAD_LOCAL" = "xno" && as_fn_error $? "C compiler is not compatible with agent2 assembly" "$LINENO" 5
8225
8226else
8227  agent2=no
8228fi
8229
8230 if test "x$agent2" = "xyes"; then
8231  AGENT2_TRUE=
8232  AGENT2_FALSE='#'
8233else
8234  AGENT2_TRUE='#'
8235  AGENT2_FALSE=
8236fi
8237
8238
8239# Check whether --enable-java was given.
8240if test "${enable_java+set}" = set; then :
8241  enableval=$enable_java; case "${enableval}" in
8242  yes) java=yes ;;
8243  no)  java=no ;;
8244  *) as_fn_error $? "bad value ${enableval} for --enable-java" "$LINENO" 5 ;;
8245esac
8246else
8247  java=no
8248fi
8249
8250 if test "x$java" = "xyes"; then
8251  JAVA_TRUE=
8252  JAVA_FALSE='#'
8253else
8254  JAVA_TRUE='#'
8255  JAVA_FALSE=
8256fi
8257
8258
8259# Check whether --enable-ipv6 was given.
8260if test "${enable_ipv6+set}" = set; then :
8261  enableval=$enable_ipv6; case "${enableval}" in
8262  yes) ipv6=yes ;;
8263  no)  ipv6=no ;;
8264  *) as_fn_error $? "bad value ${enableval} for --enable-ipv6" "$LINENO" 5 ;;
8265esac
8266else
8267  ipv6=no
8268fi
8269
8270 if test "x$ipv6" = "xyes"; then
8271  IPV6_TRUE=
8272  IPV6_FALSE='#'
8273else
8274  IPV6_TRUE='#'
8275  IPV6_FALSE=
8276fi
8277
8278
8279 if test -d create; then
8280  DBSCHEMA_TRUE=
8281  DBSCHEMA_FALSE='#'
8282else
8283  DBSCHEMA_TRUE='#'
8284  DBSCHEMA_FALSE=
8285fi
8286
8287
8288 if (test -d tests/) && (test "x$server" = "xyes" || test "x$proxy" = "xyes" || test "x$agent" = "xyes"); then
8289  ZBXCMOCKA_TRUE=
8290  ZBXCMOCKA_FALSE='#'
8291else
8292  ZBXCMOCKA_TRUE='#'
8293  ZBXCMOCKA_FALSE=
8294fi
8295
8296
8297have_db="no"
8298have_unixodbc="no"
8299have_web_monitoring="no"
8300have_snmp="no"
8301have_ipmi="no"
8302have_ipv6="no"
8303have_ssh="no"
8304have_tls="no"
8305
8306
8307if test "x$ipv6" = "xyes"; then
8308
8309$as_echo "#define HAVE_IPV6 1" >>confdefs.h
8310
8311	have_ipv6="yes"
8312fi
8313
8314if test "x$server" = "xyes" || test "x$proxy" = "xyes"; then
8315
8316
8317
8318    MYSQL_CONFIG="no"
8319
8320
8321# Check whether --with-mysql was given.
8322if test "${with_mysql+set}" = set; then :
8323  withval=$with_mysql;
8324        if test "$withval" = "no"; then
8325            want_mysql="no"
8326        elif test "$withval" = "yes"; then
8327            want_mysql="yes"
8328        else
8329            want_mysql="yes"
8330            MYSQL_CONFIG="$withval"
8331        fi
8332
8333else
8334  want_mysql="no"
8335
8336fi
8337
8338
8339    MYSQL_CFLAGS=""
8340    MYSQL_LDFLAGS=""
8341    MYSQL_LIBS=""
8342    MYSQL_VERSION=""
8343
8344
8345    if test "$want_mysql" = "yes"; then
8346
8347        for ac_prog in mysql_config mariadb_config
8348do
8349  # Extract the first word of "$ac_prog", so it can be a program name with args.
8350set dummy $ac_prog; ac_word=$2
8351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8352$as_echo_n "checking for $ac_word... " >&6; }
8353if ${ac_cv_path_MYSQL_CONFIG+:} false; then :
8354  $as_echo_n "(cached) " >&6
8355else
8356  case $MYSQL_CONFIG in
8357  [\\/]* | ?:[\\/]*)
8358  ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
8359  ;;
8360  *)
8361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8362for as_dir in $PATH
8363do
8364  IFS=$as_save_IFS
8365  test -z "$as_dir" && as_dir=.
8366    for ac_exec_ext in '' $ac_executable_extensions; do
8367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8368    ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8370    break 2
8371  fi
8372done
8373  done
8374IFS=$as_save_IFS
8375
8376  ;;
8377esac
8378fi
8379MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
8380if test -n "$MYSQL_CONFIG"; then
8381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_CONFIG" >&5
8382$as_echo "$MYSQL_CONFIG" >&6; }
8383else
8384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8385$as_echo "no" >&6; }
8386fi
8387
8388
8389  test -n "$MYSQL_CONFIG" && break
8390done
8391
8392
8393        if test -x "$MYSQL_CONFIG"; then
8394            MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"
8395            _full_libmysql_libs="`$MYSQL_CONFIG --libs`"
8396
8397            _save_mysql_ldflags="${LDFLAGS}"
8398            _save_mysql_cflags="${CFLAGS}"
8399            _save_mysql_libs="${LIBS}"
8400            LDFLAGS="${LDFLAGS} ${_full_libmysql_libs}"
8401            CFLAGS="${CFLAGS} ${MYSQL_CFLAGS}"
8402
8403            for i in $_full_libmysql_libs; do
8404                case $i in
8405                    -lmysqlclient|-lperconaserverclient|-lmariadbclient|-lmariadb)
8406
8407                        _lib_name="`echo "$i" | cut -b3-`"
8408                        as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name''_main" | $as_tr_sh`
8409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name" >&5
8410$as_echo_n "checking for main in -l$_lib_name... " >&6; }
8411if eval \${$as_ac_Lib+:} false; then :
8412  $as_echo_n "(cached) " >&6
8413else
8414  ac_check_lib_save_LIBS=$LIBS
8415LIBS="-l$_lib_name  $LIBS"
8416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8417/* end confdefs.h.  */
8418
8419
8420int
8421main ()
8422{
8423return main ();
8424  ;
8425  return 0;
8426}
8427_ACEOF
8428if ac_fn_c_try_link "$LINENO"; then :
8429  eval "$as_ac_Lib=yes"
8430else
8431  eval "$as_ac_Lib=no"
8432fi
8433rm -f core conftest.err conftest.$ac_objext \
8434    conftest$ac_exeext conftest.$ac_ext
8435LIBS=$ac_check_lib_save_LIBS
8436fi
8437eval ac_res=\$$as_ac_Lib
8438	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8439$as_echo "$ac_res" >&6; }
8440if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8441
8442                        	MYSQL_LIBS="-l${_lib_name} ${MYSQL_LIBS}"
8443
8444else
8445
8446                        	as_fn_error $? "Not found $_lib_name library" "$LINENO" 5
8447
8448fi
8449
8450                ;;
8451                    -L*)
8452
8453                        MYSQL_LDFLAGS="${MYSQL_LDFLAGS} $i"
8454                ;;
8455                    -R*)
8456
8457                        MYSQL_LDFLAGS="${MYSQL_LDFLAGS} -Wl,$i"
8458                ;;
8459                    -l*)
8460
8461                        _lib_name="`echo "$i" | cut -b3-`"
8462                        as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name''_main" | $as_tr_sh`
8463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name" >&5
8464$as_echo_n "checking for main in -l$_lib_name... " >&6; }
8465if eval \${$as_ac_Lib+:} false; then :
8466  $as_echo_n "(cached) " >&6
8467else
8468  ac_check_lib_save_LIBS=$LIBS
8469LIBS="-l$_lib_name  $LIBS"
8470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8471/* end confdefs.h.  */
8472
8473
8474int
8475main ()
8476{
8477return main ();
8478  ;
8479  return 0;
8480}
8481_ACEOF
8482if ac_fn_c_try_link "$LINENO"; then :
8483  eval "$as_ac_Lib=yes"
8484else
8485  eval "$as_ac_Lib=no"
8486fi
8487rm -f core conftest.err conftest.$ac_objext \
8488    conftest$ac_exeext conftest.$ac_ext
8489LIBS=$ac_check_lib_save_LIBS
8490fi
8491eval ac_res=\$$as_ac_Lib
8492	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8493$as_echo "$ac_res" >&6; }
8494if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
8495
8496                        	MYSQL_LIBS="${MYSQL_LIBS} ${i}"
8497
8498else
8499
8500                        	as_fn_error $? "Not found $i library" "$LINENO" 5
8501
8502fi
8503
8504                ;;
8505                esac
8506            done
8507            LDFLAGS="${_save_mysql_ldflags}"
8508            CFLAGS="${_save_mysql_cflags}"
8509
8510            CFLAGS="${CFLAGS} ${MYSQL_CFLAGS}"
8511            LDFLAGS="${LDFLAGS} ${MYSQL_LDFLAGS}"
8512            LIBS="${LIBS} ${MYSQL_LIBS}"
8513
8514	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TLS support in MySQL library" >&5
8515$as_echo_n "checking for TLS support in MySQL library... " >&6; }
8516	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8517/* end confdefs.h.  */
8518
8519#include <mysql.h>
8520
8521int
8522main ()
8523{
8524
8525	unsigned int	mysql_tls_mode;
8526	MYSQL		*mysql;
8527
8528	mysql_tls_mode = SSL_MODE_REQUIRED;
8529	mysql_options(mysql, MYSQL_OPT_SSL_MODE, &mysql_tls_mode);
8530
8531	mysql_tls_mode = SSL_MODE_VERIFY_CA;
8532	mysql_options(mysql, MYSQL_OPT_SSL_MODE, &mysql_tls_mode);
8533
8534	mysql_tls_mode = SSL_MODE_VERIFY_IDENTITY;
8535	mysql_options(mysql, MYSQL_OPT_SSL_MODE, &mysql_tls_mode);
8536
8537	mysql_options(mysql, MYSQL_OPT_SSL_CA, "");
8538	mysql_options(mysql, MYSQL_OPT_SSL_KEY, "");
8539	mysql_options(mysql, MYSQL_OPT_SSL_CERT, "");
8540	mysql_options(mysql, MYSQL_OPT_SSL_CIPHER, "");
8541
8542  ;
8543  return 0;
8544}
8545_ACEOF
8546if ac_fn_c_try_link "$LINENO"; then :
8547
8548$as_echo "#define HAVE_MYSQL_TLS 1" >>confdefs.h
8549
8550	found_mysql_tls="yes"
8551	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8552$as_echo "yes" >&6; }
8553else
8554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8555$as_echo "no" >&6; }
8556fi
8557rm -f core conftest.err conftest.$ac_objext \
8558    conftest$ac_exeext conftest.$ac_ext
8559
8560            if test "$found_mysql_tls" == "yes"; then
8561
8562	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TLS ciphersuites in MySQL library" >&5
8563$as_echo_n "checking for TLS ciphersuites in MySQL library... " >&6; }
8564	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8565/* end confdefs.h.  */
8566
8567#include <mysql.h>
8568
8569int
8570main ()
8571{
8572
8573	MYSQL	*mysql;
8574
8575	mysql_options(mysql, MYSQL_OPT_TLS_CIPHERSUITES, "");
8576
8577  ;
8578  return 0;
8579}
8580_ACEOF
8581if ac_fn_c_try_link "$LINENO"; then :
8582
8583$as_echo "#define HAVE_MYSQL_TLS_CIPHERSUITES 1" >>confdefs.h
8584
8585	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8586$as_echo "yes" >&6; }
8587else
8588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8589$as_echo "no" >&6; }
8590fi
8591rm -f core conftest.err conftest.$ac_objext \
8592    conftest$ac_exeext conftest.$ac_ext
8593
8594            else
8595
8596	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TLS support in MariaDB library" >&5
8597$as_echo_n "checking for TLS support in MariaDB library... " >&6; }
8598	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8599/* end confdefs.h.  */
8600
8601#include <mysql.h>
8602
8603int
8604main ()
8605{
8606
8607	MYSQL	*mysql;
8608
8609	mysql_optionsv(mysql, MYSQL_OPT_SSL_ENFORCE, (void *)"");
8610	mysql_optionsv(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (void *)"");
8611	mysql_optionsv(mysql, MYSQL_OPT_SSL_CA, (void *)"");
8612	mysql_optionsv(mysql, MYSQL_OPT_SSL_KEY, (void *)"");
8613	mysql_optionsv(mysql, MYSQL_OPT_SSL_CERT, (void *)"");
8614	mysql_optionsv(mysql, MYSQL_OPT_SSL_CIPHER, (void *)"");
8615
8616  ;
8617  return 0;
8618}
8619_ACEOF
8620if ac_fn_c_try_link "$LINENO"; then :
8621
8622$as_echo "#define HAVE_MARIADB_TLS 1" >>confdefs.h
8623
8624	found_mariadb_tls="yes"
8625	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8626$as_echo "yes" >&6; }
8627else
8628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8629$as_echo "no" >&6; }
8630fi
8631rm -f core conftest.err conftest.$ac_objext \
8632    conftest$ac_exeext conftest.$ac_ext
8633
8634            fi
8635
8636
8637	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MariaDB init options function" >&5
8638$as_echo_n "checking for MariaDB init options function... " >&6; }
8639	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8640/* end confdefs.h.  */
8641
8642#include <mysql.h>
8643
8644int
8645main ()
8646{
8647
8648	MYSQL	*mysql;
8649
8650	mysql_optionsv(mysql, MYSQL_INIT_COMMAND, (void *)"set @@session.auto_increment_offset=1");
8651
8652  ;
8653  return 0;
8654}
8655_ACEOF
8656if ac_fn_c_try_link "$LINENO"; then :
8657
8658cat >>confdefs.h <<_ACEOF
8659#define MYSQL_OPTIONS mysql_optionsv
8660_ACEOF
8661
8662
8663cat >>confdefs.h <<_ACEOF
8664#define MYSQL_OPTIONS_ARGS_VOID_CAST (void *)
8665_ACEOF
8666
8667	found_mariadb_options="yes"
8668	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8669$as_echo "yes" >&6; }
8670else
8671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8672$as_echo "no" >&6; }
8673fi
8674rm -f core conftest.err conftest.$ac_objext \
8675    conftest$ac_exeext conftest.$ac_ext
8676
8677            if test "$found_mariadb_options" != "yes"; then
8678
8679	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MySQL init options function" >&5
8680$as_echo_n "checking for MySQL init options function... " >&6; }
8681	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8682/* end confdefs.h.  */
8683
8684#include <mysql.h>
8685
8686int
8687main ()
8688{
8689
8690	MYSQL		*mysql;
8691
8692	mysql_options(mysql, MYSQL_INIT_COMMAND, "set @@session.auto_increment_offset=1");
8693
8694  ;
8695  return 0;
8696}
8697_ACEOF
8698if ac_fn_c_try_link "$LINENO"; then :
8699
8700cat >>confdefs.h <<_ACEOF
8701#define MYSQL_OPTIONS mysql_options
8702_ACEOF
8703
8704
8705cat >>confdefs.h <<_ACEOF
8706#define MYSQL_OPTIONS_ARGS_VOID_CAST /**/
8707_ACEOF
8708
8709	found_mysql_options="yes"
8710	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8711$as_echo "yes" >&6; }
8712else
8713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8714$as_echo "no" >&6; }
8715fi
8716rm -f core conftest.err conftest.$ac_objext \
8717    conftest$ac_exeext conftest.$ac_ext
8718
8719                if test "$found_mysql_options" != "yes"; then
8720                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8721$as_echo "no" >&6; }
8722                    as_fn_error $? "Could not find the options function for mysql init" "$LINENO" 5
8723                fi
8724            fi
8725
8726            LDFLAGS="${_save_mysql_ldflags}"
8727            CFLAGS="${_save_mysql_cflags}"
8728            LIBS="${_save_mysql_libs}"
8729            unset _save_mysql_ldflags
8730            unset _save_mysql_cflags
8731            MYSQL_VERSION=`$MYSQL_CONFIG --version`
8732
8733
8734$as_echo "#define HAVE_MYSQL 1" >>confdefs.h
8735
8736
8737            found_mysql="yes"
8738        else
8739            found_mysql="no"
8740        fi
8741    fi
8742
8743
8744    mysql_version_req=
8745
8746    if test "$found_mysql" = "yes" -a -n "$mysql_version_req"; then
8747
8748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MySQL version is >= $mysql_version_req" >&5
8749$as_echo_n "checking if MySQL version is >= $mysql_version_req... " >&6; }
8750
8751                        mysql_version_req_major=`expr $mysql_version_req : '\([0-9]*\)'`
8752        mysql_version_req_minor=`expr $mysql_version_req : '[0-9]*\.\([0-9]*\)'`
8753        mysql_version_req_micro=`expr $mysql_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8754        if test "x$mysql_version_req_micro" = "x"; then
8755            mysql_version_req_micro="0"
8756        fi
8757
8758        mysql_version_req_number=`expr $mysql_version_req_major \* 1000000 \
8759                                   \+ $mysql_version_req_minor \* 1000 \
8760                                   \+ $mysql_version_req_micro`
8761
8762                        mysql_version_major=`expr $MYSQL_VERSION : '\([0-9]*\)'`
8763        mysql_version_minor=`expr $MYSQL_VERSION : '[0-9]*\.\([0-9]*\)'`
8764        mysql_version_micro=`expr $MYSQL_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8765        if test "x$mysql_version_micro" = "x"; then
8766            mysql_version_micro="0"
8767        fi
8768
8769        mysql_version_number=`expr $mysql_version_major \* 1000000 \
8770                                   \+ $mysql_version_minor \* 1000 \
8771                                   \+ $mysql_version_micro`
8772
8773        mysql_version_check=`expr $mysql_version_number \>\= $mysql_version_req_number`
8774        if test "$mysql_version_check" = "1"; then
8775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8776$as_echo "yes" >&6; }
8777        else
8778            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8779$as_echo "no" >&6; }
8780        fi
8781    fi
8782
8783
8784
8785
8786
8787
8788	if test "x$want_mysql" = "xyes"; then
8789		if test "x$have_db" != "xno"; then
8790			as_fn_error $? "You can configure for only one database." "$LINENO" 5
8791		fi
8792
8793		if test "x$found_mysql" = "xyes"; then
8794			have_db="MySQL"
8795			have_multirow_insert="yes"
8796		else
8797			as_fn_error $? "MySQL library not found" "$LINENO" 5
8798		fi
8799	fi
8800
8801
8802
8803# Check whether --with-oracle was given.
8804if test "${with_oracle+set}" = set; then :
8805  withval=$with_oracle;
8806        if test "$withval" = "no"; then
8807            want_oracle_oci="no"
8808        elif test "$withval" = "yes"; then
8809            want_oracle_oci="yes"
8810            oracle_home_dir="$ORACLE_HOME"
8811        elif test -d "$withval"; then
8812            want_oracle_oci="yes"
8813            oracle_home_dir="$withval"
8814        else
8815            want_oracle_oci="yes"
8816            oracle_home_dir=""
8817        fi
8818
8819else
8820  want_oracle_oci="no"
8821
8822fi
8823
8824
8825
8826# Check whether --with-oracle-include was given.
8827if test "${with_oracle_include+set}" = set; then :
8828  withval=$with_oracle_include;
8829        if test "$withval" != "no"; then
8830            want_oracle_oci="yes"
8831            oracle_home_include_dir="$withval"
8832        fi
8833
8834else
8835  oracle_home_include_dir=""
8836
8837fi
8838
8839
8840# Check whether --with-oracle-lib was given.
8841if test "${with_oracle_lib+set}" = set; then :
8842  withval=$with_oracle_lib;
8843        if test "$withval" != "no"; then
8844            want_oracle_oci="yes"
8845            oracle_home_lib_dir="$withval"
8846        fi
8847
8848else
8849  oracle_home_lib_dir=""
8850
8851fi
8852
8853
8854    ORACLE_OCI_CFLAGS=""
8855    ORACLE_OCI_LDFLAGS=""
8856    ORACLE_OCI_LIBS=""
8857    ORACLE_OCI_VERSION=""
8858
8859                want_oracle_but_no_path="no"
8860
8861    if test -n "$oracle_home_dir"; then
8862
8863        if test "$oracle_home_dir" != "no" -a "$oracle_home_dir" != "yes"; then
8864
8865                        oracle_include_dir="$oracle_home_dir/rdbms/public"
8866
8867                        oracle_include_dir2="$oracle_home_dir/rdbms/demo"
8868
8869                        oracle_lib_dir="$oracle_home_dir/lib"
8870        elif test "$oracle_home_dir" = "yes"; then
8871            want_oracle_but_no_path="yes"
8872        fi
8873
8874    elif test -n "$oracle_home_include_dir" -o -n "$oracle_home_lib_dir"; then
8875
8876        if test "$oracle_home_include_dir" != "no" -a "$oracle_home_include_dir" != "yes"; then
8877            oracle_include_dir="$oracle_home_include_dir"
8878        elif test "$oracle_home_include_dir" = "yes"; then
8879            want_oracle_but_no_path="yes"
8880        fi
8881
8882        if test "$oracle_home_lib_dir" != "no" -a "$oracle_home_lib_dir" != "yes"; then
8883            oracle_lib_dir="$oracle_home_lib_dir"
8884        elif test "$oracle_home_lib_dir" = "yes"; then
8885            want_oracle_but_no_path="yes"
8886        fi
8887    fi
8888
8889    if test "$want_oracle_but_no_path" = "yes"; then
8890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Oracle support is requested but no Oracle paths have been provided. \
8891Please, locate Oracle directories using --with-oracle or \
8892--with-oracle-include and --with-oracle-lib options." >&5
8893$as_echo "$as_me: WARNING: Oracle support is requested but no Oracle paths have been provided. \
8894Please, locate Oracle directories using --with-oracle or \
8895--with-oracle-include and --with-oracle-lib options." >&2;}
8896    fi
8897
8898                if test -n "$oracle_include_dir" -a -n "$oracle_lib_dir"; then
8899
8900        saved_CPPFLAGS="$CPPFLAGS"
8901        CPPFLAGS="$CPPFLAGS -I$oracle_include_dir"
8902
8903                if test -n "$oracle_include_dir2"; then
8904            CPPFLAGS="$CPPFLAGS -I$oracle_include_dir2"
8905        fi
8906
8907                        saved_LDFLAGS="$LDFLAGS"
8908        oci_ldflags="-L$oracle_lib_dir"
8909        LDFLAGS="$LDFLAGS $oci_ldflags"
8910
8911        saved_LIBS="$LIBS"
8912        oci_libs="-lclntsh"
8913        LIBS="$LIBS $oci_libs"
8914
8915                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCI headers in $oracle_include_dir" >&5
8916$as_echo_n "checking for Oracle OCI headers in $oracle_include_dir... " >&6; }
8917
8918                if test -f "$oracle_include_dir/ociver.h"; then
8919            oracle_version_file="ociver.h"
8920        else
8921            oracle_version_file="oci.h"
8922        fi
8923
8924        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8925/* end confdefs.h.  */
8926
8927            #include <$oracle_version_file>
8928int
8929main ()
8930{
8931
8932#if defined(OCI_MAJOR_VERSION)
8933#if OCI_MAJOR_VERSION == 10 && OCI_MINOR_VERSION == 2
8934// Oracle 10.2 detected
8935#endif
8936#elif defined(OCI_V7_SYNTAX)
8937// OK, older Oracle detected
8938// TODO - mloskot: find better macro to check for older versions;
8939#else
8940#  error Oracle $oracle_version_file header not found
8941#endif
8942
8943
8944  ;
8945  return 0;
8946}
8947_ACEOF
8948if ac_fn_c_try_compile "$LINENO"; then :
8949
8950            ORACLE_OCI_CFLAGS="-I$oracle_include_dir"
8951
8952            if test -n "$oracle_include_dir2"; then
8953                ORACLE_OCI_CFLAGS="$ORACLE_OCI_CFLAGS -I$oracle_include_dir2"
8954            fi
8955
8956            oci_header_found="yes"
8957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8958$as_echo "yes" >&6; }
8959
8960else
8961
8962            oci_header_found="no"
8963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8964$as_echo "not found" >&6; }
8965
8966
8967fi
8968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8969
8970                                oracle_version_req=10.0
8971
8972        if test "$oci_header_found" = "yes"; then
8973
8974            oracle_version_major=`cat $oracle_include_dir/$oracle_version_file \
8975                                 | grep '#define.*OCI_MAJOR_VERSION.*' \
8976                                 | sed -e 's/#define OCI_MAJOR_VERSION  *//' \
8977                                 | sed -e 's/  *\/\*.*\*\///'`
8978
8979            oracle_version_minor=`cat $oracle_include_dir/$oracle_version_file \
8980                                 | grep '#define.*OCI_MINOR_VERSION.*' \
8981                                 | sed -e 's/#define OCI_MINOR_VERSION  *//' \
8982                                 | sed -e 's/  *\/\*.*\*\///'`
8983
8984                        oracle_version_number=`expr $oracle_version_major \* 1000000 \
8985                                  \+ $oracle_version_minor \* 1000`
8986
8987
8988            if test -n "$oracle_version_req"; then
8989                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Oracle OCI version is >= $oracle_version_req" >&5
8990$as_echo_n "checking if Oracle OCI version is >= $oracle_version_req... " >&6; }
8991
8992                if test -n "$oracle_version_major" -a -n $"oracle_version_minor"; then
8993
8994                    ORACLE_OCI_VERSION="$oracle_version_major.$oracle_version_minor"
8995
8996                                                            oracle_version_req_major=`expr $oracle_version_req : '\([0-9]*\)'`
8997                    oracle_version_req_minor=`expr $oracle_version_req : '[0-9]*\.\([0-9]*\)'`
8998
8999                    oracle_version_req_number=`expr $oracle_version_req_major \* 1000000 \
9000                                               \+ $oracle_version_req_minor \* 1000`
9001
9002                    oracle_version_check=`expr $oracle_version_number \>\= $oracle_version_req_number`
9003                    if test "$oracle_version_check" = "1"; then
9004
9005                        oracle_version_checked="yes"
9006                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9007$as_echo "yes" >&6; }
9008
9009                    else
9010                        oracle_version_checked="no"
9011                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9012$as_echo "no" >&6; }
9013                        as_fn_error $? "Oracle $ORACLE_OCI_VERSION found, but required version is $oracle_version_req" "$LINENO" 5
9014                    fi
9015                else
9016                    ORACLE_OCI_VERSION="UNKNOWN"
9017                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9018$as_echo "no" >&6; }
9019                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Oracle version unknown, probably OCI older than 10.2 is available" >&5
9020$as_echo "$as_me: WARNING: Oracle version unknown, probably OCI older than 10.2 is available" >&2;}
9021                fi
9022            fi
9023
9024                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCI version >= 10.x to use -lnnz1x flag" >&5
9025$as_echo_n "checking for Oracle OCI version >= 10.x to use -lnnz1x flag... " >&6; }
9026            oracle_nnz1x_flag=`expr $oracle_version_number / 1000000`
9027            if test "$oracle_nnz1x_flag" -ge 10; then
9028                oci_libs="$oci_libs -lnnz$oracle_nnz1x_flag"
9029                LIBS="$LIBS -lnnz$oracle_nnz1x_flag"
9030                { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lnnz$oracle_nnz1x_flag" >&5
9031$as_echo "-lnnz$oracle_nnz1x_flag" >&6; }
9032            else
9033                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9034$as_echo "no" >&6; }
9035            fi
9036        fi
9037
9038                                if test "$oci_header_found" = "yes"; then
9039
9040            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle OCI libraries in $oracle_lib_dir" >&5
9041$as_echo_n "checking for Oracle OCI libraries in $oracle_lib_dir... " >&6; }
9042
9043            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9044/* end confdefs.h.  */
9045
9046                #include <oci.h>
9047int
9048main ()
9049{
9050
9051OCIEnv* envh = 0;
9052OCIEnvNlsCreate(&envh, OCI_DEFAULT, 0, 0, 0, 0, 0, 0, 0, 0);
9053if (envh) OCIHandleFree(envh, OCI_HTYPE_ENV);
9054
9055
9056  ;
9057  return 0;
9058}
9059_ACEOF
9060if ac_fn_c_try_link "$LINENO"; then :
9061
9062                ORACLE_OCI_LDFLAGS="$oci_ldflags"
9063                ORACLE_OCI_LIBS="$oci_libs"
9064                oci_lib_found="yes"
9065                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9066$as_echo "yes" >&6; }
9067
9068else
9069
9070                oci_lib_found="no"
9071                { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9072$as_echo "not found" >&6; }
9073
9074
9075fi
9076rm -f core conftest.err conftest.$ac_objext \
9077    conftest$ac_exeext conftest.$ac_ext
9078        fi
9079
9080        CPPFLAGS="$saved_CPPFLAGS"
9081        LDFLAGS="$saved_LDFLAGS"
9082        LIBS="$saved_LIBS"
9083    fi
9084
9085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Oracle support" >&5
9086$as_echo_n "checking for Oracle support... " >&6; }
9087
9088    if test "$oci_header_found" = "yes" -a "$oci_lib_found" = "yes"; then
9089
9090
9091
9092
9093
9094
9095        HAVE_ORACLE_OCI="yes"
9096    else
9097        HAVE_ORACLE_OCI="no"
9098    fi
9099
9100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ORACLE_OCI" >&5
9101$as_echo "$HAVE_ORACLE_OCI" >&6; }
9102
9103	if test "x$want_oracle_oci" = "xyes"; then
9104		if test "x$have_db" != "xno"; then
9105			as_fn_error $? "You can configure for only one database." "$LINENO" 5
9106		fi
9107
9108		if test "x$HAVE_ORACLE_OCI" = "xyes"; then
9109			have_db="Oracle"
9110
9111			ORACLE_CPPFLAGS="$ORACLE_OCI_CFLAGS"
9112			ORACLE_LDFLAGS="$ORACLE_OCI_LDFLAGS"
9113			ORACLE_LIBS="$ORACLE_OCI_LIBS"
9114
9115
9116$as_echo "#define HAVE_ORACLE 1" >>confdefs.h
9117
9118		else
9119			as_fn_error $? "Oracle OCI library not found" "$LINENO" 5
9120		fi
9121	fi
9122
9123
9124    PG_CONFIG="no"
9125
9126
9127# Check whether --with-postgresql was given.
9128if test "${with_postgresql+set}" = set; then :
9129  withval=$with_postgresql;
9130        if test "x$withval" = "xno"; then
9131            want_postgresql="no"
9132        elif test "x$withval" = "xyes"; then
9133            want_postgresql="yes"
9134        else
9135            want_postgresql="yes"
9136            PG_CONFIG="$withval"
9137        fi
9138
9139else
9140  want_postgresql="no"
9141
9142fi
9143
9144
9145    POSTGRESQL_CFLAGS=""
9146    POSTGRESQL_LDFLAGS=""
9147    POSTGRESQL_LIBS=""
9148    POSTGRESQL_VERSION=""
9149
9150
9151    if test "x$want_postgresql" = "xyes"; then
9152        # Extract the first word of "pg_config", so it can be a program name with args.
9153set dummy pg_config; ac_word=$2
9154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9155$as_echo_n "checking for $ac_word... " >&6; }
9156if ${ac_cv_path_PG_CONFIG+:} false; then :
9157  $as_echo_n "(cached) " >&6
9158else
9159  case $PG_CONFIG in
9160  [\\/]* | ?:[\\/]*)
9161  ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path.
9162  ;;
9163  *)
9164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9165for as_dir in $PATH
9166do
9167  IFS=$as_save_IFS
9168  test -z "$as_dir" && as_dir=.
9169    for ac_exec_ext in '' $ac_executable_extensions; do
9170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9171    ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9173    break 2
9174  fi
9175done
9176  done
9177IFS=$as_save_IFS
9178
9179  ;;
9180esac
9181fi
9182PG_CONFIG=$ac_cv_path_PG_CONFIG
9183if test -n "$PG_CONFIG"; then
9184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5
9185$as_echo "$PG_CONFIG" >&6; }
9186else
9187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9188$as_echo "no" >&6; }
9189fi
9190
9191
9192
9193        if test -x "$PG_CONFIG"; then
9194            POSTGRESQL_CFLAGS="`$PG_CONFIG --includedir`"
9195            if test -n "$POSTGRESQL_CFLAGS"; then
9196                POSTGRESQL_CFLAGS="-I$POSTGRESQL_CFLAGS";
9197            fi
9198            POSTGRESQL_LDFLAGS="`$PG_CONFIG --libdir`"
9199            if test -n "$POSTGRESQL_LDFLAGS"; then
9200                POSTGRESQL_LDFLAGS="-L$POSTGRESQL_LDFLAGS";
9201            fi
9202            POSTGRESQL_LIBS="-lpq"
9203
9204            _save_postgresql_cflags="${CFLAGS}"
9205            _save_postgresql_ldflags="${LDFLAGS}"
9206            _save_postgresql_libs="${LIBS}"
9207            CFLAGS="${CFLAGS} ${POSTGRESQL_CFLAGS}"
9208            LDFLAGS="${LDFLAGS} ${POSTGRESQL_LDFLAGS}"
9209            LIBS="${LIBS} ${POSTGRESQL_LIBS}"
9210
9211            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PostgreSQL libraries" >&5
9212$as_echo_n "checking for PostgreSQL libraries... " >&6; }
9213            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9214/* end confdefs.h.  */
9215
9216#include <libpq-fe.h>
9217
9218int
9219main ()
9220{
9221
9222PGconn	*conn;
9223conn = PQsetdbLogin(NULL, NULL, NULL, NULL, NULL, NULL, NULL);
9224
9225  ;
9226  return 0;
9227}
9228_ACEOF
9229if ac_fn_c_try_link "$LINENO"; then :
9230
9231$as_echo "#define HAVE_POSTGRESQL 1" >>confdefs.h
9232
9233            found_postgresql="yes"
9234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9235$as_echo "yes" >&6; }
9236else
9237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9238$as_echo "no" >&6; }
9239fi
9240rm -f core conftest.err conftest.$ac_objext \
9241    conftest$ac_exeext conftest.$ac_ext
9242
9243            CFLAGS="${_save_postgresql_cflags}"
9244            LDFLAGS="${_save_postgresql_ldflags}"
9245            LIBS="${_save_postgresql_libs}"
9246            unset _save_postgresql_cflags
9247            unset _save_postgresql_ldflags
9248            unset _save_postgresql_libs
9249
9250            if test "x$found_postgresql" = "xyes"; then
9251                POSTGRESQL_VERSION=`$PG_CONFIG --version | cut -d' ' -f2`
9252            fi
9253        fi
9254    fi
9255
9256
9257    postgresql_version_req="9.2"
9258
9259    if test "x$found_postgresql" = "xyes" -a -n "$postgresql_version_req"; then
9260
9261                        postgresql_version_major=`expr $POSTGRESQL_VERSION : '\([0-9]*\)'`
9262        postgresql_version_minor=`expr $POSTGRESQL_VERSION : '[0-9]*\.\([0-9]*\)'`
9263        postgresql_version_micro=`expr $POSTGRESQL_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
9264        if test "x$postgresql_version_minor" = "x"; then
9265            postgresql_version_minor="0"
9266        fi
9267        if test "x$postgresql_version_micro" = "x"; then
9268            postgresql_version_micro="0"
9269        fi
9270
9271        postgresql_version_number=`expr $postgresql_version_major \* 1000000 \
9272                                   \+ $postgresql_version_minor \* 1000 \
9273                                   \+ $postgresql_version_micro`
9274
9275        if test -n "$postgresql_version_req"; then
9276
9277            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PostgreSQL version is >= $postgresql_version_req" >&5
9278$as_echo_n "checking if PostgreSQL version is >= $postgresql_version_req... " >&6; }
9279
9280                                    postgresql_version_req_major=`expr $postgresql_version_req : '\([0-9]*\)'`
9281            postgresql_version_req_minor=`expr $postgresql_version_req : '[0-9]*\.\([0-9]*\)'`
9282            postgresql_version_req_micro=`expr $postgresql_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
9283            if test "x$postgresql_version_req_micro" = "x"; then
9284                postgresql_version_req_micro="0"
9285            fi
9286
9287            postgresql_version_req_number=`expr $postgresql_version_req_major \* 1000000 \
9288                                       \+ $postgresql_version_req_minor \* 1000 \
9289                                       \+ $postgresql_version_req_micro`
9290
9291            postgresql_version_check=`expr $postgresql_version_number \>\= $postgresql_version_req_number`
9292            if test "$postgresql_version_check" = "1"; then
9293                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9294$as_echo "yes" >&6; }
9295            else
9296                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9297$as_echo "no" >&6; }
9298            fi
9299
9300	fi
9301
9302    fi
9303
9304
9305
9306
9307
9308
9309	if test "x$want_postgresql" = "xyes"; then
9310		if test "x$have_db" != "xno"; then
9311			as_fn_error $? "You can configure for only one database." "$LINENO" 5
9312		fi
9313
9314		if test "x$found_postgresql" = "xyes"; then
9315			if test "$postgresql_version_check" != "1"; then
9316				as_fn_error $? "PostgreSQL version mismatch" "$LINENO" 5
9317			fi
9318
9319			have_db="PostgreSQL"
9320
9321			if test "$postgresql_version_number" -ge 8002000; then
9322				have_multirow_insert="yes"
9323			fi
9324
9325		else
9326			as_fn_error $? "PostgreSQL library not found" "$LINENO" 5
9327		fi
9328	fi
9329
9330
9331
9332# Check whether --with-sqlite3 was given.
9333if test "${with_sqlite3+set}" = set; then :
9334  withval=$with_sqlite3;
9335        if test "$withval" = "no"; then
9336            want_sqlite3="no"
9337        elif test "$withval" = "yes"; then
9338            want_sqlite3="yes"
9339            ac_sqlite3_path=""
9340        else
9341            want_sqlite3="yes"
9342            ac_sqlite3_path="$withval"
9343        fi
9344
9345else
9346  want_sqlite3="no"
9347
9348fi
9349
9350
9351    SQLITE3_CFLAGS=""
9352    SQLITE3_LDFLAGS=""
9353    SQLITE3_LIBS=""
9354    SQLITE3_VERSION=""
9355
9356    if test "x$want_sqlite3" = "xyes"; then
9357
9358        ac_sqlite3_header="sqlite3.h"
9359
9360        sqlite3_version_req=3.0.0
9361        sqlite3_version_req_shorten=`expr $sqlite3_version_req : '\([0-9]*\.[0-9]*\)'`
9362        sqlite3_version_req_major=`expr $sqlite3_version_req : '\([0-9]*\)'`
9363        sqlite3_version_req_minor=`expr $sqlite3_version_req : '[0-9]*\.\([0-9]*\)'`
9364        sqlite3_version_req_micro=`expr $sqlite3_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
9365        if test "x$sqlite3_version_req_micro" = "x" ; then
9366            sqlite3_version_req_micro="0"
9367        fi
9368
9369        sqlite3_version_req_number=`expr $sqlite3_version_req_major \* 1000000 \
9370                                   \+ $sqlite3_version_req_minor \* 1000 \
9371                                   \+ $sqlite3_version_req_micro`
9372
9373        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLite3 library >= $sqlite3_version_req" >&5
9374$as_echo_n "checking for SQLite3 library >= $sqlite3_version_req... " >&6; }
9375
9376        if test "$ac_sqlite3_path" != ""; then
9377            ac_sqlite3_cppflags="-I$ac_sqlite3_path/include"
9378            ac_sqlite3_ldflags="-L$ac_sqlite3_path/lib"
9379        else
9380            for ac_sqlite3_path_tmp in /usr /usr/local /opt ; do
9381                if test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" \
9382                    && test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header"; then
9383                    ac_sqlite3_path=$ac_sqlite3_path_tmp
9384                    ac_sqlite3_cppflags="-I$ac_sqlite3_path/include"
9385                    ac_sqlite3_ldflags="-L$ac_sqlite3_path/lib"
9386                    break;
9387                fi
9388            done
9389        fi
9390
9391        saved_CPPFLAGS="$CPPFLAGS"
9392        CPPFLAGS="$CPPFLAGS $ac_sqlite3_cppflags"
9393
9394        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9395/* end confdefs.h.  */
9396
9397            #include <sqlite3.h>
9398int
9399main ()
9400{
9401
9402#if (SQLITE_VERSION_NUMBER >= $sqlite3_version_req_number)
9403// Everything is okay
9404#else
9405#  error SQLite version is too old
9406#endif
9407
9408
9409  ;
9410  return 0;
9411}
9412
9413_ACEOF
9414if ac_fn_c_try_compile "$LINENO"; then :
9415
9416            found_sqlite3="yes"
9417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9418$as_echo "yes" >&6; }
9419
9420else
9421
9422            found_sqlite3="no"
9423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9424$as_echo "no" >&6; }
9425
9426
9427fi
9428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9429
9430        CPPFLAGS="$saved_CPPFLAGS"
9431
9432        if test "$found_sqlite3" = "yes"; then
9433
9434            SQLITE3_CPPFLAGS="$ac_sqlite3_cppflags"
9435            SQLITE3_LDFLAGS="$ac_sqlite3_ldflags"
9436            SQLITE3_LIBS="-lsqlite3"
9437
9438            ac_sqlite3_header_path="$ac_sqlite3_path/include/$ac_sqlite3_header"
9439
9440                        if test "x$ac_sqlite3_header_path" != "x"; then
9441                ac_sqlite3_version=`cat $ac_sqlite3_header_path \
9442                    | grep '#define.*SQLITE_VERSION.*\"' | sed -e 's/.* "//' \
9443                        | sed -e 's/"//'`
9444                if test $ac_sqlite3_version != ""; then
9445                    SQLITE3_VERSION=$ac_sqlite3_version
9446                else
9447                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!" >&5
9448$as_echo "$as_me: WARNING: Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!" >&2;}
9449                fi
9450            fi
9451
9452
9453
9454
9455
9456
9457$as_echo "#define HAVE_SQLITE3 1" >>confdefs.h
9458
9459        fi
9460    fi
9461
9462	if test "x$want_sqlite3" = "xyes"; then
9463		if test "x$server" = "xyes"; then
9464			as_fn_error $? "SQLite is not supported as a main Zabbix database backend." "$LINENO" 5
9465		fi
9466
9467		if test "x$have_db" != "xno"; then
9468			as_fn_error $? "You can configure for only one database." "$LINENO" 5
9469		fi
9470
9471		if test "x$found_sqlite3" = "xyes"; then
9472			have_db="SQLite v3.x"
9473
9474			saved_CPPFLAGS="$CPPFLAGS"
9475			saved_LDFLAGS="$LDFLAGS"
9476
9477			CPPFLAGS="$CPPFLAGS $SQLITE3_CPPFLAGS"
9478			LDFLAGS="$LDFLAGS $SQLITE3_LDFLAGS $SQLITE3_LIBS"
9479
9480			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function sqlite3_open_v2() in sqlite3.h" >&5
9481$as_echo_n "checking for function sqlite3_open_v2() in sqlite3.h... " >&6; }
9482			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9483/* end confdefs.h.  */
9484#include <sqlite3.h>
9485int
9486main ()
9487{
9488sqlite3 *conn = 0;
9489				sqlite3_open_v2("dbname", &conn, SQLITE_OPEN_READWRITE, 0);
9490
9491  ;
9492  return 0;
9493}
9494_ACEOF
9495if ac_fn_c_try_link "$LINENO"; then :
9496
9497$as_echo "#define HAVE_FUNCTION_SQLITE3_OPEN_V2 1" >>confdefs.h
9498
9499				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9500$as_echo "yes" >&6; }
9501else
9502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9503$as_echo "no" >&6; }
9504fi
9505rm -f core conftest.err conftest.$ac_objext \
9506    conftest$ac_exeext conftest.$ac_ext
9507
9508			CPPFLAGS="$saved_CPPFLAGS"
9509			LDFLAGS="$saved_LDFLAGS"
9510		else
9511			as_fn_error $? "SQLite3 library not found" "$LINENO" 5
9512		fi
9513	fi
9514
9515	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Zabbix server/proxy database selection" >&5
9516$as_echo_n "checking for Zabbix server/proxy database selection... " >&6; }
9517	if test "x$have_db" = "xno"; then
9518		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
9519$as_echo "error" >&6; }
9520		as_fn_error $? "No database selected for Zabbix server/proxy. Use --with-mysql or --with-oracle or --with-postgresql or --with-sqlite3." "$LINENO" 5
9521	else
9522		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9523$as_echo "ok" >&6; }
9524	fi
9525
9526	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multirow insert statements" >&5
9527$as_echo_n "checking for multirow insert statements... " >&6; }
9528	if test "x$have_multirow_insert" = "xyes"; then
9529
9530$as_echo "#define HAVE_MULTIROW_INSERT 1" >>confdefs.h
9531
9532		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9533$as_echo "yes" >&6; }
9534	else
9535		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9536$as_echo "no" >&6; }
9537	fi
9538
9539	DB_CFLAGS="$MYSQL_CFLAGS $ORACLE_CPPFLAGS $POSTGRESQL_CFLAGS $SQLITE3_CPPFLAGS"
9540	DB_LDFLAGS="$MYSQL_LDFLAGS $ORACLE_LDFLAGS $POSTGRESQL_LDFLAGS $SQLITE3_LDFLAGS"
9541	DB_LIBS="$MYSQL_LIBS $ORACLE_LIBS $POSTGRESQL_LIBS $SQLITE3_LIBS"
9542
9543
9544
9545
9546
9547	SERVER_LDFLAGS="${SERVER_LDFLAGS} ${DB_LDFLAGS}"
9548	SERVER_LIBS="${SERVER_LIBS} ${DB_LIBS}"
9549
9550	PROXY_LDFLAGS="${PROXY_LDFLAGS} ${DB_LDFLAGS}"
9551	PROXY_LIBS="${PROXY_LIBS} ${DB_LIBS}"
9552
9553
9554
9555
9556
9557
9558
9559
9560if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9561	if test -n "$ac_tool_prefix"; then
9562  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9563set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9565$as_echo_n "checking for $ac_word... " >&6; }
9566if ${ac_cv_path_PKG_CONFIG+:} false; then :
9567  $as_echo_n "(cached) " >&6
9568else
9569  case $PKG_CONFIG in
9570  [\\/]* | ?:[\\/]*)
9571  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9572  ;;
9573  *)
9574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9575for as_dir in $PATH
9576do
9577  IFS=$as_save_IFS
9578  test -z "$as_dir" && as_dir=.
9579    for ac_exec_ext in '' $ac_executable_extensions; do
9580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9581    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9583    break 2
9584  fi
9585done
9586  done
9587IFS=$as_save_IFS
9588
9589  ;;
9590esac
9591fi
9592PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9593if test -n "$PKG_CONFIG"; then
9594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9595$as_echo "$PKG_CONFIG" >&6; }
9596else
9597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9598$as_echo "no" >&6; }
9599fi
9600
9601
9602fi
9603if test -z "$ac_cv_path_PKG_CONFIG"; then
9604  ac_pt_PKG_CONFIG=$PKG_CONFIG
9605  # Extract the first word of "pkg-config", so it can be a program name with args.
9606set dummy pkg-config; ac_word=$2
9607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9608$as_echo_n "checking for $ac_word... " >&6; }
9609if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9610  $as_echo_n "(cached) " >&6
9611else
9612  case $ac_pt_PKG_CONFIG in
9613  [\\/]* | ?:[\\/]*)
9614  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9615  ;;
9616  *)
9617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9618for as_dir in $PATH
9619do
9620  IFS=$as_save_IFS
9621  test -z "$as_dir" && as_dir=.
9622    for ac_exec_ext in '' $ac_executable_extensions; do
9623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9624    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9626    break 2
9627  fi
9628done
9629  done
9630IFS=$as_save_IFS
9631
9632  ;;
9633esac
9634fi
9635ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9636if test -n "$ac_pt_PKG_CONFIG"; then
9637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9638$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9639else
9640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9641$as_echo "no" >&6; }
9642fi
9643
9644  if test "x$ac_pt_PKG_CONFIG" = x; then
9645    PKG_CONFIG=""
9646  else
9647    case $cross_compiling:$ac_tool_warned in
9648yes:)
9649{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9650$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9651ac_tool_warned=yes ;;
9652esac
9653    PKG_CONFIG=$ac_pt_PKG_CONFIG
9654  fi
9655else
9656  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9657fi
9658
9659fi
9660if test -n "$PKG_CONFIG"; then
9661	_pkg_min_version=0.9.0
9662	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9663$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9664	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9665		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9666$as_echo "yes" >&6; }
9667	else
9668		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9669$as_echo "no" >&6; }
9670		PKG_CONFIG=""
9671	fi
9672fi
9673
9674    LIBXML2_CONFIG="no"
9675
9676
9677# Check whether --with-libxml2 was given.
9678if test "${with_libxml2+set}" = set; then :
9679  withval=$with_libxml2;
9680        if test "$withval" = "no"; then
9681            want_libxml2="no"
9682        elif test "$withval" = "yes"; then
9683            want_libxml2="yes"
9684        else
9685            want_libxml2="yes"
9686        fi
9687
9688else
9689  want_libxml2="no"
9690
9691fi
9692
9693
9694    LIBXML2_CFLAGS=""
9695    LIBXML2_LDFLAGS=""
9696    LIBXML2_LIBS=""
9697    LIBXML2_VERSION=""
9698
9699
9700    if test "$want_libxml2" = "yes"; then
9701
9702
9703
9704
9705
9706
9707
9708
9709if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9710	if test -n "$ac_tool_prefix"; then
9711  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9712set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9714$as_echo_n "checking for $ac_word... " >&6; }
9715if ${ac_cv_path_PKG_CONFIG+:} false; then :
9716  $as_echo_n "(cached) " >&6
9717else
9718  case $PKG_CONFIG in
9719  [\\/]* | ?:[\\/]*)
9720  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9721  ;;
9722  *)
9723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9724for as_dir in $PATH
9725do
9726  IFS=$as_save_IFS
9727  test -z "$as_dir" && as_dir=.
9728    for ac_exec_ext in '' $ac_executable_extensions; do
9729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9730    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9732    break 2
9733  fi
9734done
9735  done
9736IFS=$as_save_IFS
9737
9738  ;;
9739esac
9740fi
9741PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9742if test -n "$PKG_CONFIG"; then
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9744$as_echo "$PKG_CONFIG" >&6; }
9745else
9746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9747$as_echo "no" >&6; }
9748fi
9749
9750
9751fi
9752if test -z "$ac_cv_path_PKG_CONFIG"; then
9753  ac_pt_PKG_CONFIG=$PKG_CONFIG
9754  # Extract the first word of "pkg-config", so it can be a program name with args.
9755set dummy pkg-config; ac_word=$2
9756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9757$as_echo_n "checking for $ac_word... " >&6; }
9758if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9759  $as_echo_n "(cached) " >&6
9760else
9761  case $ac_pt_PKG_CONFIG in
9762  [\\/]* | ?:[\\/]*)
9763  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9764  ;;
9765  *)
9766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9767for as_dir in $PATH
9768do
9769  IFS=$as_save_IFS
9770  test -z "$as_dir" && as_dir=.
9771    for ac_exec_ext in '' $ac_executable_extensions; do
9772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9773    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9775    break 2
9776  fi
9777done
9778  done
9779IFS=$as_save_IFS
9780
9781  ;;
9782esac
9783fi
9784ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9785if test -n "$ac_pt_PKG_CONFIG"; then
9786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9787$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9788else
9789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9790$as_echo "no" >&6; }
9791fi
9792
9793  if test "x$ac_pt_PKG_CONFIG" = x; then
9794    PKG_CONFIG=""
9795  else
9796    case $cross_compiling:$ac_tool_warned in
9797yes:)
9798{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9799$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9800ac_tool_warned=yes ;;
9801esac
9802    PKG_CONFIG=$ac_pt_PKG_CONFIG
9803  fi
9804else
9805  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9806fi
9807
9808fi
9809if test -n "$PKG_CONFIG"; then
9810	_pkg_min_version=0.9.0
9811	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9812$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9813	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9814		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9815$as_echo "yes" >&6; }
9816	else
9817		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9818$as_echo "no" >&6; }
9819		PKG_CONFIG=""
9820	fi
9821fi
9822
9823        if test -x "$PKG_CONFIG"; then
9824
9825            LIBXML2_CFLAGS="`$PKG_CONFIG --cflags libxml-2.0`"
9826
9827            _full_libxml2_libs="`$PKG_CONFIG --libs libxml-2.0`"
9828
9829            for i in $_full_libxml2_libs; do
9830                case $i in
9831                   -lxml2)
9832                        ;;
9833                   -L*)
9834                        LIBXML2_LDFLAGS="${LIBXML2_LDFLAGS} $i"
9835                        ;;
9836                   -R*)
9837                        LIBXML2_LDFLAGS="${LIBXML2_LDFLAGS} -Wl,$i"
9838                        ;;
9839                esac
9840            done
9841
9842            if test "x$enable_static" = "xyes"; then
9843                for i in $_full_libxml2_libs; do
9844                    case $i in
9845                        -lxml2)
9846                            ;;
9847                        -l*)
9848                            _lib_name="`echo "$i" | cut -b3-`"
9849                            as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name''_main" | $as_tr_sh`
9850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name" >&5
9851$as_echo_n "checking for main in -l$_lib_name... " >&6; }
9852if eval \${$as_ac_Lib+:} false; then :
9853  $as_echo_n "(cached) " >&6
9854else
9855  ac_check_lib_save_LIBS=$LIBS
9856LIBS="-l$_lib_name  $LIBS"
9857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9858/* end confdefs.h.  */
9859
9860
9861int
9862main ()
9863{
9864return main ();
9865  ;
9866  return 0;
9867}
9868_ACEOF
9869if ac_fn_c_try_link "$LINENO"; then :
9870  eval "$as_ac_Lib=yes"
9871else
9872  eval "$as_ac_Lib=no"
9873fi
9874rm -f core conftest.err conftest.$ac_objext \
9875    conftest$ac_exeext conftest.$ac_ext
9876LIBS=$ac_check_lib_save_LIBS
9877fi
9878eval ac_res=\$$as_ac_Lib
9879	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9880$as_echo "$ac_res" >&6; }
9881if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
9882
9883                                    LIBXML2_LIBS="$LIBXML2_LIBS $i"
9884
9885else
9886
9887                                    as_fn_error $? "Not found $_lib_name library" "$LINENO" 5
9888
9889fi
9890
9891                            ;;
9892                    esac
9893                done
9894            fi
9895
9896            _save_libxml2_libs="${LIBS}"
9897            _save_libxml2_ldflags="${LDFLAGS}"
9898            _save_libxml2_cflags="${CFLAGS}"
9899            LIBS="${LIBS} ${LIBXML2_LIBS}"
9900            LDFLAGS="${LDFLAGS} ${LIBXML2_LDFLAGS}"
9901            CFLAGS="${CFLAGS} ${LIBXML2_CFLAGS}"
9902
9903            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlReadMemory in -lxml2" >&5
9904$as_echo_n "checking for xmlReadMemory in -lxml2... " >&6; }
9905if ${ac_cv_lib_xml2_xmlReadMemory+:} false; then :
9906  $as_echo_n "(cached) " >&6
9907else
9908  ac_check_lib_save_LIBS=$LIBS
9909LIBS="-lxml2  $LIBS"
9910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9911/* end confdefs.h.  */
9912
9913/* Override any GCC internal prototype to avoid an error.
9914   Use char because int might match the return type of a GCC
9915   builtin and then its argument prototype would still apply.  */
9916#ifdef __cplusplus
9917extern "C"
9918#endif
9919char xmlReadMemory ();
9920int
9921main ()
9922{
9923return xmlReadMemory ();
9924  ;
9925  return 0;
9926}
9927_ACEOF
9928if ac_fn_c_try_link "$LINENO"; then :
9929  ac_cv_lib_xml2_xmlReadMemory=yes
9930else
9931  ac_cv_lib_xml2_xmlReadMemory=no
9932fi
9933rm -f core conftest.err conftest.$ac_objext \
9934    conftest$ac_exeext conftest.$ac_ext
9935LIBS=$ac_check_lib_save_LIBS
9936fi
9937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlReadMemory" >&5
9938$as_echo "$ac_cv_lib_xml2_xmlReadMemory" >&6; }
9939if test "x$ac_cv_lib_xml2_xmlReadMemory" = xyes; then :
9940
9941                    LIBXML2_LIBS="-lxml2 ${LIBXML2_LIBS}"
9942
9943else
9944
9945                    as_fn_error $? "Not found libxml2 library" "$LINENO" 5
9946
9947fi
9948
9949
9950            LIBS="${_save_libxml2_libs}"
9951            LDFLAGS="${_save_libxml2_ldflags}"
9952            CFLAGS="${_save_libxml2_cflags}"
9953            unset _save_libxml2_libs
9954            unset _save_libxml2_ldflags
9955            unset _save_libxml2_cflags
9956
9957            LIBXML2_VERSION=`$PKG_CONFIG --version libxml-2.0`
9958
9959
9960$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
9961
9962
9963            found_libxml2="yes"
9964        else
9965            found_libxml2="no"
9966        fi
9967    fi
9968
9969
9970
9971
9972
9973
9974	if test "x$want_libxml2" = "xyes"; then
9975		if test "x$found_libxml2" != "xyes"; then
9976			as_fn_error $? "LIBXML2 library not found" "$LINENO" 5
9977		else
9978			have_libxml2="yes"
9979		fi
9980	fi
9981	SERVER_LDFLAGS="$SERVER_LDFLAGS $LIBXML2_LDFLAGS"
9982	SERVER_LIBS="$SERVER_LIBS $LIBXML2_LIBS"
9983
9984	PROXY_LDFLAGS="$PROXY_LDFLAGS $LIBXML2_LDFLAGS"
9985	PROXY_LIBS="$PROXY_LIBS $LIBXML2_LIBS"
9986
9987
9988
9989
9990
9991# Check whether --with-unixodbc was given.
9992if test "${with_unixodbc+set}" = set; then :
9993  withval=$with_unixodbc;  if test "x$withval" = "xno"; then
9994            want_unixodbc="no"
9995        elif test "x$withval" = "xyes"; then
9996            want_unixodbc="yes"
9997        else
9998            want_unixodbc="yes"
9999            specified_unixodbc="yes"
10000            ODBC_CONFIG=$withval
10001        fi
10002
10003else
10004  want_unixodbc=no
10005fi
10006
10007
10008  if test "x$want_unixodbc" != "xno"; then
10009	# Extract the first word of "odbc_config", so it can be a program name with args.
10010set dummy odbc_config; ac_word=$2
10011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10012$as_echo_n "checking for $ac_word... " >&6; }
10013if ${ac_cv_path_ODBC_CONFIG+:} false; then :
10014  $as_echo_n "(cached) " >&6
10015else
10016  case $ODBC_CONFIG in
10017  [\\/]* | ?:[\\/]*)
10018  ac_cv_path_ODBC_CONFIG="$ODBC_CONFIG" # Let the user override the test with a path.
10019  ;;
10020  *)
10021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10022for as_dir in $PATH
10023do
10024  IFS=$as_save_IFS
10025  test -z "$as_dir" && as_dir=.
10026    for ac_exec_ext in '' $ac_executable_extensions; do
10027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10028    ac_cv_path_ODBC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10030    break 2
10031  fi
10032done
10033  done
10034IFS=$as_save_IFS
10035
10036  ;;
10037esac
10038fi
10039ODBC_CONFIG=$ac_cv_path_ODBC_CONFIG
10040if test -n "$ODBC_CONFIG"; then
10041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ODBC_CONFIG" >&5
10042$as_echo "$ODBC_CONFIG" >&6; }
10043else
10044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10045$as_echo "no" >&6; }
10046fi
10047
10048
10049
10050	unixodbc_error=""
10051
10052	UNIXODBC_LIBS="-lodbc"
10053
10054	if test -x "$ODBC_CONFIG"; then
10055		UNIXODBC_CFLAGS="-I`$ODBC_CONFIG --include-prefix`"
10056		UNIXODBC_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
10057	elif test "x$specified_unixodbc" = "xyes"; then
10058		unixodbc_error="file $ODBC_CONFIG not found or not executable"
10059	fi
10060
10061	if test "x$unixodbc_error" = "x"; then
10062		_save_unixodbc_cflags="${CFLAGS}"
10063		_save_unixodbc_ldflags="${LDFLAGS}"
10064		_save_unixodbc_libs="${LIBS}"
10065		CFLAGS="${CFLAGS} ${UNIXODBC_CFLAGS}"
10066		LDFLAGS="${LDFLAGS} ${UNIXODBC_LDFLAGS}"
10067		LIBS="${LIBS} ${UNIXODBC_LIBS}"
10068
10069		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
10070$as_echo_n "checking for SQLAllocHandle in -lodbc... " >&6; }
10071if ${ac_cv_lib_odbc_SQLAllocHandle+:} false; then :
10072  $as_echo_n "(cached) " >&6
10073else
10074  ac_check_lib_save_LIBS=$LIBS
10075LIBS="-lodbc  $LIBS"
10076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10077/* end confdefs.h.  */
10078
10079/* Override any GCC internal prototype to avoid an error.
10080   Use char because int might match the return type of a GCC
10081   builtin and then its argument prototype would still apply.  */
10082#ifdef __cplusplus
10083extern "C"
10084#endif
10085char SQLAllocHandle ();
10086int
10087main ()
10088{
10089return SQLAllocHandle ();
10090  ;
10091  return 0;
10092}
10093_ACEOF
10094if ac_fn_c_try_link "$LINENO"; then :
10095  ac_cv_lib_odbc_SQLAllocHandle=yes
10096else
10097  ac_cv_lib_odbc_SQLAllocHandle=no
10098fi
10099rm -f core conftest.err conftest.$ac_objext \
10100    conftest$ac_exeext conftest.$ac_ext
10101LIBS=$ac_check_lib_save_LIBS
10102fi
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5
10104$as_echo "$ac_cv_lib_odbc_SQLAllocHandle" >&6; }
10105if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes; then :
10106  cat >>confdefs.h <<_ACEOF
10107#define HAVE_LIBODBC 1
10108_ACEOF
10109
10110  LIBS="-lodbc $LIBS"
10111
10112else
10113  unixodbc_error="unixODBC library not found"
10114fi
10115
10116
10117		if test "x$unixodbc_error" = "x"; then
10118
10119$as_echo "#define HAVE_UNIXODBC 1" >>confdefs.h
10120
10121		fi
10122
10123		CFLAGS="${_save_unixodbc_cflags}"
10124		LDFLAGS="${_save_unixodbc_ldflags}"
10125		LIBS="${_save_unixodbc_libs}"
10126	fi
10127  fi
10128
10129
10130
10131
10132
10133
10134	if test "x$want_unixodbc" = "xyes"; then
10135		if test "x$unixodbc_error" != "x"; then
10136			as_fn_error $? "$unixodbc_error" "$LINENO" 5
10137		fi
10138		have_unixodbc="yes"
10139	fi
10140	SERVER_LDFLAGS="$SERVER_LDFLAGS $UNIXODBC_LDFLAGS"
10141	SERVER_LIBS="$SERVER_LIBS $UNIXODBC_LIBS"
10142
10143	PROXY_LDFLAGS="$PROXY_LDFLAGS $UNIXODBC_LDFLAGS"
10144	PROXY_LIBS="$PROXY_LIBS $UNIXODBC_LIBS"
10145
10146
10147
10148
10149  _libnetsnmp_config="no"
10150
10151
10152# Check whether --with-net-snmp was given.
10153if test "${with_net_snmp+set}" = set; then :
10154  withval=$with_net_snmp;  if test "$withval" = "no"; then
10155            want_netsnmp="no"
10156        elif test "$withval" = "yes"; then
10157            want_netsnmp="yes"
10158        else
10159            want_netsnmp="yes"
10160            _libnetsnmp_config=$withval
10161        fi
10162
10163else
10164  want_netsnmp=no
10165fi
10166
10167
10168  SNMP_CFLAGS=""
10169  SNMP_LDFLAGS=""
10170  SNMP_LIBS=""
10171
10172  if test "x$want_netsnmp" != "xno"; then
10173
10174        # Extract the first word of "net-snmp-config", so it can be a program name with args.
10175set dummy net-snmp-config; ac_word=$2
10176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10177$as_echo_n "checking for $ac_word... " >&6; }
10178if ${ac_cv_path__libnetsnmp_config+:} false; then :
10179  $as_echo_n "(cached) " >&6
10180else
10181  case $_libnetsnmp_config in
10182  [\\/]* | ?:[\\/]*)
10183  ac_cv_path__libnetsnmp_config="$_libnetsnmp_config" # Let the user override the test with a path.
10184  ;;
10185  *)
10186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10187for as_dir in $PATH
10188do
10189  IFS=$as_save_IFS
10190  test -z "$as_dir" && as_dir=.
10191    for ac_exec_ext in '' $ac_executable_extensions; do
10192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10193    ac_cv_path__libnetsnmp_config="$as_dir/$ac_word$ac_exec_ext"
10194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10195    break 2
10196  fi
10197done
10198  done
10199IFS=$as_save_IFS
10200
10201  ;;
10202esac
10203fi
10204_libnetsnmp_config=$ac_cv_path__libnetsnmp_config
10205if test -n "$_libnetsnmp_config"; then
10206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_libnetsnmp_config" >&5
10207$as_echo "$_libnetsnmp_config" >&6; }
10208else
10209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10210$as_echo "no" >&6; }
10211fi
10212
10213
10214
10215	if test -x "$_libnetsnmp_config"; then
10216
10217		netsnmp_version_req="5.3.0"
10218
10219		if test -n "$netsnmp_version_req"; then
10220			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of netsnmp library" >&5
10221$as_echo_n "checking version of netsnmp library... " >&6; }
10222			LIBNETSNMP_CONFIG_VERSION=`$_libnetsnmp_config --version`
10223			netsnmp_version_major=`expr $LIBNETSNMP_CONFIG_VERSION : '\([0-9]*\)'`
10224			netsnmp_version_minor=`expr $LIBNETSNMP_CONFIG_VERSION : '[0-9]*\.\([0-9]*\)'`
10225			netsnmp_version_micro=`expr $LIBNETSNMP_CONFIG_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
10226
10227			if test "x$netsnmp_version_micro" = "x"; then
10228				netsnmp_version_micro="0"
10229			fi
10230
10231			netsnmp_version_number=`expr $netsnmp_version_major \* 1000000 \
10232					\+ $netsnmp_version_minor \* 1000 \
10233					\+ $netsnmp_version_micro`
10234
10235			netsnmp_version_req_major=`expr $netsnmp_version_req : '\([0-9]*\)'`
10236			netsnmp_version_req_minor=`expr $netsnmp_version_req : '[0-9]*\.\([0-9]*\)'`
10237			netsnmp_version_req_micro=`expr $netsnmp_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
10238
10239			if test "x$netsnmp_version_req_micro" = "x"; then
10240				netsnmp_version_req_micro="0"
10241			fi
10242
10243			netsnmp_version_req_number=`expr $netsnmp_version_req_major \* 1000000 \
10244					\+ $netsnmp_version_req_minor \* 1000 \
10245					\+ $netsnmp_version_req_micro`
10246
10247			netsnmp_version_check=`expr $netsnmp_version_number \>\= $netsnmp_version_req_number`
10248
10249			if test "$netsnmp_version_check" != "1"; then
10250				as_fn_error $? "Net-SNMP version mismatch" "$LINENO" 5
10251			else
10252				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10253$as_echo "yes" >&6; }
10254			fi
10255		fi
10256
10257		_full_libnetsnmp_cflags="`$_libnetsnmp_config --cflags`"
10258		for i in $_full_libnetsnmp_cflags; do
10259			case $i in
10260				-I*)
10261					SNMP_CFLAGS="$SNMP_CFLAGS $i"
10262
10263			;;
10264			esac
10265		done
10266
10267		_full_libnetsnmp_libs="`$_libnetsnmp_config --netsnmp-libs`"
10268		for i in $_full_libnetsnmp_libs; do
10269			case $i in
10270				-L*)
10271					SNMP_LDFLAGS="${SNMP_LDFLAGS} $i"
10272			;;
10273				-R*)
10274					SNMP_LDFLAGS="${SNMP_LDFLAGS} -Wl,$i"
10275			;;
10276				-l*)
10277					SNMP_LIBS="${SNMP_LIBS} $i"
10278			;;
10279			esac
10280		done
10281
10282		if test "x$enable_static" = "xyes"; then
10283			_full_libnetsnmp_libs="`$_libnetsnmp_config --libs`"
10284			for i in $_full_libnetsnmp_libs; do
10285				case $i in
10286					-lnetsnmp)
10287				;;
10288					-l*)
10289						_lib_name="`echo "$i" | cut -b3-`"
10290						as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name''_main" | $as_tr_sh`
10291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name" >&5
10292$as_echo_n "checking for main in -l$_lib_name... " >&6; }
10293if eval \${$as_ac_Lib+:} false; then :
10294  $as_echo_n "(cached) " >&6
10295else
10296  ac_check_lib_save_LIBS=$LIBS
10297LIBS="-l$_lib_name  $LIBS"
10298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10299/* end confdefs.h.  */
10300
10301
10302int
10303main ()
10304{
10305return main ();
10306  ;
10307  return 0;
10308}
10309_ACEOF
10310if ac_fn_c_try_link "$LINENO"; then :
10311  eval "$as_ac_Lib=yes"
10312else
10313  eval "$as_ac_Lib=no"
10314fi
10315rm -f core conftest.err conftest.$ac_objext \
10316    conftest$ac_exeext conftest.$ac_ext
10317LIBS=$ac_check_lib_save_LIBS
10318fi
10319eval ac_res=\$$as_ac_Lib
10320	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10321$as_echo "$ac_res" >&6; }
10322if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
10323
10324								SNMP_LIBS="$SNMP_LIBS $i"
10325
10326else
10327
10328								as_fn_error $? "Not found $_lib_name library" "$LINENO" 5
10329
10330fi
10331
10332
10333				;;
10334				esac
10335			done
10336		fi
10337
10338		_save_netsnmp_cflags="$CFLAGS"
10339		_save_netsnmp_ldflags="$LDFLAGS"
10340		_save_netsnmp_libs="$LIBS"
10341		CFLAGS="$CFLAGS $SNMP_CFLAGS"
10342		LDFLAGS="$LDFLAGS $SNMP_LDFLAGS"
10343		LIBS="$LIBS $SNMP_LIBS"
10344
10345		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnetsnmp" >&5
10346$as_echo_n "checking for main in -lnetsnmp... " >&6; }
10347if ${ac_cv_lib_netsnmp_main+:} false; then :
10348  $as_echo_n "(cached) " >&6
10349else
10350  ac_check_lib_save_LIBS=$LIBS
10351LIBS="-lnetsnmp  $LIBS"
10352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10353/* end confdefs.h.  */
10354
10355
10356int
10357main ()
10358{
10359return main ();
10360  ;
10361  return 0;
10362}
10363_ACEOF
10364if ac_fn_c_try_link "$LINENO"; then :
10365  ac_cv_lib_netsnmp_main=yes
10366else
10367  ac_cv_lib_netsnmp_main=no
10368fi
10369rm -f core conftest.err conftest.$ac_objext \
10370    conftest$ac_exeext conftest.$ac_ext
10371LIBS=$ac_check_lib_save_LIBS
10372fi
10373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netsnmp_main" >&5
10374$as_echo "$ac_cv_lib_netsnmp_main" >&6; }
10375if test "x$ac_cv_lib_netsnmp_main" = xyes; then :
10376  cat >>confdefs.h <<_ACEOF
10377#define HAVE_LIBNETSNMP 1
10378_ACEOF
10379
10380  LIBS="-lnetsnmp $LIBS"
10381
10382else
10383  as_fn_error $? "Not found Net-SNMP library" "$LINENO" 5
10384fi
10385
10386
10387				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for localname in struct snmp_session" >&5
10388$as_echo_n "checking for localname in struct snmp_session... " >&6; }
10389		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10390/* end confdefs.h.  */
10391
10392#include <net-snmp/net-snmp-config.h>
10393#include <net-snmp/net-snmp-includes.h>
10394int
10395main ()
10396{
10397
10398struct snmp_session session;
10399session.localname = "";
10400
10401  ;
10402  return 0;
10403}
10404_ACEOF
10405if ac_fn_c_try_compile "$LINENO"; then :
10406
10407$as_echo "#define HAVE_NETSNMP_SESSION_LOCALNAME 1" >>confdefs.h
10408
10409		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10410$as_echo "yes" >&6; }
10411else
10412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10413$as_echo "no" >&6; }
10414fi
10415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10416
10417		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10418/* end confdefs.h.  */
10419
10420#include <net-snmp/net-snmp-config.h>
10421#include <net-snmp/net-snmp-includes.h>
10422int
10423main ()
10424{
10425
10426struct snmp_session session;
10427
10428session.securityPrivProto = usmDESPrivProtocol;
10429
10430  ;
10431  return 0;
10432}
10433_ACEOF
10434if ac_fn_c_try_compile "$LINENO"; then :
10435
10436$as_echo "#define HAVE_NETSNMP_SESSION_DES 1" >>confdefs.h
10437
10438		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10439$as_echo "yes" >&6; }
10440else
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
10443fi
10444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10445
10446		CFLAGS="$_save_netsnmp_cflags"
10447		LDFLAGS="$_save_netsnmp_ldflags"
10448		LIBS="$_save_netsnmp_libs"
10449		unset _save_netsnmp_cflags
10450		unset _save_netsnmp_ldflags
10451		unset _save_netsnmp_libs
10452
10453
10454$as_echo "#define HAVE_NETSNMP 1" >>confdefs.h
10455
10456
10457		found_netsnmp="yes"
10458	else
10459		found_netsnmp="no"
10460	fi
10461  fi
10462
10463
10464
10465
10466
10467
10468	if test "x$want_netsnmp" = "xyes"; then
10469		if test "x$found_netsnmp" != "xyes"; then
10470			as_fn_error $? "Invalid Net-SNMP directory - unable to find net-snmp-config" "$LINENO" 5
10471		else
10472			have_snmp="yes"
10473		fi
10474	fi
10475	SERVER_LDFLAGS="$SERVER_LDFLAGS $SNMP_LDFLAGS"
10476	SERVER_LIBS="$SERVER_LIBS $SNMP_LIBS"
10477
10478	PROXY_LDFLAGS="$PROXY_LDFLAGS $SNMP_LDFLAGS"
10479	PROXY_LIBS="$PROXY_LIBS $SNMP_LIBS"
10480
10481
10482
10483
10484
10485# Check whether --with-ssh2 was given.
10486if test "${with_ssh2+set}" = set; then :
10487  withval=$with_ssh2;
10488	if test "$withval" = "no"; then
10489	    want_ssh2="no"
10490	    _libssh2_dir="no"
10491	elif test "$withval" = "yes"; then
10492	    want_ssh2="yes"
10493	    _libssh2_dir="no"
10494	else
10495	    want_ssh2="yes"
10496	    _libssh2_dir=$withval
10497	fi
10498	accept_ssh2_version="no"
10499
10500else
10501  want_ssh2=no
10502
10503fi
10504
10505
10506  if test "x$want_ssh2" = "xyes"; then
10507     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSH2 support" >&5
10508$as_echo_n "checking for SSH2 support... " >&6; }
10509     if test "x$_libssh2_dir" = "xno"; then
10510       if test -f /usr/include/libssh2.h; then
10511         SSH2_CFLAGS=-I/usr/include
10512         SSH2_LDFLAGS=-L/usr/lib
10513         SSH2_LIBS="-lssh2"
10514         found_ssh2="yes"
10515
10516	# Zabbix minimal major supported version of libssh2:
10517	minimal_libssh2_major_version=1
10518
10519	# get the major version
10520	found_ssh2_version_major=`cat /usr/include/libssh2.h | $EGREP \#define.*LIBSSH2_VERSION_MAJOR | $AWK '{print $3;}'`
10521
10522	accept_ssh2_version="no"
10523
10524	if test $found_ssh2_version_major -ge $minimal_libssh2_major_version; then
10525		accept_ssh2_version="yes"
10526	fi;
10527
10528       elif test -f /usr/local/include/libssh2.h; then
10529         SSH2_CFLAGS=-I/usr/local/include
10530         SSH2_LDFLAGS=-L/usr/local/lib
10531         SSH2_LIBS="-lssh2"
10532         found_ssh2="yes"
10533
10534	# Zabbix minimal major supported version of libssh2:
10535	minimal_libssh2_major_version=1
10536
10537	# get the major version
10538	found_ssh2_version_major=`cat /usr/local/include/libssh2.h | $EGREP \#define.*LIBSSH2_VERSION_MAJOR | $AWK '{print $3;}'`
10539
10540	accept_ssh2_version="no"
10541
10542	if test $found_ssh2_version_major -ge $minimal_libssh2_major_version; then
10543		accept_ssh2_version="yes"
10544	fi;
10545
10546       else #libraries are not found in default directories
10547         found_ssh2="no"
10548         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10549$as_echo "no" >&6; }
10550       fi # test -f /usr/include/libssh2.h; then
10551     else # test "x$_libssh2_dir" = "xno"; then
10552       if test -f $_libssh2_dir/include/libssh2.h; then
10553	 SSH2_CFLAGS=-I$_libssh2_dir/include
10554         SSH2_LDFLAGS=-L$_libssh2_dir/lib
10555         SSH2_LIBS="-lssh2"
10556         found_ssh2="yes"
10557
10558	# Zabbix minimal major supported version of libssh2:
10559	minimal_libssh2_major_version=1
10560
10561	# get the major version
10562	found_ssh2_version_major=`cat $_libssh2_dir/include/libssh2.h | $EGREP \#define.*LIBSSH2_VERSION_MAJOR | $AWK '{print $3;}'`
10563
10564	accept_ssh2_version="no"
10565
10566	if test $found_ssh2_version_major -ge $minimal_libssh2_major_version; then
10567		accept_ssh2_version="yes"
10568	fi;
10569
10570       else #if test -f $_libssh2_dir/include/libssh2.h; then
10571         found_ssh2="no"
10572         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10573$as_echo "no" >&6; }
10574       fi #test -f $_libssh2_dir/include/libssh2.h; then
10575     fi #if test "x$_libssh2_dir" = "xno"; then
10576  fi # if test "x$want_ssh2" != "xno"; then
10577
10578  if test "x$found_ssh2" = "xyes"; then
10579    am_save_cflags="$CFLAGS"
10580    am_save_ldflags="$LDFLAGS"
10581    am_save_libs="$LIBS"
10582
10583    CFLAGS="$CFLAGS $SSH2_CFLAGS"
10584    LDFLAGS="$LDFLAGS $SSH2_LDFLAGS"
10585    LIBS="$LIBS $SSH2_LIBS"
10586
10587    found_ssh2="no"
10588
10589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10590/* end confdefs.h.  */
10591
10592#include <libssh2.h>
10593
10594int
10595main ()
10596{
10597
10598	LIBSSH2_SESSION	*session;
10599	session = libssh2_session_init();
10600
10601  ;
10602  return 0;
10603}
10604_ACEOF
10605if ac_fn_c_try_link "$LINENO"; then :
10606  found_ssh2="yes"
10607fi
10608rm -f core conftest.err conftest.$ac_objext \
10609    conftest$ac_exeext conftest.$ac_ext
10610
10611
10612    CFLAGS="$am_save_cflags"
10613    LDFLAGS="$am_save_ldflags"
10614    LIBS="$am_save_libs"
10615
10616    if test "x$found_ssh2" = "xyes"; then
10617
10618$as_echo "#define HAVE_SSH2 1" >>confdefs.h
10619
10620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10621$as_echo "yes" >&6; }
10622    else
10623      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10624$as_echo "no" >&6; }
10625      SSH2_CFLAGS=""
10626      SSH2_LDFLAGS=""
10627      SSH2_LIBS=""
10628    fi
10629  fi
10630
10631
10632
10633
10634
10635
10636
10637
10638# Check whether --with-ssh was given.
10639if test "${with_ssh+set}" = set; then :
10640  withval=$with_ssh;
10641	if test "$withval" = "no"; then
10642	    want_ssh="no"
10643	    _libssh_dir="no"
10644	elif test "$withval" = "yes"; then
10645	    want_ssh="yes"
10646	    _libssh_dir="no"
10647	else
10648	    want_ssh="yes"
10649	    _libssh_dir=$withval
10650	fi
10651	accept_ssh_version="no"
10652
10653else
10654  want_ssh=no
10655
10656fi
10657
10658
10659  if test "x$want_ssh" = "xyes"; then
10660     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSH support" >&5
10661$as_echo_n "checking for SSH support... " >&6; }
10662     if test "x$_libssh_dir" = "xno"; then
10663       if test -f /usr/include/libssh/libssh_version.h; then
10664         SSH_CFLAGS=-I/usr/include
10665         SSH_LDFLAGS=-L/usr/lib
10666         SSH_LIBS="-lssh"
10667         found_ssh="yes"
10668
10669	# Zabbix minimal major supported version of libssh:
10670	minimal_libssh_major_version=0
10671	minimal_libssh_minor_version=6
10672
10673	# get the major version
10674	found_ssh_version_major=`cat /usr/include/libssh/libssh_version.h | $EGREP \#define.*'LIBSSH_VERSION_MAJOR ' | $AWK '{print $3;}'`
10675	found_ssh_version_minor=`cat /usr/include/libssh/libssh_version.h | $EGREP \#define.*'LIBSSH_VERSION_MINOR ' | $AWK '{print $3;}'`
10676
10677	if test $((found_ssh_version_major)) -gt $((minimal_libssh_major_version)); then
10678		accept_ssh_version="yes"
10679	elif test $((found_ssh_version_major)) -lt $((minimal_libssh_major_version)); then
10680		accept_ssh_version="no"
10681	elif test $((found_ssh_version_minor)) -ge $((minimal_libssh_minor_version)); then
10682		accept_ssh_version="yes"
10683	else
10684		accept_ssh_version="no"
10685	fi;
10686
10687       elif test -f /usr/include/libssh/libssh.h; then
10688         SSH_CFLAGS=-I/usr/include
10689         SSH_LDFLAGS=-L/usr/lib
10690         SSH_LIBS="-lssh"
10691         found_ssh="yes"
10692
10693	# Zabbix minimal major supported version of libssh:
10694	minimal_libssh_major_version=0
10695	minimal_libssh_minor_version=6
10696
10697	# get the major version
10698	found_ssh_version_major=`cat /usr/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MAJOR ' | $AWK '{print $3;}'`
10699	found_ssh_version_minor=`cat /usr/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MINOR ' | $AWK '{print $3;}'`
10700
10701	if test $((found_ssh_version_major)) -gt $((minimal_libssh_major_version)); then
10702		accept_ssh_version="yes"
10703	elif test $((found_ssh_version_major)) -lt $((minimal_libssh_major_version)); then
10704		accept_ssh_version="no"
10705	elif test $((found_ssh_version_minor)) -ge $((minimal_libssh_minor_version)); then
10706		accept_ssh_version="yes"
10707	else
10708		accept_ssh_version="no"
10709	fi;
10710
10711       elif test -f /usr/local/include/libssh/libssh.h; then
10712         SSH_CFLAGS=-I/usr/local/include
10713         SSH_LDFLAGS=-L/usr/local/lib
10714         SSH_LIBS="-lssh"
10715         found_ssh="yes"
10716
10717	# Zabbix minimal major supported version of libssh:
10718	minimal_libssh_major_version=0
10719	minimal_libssh_minor_version=6
10720
10721	# get the major version
10722	found_ssh_version_major=`cat /usr/local/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MAJOR ' | $AWK '{print $3;}'`
10723	found_ssh_version_minor=`cat /usr/local/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MINOR ' | $AWK '{print $3;}'`
10724
10725	if test $((found_ssh_version_major)) -gt $((minimal_libssh_major_version)); then
10726		accept_ssh_version="yes"
10727	elif test $((found_ssh_version_major)) -lt $((minimal_libssh_major_version)); then
10728		accept_ssh_version="no"
10729	elif test $((found_ssh_version_minor)) -ge $((minimal_libssh_minor_version)); then
10730		accept_ssh_version="yes"
10731	else
10732		accept_ssh_version="no"
10733	fi;
10734
10735       else #libraries are not found in default directories
10736         found_ssh="no"
10737         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10738$as_echo "no" >&6; }
10739       fi # test -f /usr/include/libssh/libssh.h; then
10740     else # test "x$_libssh_dir" = "xno"; then
10741       if test -f $_libssh_dir/include/libssh/libssh.h; then
10742	 SSH_CFLAGS=-I$_libssh_dir/include
10743         SSH_LDFLAGS=-L$_libssh_dir/lib
10744         SSH_LIBS="-lssh"
10745         found_ssh="yes"
10746
10747	# Zabbix minimal major supported version of libssh:
10748	minimal_libssh_major_version=0
10749	minimal_libssh_minor_version=6
10750
10751	# get the major version
10752	found_ssh_version_major=`cat $_libssh_dir/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MAJOR ' | $AWK '{print $3;}'`
10753	found_ssh_version_minor=`cat $_libssh_dir/include/libssh/libssh.h | $EGREP \#define.*'LIBSSH_VERSION_MINOR ' | $AWK '{print $3;}'`
10754
10755	if test $((found_ssh_version_major)) -gt $((minimal_libssh_major_version)); then
10756		accept_ssh_version="yes"
10757	elif test $((found_ssh_version_major)) -lt $((minimal_libssh_major_version)); then
10758		accept_ssh_version="no"
10759	elif test $((found_ssh_version_minor)) -ge $((minimal_libssh_minor_version)); then
10760		accept_ssh_version="yes"
10761	else
10762		accept_ssh_version="no"
10763	fi;
10764
10765       else #if test -f $_libssh_dir/include/libssh/libssh.h; then
10766         found_ssh="no"
10767         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10768$as_echo "no" >&6; }
10769       fi #test -f $_libssh_dir/include/libssh/libssh.h; then
10770     fi #if test "x$_libssh_dir" = "xno"; then
10771  fi # if test "x$want_ssh" != "xno"; then
10772
10773  if test "x$found_ssh" = "xyes"; then
10774    am_save_cflags="$CFLAGS"
10775    am_save_ldflags="$LDFLAGS"
10776    am_save_libs="$LIBS"
10777
10778    CFLAGS="$CFLAGS $SSH_CFLAGS"
10779    LDFLAGS="$LDFLAGS $SSH_LDFLAGS"
10780    LIBS="$LIBS $SSH_LIBS"
10781
10782    found_ssh="no"
10783
10784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10785/* end confdefs.h.  */
10786
10787#include <libssh/libssh.h>
10788
10789int
10790main ()
10791{
10792
10793	ssh_session my_ssh_session;
10794	my_ssh_session = ssh_new();
10795
10796  ;
10797  return 0;
10798}
10799_ACEOF
10800if ac_fn_c_try_link "$LINENO"; then :
10801  found_ssh="yes"
10802fi
10803rm -f core conftest.err conftest.$ac_objext \
10804    conftest$ac_exeext conftest.$ac_ext
10805
10806
10807    CFLAGS="$am_save_cflags"
10808    LDFLAGS="$am_save_ldflags"
10809    LIBS="$am_save_libs"
10810
10811    if test "x$found_ssh" = "xyes"; then
10812
10813$as_echo "#define HAVE_SSH 1" >>confdefs.h
10814
10815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10816$as_echo "yes" >&6; }
10817    else
10818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10819$as_echo "no" >&6; }
10820      SSH_CFLAGS=""
10821      SSH_LDFLAGS=""
10822      SSH_LIBS=""
10823    fi
10824  fi
10825
10826
10827
10828
10829
10830
10831	if test "x$want_ssh2" = "xyes"; then
10832		if test "x$want_ssh" != "xno"; then
10833			as_fn_error $? "You can configure for only one SSH library (--with-ssh or --with-ssh2)." "$LINENO" 5
10834		fi
10835
10836		if test "x$found_ssh2" != "xyes"; then
10837			as_fn_error $? "SSH2 library not found" "$LINENO" 5
10838		elif test "x$accept_ssh2_version" != "xyes"; then
10839			as_fn_error $? "SSH2 library version requirement not met (>= 1.0.0)" "$LINENO" 5
10840		else
10841			have_ssh="yes (libssh2)"
10842		fi
10843	fi
10844	SERVER_LDFLAGS="$SERVER_LDFLAGS $SSH2_LDFLAGS"
10845	SERVER_LIBS="$SERVER_LIBS $SSH2_LIBS"
10846
10847	PROXY_LDFLAGS="$PROXY_LDFLAGS $SSH2_LDFLAGS"
10848	PROXY_LIBS="$PROXY_LIBS $SSH2_LIBS"
10849
10850
10851
10852		if test "x$want_ssh" = "xyes"; then
10853		if test "x$found_ssh" != "xyes"; then
10854			as_fn_error $? "SSH library not found" "$LINENO" 5
10855		elif test "x$accept_ssh_version" != "xyes"; then
10856			as_fn_error $? "SSH library version requirement not met (>= 0.6.0)" "$LINENO" 5
10857		else
10858			have_ssh="yes (libssh)"
10859		fi
10860	fi
10861	SERVER_LDFLAGS="$SERVER_LDFLAGS $SSH_LDFLAGS"
10862	SERVER_LIBS="$SERVER_LIBS $SSH_LIBS"
10863
10864	PROXY_LDFLAGS="$PROXY_LDFLAGS $SSH_LDFLAGS"
10865	PROXY_LIBS="$PROXY_LIBS $SSH_LIBS"
10866
10867
10868
10869	found_openipmi="no"
10870
10871
10872# Check whether --with-openipmi was given.
10873if test "${with_openipmi+set}" = set; then :
10874  withval=$with_openipmi;  if test "$withval" = "no"; then
10875            want_openipmi="no"
10876            _libopenipmi_with="no"
10877        elif test "$withval" = "yes"; then
10878            want_openipmi="yes"
10879            _libopenipmi_with="yes"
10880        else
10881            want_openipmi="yes"
10882            _libopenipmi_with=$withval
10883        fi
10884
10885else
10886  _libopenipmi_with=no
10887fi
10888
10889
10890  if test "x$_libopenipmi_with" != x"no"; then
10891       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENIPMI support" >&5
10892$as_echo_n "checking for OPENIPMI support... " >&6; }
10893
10894       if test "$_libopenipmi_with" = "yes"; then
10895               if test -f /usr/local/include/OpenIPMI/ipmiif.h; then
10896                       OPENIPMI_INCDIR=/usr/local/include
10897                       OPENIPMI_LIBDIR=/usr/local/lib
10898		       found_openipmi="yes"
10899               elif test -f /usr/include/OpenIPMI/ipmiif.h; then
10900                       OPENIPMI_INCDIR=/usr/include
10901                       OPENIPMI_LIBDIR=/usr/lib
10902		       found_openipmi="yes"
10903               else
10904                       found_openipmi="no"
10905                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10906$as_echo "no" >&6; }
10907               fi
10908       else
10909               if test -f $_libopenipmi_with/include/OpenIPMI/ipmiif.h; then
10910                       OPENIPMI_INCDIR=$_libopenipmi_with/include
10911                       OPENIPMI_LIBDIR=$_libopenipmi_with/lib
10912		       found_openipmi="yes"
10913               else
10914                       found_openipmi="no"
10915                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10916$as_echo "no" >&6; }
10917               fi
10918       fi
10919
10920       if test "x$found_openipmi" != "xno" ; then
10921               OPENIPMI_CFLAGS="-I$OPENIPMI_INCDIR"
10922               OPENIPMI_LDFLAGS="-L$OPENIPMI_LIBDIR"
10923               OPENIPMI_LIBS="-lOpenIPMI -lOpenIPMIposix"
10924
10925               found_openipmi="yes"
10926
10927$as_echo "#define HAVE_OPENIPMI 1" >>confdefs.h
10928
10929
10930$as_echo "#define OPENIPMI_DEPRECATED 1" >>confdefs.h
10931
10932               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10933$as_echo "yes" >&6; }
10934	fi
10935  fi
10936
10937
10938
10939
10940
10941  unset _libopenipmi_with
10942
10943	if test "x$want_openipmi" = "xyes"; then
10944		if test "x$found_openipmi" != "xyes"; then
10945			as_fn_error $? "Invalid OPENIPMI directory - unable to find ipmiif.h" "$LINENO" 5
10946		else
10947			have_ipmi="yes"
10948		fi
10949	fi
10950
10951	SERVER_LDFLAGS="$SERVER_LDFLAGS $OPENIPMI_LDFLAGS"
10952	SERVER_LIBS="$SERVER_LIBS $OPENIPMI_LIBS"
10953
10954	PROXY_LDFLAGS="$PROXY_LDFLAGS $OPENIPMI_LDFLAGS"
10955	PROXY_LIBS="$PROXY_LIBS $OPENIPMI_LIBS"
10956
10957
10958
10959
10960
10961# Check whether --with-zlib was given.
10962if test "${with_zlib+set}" = set; then :
10963  withval=$with_zlib;
10964			test "x$withval" = "xyes" && withval=/usr
10965			ZLIB_CFLAGS="-I$withval/include"
10966			ZLIB_LDFLAGS="-L$withval/lib"
10967			_zlib_dir_set="yes"
10968
10969
10970fi
10971
10972
10973
10974# Check whether --with-zlib-include was given.
10975if test "${with_zlib_include+set}" = set; then :
10976  withval=$with_zlib_include;
10977			ZLIB_CFLAGS="-I$withval"
10978			_zlib_dir_set="yes"
10979
10980
10981fi
10982
10983
10984
10985# Check whether --with-zlib-lib was given.
10986if test "${with_zlib_lib+set}" = set; then :
10987  withval=$with_zlib_lib;
10988			ZLIB_LDFLAGS="-L$withval"
10989			_zlib_dir_set="yes"
10990
10991
10992fi
10993
10994
10995	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib support" >&5
10996$as_echo_n "checking for zlib support... " >&6; }
10997
10998	ZLIB_LIBS="-lz"
10999
11000	if test -n "$_zlib_dir_set" -o -f /usr/include/zlib.h; then
11001		found_zlib="yes"
11002	elif test -f /usr/local/include/zlib.h; then
11003		ZLIB_CFLAGS="-I/usr/local/include"
11004		ZLIB_LDFLAGS="-L/usr/local/lib"
11005		found_zlib="yes"
11006	elif test -f /usr/pkg/include/zlib.h; then
11007		ZLIB_CFLAGS="-I/usr/pkg/include"
11008		ZLIB_LDFLAGS="-L/usr/pkg/lib"
11009		found_zlib="yes"
11010	else
11011		found_zlib="no"
11012		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11013$as_echo "no" >&6; }
11014	fi
11015
11016	if test "x$found_zlib" = "xyes"; then
11017		am_save_CFLAGS="$CFLAGS"
11018		am_save_LDFLAGS="$LDFLAGS"
11019		am_save_LIBS="$LIBS"
11020
11021		CFLAGS="$CFLAGS $ZLIB_CFLAGS"
11022		LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
11023		LIBS="$LIBS $ZLIB_LIBS"
11024
11025
11026found_zlib=no
11027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11028/* end confdefs.h.  */
11029
11030#include <zlib.h>
11031
11032int
11033main ()
11034{
11035
11036	z_stream	defstream;
11037	deflateInit(&defstream, Z_BEST_COMPRESSION);
11038
11039  ;
11040  return 0;
11041}
11042_ACEOF
11043if ac_fn_c_try_link "$LINENO"; then :
11044  found_zlib="yes"
11045fi
11046rm -f core conftest.err conftest.$ac_objext \
11047    conftest$ac_exeext conftest.$ac_ext
11048
11049
11050		CFLAGS="$am_save_CFLAGS"
11051		LDFLAGS="$am_save_LDFLAGS"
11052		LIBS="$am_save_LIBS"
11053	fi
11054
11055	if test "x$found_zlib" = "xyes"; then
11056
11057$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
11058
11059		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11060$as_echo "yes" >&6; }
11061	else
11062		ZLIB_CFLAGS=""
11063		ZLIB_LDFLAGS=""
11064		ZLIB_LIBS=""
11065	fi
11066
11067
11068
11069
11070
11071	if test "x$found_zlib" != "xyes"; then
11072		as_fn_error $? "Unable to use zlib (zlib check failed)" "$LINENO" 5
11073	fi
11074
11075
11076
11077
11078
11079# Check whether --with-libpthread was given.
11080if test "${with_libpthread+set}" = set; then :
11081  withval=$with_libpthread;
11082			test "x$withval" = "xyes" && withval=/usr
11083			LIBPTHREAD_CFLAGS="-I$withval/include"
11084			LIBPTHREAD_LDFLAGS="-L$withval/lib"
11085			_libpthread_dir_set="yes"
11086
11087
11088fi
11089
11090
11091
11092# Check whether --with-libpthread-include was given.
11093if test "${with_libpthread_include+set}" = set; then :
11094  withval=$with_libpthread_include;
11095			LIBPTHREAD_CFLAGS="-I$withval"
11096			_libpthread_dir_set="yes"
11097
11098
11099fi
11100
11101
11102
11103# Check whether --with-libpthread-lib was given.
11104if test "${with_libpthread_lib+set}" = set; then :
11105  withval=$with_libpthread_lib;
11106			LIBPTHREAD_LDFLAGS="-L$withval"
11107			_libpthread_dir_set="yes"
11108
11109
11110fi
11111
11112
11113	ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11114if test "x$ac_cv_header_pthread_h" = xyes; then :
11115  found_libpthread=yes
11116fi
11117
11118
11119	LIBPTHREAD_LIBS="-lpthread"
11120	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for process shared libpthread support" >&5
11121$as_echo_n "checking for process shared libpthread support... " >&6; }
11122
11123	if test -n "$_libpthread_dir_set" -o "x$found_libpthread" = xyes; then
11124		found_libpthread="yes"
11125	elif test -f /usr/local/include/pthread.h; then
11126		LIBPTHREAD_CFLAGS="-I/usr/local/include"
11127		LIBPTHREAD_LDFLAGS="-L/usr/local/lib"
11128		found_libpthread="yes"
11129	elif test -f /usr/pkg/include/pthread.h; then
11130		LIBPTHREAD_CFLAGS="-I/usr/pkg/include"
11131		LIBPTHREAD_LDFLAGS="-L/usr/pkg/lib"
11132		LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS -Wl,-R/usr/pkg/lib"
11133		found_libpthread="yes"
11134	elif test -f /opt/csw/include/pthread.h; then
11135		LIBPTHREAD_CFLAGS="-I/opt/csw/include"
11136		LIBPTHREAD_LDFLAGS="-L/opt/csw/lib"
11137		if $(echo "$CFLAGS"|grep -q -- "-m64") ; then
11138			LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS/64 -Wl,-R/opt/csw/lib/64"
11139		else
11140			LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS -Wl,-R/opt/csw/lib"
11141		fi
11142		found_libpthread="yes"
11143	else
11144		found_libpthread="no"
11145		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11146$as_echo "no" >&6; }
11147	fi
11148
11149	if test "x$found_libpthread" = "xyes"; then
11150		am_save_CFLAGS="$CFLAGS"
11151		am_save_LDFLAGS="$LDFLAGS"
11152		am_save_LIBS="$LIBS"
11153
11154		CFLAGS="$CFLAGS $LIBPTHREAD_CFLAGS"
11155		LDFLAGS="$LDFLAGS $LIBPTHREAD_LDFLAGS"
11156		LIBS="$LIBS $LIBPTHREAD_LIBS"
11157
11158		found_libpthread="no"
11159		found_libpthread_process_shared="no"
11160
11161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11162/* end confdefs.h.  */
11163
11164#include <pthread.h>
11165
11166int
11167main ()
11168{
11169
11170	pthread_mutexattr_t	mta;
11171	pthread_mutex_t		mutex;
11172
11173	pthread_mutexattr_init(&mta);
11174	pthread_mutex_init(&mutex, &mta);
11175
11176  ;
11177  return 0;
11178}
11179_ACEOF
11180if ac_fn_c_try_link "$LINENO"; then :
11181  found_libpthread="yes"
11182fi
11183rm -f core conftest.err conftest.$ac_objext \
11184    conftest$ac_exeext conftest.$ac_ext
11185
11186
11187	if test "$cross_compiling" = yes; then :
11188  found_libpthread_process_shared="no"
11189else
11190  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11191/* end confdefs.h.  */
11192
11193		#include <pthread.h>
11194
11195		int	main()
11196		{
11197			pthread_mutexattr_t	mta;
11198			pthread_rwlockattr_t	rwa;
11199			pthread_mutex_t		mutex;
11200			pthread_rwlock_t	rwlock;
11201
11202			if (0 != pthread_mutexattr_init(&mta))
11203				return 1;
11204
11205			if (0 != pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_SHARED))
11206				return 2;
11207
11208			if (0 != pthread_mutex_init(&mutex, &mta))
11209				return 3;
11210
11211			if (0 != pthread_rwlockattr_init(&rwa))
11212				return 4;
11213
11214			if (0 != pthread_rwlockattr_setpshared(&rwa, PTHREAD_PROCESS_SHARED))
11215				return 5;
11216
11217			if (0 != pthread_rwlock_init(&rwlock, &rwa))
11218				return 6;
11219
11220			return 0;
11221		}
11222
11223
11224
11225_ACEOF
11226if ac_fn_c_try_run "$LINENO"; then :
11227  found_libpthread_process_shared="yes"
11228else
11229  found_libpthread_process_shared="no"
11230fi
11231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11232  conftest.$ac_objext conftest.beam conftest.$ac_ext
11233fi
11234
11235
11236
11237		CFLAGS="$am_save_CFLAGS"
11238		LDFLAGS="$am_save_LDFLAGS"
11239		LIBS="$am_save_LIBS"
11240	fi
11241
11242	if test "x$found_libpthread" = "xyes"; then
11243		if test "x$found_libpthread_process_shared" = "xyes"; then
11244
11245$as_echo "#define HAVE_PTHREAD_PROCESS_SHARED 1" >>confdefs.h
11246
11247		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11248$as_echo "yes" >&6; }
11249		else
11250		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11251$as_echo "no" >&6; }
11252		fi
11253	else
11254		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11255$as_echo "no" >&6; }
11256		LIBPTHREAD_CFLAGS=""
11257		LIBPTHREAD_LDFLAGS=""
11258		LIBPTHREAD_LIBS=""
11259	fi
11260
11261
11262
11263
11264
11265	if test "x$found_libpthread" != "xyes"; then
11266		as_fn_error $? "Unable to use libpthread (libpthread check failed)" "$LINENO" 5
11267	fi
11268fi
11269
11270SERVER_LDFLAGS="$SERVER_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11271SERVER_LIBS="$SERVER_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11272
11273PROXY_LDFLAGS="$PROXY_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11274PROXY_LIBS="$PROXY_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11275
11276AGENT_LDFLAGS="$AGENT_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11277AGENT_LIBS="$AGENT_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11278
11279AGENT2_LDFLAGS="$AGENT2_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11280AGENT2_LIBS="$AGENT2_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11281
11282ZBXGET_LDFLAGS="$ZBXGET_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11283ZBXGET_LIBS="$ZBXGET_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11284
11285SENDER_LDFLAGS="$SENDER_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11286SENDER_LIBS="$SENDER_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11287
11288ZBXJS_LDFLAGS="$ZBXJS_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
11289ZBXJS_LIBS="$ZBXJS_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
11290
11291 if test "x$have_ipmi" = "xyes"; then
11292  HAVE_IPMI_TRUE=
11293  HAVE_IPMI_FALSE='#'
11294else
11295  HAVE_IPMI_TRUE='#'
11296  HAVE_IPMI_FALSE=
11297fi
11298
11299 if test "x$have_libxml2" = "xyes"; then
11300  HAVE_LIBXML2_TRUE=
11301  HAVE_LIBXML2_FALSE='#'
11302else
11303  HAVE_LIBXML2_TRUE='#'
11304  HAVE_LIBXML2_FALSE=
11305fi
11306
11307
11308have_ipcservice="no"
11309if test "x$have_ipmi" = "xyes"; then
11310	have_ipcservice="yes"
11311fi
11312
11313if test "x$server" = "xyes"; then
11314	have_ipcservice="yes"
11315fi
11316
11317if test "x$proxy" = "xyes"; then
11318	have_ipcservice="yes"
11319fi
11320
11321 if test "x$have_ipmi" = "xyes"; then
11322  PROXY_IPCSERVICE_TRUE=
11323  PROXY_IPCSERVICE_FALSE='#'
11324else
11325  PROXY_IPCSERVICE_TRUE='#'
11326  PROXY_IPCSERVICE_FALSE=
11327fi
11328
11329
11330if test "x$have_ipcservice" = "xyes"; then
11331
11332$as_echo "#define HAVE_IPCSERVICE 1" >>confdefs.h
11333
11334
11335
11336
11337# Check whether --with-libevent was given.
11338if test "${with_libevent+set}" = set; then :
11339  withval=$with_libevent;
11340			test "x$withval" = "xyes" && withval=/usr
11341			LIBEVENT_CFLAGS="-I$withval/include"
11342			LIBEVENT_LDFLAGS="-L$withval/lib"
11343			_libevent_dir_set="yes"
11344
11345
11346fi
11347
11348
11349
11350# Check whether --with-libevent-include was given.
11351if test "${with_libevent_include+set}" = set; then :
11352  withval=$with_libevent_include;
11353			LIBEVENT_CFLAGS="-I$withval"
11354			_libevent_dir_set="yes"
11355
11356
11357fi
11358
11359
11360
11361# Check whether --with-libevent-lib was given.
11362if test "${with_libevent_lib+set}" = set; then :
11363  withval=$with_libevent_lib;
11364			LIBEVENT_LDFLAGS="-L$withval"
11365			_libevent_dir_set="yes"
11366
11367
11368fi
11369
11370
11371	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent support" >&5
11372$as_echo_n "checking for libevent support... " >&6; }
11373
11374	LIBEVENT_LIBS="-levent"
11375
11376	if test -n "$_libevent_dir_set" -o -f /usr/include/event.h; then
11377		found_libevent="yes"
11378	elif test -f /usr/local/include/event.h; then
11379		LIBEVENT_CFLAGS="-I/usr/local/include"
11380		LIBEVENT_LDFLAGS="-L/usr/local/lib"
11381		found_libevent="yes"
11382	else
11383		found_libevent="no"
11384		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11385$as_echo "no" >&6; }
11386	fi
11387
11388	if test "x$found_libevent" = "xyes"; then
11389		am_save_CFLAGS="$CFLAGS"
11390		am_save_LDFLAGS="$LDFLAGS"
11391		am_save_LIBS="$LIBS"
11392
11393		CFLAGS="$CFLAGS $LIBEVENT_CFLAGS"
11394		LDFLAGS="$LDFLAGS $LIBEVENT_LDFLAGS"
11395		LIBS="$LIBS $LIBEVENT_LIBS"
11396
11397		found_libevent="no"
11398
11399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11400/* end confdefs.h.  */
11401
11402#include <stdlib.h>
11403#include <event.h>
11404
11405int
11406main ()
11407{
11408
11409	event_init();
11410
11411  ;
11412  return 0;
11413}
11414_ACEOF
11415if ac_fn_c_try_link "$LINENO"; then :
11416  found_libevent="yes"
11417fi
11418rm -f core conftest.err conftest.$ac_objext \
11419    conftest$ac_exeext conftest.$ac_ext
11420
11421
11422		CFLAGS="$am_save_CFLAGS"
11423		LDFLAGS="$am_save_LDFLAGS"
11424		LIBS="$am_save_LIBS"
11425	fi
11426
11427	if test "x$found_libevent" = "xyes"; then
11428
11429$as_echo "#define HAVE_LIBEVENT 1" >>confdefs.h
11430
11431		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11432$as_echo "yes" >&6; }
11433	else
11434		LIBEVENT_CFLAGS=""
11435		LIBEVENT_LDFLAGS=""
11436		LIBEVENT_LIBS=""
11437	fi
11438
11439
11440
11441
11442
11443	if test "x$found_libevent" != "xyes"; then
11444		as_fn_error $? "Unable to use libevent (libevent check failed)" "$LINENO" 5
11445	fi
11446
11447	SERVER_LDFLAGS="$SERVER_LDFLAGS $LIBEVENT_LDFLAGS"
11448	SERVER_LIBS="$SERVER_LIBS $LIBEVENT_LIBS"
11449
11450	PROXY_LDFLAGS="$PROXY_LDFLAGS $LIBEVENT_LDFLAGS"
11451	PROXY_LIBS="$PROXY_LIBS $LIBEVENT_LIBS"
11452fi
11453
11454
11455
11456# Check whether --with-gnutls was given.
11457if test "${with_gnutls+set}" = set; then :
11458  withval=$with_gnutls;
11459	if test "$withval" = "no"; then
11460	    want_gnutls="no"
11461	    _libgnutls_dir="no"
11462	elif test "$withval" = "yes"; then
11463	    want_gnutls="yes"
11464	    _libgnutls_dir="no"
11465	else
11466	    want_gnutls="yes"
11467	    _libgnutls_dir=$withval
11468	fi
11469	accept_gnutls_version="no"
11470
11471else
11472  want_gnutls=no
11473
11474fi
11475
11476
11477  if test "x$want_gnutls" = "xyes"; then
11478     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GnuTLS support" >&5
11479$as_echo_n "checking for GnuTLS support... " >&6; }
11480     if test "x$_libgnutls_dir" = "xno"; then
11481       if test -f /usr/local/include/gnutls/gnutls.h; then
11482         GNUTLS_CFLAGS=-I/usr/local/include
11483         GNUTLS_LDFLAGS=-L/usr/local/lib
11484         GNUTLS_LIBS="-lgnutls"
11485         found_gnutls="yes"
11486
11487	# Zabbix minimal supported version of libgnutls:
11488	minimal_gnutls_version_major=3
11489	minimal_gnutls_version_minor=1
11490	minimal_gnutls_version_patch=18
11491
11492	# get version
11493	found_gnutls_version_major=`cat /usr/local/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MAJOR | $AWK '{print $3;}'`
11494	found_gnutls_version_minor=`cat /usr/local/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MINOR | $AWK '{print $3;}'`
11495	found_gnutls_version_patch=`cat /usr/local/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_PATCH | $AWK '{print $3;}'`
11496
11497	if test $((found_gnutls_version_major)) -gt $((minimal_gnutls_version_major)); then
11498		accept_gnutls_version="yes"
11499	elif test $((found_gnutls_version_major)) -lt $((minimal_gnutls_version_major)); then
11500		accept_gnutls_version="no"
11501	elif test $((found_gnutls_version_minor)) -gt $((minimal_gnutls_version_minor)); then
11502		accept_gnutls_version="yes"
11503	elif test $((found_gnutls_version_minor)) -lt $((minimal_gnutls_version_minor)); then
11504		accept_gnutls_version="no"
11505	elif test $((found_gnutls_version_patch)) -ge $((minimal_gnutls_version_patch)); then
11506		accept_gnutls_version="yes"
11507	else
11508		accept_gnutls_version="no"
11509	fi;
11510
11511       elif test -f /usr/include/gnutls/gnutls.h; then
11512         GNUTLS_CFLAGS=-I/usr/include
11513         GNUTLS_LDFLAGS=-L/usr/lib
11514         GNUTLS_LIBS="-lgnutls"
11515         found_gnutls="yes"
11516
11517	# Zabbix minimal supported version of libgnutls:
11518	minimal_gnutls_version_major=3
11519	minimal_gnutls_version_minor=1
11520	minimal_gnutls_version_patch=18
11521
11522	# get version
11523	found_gnutls_version_major=`cat /usr/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MAJOR | $AWK '{print $3;}'`
11524	found_gnutls_version_minor=`cat /usr/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MINOR | $AWK '{print $3;}'`
11525	found_gnutls_version_patch=`cat /usr/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_PATCH | $AWK '{print $3;}'`
11526
11527	if test $((found_gnutls_version_major)) -gt $((minimal_gnutls_version_major)); then
11528		accept_gnutls_version="yes"
11529	elif test $((found_gnutls_version_major)) -lt $((minimal_gnutls_version_major)); then
11530		accept_gnutls_version="no"
11531	elif test $((found_gnutls_version_minor)) -gt $((minimal_gnutls_version_minor)); then
11532		accept_gnutls_version="yes"
11533	elif test $((found_gnutls_version_minor)) -lt $((minimal_gnutls_version_minor)); then
11534		accept_gnutls_version="no"
11535	elif test $((found_gnutls_version_patch)) -ge $((minimal_gnutls_version_patch)); then
11536		accept_gnutls_version="yes"
11537	else
11538		accept_gnutls_version="no"
11539	fi;
11540
11541       else #libraries are not found in default directories
11542         found_gnutls="no"
11543         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11544$as_echo "no" >&6; }
11545       fi
11546     else
11547       if test -f $_libgnutls_dir/include/gnutls/gnutls.h; then
11548         GNUTLS_CFLAGS=-I$_libgnutls_dir/include
11549         GNUTLS_LDFLAGS=-L$_libgnutls_dir/lib
11550         GNUTLS_LIBS="-lgnutls"
11551         found_gnutls="yes"
11552
11553	# Zabbix minimal supported version of libgnutls:
11554	minimal_gnutls_version_major=3
11555	minimal_gnutls_version_minor=1
11556	minimal_gnutls_version_patch=18
11557
11558	# get version
11559	found_gnutls_version_major=`cat $_libgnutls_dir/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MAJOR | $AWK '{print $3;}'`
11560	found_gnutls_version_minor=`cat $_libgnutls_dir/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_MINOR | $AWK '{print $3;}'`
11561	found_gnutls_version_patch=`cat $_libgnutls_dir/include/gnutls/gnutls.h | $EGREP \#define.*GNUTLS_VERSION_PATCH | $AWK '{print $3;}'`
11562
11563	if test $((found_gnutls_version_major)) -gt $((minimal_gnutls_version_major)); then
11564		accept_gnutls_version="yes"
11565	elif test $((found_gnutls_version_major)) -lt $((minimal_gnutls_version_major)); then
11566		accept_gnutls_version="no"
11567	elif test $((found_gnutls_version_minor)) -gt $((minimal_gnutls_version_minor)); then
11568		accept_gnutls_version="yes"
11569	elif test $((found_gnutls_version_minor)) -lt $((minimal_gnutls_version_minor)); then
11570		accept_gnutls_version="no"
11571	elif test $((found_gnutls_version_patch)) -ge $((minimal_gnutls_version_patch)); then
11572		accept_gnutls_version="yes"
11573	else
11574		accept_gnutls_version="no"
11575	fi;
11576
11577       else
11578         found_gnutls="no"
11579         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11580$as_echo "no" >&6; }
11581       fi
11582     fi
11583  fi
11584
11585  if test "x$found_gnutls" = "xyes"; then
11586    am_save_cflags="$CFLAGS"
11587    am_save_ldflags="$LDFLAGS"
11588    am_save_libs="$LIBS"
11589
11590    CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
11591    LDFLAGS="$LDFLAGS $GNUTLS_LDFLAGS"
11592    LIBS="$LIBS $GNUTLS_LIBS"
11593
11594    found_gnutls="no"
11595
11596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11597/* end confdefs.h.  */
11598
11599#include <gnutls/gnutls.h>
11600
11601int
11602main ()
11603{
11604
11605	gnutls_global_init();
11606
11607  ;
11608  return 0;
11609}
11610_ACEOF
11611if ac_fn_c_try_link "$LINENO"; then :
11612  found_gnutls="yes"
11613fi
11614rm -f core conftest.err conftest.$ac_objext \
11615    conftest$ac_exeext conftest.$ac_ext
11616
11617
11618    CFLAGS="$am_save_cflags"
11619    LDFLAGS="$am_save_ldflags"
11620    LIBS="$am_save_libs"
11621
11622    if test "x$found_gnutls" = "xyes"; then
11623
11624$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
11625
11626      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11627$as_echo "yes" >&6; }
11628    else
11629      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11630$as_echo "no" >&6; }
11631      GNUTLS_CFLAGS=""
11632      GNUTLS_LDFLAGS=""
11633      GNUTLS_LIBS=""
11634    fi
11635  fi
11636
11637
11638
11639
11640
11641
11642if test "x$want_gnutls" = "xyes"; then
11643	if test "x$have_tls" != "xno"; then
11644		as_fn_error $? "You can configure for only one TLS library (--with-gnutls or --with-openssl)." "$LINENO" 5
11645	fi
11646
11647	if test "x$found_gnutls" != "xyes"; then
11648		as_fn_error $? "GnuTLS library libgnutls not found" "$LINENO" 5
11649	elif test "x$accept_gnutls_version" != "xyes"; then
11650		as_fn_error $? "GnuTLS library version requirement not met (>= 3.1.18)" "$LINENO" 5
11651	else
11652		have_tls="GnuTLS"
11653	fi
11654	TLS_CFLAGS="$GNUTLS_CFLAGS"
11655	TLS_LDFLAGS="$GNUTLS_LDFLAGS"
11656	TLS_LIBS="$GNUTLS_LIBS"
11657fi
11658
11659
11660
11661# Check whether --with-openssl was given.
11662if test "${with_openssl+set}" = set; then :
11663  withval=$with_openssl;
11664	if test "$withval" = "no"; then
11665	    want_openssl="no"
11666	    _libopenssl_dir="no"
11667	elif test "$withval" = "yes"; then
11668	    want_openssl="yes"
11669	    _libopenssl_dir="no"
11670	else
11671	    want_openssl="yes"
11672	    _libopenssl_dir=$withval
11673	    _libopenssl_dir_lib="$withval/lib"
11674	fi
11675	accept_openssl_version="no"
11676
11677else
11678  want_openssl=no
11679
11680fi
11681
11682
11683  if test "x$want_openssl" = "xyes"; then
11684
11685    if test "x$enable_static_libs" = "xyes"; then
11686        test "x$static_linking_support" = "xno" -a -z "$_libopenssl_dir_lib" && as_fn_error $? "\"OpenSSL: Compiler not support statically linked libs from default folders\"" "$LINENO" 5
11687
11688
11689
11690
11691
11692
11693
11694
11695if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11696	if test -n "$ac_tool_prefix"; then
11697  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
11698set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
11699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11700$as_echo_n "checking for $ac_word... " >&6; }
11701if ${ac_cv_path_PKG_CONFIG+:} false; then :
11702  $as_echo_n "(cached) " >&6
11703else
11704  case $PKG_CONFIG in
11705  [\\/]* | ?:[\\/]*)
11706  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11707  ;;
11708  *)
11709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11710for as_dir in $PATH
11711do
11712  IFS=$as_save_IFS
11713  test -z "$as_dir" && as_dir=.
11714    for ac_exec_ext in '' $ac_executable_extensions; do
11715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11716    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11718    break 2
11719  fi
11720done
11721  done
11722IFS=$as_save_IFS
11723
11724  ;;
11725esac
11726fi
11727PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11728if test -n "$PKG_CONFIG"; then
11729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11730$as_echo "$PKG_CONFIG" >&6; }
11731else
11732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11733$as_echo "no" >&6; }
11734fi
11735
11736
11737fi
11738if test -z "$ac_cv_path_PKG_CONFIG"; then
11739  ac_pt_PKG_CONFIG=$PKG_CONFIG
11740  # Extract the first word of "pkg-config", so it can be a program name with args.
11741set dummy pkg-config; ac_word=$2
11742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11743$as_echo_n "checking for $ac_word... " >&6; }
11744if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
11745  $as_echo_n "(cached) " >&6
11746else
11747  case $ac_pt_PKG_CONFIG in
11748  [\\/]* | ?:[\\/]*)
11749  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
11750  ;;
11751  *)
11752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11753for as_dir in $PATH
11754do
11755  IFS=$as_save_IFS
11756  test -z "$as_dir" && as_dir=.
11757    for ac_exec_ext in '' $ac_executable_extensions; do
11758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11759    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11761    break 2
11762  fi
11763done
11764  done
11765IFS=$as_save_IFS
11766
11767  ;;
11768esac
11769fi
11770ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
11771if test -n "$ac_pt_PKG_CONFIG"; then
11772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
11773$as_echo "$ac_pt_PKG_CONFIG" >&6; }
11774else
11775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11776$as_echo "no" >&6; }
11777fi
11778
11779  if test "x$ac_pt_PKG_CONFIG" = x; then
11780    PKG_CONFIG=""
11781  else
11782    case $cross_compiling:$ac_tool_warned in
11783yes:)
11784{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11785$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11786ac_tool_warned=yes ;;
11787esac
11788    PKG_CONFIG=$ac_pt_PKG_CONFIG
11789  fi
11790else
11791  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
11792fi
11793
11794fi
11795if test -n "$PKG_CONFIG"; then
11796	_pkg_min_version=0.9.0
11797	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
11798$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
11799	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
11800		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11801$as_echo "yes" >&6; }
11802	else
11803		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11804$as_echo "no" >&6; }
11805		PKG_CONFIG=""
11806	fi
11807fi
11808        test -z "$PKG_CONFIG" -a -z "$_libopenssl_dir_lib" && as_fn_error $? "Not found pkg-config library" "$LINENO" 5
11809
11810    fi
11811
11812     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL support" >&5
11813$as_echo_n "checking for OpenSSL support... " >&6; }
11814     if test "x$_libopenssl_dir" = "xno"; then		# if OpenSSL directory is not specified
11815       if test -f /usr/local/include/openssl/ssl.h -a -f /usr/local/include/openssl/crypto.h; then
11816         OPENSSL_CFLAGS=-I/usr/local/include
11817         OPENSSL_LDFLAGS=-L/usr/local/lib
11818         OPENSSL_LIBS="-lssl -lcrypto"
11819         found_openssl="yes"
11820
11821	# Zabbix minimal supported version of OpenSSL.
11822	# Version numbering scheme is described in /usr/include/openssl/opensslv.h. Specify version number without the
11823	# last byte (status). E.g., version 1.0.1 is 0x1000100f, but without the last byte it is 0x1000100.
11824	minimal_openssl_version=0x1000100
11825
11826	# get version
11827	found_openssl_version=`grep OPENSSL_VERSION_NUMBER "/usr/local/include/openssl/opensslv.h"`
11828	found_openssl_version=`expr "$found_openssl_version" : '.*\(0x[0-f][0-f][0-f][0-f][0-f][0-f][0-f]\).*'`
11829
11830	# compare versions lexicographically
11831	openssl_version_check=`expr $found_openssl_version \>\= $minimal_openssl_version`
11832	if test "$openssl_version_check" = "1"; then
11833		accept_openssl_version="yes"
11834	else
11835		accept_openssl_version="no"
11836	fi;
11837
11838       elif test -f /usr/include/openssl/ssl.h -a -f /usr/include/openssl/crypto.h; then
11839         OPENSSL_CFLAGS=-I/usr/include
11840         OPENSSL_LDFLAGS=-L/usr/lib
11841         OPENSSL_LIBS="-lssl -lcrypto"
11842         found_openssl="yes"
11843
11844	# Zabbix minimal supported version of OpenSSL.
11845	# Version numbering scheme is described in /usr/include/openssl/opensslv.h. Specify version number without the
11846	# last byte (status). E.g., version 1.0.1 is 0x1000100f, but without the last byte it is 0x1000100.
11847	minimal_openssl_version=0x1000100
11848
11849	# get version
11850	found_openssl_version=`grep OPENSSL_VERSION_NUMBER "/usr/include/openssl/opensslv.h"`
11851	found_openssl_version=`expr "$found_openssl_version" : '.*\(0x[0-f][0-f][0-f][0-f][0-f][0-f][0-f]\).*'`
11852
11853	# compare versions lexicographically
11854	openssl_version_check=`expr $found_openssl_version \>\= $minimal_openssl_version`
11855	if test "$openssl_version_check" = "1"; then
11856		accept_openssl_version="yes"
11857	else
11858		accept_openssl_version="no"
11859	fi;
11860
11861       else						# libraries are not found in default directories
11862         found_openssl="no"
11863         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11864$as_echo "no" >&6; }
11865       fi
11866     else						# search in the specified OpenSSL directory
11867       if test -f $_libopenssl_dir/include/openssl/ssl.h -a -f $_libopenssl_dir/include/openssl/crypto.h; then
11868         OPENSSL_CFLAGS=-I$_libopenssl_dir/include
11869         OPENSSL_LDFLAGS=-L$_libopenssl_dir/lib
11870         OPENSSL_LIBS="-lssl -lcrypto"
11871         found_openssl="yes"
11872
11873	# Zabbix minimal supported version of OpenSSL.
11874	# Version numbering scheme is described in /usr/include/openssl/opensslv.h. Specify version number without the
11875	# last byte (status). E.g., version 1.0.1 is 0x1000100f, but without the last byte it is 0x1000100.
11876	minimal_openssl_version=0x1000100
11877
11878	# get version
11879	found_openssl_version=`grep OPENSSL_VERSION_NUMBER "$_libopenssl_dir/include/openssl/opensslv.h"`
11880	found_openssl_version=`expr "$found_openssl_version" : '.*\(0x[0-f][0-f][0-f][0-f][0-f][0-f][0-f]\).*'`
11881
11882	# compare versions lexicographically
11883	openssl_version_check=`expr $found_openssl_version \>\= $minimal_openssl_version`
11884	if test "$openssl_version_check" = "1"; then
11885		accept_openssl_version="yes"
11886	else
11887		accept_openssl_version="no"
11888	fi;
11889
11890       else						# libraries are not found in specified directories
11891         found_openssl="no"
11892         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11893$as_echo "no" >&6; }
11894       fi
11895     fi
11896  fi
11897
11898  if test "x$found_openssl" = "xyes"; then
11899    am_save_cflags="$CFLAGS"
11900    am_save_ldflags="$LDFLAGS"
11901    am_save_libs="$LIBS"
11902
11903    if test "x$enable_static_libs" = "xyes" -a -z "$PKG_CONFIG"; then
11904      OPENSSL_LIBS="$_libopenssl_dir_lib/libssl.a $_libopenssl_dir_lib/libcrypto.a"
11905    elif test "x$enable_static_libs" = "xyes"; then
11906      if test -z "$_libopenssl_dir_lib"; then
11907        if test -n "$PKG_CONFIG" && \
11908    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
11909  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
11910  ac_status=$?
11911  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11912  test $ac_status = 0; }; then
11913
11914          OPENSSL_LIBS=`$PKG_CONFIG --static --libs openssl`
11915
11916else
11917
11918          as_fn_error $? "Not found openssl package" "$LINENO" 5
11919
11920fi
11921      else
11922        { { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR=\"\$_libopenssl_dir_lib/pkgconfig\" \$PKG_CONFIG --exists --print-errors openssl"; } >&5
11923  (PKG_CONFIG_LIBDIR="$_libopenssl_dir_lib/pkgconfig" $PKG_CONFIG --exists --print-errors openssl) 2>&5
11924  ac_status=$?
11925  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11926  test $ac_status = 0; } || as_fn_error $? "\"Not found openssl package in $_libopenssl_dir/lib/pkgconfig\"" "$LINENO" 5
11927        OPENSSL_LIBS=`PKG_CONFIG_LIBDIR="$_libopenssl_dir_lib/pkgconfig" $PKG_CONFIG --static --libs openssl`
11928        test -z "$OPENSSL_LIBS" && OPENSSL_LIBS=`PKG_CONFIG_LIBDIR="$_libopenssl_dir_lib/pkgconfig" $PKG_CONFIG --libs openssl`
11929      fi
11930
11931      if test "x$static_linking_support" = "xno"; then
11932        OPENSSL_LIBS=`echo "$OPENSSL_LIBS"|sed "s|-lssl|$_libopenssl_dir_lib/libssl.a|g"|sed "s|-lcrypto|$_libopenssl_dir_lib/libcrypto.a|g"`
11933      else
11934        OPENSSL_LIBS=`echo "$OPENSSL_LIBS"|sed "s/-lssl/${static_linking_support}static -lssl ${static_linking_support}dynamic/g"|sed "s/-lcrypto/${static_linking_support}static -lcrypto ${static_linking_support}dynamic/g"`
11935      fi
11936    fi
11937
11938    CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
11939    LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
11940    LIBS="$OPENSSL_LIBS $LIBS"
11941
11942    found_openssl="no"
11943
11944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11945/* end confdefs.h.  */
11946
11947#include <openssl/ssl.h>
11948#include <openssl/bio.h>
11949
11950int
11951main ()
11952{
11953
11954	/* check that both libssl and libcrypto are available */
11955
11956	SSL	*ssl = NULL;
11957
11958	SSL_connect(ssl);	/* a function from libssl, present in both OpenSSL 1.0.1 and 1.1.0 */
11959	BIO_new(BIO_s_mem());	/* a function from libcrypto */
11960
11961  ;
11962  return 0;
11963}
11964_ACEOF
11965if ac_fn_c_try_link "$LINENO"; then :
11966  found_openssl="yes"
11967fi
11968rm -f core conftest.err conftest.$ac_objext \
11969    conftest$ac_exeext conftest.$ac_ext
11970
11971
11972    if test "x$found_openssl" = "xyes"; then
11973
11974$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
11975
11976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11977$as_echo "yes" >&6; }
11978
11979      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL supports PSK" >&5
11980$as_echo_n "checking if OpenSSL supports PSK... " >&6; }
11981      found_openssl_with_psk="no"
11982
11983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11984/* end confdefs.h.  */
11985
11986#include <openssl/ssl.h>
11987
11988int
11989main ()
11990{
11991
11992	/* check if OPENSSL_NO_PSK is defined */
11993#ifdef OPENSSL_NO_PSK
11994#	error "OPENSSL_NO_PSK is defined. PSK support will not be available."
11995#endif
11996
11997  ;
11998  return 0;
11999}
12000_ACEOF
12001if ac_fn_c_try_link "$LINENO"; then :
12002  found_openssl_with_psk="yes"
12003fi
12004rm -f core conftest.err conftest.$ac_objext \
12005    conftest$ac_exeext conftest.$ac_ext
12006
12007      if test "x$found_openssl_with_psk" = "xyes"; then
12008
12009$as_echo "#define HAVE_OPENSSL_WITH_PSK 1" >>confdefs.h
12010
12011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12012$as_echo "yes" >&6; }
12013        found_openssl="OpenSSL"
12014      else
12015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12016$as_echo "no" >&6; }
12017        found_openssl="OpenSSL (PSK not supported)"
12018      fi
12019
12020    else
12021      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12022$as_echo "no" >&6; }
12023      OPENSSL_CFLAGS=""
12024      OPENSSL_LDFLAGS=""
12025      OPENSSL_LIBS=""
12026    fi
12027
12028    CFLAGS="$am_save_cflags"
12029    LDFLAGS="$am_save_ldflags"
12030    LIBS="$am_save_libs"
12031  fi
12032
12033
12034
12035
12036
12037
12038if test "x$want_openssl" = "xyes"; then
12039	if test "x$have_tls" != "xno"; then
12040		as_fn_error $? "You can configure for only one TLS library (--with-gnutls or --with-openssl)." "$LINENO" 5
12041	fi
12042
12043	if test "x$found_openssl" != "xOpenSSL" -a "x$found_openssl" != "xOpenSSL (PSK not supported)"; then
12044		as_fn_error $? "OpenSSL library libssl or libcrypto not found" "$LINENO" 5
12045	elif test "x$accept_openssl_version" != "xyes"; then
12046		as_fn_error $? "OpenSSL library version requirement not met (>= 1.0.1)" "$LINENO" 5
12047	else
12048		have_tls=$found_openssl
12049	fi
12050	TLS_CFLAGS="$OPENSSL_CFLAGS"
12051	TLS_LDFLAGS="$OPENSSL_LDFLAGS"
12052	TLS_LIBS="$OPENSSL_LIBS"
12053fi
12054
12055
12056SERVER_LDFLAGS="$SERVER_LDFLAGS $TLS_LDFLAGS"
12057SERVER_LIBS="$SERVER_LIBS $TLS_LIBS"
12058
12059PROXY_LDFLAGS="$PROXY_LDFLAGS $TLS_LDFLAGS"
12060PROXY_LIBS="$PROXY_LIBS $TLS_LIBS"
12061
12062AGENT_LDFLAGS="$AGENT_LDFLAGS $TLS_LDFLAGS"
12063AGENT_LIBS="$AGENT_LIBS $TLS_LIBS"
12064
12065AGENT2_LDFLAGS="$AGENT2_LDFLAGS $TLS_LDFLAGS"
12066AGENT2_LIBS="$AGENT2_LIBS $TLS_LIBS"
12067
12068ZBXGET_LDFLAGS="$ZBXGET_LDFLAGS $TLS_LDFLAGS"
12069ZBXGET_LIBS="$ZBXGET_LIBS $TLS_LIBS"
12070
12071SENDER_LDFLAGS="$SENDER_LDFLAGS $TLS_LDFLAGS"
12072SENDER_LIBS="$SENDER_LIBS $TLS_LIBS"
12073
12074ZBXJS_LDFLAGS="$ZLIB_LDFLAGS $TLS_LDFLAGS"
12075ZBXJS_LIBS="$ZBXJS_LIBS $TLS_LIBS"
12076
12077if test "x$agent2" = "xyes"; then
12078	for ac_prog in go
12079do
12080  # Extract the first word of "$ac_prog", so it can be a program name with args.
12081set dummy $ac_prog; ac_word=$2
12082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12083$as_echo_n "checking for $ac_word... " >&6; }
12084if ${ac_cv_prog_GO+:} false; then :
12085  $as_echo_n "(cached) " >&6
12086else
12087  if test -n "$GO"; then
12088  ac_cv_prog_GO="$GO" # Let the user override the test.
12089else
12090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12091for as_dir in $PATH
12092do
12093  IFS=$as_save_IFS
12094  test -z "$as_dir" && as_dir=.
12095    for ac_exec_ext in '' $ac_executable_extensions; do
12096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12097    ac_cv_prog_GO="$ac_prog"
12098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12099    break 2
12100  fi
12101done
12102  done
12103IFS=$as_save_IFS
12104
12105fi
12106fi
12107GO=$ac_cv_prog_GO
12108if test -n "$GO"; then
12109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GO" >&5
12110$as_echo "$GO" >&6; }
12111else
12112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12113$as_echo "no" >&6; }
12114fi
12115
12116
12117  test -n "$GO" && break
12118done
12119test -n "$GO" || GO="no"
12120
12121	if test "x$GO" = "xno"; then
12122		as_fn_error $? "Unable to find \"go\" executable in path" "$LINENO" 5
12123	fi
12124
12125$as_echo "#define ZBX_BUILD_AGENT2 1" >>confdefs.h
12126
12127fi
12128
12129if test "x$java" = "xyes"; then
12130	for ac_prog in javac
12131do
12132  # Extract the first word of "$ac_prog", so it can be a program name with args.
12133set dummy $ac_prog; ac_word=$2
12134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12135$as_echo_n "checking for $ac_word... " >&6; }
12136if ${ac_cv_prog_JAVAC+:} false; then :
12137  $as_echo_n "(cached) " >&6
12138else
12139  if test -n "$JAVAC"; then
12140  ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test.
12141else
12142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12143for as_dir in $PATH
12144do
12145  IFS=$as_save_IFS
12146  test -z "$as_dir" && as_dir=.
12147    for ac_exec_ext in '' $ac_executable_extensions; do
12148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12149    ac_cv_prog_JAVAC="$ac_prog"
12150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12151    break 2
12152  fi
12153done
12154  done
12155IFS=$as_save_IFS
12156
12157fi
12158fi
12159JAVAC=$ac_cv_prog_JAVAC
12160if test -n "$JAVAC"; then
12161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
12162$as_echo "$JAVAC" >&6; }
12163else
12164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12165$as_echo "no" >&6; }
12166fi
12167
12168
12169  test -n "$JAVAC" && break
12170done
12171test -n "$JAVAC" || JAVAC="no"
12172
12173	if test "x$JAVAC" = "xno"; then
12174		as_fn_error $? "Unable to find \"javac\" executable in path" "$LINENO" 5
12175	fi
12176	for ac_prog in jar
12177do
12178  # Extract the first word of "$ac_prog", so it can be a program name with args.
12179set dummy $ac_prog; ac_word=$2
12180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12181$as_echo_n "checking for $ac_word... " >&6; }
12182if ${ac_cv_prog_JAR+:} false; then :
12183  $as_echo_n "(cached) " >&6
12184else
12185  if test -n "$JAR"; then
12186  ac_cv_prog_JAR="$JAR" # Let the user override the test.
12187else
12188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12189for as_dir in $PATH
12190do
12191  IFS=$as_save_IFS
12192  test -z "$as_dir" && as_dir=.
12193    for ac_exec_ext in '' $ac_executable_extensions; do
12194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12195    ac_cv_prog_JAR="$ac_prog"
12196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12197    break 2
12198  fi
12199done
12200  done
12201IFS=$as_save_IFS
12202
12203fi
12204fi
12205JAR=$ac_cv_prog_JAR
12206if test -n "$JAR"; then
12207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
12208$as_echo "$JAR" >&6; }
12209else
12210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12211$as_echo "no" >&6; }
12212fi
12213
12214
12215  test -n "$JAR" && break
12216done
12217test -n "$JAR" || JAR="no"
12218
12219	if test "x$JAR" = "xno"; then
12220		as_fn_error $? "Unable to find \"jar\" executable in path" "$LINENO" 5
12221	fi
12222fi
12223
12224found_ldap="no"
12225
12226
12227# Check whether --with-ldap was given.
12228if test "${with_ldap+set}" = set; then :
12229  withval=$with_ldap;  if test "$withval" = "no"; then
12230            want_ldap="no"
12231            _libldap_with="no"
12232        elif test "$withval" = "yes"; then
12233            want_ldap="yes"
12234            _libldap_with="yes"
12235        else
12236            want_ldap="yes"
12237            _libldap_with=$withval
12238        fi
12239
12240else
12241  _libldap_with=no
12242fi
12243
12244
12245  if test "x$_libldap_with" != x"no"; then
12246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP support of ldap.h" >&5
12247$as_echo_n "checking for LDAP support of ldap.h... " >&6; }
12248
12249        if test "$_libldap_with" = "yes"; then
12250                if test -f /usr/local/openldap/include/ldap.h; then
12251                        LDAP_INCDIR=/usr/local/openldap/include/
12252                        LDAP_LIBDIR=/usr/local/openldap/lib/
12253                        found_ldap="yes"
12254                elif test -f /usr/include/ldap.h; then
12255                        LDAP_INCDIR=/usr/include
12256                        LDAP_LIBDIR=/usr/lib
12257                        found_ldap="yes"
12258                elif test -f /usr/local/include/ldap.h; then
12259                        LDAP_INCDIR=/usr/local/include
12260                        LDAP_LIBDIR=/usr/local/lib
12261                        found_ldap="yes"
12262                else
12263                        found_ldap="no"
12264                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12265$as_echo "no" >&6; }
12266                fi
12267        else
12268                if test -f $_libldap_with/include/ldap.h; then
12269                        LDAP_INCDIR=$_libldap_with/include
12270                        LDAP_LIBDIR=$_libldap_with/lib
12271                        _ldap_dir_lib="$LDAP_LIBDIR"
12272
12273                        found_ldap="yes"
12274                else
12275                        found_ldap="no"
12276                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12277$as_echo "no" >&6; }
12278                fi
12279        fi
12280
12281        if test "x$found_ldap" != "xno"; then
12282
12283                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12284$as_echo "yes" >&6; }
12285                LDAP_CPPFLAGS="-I$LDAP_INCDIR"
12286                LDAP_LDFLAGS="-L$LDAP_LIBDIR"
12287                LDAP_LIBS="-lldap -llber $LDAP_LIBS"
12288
12289                if test "x$enable_static" = "xyes"; then
12290                        LDAP_LIBS="$LDAP_LIBS -lgnutls -lpthread -lsasl2"
12291                elif test "x$enable_static_libs" = "xyes"; then
12292                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking compatibility of static LDAP libs" >&5
12293$as_echo_n "checking compatibility of static LDAP libs... " >&6; }
12294                        test "x$static_linking_support" = "xno" -a -z "$_ldap_dir_lib" && as_fn_error $? "\"Compiler not support statically linked libs from default folders\"" "$LINENO" 5
12295
12296                        if test "x$static_linking_support" = "xno"; then
12297                                LDAP_LIBS=`echo "$LDAP_LIBS"|sed "s|-lldap|$_ldap_dir_lib/libldap.a|g"|sed "s|-llber|$_ldap_dir_lib/liblber.a|g"`
12298                        fi
12299
12300                        # without SSL and SASL
12301                        if test "x$static_linking_support" = "xno"; then
12302                                TRY_LDAP_LIBS="$LDAP_LIBS -lpthread"
12303                        else
12304                                TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lpthread"
12305                        fi
12306
12307_save_ldap_cppflags="$CPPFLAGS"
12308_save_ldap_cflags="$CFLAGS"
12309_save_ldap_ldflags="$LDFLAGS"
12310_save_ldap_libs="$LIBS"
12311
12312LIBS="$LIBS $TRY_LDAP_LIBS"
12313LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
12314CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
12315CFLAGS="$CFLAGS "
12316ldap_link="no"
12317
12318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12319/* end confdefs.h.  */
12320
12321#include <stdio.h>
12322#include <ldap.h>
12323#include <lber.h>
12324#include <ldap_schema.h>
12325
12326int
12327main ()
12328{
12329
12330printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12331printf("%p", ber_free);
12332return 0;
12333
12334  ;
12335  return 0;
12336}
12337_ACEOF
12338if ac_fn_c_try_link "$LINENO"; then :
12339
12340ldap_link="yes"
12341
12342fi
12343rm -f core conftest.err conftest.$ac_objext \
12344    conftest$ac_exeext conftest.$ac_ext
12345
12346CPPFLAGS="$_save_ldap_cppflags"
12347CFLAGS="$_save_ldap_cflags"
12348LDFLAGS="$_save_ldap_ldflags"
12349LIBS="$_save_ldap_libs"
12350unset _save_ldap_cppflags
12351unset _save_ldap_cflags
12352unset _save_ldap_ldflags
12353unset _save_ldap_libs
12354if test "x$ldap_link" = "xyes"; then :
12355
12356                                LDAP_LIBS=$TRY_LDAP_LIBS
12357                                { $as_echo "$as_me:${as_lineno-$LINENO}: result: without SSL" >&5
12358$as_echo "without SSL" >&6; }
12359
12360fi
12361
12362                        # without SSL
12363                        if test "x$ldap_link" = "xno"; then
12364                                if test "x$static_linking_support" = "xno"; then
12365                                        TRY_LDAP_LIBS="$LDAP_LIBS -lpthread -lsasl2"
12366                                else
12367                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lpthread -lsasl2"
12368                                fi
12369
12370_save_ldap_cppflags="$CPPFLAGS"
12371_save_ldap_cflags="$CFLAGS"
12372_save_ldap_ldflags="$LDFLAGS"
12373_save_ldap_libs="$LIBS"
12374
12375LIBS="$LIBS $TRY_LDAP_LIBS"
12376LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
12377CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
12378CFLAGS="$CFLAGS "
12379ldap_link="no"
12380
12381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12382/* end confdefs.h.  */
12383
12384#include <stdio.h>
12385#include <ldap.h>
12386#include <lber.h>
12387#include <ldap_schema.h>
12388
12389int
12390main ()
12391{
12392
12393printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12394printf("%p", ber_free);
12395return 0;
12396
12397  ;
12398  return 0;
12399}
12400_ACEOF
12401if ac_fn_c_try_link "$LINENO"; then :
12402
12403ldap_link="yes"
12404
12405fi
12406rm -f core conftest.err conftest.$ac_objext \
12407    conftest$ac_exeext conftest.$ac_ext
12408
12409CPPFLAGS="$_save_ldap_cppflags"
12410CFLAGS="$_save_ldap_cflags"
12411LDFLAGS="$_save_ldap_ldflags"
12412LIBS="$_save_ldap_libs"
12413unset _save_ldap_cppflags
12414unset _save_ldap_cflags
12415unset _save_ldap_ldflags
12416unset _save_ldap_libs
12417if test "x$ldap_link" = "xyes"; then :
12418
12419                                        LDAP_LIBS=$TRY_LDAP_LIBS
12420                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: without SSL" >&5
12421$as_echo "without SSL" >&6; }
12422
12423fi
12424                        fi
12425
12426                        # without SSL for Solaris
12427                        if test "x$ldap_link" = "xno"; then
12428                                if test "x$static_linking_support" = "xno"; then
12429                                        TRY_LDAP_LIBS="$LDAP_LIBS -lpthread -lsasl"
12430                                else
12431                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lpthread -lsasl"
12432                                fi
12433
12434_save_ldap_cppflags="$CPPFLAGS"
12435_save_ldap_cflags="$CFLAGS"
12436_save_ldap_ldflags="$LDFLAGS"
12437_save_ldap_libs="$LIBS"
12438
12439LIBS="$LIBS $TRY_LDAP_LIBS"
12440LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
12441CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
12442CFLAGS="$CFLAGS "
12443ldap_link="no"
12444
12445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12446/* end confdefs.h.  */
12447
12448#include <stdio.h>
12449#include <ldap.h>
12450#include <lber.h>
12451#include <ldap_schema.h>
12452
12453int
12454main ()
12455{
12456
12457printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12458printf("%p", ber_free);
12459return 0;
12460
12461  ;
12462  return 0;
12463}
12464_ACEOF
12465if ac_fn_c_try_link "$LINENO"; then :
12466
12467ldap_link="yes"
12468
12469fi
12470rm -f core conftest.err conftest.$ac_objext \
12471    conftest$ac_exeext conftest.$ac_ext
12472
12473CPPFLAGS="$_save_ldap_cppflags"
12474CFLAGS="$_save_ldap_cflags"
12475LDFLAGS="$_save_ldap_ldflags"
12476LIBS="$_save_ldap_libs"
12477unset _save_ldap_cppflags
12478unset _save_ldap_cflags
12479unset _save_ldap_ldflags
12480unset _save_ldap_libs
12481if test "x$ldap_link" = "xyes"; then :
12482
12483                                        LDAP_LIBS=$TRY_LDAP_LIBS
12484                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: without SSL and with sasl" >&5
12485$as_echo "without SSL and with sasl" >&6; }
12486
12487fi
12488                        fi
12489
12490                        # with system GnuTLS
12491                        if test "x$ldap_link" = "xno"; then
12492                                if test "x$static_linking_support" = "xno"; then
12493                                        TRY_LDAP_LIBS="$LDAP_LIBS -lgnutls -lsasl2 -lgssapi_krb5 -lpthread"
12494                                else
12495                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lgnutls -lsasl2 -lgssapi_krb5 -lpthread"
12496                                fi
12497
12498_save_ldap_cppflags="$CPPFLAGS"
12499_save_ldap_cflags="$CFLAGS"
12500_save_ldap_ldflags="$LDFLAGS"
12501_save_ldap_libs="$LIBS"
12502
12503LIBS="$LIBS $TRY_LDAP_LIBS"
12504LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
12505CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
12506CFLAGS="$CFLAGS "
12507ldap_link="no"
12508
12509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12510/* end confdefs.h.  */
12511
12512#include <stdio.h>
12513#include <ldap.h>
12514#include <lber.h>
12515#include <ldap_schema.h>
12516
12517int
12518main ()
12519{
12520
12521printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12522printf("%p", ber_free);
12523return 0;
12524
12525  ;
12526  return 0;
12527}
12528_ACEOF
12529if ac_fn_c_try_link "$LINENO"; then :
12530
12531ldap_link="yes"
12532
12533fi
12534rm -f core conftest.err conftest.$ac_objext \
12535    conftest$ac_exeext conftest.$ac_ext
12536
12537CPPFLAGS="$_save_ldap_cppflags"
12538CFLAGS="$_save_ldap_cflags"
12539LDFLAGS="$_save_ldap_ldflags"
12540LIBS="$_save_ldap_libs"
12541unset _save_ldap_cppflags
12542unset _save_ldap_cflags
12543unset _save_ldap_ldflags
12544unset _save_ldap_libs
12545if test "x$ldap_link" = "xyes"; then :
12546
12547                                        LDAP_LIBS=$TRY_LDAP_LIBS
12548                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with system GnuTLS linking" >&5
12549$as_echo "with system GnuTLS linking" >&6; }
12550
12551fi
12552                        fi
12553
12554                        # with static OpenSSL and SASL2
12555                        if test "x$ldap_link" = "xno" -a "x$want_openssl" = "xyes"; then
12556                                if test "x$static_linking_support" = "xno"; then
12557                                        OSSL_LDAP_LIBS="$LDAP_LIBS $OPENSSL_LIBS -lsasl2"
12558                                else
12559                                        OSSL_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS -lsasl2 ${static_linking_support}dynamic $OPENSSL_LIBS"
12560                                fi
12561                                OSSL_LDAP_CPPFLAGS="$LDAP_CPPFLAGS $OPENSSL_CPPFLAGS"
12562                                OSSL_LDAP_CFLAGS="$LDAP_CPPFLAGS $OPENSSL_CFLAGS"
12563                                OSSL_LDAP_LDFLAGS="$LDAP_LDFLAGS $OPENSSL_LDFLAGS"
12564
12565_save_ldap_cppflags="$CPPFLAGS"
12566_save_ldap_cflags="$CFLAGS"
12567_save_ldap_ldflags="$LDFLAGS"
12568_save_ldap_libs="$LIBS"
12569
12570LIBS="$LIBS $OSSL_LDAP_LIBS"
12571LDFLAGS="$LDFLAGS $OSSL_LDAP_LDFLAGS"
12572CPPFLAGS="$CPPFLAGS $OSSL_LDAP_CPPFLAGS"
12573CFLAGS="$CFLAGS $OSSL_LDAP_CFLAGS"
12574ldap_link="no"
12575
12576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12577/* end confdefs.h.  */
12578
12579#include <stdio.h>
12580#include <ldap.h>
12581#include <lber.h>
12582#include <ldap_schema.h>
12583
12584int
12585main ()
12586{
12587
12588printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12589printf("%p", ber_free);
12590return 0;
12591
12592  ;
12593  return 0;
12594}
12595_ACEOF
12596if ac_fn_c_try_link "$LINENO"; then :
12597
12598ldap_link="yes"
12599
12600fi
12601rm -f core conftest.err conftest.$ac_objext \
12602    conftest$ac_exeext conftest.$ac_ext
12603
12604CPPFLAGS="$_save_ldap_cppflags"
12605CFLAGS="$_save_ldap_cflags"
12606LDFLAGS="$_save_ldap_ldflags"
12607LIBS="$_save_ldap_libs"
12608unset _save_ldap_cppflags
12609unset _save_ldap_cflags
12610unset _save_ldap_ldflags
12611unset _save_ldap_libs
12612if test "x$ldap_link" = "xyes"; then :
12613
12614                                        LDAP_LIBS="$OSSL_LDAP_LIBS"
12615                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with static OpenSSL and static sasl2" >&5
12616$as_echo "with static OpenSSL and static sasl2" >&6; }
12617
12618fi
12619                        fi
12620
12621                        # with static OpenSSL
12622                        if test "x$ldap_link" = "xno" -a "x$want_openssl" = "xyes"; then
12623                                if test "x$static_linking_support" = "xno"; then
12624                                        OSSL_LDAP_LIBS="$LDAP_LIBS $OPENSSL_LIBS -lsasl2"
12625                                else
12626                                        OSSL_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic $OPENSSL_LIBS -lsasl2"
12627                                fi
12628                                OSSL_LDAP_CPPFLAGS="$LDAP_CPPFLAGS $OPENSSL_CPPFLAGS"
12629                                OSSL_LDAP_CFLAGS="$LDAP_CPPFLAGS $OPENSSL_CFLAGS"
12630                                OSSL_LDAP_LDFLAGS="$LDAP_LDFLAGS $OPENSSL_LDFLAGS"
12631
12632_save_ldap_cppflags="$CPPFLAGS"
12633_save_ldap_cflags="$CFLAGS"
12634_save_ldap_ldflags="$LDFLAGS"
12635_save_ldap_libs="$LIBS"
12636
12637LIBS="$LIBS $OSSL_LDAP_LIBS"
12638LDFLAGS="$LDFLAGS $OSSL_LDAP_LDFLAGS"
12639CPPFLAGS="$CPPFLAGS $OSSL_LDAP_CPPFLAGS"
12640CFLAGS="$CFLAGS $OSSL_LDAP_CFLAGS"
12641ldap_link="no"
12642
12643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12644/* end confdefs.h.  */
12645
12646#include <stdio.h>
12647#include <ldap.h>
12648#include <lber.h>
12649#include <ldap_schema.h>
12650
12651int
12652main ()
12653{
12654
12655printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12656printf("%p", ber_free);
12657return 0;
12658
12659  ;
12660  return 0;
12661}
12662_ACEOF
12663if ac_fn_c_try_link "$LINENO"; then :
12664
12665ldap_link="yes"
12666
12667fi
12668rm -f core conftest.err conftest.$ac_objext \
12669    conftest$ac_exeext conftest.$ac_ext
12670
12671CPPFLAGS="$_save_ldap_cppflags"
12672CFLAGS="$_save_ldap_cflags"
12673LDFLAGS="$_save_ldap_ldflags"
12674LIBS="$_save_ldap_libs"
12675unset _save_ldap_cppflags
12676unset _save_ldap_cflags
12677unset _save_ldap_ldflags
12678unset _save_ldap_libs
12679if test "x$ldap_link" = "xyes"; then :
12680
12681                                        LDAP_LIBS="$OSSL_LDAP_LIBS"
12682                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with static OpenSSL" >&5
12683$as_echo "with static OpenSSL" >&6; }
12684
12685fi
12686                        fi
12687
12688                        # with static OpenSSL for Solaris
12689                        if test "x$ldap_link" = "xno" -a "x$want_openssl" = "xyes"; then
12690                                if test "x$static_linking_support" = "xno"; then
12691                                        OSSL_LDAP_LIBS="$LDAP_LIBS $OPENSSL_LIBS -lsasl"
12692                                else
12693                                        OSSL_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic $OPENSSL_LIBS -lsasl"
12694                                fi
12695                                OSSL_LDAP_CPPFLAGS="$LDAP_CPPFLAGS $OPENSSL_CPPFLAGS"
12696                                OSSL_LDAP_CFLAGS="$LDAP_CPPFLAGS $OPENSSL_CFLAGS"
12697                                OSSL_LDAP_LDFLAGS="$LDAP_LDFLAGS $OPENSSL_LDFLAGS"
12698
12699_save_ldap_cppflags="$CPPFLAGS"
12700_save_ldap_cflags="$CFLAGS"
12701_save_ldap_ldflags="$LDFLAGS"
12702_save_ldap_libs="$LIBS"
12703
12704LIBS="$LIBS $OSSL_LDAP_LIBS"
12705LDFLAGS="$LDFLAGS $OSSL_LDAP_LDFLAGS"
12706CPPFLAGS="$CPPFLAGS $OSSL_LDAP_CPPFLAGS"
12707CFLAGS="$CFLAGS $OSSL_LDAP_CFLAGS"
12708ldap_link="no"
12709
12710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12711/* end confdefs.h.  */
12712
12713#include <stdio.h>
12714#include <ldap.h>
12715#include <lber.h>
12716#include <ldap_schema.h>
12717
12718int
12719main ()
12720{
12721
12722printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12723printf("%p", ber_free);
12724return 0;
12725
12726  ;
12727  return 0;
12728}
12729_ACEOF
12730if ac_fn_c_try_link "$LINENO"; then :
12731
12732ldap_link="yes"
12733
12734fi
12735rm -f core conftest.err conftest.$ac_objext \
12736    conftest$ac_exeext conftest.$ac_ext
12737
12738CPPFLAGS="$_save_ldap_cppflags"
12739CFLAGS="$_save_ldap_cflags"
12740LDFLAGS="$_save_ldap_ldflags"
12741LIBS="$_save_ldap_libs"
12742unset _save_ldap_cppflags
12743unset _save_ldap_cflags
12744unset _save_ldap_ldflags
12745unset _save_ldap_libs
12746if test "x$ldap_link" = "xyes"; then :
12747
12748                                        LDAP_LIBS="$OSSL_LDAP_LIBS"
12749                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with static OpenSSL and sasl" >&5
12750$as_echo "with static OpenSSL and sasl" >&6; }
12751
12752else
12753
12754                                        as_fn_error $? "Not compatible with static OpenLDAP libs version of static OpenSSL: \"$OPENSSL_LDFLAGS\"" "$LINENO" 5
12755
12756fi
12757                        fi
12758
12759                        # with system OpenSSL and SASL2
12760                        if test "x$ldap_link" = "xno"; then
12761                                if test "x$static_linking_support" = "xno"; then
12762                                        TRY_LDAP_LIBS="$LDAP_LIBS -lssl -lsasl2 -lcrypto"
12763                                else
12764                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS -lsasl2 ${static_linking_support}dynamic -lssl -lcrypto"
12765                                fi
12766
12767_save_ldap_cppflags="$CPPFLAGS"
12768_save_ldap_cflags="$CFLAGS"
12769_save_ldap_ldflags="$LDFLAGS"
12770_save_ldap_libs="$LIBS"
12771
12772LIBS="$LIBS $TRY_LDAP_LIBS"
12773LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
12774CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
12775CFLAGS="$CFLAGS "
12776ldap_link="no"
12777
12778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12779/* end confdefs.h.  */
12780
12781#include <stdio.h>
12782#include <ldap.h>
12783#include <lber.h>
12784#include <ldap_schema.h>
12785
12786int
12787main ()
12788{
12789
12790printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12791printf("%p", ber_free);
12792return 0;
12793
12794  ;
12795  return 0;
12796}
12797_ACEOF
12798if ac_fn_c_try_link "$LINENO"; then :
12799
12800ldap_link="yes"
12801
12802fi
12803rm -f core conftest.err conftest.$ac_objext \
12804    conftest$ac_exeext conftest.$ac_ext
12805
12806CPPFLAGS="$_save_ldap_cppflags"
12807CFLAGS="$_save_ldap_cflags"
12808LDFLAGS="$_save_ldap_ldflags"
12809LIBS="$_save_ldap_libs"
12810unset _save_ldap_cppflags
12811unset _save_ldap_cflags
12812unset _save_ldap_ldflags
12813unset _save_ldap_libs
12814if test "x$ldap_link" = "xyes"; then :
12815
12816                                        LDAP_LIBS=$TRY_LDAP_LIBS
12817                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with system OpenSSL and static sasl2 linking" >&5
12818$as_echo "with system OpenSSL and static sasl2 linking" >&6; }
12819
12820fi
12821                        fi
12822
12823                        # with system OpenSSL
12824                        if test "x$ldap_link" = "xno"; then
12825                                if test "x$static_linking_support" = "xno"; then
12826                                        TRY_LDAP_LIBS="$LDAP_LIBS -lssl -lsasl2 -lcrypto"
12827                                else
12828                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lssl -lsasl2 -lcrypto"
12829                                fi
12830
12831_save_ldap_cppflags="$CPPFLAGS"
12832_save_ldap_cflags="$CFLAGS"
12833_save_ldap_ldflags="$LDFLAGS"
12834_save_ldap_libs="$LIBS"
12835
12836LIBS="$LIBS $TRY_LDAP_LIBS"
12837LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
12838CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
12839CFLAGS="$CFLAGS "
12840ldap_link="no"
12841
12842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12843/* end confdefs.h.  */
12844
12845#include <stdio.h>
12846#include <ldap.h>
12847#include <lber.h>
12848#include <ldap_schema.h>
12849
12850int
12851main ()
12852{
12853
12854printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12855printf("%p", ber_free);
12856return 0;
12857
12858  ;
12859  return 0;
12860}
12861_ACEOF
12862if ac_fn_c_try_link "$LINENO"; then :
12863
12864ldap_link="yes"
12865
12866fi
12867rm -f core conftest.err conftest.$ac_objext \
12868    conftest$ac_exeext conftest.$ac_ext
12869
12870CPPFLAGS="$_save_ldap_cppflags"
12871CFLAGS="$_save_ldap_cflags"
12872LDFLAGS="$_save_ldap_ldflags"
12873LIBS="$_save_ldap_libs"
12874unset _save_ldap_cppflags
12875unset _save_ldap_cflags
12876unset _save_ldap_ldflags
12877unset _save_ldap_libs
12878if test "x$ldap_link" = "xyes"; then :
12879
12880                                        LDAP_LIBS=$TRY_LDAP_LIBS
12881                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with system OpenSSL linking" >&5
12882$as_echo "with system OpenSSL linking" >&6; }
12883
12884fi
12885                        fi
12886
12887                        # with system OpenSSL for Solaris
12888                        if test "x$ldap_link" = "xno"; then
12889                                if test "x$static_linking_support" = "xno"; then
12890                                        TRY_LDAP_LIBS="$LDAP_LIBS -lssl -lsasl -lcrypto"
12891                                else
12892                                        TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lssl -lsasl -lcrypto"
12893                                fi
12894
12895_save_ldap_cppflags="$CPPFLAGS"
12896_save_ldap_cflags="$CFLAGS"
12897_save_ldap_ldflags="$LDFLAGS"
12898_save_ldap_libs="$LIBS"
12899
12900LIBS="$LIBS $TRY_LDAP_LIBS"
12901LDFLAGS="$LDFLAGS $LDAP_LDFLAGS"
12902CPPFLAGS="$CPPFLAGS $LDAP_CPPFLAGS"
12903CFLAGS="$CFLAGS "
12904ldap_link="no"
12905
12906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12907/* end confdefs.h.  */
12908
12909#include <stdio.h>
12910#include <ldap.h>
12911#include <lber.h>
12912#include <ldap_schema.h>
12913
12914int
12915main ()
12916{
12917
12918printf("%p,%p", ldap_initialize, ldap_str2attributetype);
12919printf("%p", ber_free);
12920return 0;
12921
12922  ;
12923  return 0;
12924}
12925_ACEOF
12926if ac_fn_c_try_link "$LINENO"; then :
12927
12928ldap_link="yes"
12929
12930fi
12931rm -f core conftest.err conftest.$ac_objext \
12932    conftest$ac_exeext conftest.$ac_ext
12933
12934CPPFLAGS="$_save_ldap_cppflags"
12935CFLAGS="$_save_ldap_cflags"
12936LDFLAGS="$_save_ldap_ldflags"
12937LIBS="$_save_ldap_libs"
12938unset _save_ldap_cppflags
12939unset _save_ldap_cflags
12940unset _save_ldap_ldflags
12941unset _save_ldap_libs
12942if test "x$ldap_link" = "xyes"; then :
12943
12944                                        LDAP_LIBS=$TRY_LDAP_LIBS
12945                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: with system OpenSSL and sasl linking" >&5
12946$as_echo "with system OpenSSL and sasl linking" >&6; }
12947
12948fi
12949                        fi
12950
12951                        if test "x$ldap_link" = "xno"; then
12952                                as_fn_error $? "Not found compatible version of OpenLDAP static libs" "$LINENO" 5
12953                        fi
12954                fi
12955
12956                found_ldap="yes"
12957
12958$as_echo "#define HAVE_LDAP 1" >>confdefs.h
12959
12960
12961$as_echo "#define LDAP_DEPRECATED 1" >>confdefs.h
12962
12963
12964                if test "x$enable_static" = "xyes"; then
12965                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgnutls" >&5
12966$as_echo_n "checking for main in -lgnutls... " >&6; }
12967if ${ac_cv_lib_gnutls_main+:} false; then :
12968  $as_echo_n "(cached) " >&6
12969else
12970  ac_check_lib_save_LIBS=$LIBS
12971LIBS="-lgnutls  $LIBS"
12972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12973/* end confdefs.h.  */
12974
12975
12976int
12977main ()
12978{
12979return main ();
12980  ;
12981  return 0;
12982}
12983_ACEOF
12984if ac_fn_c_try_link "$LINENO"; then :
12985  ac_cv_lib_gnutls_main=yes
12986else
12987  ac_cv_lib_gnutls_main=no
12988fi
12989rm -f core conftest.err conftest.$ac_objext \
12990    conftest$ac_exeext conftest.$ac_ext
12991LIBS=$ac_check_lib_save_LIBS
12992fi
12993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_main" >&5
12994$as_echo "$ac_cv_lib_gnutls_main" >&6; }
12995if test "x$ac_cv_lib_gnutls_main" = xyes; then :
12996  cat >>confdefs.h <<_ACEOF
12997#define HAVE_LIBGNUTLS 1
12998_ACEOF
12999
13000  LIBS="-lgnutls $LIBS"
13001
13002else
13003  as_fn_error $? "Not found GnuTLS library" "$LINENO" 5
13004fi
13005
13006                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
13007$as_echo_n "checking for main in -lpthread... " >&6; }
13008if ${ac_cv_lib_pthread_main+:} false; then :
13009  $as_echo_n "(cached) " >&6
13010else
13011  ac_check_lib_save_LIBS=$LIBS
13012LIBS="-lpthread  $LIBS"
13013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13014/* end confdefs.h.  */
13015
13016
13017int
13018main ()
13019{
13020return main ();
13021  ;
13022  return 0;
13023}
13024_ACEOF
13025if ac_fn_c_try_link "$LINENO"; then :
13026  ac_cv_lib_pthread_main=yes
13027else
13028  ac_cv_lib_pthread_main=no
13029fi
13030rm -f core conftest.err conftest.$ac_objext \
13031    conftest$ac_exeext conftest.$ac_ext
13032LIBS=$ac_check_lib_save_LIBS
13033fi
13034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5
13035$as_echo "$ac_cv_lib_pthread_main" >&6; }
13036if test "x$ac_cv_lib_pthread_main" = xyes; then :
13037  cat >>confdefs.h <<_ACEOF
13038#define HAVE_LIBPTHREAD 1
13039_ACEOF
13040
13041  LIBS="-lpthread $LIBS"
13042
13043else
13044  as_fn_error $? "Not found Pthread library" "$LINENO" 5
13045fi
13046
13047                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsasl2" >&5
13048$as_echo_n "checking for main in -lsasl2... " >&6; }
13049if ${ac_cv_lib_sasl2_main+:} false; then :
13050  $as_echo_n "(cached) " >&6
13051else
13052  ac_check_lib_save_LIBS=$LIBS
13053LIBS="-lsasl2  $LIBS"
13054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13055/* end confdefs.h.  */
13056
13057
13058int
13059main ()
13060{
13061return main ();
13062  ;
13063  return 0;
13064}
13065_ACEOF
13066if ac_fn_c_try_link "$LINENO"; then :
13067  ac_cv_lib_sasl2_main=yes
13068else
13069  ac_cv_lib_sasl2_main=no
13070fi
13071rm -f core conftest.err conftest.$ac_objext \
13072    conftest$ac_exeext conftest.$ac_ext
13073LIBS=$ac_check_lib_save_LIBS
13074fi
13075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_main" >&5
13076$as_echo "$ac_cv_lib_sasl2_main" >&6; }
13077if test "x$ac_cv_lib_sasl2_main" = xyes; then :
13078  cat >>confdefs.h <<_ACEOF
13079#define HAVE_LIBSASL2 1
13080_ACEOF
13081
13082  LIBS="-lsasl2 $LIBS"
13083
13084else
13085  as_fn_error $? "Not found SASL2 library" "$LINENO" 5
13086fi
13087
13088                fi
13089        fi
13090  fi
13091
13092
13093
13094
13095
13096  unset _libldap_with
13097
13098if test "x$want_ldap" = "xyes"; then
13099	if test "x$found_ldap" != "xyes"; then
13100		as_fn_error $? "Invalid LDAP directory - unable to find ldap.h" "$LINENO" 5
13101	fi
13102fi
13103SERVER_LDFLAGS="$SERVER_LDFLAGS $LDAP_LDFLAGS"
13104SERVER_LIBS="$SERVER_LIBS $LDAP_LIBS"
13105
13106PROXY_LDFLAGS="$PROXY_LDFLAGS $LDAP_LDFLAGS"
13107PROXY_LIBS="$PROXY_LIBS $LDAP_LIBS"
13108
13109AGENT_LDFLAGS="$AGENT_LDFLAGS $LDAP_LDFLAGS"
13110AGENT_LIBS="$AGENT_LIBS $LDAP_LIBS"
13111
13112
13113
13114found_curl="no"
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135  _libcurl_config="no"
13136
13137
13138# Check whether --with-libcurl was given.
13139if test "${with_libcurl+set}" = set; then :
13140  withval=$with_libcurl;
13141        if test "x$withval" = "xno"; then
13142            want_curl="no"
13143        elif test "x$withval" = "xyes"; then
13144            want_curl="yes"
13145        else
13146            want_curl="yes"
13147            _libcurl_config=$withval
13148        fi
13149
13150else
13151  want_curl=no
13152fi
13153
13154
13155	if test "x$want_curl" != "xno"; then
13156
13157		for ac_prog in gawk mawk nawk awk
13158do
13159  # Extract the first word of "$ac_prog", so it can be a program name with args.
13160set dummy $ac_prog; ac_word=$2
13161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13162$as_echo_n "checking for $ac_word... " >&6; }
13163if ${ac_cv_prog_AWK+:} false; then :
13164  $as_echo_n "(cached) " >&6
13165else
13166  if test -n "$AWK"; then
13167  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13168else
13169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13170for as_dir in $PATH
13171do
13172  IFS=$as_save_IFS
13173  test -z "$as_dir" && as_dir=.
13174    for ac_exec_ext in '' $ac_executable_extensions; do
13175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13176    ac_cv_prog_AWK="$ac_prog"
13177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13178    break 2
13179  fi
13180done
13181  done
13182IFS=$as_save_IFS
13183
13184fi
13185fi
13186AWK=$ac_cv_prog_AWK
13187if test -n "$AWK"; then
13188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13189$as_echo "$AWK" >&6; }
13190else
13191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13192$as_echo "no" >&6; }
13193fi
13194
13195
13196  test -n "$AWK" && break
13197done
13198
13199
13200		_libcurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[1]+256*A[2]+A[3]; print X;}'"
13201
13202		_libcurl_try_link=no
13203
13204		# Extract the first word of "curl-config", so it can be a program name with args.
13205set dummy curl-config; ac_word=$2
13206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13207$as_echo_n "checking for $ac_word... " >&6; }
13208if ${ac_cv_path__libcurl_config+:} false; then :
13209  $as_echo_n "(cached) " >&6
13210else
13211  case $_libcurl_config in
13212  [\\/]* | ?:[\\/]*)
13213  ac_cv_path__libcurl_config="$_libcurl_config" # Let the user override the test with a path.
13214  ;;
13215  *)
13216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13217for as_dir in $PATH
13218do
13219  IFS=$as_save_IFS
13220  test -z "$as_dir" && as_dir=.
13221    for ac_exec_ext in '' $ac_executable_extensions; do
13222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13223    ac_cv_path__libcurl_config="$as_dir/$ac_word$ac_exec_ext"
13224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13225    break 2
13226  fi
13227done
13228  done
13229IFS=$as_save_IFS
13230
13231  ;;
13232esac
13233fi
13234_libcurl_config=$ac_cv_path__libcurl_config
13235if test -n "$_libcurl_config"; then
13236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_libcurl_config" >&5
13237$as_echo "$_libcurl_config" >&6; }
13238else
13239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13240$as_echo "no" >&6; }
13241fi
13242
13243
13244
13245		if test -x "$_libcurl_config"; then
13246			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the version of libcurl" >&5
13247$as_echo_n "checking for the version of libcurl... " >&6; }
13248if ${libcurl_cv_lib_curl_version+:} false; then :
13249  $as_echo_n "(cached) " >&6
13250else
13251  libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $2}'`
13252
13253fi
13254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_curl_version" >&5
13255$as_echo "$libcurl_cv_lib_curl_version" >&6; }
13256
13257			_libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
13258			_libcurl_wanted=`echo 7.13.1 | $_libcurl_version_parse`
13259
13260			if test $_libcurl_wanted -gt 0; then
13261				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl >= version 7.13.1" >&5
13262$as_echo_n "checking for libcurl >= version 7.13.1... " >&6; }
13263if ${libcurl_cv_lib_version_ok+:} false; then :
13264  $as_echo_n "(cached) " >&6
13265else
13266
13267						if test $_libcurl_version -ge $_libcurl_wanted; then
13268							libcurl_cv_lib_version_ok=yes
13269							else
13270							libcurl_cv_lib_version_ok=no
13271						fi
13272
13273
13274fi
13275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_version_ok" >&5
13276$as_echo "$libcurl_cv_lib_version_ok" >&6; }
13277			fi
13278
13279			if test $_libcurl_wanted -eq 0 || test "x$libcurl_cv_lib_version_ok" = "xyes"; then
13280				if test "x$LIBCURL_CFLAGS" = "x"; then
13281					LIBCURL_CFLAGS=`$_libcurl_config --cflags`
13282				fi
13283
13284				if test "x$LIBCURL_LIBS" = "x"; then
13285					_curl_dir_lib=`$_libcurl_config --prefix`
13286					_curl_dir_lib="$_curl_dir_lib/lib"
13287					_full_libcurl_libs=`$_libcurl_config --libs`
13288					for i in $_full_libcurl_libs; do
13289						case $i in
13290							-L*)
13291								LIBCURL_LDFLAGS="$LIBCURL_LDFLAGS $i"
13292						;;
13293							-R*)
13294								LIBCURL_LDFLAGS="$LIBCURL_LDFLAGS -Wl,$i"
13295						;;
13296							-lcurl)
13297								if test "x$enable_static_libs" = "xyes" -a "x$static_linking_support" = "xno"; then
13298									i="$_curl_dir_lib/libcurl.a"
13299								elif test "x$enable_static_libs" = "xyes"; then
13300									i="${static_linking_support}static $i ${static_linking_support}dynamic"
13301								fi
13302								LIBCURL_LIBS="$LIBCURL_LIBS $i"
13303						;;
13304							-l*)
13305								if test "x$enable_static_libs" = "xyes"; then
13306									_lib_name=`echo "$i" | cut -b3-`
13307									test -f "$_curl_dir_lib/lib$_lib_name.a" && i="$_curl_dir_lib/lib$_lib_name.a"
13308								fi
13309								LIBCURL_LIBS="$LIBCURL_LIBS $i"
13310						;;
13311						esac
13312					done
13313
13314					_save_curl_cflags="$CFLAGS"
13315					_save_curl_ldflags="$LDFLAGS"
13316					_save_curl_libs="$LIBS"
13317					CFLAGS="$CFLAGS $LIBCURL_CFLAGS"
13318					LDFLAGS="$LDFLAGS $LIBCURL_LDFLAGS"
13319					if test "x$enable_static_libs" = "xyes"; then
13320						test "x$want_openssl" = "xyes" && CFLAGS="$OPENSSL_CFLAGS $CFLAGS"
13321						test "x$want_openssl" = "xyes" && LDFLAGS="$OPENSSL_LDFLAGS $LDFLAGS"
13322						test "x$want_ldap" = "xyes" && CFLAGS="$LDAP_CPPFLAGS $CFLAGS"
13323						test "x$want_ldap" = "xyes" && LDFLAGS="$LDAP_LDFLAGS $LDFLAGS"
13324					fi
13325
13326					if test "x$enable_static" = "xyes" -o "x$enable_static_libs" = "xyes"; then
13327						_full_libcurl_libs=`$_libcurl_config --static-libs`
13328
13329						if test "x$enable_static_libs" = "xyes" -a -z "$LIBPTHREAD_LIBS"; then
13330
13331
13332# Check whether --with-libpthread was given.
13333if test "${with_libpthread+set}" = set; then :
13334  withval=$with_libpthread;
13335			test "x$withval" = "xyes" && withval=/usr
13336			LIBPTHREAD_CFLAGS="-I$withval/include"
13337			LIBPTHREAD_LDFLAGS="-L$withval/lib"
13338			_libpthread_dir_set="yes"
13339
13340
13341fi
13342
13343
13344
13345# Check whether --with-libpthread-include was given.
13346if test "${with_libpthread_include+set}" = set; then :
13347  withval=$with_libpthread_include;
13348			LIBPTHREAD_CFLAGS="-I$withval"
13349			_libpthread_dir_set="yes"
13350
13351
13352fi
13353
13354
13355
13356# Check whether --with-libpthread-lib was given.
13357if test "${with_libpthread_lib+set}" = set; then :
13358  withval=$with_libpthread_lib;
13359			LIBPTHREAD_LDFLAGS="-L$withval"
13360			_libpthread_dir_set="yes"
13361
13362
13363fi
13364
13365
13366	ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
13367if test "x$ac_cv_header_pthread_h" = xyes; then :
13368  found_libpthread=yes
13369fi
13370
13371
13372	LIBPTHREAD_LIBS="-lpthread"
13373	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for process shared libpthread support" >&5
13374$as_echo_n "checking for process shared libpthread support... " >&6; }
13375
13376	if test -n "$_libpthread_dir_set" -o "x$found_libpthread" = xyes; then
13377		found_libpthread="yes"
13378	elif test -f /usr/local/include/pthread.h; then
13379		LIBPTHREAD_CFLAGS="-I/usr/local/include"
13380		LIBPTHREAD_LDFLAGS="-L/usr/local/lib"
13381		found_libpthread="yes"
13382	elif test -f /usr/pkg/include/pthread.h; then
13383		LIBPTHREAD_CFLAGS="-I/usr/pkg/include"
13384		LIBPTHREAD_LDFLAGS="-L/usr/pkg/lib"
13385		LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS -Wl,-R/usr/pkg/lib"
13386		found_libpthread="yes"
13387	elif test -f /opt/csw/include/pthread.h; then
13388		LIBPTHREAD_CFLAGS="-I/opt/csw/include"
13389		LIBPTHREAD_LDFLAGS="-L/opt/csw/lib"
13390		if $(echo "$CFLAGS"|grep -q -- "-m64") ; then
13391			LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS/64 -Wl,-R/opt/csw/lib/64"
13392		else
13393			LIBPTHREAD_LDFLAGS="$LIBPTHREAD_LDFLAGS -Wl,-R/opt/csw/lib"
13394		fi
13395		found_libpthread="yes"
13396	else
13397		found_libpthread="no"
13398		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13399$as_echo "no" >&6; }
13400	fi
13401
13402	if test "x$found_libpthread" = "xyes"; then
13403		am_save_CFLAGS="$CFLAGS"
13404		am_save_LDFLAGS="$LDFLAGS"
13405		am_save_LIBS="$LIBS"
13406
13407		CFLAGS="$CFLAGS $LIBPTHREAD_CFLAGS"
13408		LDFLAGS="$LDFLAGS $LIBPTHREAD_LDFLAGS"
13409		LIBS="$LIBS $LIBPTHREAD_LIBS"
13410
13411		found_libpthread="no"
13412		found_libpthread_process_shared="no"
13413
13414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13415/* end confdefs.h.  */
13416
13417#include <pthread.h>
13418
13419int
13420main ()
13421{
13422
13423	pthread_mutexattr_t	mta;
13424	pthread_mutex_t		mutex;
13425
13426	pthread_mutexattr_init(&mta);
13427	pthread_mutex_init(&mutex, &mta);
13428
13429  ;
13430  return 0;
13431}
13432_ACEOF
13433if ac_fn_c_try_link "$LINENO"; then :
13434  found_libpthread="yes"
13435fi
13436rm -f core conftest.err conftest.$ac_objext \
13437    conftest$ac_exeext conftest.$ac_ext
13438
13439
13440	if test "$cross_compiling" = yes; then :
13441  found_libpthread_process_shared="no"
13442else
13443  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13444/* end confdefs.h.  */
13445
13446		#include <pthread.h>
13447
13448		int	main()
13449		{
13450			pthread_mutexattr_t	mta;
13451			pthread_rwlockattr_t	rwa;
13452			pthread_mutex_t		mutex;
13453			pthread_rwlock_t	rwlock;
13454
13455			if (0 != pthread_mutexattr_init(&mta))
13456				return 1;
13457
13458			if (0 != pthread_mutexattr_setpshared(&mta, PTHREAD_PROCESS_SHARED))
13459				return 2;
13460
13461			if (0 != pthread_mutex_init(&mutex, &mta))
13462				return 3;
13463
13464			if (0 != pthread_rwlockattr_init(&rwa))
13465				return 4;
13466
13467			if (0 != pthread_rwlockattr_setpshared(&rwa, PTHREAD_PROCESS_SHARED))
13468				return 5;
13469
13470			if (0 != pthread_rwlock_init(&rwlock, &rwa))
13471				return 6;
13472
13473			return 0;
13474		}
13475
13476
13477
13478_ACEOF
13479if ac_fn_c_try_run "$LINENO"; then :
13480  found_libpthread_process_shared="yes"
13481else
13482  found_libpthread_process_shared="no"
13483fi
13484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13485  conftest.$ac_objext conftest.beam conftest.$ac_ext
13486fi
13487
13488
13489
13490		CFLAGS="$am_save_CFLAGS"
13491		LDFLAGS="$am_save_LDFLAGS"
13492		LIBS="$am_save_LIBS"
13493	fi
13494
13495	if test "x$found_libpthread" = "xyes"; then
13496		if test "x$found_libpthread_process_shared" = "xyes"; then
13497
13498$as_echo "#define HAVE_PTHREAD_PROCESS_SHARED 1" >>confdefs.h
13499
13500		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13501$as_echo "yes" >&6; }
13502		else
13503		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13504$as_echo "no" >&6; }
13505		fi
13506	else
13507		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13508$as_echo "no" >&6; }
13509		LIBPTHREAD_CFLAGS=""
13510		LIBPTHREAD_LDFLAGS=""
13511		LIBPTHREAD_LIBS=""
13512	fi
13513
13514
13515
13516
13517
13518							if test "x$found_libpthread" != "xyes"; then
13519								as_fn_error $? "Unable to use libpthread (libpthread check failed)" "$LINENO" 5
13520							fi
13521							_full_libcurl_libs="$LIBPTHREAD_LIBS $_full_libcurl_libs"
13522						fi
13523
13524						for i in $_full_libcurl_libs; do
13525							case $i in
13526								-lcurl)
13527							;;
13528								-l*)
13529									_lib_i=$i
13530									_lib_name=`echo "$i" | cut -b3-`
13531									as_ac_Lib=`$as_echo "ac_cv_lib_$_lib_name ''_main" | $as_tr_sh`
13532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$_lib_name " >&5
13533$as_echo_n "checking for main in -l$_lib_name ... " >&6; }
13534if eval \${$as_ac_Lib+:} false; then :
13535  $as_echo_n "(cached) " >&6
13536else
13537  ac_check_lib_save_LIBS=$LIBS
13538LIBS="-l$_lib_name   $LIBS"
13539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13540/* end confdefs.h.  */
13541
13542
13543int
13544main ()
13545{
13546return main ();
13547  ;
13548  return 0;
13549}
13550_ACEOF
13551if ac_fn_c_try_link "$LINENO"; then :
13552  eval "$as_ac_Lib=yes"
13553else
13554  eval "$as_ac_Lib=no"
13555fi
13556rm -f core conftest.err conftest.$ac_objext \
13557    conftest$ac_exeext conftest.$ac_ext
13558LIBS=$ac_check_lib_save_LIBS
13559fi
13560eval ac_res=\$$as_ac_Lib
13561	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13562$as_echo "$ac_res" >&6; }
13563if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
13564
13565										if test "x$enable_static_libs" = "xyes"; then
13566											case $i in
13567												-lssl|-lcrypto)
13568													test "x$want_openssl" = "xyes" && i="$OPENSSL_LIBS"
13569											;;
13570												-lldap|-lldap_r|-llber)
13571													test "x$want_ldap" = "xyes" && i="$LDAP_LIBS"
13572											;;
13573												-l*)
13574													test -f "$_curl_dir_lib/lib$_lib_name.a" && i="$_curl_dir_lib/lib$_lib_name.a"
13575											;;
13576											esac
13577										fi
13578										test -z "${LIBCURL_LIBS##*$_lib_i*}" && LIBCURL_LIBS=`echo "$LIBCURL_LIBS"|sed "s|$_lib_i||g"`
13579										test -z "${LIBCURL_LIBS##*$i*}" || LIBCURL_LIBS="$LIBCURL_LIBS $i"
13580
13581else
13582
13583										as_fn_error $? "static library $_lib_name required for linking libcurl not found" "$LINENO" 5
13584
13585fi
13586
13587							;;
13588								-framework|CoreFoundation|Security)
13589									LIBCURL_LIBS="$LIBCURL_LIBS $i"
13590							;;
13591							esac
13592						done
13593					fi # "x$enable_static" or "x$enable_static_libs"
13594
13595					LIBS="$LIBS $LIBCURL_LIBS"
13596
13597					{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcurl" >&5
13598$as_echo_n "checking for main in -lcurl... " >&6; }
13599if ${ac_cv_lib_curl_main+:} false; then :
13600  $as_echo_n "(cached) " >&6
13601else
13602  ac_check_lib_save_LIBS=$LIBS
13603LIBS="-lcurl  $LIBS"
13604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13605/* end confdefs.h.  */
13606
13607
13608int
13609main ()
13610{
13611return main ();
13612  ;
13613  return 0;
13614}
13615_ACEOF
13616if ac_fn_c_try_link "$LINENO"; then :
13617  ac_cv_lib_curl_main=yes
13618else
13619  ac_cv_lib_curl_main=no
13620fi
13621rm -f core conftest.err conftest.$ac_objext \
13622    conftest$ac_exeext conftest.$ac_ext
13623LIBS=$ac_check_lib_save_LIBS
13624fi
13625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_main" >&5
13626$as_echo "$ac_cv_lib_curl_main" >&6; }
13627if test "x$ac_cv_lib_curl_main" = xyes; then :
13628  cat >>confdefs.h <<_ACEOF
13629#define HAVE_LIBCURL 1
13630_ACEOF
13631
13632  LIBS="-lcurl $LIBS"
13633
13634else
13635  as_fn_error $? "libcurl library not found" "$LINENO" 5
13636fi
13637
13638
13639					CFLAGS="$_save_curl_cflags"
13640					LDFLAGS="$_save_curl_ldflags"
13641					LIBS="$_save_curl_libs"
13642					unset _save_curl_cflags
13643					unset _save_curl_ldflags
13644					unset _save_curl_libs
13645
13646					# This is so silly, but Apple actually has a bug in their
13647					# curl-config script.  Fixed in Tiger, but there are still
13648					# lots of Panther installs around.
13649					case "${host}" in
13650						powerpc-apple-darwin7*)
13651							LIBCURL_LIBS=`echo $LIBCURL_LIBS | sed -e 's|-arch i386||g'`
13652						;;
13653					esac
13654				fi # "x$LIBCURL_LIBS" = "x"
13655
13656				# All curl-config scripts support --feature
13657				_libcurl_features=`$_libcurl_config --feature`
13658
13659				# Is it modern enough to have --protocols? (7.12.4)
13660				if test $_libcurl_version -ge 461828; then
13661					_libcurl_protocols=`$_libcurl_config --protocols`
13662				fi
13663
13664				_libcurl_try_link=yes
13665			fi # $_libcurl_wanted -eq 0 || "x$libcurl_cv_lib_version_ok" = "xyes"
13666
13667			unset _libcurl_wanted
13668		fi # -x "$_libcurl_config"
13669
13670		if test "x$_libcurl_try_link" = "xyes"; then
13671			# we didn't find curl-config, so let's see if the user-supplied
13672			# link line (or failing that, "-lcurl") is enough.
13673
13674			LIBCURL_LIBS=${LIBCURL_LIBS-"$_libcurl_libs -lcurl"}
13675
13676			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libcurl is usable" >&5
13677$as_echo_n "checking whether libcurl is usable... " >&6; }
13678if ${libcurl_cv_lib_curl_usable+:} false; then :
13679  $as_echo_n "(cached) " >&6
13680else
13681
13682				_save_curl_libs="${LIBS}"
13683				_save_curl_ldflags="${LDFLAGS}"
13684				_save_curl_cflags="${CFLAGS}"
13685				LIBS="${LIBS} ${LIBCURL_LIBS}"
13686				LDFLAGS="${LDFLAGS} ${LIBCURL_LDFLAGS}"
13687				CFLAGS="${CFLAGS} ${LIBCURL_CFLAGS}"
13688				if test "x$enable_static_libs" = "xyes"; then
13689					test "x$want_openssl" = "xyes" && CFLAGS=" $OPENSSL_CFLAGS $CFLAGS"
13690					test "x$want_openssl" = "xyes" && LDFLAGS="$OPENSSL_LDFLAGS $LDFLAGS"
13691					test "x$want_ldap" = "xyes" && CFLAGS="$LDAP_CPPFLAGS $CFLAGS"
13692					test "x$want_ldap" = "xyes" && LDFLAGS="$LDAP_LDFLAGS $LDFLAGS"
13693				fi
13694
13695				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13696/* end confdefs.h.  */
13697#include <curl/curl.h>
13698#ifndef NULL
13699#define NULL (void *)0
13700#endif
13701int
13702main ()
13703{
13704
13705/* Try and use a few common options to force a failure if we are
13706   missing symbols or can't link. */
13707int x;
13708curl_easy_setopt(NULL,CURLOPT_URL,NULL);
13709x=CURL_ERROR_SIZE;
13710x=CURLOPT_WRITEFUNCTION;
13711x=CURLOPT_FILE;
13712x=CURLOPT_ERRORBUFFER;
13713x=CURLOPT_STDERR;
13714x=CURLOPT_VERBOSE;
13715
13716  ;
13717  return 0;
13718}
13719_ACEOF
13720if ac_fn_c_try_link "$LINENO"; then :
13721  libcurl_cv_lib_curl_usable=yes
13722else
13723  libcurl_cv_lib_curl_usable=no
13724fi
13725rm -f core conftest.err conftest.$ac_objext \
13726    conftest$ac_exeext conftest.$ac_ext
13727
13728				LIBS="${_save_curl_libs}"
13729				LDFLAGS="${_save_curl_ldflags}"
13730				CFLAGS="${_save_curl_cflags}"
13731				unset _save_curl_libs
13732				unset _save_curl_ldflags
13733				unset _save_curl_cflags
13734
13735fi
13736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libcurl_cv_lib_curl_usable" >&5
13737$as_echo "$libcurl_cv_lib_curl_usable" >&6; }
13738
13739			if test "x$libcurl_cv_lib_curl_usable" = "xno"; then
13740				link_mode="dynamic"
13741				if test "x$enable_static" = "xyes"; then
13742					link_mode="static"
13743				fi
13744				as_fn_error $? "libcurl is not available for ${link_mode} linking" "$LINENO" 5
13745			fi
13746
13747			# Does curl_free() exist in this version of libcurl?
13748			# If not, fake it with free()
13749
13750			_save_curl_libs="${LIBS}"
13751			_save_curl_ldflags="${LDFLAGS}"
13752			_save_curl_cflags="${CFLAGS}"
13753			LIBS="${LIBS} ${LIBCURL_LIBS}"
13754			LDFLAGS="${LDFLAGS} ${LIBCURL_LDFLAGS}"
13755			CFLAGS="${CFLAGS} ${LIBCURL_CFLAGS}"
13756
13757			ac_fn_c_check_func "$LINENO" "curl_free" "ac_cv_func_curl_free"
13758if test "x$ac_cv_func_curl_free" = xyes; then :
13759
13760else
13761
13762$as_echo "#define curl_free free" >>confdefs.h
13763
13764fi
13765
13766
13767			ac_fn_c_check_func "$LINENO" "curl_easy_escape" "ac_cv_func_curl_easy_escape"
13768if test "x$ac_cv_func_curl_easy_escape" = xyes; then :
13769
13770$as_echo "#define HAVE_FUNCTION_CURL_EASY_ESCAPE 1" >>confdefs.h
13771
13772fi
13773
13774
13775			LIBS="${_save_curl_libs}"
13776			LDFLAGS="${_save_curl_ldflags}"
13777			CFLAGS="${_save_curl_cflags}"
13778			unset _save_curl_libs
13779			unset _save_curl_ldflags
13780			unset _save_curl_cflags
13781
13782
13783$as_echo "#define HAVE_LIBCURL 1" >>confdefs.h
13784
13785
13786
13787
13788			found_curl="yes"
13789
13790			for _libcurl_feature in $_libcurl_features ; do
13791				cat >>confdefs.h <<_ACEOF
13792#define `$as_echo "libcurl_feature_$_libcurl_feature" | $as_tr_cpp` 1
13793_ACEOF
13794
13795				eval `$as_echo "libcurl_feature_$_libcurl_feature" | $as_tr_sh`=yes
13796			done
13797
13798			if test "x$_libcurl_protocols" = "x"; then
13799				# We don't have --protocols, so just assume that all
13800				# protocols are available
13801				_libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT"
13802
13803				if test "x$libcurl_feature_SSL" = "xyes"; then
13804					_libcurl_protocols="$_libcurl_protocols HTTPS"
13805
13806					# FTPS wasn't standards-compliant until version
13807					# 7.11.0
13808					if test $_libcurl_version -ge 461568; then
13809						_libcurl_protocols="$_libcurl_protocols FTPS"
13810					fi
13811				fi
13812			fi
13813
13814			for _libcurl_protocol in $_libcurl_protocols ; do
13815				cat >>confdefs.h <<_ACEOF
13816#define `$as_echo "libcurl_protocol_$_libcurl_protocol" | $as_tr_cpp` 1
13817_ACEOF
13818
13819				eval `$as_echo "libcurl_protocol_$_libcurl_protocol" | $as_tr_sh`=yes
13820			done
13821		else
13822			unset LIBCURL_LIBS
13823			unset LIBCURL_CFLAGS
13824		fi # "x$_libcurl_try_link" = "xyes"
13825
13826		unset _libcurl_try_link
13827		unset _libcurl_version_parse
13828		unset _libcurl_config
13829		unset _libcurl_feature
13830		unset _libcurl_features
13831		unset _libcurl_protocol
13832		unset _libcurl_protocols
13833		unset _libcurl_version
13834		unset _libcurl_libs
13835	fi # "x$want_curl" != "xno"
13836
13837  if test "x$want_curl" = "xno" || test "x$libcurl_cv_lib_curl_usable" != "xyes"; then
13838     # This is the IF-NO path
13839     :
13840  else
13841     # This is the IF-YES path
13842     :
13843  fi
13844
13845
13846if test "x$want_curl" = "xyes"; then
13847	if test "x$found_curl" != "xyes"; then
13848		as_fn_error $? "Curl library not found" "$LINENO" 5
13849	fi
13850fi
13851if test "x$found_curl" = "xyes"; then
13852	have_web_monitoring="cURL"
13853fi
13854CFLAGS="$LIBCURL_CFLAGS $CFLAGS"
13855
13856SERVER_LDFLAGS="$SERVER_LDFLAGS $LIBCURL_LDFLAGS"
13857SERVER_LIBS="$SERVER_LIBS $LIBCURL_LIBS"
13858
13859PROXY_LDFLAGS="$PROXY_LDFLAGS $LIBCURL_LDFLAGS"
13860PROXY_LIBS="$PROXY_LIBS $LIBCURL_LIBS"
13861
13862 if test "x$found_curl" = "xyes"; then
13863  HAVE_LIBCURL_TRUE=
13864  HAVE_LIBCURL_FALSE='#'
13865else
13866  HAVE_LIBCURL_TRUE='#'
13867  HAVE_LIBCURL_FALSE=
13868fi
13869
13870
13871AGENT_LDFLAGS="$AGENT_LDFLAGS $LIBCURL_LDFLAGS"
13872AGENT_LIBS="$AGENT_LIBS $LIBCURL_LIBS"
13873
13874ZBXGET_LDFLAGS="$ZBXGET_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
13875ZBXGET_LIBS="$ZBXGET_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
13876
13877SENDER_LDFLAGS="$SENDER_LDFLAGS $ZLIB_LDFLAGS $LIBPTHREAD_LDFLAGS"
13878SENDER_LIBS="$SENDER_LIBS $ZLIB_LIBS $LIBPTHREAD_LIBS"
13879
13880ZBXJS_LDFLAGS="$ZBXJS_LDFLAGS $LIBCURL_LDFLAGS"
13881ZBXJS_LIBS="$ZBXJS_LIBS $LIBCURL_LIBS"
13882
13883if test "x$server" = "xyes" || test "x$proxy" = "xyes" || test "x$agent" = "xyes" || test "x$agent2" = "xyes"; then
13884
13885
13886# Check whether --with-libpcre was given.
13887if test "${with_libpcre+set}" = set; then :
13888  withval=$with_libpcre;
13889			if test "$withval" = "yes"; then
13890				if test -f /usr/local/include/pcre.h; then
13891					withval="/usr/local"
13892				else
13893					withval="/usr"
13894				fi
13895			else
13896				_libpcre_dir_lib="$withval/lib"
13897			fi
13898			_libpcre_dir="$withval"
13899			test "x$withval" = "xyes" && withval=/usr
13900			LIBPCRE_CFLAGS="-I$withval/include"
13901			LIBPCRE_LDFLAGS="-L$withval/lib"
13902			_libpcre_dir_set="yes"
13903
13904
13905fi
13906
13907
13908
13909# Check whether --with-libpcre-include was given.
13910if test "${with_libpcre_include+set}" = set; then :
13911  withval=$with_libpcre_include;
13912			LIBPCRE_CFLAGS="-I$withval"
13913			_libpcre_dir_set="yes"
13914
13915
13916fi
13917
13918
13919
13920# Check whether --with-libpcre-lib was given.
13921if test "${with_libpcre_lib+set}" = set; then :
13922  withval=$with_libpcre_lib;
13923			_libpcre_dir="$withval"
13924			_libpcre_dir_lib="$withval"
13925			LIBPCRE_LDFLAGS="-L$withval"
13926			_libpcre_dir_set="yes"
13927
13928
13929fi
13930
13931
13932	if test "x$enable_static_libs" = "xyes"; then
13933
13934
13935
13936
13937
13938
13939
13940
13941if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
13942	if test -n "$ac_tool_prefix"; then
13943  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
13944set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
13945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13946$as_echo_n "checking for $ac_word... " >&6; }
13947if ${ac_cv_path_PKG_CONFIG+:} false; then :
13948  $as_echo_n "(cached) " >&6
13949else
13950  case $PKG_CONFIG in
13951  [\\/]* | ?:[\\/]*)
13952  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13953  ;;
13954  *)
13955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13956for as_dir in $PATH
13957do
13958  IFS=$as_save_IFS
13959  test -z "$as_dir" && as_dir=.
13960    for ac_exec_ext in '' $ac_executable_extensions; do
13961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13962    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13964    break 2
13965  fi
13966done
13967  done
13968IFS=$as_save_IFS
13969
13970  ;;
13971esac
13972fi
13973PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13974if test -n "$PKG_CONFIG"; then
13975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
13976$as_echo "$PKG_CONFIG" >&6; }
13977else
13978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13979$as_echo "no" >&6; }
13980fi
13981
13982
13983fi
13984if test -z "$ac_cv_path_PKG_CONFIG"; then
13985  ac_pt_PKG_CONFIG=$PKG_CONFIG
13986  # Extract the first word of "pkg-config", so it can be a program name with args.
13987set dummy pkg-config; ac_word=$2
13988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13989$as_echo_n "checking for $ac_word... " >&6; }
13990if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
13991  $as_echo_n "(cached) " >&6
13992else
13993  case $ac_pt_PKG_CONFIG in
13994  [\\/]* | ?:[\\/]*)
13995  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
13996  ;;
13997  *)
13998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13999for as_dir in $PATH
14000do
14001  IFS=$as_save_IFS
14002  test -z "$as_dir" && as_dir=.
14003    for ac_exec_ext in '' $ac_executable_extensions; do
14004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14005    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14007    break 2
14008  fi
14009done
14010  done
14011IFS=$as_save_IFS
14012
14013  ;;
14014esac
14015fi
14016ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
14017if test -n "$ac_pt_PKG_CONFIG"; then
14018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
14019$as_echo "$ac_pt_PKG_CONFIG" >&6; }
14020else
14021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14022$as_echo "no" >&6; }
14023fi
14024
14025  if test "x$ac_pt_PKG_CONFIG" = x; then
14026    PKG_CONFIG=""
14027  else
14028    case $cross_compiling:$ac_tool_warned in
14029yes:)
14030{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14031$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14032ac_tool_warned=yes ;;
14033esac
14034    PKG_CONFIG=$ac_pt_PKG_CONFIG
14035  fi
14036else
14037  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
14038fi
14039
14040fi
14041if test -n "$PKG_CONFIG"; then
14042	_pkg_min_version=0.9.0
14043	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
14044$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
14045	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
14046		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14047$as_echo "yes" >&6; }
14048	else
14049		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14050$as_echo "no" >&6; }
14051		PKG_CONFIG=""
14052	fi
14053fi
14054		test -z "$PKG_CONFIG" -a -z "$_libpcre_dir_lib" && as_fn_error $? "Not found pkg-config library" "$LINENO" 5
14055
14056	fi
14057
14058	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpcre support" >&5
14059$as_echo_n "checking for libpcre support... " >&6; }
14060
14061	LIBPCRE_LIBS="-lpcre"
14062
14063	if test "x$enable_static" = "xyes"; then
14064		LIBPCRE_LIBS=" $LIBPCRE_LIBS -lpthread"
14065	elif test "x$enable_static_libs" = "xyes" -a -z "$PKG_CONFIG"; then
14066		LIBPCRE_LIBS="$_libpcre_dir_lib/libpcre.a"
14067	elif test "x$enable_static_libs" = "xyes"; then
14068
14069		test "x$static_linking_support" = "xno" -a -z "$_libpcre_dir_lib" && as_fn_error $? "\"Compiler not support statically linked libs from default folders\"" "$LINENO" 5
14070
14071		if test -z "$_libpcre_dir_lib"; then
14072			if test -n "$PKG_CONFIG" && \
14073    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre\""; } >&5
14074  ($PKG_CONFIG --exists --print-errors "libpcre") 2>&5
14075  ac_status=$?
14076  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14077  test $ac_status = 0; }; then
14078
14079				LIBPCRE_LIBS=`$PKG_CONFIG --static --libs libpcre`
14080
14081else
14082
14083				as_fn_error $? "Not found libpcre package" "$LINENO" 5
14084
14085fi
14086		else
14087			{ { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR=\"\$_libpcre_dir_lib/pkgconfig\" \$PKG_CONFIG --exists --print-errors libpcre"; } >&5
14088  (PKG_CONFIG_LIBDIR="$_libpcre_dir_lib/pkgconfig" $PKG_CONFIG --exists --print-errors libpcre) 2>&5
14089  ac_status=$?
14090  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14091  test $ac_status = 0; } || as_fn_error $? "\"Not found libpcre package in $_libpcre_dir/lib/pkgconfig\"" "$LINENO" 5
14092			LIBPCRE_LIBS=`PKG_CONFIG_LIBDIR="$_libpcre_dir_lib/pkgconfig" $PKG_CONFIG --static --libs libpcre`
14093			test -z "$LIBPCRE_LIBS" && LIBPCRE_LIBS=`PKG_CONFIG_LIBDIR="$_libpcre_dir_lib/pkgconfig" $PKG_CONFIG --libs libpcre`
14094		fi
14095
14096		if test "x$static_linking_support" = "xno"; then
14097			LIBPCRE_LIBS=`echo "$LIBPCRE_LIBS"|sed "s|-lpcre|$_libpcre_dir_lib/libpcre.a|g"`
14098		else
14099			LIBPCRE_LIBS=`echo "$LIBPCRE_LIBS"|sed "s/-lpcre/${static_linking_support}static -lpcre ${static_linking_support}dynamic/g"`
14100		fi
14101	fi
14102
14103	if test -n "$_libpcre_dir_set" -o -f /usr/include/pcre.h; then
14104		found_libpcre="yes"
14105	elif test -f /usr/local/include/pcre.h; then
14106		LIBPCRE_CFLAGS="-I/usr/local/include"
14107		LIBPCRE_LDFLAGS="-L/usr/local/lib"
14108		found_libpcre="yes"
14109	elif test -f /usr/pkg/include/pcre.h; then
14110		LIBPCRE_CFLAGS="-I/usr/pkg/include"
14111		LIBPCRE_LDFLAGS="-L/usr/pkg/lib"
14112		LIBPCRE_LDFLAGS="$LIBPCRE_LDFLAGS -Wl,-R/usr/pkg/lib"
14113		found_libpcre="yes"
14114	elif test -f /opt/csw/include/pcre.h; then
14115		LIBPCRE_CFLAGS="-I/opt/csw/include"
14116		LIBPCRE_LDFLAGS="-L/opt/csw/lib"
14117		if $(echo "$CFLAGS"|grep -q -- "-m64") ; then
14118			LIBPCRE_LDFLAGS="$LIBPCRE_LDFLAGS/64 -Wl,-R/opt/csw/lib/64"
14119		else
14120			LIBPCRE_LDFLAGS="$LIBPCRE_LDFLAGS -Wl,-R/opt/csw/lib"
14121		fi
14122		found_libpcre="yes"
14123	else
14124		found_libpcre="no"
14125		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14126$as_echo "no" >&6; }
14127	fi
14128
14129	if test "x$found_libpcre" = "xyes"; then
14130		am_save_CFLAGS="$CFLAGS"
14131		am_save_LDFLAGS="$LDFLAGS"
14132		am_save_LIBS="$LIBS"
14133
14134		CFLAGS="$CFLAGS $LIBPCRE_CFLAGS"
14135		LDFLAGS="$LDFLAGS $LIBPCRE_LDFLAGS"
14136		LIBS="$LIBS $LIBPCRE_LIBS"
14137
14138		found_libpcre="no"
14139
14140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14141/* end confdefs.h.  */
14142
14143#include <pcre.h>
14144
14145int
14146main ()
14147{
14148
14149	const char* error = NULL;
14150	int error_offset = -1;
14151	pcre *regexp = pcre_compile("test", PCRE_UTF8, &error, &error_offset, NULL);
14152	pcre_free(regexp);
14153
14154  ;
14155  return 0;
14156}
14157_ACEOF
14158if ac_fn_c_try_link "$LINENO"; then :
14159  found_libpcre="yes"
14160fi
14161rm -f core conftest.err conftest.$ac_objext \
14162    conftest$ac_exeext conftest.$ac_ext
14163
14164
14165		CFLAGS="$am_save_CFLAGS"
14166		LDFLAGS="$am_save_LDFLAGS"
14167		LIBS="$am_save_LIBS"
14168	fi
14169
14170	if test "x$found_libpcre" = "xyes"; then
14171
14172$as_echo "#define HAVE_PCRE_H 1" >>confdefs.h
14173
14174		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14175$as_echo "yes" >&6; }
14176	else
14177		LIBPCRE_CFLAGS=""
14178		LIBPCRE_LDFLAGS=""
14179		LIBPCRE_LIBS=""
14180	fi
14181
14182
14183
14184
14185
14186	if test "x$found_libpcre" != "xyes"; then
14187		as_fn_error $? "Unable to use libpcre (libpcre check failed)" "$LINENO" 5
14188	fi
14189fi
14190
14191CFLAGS="$CFLAGS $LIBPCRE_CFLAGS"
14192LDFLAGS="$LDFLAGS $LIBPCRE_LDFLAGS"
14193if test "x$ARCH" = "xosx"; then
14194	LIBS="$LIBPCRE_LIBS $LIBS"
14195else
14196	LIBS="$LIBS $LIBPCRE_LIBS"
14197fi
14198
14199found_iconv="no"
14200
14201
14202# Check whether --with-iconv was given.
14203if test "${with_iconv+set}" = set; then :
14204  withval=$with_iconv;
14205			if test "$withval" = "yes"; then
14206				ICONV_CFLAGS="-I/usr/include"
14207				ICONV_LDFLAGS="-L/usr/lib"
14208				_iconv_dir_set=$withval
14209			elif test "$withval" != "no"; then
14210				_iconv_dir_lib="$withval/lib"
14211				ICONV_CFLAGS="-I$withval/include"
14212				ICONV_LDFLAGS="-L$_iconv_dir_lib"
14213				_iconv_dir_set="yes"
14214			fi
14215
14216
14217fi
14218
14219
14220
14221# Check whether --with-iconv-include was given.
14222if test "${with_iconv_include+set}" = set; then :
14223  withval=$with_iconv_include;
14224			ICONV_CFLAGS="-I$withval"
14225			_iconv_dir_set="yes"
14226
14227
14228fi
14229
14230
14231
14232# Check whether --with-iconv-lib was given.
14233if test "${with_iconv_lib+set}" = set; then :
14234  withval=$with_iconv_lib;
14235			ICONV_LDFLAGS="-L$withval"
14236			_iconv_dir_lib="-L$withval"
14237			_iconv_dir_set="yes"
14238
14239
14240fi
14241
14242
14243	ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
14244if test "x$ac_cv_header_iconv_h" = xyes; then :
14245  found_iconv=yes
14246fi
14247
14248
14249	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICONV support" >&5
14250$as_echo_n "checking for ICONV support... " >&6; }
14251	if test -n "$_iconv_dir_set" -o "x$found_iconv" = xyes; then
14252		found_iconv="yes"
14253	elif test -f /usr/local/include/iconv.h; then
14254		ICONV_CFLAGS="-I/usr/local/include"
14255		ICONV_LDFLAGS="-L/usr/local/lib"
14256		found_iconv="yes"
14257	else
14258		found_iconv="no"
14259		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14260$as_echo "no" >&6; }
14261	fi
14262
14263	if test "x$found_iconv" = "xyes"; then
14264		am_save_CFLAGS="$CFLAGS"
14265		am_save_LDFLAGS="$LDFLAGS"
14266		am_save_LIBS="$LIBS"
14267
14268		CFLAGS="$CFLAGS $ICONV_CFLAGS"
14269		LDFLAGS="$LDFLAGS $ICONV_LDFLAGS"
14270
14271
14272found_iconv=no
14273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14274/* end confdefs.h.  */
14275
14276#include <stdlib.h>
14277#include <iconv.h>
14278
14279int
14280main ()
14281{
14282
14283	iconv_t cd = iconv_open("","");
14284	iconv(cd, NULL, NULL, NULL, NULL);
14285	iconv_close(cd);
14286
14287  ;
14288  return 0;
14289}
14290_ACEOF
14291if ac_fn_c_try_link "$LINENO"; then :
14292  found_iconv="yes"
14293fi
14294rm -f core conftest.err conftest.$ac_objext \
14295    conftest$ac_exeext conftest.$ac_ext
14296
14297
14298		if test "x$found_iconv" = "xno"; then
14299			ICONV_LIBS="-liconv"
14300			if test "x$enable_static_libs" = "xyes"; then
14301				test "x$static_linking_support" = "xno" -a -z "$_iconv_dir_lib" && as_fn_error $? "\"Compiler not support statically linked libs from default folders\"" "$LINENO" 5
14302
14303				if test "x$static_linking_support" = "xno"; then
14304					ICONV_LIBS="$_iconv_dir_lib/libiconv.a"
14305				else
14306					ICONV_LIBS="${static_linking_support}static $ICONV_LIBS ${static_linking_support}dynamic"
14307				fi
14308			fi
14309			LIBS="$LIBS $ICONV_LIBS"
14310
14311found_iconv=no
14312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14313/* end confdefs.h.  */
14314
14315#include <stdlib.h>
14316#include <iconv.h>
14317
14318int
14319main ()
14320{
14321
14322	iconv_t cd = iconv_open("","");
14323	iconv(cd, NULL, NULL, NULL, NULL);
14324	iconv_close(cd);
14325
14326  ;
14327  return 0;
14328}
14329_ACEOF
14330if ac_fn_c_try_link "$LINENO"; then :
14331  found_iconv="yes"
14332fi
14333rm -f core conftest.err conftest.$ac_objext \
14334    conftest$ac_exeext conftest.$ac_ext
14335
14336		fi
14337
14338		LIBS="$am_save_LIBS"
14339		CFLAGS="$am_save_CFLAGS"
14340		LDFLAGS="$am_save_LDFLAGS"
14341	fi
14342
14343	if test "x$found_iconv" = "xyes"; then
14344
14345$as_echo "#define HAVE_ICONV 1" >>confdefs.h
14346
14347		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14348$as_echo "yes" >&6; }
14349	else
14350		ICONV_LIBS=""
14351		ICONV_CFLAGS=""
14352		ICONV_LDFLAGS=""
14353	fi
14354
14355
14356
14357
14358
14359if test "x$found_iconv" != "xyes"; then
14360	as_fn_error $? "Unable to use iconv (libiconv check failed)" "$LINENO" 5
14361fi
14362LDFLAGS="$LDFLAGS $ICONV_LDFLAGS"
14363LIBS="$LIBS $ICONV_LIBS"
14364
14365RANLIB="ranlib"
14366
14367
14368SERVER_CONFIG_FILE="${sysconfdir}/zabbix_server.conf"
14369PROXY_CONFIG_FILE="${sysconfdir}/zabbix_proxy.conf"
14370AGENT_CONFIG_FILE="${sysconfdir}/zabbix_agentd.conf"
14371AGENT2_CONFIG_FILE="${sysconfdir}/zabbix_agent2.conf"
14372
14373EXTERNAL_SCRIPTS_PATH="${datadir}/zabbix/externalscripts"
14374ALERT_SCRIPTS_PATH="${datadir}/zabbix/alertscripts"
14375
14376CURL_SSL_CERT_LOCATION="${datadir}/zabbix/ssl/certs"
14377CURL_SSL_KEY_LOCATION="${datadir}/zabbix/ssl/keys"
14378
14379LOAD_MODULE_PATH="${libdir}/modules"
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393if test "x$HAVE_START_GROUP" = "xyes"; then
14394	LD_START_GROUP=-Wl,--start-group
14395	LD_END_GROUP=-Wl,--end-group
14396fi
14397
14398CGO_CFLAGS=$TLS_CFLAGS
14399CGO_LDFLAGS="$AGENT2_LDFLAGS $LD_START_GROUP \
14400	\${abs_top_builddir}/src/zabbix_agent/logfiles/libzbxlogfiles.a \
14401	\${abs_top_builddir}/src/libs/zbxcomms/libzbxcomms.a \
14402	\${abs_top_builddir}/src/libs/zbxcommon/libzbxcommon.a \
14403	\${abs_top_builddir}/src/libs/zbxcrypto/libzbxcrypto.a \
14404	\${abs_top_builddir}/src/libs/zbxsys/libzbxsys.a \
14405	\${abs_top_builddir}/src/libs/zbxnix/libzbxnix.a \
14406	\${abs_top_builddir}/src/libs/zbxconf/libzbxconf.a \
14407	\${abs_top_builddir}/src/libs/zbxhttp/libzbxhttp.a \
14408	\${abs_top_builddir}/src/libs/zbxcompress/libzbxcompress.a \
14409	\${abs_top_builddir}/src/libs/zbxregexp/libzbxregexp.a \
14410	\${abs_top_builddir}/src/libs/zbxsysinfo/libzbxagent2sysinfo.a \
14411	\${abs_top_builddir}/src/libs/zbxsysinfo/common/libcommonsysinfo.a \
14412	\${abs_top_builddir}/src/libs/zbxsysinfo/simple/libsimplesysinfo.a \
14413	\${abs_top_builddir}/src/libs/zbxsysinfo/"$ARCH"/libspechostnamesysinfo.a \
14414	\${abs_top_builddir}/src/libs/zbxsysinfo/"$ARCH"/libspecsysinfo.a \
14415	\${abs_top_builddir}/src/libs/zbxexec/libzbxexec.a \
14416	\${abs_top_builddir}/src/libs/zbxalgo/libzbxalgo.a \
14417	\${abs_top_builddir}/src/libs/zbxjson/libzbxjson.a \
14418	$LIBS $AGENT2_LIBS $LD_END_GROUP"
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445GOBIN=${sbindir}
14446GOCMD=go
14447GOWORKDIR=$ac_abs_confdir/go/src/zabbix
14448
14449export GOBIN=${GOBIN}
14450
14451
14452
14453
14454
14455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mkdir -p candidate" >&5
14456$as_echo_n "checking for mkdir -p candidate... " >&6; }
14457if test "x${MKDIR_P}" = "x"; then
14458        if test "x${mkdir_p}" = "x"; then
14459                as_fn_error $? "No suitable \"mkdir -p\" candidate found." "$LINENO" 5
14460        fi
14461        MKDIR_P=${mkdir_p}
14462
14463fi
14464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (${MKDIR_P})" >&5
14465$as_echo "ok (${MKDIR_P})" >&6; }
14466
14467case "x$ARCH" in
14468	xlinux|xsolaris)
14469
14470$as_echo "#define ZBX_PROCSTAT_COLLECTOR 1 " >>confdefs.h
14471
14472		;;
14473esac
14474
14475
14476
14477
14478ac_config_files="$ac_config_files Makefile database/Makefile database/mysql/Makefile database/oracle/Makefile database/postgresql/Makefile database/sqlite3/Makefile misc/Makefile src/Makefile src/go/Makefile src/libs/Makefile src/libs/zbxlog/Makefile src/libs/zbxalgo/Makefile src/libs/zbxmemory/Makefile src/libs/zbxcrypto/Makefile src/libs/zbxconf/Makefile src/libs/zbxdbcache/Makefile src/libs/zbxdbhigh/Makefile src/libs/zbxmedia/Makefile src/libs/zbxsysinfo/Makefile src/libs/zbxcommon/Makefile src/libs/zbxsysinfo/agent/Makefile src/libs/zbxsysinfo/common/Makefile src/libs/zbxsysinfo/simple/Makefile src/libs/zbxsysinfo/linux/Makefile src/libs/zbxsysinfo/aix/Makefile src/libs/zbxsysinfo/freebsd/Makefile src/libs/zbxsysinfo/hpux/Makefile src/libs/zbxsysinfo/openbsd/Makefile src/libs/zbxsysinfo/osx/Makefile src/libs/zbxsysinfo/solaris/Makefile src/libs/zbxsysinfo/osf/Makefile src/libs/zbxsysinfo/netbsd/Makefile src/libs/zbxsysinfo/unknown/Makefile src/libs/zbxnix/Makefile src/libs/zbxsys/Makefile src/libs/zbxcomms/Makefile src/libs/zbxcommshigh/Makefile src/libs/zbxdb/Makefile src/libs/zbxdbupgrade/Makefile src/libs/zbxjson/Makefile src/libs/zbxhttp/Makefile src/libs/zbxserver/Makefile src/libs/zbxicmpping/Makefile src/libs/zbxexec/Makefile src/libs/zbxself/Makefile src/libs/zbxmodules/Makefile src/libs/zbxregexp/Makefile src/libs/zbxtasks/Makefile src/libs/zbxipcservice/Makefile src/libs/zbxhistory/Makefile src/libs/zbxcompress/Makefile src/libs/zbxembed/Makefile src/libs/zbxprometheus/Makefile src/libs/zbxdiag/Makefile src/libs/zbxxml/Makefile src/zabbix_agent/Makefile src/zabbix_agent/logfiles/Makefile src/zabbix_get/Makefile src/zabbix_js/Makefile src/zabbix_sender/Makefile src/zabbix_server/Makefile src/zabbix_server/alerter/Makefile src/zabbix_server/dbsyncer/Makefile src/zabbix_server/dbconfig/Makefile src/zabbix_server/discoverer/Makefile src/zabbix_server/housekeeper/Makefile src/zabbix_server/httppoller/Makefile src/zabbix_server/pinger/Makefile src/zabbix_server/poller/Makefile src/zabbix_server/snmptrapper/Makefile src/zabbix_server/timer/Makefile src/zabbix_server/trapper/Makefile src/zabbix_server/escalator/Makefile src/zabbix_server/proxypoller/Makefile src/zabbix_server/selfmon/Makefile src/zabbix_server/vmware/Makefile src/zabbix_server/taskmanager/Makefile src/zabbix_server/ipmi/Makefile src/zabbix_server/odbc/Makefile src/zabbix_server/scripts/Makefile src/zabbix_server/preprocessor/Makefile src/zabbix_server/lld/Makefile src/zabbix_proxy/Makefile src/zabbix_proxy/heart/Makefile src/zabbix_proxy/housekeeper/Makefile src/zabbix_proxy/proxyconfig/Makefile src/zabbix_proxy/datasender/Makefile src/zabbix_proxy/taskmanager/Makefile src/zabbix_java/Makefile man/Makefile"
14479
14480cat >confcache <<\_ACEOF
14481# This file is a shell script that caches the results of configure
14482# tests run on this system so they can be shared between configure
14483# scripts and configure runs, see configure's option --config-cache.
14484# It is not useful on other systems.  If it contains results you don't
14485# want to keep, you may remove or edit it.
14486#
14487# config.status only pays attention to the cache file if you give it
14488# the --recheck option to rerun configure.
14489#
14490# `ac_cv_env_foo' variables (set or unset) will be overridden when
14491# loading this file, other *unset* `ac_cv_foo' will be assigned the
14492# following values.
14493
14494_ACEOF
14495
14496# The following way of writing the cache mishandles newlines in values,
14497# but we know of no workaround that is simple, portable, and efficient.
14498# So, we kill variables containing newlines.
14499# Ultrix sh set writes to stderr and can't be redirected directly,
14500# and sets the high bit in the cache file unless we assign to the vars.
14501(
14502  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14503    eval ac_val=\$$ac_var
14504    case $ac_val in #(
14505    *${as_nl}*)
14506      case $ac_var in #(
14507      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14508$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14509      esac
14510      case $ac_var in #(
14511      _ | IFS | as_nl) ;; #(
14512      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14513      *) { eval $ac_var=; unset $ac_var;} ;;
14514      esac ;;
14515    esac
14516  done
14517
14518  (set) 2>&1 |
14519    case $as_nl`(ac_space=' '; set) 2>&1` in #(
14520    *${as_nl}ac_space=\ *)
14521      # `set' does not quote correctly, so add quotes: double-quote
14522      # substitution turns \\\\ into \\, and sed turns \\ into \.
14523      sed -n \
14524	"s/'/'\\\\''/g;
14525	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14526      ;; #(
14527    *)
14528      # `set' quotes correctly as required by POSIX, so do not add quotes.
14529      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14530      ;;
14531    esac |
14532    sort
14533) |
14534  sed '
14535     /^ac_cv_env_/b end
14536     t clear
14537     :clear
14538     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14539     t end
14540     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14541     :end' >>confcache
14542if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14543  if test -w "$cache_file"; then
14544    if test "x$cache_file" != "x/dev/null"; then
14545      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14546$as_echo "$as_me: updating cache $cache_file" >&6;}
14547      if test ! -f "$cache_file" || test -h "$cache_file"; then
14548	cat confcache >"$cache_file"
14549      else
14550        case $cache_file in #(
14551        */* | ?:*)
14552	  mv -f confcache "$cache_file"$$ &&
14553	  mv -f "$cache_file"$$ "$cache_file" ;; #(
14554        *)
14555	  mv -f confcache "$cache_file" ;;
14556	esac
14557      fi
14558    fi
14559  else
14560    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14561$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14562  fi
14563fi
14564rm -f confcache
14565
14566test "x$prefix" = xNONE && prefix=$ac_default_prefix
14567# Let make expand exec_prefix.
14568test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14569
14570DEFS=-DHAVE_CONFIG_H
14571
14572ac_libobjs=
14573ac_ltlibobjs=
14574for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14575  # 1. Remove the extension, and $U if already installed.
14576  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14577  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14578  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14579  #    will be set to the directory where LIBOBJS objects are built.
14580  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14581  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14582done
14583LIBOBJS=$ac_libobjs
14584
14585LTLIBOBJS=$ac_ltlibobjs
14586
14587
14588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
14589$as_echo_n "checking that generated files are newer than configure... " >&6; }
14590   if test -n "$am_sleep_pid"; then
14591     # Hide warnings about reused PIDs.
14592     wait $am_sleep_pid 2>/dev/null
14593   fi
14594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14595$as_echo "done" >&6; }
14596 if test -n "$EXEEXT"; then
14597  am__EXEEXT_TRUE=
14598  am__EXEEXT_FALSE='#'
14599else
14600  am__EXEEXT_TRUE='#'
14601  am__EXEEXT_FALSE=
14602fi
14603
14604if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
14605  as_fn_error $? "conditional \"AMDEP\" was never defined.
14606Usually this means the macro was only invoked conditionally." "$LINENO" 5
14607fi
14608if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
14609  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
14610Usually this means the macro was only invoked conditionally." "$LINENO" 5
14611fi
14612if test -z "${SERVER_TRUE}" && test -z "${SERVER_FALSE}"; then
14613  as_fn_error $? "conditional \"SERVER\" was never defined.
14614Usually this means the macro was only invoked conditionally." "$LINENO" 5
14615fi
14616if test -z "${PROXY_TRUE}" && test -z "${PROXY_FALSE}"; then
14617  as_fn_error $? "conditional \"PROXY\" was never defined.
14618Usually this means the macro was only invoked conditionally." "$LINENO" 5
14619fi
14620if test -z "${AGENT_TRUE}" && test -z "${AGENT_FALSE}"; then
14621  as_fn_error $? "conditional \"AGENT\" was never defined.
14622Usually this means the macro was only invoked conditionally." "$LINENO" 5
14623fi
14624if test -z "${AGENT2_TRUE}" && test -z "${AGENT2_FALSE}"; then
14625  as_fn_error $? "conditional \"AGENT2\" was never defined.
14626Usually this means the macro was only invoked conditionally." "$LINENO" 5
14627fi
14628if test -z "${JAVA_TRUE}" && test -z "${JAVA_FALSE}"; then
14629  as_fn_error $? "conditional \"JAVA\" was never defined.
14630Usually this means the macro was only invoked conditionally." "$LINENO" 5
14631fi
14632if test -z "${IPV6_TRUE}" && test -z "${IPV6_FALSE}"; then
14633  as_fn_error $? "conditional \"IPV6\" was never defined.
14634Usually this means the macro was only invoked conditionally." "$LINENO" 5
14635fi
14636if test -z "${DBSCHEMA_TRUE}" && test -z "${DBSCHEMA_FALSE}"; then
14637  as_fn_error $? "conditional \"DBSCHEMA\" was never defined.
14638Usually this means the macro was only invoked conditionally." "$LINENO" 5
14639fi
14640if test -z "${ZBXCMOCKA_TRUE}" && test -z "${ZBXCMOCKA_FALSE}"; then
14641  as_fn_error $? "conditional \"ZBXCMOCKA\" was never defined.
14642Usually this means the macro was only invoked conditionally." "$LINENO" 5
14643fi
14644if test -z "${HAVE_IPMI_TRUE}" && test -z "${HAVE_IPMI_FALSE}"; then
14645  as_fn_error $? "conditional \"HAVE_IPMI\" was never defined.
14646Usually this means the macro was only invoked conditionally." "$LINENO" 5
14647fi
14648if test -z "${HAVE_LIBXML2_TRUE}" && test -z "${HAVE_LIBXML2_FALSE}"; then
14649  as_fn_error $? "conditional \"HAVE_LIBXML2\" was never defined.
14650Usually this means the macro was only invoked conditionally." "$LINENO" 5
14651fi
14652if test -z "${PROXY_IPCSERVICE_TRUE}" && test -z "${PROXY_IPCSERVICE_FALSE}"; then
14653  as_fn_error $? "conditional \"PROXY_IPCSERVICE\" was never defined.
14654Usually this means the macro was only invoked conditionally." "$LINENO" 5
14655fi
14656if test -z "${HAVE_LIBCURL_TRUE}" && test -z "${HAVE_LIBCURL_FALSE}"; then
14657  as_fn_error $? "conditional \"HAVE_LIBCURL\" was never defined.
14658Usually this means the macro was only invoked conditionally." "$LINENO" 5
14659fi
14660
14661: "${CONFIG_STATUS=./config.status}"
14662ac_write_fail=0
14663ac_clean_files_save=$ac_clean_files
14664ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14665{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14666$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14667as_write_fail=0
14668cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14669#! $SHELL
14670# Generated by $as_me.
14671# Run this file to recreate the current configuration.
14672# Compiler output produced by configure, useful for debugging
14673# configure, is in config.log if it exists.
14674
14675debug=false
14676ac_cs_recheck=false
14677ac_cs_silent=false
14678
14679SHELL=\${CONFIG_SHELL-$SHELL}
14680export SHELL
14681_ASEOF
14682cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14683## -------------------- ##
14684## M4sh Initialization. ##
14685## -------------------- ##
14686
14687# Be more Bourne compatible
14688DUALCASE=1; export DUALCASE # for MKS sh
14689if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14690  emulate sh
14691  NULLCMD=:
14692  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14693  # is contrary to our usage.  Disable this feature.
14694  alias -g '${1+"$@"}'='"$@"'
14695  setopt NO_GLOB_SUBST
14696else
14697  case `(set -o) 2>/dev/null` in #(
14698  *posix*) :
14699    set -o posix ;; #(
14700  *) :
14701     ;;
14702esac
14703fi
14704
14705
14706as_nl='
14707'
14708export as_nl
14709# Printing a long string crashes Solaris 7 /usr/bin/printf.
14710as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14711as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14712as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14713# Prefer a ksh shell builtin over an external printf program on Solaris,
14714# but without wasting forks for bash or zsh.
14715if test -z "$BASH_VERSION$ZSH_VERSION" \
14716    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14717  as_echo='print -r --'
14718  as_echo_n='print -rn --'
14719elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14720  as_echo='printf %s\n'
14721  as_echo_n='printf %s'
14722else
14723  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14724    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14725    as_echo_n='/usr/ucb/echo -n'
14726  else
14727    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14728    as_echo_n_body='eval
14729      arg=$1;
14730      case $arg in #(
14731      *"$as_nl"*)
14732	expr "X$arg" : "X\\(.*\\)$as_nl";
14733	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14734      esac;
14735      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14736    '
14737    export as_echo_n_body
14738    as_echo_n='sh -c $as_echo_n_body as_echo'
14739  fi
14740  export as_echo_body
14741  as_echo='sh -c $as_echo_body as_echo'
14742fi
14743
14744# The user is always right.
14745if test "${PATH_SEPARATOR+set}" != set; then
14746  PATH_SEPARATOR=:
14747  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14748    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14749      PATH_SEPARATOR=';'
14750  }
14751fi
14752
14753
14754# IFS
14755# We need space, tab and new line, in precisely that order.  Quoting is
14756# there to prevent editors from complaining about space-tab.
14757# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14758# splitting by setting IFS to empty value.)
14759IFS=" ""	$as_nl"
14760
14761# Find who we are.  Look in the path if we contain no directory separator.
14762as_myself=
14763case $0 in #((
14764  *[\\/]* ) as_myself=$0 ;;
14765  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14766for as_dir in $PATH
14767do
14768  IFS=$as_save_IFS
14769  test -z "$as_dir" && as_dir=.
14770    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14771  done
14772IFS=$as_save_IFS
14773
14774     ;;
14775esac
14776# We did not find ourselves, most probably we were run as `sh COMMAND'
14777# in which case we are not to be found in the path.
14778if test "x$as_myself" = x; then
14779  as_myself=$0
14780fi
14781if test ! -f "$as_myself"; then
14782  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14783  exit 1
14784fi
14785
14786# Unset variables that we do not need and which cause bugs (e.g. in
14787# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
14788# suppresses any "Segmentation fault" message there.  '((' could
14789# trigger a bug in pdksh 5.2.14.
14790for as_var in BASH_ENV ENV MAIL MAILPATH
14791do eval test x\${$as_var+set} = xset \
14792  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14793done
14794PS1='$ '
14795PS2='> '
14796PS4='+ '
14797
14798# NLS nuisances.
14799LC_ALL=C
14800export LC_ALL
14801LANGUAGE=C
14802export LANGUAGE
14803
14804# CDPATH.
14805(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14806
14807
14808# as_fn_error STATUS ERROR [LINENO LOG_FD]
14809# ----------------------------------------
14810# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14811# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14812# script with STATUS, using 1 if that was 0.
14813as_fn_error ()
14814{
14815  as_status=$1; test $as_status -eq 0 && as_status=1
14816  if test "$4"; then
14817    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14818    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
14819  fi
14820  $as_echo "$as_me: error: $2" >&2
14821  as_fn_exit $as_status
14822} # as_fn_error
14823
14824
14825# as_fn_set_status STATUS
14826# -----------------------
14827# Set $? to STATUS, without forking.
14828as_fn_set_status ()
14829{
14830  return $1
14831} # as_fn_set_status
14832
14833# as_fn_exit STATUS
14834# -----------------
14835# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14836as_fn_exit ()
14837{
14838  set +e
14839  as_fn_set_status $1
14840  exit $1
14841} # as_fn_exit
14842
14843# as_fn_unset VAR
14844# ---------------
14845# Portably unset VAR.
14846as_fn_unset ()
14847{
14848  { eval $1=; unset $1;}
14849}
14850as_unset=as_fn_unset
14851# as_fn_append VAR VALUE
14852# ----------------------
14853# Append the text in VALUE to the end of the definition contained in VAR. Take
14854# advantage of any shell optimizations that allow amortized linear growth over
14855# repeated appends, instead of the typical quadratic growth present in naive
14856# implementations.
14857if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14858  eval 'as_fn_append ()
14859  {
14860    eval $1+=\$2
14861  }'
14862else
14863  as_fn_append ()
14864  {
14865    eval $1=\$$1\$2
14866  }
14867fi # as_fn_append
14868
14869# as_fn_arith ARG...
14870# ------------------
14871# Perform arithmetic evaluation on the ARGs, and store the result in the
14872# global $as_val. Take advantage of shells that can avoid forks. The arguments
14873# must be portable across $(()) and expr.
14874if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14875  eval 'as_fn_arith ()
14876  {
14877    as_val=$(( $* ))
14878  }'
14879else
14880  as_fn_arith ()
14881  {
14882    as_val=`expr "$@" || test $? -eq 1`
14883  }
14884fi # as_fn_arith
14885
14886
14887if expr a : '\(a\)' >/dev/null 2>&1 &&
14888   test "X`expr 00001 : '.*\(...\)'`" = X001; then
14889  as_expr=expr
14890else
14891  as_expr=false
14892fi
14893
14894if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14895  as_basename=basename
14896else
14897  as_basename=false
14898fi
14899
14900if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14901  as_dirname=dirname
14902else
14903  as_dirname=false
14904fi
14905
14906as_me=`$as_basename -- "$0" ||
14907$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14908	 X"$0" : 'X\(//\)$' \| \
14909	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14910$as_echo X/"$0" |
14911    sed '/^.*\/\([^/][^/]*\)\/*$/{
14912	    s//\1/
14913	    q
14914	  }
14915	  /^X\/\(\/\/\)$/{
14916	    s//\1/
14917	    q
14918	  }
14919	  /^X\/\(\/\).*/{
14920	    s//\1/
14921	    q
14922	  }
14923	  s/.*/./; q'`
14924
14925# Avoid depending upon Character Ranges.
14926as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14927as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14928as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14929as_cr_digits='0123456789'
14930as_cr_alnum=$as_cr_Letters$as_cr_digits
14931
14932ECHO_C= ECHO_N= ECHO_T=
14933case `echo -n x` in #(((((
14934-n*)
14935  case `echo 'xy\c'` in
14936  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
14937  xy)  ECHO_C='\c';;
14938  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
14939       ECHO_T='	';;
14940  esac;;
14941*)
14942  ECHO_N='-n';;
14943esac
14944
14945rm -f conf$$ conf$$.exe conf$$.file
14946if test -d conf$$.dir; then
14947  rm -f conf$$.dir/conf$$.file
14948else
14949  rm -f conf$$.dir
14950  mkdir conf$$.dir 2>/dev/null
14951fi
14952if (echo >conf$$.file) 2>/dev/null; then
14953  if ln -s conf$$.file conf$$ 2>/dev/null; then
14954    as_ln_s='ln -s'
14955    # ... but there are two gotchas:
14956    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14957    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14958    # In both cases, we have to default to `cp -pR'.
14959    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14960      as_ln_s='cp -pR'
14961  elif ln conf$$.file conf$$ 2>/dev/null; then
14962    as_ln_s=ln
14963  else
14964    as_ln_s='cp -pR'
14965  fi
14966else
14967  as_ln_s='cp -pR'
14968fi
14969rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14970rmdir conf$$.dir 2>/dev/null
14971
14972
14973# as_fn_mkdir_p
14974# -------------
14975# Create "$as_dir" as a directory, including parents if necessary.
14976as_fn_mkdir_p ()
14977{
14978
14979  case $as_dir in #(
14980  -*) as_dir=./$as_dir;;
14981  esac
14982  test -d "$as_dir" || eval $as_mkdir_p || {
14983    as_dirs=
14984    while :; do
14985      case $as_dir in #(
14986      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14987      *) as_qdir=$as_dir;;
14988      esac
14989      as_dirs="'$as_qdir' $as_dirs"
14990      as_dir=`$as_dirname -- "$as_dir" ||
14991$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14992	 X"$as_dir" : 'X\(//\)[^/]' \| \
14993	 X"$as_dir" : 'X\(//\)$' \| \
14994	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14995$as_echo X"$as_dir" |
14996    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14997	    s//\1/
14998	    q
14999	  }
15000	  /^X\(\/\/\)[^/].*/{
15001	    s//\1/
15002	    q
15003	  }
15004	  /^X\(\/\/\)$/{
15005	    s//\1/
15006	    q
15007	  }
15008	  /^X\(\/\).*/{
15009	    s//\1/
15010	    q
15011	  }
15012	  s/.*/./; q'`
15013      test -d "$as_dir" && break
15014    done
15015    test -z "$as_dirs" || eval "mkdir $as_dirs"
15016  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15017
15018
15019} # as_fn_mkdir_p
15020if mkdir -p . 2>/dev/null; then
15021  as_mkdir_p='mkdir -p "$as_dir"'
15022else
15023  test -d ./-p && rmdir ./-p
15024  as_mkdir_p=false
15025fi
15026
15027
15028# as_fn_executable_p FILE
15029# -----------------------
15030# Test if FILE is an executable regular file.
15031as_fn_executable_p ()
15032{
15033  test -f "$1" && test -x "$1"
15034} # as_fn_executable_p
15035as_test_x='test -x'
15036as_executable_p=as_fn_executable_p
15037
15038# Sed expression to map a string onto a valid CPP name.
15039as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15040
15041# Sed expression to map a string onto a valid variable name.
15042as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15043
15044
15045exec 6>&1
15046## ----------------------------------- ##
15047## Main body of $CONFIG_STATUS script. ##
15048## ----------------------------------- ##
15049_ASEOF
15050test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15051
15052cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15053# Save the log message, to keep $0 and so on meaningful, and to
15054# report actual input values of CONFIG_FILES etc. instead of their
15055# values after options handling.
15056ac_log="
15057This file was extended by Zabbix $as_me 5.0.19, which was
15058generated by GNU Autoconf 2.69.  Invocation command line was
15059
15060  CONFIG_FILES    = $CONFIG_FILES
15061  CONFIG_HEADERS  = $CONFIG_HEADERS
15062  CONFIG_LINKS    = $CONFIG_LINKS
15063  CONFIG_COMMANDS = $CONFIG_COMMANDS
15064  $ $0 $@
15065
15066on `(hostname || uname -n) 2>/dev/null | sed 1q`
15067"
15068
15069_ACEOF
15070
15071case $ac_config_files in *"
15072"*) set x $ac_config_files; shift; ac_config_files=$*;;
15073esac
15074
15075case $ac_config_headers in *"
15076"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15077esac
15078
15079
15080cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15081# Files that config.status was made for.
15082config_files="$ac_config_files"
15083config_headers="$ac_config_headers"
15084config_commands="$ac_config_commands"
15085
15086_ACEOF
15087
15088cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15089ac_cs_usage="\
15090\`$as_me' instantiates files and other configuration actions
15091from templates according to the current configuration.  Unless the files
15092and actions are specified as TAGs, all are instantiated by default.
15093
15094Usage: $0 [OPTION]... [TAG]...
15095
15096  -h, --help       print this help, then exit
15097  -V, --version    print version number and configuration settings, then exit
15098      --config     print configuration, then exit
15099  -q, --quiet, --silent
15100                   do not print progress messages
15101  -d, --debug      don't remove temporary files
15102      --recheck    update $as_me by reconfiguring in the same conditions
15103      --file=FILE[:TEMPLATE]
15104                   instantiate the configuration file FILE
15105      --header=FILE[:TEMPLATE]
15106                   instantiate the configuration header FILE
15107
15108Configuration files:
15109$config_files
15110
15111Configuration headers:
15112$config_headers
15113
15114Configuration commands:
15115$config_commands
15116
15117Report bugs to the package provider."
15118
15119_ACEOF
15120cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15121ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15122ac_cs_version="\\
15123Zabbix config.status 5.0.19
15124configured by $0, generated by GNU Autoconf 2.69,
15125  with options \\"\$ac_cs_config\\"
15126
15127Copyright (C) 2012 Free Software Foundation, Inc.
15128This config.status script is free software; the Free Software Foundation
15129gives unlimited permission to copy, distribute and modify it."
15130
15131ac_pwd='$ac_pwd'
15132srcdir='$srcdir'
15133INSTALL='$INSTALL'
15134MKDIR_P='$MKDIR_P'
15135AWK='$AWK'
15136test -n "\$AWK" || AWK=awk
15137_ACEOF
15138
15139cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15140# The default lists apply if the user does not specify any file.
15141ac_need_defaults=:
15142while test $# != 0
15143do
15144  case $1 in
15145  --*=?*)
15146    ac_option=`expr "X$1" : 'X\([^=]*\)='`
15147    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15148    ac_shift=:
15149    ;;
15150  --*=)
15151    ac_option=`expr "X$1" : 'X\([^=]*\)='`
15152    ac_optarg=
15153    ac_shift=:
15154    ;;
15155  *)
15156    ac_option=$1
15157    ac_optarg=$2
15158    ac_shift=shift
15159    ;;
15160  esac
15161
15162  case $ac_option in
15163  # Handling of the options.
15164  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15165    ac_cs_recheck=: ;;
15166  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15167    $as_echo "$ac_cs_version"; exit ;;
15168  --config | --confi | --conf | --con | --co | --c )
15169    $as_echo "$ac_cs_config"; exit ;;
15170  --debug | --debu | --deb | --de | --d | -d )
15171    debug=: ;;
15172  --file | --fil | --fi | --f )
15173    $ac_shift
15174    case $ac_optarg in
15175    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15176    '') as_fn_error $? "missing file argument" ;;
15177    esac
15178    as_fn_append CONFIG_FILES " '$ac_optarg'"
15179    ac_need_defaults=false;;
15180  --header | --heade | --head | --hea )
15181    $ac_shift
15182    case $ac_optarg in
15183    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15184    esac
15185    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15186    ac_need_defaults=false;;
15187  --he | --h)
15188    # Conflict between --help and --header
15189    as_fn_error $? "ambiguous option: \`$1'
15190Try \`$0 --help' for more information.";;
15191  --help | --hel | -h )
15192    $as_echo "$ac_cs_usage"; exit ;;
15193  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15194  | -silent | --silent | --silen | --sile | --sil | --si | --s)
15195    ac_cs_silent=: ;;
15196
15197  # This is an error.
15198  -*) as_fn_error $? "unrecognized option: \`$1'
15199Try \`$0 --help' for more information." ;;
15200
15201  *) as_fn_append ac_config_targets " $1"
15202     ac_need_defaults=false ;;
15203
15204  esac
15205  shift
15206done
15207
15208ac_configure_extra_args=
15209
15210if $ac_cs_silent; then
15211  exec 6>/dev/null
15212  ac_configure_extra_args="$ac_configure_extra_args --silent"
15213fi
15214
15215_ACEOF
15216cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15217if \$ac_cs_recheck; then
15218  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15219  shift
15220  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15221  CONFIG_SHELL='$SHELL'
15222  export CONFIG_SHELL
15223  exec "\$@"
15224fi
15225
15226_ACEOF
15227cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15228exec 5>>config.log
15229{
15230  echo
15231  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15232## Running $as_me. ##
15233_ASBOX
15234  $as_echo "$ac_log"
15235} >&5
15236
15237_ACEOF
15238cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15239#
15240# INIT-COMMANDS
15241#
15242AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
15243
15244_ACEOF
15245
15246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15247
15248# Handling of arguments.
15249for ac_config_target in $ac_config_targets
15250do
15251  case $ac_config_target in
15252    "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;;
15253    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
15254    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15255    "database/Makefile") CONFIG_FILES="$CONFIG_FILES database/Makefile" ;;
15256    "database/mysql/Makefile") CONFIG_FILES="$CONFIG_FILES database/mysql/Makefile" ;;
15257    "database/oracle/Makefile") CONFIG_FILES="$CONFIG_FILES database/oracle/Makefile" ;;
15258    "database/postgresql/Makefile") CONFIG_FILES="$CONFIG_FILES database/postgresql/Makefile" ;;
15259    "database/sqlite3/Makefile") CONFIG_FILES="$CONFIG_FILES database/sqlite3/Makefile" ;;
15260    "misc/Makefile") CONFIG_FILES="$CONFIG_FILES misc/Makefile" ;;
15261    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
15262    "src/go/Makefile") CONFIG_FILES="$CONFIG_FILES src/go/Makefile" ;;
15263    "src/libs/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/Makefile" ;;
15264    "src/libs/zbxlog/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxlog/Makefile" ;;
15265    "src/libs/zbxalgo/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxalgo/Makefile" ;;
15266    "src/libs/zbxmemory/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxmemory/Makefile" ;;
15267    "src/libs/zbxcrypto/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcrypto/Makefile" ;;
15268    "src/libs/zbxconf/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxconf/Makefile" ;;
15269    "src/libs/zbxdbcache/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdbcache/Makefile" ;;
15270    "src/libs/zbxdbhigh/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdbhigh/Makefile" ;;
15271    "src/libs/zbxmedia/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxmedia/Makefile" ;;
15272    "src/libs/zbxsysinfo/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/Makefile" ;;
15273    "src/libs/zbxcommon/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcommon/Makefile" ;;
15274    "src/libs/zbxsysinfo/agent/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/agent/Makefile" ;;
15275    "src/libs/zbxsysinfo/common/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/common/Makefile" ;;
15276    "src/libs/zbxsysinfo/simple/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/simple/Makefile" ;;
15277    "src/libs/zbxsysinfo/linux/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/linux/Makefile" ;;
15278    "src/libs/zbxsysinfo/aix/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/aix/Makefile" ;;
15279    "src/libs/zbxsysinfo/freebsd/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/freebsd/Makefile" ;;
15280    "src/libs/zbxsysinfo/hpux/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/hpux/Makefile" ;;
15281    "src/libs/zbxsysinfo/openbsd/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/openbsd/Makefile" ;;
15282    "src/libs/zbxsysinfo/osx/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/osx/Makefile" ;;
15283    "src/libs/zbxsysinfo/solaris/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/solaris/Makefile" ;;
15284    "src/libs/zbxsysinfo/osf/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/osf/Makefile" ;;
15285    "src/libs/zbxsysinfo/netbsd/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/netbsd/Makefile" ;;
15286    "src/libs/zbxsysinfo/unknown/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsysinfo/unknown/Makefile" ;;
15287    "src/libs/zbxnix/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxnix/Makefile" ;;
15288    "src/libs/zbxsys/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxsys/Makefile" ;;
15289    "src/libs/zbxcomms/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcomms/Makefile" ;;
15290    "src/libs/zbxcommshigh/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcommshigh/Makefile" ;;
15291    "src/libs/zbxdb/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdb/Makefile" ;;
15292    "src/libs/zbxdbupgrade/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdbupgrade/Makefile" ;;
15293    "src/libs/zbxjson/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxjson/Makefile" ;;
15294    "src/libs/zbxhttp/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxhttp/Makefile" ;;
15295    "src/libs/zbxserver/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxserver/Makefile" ;;
15296    "src/libs/zbxicmpping/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxicmpping/Makefile" ;;
15297    "src/libs/zbxexec/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxexec/Makefile" ;;
15298    "src/libs/zbxself/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxself/Makefile" ;;
15299    "src/libs/zbxmodules/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxmodules/Makefile" ;;
15300    "src/libs/zbxregexp/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxregexp/Makefile" ;;
15301    "src/libs/zbxtasks/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxtasks/Makefile" ;;
15302    "src/libs/zbxipcservice/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxipcservice/Makefile" ;;
15303    "src/libs/zbxhistory/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxhistory/Makefile" ;;
15304    "src/libs/zbxcompress/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxcompress/Makefile" ;;
15305    "src/libs/zbxembed/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxembed/Makefile" ;;
15306    "src/libs/zbxprometheus/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxprometheus/Makefile" ;;
15307    "src/libs/zbxdiag/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxdiag/Makefile" ;;
15308    "src/libs/zbxxml/Makefile") CONFIG_FILES="$CONFIG_FILES src/libs/zbxxml/Makefile" ;;
15309    "src/zabbix_agent/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_agent/Makefile" ;;
15310    "src/zabbix_agent/logfiles/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_agent/logfiles/Makefile" ;;
15311    "src/zabbix_get/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_get/Makefile" ;;
15312    "src/zabbix_js/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_js/Makefile" ;;
15313    "src/zabbix_sender/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_sender/Makefile" ;;
15314    "src/zabbix_server/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/Makefile" ;;
15315    "src/zabbix_server/alerter/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/alerter/Makefile" ;;
15316    "src/zabbix_server/dbsyncer/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/dbsyncer/Makefile" ;;
15317    "src/zabbix_server/dbconfig/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/dbconfig/Makefile" ;;
15318    "src/zabbix_server/discoverer/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/discoverer/Makefile" ;;
15319    "src/zabbix_server/housekeeper/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/housekeeper/Makefile" ;;
15320    "src/zabbix_server/httppoller/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/httppoller/Makefile" ;;
15321    "src/zabbix_server/pinger/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/pinger/Makefile" ;;
15322    "src/zabbix_server/poller/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/poller/Makefile" ;;
15323    "src/zabbix_server/snmptrapper/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/snmptrapper/Makefile" ;;
15324    "src/zabbix_server/timer/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/timer/Makefile" ;;
15325    "src/zabbix_server/trapper/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/trapper/Makefile" ;;
15326    "src/zabbix_server/escalator/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/escalator/Makefile" ;;
15327    "src/zabbix_server/proxypoller/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/proxypoller/Makefile" ;;
15328    "src/zabbix_server/selfmon/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/selfmon/Makefile" ;;
15329    "src/zabbix_server/vmware/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/vmware/Makefile" ;;
15330    "src/zabbix_server/taskmanager/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/taskmanager/Makefile" ;;
15331    "src/zabbix_server/ipmi/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/ipmi/Makefile" ;;
15332    "src/zabbix_server/odbc/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/odbc/Makefile" ;;
15333    "src/zabbix_server/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/scripts/Makefile" ;;
15334    "src/zabbix_server/preprocessor/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/preprocessor/Makefile" ;;
15335    "src/zabbix_server/lld/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_server/lld/Makefile" ;;
15336    "src/zabbix_proxy/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/Makefile" ;;
15337    "src/zabbix_proxy/heart/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/heart/Makefile" ;;
15338    "src/zabbix_proxy/housekeeper/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/housekeeper/Makefile" ;;
15339    "src/zabbix_proxy/proxyconfig/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/proxyconfig/Makefile" ;;
15340    "src/zabbix_proxy/datasender/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/datasender/Makefile" ;;
15341    "src/zabbix_proxy/taskmanager/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_proxy/taskmanager/Makefile" ;;
15342    "src/zabbix_java/Makefile") CONFIG_FILES="$CONFIG_FILES src/zabbix_java/Makefile" ;;
15343    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
15344
15345  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15346  esac
15347done
15348
15349
15350# If the user did not use the arguments to specify the items to instantiate,
15351# then the envvar interface is used.  Set only those that are not.
15352# We use the long form for the default assignment because of an extremely
15353# bizarre bug on SunOS 4.1.3.
15354if $ac_need_defaults; then
15355  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15356  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15357  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15358fi
15359
15360# Have a temporary directory for convenience.  Make it in the build tree
15361# simply because there is no reason against having it here, and in addition,
15362# creating and moving files from /tmp can sometimes cause problems.
15363# Hook for its removal unless debugging.
15364# Note that there is a small window in which the directory will not be cleaned:
15365# after its creation but before its name has been assigned to `$tmp'.
15366$debug ||
15367{
15368  tmp= ac_tmp=
15369  trap 'exit_status=$?
15370  : "${ac_tmp:=$tmp}"
15371  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15372' 0
15373  trap 'as_fn_exit 1' 1 2 13 15
15374}
15375# Create a (secure) tmp directory for tmp files.
15376
15377{
15378  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15379  test -d "$tmp"
15380}  ||
15381{
15382  tmp=./conf$$-$RANDOM
15383  (umask 077 && mkdir "$tmp")
15384} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15385ac_tmp=$tmp
15386
15387# Set up the scripts for CONFIG_FILES section.
15388# No need to generate them if there are no CONFIG_FILES.
15389# This happens for instance with `./config.status config.h'.
15390if test -n "$CONFIG_FILES"; then
15391
15392
15393ac_cr=`echo X | tr X '\015'`
15394# On cygwin, bash can eat \r inside `` if the user requested igncr.
15395# But we know of no other shell where ac_cr would be empty at this
15396# point, so we can use a bashism as a fallback.
15397if test "x$ac_cr" = x; then
15398  eval ac_cr=\$\'\\r\'
15399fi
15400ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15401if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15402  ac_cs_awk_cr='\\r'
15403else
15404  ac_cs_awk_cr=$ac_cr
15405fi
15406
15407echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15408_ACEOF
15409
15410
15411{
15412  echo "cat >conf$$subs.awk <<_ACEOF" &&
15413  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15414  echo "_ACEOF"
15415} >conf$$subs.sh ||
15416  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15417ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15418ac_delim='%!_!# '
15419for ac_last_try in false false false false false :; do
15420  . ./conf$$subs.sh ||
15421    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15422
15423  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15424  if test $ac_delim_n = $ac_delim_num; then
15425    break
15426  elif $ac_last_try; then
15427    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15428  else
15429    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15430  fi
15431done
15432rm -f conf$$subs.sh
15433
15434cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15435cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15436_ACEOF
15437sed -n '
15438h
15439s/^/S["/; s/!.*/"]=/
15440p
15441g
15442s/^[^!]*!//
15443:repl
15444t repl
15445s/'"$ac_delim"'$//
15446t delim
15447:nl
15448h
15449s/\(.\{148\}\)..*/\1/
15450t more1
15451s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15452p
15453n
15454b repl
15455:more1
15456s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15457p
15458g
15459s/.\{148\}//
15460t nl
15461:delim
15462h
15463s/\(.\{148\}\)..*/\1/
15464t more2
15465s/["\\]/\\&/g; s/^/"/; s/$/"/
15466p
15467b
15468:more2
15469s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15470p
15471g
15472s/.\{148\}//
15473t delim
15474' <conf$$subs.awk | sed '
15475/^[^""]/{
15476  N
15477  s/\n//
15478}
15479' >>$CONFIG_STATUS || ac_write_fail=1
15480rm -f conf$$subs.awk
15481cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15482_ACAWK
15483cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15484  for (key in S) S_is_set[key] = 1
15485  FS = ""
15486
15487}
15488{
15489  line = $ 0
15490  nfields = split(line, field, "@")
15491  substed = 0
15492  len = length(field[1])
15493  for (i = 2; i < nfields; i++) {
15494    key = field[i]
15495    keylen = length(key)
15496    if (S_is_set[key]) {
15497      value = S[key]
15498      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15499      len += length(value) + length(field[++i])
15500      substed = 1
15501    } else
15502      len += 1 + keylen
15503  }
15504
15505  print line
15506}
15507
15508_ACAWK
15509_ACEOF
15510cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15511if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15512  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15513else
15514  cat
15515fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15516  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15517_ACEOF
15518
15519# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15520# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15521# trailing colons and then remove the whole line if VPATH becomes empty
15522# (actually we leave an empty line to preserve line numbers).
15523if test "x$srcdir" = x.; then
15524  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
15525h
15526s///
15527s/^/:/
15528s/[	 ]*$/:/
15529s/:\$(srcdir):/:/g
15530s/:\${srcdir}:/:/g
15531s/:@srcdir@:/:/g
15532s/^:*//
15533s/:*$//
15534x
15535s/\(=[	 ]*\).*/\1/
15536G
15537s/\n//
15538s/^[^=]*=[	 ]*$//
15539}'
15540fi
15541
15542cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15543fi # test -n "$CONFIG_FILES"
15544
15545# Set up the scripts for CONFIG_HEADERS section.
15546# No need to generate them if there are no CONFIG_HEADERS.
15547# This happens for instance with `./config.status Makefile'.
15548if test -n "$CONFIG_HEADERS"; then
15549cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15550BEGIN {
15551_ACEOF
15552
15553# Transform confdefs.h into an awk script `defines.awk', embedded as
15554# here-document in config.status, that substitutes the proper values into
15555# config.h.in to produce config.h.
15556
15557# Create a delimiter string that does not exist in confdefs.h, to ease
15558# handling of long lines.
15559ac_delim='%!_!# '
15560for ac_last_try in false false :; do
15561  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15562  if test -z "$ac_tt"; then
15563    break
15564  elif $ac_last_try; then
15565    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15566  else
15567    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15568  fi
15569done
15570
15571# For the awk script, D is an array of macro values keyed by name,
15572# likewise P contains macro parameters if any.  Preserve backslash
15573# newline sequences.
15574
15575ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15576sed -n '
15577s/.\{148\}/&'"$ac_delim"'/g
15578t rset
15579:rset
15580s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
15581t def
15582d
15583:def
15584s/\\$//
15585t bsnl
15586s/["\\]/\\&/g
15587s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
15588D["\1"]=" \3"/p
15589s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
15590d
15591:bsnl
15592s/["\\]/\\&/g
15593s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
15594D["\1"]=" \3\\\\\\n"\\/p
15595t cont
15596s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15597t cont
15598d
15599:cont
15600n
15601s/.\{148\}/&'"$ac_delim"'/g
15602t clear
15603:clear
15604s/\\$//
15605t bsnlc
15606s/["\\]/\\&/g; s/^/"/; s/$/"/p
15607d
15608:bsnlc
15609s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15610b cont
15611' <confdefs.h | sed '
15612s/'"$ac_delim"'/"\\\
15613"/g' >>$CONFIG_STATUS || ac_write_fail=1
15614
15615cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15616  for (key in D) D_is_set[key] = 1
15617  FS = ""
15618}
15619/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15620  line = \$ 0
15621  split(line, arg, " ")
15622  if (arg[1] == "#") {
15623    defundef = arg[2]
15624    mac1 = arg[3]
15625  } else {
15626    defundef = substr(arg[1], 2)
15627    mac1 = arg[2]
15628  }
15629  split(mac1, mac2, "(") #)
15630  macro = mac2[1]
15631  prefix = substr(line, 1, index(line, defundef) - 1)
15632  if (D_is_set[macro]) {
15633    # Preserve the white space surrounding the "#".
15634    print prefix "define", macro P[macro] D[macro]
15635    next
15636  } else {
15637    # Replace #undef with comments.  This is necessary, for example,
15638    # in the case of _POSIX_SOURCE, which is predefined and required
15639    # on some systems where configure will not decide to define it.
15640    if (defundef == "undef") {
15641      print "/*", prefix defundef, macro, "*/"
15642      next
15643    }
15644  }
15645}
15646{ print }
15647_ACAWK
15648_ACEOF
15649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15650  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15651fi # test -n "$CONFIG_HEADERS"
15652
15653
15654eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
15655shift
15656for ac_tag
15657do
15658  case $ac_tag in
15659  :[FHLC]) ac_mode=$ac_tag; continue;;
15660  esac
15661  case $ac_mode$ac_tag in
15662  :[FHL]*:*);;
15663  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15664  :[FH]-) ac_tag=-:-;;
15665  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15666  esac
15667  ac_save_IFS=$IFS
15668  IFS=:
15669  set x $ac_tag
15670  IFS=$ac_save_IFS
15671  shift
15672  ac_file=$1
15673  shift
15674
15675  case $ac_mode in
15676  :L) ac_source=$1;;
15677  :[FH])
15678    ac_file_inputs=
15679    for ac_f
15680    do
15681      case $ac_f in
15682      -) ac_f="$ac_tmp/stdin";;
15683      *) # Look for the file first in the build tree, then in the source tree
15684	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
15685	 # because $ac_f cannot contain `:'.
15686	 test -f "$ac_f" ||
15687	   case $ac_f in
15688	   [\\/$]*) false;;
15689	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15690	   esac ||
15691	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15692      esac
15693      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15694      as_fn_append ac_file_inputs " '$ac_f'"
15695    done
15696
15697    # Let's still pretend it is `configure' which instantiates (i.e., don't
15698    # use $as_me), people would be surprised to read:
15699    #    /* config.h.  Generated by config.status.  */
15700    configure_input='Generated from '`
15701	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15702	`' by configure.'
15703    if test x"$ac_file" != x-; then
15704      configure_input="$ac_file.  $configure_input"
15705      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15706$as_echo "$as_me: creating $ac_file" >&6;}
15707    fi
15708    # Neutralize special characters interpreted by sed in replacement strings.
15709    case $configure_input in #(
15710    *\&* | *\|* | *\\* )
15711       ac_sed_conf_input=`$as_echo "$configure_input" |
15712       sed 's/[\\\\&|]/\\\\&/g'`;; #(
15713    *) ac_sed_conf_input=$configure_input;;
15714    esac
15715
15716    case $ac_tag in
15717    *:-:* | *:-) cat >"$ac_tmp/stdin" \
15718      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15719    esac
15720    ;;
15721  esac
15722
15723  ac_dir=`$as_dirname -- "$ac_file" ||
15724$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15725	 X"$ac_file" : 'X\(//\)[^/]' \| \
15726	 X"$ac_file" : 'X\(//\)$' \| \
15727	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15728$as_echo X"$ac_file" |
15729    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15730	    s//\1/
15731	    q
15732	  }
15733	  /^X\(\/\/\)[^/].*/{
15734	    s//\1/
15735	    q
15736	  }
15737	  /^X\(\/\/\)$/{
15738	    s//\1/
15739	    q
15740	  }
15741	  /^X\(\/\).*/{
15742	    s//\1/
15743	    q
15744	  }
15745	  s/.*/./; q'`
15746  as_dir="$ac_dir"; as_fn_mkdir_p
15747  ac_builddir=.
15748
15749case "$ac_dir" in
15750.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15751*)
15752  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15753  # A ".." for each directory in $ac_dir_suffix.
15754  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15755  case $ac_top_builddir_sub in
15756  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15757  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15758  esac ;;
15759esac
15760ac_abs_top_builddir=$ac_pwd
15761ac_abs_builddir=$ac_pwd$ac_dir_suffix
15762# for backward compatibility:
15763ac_top_builddir=$ac_top_build_prefix
15764
15765case $srcdir in
15766  .)  # We are building in place.
15767    ac_srcdir=.
15768    ac_top_srcdir=$ac_top_builddir_sub
15769    ac_abs_top_srcdir=$ac_pwd ;;
15770  [\\/]* | ?:[\\/]* )  # Absolute name.
15771    ac_srcdir=$srcdir$ac_dir_suffix;
15772    ac_top_srcdir=$srcdir
15773    ac_abs_top_srcdir=$srcdir ;;
15774  *) # Relative name.
15775    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15776    ac_top_srcdir=$ac_top_build_prefix$srcdir
15777    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15778esac
15779ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15780
15781
15782  case $ac_mode in
15783  :F)
15784  #
15785  # CONFIG_FILE
15786  #
15787
15788  case $INSTALL in
15789  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15790  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15791  esac
15792  ac_MKDIR_P=$MKDIR_P
15793  case $MKDIR_P in
15794  [\\/$]* | ?:[\\/]* ) ;;
15795  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15796  esac
15797_ACEOF
15798
15799cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15800# If the template does not know about datarootdir, expand it.
15801# FIXME: This hack should be removed a few years after 2.60.
15802ac_datarootdir_hack=; ac_datarootdir_seen=
15803ac_sed_dataroot='
15804/datarootdir/ {
15805  p
15806  q
15807}
15808/@datadir@/p
15809/@docdir@/p
15810/@infodir@/p
15811/@localedir@/p
15812/@mandir@/p'
15813case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15814*datarootdir*) ac_datarootdir_seen=yes;;
15815*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15816  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15817$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15818_ACEOF
15819cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15820  ac_datarootdir_hack='
15821  s&@datadir@&$datadir&g
15822  s&@docdir@&$docdir&g
15823  s&@infodir@&$infodir&g
15824  s&@localedir@&$localedir&g
15825  s&@mandir@&$mandir&g
15826  s&\\\${datarootdir}&$datarootdir&g' ;;
15827esac
15828_ACEOF
15829
15830# Neutralize VPATH when `$srcdir' = `.'.
15831# Shell code in configure.ac might set extrasub.
15832# FIXME: do we really want to maintain this feature?
15833cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15834ac_sed_extra="$ac_vpsub
15835$extrasub
15836_ACEOF
15837cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15838:t
15839/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15840s|@configure_input@|$ac_sed_conf_input|;t t
15841s&@top_builddir@&$ac_top_builddir_sub&;t t
15842s&@top_build_prefix@&$ac_top_build_prefix&;t t
15843s&@srcdir@&$ac_srcdir&;t t
15844s&@abs_srcdir@&$ac_abs_srcdir&;t t
15845s&@top_srcdir@&$ac_top_srcdir&;t t
15846s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15847s&@builddir@&$ac_builddir&;t t
15848s&@abs_builddir@&$ac_abs_builddir&;t t
15849s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15850s&@INSTALL@&$ac_INSTALL&;t t
15851s&@MKDIR_P@&$ac_MKDIR_P&;t t
15852$ac_datarootdir_hack
15853"
15854eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15855  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15856
15857test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15858  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15859  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
15860      "$ac_tmp/out"`; test -z "$ac_out"; } &&
15861  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15862which seems to be undefined.  Please make sure it is defined" >&5
15863$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15864which seems to be undefined.  Please make sure it is defined" >&2;}
15865
15866  rm -f "$ac_tmp/stdin"
15867  case $ac_file in
15868  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15869  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
15870  esac \
15871  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15872 ;;
15873  :H)
15874  #
15875  # CONFIG_HEADER
15876  #
15877  if test x"$ac_file" != x-; then
15878    {
15879      $as_echo "/* $configure_input  */" \
15880      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15881    } >"$ac_tmp/config.h" \
15882      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15883    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
15884      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15885$as_echo "$as_me: $ac_file is unchanged" >&6;}
15886    else
15887      rm -f "$ac_file"
15888      mv "$ac_tmp/config.h" "$ac_file" \
15889	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
15890    fi
15891  else
15892    $as_echo "/* $configure_input  */" \
15893      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15894      || as_fn_error $? "could not create -" "$LINENO" 5
15895  fi
15896# Compute "$ac_file"'s index in $config_headers.
15897_am_arg="$ac_file"
15898_am_stamp_count=1
15899for _am_header in $config_headers :; do
15900  case $_am_header in
15901    $_am_arg | $_am_arg:* )
15902      break ;;
15903    * )
15904      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
15905  esac
15906done
15907echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
15908$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15909	 X"$_am_arg" : 'X\(//\)[^/]' \| \
15910	 X"$_am_arg" : 'X\(//\)$' \| \
15911	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
15912$as_echo X"$_am_arg" |
15913    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15914	    s//\1/
15915	    q
15916	  }
15917	  /^X\(\/\/\)[^/].*/{
15918	    s//\1/
15919	    q
15920	  }
15921	  /^X\(\/\/\)$/{
15922	    s//\1/
15923	    q
15924	  }
15925	  /^X\(\/\).*/{
15926	    s//\1/
15927	    q
15928	  }
15929	  s/.*/./; q'`/stamp-h$_am_stamp_count
15930 ;;
15931
15932  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
15933$as_echo "$as_me: executing $ac_file commands" >&6;}
15934 ;;
15935  esac
15936
15937
15938  case $ac_file$ac_mode in
15939    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
15940  # Older Autoconf quotes --file arguments for eval, but not when files
15941  # are listed without --file.  Let's play safe and only enable the eval
15942  # if we detect the quoting.
15943  # TODO: see whether this extra hack can be removed once we start
15944  # requiring Autoconf 2.70 or later.
15945  case $CONFIG_FILES in #(
15946  *\'*) :
15947    eval set x "$CONFIG_FILES" ;; #(
15948  *) :
15949    set x $CONFIG_FILES ;; #(
15950  *) :
15951     ;;
15952esac
15953  shift
15954  # Used to flag and report bootstrapping failures.
15955  am_rc=0
15956  for am_mf
15957  do
15958    # Strip MF so we end up with the name of the file.
15959    am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
15960    # Check whether this is an Automake generated Makefile which includes
15961    # dependency-tracking related rules and includes.
15962    # Grep'ing the whole file directly is not great: AIX grep has a line
15963    # limit of 2048, but all sed's we know have understand at least 4000.
15964    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
15965      || continue
15966    am_dirpart=`$as_dirname -- "$am_mf" ||
15967$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15968	 X"$am_mf" : 'X\(//\)[^/]' \| \
15969	 X"$am_mf" : 'X\(//\)$' \| \
15970	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
15971$as_echo X"$am_mf" |
15972    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15973	    s//\1/
15974	    q
15975	  }
15976	  /^X\(\/\/\)[^/].*/{
15977	    s//\1/
15978	    q
15979	  }
15980	  /^X\(\/\/\)$/{
15981	    s//\1/
15982	    q
15983	  }
15984	  /^X\(\/\).*/{
15985	    s//\1/
15986	    q
15987	  }
15988	  s/.*/./; q'`
15989    am_filepart=`$as_basename -- "$am_mf" ||
15990$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
15991	 X"$am_mf" : 'X\(//\)$' \| \
15992	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
15993$as_echo X/"$am_mf" |
15994    sed '/^.*\/\([^/][^/]*\)\/*$/{
15995	    s//\1/
15996	    q
15997	  }
15998	  /^X\/\(\/\/\)$/{
15999	    s//\1/
16000	    q
16001	  }
16002	  /^X\/\(\/\).*/{
16003	    s//\1/
16004	    q
16005	  }
16006	  s/.*/./; q'`
16007    { echo "$as_me:$LINENO: cd "$am_dirpart" \
16008      && sed -e '/# am--include-marker/d' "$am_filepart" \
16009        | $MAKE -f - am--depfiles" >&5
16010   (cd "$am_dirpart" \
16011      && sed -e '/# am--include-marker/d' "$am_filepart" \
16012        | $MAKE -f - am--depfiles) >&5 2>&5
16013   ac_status=$?
16014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16015   (exit $ac_status); } || am_rc=$?
16016  done
16017  if test $am_rc -ne 0; then
16018    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16020as_fn_error $? "Something went wrong bootstrapping makefile fragments
16021    for automatic dependency tracking.  If GNU make was not used, consider
16022    re-running the configure script with MAKE=\"gmake\" (or whatever is
16023    necessary).  You can also try re-running configure with the
16024    '--disable-dependency-tracking' option to at least be able to build
16025    the package (albeit without support for automatic dependency tracking).
16026See \`config.log' for more details" "$LINENO" 5; }
16027  fi
16028  { am_dirpart=; unset am_dirpart;}
16029  { am_filepart=; unset am_filepart;}
16030  { am_mf=; unset am_mf;}
16031  { am_rc=; unset am_rc;}
16032  rm -f conftest-deps.mk
16033}
16034 ;;
16035
16036  esac
16037done # for ac_tag
16038
16039
16040as_fn_exit 0
16041_ACEOF
16042ac_clean_files=$ac_clean_files_save
16043
16044test $ac_write_fail = 0 ||
16045  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16046
16047
16048# configure is writing to config.log, and then calls config.status.
16049# config.status does its own redirection, appending to config.log.
16050# Unfortunately, on DOS this fails, as config.log is still kept open
16051# by configure, so config.status won't be able to write to it; its
16052# output is simply discarded.  So we exec the FD to /dev/null,
16053# effectively closing config.log, so it can be properly (re)opened and
16054# appended to by config.status.  When coming back to configure, we
16055# need to make the FD available again.
16056if test "$no_create" != yes; then
16057  ac_cs_success=:
16058  ac_config_status_args=
16059  test "$silent" = yes &&
16060    ac_config_status_args="$ac_config_status_args --quiet"
16061  exec 5>/dev/null
16062  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16063  exec 5>>config.log
16064  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16065  # would make configure fail if this is the last instruction.
16066  $ac_cs_success || as_fn_exit 1
16067fi
16068if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16069  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16070$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16071fi
16072
16073
16074
16075SERVER_CONFIG_FILE=`eval echo "${SERVER_CONFIG_FILE}"`
16076SERVER_CONFIG_FILE=`eval echo "${SERVER_CONFIG_FILE}"`
16077
16078PROXY_CONFIG_FILE=`eval echo "${PROXY_CONFIG_FILE}"`
16079PROXY_CONFIG_FILE=`eval echo "${PROXY_CONFIG_FILE}"`
16080
16081AGENT_CONFIG_FILE=`eval echo "${AGENT_CONFIG_FILE}"`
16082AGENT_CONFIG_FILE=`eval echo "${AGENT_CONFIG_FILE}"`
16083
16084AGENT2_CONFIG_FILE=`eval echo "${AGENT2_CONFIG_FILE}"`
16085AGENT2_CONFIG_FILE=`eval echo "${AGENT2_CONFIG_FILE}"`
16086
16087EXTERNAL_SCRIPTS_PATH=`eval echo "${EXTERNAL_SCRIPTS_PATH}"`
16088EXTERNAL_SCRIPTS_PATH=`eval echo "${EXTERNAL_SCRIPTS_PATH}"`
16089
16090ALERT_SCRIPTS_PATH=`eval echo "${ALERT_SCRIPTS_PATH}"`
16091ALERT_SCRIPTS_PATH=`eval echo "${ALERT_SCRIPTS_PATH}"`
16092
16093CURL_SSL_CERT_LOCATION=`eval echo "${CURL_SSL_CERT_LOCATION}"`
16094CURL_SSL_CERT_LOCATION=`eval echo "${CURL_SSL_CERT_LOCATION}"`
16095
16096CURL_SSL_KEY_LOCATION=`eval echo "${CURL_SSL_KEY_LOCATION}"`
16097CURL_SSL_KEY_LOCATION=`eval echo "${CURL_SSL_KEY_LOCATION}"`
16098
16099LOAD_MODULE_PATH=`eval echo "${LOAD_MODULE_PATH}"`
16100LOAD_MODULE_PATH=`eval echo "${LOAD_MODULE_PATH}"`
16101
16102echo "
16103
16104Configuration:
16105
16106  Detected OS:           ${host_os}
16107  Install path:          ${prefix}
16108  Compilation arch:      ${ARCH}
16109
16110  Compiler:              ${CC}
16111  Compiler flags:        ${CFLAGS}
16112
16113  Library-specific flags:"
16114
16115if test "x$DB_CFLAGS" != "x"; then
16116	echo "    database:              ${DB_CFLAGS}"
16117fi
16118
16119if test "x$LIBXML2_CFLAGS" != "x"; then
16120	echo "    libXML2:               ${LIBXML2_CFLAGS}"
16121fi
16122
16123if test "x$UNIXODBC_CFLAGS" != "x"; then
16124	echo "    unixODBC:              ${UNIXODBC_CFLAGS}"
16125fi
16126
16127if test "x$SNMP_CFLAGS" != "x"; then
16128	echo "    Net-SNMP:              ${SNMP_CFLAGS}"
16129fi
16130
16131if test "x$OPENIPMI_CFLAGS" != "x"; then
16132	echo "    OpenIPMI:              ${OPENIPMI_CFLAGS}"
16133fi
16134
16135if test "x$SSH2_CFLAGS" != "x"; then
16136	echo "    libssh2:               ${SSH2_CFLAGS}"
16137fi
16138
16139if test "x$SSH_CFLAGS" != "x"; then
16140	echo "    libssh:                ${SSH_CFLAGS}"
16141fi
16142
16143if test "x$TLS_CFLAGS" != "x"; then
16144	echo "    TLS:                   ${TLS_CFLAGS}"
16145fi
16146
16147if test "x$LDAP_CPPFLAGS" != "x"; then
16148	echo "    LDAP:                  ${LDAP_CPPFLAGS}"
16149fi
16150
16151if test "x$ICONV_CFLAGS" != "x"; then
16152	echo "    iconv:                 ${ICONV_CFLAGS}"
16153fi
16154
16155if test "x$LIBEVENT_CFLAGS" != "x"; then
16156	echo "    libevent:              ${LIBEVENT_CFLAGS}"
16157fi
16158
16159echo "
16160  Enable server:         ${server}"
16161
16162if test "x$server" != "xno"; then
16163
16164echo "  Server details:
16165    With database:         ${have_db}
16166    WEB Monitoring:        ${have_web_monitoring}"
16167
16168if test "x$have_web_monitoring" = "xcURL"; then
16169echo "      SSL certificates:      ${CURL_SSL_CERT_LOCATION}
16170      SSL keys:              ${CURL_SSL_KEY_LOCATION}"
16171fi
16172
16173echo "    SNMP:                  ${have_snmp}
16174    IPMI:                  ${have_ipmi}
16175    SSH:                   ${have_ssh}
16176    TLS:                   ${have_tls}
16177    ODBC:                  ${have_unixodbc}
16178    Linker flags:          ${SERVER_LDFLAGS} ${LDFLAGS}
16179    Libraries:             ${SERVER_LIBS} ${LIBS}
16180    Configuration file:    ${SERVER_CONFIG_FILE}
16181    External scripts:      ${EXTERNAL_SCRIPTS_PATH}
16182    Alert scripts:         ${ALERT_SCRIPTS_PATH}
16183    Modules:               ${LOAD_MODULE_PATH}"
16184
16185fi
16186
16187echo "
16188  Enable proxy:          ${proxy}"
16189
16190if test "x$proxy" != "xno"; then
16191
16192echo "  Proxy details:
16193    With database:         ${have_db}
16194    WEB Monitoring:        ${have_web_monitoring}"
16195
16196if test "x$have_web_monitoring" = "xcURL"; then
16197echo "      SSL certificates:      ${CURL_SSL_CERT_LOCATION}
16198      SSL keys:              ${CURL_SSL_KEY_LOCATION}"
16199fi
16200
16201echo "    SNMP:                  ${have_snmp}
16202    IPMI:                  ${have_ipmi}
16203    SSH:                   ${have_ssh}
16204    TLS:                   ${have_tls}
16205    ODBC:                  ${have_unixodbc}
16206    Linker flags:          ${PROXY_LDFLAGS} ${LDFLAGS}
16207    Libraries:             ${PROXY_LIBS} ${LIBS}
16208    Configuration file:    ${PROXY_CONFIG_FILE}
16209    External scripts:      ${EXTERNAL_SCRIPTS_PATH}
16210    Modules:               ${LOAD_MODULE_PATH}"
16211
16212fi
16213
16214echo "
16215  Enable agent:          ${agent}"
16216
16217if test "x$agent" != "xno"; then
16218
16219echo "  Agent details:
16220    TLS:                   ${have_tls}
16221    Linker flags:          ${AGENT_LDFLAGS} ${LDFLAGS}
16222    Libraries:             ${AGENT_LIBS} ${LIBS}
16223    Configuration file:    ${AGENT_CONFIG_FILE}
16224    Modules:               ${LOAD_MODULE_PATH}"
16225
16226fi
16227
16228echo "
16229  Enable agent 2:        ${agent2}"
16230
16231echo "
16232  Enable Java gateway:   ${java}"
16233
16234if test "x$java" != "xno"; then
16235
16236echo "  Java gateway details:
16237    Java compiler:         ${JAVAC}
16238    Java archiver:         ${JAR}"
16239
16240fi
16241
16242echo "
16243  LDAP support:          ${found_ldap}
16244  IPv6 support:          ${have_ipv6}"
16245
16246echo
16247echo "***********************************************************"
16248echo "*            Now run '${am_make} install'                       *"
16249echo "*                                                         *"
16250echo "*            Thank you for using Zabbix!                  *"
16251echo "*              <http://www.zabbix.com>                    *"
16252echo "***********************************************************"
16253echo
16254